@timber-js/app 0.2.0-alpha.120 → 0.2.0-alpha.122
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-Cw-7NfJJ.js → actions-Dy8vOjFt.js} +6 -6
- package/dist/_chunks/actions-Dy8vOjFt.js.map +1 -0
- package/dist/_chunks/{build-output-helper-DhxiT18k.js → build-output-helper-DYOWsPjZ.js} +47 -6
- package/dist/_chunks/build-output-helper-DYOWsPjZ.js.map +1 -0
- package/dist/_chunks/cli-schema-sync-4HcQIziG.js +2 -0
- package/dist/_chunks/cli-schema-sync-VcCf1TFY.js +738 -0
- package/dist/_chunks/cli-schema-sync-VcCf1TFY.js.map +1 -0
- package/dist/_chunks/{codec-registry-V7ARyeLN.js → codec-registry-G9hD5LOq.js} +1 -1
- package/dist/_chunks/{codec-registry-V7ARyeLN.js.map → codec-registry-G9hD5LOq.js.map} +1 -1
- package/dist/_chunks/{define-zQX6e1tN.js → define-CPVQaWbx.js} +3 -3
- package/dist/_chunks/{define-zQX6e1tN.js.map → define-CPVQaWbx.js.map} +1 -1
- package/dist/_chunks/{define-8zQ8Vm7x.js → define-jeHDXZGq.js} +3 -3
- package/dist/_chunks/{define-8zQ8Vm7x.js.map → define-jeHDXZGq.js.map} +1 -1
- package/dist/_chunks/{format-CR6v1pWE.js → format-BjN9HLu9.js} +1 -1
- package/dist/_chunks/{format-CR6v1pWE.js.map → format-BjN9HLu9.js.map} +1 -1
- package/dist/_chunks/{handler-store-iqnt2ghN.js → handler-store-CcwNX-gk.js} +1 -1
- package/dist/_chunks/{handler-store-iqnt2ghN.js.map → handler-store-CcwNX-gk.js.map} +1 -1
- package/dist/_chunks/{merge-search-params-CwxJzBLS.js → merge-search-params-az6ZiBeU.js} +1 -1
- package/dist/_chunks/{merge-search-params-CwxJzBLS.js.map → merge-search-params-az6ZiBeU.js.map} +1 -1
- package/dist/_chunks/{metadata-routes-Cjmvi3rQ.js → metadata-routes-DESG8uk5.js} +32 -19
- package/dist/_chunks/metadata-routes-DESG8uk5.js.map +1 -0
- package/dist/_chunks/{navigation-root-DKsJ5Di7.js → navigation-root-DoRTeBm5.js} +2 -2
- package/dist/_chunks/{navigation-root-DKsJ5Di7.js.map → navigation-root-DoRTeBm5.js.map} +1 -1
- package/dist/_chunks/{registry-Dp_hJL4s.js → registry-BI9cgCt7.js} +1 -1
- package/dist/_chunks/{registry-Dp_hJL4s.js.map → registry-BI9cgCt7.js.map} +1 -1
- package/dist/_chunks/{resolve-schema-23Mc8aLi.js → resolve-schema-cURaYvaD.js} +15 -3
- package/dist/_chunks/resolve-schema-cURaYvaD.js.map +1 -0
- package/dist/_chunks/{router-ref-sektkr-t.js → router-ref-CpvjBqdu.js} +2 -2
- package/dist/_chunks/{router-ref-sektkr-t.js.map → router-ref-CpvjBqdu.js.map} +1 -1
- package/dist/_chunks/{schema-bridge-eL5vQDSA.js → schema-bridge-o0SwFtXW.js} +1 -1
- package/dist/_chunks/{schema-bridge-eL5vQDSA.js.map → schema-bridge-o0SwFtXW.js.map} +1 -1
- package/dist/_chunks/{segment-classify-CnfLLvir.js → segment-classify-BjfuctV2.js} +1 -1
- package/dist/_chunks/{segment-classify-CnfLLvir.js.map → segment-classify-BjfuctV2.js.map} +1 -1
- package/dist/_chunks/{segment-context-Bg0pFbLT.js → segment-context-EsfQpS--.js} +1 -1
- package/dist/_chunks/{segment-context-Bg0pFbLT.js.map → segment-context-EsfQpS--.js.map} +1 -1
- package/dist/_chunks/{ssr-data-BO5OvEvg.js → ssr-data-m9-cNEIw.js} +1 -1
- package/dist/_chunks/{ssr-data-BO5OvEvg.js.map → ssr-data-m9-cNEIw.js.map} +1 -1
- package/dist/_chunks/{stale-reload-BCPRG0Cv.js → stale-reload-BN2kcE06.js} +1 -1
- package/dist/_chunks/{stale-reload-BCPRG0Cv.js.map → stale-reload-BN2kcE06.js.map} +1 -1
- package/dist/_chunks/{use-query-states-D9SBlAfp.js → use-query-states-C9G6LP0F.js} +2 -2
- package/dist/_chunks/{use-query-states-D9SBlAfp.js.map → use-query-states-C9G6LP0F.js.map} +1 -1
- package/dist/_chunks/{use-segment-params-CskiK-59.js → use-segment-params-CtIAjqK0.js} +2 -2
- package/dist/_chunks/{use-segment-params-CskiK-59.js.map → use-segment-params-CtIAjqK0.js.map} +1 -1
- package/dist/_chunks/{validation-Bm3Je-09.js → validation-BMU5MPzP.js} +1 -1
- package/dist/_chunks/{validation-Bm3Je-09.js.map → validation-BMU5MPzP.js.map} +1 -1
- package/dist/_chunks/{walkers-DgOXkTts.js → walkers-tkw7sDlj.js} +125 -12
- package/dist/_chunks/walkers-tkw7sDlj.js.map +1 -0
- package/dist/adapters/build-output-helper.d.ts.map +1 -1
- package/dist/adapters/cloudflare.js +1 -1
- package/dist/adapters/nitro.js +1 -1
- package/dist/cache/index.js +1 -1
- package/dist/cli-schema-sync.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/client/error-boundary.js +2 -2
- package/dist/client/index.js +10 -10
- package/dist/client/index.js.map +1 -1
- package/dist/client/internal.js +7 -7
- package/dist/client/link.d.ts +9 -5
- package/dist/client/link.d.ts.map +1 -1
- package/dist/codec.d.ts +18 -0
- package/dist/codec.d.ts.map +1 -1
- package/dist/codec.js +30 -1
- package/dist/codec.js.map +1 -1
- package/dist/cookies/index.js +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +127 -26
- package/dist/index.js.map +1 -1
- package/dist/params/define-schema.d.ts +32 -4
- package/dist/params/define-schema.d.ts.map +1 -1
- package/dist/params/index.d.ts +1 -1
- package/dist/params/index.d.ts.map +1 -1
- package/dist/params/index.js +2 -2
- package/dist/params/index.js.map +1 -1
- package/dist/params/resolve-schema.d.ts.map +1 -1
- package/dist/plugins/build-manifest.d.ts.map +1 -1
- package/dist/plugins/cloudflare-wasm.d.ts +18 -0
- package/dist/plugins/cloudflare-wasm.d.ts.map +1 -0
- package/dist/plugins/dev-server.d.ts.map +1 -1
- package/dist/plugins/routing.d.ts.map +1 -1
- package/dist/routing/codegen-shared.d.ts +5 -4
- package/dist/routing/codegen-shared.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 +4 -4
- package/dist/routing/scanner.d.ts.map +1 -1
- package/dist/routing/schema-validation.d.ts +35 -0
- package/dist/routing/schema-validation.d.ts.map +1 -0
- package/dist/search-params/index.js +3 -3
- package/dist/segment-params/index.js +1 -1
- package/dist/server/actions.d.ts +3 -8
- package/dist/server/actions.d.ts.map +1 -1
- package/dist/server/build-manifest.d.ts +6 -0
- package/dist/server/build-manifest.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/internal.d.ts +1 -1
- package/dist/server/internal.d.ts.map +1 -1
- package/dist/server/internal.js +15 -6
- package/dist/server/internal.js.map +1 -1
- package/dist/server/metadata-routes.d.ts +23 -7
- package/dist/server/metadata-routes.d.ts.map +1 -1
- package/dist/server/pipeline-phases.d.ts.map +1 -1
- package/dist/server/request-context.d.ts.map +1 -1
- package/dist/server/route-element-builder.d.ts +1 -1
- package/dist/server/route-element-builder.d.ts.map +1 -1
- package/dist/server/route-matcher.d.ts +4 -2
- package/dist/server/route-matcher.d.ts.map +1 -1
- package/dist/server/rsc-entry/index.d.ts.map +1 -1
- package/dist/server/rsc-entry/render-route.d.ts.map +1 -1
- package/dist/server/ssr-entry.d.ts.map +1 -1
- package/dist/server/tree-match.d.ts +12 -4
- package/dist/server/tree-match.d.ts.map +1 -1
- package/dist/server/types.d.ts +2 -2
- package/package.json +7 -6
- package/src/adapters/build-output-helper.ts +67 -5
- package/src/cli-schema-sync.ts +25 -4
- package/src/cli.ts +0 -0
- package/src/client/browser-entry/index.ts +1 -1
- package/src/client/link.tsx +9 -9
- package/src/codec.ts +51 -1
- package/src/index.ts +2 -0
- package/src/params/define-schema.ts +46 -5
- package/src/params/index.ts +7 -1
- package/src/params/resolve-schema.ts +28 -0
- package/src/plugins/build-manifest.ts +57 -5
- package/src/plugins/cloudflare-wasm.ts +103 -0
- package/src/plugins/dev-server.ts +4 -2
- package/src/plugins/routing.ts +31 -34
- package/src/routing/codegen-shared.ts +8 -5
- package/src/routing/codegen.ts +59 -5
- package/src/routing/index.ts +5 -0
- package/src/routing/link-codegen.ts +1 -1
- package/src/routing/scanner.ts +58 -0
- package/src/routing/schema-validation.ts +149 -0
- package/src/server/actions.ts +4 -14
- package/src/server/build-manifest.ts +7 -0
- package/src/server/internal.ts +7 -1
- package/src/server/metadata-routes.ts +44 -19
- package/src/server/pipeline-phases.ts +8 -0
- package/src/server/request-context.ts +0 -4
- package/src/server/route-element-builder.ts +57 -11
- package/src/server/route-matcher.ts +81 -49
- package/src/server/rsc-entry/index.ts +7 -1
- package/src/server/rsc-entry/render-route.ts +7 -1
- package/src/server/ssr-entry.ts +6 -0
- package/src/server/tree-match.ts +23 -11
- package/src/server/types.ts +2 -2
- package/LICENSE +0 -8
- package/dist/_chunks/actions-Cw-7NfJJ.js.map +0 -1
- package/dist/_chunks/build-output-helper-DhxiT18k.js.map +0 -1
- package/dist/_chunks/cli-schema-sync-XV0I47Gj.js +0 -2
- package/dist/_chunks/cli-schema-sync-q2wB0DyJ.js +0 -358
- package/dist/_chunks/cli-schema-sync-q2wB0DyJ.js.map +0 -1
- package/dist/_chunks/metadata-routes-Cjmvi3rQ.js.map +0 -1
- package/dist/_chunks/resolve-schema-23Mc8aLi.js.map +0 -1
- package/dist/_chunks/scanner-DmfoB7iK.js +0 -336
- package/dist/_chunks/scanner-DmfoB7iK.js.map +0 -1
- package/dist/_chunks/walkers-DgOXkTts.js.map +0 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Design doc: design/41-global-params.md
|
|
9
9
|
*/
|
|
10
|
-
import type { Codec } from '../codec.js';
|
|
10
|
+
import type { Codec, CatchAllCodec, OptionalCatchAllCodec } from '../codec.js';
|
|
11
11
|
import type { StandardSchemaV1 } from '../schema-bridge.js';
|
|
12
12
|
/**
|
|
13
13
|
* Infer the output type from a Codec, StandardSchemaV1, or nuqs parser.
|
|
@@ -19,7 +19,30 @@ export type InferCodecType<V> = V extends Codec<infer T> ? T : V extends Standar
|
|
|
19
19
|
parseServerSide: (value: string) => infer T;
|
|
20
20
|
} ? T : string;
|
|
21
21
|
/** Acceptable codec value for segment params: a Codec or Standard Schema. */
|
|
22
|
-
type SegmentParamCodec = Codec<unknown> | StandardSchemaV1<unknown>;
|
|
22
|
+
export type SegmentParamCodec = Codec<unknown> | StandardSchemaV1<unknown>;
|
|
23
|
+
/** Codec constraint for catch-all segment keys (`[...name]`). */
|
|
24
|
+
export type CatchAllParamCodec = CatchAllCodec<unknown> | StandardSchemaV1<readonly unknown[]>;
|
|
25
|
+
/** Codec constraint for optional catch-all segment keys (`[[...name]]`). */
|
|
26
|
+
export type OptionalCatchAllParamCodec = OptionalCatchAllCodec<unknown> | StandardSchemaV1<readonly unknown[] | undefined>;
|
|
27
|
+
/**
|
|
28
|
+
* Resolves the required codec type for a given bracket key pattern.
|
|
29
|
+
* - `[...name]` → requires a catch-all codec
|
|
30
|
+
* - `[[...name]]` → requires an optional catch-all codec
|
|
31
|
+
* - `[name]` → accepts any segment param codec
|
|
32
|
+
*/
|
|
33
|
+
export type CodecForKey<K extends string> = K extends `[[...${string}]]` ? OptionalCatchAllParamCodec : K extends `[...${string}]` ? CatchAllParamCodec : SegmentParamCodec;
|
|
34
|
+
/**
|
|
35
|
+
* Registry interface augmented by codegen with known filesystem bracket keys.
|
|
36
|
+
* When empty (no codegen yet), ValidDynamicSegmentKeys falls back to string.
|
|
37
|
+
*/
|
|
38
|
+
export interface ValidDynamicSegmentKeysRegistry {
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Union of valid bracket keys for defineSchema.
|
|
42
|
+
* After codegen runs, this is the set of filesystem segment names.
|
|
43
|
+
* Before codegen (fresh project), accepts any string.
|
|
44
|
+
*/
|
|
45
|
+
export type ValidDynamicSegmentKeys = keyof ValidDynamicSegmentKeysRegistry extends never ? string : keyof ValidDynamicSegmentKeysRegistry & string;
|
|
23
46
|
/** Configuration object for defineSchema. */
|
|
24
47
|
export interface SchemaConfig<S extends Record<string, SegmentParamCodec>> {
|
|
25
48
|
segmentParams: S;
|
|
@@ -48,6 +71,11 @@ export interface SchemaConfig<S extends Record<string, SegmentParamCodec>> {
|
|
|
48
71
|
* });
|
|
49
72
|
* ```
|
|
50
73
|
*/
|
|
51
|
-
export declare function defineSchema<S extends
|
|
52
|
-
|
|
74
|
+
export declare function defineSchema<S extends {
|
|
75
|
+
[K in keyof S]: K extends ValidDynamicSegmentKeys ? K extends string ? CodecForKey<K> : SegmentParamCodec : never;
|
|
76
|
+
}>(config: {
|
|
77
|
+
segmentParams: S;
|
|
78
|
+
}): {
|
|
79
|
+
segmentParams: S;
|
|
80
|
+
};
|
|
53
81
|
//# sourceMappingURL=define-schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-schema.d.ts","sourceRoot":"","sources":["../../src/params/define-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"define-schema.d.ts","sourceRoot":"","sources":["../../src/params/define-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM5D;;;;;GAKG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,IAC1B,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GACpB,CAAC,GACD,CAAC,SAAS,gBAAgB,CAAC,MAAM,CAAC,CAAC,GACjC,CAAC,GACD,CAAC,SAAS;IAAE,eAAe,EAAE,CAAC,KAAK,EAAE,MAA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;CAAE,CAEpD"}
|
package/dist/params/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { defineSchema } from './define-schema.js';
|
|
2
|
-
export type { InferCodecType, SchemaConfig } from './define-schema.js';
|
|
2
|
+
export type { InferCodecType, SchemaConfig, SegmentParamCodec, ValidDynamicSegmentKeys, ValidDynamicSegmentKeysRegistry, } from './define-schema.js';
|
|
3
3
|
export { resolveSchemaCodecs, toBracketKey } from './resolve-schema.js';
|
|
4
4
|
export { setLinkCodecs, getLinkCodec } from './codec-registry.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/params/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/params/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EACV,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,EACvB,+BAA+B,GAChC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/params/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as toBracketKey, t as resolveSchemaCodecs } from "../_chunks/resolve-schema-
|
|
2
|
-
import { n as setLinkCodecs, t as getLinkCodec } from "../_chunks/codec-registry-
|
|
1
|
+
import { n as toBracketKey, t as resolveSchemaCodecs } from "../_chunks/resolve-schema-cURaYvaD.js";
|
|
2
|
+
import { n as setLinkCodecs, t as getLinkCodec } from "../_chunks/codec-registry-G9hD5LOq.js";
|
|
3
3
|
//#region src/params/define-schema.ts
|
|
4
4
|
/**
|
|
5
5
|
* Define the global segment param schema.
|
package/dist/params/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/params/define-schema.ts"],"sourcesContent":["/**\n * defineSchema — global segment param schema definition.\n *\n * Identity function at runtime; the type information is what matters.\n * The Vite plugin reads the schema at build time for codegen, and\n * the pipeline reads it at runtime for coercion.\n *\n * Design doc: design/41-global-params.md\n */\n\nimport type { Codec } from '../codec.js';\nimport type { StandardSchemaV1 } from '../schema-bridge.js';\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\n/**\n * Infer the output type from a Codec, StandardSchemaV1, or nuqs parser.\n *\n * Used by codegen to reference schema types without hardcoding:\n * `InferCodecType<typeof schema.segmentParams['[year]']>`\n */\nexport type InferCodecType<V> =\n V extends Codec<infer T>\n ? T\n : V extends StandardSchemaV1<infer T>\n ? T\n : V extends { parseServerSide: (value: string) => infer T }\n ? T\n : string;\n\n/** Acceptable codec value for segment params: a Codec or Standard Schema. */\
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/params/define-schema.ts"],"sourcesContent":["/**\n * defineSchema — global segment param schema definition.\n *\n * Identity function at runtime; the type information is what matters.\n * The Vite plugin reads the schema at build time for codegen, and\n * the pipeline reads it at runtime for coercion.\n *\n * Design doc: design/41-global-params.md\n */\n\nimport type { Codec, CatchAllCodec, OptionalCatchAllCodec } from '../codec.js';\nimport type { StandardSchemaV1 } from '../schema-bridge.js';\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\n/**\n * Infer the output type from a Codec, StandardSchemaV1, or nuqs parser.\n *\n * Used by codegen to reference schema types without hardcoding:\n * `InferCodecType<typeof schema.segmentParams['[year]']>`\n */\nexport type InferCodecType<V> =\n V extends Codec<infer T>\n ? T\n : V extends StandardSchemaV1<infer T>\n ? T\n : V extends { parseServerSide: (value: string) => infer T }\n ? T\n : string;\n\n/** Acceptable codec value for segment params: a Codec or Standard Schema. */\nexport type SegmentParamCodec = Codec<unknown> | StandardSchemaV1<unknown>;\n\n/** Codec constraint for catch-all segment keys (`[...name]`). */\nexport type CatchAllParamCodec = CatchAllCodec<unknown> | StandardSchemaV1<readonly unknown[]>;\n\n/** Codec constraint for optional catch-all segment keys (`[[...name]]`). */\nexport type OptionalCatchAllParamCodec =\n | OptionalCatchAllCodec<unknown>\n | StandardSchemaV1<readonly unknown[] | undefined>;\n\n/**\n * Resolves the required codec type for a given bracket key pattern.\n * - `[...name]` → requires a catch-all codec\n * - `[[...name]]` → requires an optional catch-all codec\n * - `[name]` → accepts any segment param codec\n */\nexport type CodecForKey<K extends string> = K extends `[[...${string}]]`\n ? OptionalCatchAllParamCodec\n : K extends `[...${string}]`\n ? CatchAllParamCodec\n : SegmentParamCodec;\n\n/**\n * Registry interface augmented by codegen with known filesystem bracket keys.\n * When empty (no codegen yet), ValidDynamicSegmentKeys falls back to string.\n */\nexport interface ValidDynamicSegmentKeysRegistry {}\n\n/**\n * Union of valid bracket keys for defineSchema.\n * After codegen runs, this is the set of filesystem segment names.\n * Before codegen (fresh project), accepts any string.\n */\nexport type ValidDynamicSegmentKeys = keyof ValidDynamicSegmentKeysRegistry extends never\n ? string\n : keyof ValidDynamicSegmentKeysRegistry & string;\n\n/** Configuration object for defineSchema. */\nexport interface SchemaConfig<S extends Record<string, SegmentParamCodec>> {\n segmentParams: S;\n}\n\n// ---------------------------------------------------------------------------\n// Factory\n// ---------------------------------------------------------------------------\n\n/**\n * Define the global segment param schema.\n *\n * Each key uses the bracket syntax from the filesystem (`[id]`, `[...slug]`,\n * `[[...slug]]`) mapped to a codec. This makes the relationship between\n * filesystem segments and codecs visually obvious.\n *\n * A dynamic segment with no key here defaults to `string` at codegen time.\n *\n * ```ts\n * // app/schema.ts\n * import { defineSchema } from '@timber-js/app/params';\n * import { codec } from '@timber-js/app/codec';\n * import { z } from 'zod';\n *\n * export default defineSchema({\n * segmentParams: {\n * '[artistSlug]': codec.string,\n * '[year]': codec.integer,\n * '[id]': z.coerce.number().int(),\n * },\n * });\n * ```\n */\nexport function defineSchema<\n S extends {\n [K in keyof S]: K extends ValidDynamicSegmentKeys\n ? K extends string\n ? CodecForKey<K>\n : SegmentParamCodec\n : never;\n },\n>(config: { segmentParams: S }): { segmentParams: S } {\n return config;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAuGA,SAAgB,aAQd,QAAoD;AACpD,QAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-schema.d.ts","sourceRoot":"","sources":["../../src/params/resolve-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAmCzC;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAS3E;
|
|
1
|
+
{"version":3,"file":"resolve-schema.d.ts","sourceRoot":"","sources":["../../src/params/resolve-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAmCzC;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAS3E;AAaD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAyBhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-manifest.d.ts","sourceRoot":"","sources":["../../src/plugins/build-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"build-manifest.d.ts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AM,CAuG9D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* timber-cloudflare-wasm — Handle WASM modules for Cloudflare Workers builds.
|
|
3
|
+
*
|
|
4
|
+
* Cloudflare Workers can natively import `.wasm` files as compiled
|
|
5
|
+
* WebAssembly.Module. But Rolldown can't load `.wasm` files at build time.
|
|
6
|
+
*
|
|
7
|
+
* This plugin bridges the gap:
|
|
8
|
+
* 1. Adds the `workerd` resolve condition so libraries like @takumi-rs/wasm
|
|
9
|
+
* resolve to their Cloudflare-native entry (bare `.wasm` import)
|
|
10
|
+
* 2. Externalizes `.wasm` imports so Rolldown skips them
|
|
11
|
+
* 3. Copies the WASM files to the build output so wrangler can find them
|
|
12
|
+
*
|
|
13
|
+
* Only active for Cloudflare adapter production builds.
|
|
14
|
+
*/
|
|
15
|
+
import type { Plugin } from 'vite';
|
|
16
|
+
import type { PluginContext } from '../plugin-context.js';
|
|
17
|
+
export declare function timberCloudflareWasm(ctx: PluginContext): Plugin[];
|
|
18
|
+
//# sourceMappingURL=cloudflare-wasm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudflare-wasm.d.ts","sourceRoot":"","sources":["../../src/plugins/cloudflare-wasm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAkB,MAAM,MAAM,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAO1D,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,EAAE,CA6EjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAiC,MAAM,MAAM,CAAC;AAGlE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAiC,MAAM,MAAM,CAAC;AAGlE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AA+C1D;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAiE1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../src/plugins/routing.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../src/plugins/routing.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAC;AAoBlD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AA2F1D,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAuNxD"}
|
|
@@ -45,12 +45,13 @@ export declare function emitResolveSegmentFieldHelper(): string;
|
|
|
45
45
|
export declare function buildCodecChainType(p: ParamEntry, importBase: string | undefined, fallback: string): string;
|
|
46
46
|
/**
|
|
47
47
|
* Build a TypeScript type expression for a single param using the global
|
|
48
|
-
* schema's InferCodecType. Falls back to
|
|
49
|
-
* declare this param.
|
|
48
|
+
* schema's InferCodecType. Falls back to the param's base type when
|
|
49
|
+
* schema doesn't declare this param (schemas are opt-in per key).
|
|
50
50
|
*
|
|
51
|
-
* Generates
|
|
51
|
+
* Generates a conditional that checks key existence:
|
|
52
|
+
* `[bracketName] extends keyof typeof schema.segmentParams ? InferCodecType<...> : fallback`
|
|
52
53
|
*/
|
|
53
|
-
export declare function buildSchemaParamType(p: ParamEntry): string;
|
|
54
|
+
export declare function buildSchemaParamType(p: ParamEntry, fallback?: string): string;
|
|
54
55
|
/**
|
|
55
56
|
* Format the searchParams type for a route entry.
|
|
56
57
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codegen-shared.d.ts","sourceRoot":"","sources":["../../src/routing/codegen-shared.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEjE;;;GAGG;AACH,wBAAgB,eAAe,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAM7F;AAED,sEAAsE;AACtE,eAAO,MAAM,+BAA+B,+BAA+B,CAAC;AAE5E;;;;;;;;;;;;GAYG;AACH,wBAAgB,6BAA6B,IAAI,MAAM,CAOtD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CACjC,CAAC,EAAE,UAAU,EACb,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,MAAM,GACf,MAAM,CAaR;AAED
|
|
1
|
+
{"version":3,"file":"codegen-shared.d.ts","sourceRoot":"","sources":["../../src/routing/codegen-shared.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEjE;;;GAGG;AACH,wBAAgB,eAAe,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAM7F;AAED,sEAAsE;AACtE,eAAO,MAAM,+BAA+B,+BAA+B,CAAC;AAE5E;;;;;;;;;;;;GAYG;AACH,wBAAgB,6BAA6B,IAAI,MAAM,CAOtD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CACjC,CAAC,EAAE,UAAU,EACb,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,MAAM,GACf,MAAM,CAaR;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAI7E;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAOrF"}
|
package/dist/routing/index.d.ts
CHANGED
|
@@ -9,4 +9,6 @@ export { classifyUrlSegment, classifySegment } from './segment-classify.js';
|
|
|
9
9
|
export type { UrlSegment, SegmentClassification } from './segment-classify.js';
|
|
10
10
|
export { collectLeafRoutes } from './walkers.js';
|
|
11
11
|
export type { LeafRoute, CollectLeafRoutesOptions } from './walkers.js';
|
|
12
|
+
export { validateSchemaAgainstRoutes, collectDynamicSegmentsFromTree, } from './schema-validation.js';
|
|
13
|
+
export type { SchemaWarning } from './schema-validation.js';
|
|
12
14
|
//# 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,MAAM,cAAc,CAAC;AAC1C,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,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC5E,YAAY,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,YAAY,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,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,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC5E,YAAY,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,YAAY,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EACL,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/routing/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as INTERCEPTION_MARKERS, n as classifyUrlSegment, r as DEFAULT_PAGE_EXTENSIONS, t as classifySegment } from "../_chunks/segment-classify-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export { DEFAULT_PAGE_EXTENSIONS, INTERCEPTION_MARKERS, classifySegment, classifyUrlSegment, collectInterceptionRewrites, collectLeafRoutes, generateRouteMap, scanRoutes };
|
|
1
|
+
import { i as INTERCEPTION_MARKERS, n as classifyUrlSegment, r as DEFAULT_PAGE_EXTENSIONS, t as classifySegment } from "../_chunks/segment-classify-BjfuctV2.js";
|
|
2
|
+
import { p as scanRoutes } from "../_chunks/cli-schema-sync-VcCf1TFY.js";
|
|
3
|
+
import { a as generateRouteMap, i as collectInterceptionRewrites, n as collectDynamicSegmentsFromTree, r as validateSchemaAgainstRoutes, t as collectLeafRoutes } from "../_chunks/walkers-tkw7sDlj.js";
|
|
4
|
+
export { DEFAULT_PAGE_EXTENSIONS, INTERCEPTION_MARKERS, classifySegment, classifyUrlSegment, collectDynamicSegmentsFromTree, collectInterceptionRewrites, collectLeafRoutes, generateRouteMap, scanRoutes, validateSchemaAgainstRoutes };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../../src/routing/scanner.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EACV,SAAS,EAIT,aAAa,EAEd,MAAM,YAAY,CAAC;AA+CpB;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,aAAkB,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../../src/routing/scanner.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EACV,SAAS,EAIT,aAAa,EAEd,MAAM,YAAY,CAAC;AA+CpB;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,aAAkB,GAAG,SAAS,CAwChF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema key/value validation against the filesystem route tree.
|
|
3
|
+
*
|
|
4
|
+
* Runs at codegen time (build + dev) to catch mismatches between
|
|
5
|
+
* app/schema.ts keys and the actual dynamic segments on disk.
|
|
6
|
+
*
|
|
7
|
+
* Design doc: design/41-global-params.md
|
|
8
|
+
*/
|
|
9
|
+
import type { RouteTree } from './types.js';
|
|
10
|
+
export interface SchemaWarning {
|
|
11
|
+
type: 'stale-key' | 'missing-key' | 'bracket-mismatch';
|
|
12
|
+
key: string;
|
|
13
|
+
message: string;
|
|
14
|
+
filesystemKey?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Collect all unique bracket-keyed dynamic segment names from a route tree.
|
|
18
|
+
* Returns entries like '[artistSlug]', '[...slug]', '[[...topic]]'.
|
|
19
|
+
*/
|
|
20
|
+
export declare function collectDynamicSegmentsFromTree(tree: RouteTree): Set<string>;
|
|
21
|
+
/**
|
|
22
|
+
* Validate schema keys against the filesystem route tree.
|
|
23
|
+
*
|
|
24
|
+
* Returns warnings for:
|
|
25
|
+
* - Stale keys: schema keys that don't match any filesystem segment
|
|
26
|
+
* - Bracket form mismatches: same param name, different bracket form
|
|
27
|
+
* - Missing keys: filesystem segments not registered in schema (informational)
|
|
28
|
+
*/
|
|
29
|
+
export declare function validateSchemaAgainstRoutes(tree: RouteTree, appDir: string): SchemaWarning[];
|
|
30
|
+
/**
|
|
31
|
+
* Core validation: compare schema keys against filesystem segments.
|
|
32
|
+
* Exported separately for testing without filesystem dependencies.
|
|
33
|
+
*/
|
|
34
|
+
export declare function validateKeys(schemaKeys: string[], filesystemSegments: Set<string>): SchemaWarning[];
|
|
35
|
+
//# sourceMappingURL=schema-validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-validation.d.ts","sourceRoot":"","sources":["../../src/routing/schema-validation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,YAAY,CAAC;AAIzD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,GAAG,aAAa,GAAG,kBAAkB,CAAC;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,CAI3E;AA2BD;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,EAAE,CAY5F;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,MAAM,EAAE,EACpB,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,GAC9B,aAAa,EAAE,CA+DjB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as registerSearchParams, t as getSearchParamsDefinition } from "../_chunks/registry-
|
|
2
|
-
import { i as isStandardSchema, n as fromSchema, r as isCodec } from "../_chunks/schema-bridge-
|
|
3
|
-
import { n as defineSearchParams } from "../_chunks/define-
|
|
1
|
+
import { n as registerSearchParams, t as getSearchParamsDefinition } from "../_chunks/registry-BI9cgCt7.js";
|
|
2
|
+
import { i as isStandardSchema, n as fromSchema, r as isCodec } from "../_chunks/schema-bridge-o0SwFtXW.js";
|
|
3
|
+
import { n as defineSearchParams } from "../_chunks/define-jeHDXZGq.js";
|
|
4
4
|
//#region src/search-params/wrappers.ts
|
|
5
5
|
/**
|
|
6
6
|
* Wrap a nullable codec with a default value. When the inner codec returns
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as defineSegmentParams } from "../_chunks/define-
|
|
1
|
+
import { r as defineSegmentParams } from "../_chunks/define-CPVQaWbx.js";
|
|
2
2
|
export { defineSegmentParams };
|
package/dist/server/actions.d.ts
CHANGED
|
@@ -41,15 +41,10 @@ export interface ActionHandlerResult {
|
|
|
41
41
|
redirectStatus?: number;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
45
|
-
* @internal —
|
|
44
|
+
* Run `fn` inside a revalidation ALS scope.
|
|
45
|
+
* @internal — for tests that call revalidatePath/Tag directly without executeAction().
|
|
46
46
|
*/
|
|
47
|
-
export declare function
|
|
48
|
-
/**
|
|
49
|
-
* Clear the revalidation state after action execution.
|
|
50
|
-
* @internal — kept for test compatibility.
|
|
51
|
-
*/
|
|
52
|
-
export declare function _clearRevalidationState(): void;
|
|
47
|
+
export declare function _runWithRevalidationState<T>(state: RevalidationState, fn: () => T): T;
|
|
53
48
|
/**
|
|
54
49
|
* Re-render the route at `path` and include the RSC flight payload in the
|
|
55
50
|
* action response. The client reconciles inline — no separate fetch needed.
|
|
@@ -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;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,EAA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AAG,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"}
|
|
@@ -33,6 +33,12 @@ export interface BuildManifest {
|
|
|
33
33
|
modulepreload: Record<string, string[]>;
|
|
34
34
|
/** Map from input file path to font assets used by that module. */
|
|
35
35
|
fonts: Record<string, ManifestFontEntry[]>;
|
|
36
|
+
/**
|
|
37
|
+
* Cache-busting hashes for metadata route files (opengraph-image, etc.).
|
|
38
|
+
* Map from file path (relative to project root) to short content hash.
|
|
39
|
+
* In dev mode this is empty — a startup nonce is used instead.
|
|
40
|
+
*/
|
|
41
|
+
metadataRouteHashes?: Record<string, string>;
|
|
36
42
|
}
|
|
37
43
|
/** Empty build manifest used in dev mode. */
|
|
38
44
|
export declare const EMPTY_BUILD_MANIFEST: BuildManifest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-manifest.d.ts","sourceRoot":"","sources":["../../src/server/build-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,gDAAgD;AAChD,MAAM,WAAW,iBAAiB;IAChC,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,MAAM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6 +1,6 @@
|
|
|
1
1
|
import { a as getSpanId, d as withSpan, o as getTraceId, p as formFlashAls, t as addSpanEvent, v as isDebug, y as isDevMode } from "../_chunks/tracing-DvKLzCFa.js";
|
|
2
|
-
import { t as formatSize } from "../_chunks/format-
|
|
3
|
-
import { D as getCookieJar, a as revalidateTag, b as getSegmentParams, c as DenySignal, f as deny, h as waitUntil, i as revalidatePath, l as RedirectSignal, m as redirectExternal, o as coerce, p as redirect, s as parseFormData, u as RedirectType, v as getHeaders } from "../_chunks/actions-
|
|
2
|
+
import { t as formatSize } from "../_chunks/format-BjN9HLu9.js";
|
|
3
|
+
import { D as getCookieJar, a as revalidateTag, b as getSegmentParams, c as DenySignal, f as deny, h as waitUntil, i as revalidatePath, l as RedirectSignal, m as redirectExternal, o as coerce, p as redirect, s as parseFormData, u as RedirectType, v as getHeaders } from "../_chunks/actions-Dy8vOjFt.js";
|
|
4
4
|
//#region src/server/sensitive-fields.ts
|
|
5
5
|
/**
|
|
6
6
|
* Sensitive field stripping — removes password/token/CVV-style fields
|
|
@@ -29,7 +29,7 @@ export type { BodyLimitsConfig, BodyLimitResult, BodyKind } from './body-limits.
|
|
|
29
29
|
export { resolveMetadata, resolveTitle, resolveMetadataUrls, renderMetadataToElements, } from './metadata.js';
|
|
30
30
|
export type { SegmentMetadataEntry, ResolveMetadataOptions, HeadElement } from './metadata.js';
|
|
31
31
|
export { classifyMetadataRoute, getMetadataRouteServePath, getMetadataRouteAutoLink, METADATA_ROUTE_CONVENTIONS, } from './metadata-routes.js';
|
|
32
|
-
export type { MetadataRouteInfo, MetadataRouteType } from './metadata-routes.js';
|
|
32
|
+
export type { MetadataRouteInfo, MetadataRouteType, AutoLinkTag, AutoLinkLink, AutoLinkMeta, } from './metadata-routes.js';
|
|
33
33
|
export { executeAction, buildNoJsResponse, isRscActionRequest } from './actions.js';
|
|
34
34
|
export type { RevalidateRenderer, RevalidationState, ActionHandlerConfig, ActionHandlerResult, } from './actions.js';
|
|
35
35
|
export { runWithTraceId, replaceTraceId, generateTraceId } from './tracing.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/server/internal.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAGrE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC1E,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,YAAY,EACV,cAAc,EACd,UAAU,EACV,YAAY,EACZ,aAAa,EACb,iBAAiB,GAClB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACrF,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAGlE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGvD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAG3D,OAA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,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,yBAAyB,EACzB,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAClG,YAAY,EACV,6BAA6B,EAC7B,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,4BAA4B,EAC5B,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,2BAA2B,EAC3B,aAAa,EACb,SAAS,GACV,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/server/internal.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { c as replaceTraceId, d as withSpan, f as earlyHintsSenderAls, g as timingAls, i as getOtelTraceId, l as runWithTraceId, m as requestContextAls, o as getTraceId, r as generateTraceId, u as setSpanAttribute, v as isDebug } from "../_chunks/tracing-DvKLzCFa.js";
|
|
2
2
|
import { a as warnRedirectInSuspense, c as warnSuspenseWrappingChildren, i as warnRedirectInAccess, n as setViteServer, o as warnSlowSlotWithoutSuspense, r as warnDenyInSuspense, s as warnStaticRequestApi, t as WarningId } from "../_chunks/warnings-B30wpfaS.js";
|
|
3
|
-
import { n as
|
|
4
|
-
import {
|
|
3
|
+
import { i as getMetadataRouteServePath, n as classifyMetadataRoute, r as getMetadataRouteAutoLink, t as METADATA_ROUTE_CONVENTIONS } from "../_chunks/metadata-routes-DESG8uk5.js";
|
|
4
|
+
import { n as classifyUrlSegment } from "../_chunks/segment-classify-BjfuctV2.js";
|
|
5
5
|
import { a as logProxyError, c as logRequestReceived, d as logSwrRefetchFailed, f as logWaitUntilRejected, h as swallow, i as logMiddlewareShortCircuit, l as logRouteError, m as setLogger, n as logCacheMiss, o as logRenderError, p as logWaitUntilUnsupported, r as logMiddlewareError, s as logRequestCompleted, t as getLogger, u as logSlowRequest } from "../_chunks/logger-DDmK5skc.js";
|
|
6
|
-
import { C as setMatchedSegmentPath, E as getCookie, O as getSetCookieHeaders, S as runWithRequestContext, T as setSegmentParams, _ as getHeader, b as getSegmentParams, c as DenySignal, d as RenderError, g as applyRequestHeaderOverlay, l as RedirectSignal, n as executeAction, o as coerce, r as isRscActionRequest, t as buildNoJsResponse, w as setMutableCookieContext, x as markResponseFlushed, y as getSearchParams } from "../_chunks/actions-
|
|
6
|
+
import { C as setMatchedSegmentPath, E as getCookie, O as getSetCookieHeaders, S as runWithRequestContext, T as setSegmentParams, _ as getHeader, b as getSegmentParams, c as DenySignal, d as RenderError, g as applyRequestHeaderOverlay, l as RedirectSignal, n as executeAction, o as coerce, r as isRscActionRequest, t as buildNoJsResponse, w as setMutableCookieContext, x as markResponseFlushed, y as getSearchParams } from "../_chunks/actions-Dy8vOjFt.js";
|
|
7
7
|
import "../client/error-boundary.js";
|
|
8
|
-
import { n as toBracketKey } from "../_chunks/resolve-schema-
|
|
9
|
-
import "../_chunks/segment-context-
|
|
8
|
+
import { n as toBracketKey } from "../_chunks/resolve-schema-cURaYvaD.js";
|
|
9
|
+
import "../_chunks/segment-context-EsfQpS--.js";
|
|
10
10
|
import { readFile } from "node:fs/promises";
|
|
11
|
+
import "node:crypto";
|
|
11
12
|
import { createElement } from "react";
|
|
12
13
|
//#region src/server/server-timing.ts
|
|
13
14
|
/**
|
|
@@ -1857,13 +1858,21 @@ async function handleRequest(config, req, method, path) {
|
|
|
1857
1858
|
const metaMatch = config.matchMetadataRoute(canonicalPathname);
|
|
1858
1859
|
if (metaMatch) try {
|
|
1859
1860
|
if (metaMatch.isStatic) return await serveStaticMetadataFile(metaMatch);
|
|
1861
|
+
setSegmentParams(metaMatch.segmentParams);
|
|
1860
1862
|
const mod = await loadModule(metaMatch.file);
|
|
1861
1863
|
if (typeof mod.default !== "function") {
|
|
1862
1864
|
if (isDebug()) console.warn(`[timber] Metadata route ${metaMatch.file} does not export a default function — responding with 500\n Metadata routes must export a default function that returns the metadata content.`);
|
|
1863
1865
|
return new Response("Metadata route must export a default function", { status: 500 });
|
|
1864
1866
|
}
|
|
1865
1867
|
const handlerResult = await mod.default();
|
|
1866
|
-
if (handlerResult instanceof Response)
|
|
1868
|
+
if (handlerResult instanceof Response) {
|
|
1869
|
+
if (method === "HEAD") return new Response(null, {
|
|
1870
|
+
status: handlerResult.status,
|
|
1871
|
+
statusText: handlerResult.statusText,
|
|
1872
|
+
headers: new Headers(handlerResult.headers)
|
|
1873
|
+
});
|
|
1874
|
+
return cloneWithMutableHeaders(handlerResult);
|
|
1875
|
+
}
|
|
1867
1876
|
const contentType = metaMatch.contentType;
|
|
1868
1877
|
let body;
|
|
1869
1878
|
if (typeof handlerResult === "string") body = handlerResult;
|