Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Dario Piotrowicz <[email protected]>
  • Loading branch information
james-elicx and dario-piotrowicz committed Oct 18, 2024
1 parent 627d10b commit e7f9206
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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<T>(als: AsyncLocalStorage<T>) {
return new Proxy(
Expand Down
2 changes: 1 addition & 1 deletion packages/cloudflare/src/cli/templates/worker.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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]);

Expand Down

0 comments on commit e7f9206

Please sign in to comment.