Skip to content

Commit

Permalink
Use setcookie from std
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Candeia <[email protected]>
  • Loading branch information
mcandeia committed Sep 11, 2024
1 parent 01103c1 commit adcc090
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@
"jsxImportSource": "preact"
},
"version": "0.57.1"
}
}
6 changes: 3 additions & 3 deletions files/loaders/app.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { ImportMap } from "@deco/deco/blocks";
import { decoManifestBuilder } from "@deco/deco/utils";
import { createCache } from "https://deno.land/x/[email protected]/mod.ts";
import { build, initialize } from "https://deno.land/x/[email protected]/wasm.js";
import {
Expand All @@ -8,8 +10,6 @@ import { dirname, join } from "std/path/mod.ts";
import { DynamicApp } from "../../decohub/mod.ts";
import { AppContext } from "../mod.ts";
import { create, FileSystemNode, isDir, nodesToMap, walk } from "../sdk.ts";
import { ImportMap } from "@deco/deco/blocks";
import { decoManifestBuilder } from "@deco/deco/utils";
const initializePromise = initialize({
wasmURL: "https://deno.land/x/[email protected]/esbuild.wasm",
worker: false,
Expand Down Expand Up @@ -170,7 +170,7 @@ const loader = async (
\n
import manifest, { Manifest } from "./manifest.gen.ts";
import website, { Props as WebSiteProps } from "apps/website/mod.ts";
import { App, AppContext as AC } from "deco/mod.ts";
import { App, AppContext as AC } from "@deco/deco";
export default function App(props: WebSiteProps): App<Manifest, WebSiteProps, [ReturnType<typeof website>]> {
return {
Expand Down
2 changes: 1 addition & 1 deletion mailchimp/actions/subscribe.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { setCookie } from "deco/deps.ts";
import { setCookie } from "std/http/cookie.ts";
import { AppContext } from "../mod.ts";
import { toMd5 } from "../utils/transform.ts";

Expand Down
2 changes: 1 addition & 1 deletion resend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Resend is an email platform that helps developers build and send transactional a

```typescript
// runtime.ts
import { proxy } from "deco/clients/withManifest.ts";
import { proxy } from "@deco/deco/web";
import type { Manifest } from "./manifest.gen.ts";
import type { Manifest as ManifestVNDA } from "apps/vnda/manifest.gen.ts";
import type { Manifest as ManifestVTEX } from "apps/vtex/manifest.gen.ts";
Expand Down
2 changes: 1 addition & 1 deletion scripts/new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ await Deno.writeTextFile(
await Deno.writeTextFile(
join(Deno.cwd(), appName, "mod.ts"),
`
import type { App, AppContext as AC } from "deco/mod.ts";
import type { App, AppContext as AC } from "@deco/deco";
import manifest, { Manifest } from "./manifest.gen.ts";
export interface State {
Expand Down
5 changes: 2 additions & 3 deletions website/loaders/pages.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import defaults from "deco/engine/manifest/defaults.ts";
import { Route } from "../flags/audience.ts";
import { AppContext } from "../mod.ts";
import Page from "../pages/Page.tsx";
Expand All @@ -8,7 +7,7 @@ async function getAllPages(ctx: AppContext): Promise<Route[]> {
Record<string, Parameters<typeof Page>[0]>
>({
type: "pages",
__resolveType: defaults["blockSelector"].name,
__resolveType: "blockSelector",
});

const routes: Route[] = [];
Expand Down Expand Up @@ -46,7 +45,7 @@ export default async function Pages(
Route[]
>({
func: () => getAllPages(ctx),
__resolveType: defaults["once"].name,
__resolveType: "once",
});

return allPages;
Expand Down
5 changes: 2 additions & 3 deletions website/loaders/redirects.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import defaults from "deco/engine/manifest/defaults.ts";
import { Route } from "../flags/audience.ts";
import { AppContext } from "../mod.ts";
import { type Props as RedirectProps } from "./redirect.ts";
Expand All @@ -9,7 +8,7 @@ const isHref = (from: string) =>
async function getAllRedirects(ctx: AppContext): Promise<Route[]> {
const allRedirects = await ctx.get<RedirectProps[]>({
resolveType: "website/loaders/redirect.ts",
__resolveType: defaults["resolveTypeSelector"].name,
__resolveType: "resolveTypeSelector",
});

const routes: Route[] = allRedirects.map(({ redirect }) => ({
Expand Down Expand Up @@ -38,7 +37,7 @@ export default async function Redirects(
const allRedirects = await ctx.get<Route[]>({
key: "getAllRedirects",
func: () => getAllRedirects(ctx),
__resolveType: defaults["once"].name,
__resolveType: "once",
});

return allRedirects;
Expand Down

0 comments on commit adcc090

Please sign in to comment.