Skip to content

Commit 8058012

Browse files
committed
fix: support passing options to init open-next cloudflare dev function
1 parent d7385c2 commit 8058012

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,13 @@ async function getCloudflareContextAsync<
168168
* with the open-next Cloudflare adapter
169169
*
170170
* Note: this function should only be called inside the Next.js config file, and although async it doesn't need to be `await`ed
171+
* @param options options how the function should operate and if/where to persist the platform data
171172
*/
172-
export async function initOpenNextCloudflareForDev() {
173+
export async function initOpenNextCloudflareForDev(options?: Omit<GetPlatformProxyOptions, "environment">) {
173174
const shouldInitializationRun = shouldContextInitializationRun();
174175
if (!shouldInitializationRun) return;
175176

176-
const context = await getCloudflareContextFromWrangler();
177+
const context = await getCloudflareContextFromWrangler(options);
177178

178179
addCloudflareContextToNodejsGlobal(context);
179180

0 commit comments

Comments
 (0)