@timber-js/app 0.2.0-alpha.160 → 0.2.0-alpha.161
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{actions-C9yAuoX3.js → actions-cjklt63G.js} +7 -4
- package/dist/_chunks/{actions-C9yAuoX3.js.map → actions-cjklt63G.js.map} +1 -1
- package/dist/_chunks/{cache-api-swbefQ6F.js → cache-api-CzYUlgXA.js} +2 -2
- package/dist/_chunks/{cache-api-swbefQ6F.js.map → cache-api-CzYUlgXA.js.map} +1 -1
- package/dist/_chunks/{cli-schema-sync-BhYDz_-x.js → cli-schema-sync-NfLbLnDw.js} +2 -2
- package/dist/_chunks/{cli-schema-sync-BhYDz_-x.js.map → cli-schema-sync-NfLbLnDw.js.map} +1 -1
- package/dist/_chunks/{logger-CPoQkGK6.js → logger-B_O6-mdJ.js} +7 -45
- package/dist/_chunks/logger-B_O6-mdJ.js.map +1 -0
- package/dist/_chunks/{walkers-c8aReVgo.js → walkers-9mz9T7mb.js} +2 -2
- package/dist/_chunks/{walkers-c8aReVgo.js.map → walkers-9mz9T7mb.js.map} +1 -1
- package/dist/adapters/cloudflare.d.ts +13 -13
- package/dist/adapters/cloudflare.d.ts.map +1 -1
- package/dist/adapters/cloudflare.js +44 -46
- package/dist/adapters/cloudflare.js.map +1 -1
- package/dist/adapters/nitro.d.ts.map +1 -1
- package/dist/adapters/nitro.js +1 -8
- package/dist/adapters/nitro.js.map +1 -1
- package/dist/adapters/types.d.ts +0 -6
- package/dist/adapters/types.d.ts.map +1 -1
- package/dist/cache/index.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/client/child-segment-context.d.ts +22 -0
- package/dist/client/child-segment-context.d.ts.map +1 -0
- package/dist/client/child-segment-outlet.d.ts +18 -0
- package/dist/client/child-segment-outlet.d.ts.map +1 -0
- package/dist/client/child-segment-provider.d.ts +21 -0
- package/dist/client/child-segment-provider.d.ts.map +1 -0
- package/dist/client/use-cookie.d.ts.map +1 -1
- package/dist/cookies/index.js +5 -1
- package/dist/cookies/index.js.map +1 -1
- package/dist/index.js +256 -9
- package/dist/index.js.map +1 -1
- package/dist/plugins/cache.d.ts.map +1 -1
- package/dist/plugins/callsite-ast.d.ts +27 -5
- package/dist/plugins/callsite-ast.d.ts.map +1 -1
- package/dist/plugins/fonts.d.ts.map +1 -1
- package/dist/plugins/prebuilt-capture.d.ts.map +1 -1
- package/dist/plugins/shims.d.ts.map +1 -1
- package/dist/routing/index.js +2 -2
- package/dist/server/actions.d.ts.map +1 -1
- package/dist/server/als-registry.d.ts +1 -0
- package/dist/server/als-registry.d.ts.map +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/internal.js +85 -10
- package/dist/server/internal.js.map +1 -1
- package/dist/server/prebuilt-builder.d.ts.map +1 -1
- package/dist/server/prebuilt-runtime.d.ts.map +1 -1
- package/dist/server/primitives.d.ts +5 -12
- package/dist/server/primitives.d.ts.map +1 -1
- package/dist/server/route-element-builder.d.ts +7 -0
- package/dist/server/route-element-builder.d.ts.map +1 -1
- package/dist/server/rsc-entry/index.d.ts +2 -2
- package/dist/server/rsc-entry/index.d.ts.map +1 -1
- package/dist/server/rsc-entry/render-route.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/adapters/cloudflare.ts +41 -63
- package/src/adapters/nitro.ts +0 -11
- package/src/adapters/types.ts +0 -7
- package/src/client/child-segment-context.ts +40 -0
- package/src/client/child-segment-outlet.tsx +25 -0
- package/src/client/child-segment-provider.tsx +27 -0
- package/src/client/use-cookie.ts +11 -1
- package/src/plugins/cache.ts +44 -1
- package/src/plugins/callsite-ast.ts +310 -5
- package/src/plugins/fonts.ts +8 -0
- package/src/plugins/prebuilt-capture.ts +7 -0
- package/src/plugins/shims.ts +24 -0
- package/src/server/actions.ts +10 -1
- package/src/server/als-registry.ts +1 -0
- package/src/server/index.ts +1 -1
- package/src/server/prebuilt-builder.ts +120 -42
- package/src/server/prebuilt-runtime.ts +24 -1
- package/src/server/primitives.ts +5 -20
- package/src/server/route-element-builder.ts +31 -6
- package/src/server/rsc-entry/index.ts +40 -40
- package/src/server/rsc-entry/render-route.ts +6 -2
- package/src/server/rsc-entry/rsc-payload.ts +2 -2
- package/src/server/server-only-guard-noop.js +3 -0
- package/dist/_chunks/logger-CPoQkGK6.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/plugins/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/plugins/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AA4D1D;;;GAGG;AACH,iBAAS,gBAAgB,CACvB,kBAAkB,EAAE,MAAM,EAC1B,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACjB,MAAM,CAQR;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAuF/D;AAGD,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -59,16 +59,38 @@ export interface ImportBindings {
|
|
|
59
59
|
* (TIM-1054).
|
|
60
60
|
*/
|
|
61
61
|
export declare function findImportBindings(program: ProgramNode, sources: ReadonlySet<string>, importedName: string): ImportBindings;
|
|
62
|
+
export interface ShadowRange {
|
|
63
|
+
start: number;
|
|
64
|
+
end: number;
|
|
65
|
+
/** Which tracked binding names are shadowed in this range. */
|
|
66
|
+
names: ReadonlySet<string>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Collect byte ranges where any name in `tracked` is shadowed by a
|
|
70
|
+
* function/arrow parameter, catch clause binding, or lexical declaration
|
|
71
|
+
* (`const`/`let`/`var`, `function`, `class`, for-loop binding). Calls
|
|
72
|
+
* inside these ranges must NOT be rewritten — the name resolves to the
|
|
73
|
+
* local binding, not the import (TIM-1141).
|
|
74
|
+
*
|
|
75
|
+
* Each range records WHICH names are shadowed so the consumer can skip
|
|
76
|
+
* only calls to the shadowed name, not unrelated imports (codex review
|
|
77
|
+
* on PR #876).
|
|
78
|
+
*
|
|
79
|
+
* When a scope shadows some-but-not-all tracked names, the walker
|
|
80
|
+
* continues descending to find inner scopes that shadow remaining names
|
|
81
|
+
* (codex review round 2 on PR #876).
|
|
82
|
+
*/
|
|
83
|
+
export declare function collectShadowRanges(node: PositionedNode, tracked: ReadonlySet<string>, ranges: ShadowRange[]): void;
|
|
62
84
|
/**
|
|
63
85
|
* Recursively walk AST nodes collecting call expressions accepted by
|
|
64
86
|
* `matches`. Calls are typically at module scope, but calls inside
|
|
65
87
|
* functions/blocks are handled for completeness.
|
|
66
88
|
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* TIM-1141
|
|
70
|
-
*
|
|
71
|
-
*
|
|
89
|
+
* Consumers that match by binding NAME should pair this with
|
|
90
|
+
* `collectShadowRanges` to filter out calls in scopes where the tracked
|
|
91
|
+
* name is shadowed (TIM-1141). The prebuilt transform avoids the class
|
|
92
|
+
* entirely by allowlisting top-level declarator positions
|
|
93
|
+
* (plugins/prebuilt.ts).
|
|
72
94
|
*/
|
|
73
95
|
export declare function findCallSites(node: PositionedNode, matches: (call: CallExpressionNode) => boolean, results: CallExpressionNode[]): void;
|
|
74
96
|
/**
|
|
@@ -1 +1 @@
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EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,OAAO,EAC9C,OAAO,EAAE,kBAAkB,EAAE,GAC5B,IAAI,CAsBN;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,MAAM,EAC1B,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACjB,MAAM,CAIR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../src/plugins/fonts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAiC,MAAM,MAAM,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AA2B1D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../src/plugins/fonts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAiC,MAAM,MAAM,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AA2B1D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CA8MtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prebuilt-capture.d.ts","sourceRoot":"","sources":["../../src/plugins/prebuilt-capture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAOH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAkB,cAAc,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAanG,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,2EAA2E;IAC3E,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7B;AASD;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,MAAM,GAAG,sBAAsB,CAwCxF;AAED;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEtE;AASD;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"prebuilt-capture.d.ts","sourceRoot":"","sources":["../../src/plugins/prebuilt-capture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAOH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAkB,cAAc,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAanG,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,2EAA2E;IAC3E,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7B;AASD;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,MAAM,GAAG,sBAAsB,CAwCxF;AAED;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEtE;AASD;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAiFpF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shims.d.ts","sourceRoot":"","sources":["../../src/plugins/shims.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAsB1D;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAsBlD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EA6BhD,CAAC;AA2CF;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"shims.d.ts","sourceRoot":"","sources":["../../src/plugins/shims.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAsB1D;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAsBlD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EA6BhD,CAAC;AA2CF;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAkPvD"}
|
package/dist/routing/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { i as INTERCEPTION_MARKERS, n as classifyUrlSegment, r as DEFAULT_PAGE_EXTENSIONS, t as classifySegment } from "../_chunks/segment-classify-CDDRVKs7.js";
|
|
2
|
-
import { i as scanRoutes } from "../_chunks/cli-schema-sync-
|
|
3
|
-
import { a as generateRouteMap, i as validateSchemaAgainstRoutes, n as collectInterceptionRewrites, r as collectDynamicSegmentsFromTree, t as collectLeafRoutes } from "../_chunks/walkers-
|
|
2
|
+
import { i as scanRoutes } from "../_chunks/cli-schema-sync-NfLbLnDw.js";
|
|
3
|
+
import { a as generateRouteMap, i as validateSchemaAgainstRoutes, n as collectInterceptionRewrites, r as collectDynamicSegmentsFromTree, t as collectLeafRoutes } from "../_chunks/walkers-9mz9T7mb.js";
|
|
4
4
|
export { DEFAULT_PAGE_EXTENSIONS, INTERCEPTION_MARKERS, classifySegment, classifyUrlSegment, collectDynamicSegmentsFromTree, collectInterceptionRewrites, collectLeafRoutes, generateRouteMap, scanRoutes, validateSchemaAgainstRoutes };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/server/actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG5E,kFAAkF;AAClF,MAAM,WAAW,kBAAkB;IACjC,iFAAiF;IACjF,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,2EAA2E;AAC3E,MAAM,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAG/E,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,+CAA+C;AAC/C,MAAM,WAAW,mBAAmB;IAClC,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,kBAAkB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AAC;AAG/E,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,+CAA+C;AAC/C,MAAM,WAAW,mBAAmB;IAClC,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B;AAED,kDAAkD;AAClD,MAAM,WAAW,mBAAmB;IAClC,8CAA8C;IAC9C,YAAY,EAAE,OAAO,CAAC;IACtB,2FAA2F;IAC3F,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAQD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAErF;AAmBD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAKjD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAK/C;AAID;;;;;;;;;;;;GAYG;AACH,wBAAsB,aAAa,CACjC,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,EAClD,IAAI,EAAE,OAAO,EAAE,EACf,MAAM,GAAE,mBAAwB,EAChC,QAAQ,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GACtD,OAAO,CAAC,mBAAmB,CAAC,CA4F9B"}
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
* §"Singleton State Registry". Regression test:
|
|
31
31
|
* `tests/als-registry-singleton.test.ts`.
|
|
32
32
|
*/
|
|
33
|
+
import '#server-only-guard';
|
|
33
34
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
34
35
|
import type { DebugComponentEntry } from './rsc-entry/helpers.js';
|
|
35
36
|
/** @internal — import via request-context.ts public API */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"als-registry.d.ts","sourceRoot":"","sources":["../../src/server/als-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AA2BlE,2DAA2D;AAC3D,eAAO,MAAM,iBAAiB,wCAE7B,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,iDAAiD;IACjD,OAAO,EAAE,OAAO,CAAC;IACjB,0EAA0E;IAC1E,YAAY,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,uEAAuE;IACvE,eAAe,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,YAAY,EAAE,eAAe,CAAC;IAC9B;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAClD;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;;;;OAUG;IACH,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC;IAC/D,wFAAwF;IACxF,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACpC,4DAA4D;IAC5D,OAAO,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,cAAc,EAAE,OAAO,CAAC;IACxB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACp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D,eAAO,MAAM,YAAY,gCAAmE,CAAC;AAM7F,2EAA2E;AAC3E,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD;AAED,gEAAgE;AAChE,eAAO,MAAM,oBAAoB,yCAEhC,CAAC"}
|
package/dist/server/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type { ReadonlyHeaders } from './request-context';
|
|
|
7
7
|
export { getCookieJar } from './cookie-context';
|
|
8
8
|
export type { RequestCookies, CookieOptions, SetCookieOptions } from './cookie-context';
|
|
9
9
|
export { deny, redirect, redirectExternal, RedirectType, waitUntil, type DenyOptions, type RedirectOptions, } from './primitives';
|
|
10
|
-
export type { RenderErrorDigest
|
|
10
|
+
export type { RenderErrorDigest } from './primitives';
|
|
11
11
|
export { createActionClient, ActionError, validated } from './action-client';
|
|
12
12
|
export type { ActionResult, ActionFn, ActionBuilder, ActionBuilderWithSchema, ActionContext, ActionMiddleware, ActionSchema, ValidationErrors, } from './action-client';
|
|
13
13
|
export { coerce, parseFormData } from './form-data';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAMA,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAKxF,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACjE,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIzD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACh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Aa,EAAE,MAAM,aAAa,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGlD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAI1D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAI1E,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC"}
|
package/dist/server/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as addSpanEvent, C as RedirectType, E as getHeaders, F as getCookieJar, G as getTraceId, O as getSegmentParams, R as isDebug, S as waitUntil, W as getSpanId, Y as withSpan, Z as formFlashAls, _ as RedirectSignal, b as redirect, g as DenySignal, x as redirectExternal, y as deny, z as isDevMode } from "../_chunks/logger-
|
|
1
|
+
import { B as addSpanEvent, C as RedirectType, E as getHeaders, F as getCookieJar, G as getTraceId, O as getSegmentParams, R as isDebug, S as waitUntil, W as getSpanId, Y as withSpan, Z as formFlashAls, _ as RedirectSignal, b as redirect, g as DenySignal, x as redirectExternal, y as deny, z as isDevMode } from "../_chunks/logger-B_O6-mdJ.js";
|
|
2
2
|
import { t as formatSize } from "../_chunks/format-CfwjgPz9.js";
|
|
3
|
-
import { a as parseFormData, i as coerce, n as revalidatePath, r as revalidateTag } from "../_chunks/actions-
|
|
3
|
+
import { a as parseFormData, i as coerce, n as revalidatePath, r as revalidateTag } from "../_chunks/actions-cjklt63G.js";
|
|
4
4
|
//#region src/server/sensitive-fields.ts
|
|
5
5
|
/**
|
|
6
6
|
* Sensitive field stripping — removes password/token/CVV-style fields
|
package/dist/server/internal.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { a as classifyMetadataRoute, i as METADATA_ROUTE_CONVENTIONS, o as getMetadataRouteAutoLink, r as canonicalize, s as getMetadataRouteServePath } from "../_chunks/canonicalize-P41GR6tY.js";
|
|
2
2
|
import { n as classifyUrlSegment } from "../_chunks/segment-classify-CDDRVKs7.js";
|
|
3
|
-
import { A as runWithRequestContext, D as getSearchParams, G as getTraceId, H as generateTraceId, I as getSetCookieHeaders, J as setSpanAttribute, K as replaceTraceId, L as getWaitUntil, M as setMutableCookieContext, N as setSegmentParams, O as getSegmentParams, P as getCookie, Q as requestContextAls, R as isDebug, T as getHeader, U as getOtelTraceId, X as earlyHintsSenderAls, Y as withSpan, _ as RedirectSignal, a as logProxyError, c as logRequestReceived, d as logSwrRefetchFailed, et as timingAls, f as logWaitUntilRejected, g as DenySignal, h as swallow, i as logMiddlewareShortCircuit, j as setMatchedSegmentPath, k as markResponseFlushed, l as logRouteError, m as setLogger, n as logCacheMiss, o as logRenderError, p as logWaitUntilUnsupported, q as runWithTraceId, r as logMiddlewareError, s as logRequestCompleted, t as getLogger, u as logSlowRequest, v as RenderError, w as applyRequestHeaderOverlay } from "../_chunks/logger-
|
|
4
|
-
import { i as coerce, t as executeAction } from "../_chunks/actions-
|
|
5
|
-
import { a as getManifestEntry, b as wasInvalidatedSince, c as lookupPrebuiltPayload, d as checkVersionSkew, i as storeOverlayEntry, l as setPrebuiltPayloadSource, n as lookupOverlay, o as hasPrebuiltPayloadSource, r as overlayKey, s as isParamIndependent, u as applyReloadHeaders, v as currentInvalidationEpoch, x as createSingleflight, y as lastInvalidationEpochFor } from "../_chunks/cache-api-
|
|
3
|
+
import { A as runWithRequestContext, D as getSearchParams, G as getTraceId, H as generateTraceId, I as getSetCookieHeaders, J as setSpanAttribute, K as replaceTraceId, L as getWaitUntil, M as setMutableCookieContext, N as setSegmentParams, O as getSegmentParams, P as getCookie, Q as requestContextAls, R as isDebug, T as getHeader, U as getOtelTraceId, X as earlyHintsSenderAls, Y as withSpan, _ as RedirectSignal, a as logProxyError, c as logRequestReceived, d as logSwrRefetchFailed, et as timingAls, f as logWaitUntilRejected, g as DenySignal, h as swallow, i as logMiddlewareShortCircuit, j as setMatchedSegmentPath, k as markResponseFlushed, l as logRouteError, m as setLogger, n as logCacheMiss, o as logRenderError, p as logWaitUntilUnsupported, q as runWithTraceId, r as logMiddlewareError, s as logRequestCompleted, t as getLogger, u as logSlowRequest, v as RenderError, w as applyRequestHeaderOverlay } from "../_chunks/logger-B_O6-mdJ.js";
|
|
4
|
+
import { i as coerce, t as executeAction } from "../_chunks/actions-cjklt63G.js";
|
|
5
|
+
import { a as getManifestEntry, b as wasInvalidatedSince, c as lookupPrebuiltPayload, d as checkVersionSkew, i as storeOverlayEntry, l as setPrebuiltPayloadSource, n as lookupOverlay, o as hasPrebuiltPayloadSource, r as overlayKey, s as isParamIndependent, u as applyReloadHeaders, v as currentInvalidationEpoch, x as createSingleflight, y as lastInvalidationEpochFor } from "../_chunks/cache-api-CzYUlgXA.js";
|
|
6
6
|
import "../client/error-boundary.js";
|
|
7
7
|
import { n as toBracketKey } from "../_chunks/resolve-schema-3iUvBV5T.js";
|
|
8
8
|
import "../_chunks/segment-context-ZDnXDkbz.js";
|
|
9
9
|
import { readFile } from "node:fs/promises";
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
11
|
-
import React, { createElement } from "react";
|
|
11
|
+
import React, { createElement, useContext } from "react";
|
|
12
12
|
//#region src/server/server-timing.ts
|
|
13
13
|
/**
|
|
14
14
|
* Server-Timing header — dev-mode timing breakdowns for Chrome DevTools.
|
|
@@ -1633,17 +1633,17 @@ async function coerceSegmentParams(match) {
|
|
|
1633
1633
|
* See design/19-client-navigation.md §"Singleton Guarantee via globalThis"
|
|
1634
1634
|
*/
|
|
1635
1635
|
var EMPTY_SEGMENT_UPDATES = /* @__PURE__ */ new Map();
|
|
1636
|
-
var CTX_KEY = Symbol.for("__timber_segment_update_ctx");
|
|
1637
|
-
function getOrCreateContext() {
|
|
1638
|
-
const existing = globalThis[CTX_KEY];
|
|
1636
|
+
var CTX_KEY$1 = Symbol.for("__timber_segment_update_ctx");
|
|
1637
|
+
function getOrCreateContext$1() {
|
|
1638
|
+
const existing = globalThis[CTX_KEY$1];
|
|
1639
1639
|
if (existing !== void 0) return existing;
|
|
1640
1640
|
if (typeof React.createContext === "function") {
|
|
1641
1641
|
const ctx = React.createContext(EMPTY_SEGMENT_UPDATES);
|
|
1642
|
-
globalThis[CTX_KEY] = ctx;
|
|
1642
|
+
globalThis[CTX_KEY$1] = ctx;
|
|
1643
1643
|
return ctx;
|
|
1644
1644
|
}
|
|
1645
1645
|
}
|
|
1646
|
-
getOrCreateContext();
|
|
1646
|
+
getOrCreateContext$1();
|
|
1647
1647
|
//#endregion
|
|
1648
1648
|
//#region src/client/segment-outlet.tsx
|
|
1649
1649
|
/**
|
|
@@ -1670,6 +1670,74 @@ getOrCreateContext();
|
|
|
1670
1670
|
* See design/13-security.md §"State tree manipulation".
|
|
1671
1671
|
*/
|
|
1672
1672
|
//#endregion
|
|
1673
|
+
//#region src/client/child-segment-context.ts
|
|
1674
|
+
/**
|
|
1675
|
+
* ChildSegmentContext — delivers child segment content to ChildSegmentOutlet.
|
|
1676
|
+
*
|
|
1677
|
+
* Each layout receives a stable <ChildSegmentOutlet /> client reference as
|
|
1678
|
+
* its `children` prop instead of varying server content. The actual child
|
|
1679
|
+
* content (page or inner layout) is provided via this context from a
|
|
1680
|
+
* ChildSegmentProvider placed ABOVE the layout in the element tree.
|
|
1681
|
+
*
|
|
1682
|
+
* This structural separation is what makes layout cache.component hits
|
|
1683
|
+
* possible: the cached layout payload contains a deterministic client
|
|
1684
|
+
* reference as children, not the varying inner content that changes per
|
|
1685
|
+
* route. Same pattern as Next.js LayoutRouter.
|
|
1686
|
+
*
|
|
1687
|
+
* SINGLETON GUARANTEE: Uses globalThis + Symbol.for — same pattern as
|
|
1688
|
+
* SegmentUpdateContext. The RSC client bundler can duplicate this module
|
|
1689
|
+
* across chunks; globalThis guarantees a single context instance.
|
|
1690
|
+
*
|
|
1691
|
+
* See design/45-cache-lifetimes.md §Layout Propagation.
|
|
1692
|
+
*/
|
|
1693
|
+
var CTX_KEY = Symbol.for("__timber_child_segment_ctx");
|
|
1694
|
+
function getOrCreateContext() {
|
|
1695
|
+
const existing = globalThis[CTX_KEY];
|
|
1696
|
+
if (existing !== void 0) return existing;
|
|
1697
|
+
if (typeof React.createContext === "function") {
|
|
1698
|
+
const ctx = React.createContext(null);
|
|
1699
|
+
globalThis[CTX_KEY] = ctx;
|
|
1700
|
+
return ctx;
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
var ChildSegmentContext = getOrCreateContext();
|
|
1704
|
+
//#endregion
|
|
1705
|
+
//#region src/client/child-segment-outlet.tsx
|
|
1706
|
+
/**
|
|
1707
|
+
* ChildSegmentOutlet — renders child segment content from context.
|
|
1708
|
+
*
|
|
1709
|
+
* Passed as `children` to every layout component, replacing the previous
|
|
1710
|
+
* pattern of passing rendered server content directly. The layout receives
|
|
1711
|
+
* a stable client reference (this component), and the actual child content
|
|
1712
|
+
* is delivered via ChildSegmentContext from a provider above the layout.
|
|
1713
|
+
*
|
|
1714
|
+
* This makes layout cache.component hits possible: the cached layout
|
|
1715
|
+
* payload contains this deterministic client reference, not varying
|
|
1716
|
+
* server content. On cache hit, the revived payload contains the layout
|
|
1717
|
+
* shell + this outlet; the provider above supplies the current request's
|
|
1718
|
+
* child content.
|
|
1719
|
+
*
|
|
1720
|
+
* See design/45-cache-lifetimes.md §Layout Propagation.
|
|
1721
|
+
*/
|
|
1722
|
+
function ChildSegmentOutlet() {
|
|
1723
|
+
return useContext(ChildSegmentContext);
|
|
1724
|
+
}
|
|
1725
|
+
//#endregion
|
|
1726
|
+
//#region src/client/child-segment-provider.tsx
|
|
1727
|
+
/**
|
|
1728
|
+
* ChildSegmentProvider — wraps a layout to provide child segment content.
|
|
1729
|
+
*
|
|
1730
|
+
* Placed above the layout in the element tree so that ChildSegmentOutlet
|
|
1731
|
+
* (inside the layout's `children`) can read the actual child content.
|
|
1732
|
+
*
|
|
1733
|
+
* Tree structure:
|
|
1734
|
+
* ChildSegmentProvider(childContent=innerElement)
|
|
1735
|
+
* └── Layout(children=<ChildSegmentOutlet />)
|
|
1736
|
+
* └── ChildSegmentOutlet → reads context → innerElement
|
|
1737
|
+
*
|
|
1738
|
+
* See design/45-cache-lifetimes.md §Layout Propagation.
|
|
1739
|
+
*/
|
|
1740
|
+
//#endregion
|
|
1673
1741
|
//#region src/server/route-element-builder.ts
|
|
1674
1742
|
/**
|
|
1675
1743
|
* Thrown when a defineSegmentParams codec's parse() fails.
|
|
@@ -3479,7 +3547,14 @@ async function tryRevivePayload(id, options, props) {
|
|
|
3479
3547
|
if (!store) return null;
|
|
3480
3548
|
const keyParams = (options.prerender ? await isParamIndependent(id) : false) ? {} : resolveKeyParams(store);
|
|
3481
3549
|
if (keyParams === null) return null;
|
|
3482
|
-
const
|
|
3550
|
+
const allProps = props ?? {};
|
|
3551
|
+
let keyProps;
|
|
3552
|
+
const childrenValue = allProps.children;
|
|
3553
|
+
if (childrenValue != null && typeof childrenValue === "object" && "type" in childrenValue && childrenValue.type === ChildSegmentOutlet) {
|
|
3554
|
+
const { children: _children, ...rest } = allProps;
|
|
3555
|
+
keyProps = rest;
|
|
3556
|
+
} else keyProps = allProps;
|
|
3557
|
+
const cacheKey = computeComponentCacheKey(keyProps, keyParams);
|
|
3483
3558
|
if (cacheKey === null) return null;
|
|
3484
3559
|
const outcome = options.fallbackOnMissingSegmentParams === false ? "failing the render (fallbackOnMissingSegmentParams: false)" : "rendering dynamically";
|
|
3485
3560
|
const component = registry.get(id)?.component;
|