diff --git a/packages/cloudflare/src/cli/templates/utils/create-als-proxy.ts b/packages/cloudflare/src/cli/templates/utils/create-als-proxy.ts index 1c17ce92..ea709b00 100644 --- a/packages/cloudflare/src/cli/templates/utils/create-als-proxy.ts +++ b/packages/cloudflare/src/cli/templates/utils/create-als-proxy.ts @@ -1,9 +1,9 @@ import type { AsyncLocalStorage } from "node:async_hooks"; /** - * Creates a proxy for to use for an instance of AsyncLocalStorage. + * Creates a proxy that exposes values from an AsyncLocalStorage store * - * @param als AsyncLocalStorage instance. + * @param als AsyncLocalStorage instance */ export function createALSProxy(als: AsyncLocalStorage) { return new Proxy( diff --git a/packages/cloudflare/src/cli/templates/worker.ts b/packages/cloudflare/src/cli/templates/worker.ts index 2eebb066..4e0b83c5 100644 --- a/packages/cloudflare/src/cli/templates/worker.ts +++ b/packages/cloudflare/src/cli/templates/worker.ts @@ -1,7 +1,6 @@ import { AsyncLocalStorage } from "node:async_hooks"; import type { IncomingMessage } from "node:http"; import Stream from "node:stream"; -import { createALSProxy } from "./utils"; import type { ExportedHandler, Fetcher } from "@cloudflare/workers-types"; import type { NextConfig } from "next"; @@ -10,6 +9,7 @@ import { MockedResponse } from "next/dist/server/lib/mock-request"; import type { NodeRequestHandler } from "next/dist/server/next-server"; import type { CloudflareContext } from "../../api"; +import { createALSProxy } from "./utils"; const NON_BODY_RESPONSES = new Set([101, 204, 205, 304]);