@timber-js/app 0.2.0-alpha.61 → 0.2.0-alpha.63
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/{als-registry-Ba7URUIn.js → als-registry-BJARkOcu.js} +1 -1
- package/dist/_chunks/{als-registry-Ba7URUIn.js.map → als-registry-BJARkOcu.js.map} +1 -1
- package/dist/_chunks/{define-CT98cU9c.js → define-Djpqoe1K.js} +1 -1
- package/dist/_chunks/{define-CT98cU9c.js.map → define-Djpqoe1K.js.map} +1 -1
- package/dist/_chunks/{define-cookie-BWr_52kY.js → define-cookie-B2djY9w0.js} +4 -4
- package/dist/_chunks/{define-cookie-BWr_52kY.js.map → define-cookie-B2djY9w0.js.map} +1 -1
- package/dist/_chunks/{define-TK8C1M3x.js → define-hdajFTq7.js} +2 -2
- package/dist/_chunks/{define-TK8C1M3x.js.map → define-hdajFTq7.js.map} +1 -1
- package/dist/_chunks/{error-boundary-DpZJBCqh.js → error-boundary-A_sgyyUP.js} +1 -1
- package/dist/_chunks/{error-boundary-DpZJBCqh.js.map → error-boundary-A_sgyyUP.js.map} +1 -1
- package/dist/_chunks/{tracing-VYETCQsg.js → handler-store-CaE0ZgVG.js} +54 -3
- package/dist/_chunks/handler-store-CaE0ZgVG.js.map +1 -0
- package/dist/_chunks/{interception-Cey5DCGr.js → interception-BVm64Jr5.js} +7 -13
- package/dist/_chunks/interception-BVm64Jr5.js.map +1 -0
- package/dist/_chunks/{metadata-routes-BU684ls2.js → metadata-routes-DS3eKNmf.js} +1 -1
- package/dist/_chunks/{metadata-routes-BU684ls2.js.map → metadata-routes-DS3eKNmf.js.map} +1 -1
- package/dist/_chunks/{request-context-rju2rbga.js → request-context-B_u9dyhZ.js} +4 -4
- package/dist/_chunks/{request-context-rju2rbga.js.map → request-context-B_u9dyhZ.js.map} +1 -1
- package/dist/_chunks/segment-classify-BDNn6EzD.js +65 -0
- package/dist/_chunks/segment-classify-BDNn6EzD.js.map +1 -0
- package/dist/_chunks/{segment-context-CyaM1mrD.js → segment-context-CVRHlkkQ.js} +1 -1
- package/dist/_chunks/{segment-context-CyaM1mrD.js.map → segment-context-CVRHlkkQ.js.map} +1 -1
- package/dist/_chunks/{stale-reload-BSSym1MJ.js → stale-reload-BeyHXZ5B.js} +1 -1
- package/dist/_chunks/{stale-reload-BSSym1MJ.js.map → stale-reload-BeyHXZ5B.js.map} +1 -1
- package/dist/_chunks/{use-query-states-wEXY2JQB.js → use-query-states-DAhgj8Gx.js} +1 -1
- package/dist/_chunks/{use-query-states-wEXY2JQB.js.map → use-query-states-DAhgj8Gx.js.map} +1 -1
- package/dist/_chunks/{wrappers-BaG1bnM3.js → wrappers-CJQ3KwVr.js} +1 -1
- package/dist/_chunks/{wrappers-BaG1bnM3.js.map → wrappers-CJQ3KwVr.js.map} +1 -1
- package/dist/cache/cache-api.d.ts +24 -0
- package/dist/cache/cache-api.d.ts.map +1 -0
- package/dist/cache/handler-store.d.ts +31 -0
- package/dist/cache/handler-store.d.ts.map +1 -0
- package/dist/cache/index.d.ts +2 -1
- package/dist/cache/index.d.ts.map +1 -1
- package/dist/cache/index.js +33 -2
- package/dist/cache/index.js.map +1 -1
- package/dist/client/error-boundary.js +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +54 -24
- package/dist/client/index.js.map +1 -1
- package/dist/client/link.d.ts +6 -0
- package/dist/client/link.d.ts.map +1 -1
- package/dist/client/rsc-fetch.d.ts +4 -3
- package/dist/client/rsc-fetch.d.ts.map +1 -1
- package/dist/client/transition-root.d.ts +12 -0
- package/dist/client/transition-root.d.ts.map +1 -1
- package/dist/cookies/index.js +1 -1
- package/dist/index.js +52 -2
- package/dist/index.js.map +1 -1
- package/dist/params/index.js +3 -3
- package/dist/plugins/entries.d.ts.map +1 -1
- package/dist/routing/index.d.ts +2 -0
- package/dist/routing/index.d.ts.map +1 -1
- package/dist/routing/index.js +3 -2
- package/dist/routing/scanner.d.ts.map +1 -1
- package/dist/routing/segment-classify.d.ts +46 -0
- package/dist/routing/segment-classify.d.ts.map +1 -0
- package/dist/search-params/index.js +3 -3
- package/dist/server/actions.d.ts +0 -3
- package/dist/server/actions.d.ts.map +1 -1
- package/dist/server/deny-renderer.d.ts.map +1 -1
- package/dist/server/error-boundary-wrapper.d.ts.map +1 -1
- package/dist/server/fallback-error.d.ts.map +1 -1
- package/dist/server/index.js +98 -17
- package/dist/server/index.js.map +1 -1
- package/dist/server/pipeline-interception.d.ts.map +1 -1
- package/dist/server/pipeline.d.ts.map +1 -1
- package/dist/server/route-element-builder.d.ts.map +1 -1
- package/dist/server/rsc-entry/api-handler.d.ts.map +1 -1
- package/dist/server/rsc-entry/error-renderer.d.ts.map +1 -1
- package/dist/server/rsc-entry/index.d.ts.map +1 -1
- package/dist/server/rsc-entry/ssr-bridge.d.ts.map +1 -1
- package/dist/server/safe-load.d.ts +46 -0
- package/dist/server/safe-load.d.ts.map +1 -0
- package/dist/server/slot-resolver.d.ts.map +1 -1
- package/dist/server/tracing.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cache/cache-api.ts +38 -0
- package/src/cache/handler-store.ts +68 -0
- package/src/cache/index.ts +2 -1
- package/src/client/browser-entry.ts +89 -42
- package/src/client/index.ts +1 -1
- package/src/client/link.tsx +81 -46
- package/src/client/rsc-fetch.ts +8 -9
- package/src/client/transition-root.tsx +27 -0
- package/src/plugins/entries.ts +61 -0
- package/src/routing/index.ts +2 -0
- package/src/routing/scanner.ts +7 -16
- package/src/routing/segment-classify.ts +89 -0
- package/src/server/actions.ts +7 -6
- package/src/server/deny-renderer.ts +4 -3
- package/src/server/error-boundary-wrapper.ts +9 -6
- package/src/server/fallback-error.ts +2 -1
- package/src/server/pipeline-interception.ts +16 -15
- package/src/server/pipeline.ts +11 -2
- package/src/server/route-element-builder.ts +5 -4
- package/src/server/rsc-entry/api-handler.ts +4 -3
- package/src/server/rsc-entry/error-renderer.ts +15 -9
- package/src/server/rsc-entry/index.ts +12 -0
- package/src/server/rsc-entry/ssr-bridge.ts +13 -4
- package/src/server/safe-load.ts +60 -0
- package/src/server/slot-resolver.ts +3 -1
- package/src/server/tracing.ts +14 -3
- package/dist/_chunks/interception-Cey5DCGr.js.map +0 -1
- package/dist/_chunks/tracing-VYETCQsg.js.map +0 -1
package/dist/params/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as fromSchema, n as defineSearchParams, r as fromArraySchema } from "../_chunks/define-
|
|
2
|
-
import { n as defineSegmentParams } from "../_chunks/define-
|
|
3
|
-
import { n as withUrlKey, t as withDefault } from "../_chunks/wrappers-
|
|
1
|
+
import { i as fromSchema, n as defineSearchParams, r as fromArraySchema } from "../_chunks/define-hdajFTq7.js";
|
|
2
|
+
import { n as defineSegmentParams } from "../_chunks/define-Djpqoe1K.js";
|
|
3
|
+
import { n as withUrlKey, t as withDefault } from "../_chunks/wrappers-CJQ3KwVr.js";
|
|
4
4
|
export { defineSearchParams, defineSegmentParams, fromArraySchema, fromSchema, withDefault, withUrlKey };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../src/plugins/entries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAInC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../src/plugins/entries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAInC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA+GjD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUrE;AAED;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAwBxF;AAiDD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAkFxD"}
|
package/dist/routing/index.d.ts
CHANGED
|
@@ -5,4 +5,6 @@ export type { RouteTree, SegmentNode, SegmentType, RouteFile, ScannerConfig, Int
|
|
|
5
5
|
export { DEFAULT_PAGE_EXTENSIONS, INTERCEPTION_MARKERS } from './types.js';
|
|
6
6
|
export { collectInterceptionRewrites } from './interception.js';
|
|
7
7
|
export type { InterceptionRewrite } from './interception.js';
|
|
8
|
+
export { classifyUrlSegment } from './segment-classify.js';
|
|
9
|
+
export type { UrlSegment } from './segment-classify.js';
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,YAAY,EACV,SAAS,EACT,WAAW,EACX,WAAW,EACX,SAAS,EACT,aAAa,EACb,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,YAAY,EACV,SAAS,EACT,WAAW,EACX,WAAW,EACX,SAAS,EACT,aAAa,EACb,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/routing/index.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { t as classifyUrlSegment } from "../_chunks/segment-classify-BDNn6EzD.js";
|
|
2
|
+
import { a as DEFAULT_PAGE_EXTENSIONS, i as scanRoutes, n as generateRouteMap, o as INTERCEPTION_MARKERS, r as classifySegment, t as collectInterceptionRewrites } from "../_chunks/interception-BVm64Jr5.js";
|
|
3
|
+
export { DEFAULT_PAGE_EXTENSIONS, INTERCEPTION_MARKERS, classifySegment, classifyUrlSegment, collectInterceptionRewrites, generateRouteMap, scanRoutes };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../../src/routing/scanner.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EACV,SAAS,EAET,WAAW,EAEX,aAAa,EACb,kBAAkB,EACnB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../../src/routing/scanner.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EACV,SAAS,EAET,WAAW,EAEX,aAAa,EACb,kBAAkB,EACnB,MAAM,YAAY,CAAC;AA8CpB;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,aAAkB,GAAG,SAAS,CAoChF;AAyBD;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG;IAChD,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAoCA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared URL segment classifier.
|
|
3
|
+
*
|
|
4
|
+
* Single-pass character parser that classifies a route segment token
|
|
5
|
+
* (e.g. "dashboard", "[id]", "[...slug]", "[[...path]]") into a typed
|
|
6
|
+
* discriminated union. Used by both server-side routing and client-side
|
|
7
|
+
* Link interpolation.
|
|
8
|
+
*
|
|
9
|
+
* NO regex. NO Node.js-only APIs. Safe to import from browser code.
|
|
10
|
+
*
|
|
11
|
+
* Malformed input (unclosed brackets, empty names, etc.) falls through
|
|
12
|
+
* to { kind: 'static' } — the safe default.
|
|
13
|
+
*
|
|
14
|
+
* If you change the bracket syntax, update ONLY this file. Every
|
|
15
|
+
* consumer imports from here.
|
|
16
|
+
*
|
|
17
|
+
* See design/07-routing.md §"Route Segments"
|
|
18
|
+
*/
|
|
19
|
+
export type UrlSegment = {
|
|
20
|
+
kind: 'static';
|
|
21
|
+
value: string;
|
|
22
|
+
} | {
|
|
23
|
+
kind: 'dynamic';
|
|
24
|
+
name: string;
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'catch-all';
|
|
27
|
+
name: string;
|
|
28
|
+
} | {
|
|
29
|
+
kind: 'optional-catch-all';
|
|
30
|
+
name: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Classify a URL path segment token.
|
|
34
|
+
*
|
|
35
|
+
* Walks the string left-to-right in one pass:
|
|
36
|
+
* 1. If it doesn't start with '[', it's static.
|
|
37
|
+
* 2. Count opening brackets (1 or 2) to detect optional.
|
|
38
|
+
* 3. Check for '...' to detect catch-all.
|
|
39
|
+
* 4. Read the param name up to the closing bracket.
|
|
40
|
+
* 5. Validate the expected closing sequence (']' or ']]').
|
|
41
|
+
* 6. Reject if there are leftover characters after the close.
|
|
42
|
+
*
|
|
43
|
+
* Any structural violation → static (safe default).
|
|
44
|
+
*/
|
|
45
|
+
export declare function classifyUrlSegment(token: string): UrlSegment;
|
|
46
|
+
//# sourceMappingURL=segment-classify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segment-classify.d.ts","sourceRoot":"","sources":["../../src/routing/segment-classify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAkD5D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as registerSearchParams, r as getSearchParams } from "../_chunks/use-query-states-
|
|
2
|
-
import { i as fromSchema, n as defineSearchParams, r as fromArraySchema } from "../_chunks/define-
|
|
3
|
-
import { n as withUrlKey, t as withDefault } from "../_chunks/wrappers-
|
|
1
|
+
import { i as registerSearchParams, r as getSearchParams } from "../_chunks/use-query-states-DAhgj8Gx.js";
|
|
2
|
+
import { i as fromSchema, n as defineSearchParams, r as fromArraySchema } from "../_chunks/define-hdajFTq7.js";
|
|
3
|
+
import { n as withUrlKey, t as withDefault } from "../_chunks/wrappers-CJQ3KwVr.js";
|
|
4
4
|
export { defineSearchParams, fromArraySchema, fromSchema, getSearchParams, registerSearchParams, withDefault, withUrlKey };
|
package/dist/server/actions.d.ts
CHANGED
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
*
|
|
14
14
|
* See design/08-forms-and-actions.md
|
|
15
15
|
*/
|
|
16
|
-
import type { CacheHandler } from '../cache/index';
|
|
17
16
|
import { type RevalidationState } from './als-registry.js';
|
|
18
17
|
/** Result of rendering a revalidation — element tree before RSC serialization. */
|
|
19
18
|
export interface RevalidationResult {
|
|
@@ -27,8 +26,6 @@ export type RevalidateRenderer = (path: string) => Promise<RevalidationResult>;
|
|
|
27
26
|
export type { RevalidationState } from './als-registry.js';
|
|
28
27
|
/** Options for creating the action handler. */
|
|
29
28
|
export interface ActionHandlerConfig {
|
|
30
|
-
/** Cache handler for tag invalidation. */
|
|
31
|
-
cacheHandler?: CacheHandler;
|
|
32
29
|
/** Renderer for producing RSC payloads during revalidation. */
|
|
33
30
|
renderer?: RevalidateRenderer;
|
|
34
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/server/actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
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;AAI5E,kFAAkF;AAClF,MAAM,WAAW,kBAAkB;IACjC,iFAAiF;IACjF,OAAO,EAAE,OAAO,CAAC;IACjB,2CAA2C;IAC3C,YAAY,EAAE,OAAO,EAAE,CAAC;CACzB;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,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,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAIpE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C;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,CA6D9B;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,GAAE,MAAY,GAAG,QAAQ,CAKtF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAIxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deny-renderer.d.ts","sourceRoot":"","sources":["../../src/server/deny-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"deny-renderer.d.ts","sourceRoot":"","sources":["../../src/server/deny-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAM7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAOjE,qDAAqD;AACrD,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;IAC3C,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED,iEAAiE;AACjE,MAAM,MAAM,mBAAmB,GAAG,MAAM;IACtC,QAAQ,EAAE,cAAc,CAAC;IACzB,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,6DAA6D;AAC7D,MAAM,MAAM,SAAS,GAAG,CACtB,SAAS,EAAE,cAAc,CAAC,UAAU,CAAC,EACrC,UAAU,EAAE,UAAU,KACnB,OAAO,CAAC,QAAQ,CAAC,CAAC;AAUvB;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,gBAAgB,EAAE,WAAW,EAAE,EAC/B,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,UAAU,EACjB,eAAe,EAAE,OAAO,EACxB,eAAe,EAAE,qBAAqB,EACtC,sBAAsB,EAAE,mBAAmB,EAC3C,OAAO,EAAE,SAAS,GACjB,OAAO,CAAC,QAAQ,CAAC,CA6GnB;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,gBAAgB,EAAE,WAAW,EAAE,EAC/B,eAAe,EAAE,OAAO,EACxB,sBAAsB,EAAE,mBAAmB,GAC1C,OAAO,CAAC,QAAQ,CAAC,CAgDnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-boundary-wrapper.d.ts","sourceRoot":"","sources":["../../src/server/error-boundary-wrapper.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"error-boundary-wrapper.d.ts","sourceRoot":"","sources":["../../src/server/error-boundary-wrapper.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAiB9D;;;;;;;;;;;GAWG;AACH,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,KAAK,CAAC,YAAY,EAC3B,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,KAAK,CAAC,YAAY,GAC5C,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAyE7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fallback-error.d.ts","sourceRoot":"","sources":["../../src/server/fallback-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"fallback-error.d.ts","sourceRoot":"","sources":["../../src/server/fallback-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAIrE;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,OAAO,EACd,GAAG,EAAE,OAAO,EACZ,eAAe,EAAE,OAAO,EACxB,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,mBAAmB,EAChC,eAAe,EAAE,qBAAqB,EACtC,WAAW,CAAC,EAAE,eAAe,GAC5B,OAAO,CAAC,QAAQ,CAAC,CAwCnB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAmF3D"}
|
package/dist/server/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { n as isDevMode, t as isDebug } from "../_chunks/debug-ECi_61pb.js";
|
|
2
2
|
import { a as warnDenyAfterFlush, c as warnRedirectInAccess, d as warnSlowSlotWithoutSuspense, f as warnStaticRequestApi, i as warnCacheRequestProps, l as warnRedirectInSlotAccess, n as WarningId, o as warnDenyInSuspense, p as warnSuspenseWrappingChildren, r as setViteServer, s as warnDynamicApiInStaticBuild, t as formatSize, u as warnRedirectInSuspense } from "../_chunks/format-cX7wzEp2.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { a as
|
|
6
|
-
import { r as
|
|
7
|
-
import {
|
|
8
|
-
import "../_chunks/
|
|
3
|
+
import { t as classifyUrlSegment } from "../_chunks/segment-classify-BDNn6EzD.js";
|
|
4
|
+
import { i as getMetadataRouteServePath, n as classifyMetadataRoute, r as getMetadataRouteAutoLink, t as METADATA_ROUTE_CONVENTIONS } from "../_chunks/metadata-routes-DS3eKNmf.js";
|
|
5
|
+
import { a as timingAls, i as revalidationAls, n as formFlashAls, s as waitUntilAls, t as earlyHintsSenderAls } from "../_chunks/als-registry-BJARkOcu.js";
|
|
6
|
+
import { a as headers, c as rawSegmentParams, d as setMutableCookieContext, f as setSegmentParams, i as getSetCookieHeaders, n as cookies, o as markResponseFlushed, r as getRequestSearchString, s as rawSearchParams, t as applyRequestHeaderOverlay, u as runWithRequestContext } from "../_chunks/request-context-B_u9dyhZ.js";
|
|
7
|
+
import { r as mergePreservedSearchParams } from "../_chunks/segment-context-CVRHlkkQ.js";
|
|
8
|
+
import { a as generateTraceId, c as replaceTraceId, d as spanId, f as traceId, l as runWithTraceId, o as getOtelTraceId, p as withSpan, r as addSpanEvent, s as getTraceStore, t as getCacheHandler, u as setSpanAttribute } from "../_chunks/handler-store-CaE0ZgVG.js";
|
|
9
|
+
import "../_chunks/error-boundary-A_sgyyUP.js";
|
|
9
10
|
import { readFile } from "node:fs/promises";
|
|
10
11
|
import "react";
|
|
11
12
|
//#region src/server/waituntil-bridge.ts
|
|
@@ -1575,6 +1576,48 @@ function buildDeniedFallback(DeniedComponent, slotName, data, createElement) {
|
|
|
1575
1576
|
});
|
|
1576
1577
|
}
|
|
1577
1578
|
//#endregion
|
|
1579
|
+
//#region src/server/safe-load.ts
|
|
1580
|
+
/**
|
|
1581
|
+
* Custom error class for module load failures.
|
|
1582
|
+
*
|
|
1583
|
+
* Preserves the original error as `cause` while providing a
|
|
1584
|
+
* human-readable message with the file path.
|
|
1585
|
+
*/
|
|
1586
|
+
var ModuleLoadError = class extends Error {
|
|
1587
|
+
/** The file path that failed to load. */
|
|
1588
|
+
filePath;
|
|
1589
|
+
constructor(filePath, cause) {
|
|
1590
|
+
const originalMessage = cause instanceof Error ? cause.message : String(cause);
|
|
1591
|
+
super(`[timber] Failed to load module ${filePath}\n ${originalMessage}`, { cause });
|
|
1592
|
+
this.name = "ModuleLoadError";
|
|
1593
|
+
this.filePath = filePath;
|
|
1594
|
+
}
|
|
1595
|
+
};
|
|
1596
|
+
/**
|
|
1597
|
+
* Load a route manifest module with enriched error context.
|
|
1598
|
+
*
|
|
1599
|
+
* On success: returns the module object (same as `loader.load()`).
|
|
1600
|
+
* On failure: throws `ModuleLoadError` with file path and original cause.
|
|
1601
|
+
*
|
|
1602
|
+
* For error rendering paths that need fallthrough instead of throwing,
|
|
1603
|
+
* callers should catch at the call site:
|
|
1604
|
+
*
|
|
1605
|
+
* ```ts
|
|
1606
|
+
* // Throwing (default) — route-element-builder, api-handler, etc.
|
|
1607
|
+
* const mod = await loadModule(segment.page);
|
|
1608
|
+
*
|
|
1609
|
+
* // Fallthrough — error-renderer, error-boundary-wrapper
|
|
1610
|
+
* const mod = await loadModule(segment.error).catch(() => null);
|
|
1611
|
+
* ```
|
|
1612
|
+
*/
|
|
1613
|
+
async function loadModule(loader) {
|
|
1614
|
+
try {
|
|
1615
|
+
return await loader.load();
|
|
1616
|
+
} catch (error) {
|
|
1617
|
+
throw new ModuleLoadError(loader.filePath, error);
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
//#endregion
|
|
1578
1621
|
//#region src/server/route-element-builder.ts
|
|
1579
1622
|
/**
|
|
1580
1623
|
* Thrown when a defineSegmentParams codec's parse() fails.
|
|
@@ -1723,6 +1766,16 @@ function escapeXml(str) {
|
|
|
1723
1766
|
//#endregion
|
|
1724
1767
|
//#region src/server/pipeline-interception.ts
|
|
1725
1768
|
/**
|
|
1769
|
+
* Interception route matching for the request pipeline.
|
|
1770
|
+
*
|
|
1771
|
+
* Matches target URLs against interception rewrites to support the
|
|
1772
|
+
* modal route pattern (soft navigation intercepts).
|
|
1773
|
+
*
|
|
1774
|
+
* Extracted from pipeline.ts to keep files under 500 lines.
|
|
1775
|
+
*
|
|
1776
|
+
* See design/07-routing.md §"Intercepting Routes"
|
|
1777
|
+
*/
|
|
1778
|
+
/**
|
|
1726
1779
|
* Check if an intercepting route applies for this soft navigation.
|
|
1727
1780
|
*
|
|
1728
1781
|
* Matches the target pathname against interception rewrites, constrained
|
|
@@ -1748,15 +1801,19 @@ function pathnameMatchesPattern(pathname, pattern) {
|
|
|
1748
1801
|
const patternParts = pattern === "/" ? [] : pattern.slice(1).split("/");
|
|
1749
1802
|
let pi = 0;
|
|
1750
1803
|
for (let i = 0; i < patternParts.length; i++) {
|
|
1751
|
-
const
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1804
|
+
const seg = classifyUrlSegment(patternParts[i]);
|
|
1805
|
+
switch (seg.kind) {
|
|
1806
|
+
case "catch-all": return pi < pathParts.length;
|
|
1807
|
+
case "optional-catch-all": return true;
|
|
1808
|
+
case "dynamic":
|
|
1809
|
+
if (pi >= pathParts.length) return false;
|
|
1810
|
+
pi++;
|
|
1811
|
+
continue;
|
|
1812
|
+
case "static":
|
|
1813
|
+
if (pi >= pathParts.length || pathParts[pi] !== seg.value) return false;
|
|
1814
|
+
pi++;
|
|
1815
|
+
continue;
|
|
1757
1816
|
}
|
|
1758
|
-
if (pi >= pathParts.length || pathParts[pi] !== segment) return false;
|
|
1759
|
-
pi++;
|
|
1760
1817
|
}
|
|
1761
1818
|
return pi === pathParts.length;
|
|
1762
1819
|
}
|
|
@@ -1788,7 +1845,13 @@ async function coerceSegmentParams(match) {
|
|
|
1788
1845
|
const segments = match.segments;
|
|
1789
1846
|
for (const segment of segments) {
|
|
1790
1847
|
if (!segment.params) continue;
|
|
1791
|
-
|
|
1848
|
+
let mod;
|
|
1849
|
+
try {
|
|
1850
|
+
mod = await loadModule(segment.params);
|
|
1851
|
+
} catch (err) {
|
|
1852
|
+
throw new ParamCoercionError(`Failed to load params module for segment "${segment.segmentName}": ${err instanceof Error ? err.message : String(err)}`);
|
|
1853
|
+
}
|
|
1854
|
+
const segmentParamsDef = mod.segmentParams;
|
|
1792
1855
|
if (!segmentParamsDef || typeof segmentParamsDef.parse !== "function") continue;
|
|
1793
1856
|
try {
|
|
1794
1857
|
const coerced = segmentParamsDef.parse(match.params);
|
|
@@ -1911,7 +1974,7 @@ function createPipeline(config) {
|
|
|
1911
1974
|
const metaMatch = config.matchMetadataRoute(canonicalPathname);
|
|
1912
1975
|
if (metaMatch) try {
|
|
1913
1976
|
if (metaMatch.isStatic) return await serveStaticMetadataFile(metaMatch);
|
|
1914
|
-
const mod = await metaMatch.file
|
|
1977
|
+
const mod = await loadModule(metaMatch.file);
|
|
1915
1978
|
if (typeof mod.default !== "function") return new Response("Metadata route must export a default function", { status: 500 });
|
|
1916
1979
|
const handlerResult = await mod.default();
|
|
1917
1980
|
if (handlerResult instanceof Response) return handlerResult;
|
|
@@ -3280,6 +3343,21 @@ function getFormFlash() {
|
|
|
3280
3343
|
//#endregion
|
|
3281
3344
|
//#region src/server/actions.ts
|
|
3282
3345
|
/**
|
|
3346
|
+
* Server action primitives: revalidatePath, revalidateTag, and the action handler.
|
|
3347
|
+
*
|
|
3348
|
+
* - revalidatePath(path) re-renders the route at that path and returns the RSC
|
|
3349
|
+
* flight payload for inline reconciliation.
|
|
3350
|
+
* - revalidateTag(tag) invalidates cached shells and 'use cache' entries by tag.
|
|
3351
|
+
*
|
|
3352
|
+
* Both are callable from anywhere on the server — actions, API routes, handlers.
|
|
3353
|
+
*
|
|
3354
|
+
* The action handler processes incoming action requests, validates CSRF,
|
|
3355
|
+
* enforces body limits, executes the action, and returns the response
|
|
3356
|
+
* (with piggybacked RSC payload if revalidatePath was called).
|
|
3357
|
+
*
|
|
3358
|
+
* See design/08-forms-and-actions.md
|
|
3359
|
+
*/
|
|
3360
|
+
/**
|
|
3283
3361
|
* Get the current revalidation state. Throws if called outside an action context.
|
|
3284
3362
|
* @internal
|
|
3285
3363
|
*/
|
|
@@ -3344,7 +3422,10 @@ async function executeAction(actionFn, args, config = {}, spanMeta) {
|
|
|
3344
3422
|
} else throw error;
|
|
3345
3423
|
}
|
|
3346
3424
|
});
|
|
3347
|
-
if (state.tags.length > 0
|
|
3425
|
+
if (state.tags.length > 0) {
|
|
3426
|
+
const handler = getCacheHandler();
|
|
3427
|
+
await Promise.all(state.tags.map((tag) => handler.invalidate({ tag })));
|
|
3428
|
+
}
|
|
3348
3429
|
let revalidation;
|
|
3349
3430
|
if (state.paths.length > 0 && config.renderer) {
|
|
3350
3431
|
const path = state.paths[0];
|