File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
packages/cloudflare/src/api Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 11import type { Context , RunningCodeOptions } from "node:vm" ;
22
3+ import type { GetPlatformProxyOptions } from "wrangler" ;
4+
35import type { DurableObjectQueueHandler } from "./durable-objects/queue" ;
46import { DOShardedTagCache } from "./durable-objects/sharded-tag-cache" ;
57
@@ -290,12 +292,13 @@ async function monkeyPatchVmModuleEdgeContext(cloudflareContext: CloudflareConte
290292async function getCloudflareContextFromWrangler <
291293 CfProperties extends Record < string , unknown > = IncomingRequestCfProperties ,
292294 Context = ExecutionContext ,
293- > ( ) : Promise < CloudflareContext < CfProperties , Context > > {
295+ > ( options ?: Omit < GetPlatformProxyOptions , "environment" > ) : Promise < CloudflareContext < CfProperties , Context > > {
294296 // Note: we never want wrangler to be bundled in the Next.js app, that's why the import below looks like it does
295297 const { getPlatformProxy } = await import ( /* webpackIgnore: true */ `${ "__wrangler" . replaceAll ( "_" , "" ) } ` ) ;
296298 const { env, cf, ctx } = await getPlatformProxy ( {
297299 // This allows the selection of a wrangler environment while running in next dev mode
298300 environment : process . env . NEXT_DEV_WRANGLER_ENV ,
301+ ...options ,
299302 } ) ;
300303 return {
301304 env,
You can’t perform that action at this time.
0 commit comments