-
Notifications
You must be signed in to change notification settings - Fork 406
feat(build): add transport-neutral worker stages #3083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 50 commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
79abe38
feat(build): add transport-neutral worker stages
james-elicx ad9fe26
feat(cache): admit responses within cacheable stages
james-elicx 337115c
fix(cache): preserve staged prewarming semantics
james-elicx cfae9ec
fix(cache): preserve staged routing parity
james-elicx 3b90c46
fix(cache): shape completed staged responses
james-elicx 58f56d3
fix(cache): reconcile outer private policies
james-elicx 365e79d
fix(cache): reconcile hybrid Pages outer policy
james-elicx d7b71bf
fix(cache): isolate request-stage cacheability
james-elicx 7b089b9
fix(build): keep client asset import beside server entry
james-elicx e29ce05
fix(cache): preserve staged HEAD and probe semantics
james-elicx cc60853
fix(cache): purge Pages CDN entries after revalidation
james-elicx 871e85c
test(cache): preserve staged execution context coverage
james-elicx b81aeaf
fix(cache): preserve staged request identity
james-elicx 7f3c02b
fix(cache): preserve regenerated response metadata
james-elicx 9570212
style(cache): format staged cache helpers
james-elicx 26a8b2f
fix(cache): bypass shared stages after middleware request overrides
james-elicx d8aef7d
fix(cache): admit explicitly public Pages APIs
james-elicx 3c5abef
fix(cache): preserve outer Pages cache policy
james-elicx cb143c4
refactor(cache): extract app request stage dispatch
james-elicx f6fb6f3
fix(build): classify both staged app graphs
james-elicx 2e6e873
fix(cache): preserve staged response policy precedence
james-elicx 77032d1
fix(cache): honor adapter-owned response policies
james-elicx a2ba36d
fix(cache): preserve staged pre-handler response headers
james-elicx d214996
test(cache): verify Pages pre-handler response headers
james-elicx 0a61fc6
fix(cache): thread adapter policy through admission
james-elicx bcd7dab
fix(cache): preserve static stage reuse
james-elicx 6f874e3
fix(cache): preserve normalized stage representations
james-elicx f2a072e
fix(cache): preserve Pages initial props policy
james-elicx 4f5e566
fix(build): detect default initial props assignments
james-elicx 8be9937
fix(cache): derive Pages policy ownership at runtime
james-elicx 301ef7f
test(build): cover transport-neutral stage outputs
james-elicx 216e695
test(cache): provide staged Pages runtime classification
james-elicx 1f9007a
fix(cache): make draft transitions bypass shared stages
james-elicx 8e77cba
fix(cache): keep cookie responses private after staged composition
james-elicx d857178
fix(cache): preserve staged late-response vetoes
james-elicx 7913939
fix(cache): preserve only completed staged vetoes
james-elicx 61b323d
fix(cache): preserve late request-stage policy
james-elicx 244eee1
test(cache): align staged browser policy
james-elicx e3941ff
fix(cache): keep transport core independently valid
james-elicx 516e812
fix(cache): preserve core admission semantics
james-elicx 2f4ba86
fix(cache): verify multi-stage prerender readiness
james-elicx 4989cd5
fix(cache): validate App response-stage readiness
james-elicx b9d50af
fix(cache): warm routes resolved by uncached stages
james-elicx 9cac117
fix(cache): retain staged readiness version proof
james-elicx eee868c
fix(cache): confine Pages readiness credentials
james-elicx c68d7d4
fix(cache): preserve env-bound adapter registration
james-elicx fa50a5b
fix(cache): initialize configured adapters once
james-elicx e11bab6
fix(cache): preserve explicit data adapters
james-elicx 0e3c84c
fix(cache): mark rewrite-resolved warm routes
james-elicx 61b9b1b
fix(cache): mark middleware-resolved warm routes
james-elicx ef41ed0
fix(cache): exclude externally rewritten warm paths
james-elicx 029e396
fix(cache): classify terminal request-stage probes
james-elicx e6b2271
fix(cache): encode probe route metadata
james-elicx 5b65155
fix(cache): preserve staged request semantics
james-elicx 7fa477e
fix(cache): authenticate Worker prerender state
james-elicx e219581
fix(cache): isolate request-stage cache adapters
james-elicx 0ce5b6d
fix(cache): preserve staged Pages response boundaries
james-elicx 9665720
fix(cache): probe request-stage terminal routes
james-elicx 34922be
fix(cache): report resolved probe pathnames
james-elicx e46fe4d
fix(cache): bypass hybrid custom Documents
james-elicx 1321ccb
fix(cache): preserve adapter policy probe coverage
james-elicx 86fb9d4
fix(build): preserve prewarm state in response stages
james-elicx 5a9f4c6
fix(cache): fail closed on wrapped Documents
james-elicx 69029fd
fix(cache): bypass stale Pages previews
james-elicx 3520ecd
fix(pages): keep invalid preview cleanup private
james-elicx 9e5d0c2
docs(pages): explain stale preview cache policy
james-elicx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,31 @@ | ||
| import fs from "node:fs"; | ||
| import path from "pathslash"; | ||
|
|
||
| const RSC_ENTRY_MANIFEST_KEY = "virtual:vinext-rsc-entry"; | ||
|
|
||
| /** Resolve the built App handler even when a deployment host owns index.js. */ | ||
| export function resolveBuiltRscEntryPath(serverDir: string): string { | ||
| const fallbackPath = path.join(serverDir, "index.js"); | ||
| const manifestPath = path.join(serverDir, ".vite", "manifest.json"); | ||
| let manifest: unknown; | ||
| try { | ||
| manifest = JSON.parse(fs.readFileSync(manifestPath, "utf-8")); | ||
| } catch (error) { | ||
| if (error && typeof error === "object" && "code" in error && error.code === "ENOENT") { | ||
| return fallbackPath; | ||
| } | ||
| if (error instanceof SyntaxError) return fallbackPath; | ||
| throw error; | ||
| } | ||
|
|
||
| if (!manifest || typeof manifest !== "object" || Array.isArray(manifest)) return fallbackPath; | ||
| const entry = Reflect.get(manifest, RSC_ENTRY_MANIFEST_KEY); | ||
| if (!entry || typeof entry !== "object") return fallbackPath; | ||
| const file = Reflect.get(entry, "file"); | ||
| if (typeof file !== "string") return fallbackPath; | ||
|
|
||
| const entryPath = path.resolve(serverDir, file); | ||
| const relativePath = path.relative(serverDir, entryPath); | ||
| if (relativePath.startsWith("../") || path.isAbsolute(relativePath)) return fallbackPath; | ||
| return fs.existsSync(entryPath) ? entryPath : fallbackPath; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.