@@ -97,7 +97,7 @@ export function getCloudflareContext<
97
97
}
98
98
99
99
if ( options . async ) {
100
- return getAndSetCloudflareContextInNextDev ( ) ;
100
+ return getAndSetCloudflareContextInNodejs ( ) ;
101
101
}
102
102
103
103
// the cloudflare context is initialized by the worker and is always present in production/preview
@@ -154,7 +154,7 @@ function shouldContextInitializationRun(): boolean {
154
154
}
155
155
156
156
/**
157
- * Adds the cloudflare context to the global scope in which the Next.js dev node.js process runs in , enabling
157
+ * Adds the cloudflare context to the global scope of the current node.js process, enabling
158
158
* future calls to `getCloudflareContext` to retrieve and return such context
159
159
*
160
160
* @param cloudflareContext the cloudflare context to add to the node.sj global scope
@@ -221,13 +221,13 @@ async function getCloudflareContextFromWrangler<
221
221
}
222
222
223
223
/**
224
- * Gets a local proxy version of the cloudflare context (created using `getPlatformProxy`) when
225
- * running in the standard next dev server (via `next dev `), is also sets this value on the
224
+ * Gets a local proxy version of the cloudflare context (created using `getPlatformProxy`) when running
225
+ * in a Node.js process (so under ` next dev` or for ssg under `next build `), is also sets this value on the
226
226
* globalThis so that it can be accessed later.
227
227
*
228
228
* @returns the local proxy version of the cloudflare context
229
229
*/
230
- async function getAndSetCloudflareContextInNextDev <
230
+ async function getAndSetCloudflareContextInNodejs <
231
231
CfProperties extends Record < string , unknown > = IncomingRequestCfProperties ,
232
232
Context = ExecutionContext ,
233
233
> ( ) : Promise < CloudflareContext < CfProperties , Context > > {
0 commit comments