-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: pass waitUntil from NextRequestHint to wrapped NextWebServer
- Loading branch information
1 parent
6535d32
commit 721339d
Showing
4 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
packages/next/src/client/components/lifecycle-async-storage-instance.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { createAsyncLocalStorage } from './async-local-storage' | ||
import type { LifecycleAsyncStorage } from './lifecycle-async-storage.external' | ||
|
||
export const _lifecycleAsyncStorage: LifecycleAsyncStorage = | ||
createAsyncLocalStorage() |
11 changes: 11 additions & 0 deletions
11
packages/next/src/client/components/lifecycle-async-storage.external.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { AsyncLocalStorage } from 'async_hooks' | ||
// Share the instance module in the next-shared layer | ||
import { _lifecycleAsyncStorage as lifecycleAsyncStorage } from './lifecycle-async-storage-instance' with { 'turbopack-transition': 'next-shared' } | ||
|
||
export interface LifecycleStore { | ||
readonly waitUntil: ((promise: Promise<any>) => void) | undefined | ||
} | ||
|
||
export type LifecycleAsyncStorage = AsyncLocalStorage<LifecycleStore> | ||
|
||
export { lifecycleAsyncStorage } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters