Skip to content

Commit 1c298b1

Browse files
fixup! enable getCloudflareContext to work in middlewares via a new enableEdgeDevGetCloudflareContext utility
add comment to `getCloudflareContext`
1 parent db0a4fb commit 1c298b1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/cloudflare/src/api/cloudflare-context.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ async function monkeyPatchVmModuleEdgeContext(cloudflareContext: CloudflareConte
148148
};
149149
}
150150

151+
/**
152+
* Gets a cloudflare context object from wrangler
153+
*
154+
* @returns the cloudflare context ready for use
155+
*/
151156
async function getCloudflareContextFromWrangler<
152157
CfProperties extends Record<string, unknown> = IncomingRequestCfProperties,
153158
Context = ExecutionContext,

0 commit comments

Comments
 (0)