@timber-js/app 0.2.0-alpha.227 → 0.2.0-alpha.228

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.
Files changed (74) hide show
  1. package/dist/_chunks/{actions-B1xSIv32.js → actions-DprvPi7O.js} +3 -3
  2. package/dist/_chunks/{actions-B1xSIv32.js.map → actions-DprvPi7O.js.map} +1 -1
  3. package/dist/_chunks/{cache-api-DsSXA4Sp.js → cache-api-BjE-nNC0.js} +4 -4
  4. package/dist/_chunks/{cache-api-DsSXA4Sp.js.map → cache-api-BjE-nNC0.js.map} +1 -1
  5. package/dist/_chunks/chains-BS8fQYao.js +1 -0
  6. package/dist/_chunks/{chains-Dgm3PrMe.js → chains-DaDEXv0c.js} +2 -2
  7. package/dist/_chunks/{chains-Dgm3PrMe.js.map → chains-DaDEXv0c.js.map} +1 -1
  8. package/dist/_chunks/{classify--_kINHQV.js → classify-BuIifN5v.js} +2 -2
  9. package/dist/_chunks/{classify--_kINHQV.js.map → classify-BuIifN5v.js.map} +1 -1
  10. package/dist/_chunks/{cli-check-B33yhAPa.js → cli-check-B_fDvxhs.js} +3 -3
  11. package/dist/_chunks/{cli-check-B33yhAPa.js.map → cli-check-B_fDvxhs.js.map} +1 -1
  12. package/dist/_chunks/{cli-schema-sync-uq72EZmD.js → cli-schema-sync-CUIk0G2X.js} +1 -1
  13. package/dist/_chunks/{cli-schema-sync-DIPurq7X.js → cli-schema-sync-D9OLUUFv.js} +2 -2
  14. package/dist/_chunks/{cli-schema-sync-DIPurq7X.js.map → cli-schema-sync-D9OLUUFv.js.map} +1 -1
  15. package/dist/_chunks/{client-dep-entries-CP7AkMCM.js → client-dep-entries-COuyF8-c.js} +2 -2
  16. package/dist/_chunks/{client-dep-entries-CP7AkMCM.js.map → client-dep-entries-COuyF8-c.js.map} +1 -1
  17. package/dist/_chunks/{convention-lint-hZwz5wd4.js → convention-lint-BHY0d5AQ.js} +4 -13
  18. package/dist/_chunks/convention-lint-BHY0d5AQ.js.map +1 -0
  19. package/dist/_chunks/{dev-server-B7o4As0l.js → dev-server-BaM7q3pr.js} +2 -2
  20. package/dist/_chunks/{dev-server-B7o4As0l.js.map → dev-server-BaM7q3pr.js.map} +1 -1
  21. package/dist/_chunks/dev-server-NnGosJ06.js +1 -0
  22. package/dist/_chunks/{flight-source-node-0Tp6evlz.js → flight-source-node-CZJ9Drb7.js} +2 -2
  23. package/dist/_chunks/{flight-source-node-0Tp6evlz.js.map → flight-source-node-CZJ9Drb7.js.map} +1 -1
  24. package/dist/_chunks/{json-lossy-check-DVkLUlfC.js → json-lossy-check-BNwKrm2R.js} +2 -2
  25. package/dist/_chunks/{json-lossy-check-DVkLUlfC.js.map → json-lossy-check-BNwKrm2R.js.map} +1 -1
  26. package/dist/_chunks/{live-graph-BcVjQ1Te.js → live-graph-DiRVmRrC.js} +4 -4
  27. package/dist/_chunks/{live-graph-BcVjQ1Te.js.map → live-graph-DiRVmRrC.js.map} +1 -1
  28. package/dist/_chunks/{logger-CWk44DLp.js → logger-DRMij51J.js} +4 -4
  29. package/dist/_chunks/logger-DRMij51J.js.map +1 -0
  30. package/dist/_chunks/{node-response-B9aviPDa.js → node-response-C-dQn-0N.js} +2 -2
  31. package/dist/_chunks/{node-response-B9aviPDa.js.map → node-response-C-dQn-0N.js.map} +1 -1
  32. package/dist/_chunks/{poison-scan-DJYxZc_7.js → poison-scan-CqPGN0ru.js} +2 -2
  33. package/dist/_chunks/{poison-scan-DJYxZc_7.js.map → poison-scan-CqPGN0ru.js.map} +1 -1
  34. package/dist/_chunks/route-methods-Dk2kZc0n.js +36 -0
  35. package/dist/_chunks/route-methods-Dk2kZc0n.js.map +1 -0
  36. package/dist/_chunks/{scanner-CJC-ScJU.js → scanner-C__vsQ8d.js} +2 -2
  37. package/dist/_chunks/{scanner-CJC-ScJU.js.map → scanner-C__vsQ8d.js.map} +1 -1
  38. package/dist/_chunks/{sizeof-DG4W40lv.js → sizeof-DcEcQaSL.js} +2 -2
  39. package/dist/_chunks/{sizeof-DG4W40lv.js.map → sizeof-DcEcQaSL.js.map} +1 -1
  40. package/dist/_chunks/{walkers-DIE203ir.js → walkers-D6KY4jyS.js} +3 -3
  41. package/dist/_chunks/{walkers-DIE203ir.js.map → walkers-D6KY4jyS.js.map} +1 -1
  42. package/dist/adapters/cloudflare-kv-cache.js +1 -1
  43. package/dist/analyze/crawl-entry.js +3 -3
  44. package/dist/analyze/graph-command.js +2 -2
  45. package/dist/cache/index.js +2 -2
  46. package/dist/cache/stores/memory.js +1 -1
  47. package/dist/cli.js +3 -3
  48. package/dist/index.js +7 -7
  49. package/dist/routing/convention-lint.d.ts.map +1 -1
  50. package/dist/routing/index.js +2 -2
  51. package/dist/server/action-handler.d.ts.map +1 -1
  52. package/dist/server/csrf.d.ts +1 -1
  53. package/dist/server/csrf.d.ts.map +1 -1
  54. package/dist/server/index.js +2 -2
  55. package/dist/server/internal.d.ts +2 -1
  56. package/dist/server/internal.d.ts.map +1 -1
  57. package/dist/server/internal.js +22 -24
  58. package/dist/server/internal.js.map +1 -1
  59. package/dist/server/route-handler.d.ts +1 -2
  60. package/dist/server/route-handler.d.ts.map +1 -1
  61. package/dist/server/route-methods.d.ts +23 -0
  62. package/dist/server/route-methods.d.ts.map +1 -0
  63. package/package.json +1 -1
  64. package/src/routing/convention-lint.ts +1 -3
  65. package/src/server/action-handler.ts +5 -0
  66. package/src/server/csrf.ts +11 -3
  67. package/src/server/internal.ts +2 -1
  68. package/src/server/route-handler.ts +8 -19
  69. package/src/server/route-methods.ts +37 -0
  70. package/src/server/tracing.ts +3 -3
  71. package/dist/_chunks/chains-CwOr3Myj.js +0 -1
  72. package/dist/_chunks/convention-lint-hZwz5wd4.js.map +0 -1
  73. package/dist/_chunks/dev-server-hZzmbMvK.js +0 -1
  74. package/dist/_chunks/logger-CWk44DLp.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { b as swallow } from "./logger-CWk44DLp.js";
1
+ import { b as swallow } from "./logger-DRMij51J.js";
2
2
  // src/cache/sizeof.ts
3
3
  /**
4
4
  * Lightweight byte-size estimation for cache entries.
@@ -32,4 +32,4 @@ function estimateByteSize(value) {
32
32
  }
33
33
  export { estimateByteSize as t };
34
34
 
35
- //# sourceMappingURL=sizeof-DG4W40lv.js.map
35
+ //# sourceMappingURL=sizeof-DcEcQaSL.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sizeof-DG4W40lv.js","names":[],"sources":["../../src/cache/sizeof.ts"],"sourcesContent":["/**\n * Lightweight byte-size estimation for cache entries.\n *\n * Estimates the in-memory byte cost of a JavaScript value using\n * JSON.stringify().length * 2 (UTF-16 char width). This is a rough\n * approximation — it doesn't account for V8 object overhead, Map\n * metadata, or non-serializable values — but it's fast and good\n * enough for cache budget enforcement.\n *\n * Values that fail JSON serialization (circular references, BigInt,\n * etc.) return 0, allowing the entry to be cached without counting\n * toward the byte budget. This is a conservative choice: it's better\n * to cache and undercount than to reject the entry.\n */\n\nimport { swallow } from '../server/logger.ts';\n\n/**\n * Estimate the byte size of a value.\n *\n * Uses `JSON.stringify(value).length * 2` to approximate UTF-16\n * in-memory size. Returns 0 if the value is not serializable.\n */\nexport function estimateByteSize(value: unknown): number {\n try {\n const json = JSON.stringify(value);\n if (json === undefined) return 0;\n // Each JS string character is 2 bytes (UTF-16)\n return json.length * 2;\n } catch (e) {\n // Circular reference or non-serializable value\n swallow(e, 'sizeof estimation failed', { level: 'debug' });\n return 0;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuBA,SAAgB,iBAAiB,OAAwB;CACvD,IAAI;EACF,MAAM,OAAO,KAAK,UAAU,KAAK;EACjC,IAAI,SAAS,KAAA,GAAW,OAAO;EAE/B,OAAO,KAAK,SAAS;CACvB,SAAS,GAAG;EAEV,QAAQ,GAAG,4BAA4B,EAAE,OAAO,QAAQ,CAAC;EACzD,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"sizeof-DcEcQaSL.js","names":[],"sources":["../../src/cache/sizeof.ts"],"sourcesContent":["/**\n * Lightweight byte-size estimation for cache entries.\n *\n * Estimates the in-memory byte cost of a JavaScript value using\n * JSON.stringify().length * 2 (UTF-16 char width). This is a rough\n * approximation — it doesn't account for V8 object overhead, Map\n * metadata, or non-serializable values — but it's fast and good\n * enough for cache budget enforcement.\n *\n * Values that fail JSON serialization (circular references, BigInt,\n * etc.) return 0, allowing the entry to be cached without counting\n * toward the byte budget. This is a conservative choice: it's better\n * to cache and undercount than to reject the entry.\n */\n\nimport { swallow } from '../server/logger.ts';\n\n/**\n * Estimate the byte size of a value.\n *\n * Uses `JSON.stringify(value).length * 2` to approximate UTF-16\n * in-memory size. Returns 0 if the value is not serializable.\n */\nexport function estimateByteSize(value: unknown): number {\n try {\n const json = JSON.stringify(value);\n if (json === undefined) return 0;\n // Each JS string character is 2 bytes (UTF-16)\n return json.length * 2;\n } catch (e) {\n // Circular reference or non-serializable value\n swallow(e, 'sizeof estimation failed', { level: 'debug' });\n return 0;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuBA,SAAgB,iBAAiB,OAAwB;CACvD,IAAI;EACF,MAAM,OAAO,KAAK,UAAU,KAAK;EACjC,IAAI,SAAS,KAAA,GAAW,OAAO;EAE/B,OAAO,KAAK,SAAS;CACvB,SAAS,GAAG;EAEV,QAAQ,GAAG,4BAA4B,EAAE,OAAO,QAAQ,CAAC;EACzD,OAAO;CACT;AACF"}
@@ -1,6 +1,6 @@
1
1
  import { n as classifyUrlSegment } from "./segment-classify-Ho8jXWeC.js";
2
- import { u as readFileCached } from "./scanner-CJC-ScJU.js";
3
- import { a as parseExistingSchemaKeys, r as findSchemaFile } from "./cli-schema-sync-DIPurq7X.js";
2
+ import { u as readFileCached } from "./scanner-C__vsQ8d.js";
3
+ import { a as parseExistingSchemaKeys, r as findSchemaFile } from "./cli-schema-sync-D9OLUUFv.js";
4
4
  // src/routing/schema-validation.ts
5
5
  /**
6
6
  * Schema key/value validation against the filesystem route tree.
@@ -139,4 +139,4 @@ function walk(node, chain, result, includeSlots) {
139
139
  }
140
140
  export { collectDynamicSegmentsFromTree as n, validateSchemaAgainstRoutes as r, collectLeafRoutes as t };
141
141
 
142
- //# sourceMappingURL=walkers-DIE203ir.js.map
142
+ //# sourceMappingURL=walkers-D6KY4jyS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"walkers-DIE203ir.js","names":[],"sources":["../../src/routing/schema-validation.ts","../../src/routing/walkers.ts"],"sourcesContent":["/**\n * Schema key/value validation against the filesystem route tree.\n *\n * Runs at codegen time (build + dev) to catch mismatches between\n * app/schema.ts keys and the actual dynamic segments on disk.\n *\n * Design doc: design/41-global-params.md\n */\n\nimport { readFileCached } from './file-cache.ts';\nimport type { RouteTree, SegmentNode } from './types.ts';\nimport { findSchemaFile, parseExistingSchemaKeys } from '../cli-schema-sync.ts';\nimport { classifyUrlSegment } from './segment-classify.ts';\n\nexport interface SchemaWarning {\n type: 'stale-key' | 'missing-key' | 'bracket-mismatch';\n key: string;\n message: string;\n filesystemKey?: string;\n}\n\n/**\n * Collect all unique bracket-keyed dynamic segment names from a route tree.\n * Returns entries like '[artistSlug]', '[...slug]', '[[...topic]]'.\n */\nexport function collectDynamicSegmentsFromTree(tree: RouteTree): Set<string> {\n const segments = new Set<string>();\n walkTree(tree.root, segments);\n return segments;\n}\n\nfunction walkTree(node: SegmentNode, segments: Set<string>): void {\n if (node.paramName && node.segmentName) {\n const classified = classifyUrlSegment(node.segmentName);\n if (classified.kind !== 'static') {\n // Use bare bracket form for schema keys — affixed segments like\n // `img-[id].png` register as `[id]`, matching runtime codec lookup.\n if (classified.kind === 'dynamic' && (classified.prefix || classified.suffix)) {\n segments.add(`[${classified.name}]`);\n } else {\n segments.add(node.segmentName);\n }\n }\n }\n for (const child of node.children) {\n walkTree(child, segments);\n }\n for (const slot of Object.values(node.slots)) {\n walkTree(slot, segments);\n }\n}\n\n/**\n * Extract the param name from a bracket key.\n * '[id]' → 'id', '[...slug]' → 'slug', '[[...topic]]' → 'topic'\n */\nfunction extractParamName(bracketKey: string): string | null {\n const seg = classifyUrlSegment(bracketKey);\n if (seg.kind === 'static') return null;\n return seg.name;\n}\n\n/**\n * Validate schema keys against the filesystem route tree.\n *\n * Returns warnings for:\n * - Stale keys: schema keys that don't match any filesystem segment\n * - Bracket form mismatches: same param name, different bracket form\n * - Missing keys: filesystem segments not registered in schema (informational)\n */\nexport function validateSchemaAgainstRoutes(tree: RouteTree, appDir: string): SchemaWarning[] {\n const schemaPath = findSchemaFile(appDir);\n if (!schemaPath) return [];\n\n const content = readFileCached(schemaPath);\n const schemaKeys = parseExistingSchemaKeys(content);\n\n if (schemaKeys.length === 0) return [];\n\n const filesystemSegments = collectDynamicSegmentsFromTree(tree);\n\n return validateKeys(schemaKeys, filesystemSegments);\n}\n\n/**\n * Core validation: compare schema keys against filesystem segments.\n * Exported separately for testing without filesystem dependencies.\n */\nexport function validateKeys(\n schemaKeys: string[],\n filesystemSegments: Set<string>\n): SchemaWarning[] {\n const warnings: SchemaWarning[] = [];\n\n // Build a map of param name → bracket form for filesystem segments\n const fsParamToKey = new Map<string, string>();\n for (const fsKey of filesystemSegments) {\n const name = extractParamName(fsKey);\n if (name) {\n fsParamToKey.set(name, fsKey);\n }\n }\n\n // Build a set of schema param names for the missing-key check\n const schemaParamNames = new Set<string>();\n\n for (const schemaKey of schemaKeys) {\n const schemaParamName = extractParamName(schemaKey);\n if (!schemaParamName) continue;\n\n schemaParamNames.add(schemaParamName);\n\n if (filesystemSegments.has(schemaKey)) {\n // Exact match — no issue\n continue;\n }\n\n // Check if the param name exists but with a different bracket form\n const fsKey = fsParamToKey.get(schemaParamName);\n if (fsKey) {\n warnings.push({\n type: 'bracket-mismatch',\n key: schemaKey,\n filesystemKey: fsKey,\n message:\n `Schema key '${schemaKey}' does not match filesystem bracket form '${fsKey}'. ` +\n `Update the schema key to '${fsKey}'.`,\n });\n } else {\n warnings.push({\n type: 'stale-key',\n key: schemaKey,\n message:\n `Schema key '${schemaKey}' does not match any dynamic segment in the filesystem. ` +\n `Remove it from app/schema.ts or create the corresponding route segment.`,\n });\n }\n }\n\n // Check for filesystem segments not in schema (informational)\n for (const fsKey of filesystemSegments) {\n const name = extractParamName(fsKey);\n if (name && !schemaParamNames.has(name)) {\n warnings.push({\n type: 'missing-key',\n key: fsKey,\n message:\n `Dynamic segment '${fsKey}' has no codec in app/schema.ts (defaults to string). ` +\n `Run: timber schema sync`,\n });\n }\n }\n\n return warnings;\n}\n","/**\n * Shared route-tree walkers (TIM-848).\n *\n * Tiny helpers that walk a `SegmentNode<TFile>` tree generically. Both the\n * build-time tree (`SegmentNode<RouteFile>`) and the runtime manifest\n * tree (`SegmentNode<ManifestFile>`) flow through these helpers because\n * the walker only reads the structural fields shared by both shapes\n * (`children`, `slots`, `page`, `route`, `urlPath`).\n *\n * Before this module, three near-identical `collectRoutes` functions\n * lived in `plugins/dev-404-page.ts`, `plugins/build-report.ts`, and\n * `routing/codegen.ts`. The codegen one is special-purpose (it\n * accumulates `ParamEntry[]` and resolves codec chains) and stays\n * local; the other two now share `collectLeafRoutes` from this file.\n */\n\nimport type { SegmentNode } from './types.ts';\n\n/** A leaf route discovered while walking the segment tree. */\nexport interface LeafRoute<TFile> {\n /** URL path of the leaf (root is \"/\"). */\n urlPath: string;\n /** Segment chain from root to this leaf, inclusive. */\n segments: SegmentNode<TFile>[];\n /** The page file at this leaf, if any. */\n page?: TFile;\n /** The route handler file at this leaf, if any. */\n route?: TFile;\n}\n\n/** Options for `collectLeafRoutes`. */\nexport interface CollectLeafRoutesOptions {\n /**\n * If true, recurse into parallel slots and emit slot leaves alongside\n * the main route tree. Defaults to `false` because slots render\n * alongside their parent at the same URL and are not separately\n * URL-addressable. The build report excludes slots; route-listing\n * UIs that want to show \"all leaves with a page handler\" can opt in.\n */\n includeSlots?: boolean;\n}\n\n/**\n * Walk a segment tree and collect every leaf with a `page` or `route`\n * handler. Generic over `TFile` so it works on both the build-time\n * scanner output and the runtime manifest tree.\n *\n * - Pages and route handlers at the same URL produce two distinct\n * entries (the build report deduplicates by URL afterward).\n * - Parallel slots are skipped unless `includeSlots: true` (slots\n * share their parent's URL and are not addressable on their own).\n * - Intercepting subtrees are skipped unconditionally. They render only\n * on soft navigation and add no URL depth, so their computed `urlPath`s\n * are not addresses — listing them would advertise routes (`/[year]`)\n * that no request can reach. This matches every other consumer of the\n * tree that produces URLs: the sitemap generator, the static generator,\n * prerendering and the prebuilt-payload builder all skip them too.\n * - Result is sorted by `urlPath` for deterministic output.\n */\nexport function collectLeafRoutes<TFile>(\n root: SegmentNode<TFile>,\n options: CollectLeafRoutesOptions = {}\n): LeafRoute<TFile>[] {\n const { includeSlots = false } = options;\n const result: LeafRoute<TFile>[] = [];\n walk(root, [], result, includeSlots);\n result.sort((a, b) => a.urlPath.localeCompare(b.urlPath));\n return result;\n}\n\nfunction walk<TFile>(\n node: SegmentNode<TFile>,\n chain: SegmentNode<TFile>[],\n result: LeafRoute<TFile>[],\n includeSlots: boolean\n): void {\n if (node.segmentType === 'intercepting') return;\n\n const currentChain = [...chain, node];\n const path = node.urlPath || '/';\n\n if (node.page) {\n result.push({ urlPath: path, segments: currentChain, page: node.page });\n }\n if (node.route) {\n result.push({ urlPath: path, segments: currentChain, route: node.route });\n }\n\n for (const child of node.children) {\n walk(child, currentChain, result, includeSlots);\n }\n\n if (includeSlots) {\n for (const slotNode of Object.values(node.slots)) {\n walk(slotNode, currentChain, result, includeSlots);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAyBA,SAAgB,+BAA+B,MAA8B;CAC3E,MAAM,2BAAW,IAAI,IAAY;CACjC,SAAS,KAAK,MAAM,QAAQ;CAC5B,OAAO;AACT;AAEA,SAAS,SAAS,MAAmB,UAA6B;CAChE,IAAI,KAAK,aAAa,KAAK,aAAa;EACtC,MAAM,aAAa,mBAAmB,KAAK,WAAW;EACtD,IAAI,WAAW,SAAS,UAAU;GAGhC,IAAI,WAAW,SAAS,cAAc,WAAW,UAAU,WAAW,S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,eAAe,UAAU;EAE7B,CAAC;CAEL;CAGA,KAAK,MAAM,SAAS,oBAAoB;EACtC,MAAM,OAAO,iBAAiB,KAAK;EACnC,IAAI,QAAQ,CAAC,iBAAiB,IAAI,IAAI,GACpC,SAAS,KAAK;GACZ,MAAM;GACN,KAAK;GACL,SACE,oBAAoB,MAAM;EAE9B,CAAC;CAEL;CAEA,OAAO;AACT;;;;;;;;;;;;;;;;;;;AC/FA,SAAgB,kBACd,MACA,UAAoC,CAAC,GACjB;CACpB,MAAM,EAAE,eAAe,UAAU;CACjC,MAAM,SAA6B,CAAC;CACpC,KAAK,MAAM,CAAC,GAAG,QAAQ,YAAY;CACnC,OAAO,MAAM,GAAG,MAAM,EAAE,QAAQ,cAAc,EAAE,OAAO,CAAC;CACxD,OAAO;AACT;AAEA,SAAS,KACP,MACA,OACA,QACA,cACM;CACN,IAAI,KAAK,gBAAgB,gBAAgB;CAEzC,MAAM,eAAe,CAAC,GAAG,OAAO,IAAI;CACpC,MAAM,OAAO,KAAK,WAAW;CAE7B,IAAI,KAAK,MACP,OAAO,KAAK;EAAE,SAAS;EAAM,UAAU;EAAc,MAAM,KAAK;CAAK,CAAC;CAExE,IAAI,KAAK,OACP,OAAO,KAAK;EAAE,SAAS;EAAM,UAAU;EAAc,OAAO,KAAK;CAAM,CAAC;CAG1E,KAAK,MAAM,SAAS,KAAK,UACvB,KAAK,OAAO,cAAc,QAAQ,YAAY;CAGhD,IAAI,cACF,KAAK,MAAM,YAAY,OAAO,OAAO,KAAK,KAAK,GAC7C,KAAK,UAAU,cAAc,QAAQ,YAAY;AAGvD"}
1
+ {"version":3,"file":"walkers-D6KY4jyS.js","names":[],"sources":["../../src/routing/schema-validation.ts","../../src/routing/walkers.ts"],"sourcesContent":["/**\n * Schema key/value validation against the filesystem route tree.\n *\n * Runs at codegen time (build + dev) to catch mismatches between\n * app/schema.ts keys and the actual dynamic segments on disk.\n *\n * Design doc: design/41-global-params.md\n */\n\nimport { readFileCached } from './file-cache.ts';\nimport type { RouteTree, SegmentNode } from './types.ts';\nimport { findSchemaFile, parseExistingSchemaKeys } from '../cli-schema-sync.ts';\nimport { classifyUrlSegment } from './segment-classify.ts';\n\nexport interface SchemaWarning {\n type: 'stale-key' | 'missing-key' | 'bracket-mismatch';\n key: string;\n message: string;\n filesystemKey?: string;\n}\n\n/**\n * Collect all unique bracket-keyed dynamic segment names from a route tree.\n * Returns entries like '[artistSlug]', '[...slug]', '[[...topic]]'.\n */\nexport function collectDynamicSegmentsFromTree(tree: RouteTree): Set<string> {\n const segments = new Set<string>();\n walkTree(tree.root, segments);\n return segments;\n}\n\nfunction walkTree(node: SegmentNode, segments: Set<string>): void {\n if (node.paramName && node.segmentName) {\n const classified = classifyUrlSegment(node.segmentName);\n if (classified.kind !== 'static') {\n // Use bare bracket form for schema keys — affixed segments like\n // `img-[id].png` register as `[id]`, matching runtime codec lookup.\n if (classified.kind === 'dynamic' && (classified.prefix || classified.suffix)) {\n segments.add(`[${classified.name}]`);\n } else {\n segments.add(node.segmentName);\n }\n }\n }\n for (const child of node.children) {\n walkTree(child, segments);\n }\n for (const slot of Object.values(node.slots)) {\n walkTree(slot, segments);\n }\n}\n\n/**\n * Extract the param name from a bracket key.\n * '[id]' → 'id', '[...slug]' → 'slug', '[[...topic]]' → 'topic'\n */\nfunction extractParamName(bracketKey: string): string | null {\n const seg = classifyUrlSegment(bracketKey);\n if (seg.kind === 'static') return null;\n return seg.name;\n}\n\n/**\n * Validate schema keys against the filesystem route tree.\n *\n * Returns warnings for:\n * - Stale keys: schema keys that don't match any filesystem segment\n * - Bracket form mismatches: same param name, different bracket form\n * - Missing keys: filesystem segments not registered in schema (informational)\n */\nexport function validateSchemaAgainstRoutes(tree: RouteTree, appDir: string): SchemaWarning[] {\n const schemaPath = findSchemaFile(appDir);\n if (!schemaPath) return [];\n\n const content = readFileCached(schemaPath);\n const schemaKeys = parseExistingSchemaKeys(content);\n\n if (schemaKeys.length === 0) return [];\n\n const filesystemSegments = collectDynamicSegmentsFromTree(tree);\n\n return validateKeys(schemaKeys, filesystemSegments);\n}\n\n/**\n * Core validation: compare schema keys against filesystem segments.\n * Exported separately for testing without filesystem dependencies.\n */\nexport function validateKeys(\n schemaKeys: string[],\n filesystemSegments: Set<string>\n): SchemaWarning[] {\n const warnings: SchemaWarning[] = [];\n\n // Build a map of param name → bracket form for filesystem segments\n const fsParamToKey = new Map<string, string>();\n for (const fsKey of filesystemSegments) {\n const name = extractParamName(fsKey);\n if (name) {\n fsParamToKey.set(name, fsKey);\n }\n }\n\n // Build a set of schema param names for the missing-key check\n const schemaParamNames = new Set<string>();\n\n for (const schemaKey of schemaKeys) {\n const schemaParamName = extractParamName(schemaKey);\n if (!schemaParamName) continue;\n\n schemaParamNames.add(schemaParamName);\n\n if (filesystemSegments.has(schemaKey)) {\n // Exact match — no issue\n continue;\n }\n\n // Check if the param name exists but with a different bracket form\n const fsKey = fsParamToKey.get(schemaParamName);\n if (fsKey) {\n warnings.push({\n type: 'bracket-mismatch',\n key: schemaKey,\n filesystemKey: fsKey,\n message:\n `Schema key '${schemaKey}' does not match filesystem bracket form '${fsKey}'. ` +\n `Update the schema key to '${fsKey}'.`,\n });\n } else {\n warnings.push({\n type: 'stale-key',\n key: schemaKey,\n message:\n `Schema key '${schemaKey}' does not match any dynamic segment in the filesystem. ` +\n `Remove it from app/schema.ts or create the corresponding route segment.`,\n });\n }\n }\n\n // Check for filesystem segments not in schema (informational)\n for (const fsKey of filesystemSegments) {\n const name = extractParamName(fsKey);\n if (name && !schemaParamNames.has(name)) {\n warnings.push({\n type: 'missing-key',\n key: fsKey,\n message:\n `Dynamic segment '${fsKey}' has no codec in app/schema.ts (defaults to string). ` +\n `Run: timber schema sync`,\n });\n }\n }\n\n return warnings;\n}\n","/**\n * Shared route-tree walkers (TIM-848).\n *\n * Tiny helpers that walk a `SegmentNode<TFile>` tree generically. Both the\n * build-time tree (`SegmentNode<RouteFile>`) and the runtime manifest\n * tree (`SegmentNode<ManifestFile>`) flow through these helpers because\n * the walker only reads the structural fields shared by both shapes\n * (`children`, `slots`, `page`, `route`, `urlPath`).\n *\n * Before this module, three near-identical `collectRoutes` functions\n * lived in `plugins/dev-404-page.ts`, `plugins/build-report.ts`, and\n * `routing/codegen.ts`. The codegen one is special-purpose (it\n * accumulates `ParamEntry[]` and resolves codec chains) and stays\n * local; the other two now share `collectLeafRoutes` from this file.\n */\n\nimport type { SegmentNode } from './types.ts';\n\n/** A leaf route discovered while walking the segment tree. */\nexport interface LeafRoute<TFile> {\n /** URL path of the leaf (root is \"/\"). */\n urlPath: string;\n /** Segment chain from root to this leaf, inclusive. */\n segments: SegmentNode<TFile>[];\n /** The page file at this leaf, if any. */\n page?: TFile;\n /** The route handler file at this leaf, if any. */\n route?: TFile;\n}\n\n/** Options for `collectLeafRoutes`. */\nexport interface CollectLeafRoutesOptions {\n /**\n * If true, recurse into parallel slots and emit slot leaves alongside\n * the main route tree. Defaults to `false` because slots render\n * alongside their parent at the same URL and are not separately\n * URL-addressable. The build report excludes slots; route-listing\n * UIs that want to show \"all leaves with a page handler\" can opt in.\n */\n includeSlots?: boolean;\n}\n\n/**\n * Walk a segment tree and collect every leaf with a `page` or `route`\n * handler. Generic over `TFile` so it works on both the build-time\n * scanner output and the runtime manifest tree.\n *\n * - Pages and route handlers at the same URL produce two distinct\n * entries (the build report deduplicates by URL afterward).\n * - Parallel slots are skipped unless `includeSlots: true` (slots\n * share their parent's URL and are not addressable on their own).\n * - Intercepting subtrees are skipped unconditionally. They render only\n * on soft navigation and add no URL depth, so their computed `urlPath`s\n * are not addresses — listing them would advertise routes (`/[year]`)\n * that no request can reach. This matches every other consumer of the\n * tree that produces URLs: the sitemap generator, the static generator,\n * prerendering and the prebuilt-payload builder all skip them too.\n * - Result is sorted by `urlPath` for deterministic output.\n */\nexport function collectLeafRoutes<TFile>(\n root: SegmentNode<TFile>,\n options: CollectLeafRoutesOptions = {}\n): LeafRoute<TFile>[] {\n const { includeSlots = false } = options;\n const result: LeafRoute<TFile>[] = [];\n walk(root, [], result, includeSlots);\n result.sort((a, b) => a.urlPath.localeCompare(b.urlPath));\n return result;\n}\n\nfunction walk<TFile>(\n node: SegmentNode<TFile>,\n chain: SegmentNode<TFile>[],\n result: LeafRoute<TFile>[],\n includeSlots: boolean\n): void {\n if (node.segmentType === 'intercepting') return;\n\n const currentChain = [...chain, node];\n const path = node.urlPath || '/';\n\n if (node.page) {\n result.push({ urlPath: path, segments: currentChain, page: node.page });\n }\n if (node.route) {\n result.push({ urlPath: path, segments: currentChain, route: node.route });\n }\n\n for (const child of node.children) {\n walk(child, currentChain, result, includeSlots);\n }\n\n if (includeSlots) {\n for (const slotNode of Object.values(node.slots)) {\n walk(slotNode, currentChain, result, includeSlots);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAyBA,SAAgB,+BAA+B,MAA8B;CAC3E,MAAM,2BAAW,IAAI,IAAY;CACjC,SAAS,KAAK,MAAM,QAAQ;CAC5B,OAAO;AACT;AAEA,SAAS,SAAS,MAAmB,UAA6B;CAChE,IAAI,KAAK,aAAa,KAAK,aAAa;EACtC,MAAM,aAAa,mBAAmB,KAAK,WAAW;EACtD,IAAI,WAAW,SAAS,UAAU;GAGhC,IAAI,WAAW,SAAS,cAAc,WAAW,UAAU,WAAW,SACpE,SAAS,IAAI,IAAI,WAAW,KAAK,EAAE;QAEnC,SAAS,IAAI,KAAK,WAAW;EAEjC;CACF;CACA,KAAK,MAAM,SAAS,KAAK,UACvB,SAAS,OAAO,QAAQ;CAE1B,KAAK,MAAM,QAAQ,OAAO,OAAO,KAAK,KAAK,GACzC,SAAS,MAAM,QAAQ;AAE3B;;;;;AAMA,SAAS,iBAAiB,YAAmC;CAC3D,MAAM,MAAM,mBAAmB,UAAU;CACzC,IAAI,IAAI,SAAS,UAAU,OAAO;CAClC,OAAO,IAAI;AACb;;;;;;;;;AAUA,SAAgB,4BAA4B,MAAiB,QAAiC;CAC5F,MAAM,aAAa,eAAe,MAAM;CACxC,IAAI,CAA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EAAE,QAAQ,cAAc,EAAE,OAAO,CAAC;CACxD,OAAO;AACT;AAEA,SAAS,KACP,MACA,OACA,QACA,cACM;CACN,IAAI,KAAK,gBAAgB,gBAAgB;CAEzC,MAAM,eAAe,CAAC,GAAG,OAAO,IAAI;CACpC,MAAM,OAAO,KAAK,WAAW;CAE7B,IAAI,KAAK,MACP,OAAO,KAAK;EAAE,SAAS;EAAM,UAAU;EAAc,MAAM,KAAK;CAAK,CAAC;CAExE,IAAI,KAAK,OACP,OAAO,KAAK;EAAE,SAAS;EAAM,UAAU;EAAc,OAAO,KAAK;CAAM,CAAC;CAG1E,KAAK,MAAM,SAAS,KAAK,UACvB,KAAK,OAAO,cAAc,QAAQ,YAAY;CAGhD,IAAI,cACF,KAAK,MAAM,YAAY,OAAO,OAAO,KAAK,KAAK,GAC7C,KAAK,UAAU,cAAc,QAAQ,YAAY;AAGvD"}
@@ -1,4 +1,4 @@
1
- import { t as warnLossyJsonValue } from "../_chunks/json-lossy-check-DVkLUlfC.js";
1
+ import { t as warnLossyJsonValue } from "../_chunks/json-lossy-check-BNwKrm2R.js";
2
2
  import { c as getCloudflareBindings } from "../_chunks/cloudflare-_2fhxQE8.js";
3
3
  // src/adapters/cloudflare-kv-cache.ts
4
4
  var LEGACY_GRACE_MS = 2592e6;
@@ -1,8 +1,8 @@
1
1
  import { i as scanProjectSourceFiles, n as isScannableSourceFile, t as buildSourceExtensions } from "../_chunks/scan-CyizcBiX.js";
2
2
  import { s as isTimberPluginApi, u as resolveAppDir } from "../_chunks/plugin-context-FCkaNLUB.js";
3
- import { i as detectDirective, r as classifyModules } from "../_chunks/classify--_kINHQV.js";
4
- import { n as stitchImportChains } from "../_chunks/chains-Dgm3PrMe.js";
5
- import { n as importSignals, r as poisoningsFor, t as collectImportSpecifiers } from "../_chunks/poison-scan-DJYxZc_7.js";
3
+ import { i as detectDirective, r as classifyModules } from "../_chunks/classify-BuIifN5v.js";
4
+ import { n as stitchImportChains } from "../_chunks/chains-DaDEXv0c.js";
5
+ import { n as importSignals, r as poisoningsFor, t as collectImportSpecifiers } from "../_chunks/poison-scan-CqPGN0ru.js";
6
6
  import { normalizePath } from "vite";
7
7
  import { join, resolve } from "node:path";
8
8
  import { readFile, realpath, writeFile } from "node:fs/promises";
@@ -293,7 +293,7 @@ async function printSingleFile(input, target, module, answer, json) {
293
293
  console.log(` environments: ${envs.length > 0 ? envs.join(", ") : "none"}`);
294
294
  if (module.subtreeUnknown) console.log(" note: reachable, but its subtree is unknown (never transformed)");
295
295
  if (module.chains.length > 0) {
296
- const { formatChains } = await import("../_chunks/chains-CwOr3Myj.js");
296
+ const { formatChains } = await import("../_chunks/chains-BS8fQYao.js");
297
297
  console.log(" import chains:");
298
298
  console.log(formatChains(module.chains, root));
299
299
  }
@@ -312,7 +312,7 @@ async function printDevServerText(data, configDir) {
312
312
  console.log(` environments: ${envList.length > 0 ? envList.join(", ") : "none"}`);
313
313
  if (data.subtreeUnknown) console.log(" note: reachable, but its subtree is unknown (never transformed)");
314
314
  if (data.chains.length > 0) {
315
- const { formatChains } = await import("../_chunks/chains-CwOr3Myj.js");
315
+ const { formatChains } = await import("../_chunks/chains-BS8fQYao.js");
316
316
  console.log(" import chains:");
317
317
  console.log(formatChains(data.chains, configDir));
318
318
  }
@@ -1,4 +1,4 @@
1
1
  import { b as setCacheHandler, v as getCacheHandler } from "../_chunks/dev-store-BvdqtHvK.js";
2
- import { f as MemoryCacheHandler, h as setDefaultSingleflightTimeout, m as RedisCacheHandler, p as TagAwareCacheHandler, t as cache } from "../_chunks/cache-api-DsSXA4Sp.js";
3
- import { t as estimateByteSize } from "../_chunks/sizeof-DG4W40lv.js";
2
+ import { f as MemoryCacheHandler, h as setDefaultSingleflightTimeout, m as RedisCacheHandler, p as TagAwareCacheHandler, t as cache } from "../_chunks/cache-api-BjE-nNC0.js";
3
+ import { t as estimateByteSize } from "../_chunks/sizeof-DcEcQaSL.js";
4
4
  export { MemoryCacheHandler, RedisCacheHandler, TagAwareCacheHandler, cache, estimateByteSize, getCacheHandler, setCacheHandler, setDefaultSingleflightTimeout };
@@ -1,4 +1,4 @@
1
- import { t as estimateByteSize } from "../../_chunks/sizeof-DG4W40lv.js";
1
+ import { t as estimateByteSize } from "../../_chunks/sizeof-DcEcQaSL.js";
2
2
  // src/cache/stores/memory.ts
3
3
  var MemoryCacheStore = class {
4
4
  store = /* @__PURE__ */ new Map();
package/dist/cli.js CHANGED
@@ -99,7 +99,7 @@ async function runDev(options, _deps) {
99
99
  return;
100
100
  }
101
101
  const { fork } = await import("node:child_process");
102
- const { RESTART_EXIT_CODE } = await import("./_chunks/dev-server-hZzmbMvK.js");
102
+ const { RESTART_EXIT_CODE } = await import("./_chunks/dev-server-NnGosJ06.js");
103
103
  while (true) {
104
104
  const result = await new Promise((resolve) => {
105
105
  const child = fork(process.argv[1], process.argv.slice(2), {
@@ -179,7 +179,7 @@ async function runPreview(options, _deps) {
179
179
  * `--project` names the tsconfig handed to tsgo.
180
180
  */
181
181
  async function runCheck(options, _deps) {
182
- const { checkRoutes, runTypeCheck } = await import("./_chunks/cli-check-B33yhAPa.js");
182
+ const { checkRoutes, runTypeCheck } = await import("./_chunks/cli-check-B_fDvxhs.js");
183
183
  const { root } = await checkRoutes({ viteConfigFile: options.config }, _deps);
184
184
  await runTypeCheck({
185
185
  root,
@@ -195,7 +195,7 @@ async function runCheck(options, _deps) {
195
195
  async function runSchema(args) {
196
196
  const subcommand = args[0];
197
197
  if (subcommand !== "sync") throw new Error(`Unknown schema subcommand: ${subcommand ?? "(none)"}. Usage: timber schema sync`);
198
- const { runSchemaSync, defaultCodecForSegment } = await import("./_chunks/cli-schema-sync-uq72EZmD.js");
198
+ const { runSchemaSync, defaultCodecForSegment } = await import("./_chunks/cli-schema-sync-CUIk0G2X.js");
199
199
  const result = runSchemaSync(process.cwd());
200
200
  if (result.filesystemSegments.length === 0) {
201
201
  console.log("[timber] No dynamic segments found in app/.");
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- import { a as formatMissingPeers, i as checkPeerDependencies, n as timberDevServer, o as reportConfigErrors, s as validateConfig } from "./_chunks/dev-server-B7o4As0l.js";
1
+ import { a as formatMissingPeers, i as checkPeerDependencies, n as timberDevServer, o as reportConfigErrors, s as validateConfig } from "./_chunks/dev-server-BaM7q3pr.js";
2
2
  import { i as resolveRenderTimeoutMs } from "./_chunks/render-timeout-MrrqD1wd.js";
3
3
  import { t as writeFileAtomic } from "./_chunks/write-file-atomic-DW8m_Atv.js";
4
- import { d as collectInterceptionRewrites, l as getPrerenderExport, n as scanRoutes } from "./_chunks/scanner-CJC-ScJU.js";
5
- import { b as swallow } from "./_chunks/logger-CWk44DLp.js";
6
- import { c as buildDirToRouteMap, n as formatConventionWarnings, o as flushCodegenWrites, r as lintConventions, s as writeRouteCodegen, t as checkAppDirExists } from "./_chunks/convention-lint-hZwz5wd4.js";
4
+ import { d as collectInterceptionRewrites, l as getPrerenderExport, n as scanRoutes } from "./_chunks/scanner-C__vsQ8d.js";
5
+ import { b as swallow } from "./_chunks/logger-DRMij51J.js";
6
+ import { c as buildDirToRouteMap, n as formatConventionWarnings, o as flushCodegenWrites, r as lintConventions, s as writeRouteCodegen, t as checkAppDirExists } from "./_chunks/convention-lint-BHY0d5AQ.js";
7
7
  import { a as contextAdapter, c as loadTimberConfigFile, d as resolveBuildDir, f as resolveClientJavascript, l as mergeFileConfig, m as createNoopTimer, o as createPluginContext, r as adapterConfig, u as resolveAppDir } from "./_chunks/plugin-context-FCkaNLUB.js";
8
8
  import { i as withBasePath, n as normalizeBasePath, t as isRelativeBase } from "./_chunks/base-path-DDIx0FXe.js";
9
- import { r as validateSchemaAgainstRoutes, t as collectLeafRoutes } from "./_chunks/walkers-DIE203ir.js";
9
+ import { r as validateSchemaAgainstRoutes, t as collectLeafRoutes } from "./_chunks/walkers-D6KY4jyS.js";
10
10
  import { i as poisonPillSource, r as markerFor, t as EXPLICIT_MARKERS } from "./_chunks/poison-rules-Bmz-lCPi.js";
11
11
  import { n as rscPayloadPath, t as RSC_PAYLOAD_DIR } from "./_chunks/rsc-payload-path-EphpDB-J.js";
12
12
  import { a as REDIRECTS_FILE, n as detectFsIdentity, o as RESERVED_OUTPUT_PATHS, r as fsKey, t as EXACT_FS_IDENTITY } from "./_chunks/fs-identity-BmQ_Agg-.js";
13
13
  import { t as EMPTY_BUILD_MANIFEST } from "./_chunks/build-manifest-Y4jl7nwU.js";
14
14
  import { t as fnv1aHash } from "./_chunks/fast-hash-DddxkU5Y.js";
15
- import { i as detectDirective } from "./_chunks/classify--_kINHQV.js";
15
+ import { i as detectDirective } from "./_chunks/classify-BuIifN5v.js";
16
16
  import { t as formatSize } from "./_chunks/format-DuPOoXUP.js";
17
17
  import { createLogger, esmExternalRequirePlugin, isRunnableDevEnvironment, parseAst } from "vite";
18
18
  import { basename, dirname, extname, isAbsolute, join, normalize, relative, resolve, win32 } from "node:path";
@@ -10309,7 +10309,7 @@ function timber(config) {
10309
10309
  console: originalConsole
10310
10310
  });
10311
10311
  ctx.timer.start("client-deps-scan");
10312
- const { clientOptimizeDepsEntries, skipUseServerScanPlugin } = await import("./_chunks/client-dep-entries-CP7AkMCM.js");
10312
+ const { clientOptimizeDepsEntries, skipUseServerScanPlugin } = await import("./_chunks/client-dep-entries-COuyF8-c.js");
10313
10313
  const entries = await clientOptimizeDepsEntries(resolvedRoot, BROWSER_ENTRY_FILE, buildDir);
10314
10314
  ctx.timer.end("client-deps-scan");
10315
10315
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"convention-lint.d.ts","sourceRoot":"","sources":["../../src/routing/convention-lint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EAAa,SAAS,EAAe,MAAM,YAAY,CAAC;AAapE,MAAM,WAAW,iBAAiB;IAChC,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,OAAO,EAAE,MA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B,OAAO,GAAE,aAAkB,GAC1B,MAAM,CAkCR"}
@@ -1,5 +1,5 @@
1
1
  import { a as INTERCEPTION_MARKERS, i as DEFAULT_PAGE_EXTENSIONS, n as classifyUrlSegment, t as classifySegment } from "../_chunks/segment-classify-Ho8jXWeC.js";
2
- import { d as collectInterceptionRewrites, n as scanRoutes } from "../_chunks/scanner-CJC-ScJU.js";
2
+ import { d as collectInterceptionRewrites, n as scanRoutes } from "../_chunks/scanner-C__vsQ8d.js";
3
3
  import { t as generateRouteMap } from "../_chunks/codegen-B9oWkWGf.js";
4
- import { n as collectDynamicSegmentsFromTree, r as validateSchemaAgainstRoutes, t as collectLeafRoutes } from "../_chunks/walkers-DIE203ir.js";
4
+ import { n as collectDynamicSegmentsFromTree, r as validateSchemaAgainstRoutes, t as collectLeafRoutes } from "../_chunks/walkers-D6KY4jyS.js";
5
5
  export { DEFAULT_PAGE_EXTENSIONS, INTERCEPTION_MARKERS, classifySegment, classifyUrlSegment, collectDynamicSegmentsFromTree, collectInterceptionRewrites, collectLeafRoutes, generateRouteMap, scanRoutes, validateSchemaAgainstRoutes };
@@ -1 +1 @@
1
- {"version":3,"file":"action-handler.d.ts","sourceRoot":"","sources":["../../src/server/action-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAeH,OAAO,EAAuC,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAEjF,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAKtE,OAAO,EAAwC,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAE/F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAYvD,4CAA4C;AAC5C,MAAM,WAAW,oBAAoB;IACnC,0BAA0B;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,kEAAkE;IAClE,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,gDAAgD;IAChD,UAAU,CAAC,EAAE,gBAAgB,CA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,EAAE,gBAAgB,CAAC;CAC/B;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAarD;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,MAAM,iBAAiB,GACzB;IACE,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,EAAE,cAAc,GAAG,SAAS,CAAC;IACtC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B,CAAC;AAON;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,QAAQ,GAAG,iBAAiB,GAAG,IAAI,CAAC,CA4F9C"}
@@ -61,7 +61,7 @@ export type CsrfResult = {
61
61
  * origin derived from the scheme and `Host`.
62
62
  * 4. Neither header → allow: not a browser, so no ambient cookies to abuse.
63
63
  *
64
- * Safe methods (GET, HEAD, OPTIONS) and `csrf: false` always pass.
64
+ * Safe methods (GET, HEAD, OPTIONS, QUERY) and `csrf: false` always pass.
65
65
  */
66
66
  export declare function validateCsrf(req: Request, config: CsrfConfig): CsrfResult;
67
67
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"csrf.d.ts","sourceRoot":"","sources":["../../src/server/csrf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAOH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,wDAAwD;I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EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,MAAM,UAAU,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG,aAAa,CAAC;AAgDtD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,GAAG,UAAU,CAsDzE;AA+ED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,GAAG,QAAQ,CAatF"}
@@ -1,6 +1,6 @@
1
- import { C as addSpanEvent, D as getSpanId, I as isDenySignal, L as isRedirectSignal, M as withSpan, O as getTraceId, S as isDevMode, x as isDebug } from "../_chunks/logger-CWk44DLp.js";
1
+ import { C as addSpanEvent, D as getSpanId, I as isDenySignal, L as isRedirectSignal, M as withSpan, O as getTraceId, S as isDevMode, x as isDebug } from "../_chunks/logger-DRMij51J.js";
2
2
  import { t as formatSize } from "../_chunks/format-DuPOoXUP.js";
3
- import { _ as getHeaders, a as parseFormData, c as deny, d as waitUntil, i as coerce, l as redirect, n as revalidatePath, p as getCookieJar, r as revalidateTag, u as redirectExternal, y as getSegmentParams } from "../_chunks/actions-B1xSIv32.js";
3
+ import { _ as getHeaders, a as parseFormData, c as deny, d as waitUntil, i as coerce, l as redirect, n as revalidatePath, p as getCookieJar, r as revalidateTag, u as redirectExternal, y as getSegmentParams } from "../_chunks/actions-DprvPi7O.js";
4
4
  // src/shared/redirect-type.ts
5
5
  /**
6
6
  * Next.js redirect type discriminator.
@@ -36,7 +36,8 @@ export type { TimberLogger } from './logger.ts';
36
36
  export { loadInstrumentation, callOnRequestError, hasOnRequestError } from './instrumentation.ts';
37
37
  export type { InstrumentationOnRequestError, InstrumentationRequestInfo, InstrumentationErrorContext, } from './instrumentation.ts';
38
38
  export { handleRouteRequest, resolveAllowedMethods } from './route-handler.ts';
39
- export type { RouteModule, RouteHandler, HttpMethod } from './route-handler.ts';
39
+ export type { RouteModule, RouteHandler } from './route-handler.ts';
40
+ export type { HttpMethod } from './route-methods.ts';
40
41
  export { RenderTimeoutError } from './render-timeout.ts';
41
42
  export type { RenderTimeout } from './render-timeout.ts';
42
43
  export { __prebuilt, getPrebuiltRegistration, getPrebuiltRegistry } from './prebuilt-runtime.ts';
@@ -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,MAAM,iBAAiB,CAAC;AAG7D,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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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,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACpE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjG,YAAY,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAClG,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { c as drainWithDeadline, d as isAbortError, f as releaseReason, i as withResponseInit, n as discardResponseBody, o as concatBytes, p as onAbortUntil, r as nodeBodyOps, u as wrapResponseWithStreamTiming } from "../_chunks/node-response-B9aviPDa.js";
1
+ import { c as drainWithDeadline, d as isAbortError, f as releaseReason, i as withResponseInit, n as discardResponseBody, o as concatBytes, p as onAbortUntil, r as nodeBodyOps, u as wrapResponseWithStreamTiming } from "../_chunks/node-response-C-dQn-0N.js";
2
2
  import { i as resolveRenderTimeoutMs, r as RenderTimeoutError, t as DEFAULT_RENDER_TIMEOUT_MS } from "../_chunks/render-timeout-MrrqD1wd.js";
3
3
  import { n as isRscContentType, r as isRscRequest } from "../_chunks/rsc-media-type-m8jz9u6_.js";
4
4
  import { i as getMetadataRouteServePath, n as classifyMetadataRoute, r as getMetadataRouteAutoLink, t as METADATA_ROUTE_CONVENTIONS } from "../_chunks/metadata-routes-BL26HCDd.js";
@@ -7,11 +7,12 @@ import { _ as wasInvalidatedSince, a as devEntryKey, c as getDevSeed, d as isDev
7
7
  import { n as classifyUrlSegment, r as effectiveUrlSegment } from "../_chunks/segment-classify-Ho8jXWeC.js";
8
8
  import { t as computeSegmentTreePaths } from "../_chunks/segment-keys-Y60KNc8C.js";
9
9
  import { i as requestContextAls, n as prebuiltCaptureAls, o as timingAls, t as earlyHintsSenderAls } from "../_chunks/als-registry-DpygwCp0.js";
10
- import { A as runWithTraceId, E as getOtelTraceId, F as isControlFlowSignal, I as isDenySignal, L as isRedirectSignal, M as withSpan, O as getTraceId, T as generateTraceId, _ as logWaitUntilRejected, b as swallow, c as logMiddlewareShortCircuit, d as logRequestCompleted, f as logRequestReceived, g as logSwrRefetchFailed, h as logSlowRequest, i as logCsrfRejected, j as setSpanAttribute, k as replaceTraceId, l as logProxyError, m as logRouteSetupError, n as logCacheMiss, p as logRouteError, s as logMiddlewareError, t as getLogger, u as logRenderError, v as logWaitUntilUnsupported, x as isDebug, y as setLogger } from "../_chunks/logger-CWk44DLp.js";
10
+ import { A as runWithTraceId, E as getOtelTraceId, F as isControlFlowSignal, I as isDenySignal, L as isRedirectSignal, M as withSpan, O as getTraceId, T as generateTraceId, _ as logWaitUntilRejected, b as swallow, c as logMiddlewareShortCircuit, d as logRequestCompleted, f as logRequestReceived, g as logSwrRefetchFailed, h as logSlowRequest, i as logCsrfRejected, j as setSpanAttribute, k as replaceTraceId, l as logProxyError, m as logRouteSetupError, n as logCacheMiss, p as logRouteError, s as logMiddlewareError, t as getLogger, u as logRenderError, v as logWaitUntilUnsupported, x as isDebug, y as setLogger } from "../_chunks/logger-DRMij51J.js";
11
+ import { n as isHttpMethod, t as HTTP_METHODS } from "../_chunks/route-methods-Dk2kZc0n.js";
11
12
  import { i as collectRouteModulepreloads, n as collectRouteCss, r as collectRouteFonts } from "../_chunks/build-manifest-Y4jl7nwU.js";
12
13
  import { i as isRscCacheKeyShape, n as RSC_KEY_PARAM, r as appVisibleSearch, s as rscCacheKey, t as RSC_KEY_HEADERS } from "../_chunks/rsc-cache-key-D0cb0Gmc.js";
13
- import { C as setMatchedSegmentPath, E as runOutsideReactCacheScope, S as runWithSegmentParams, T as setSegmentParams, b as markResponseFlushed, f as getCookie, g as getHeader, h as applyRequestHeaderOverlay, i as coerce, m as getSetCookieHeaders, o as DenySignal, s as RedirectSignal, t as executeAction, v as getSearchParams, w as setMutableCookieContext, x as runWithRequestContext, y as getSegmentParams } from "../_chunks/actions-B1xSIv32.js";
14
- import { _ as getWaitUntil, a as storeOverlayEntry, c as lookupArtifactSeed, d as checkVersionSkew, g as observeKeyDiscipline, i as overlayKey, l as setPrebuiltPayloadSource, n as lookupOverlay, o as hasPrebuiltPayloadSource, r as mayStoreRerender, s as isParamIndependent, u as applyReloadHeaders } from "../_chunks/cache-api-DsSXA4Sp.js";
14
+ import { C as setMatchedSegmentPath, E as runOutsideReactCacheScope, S as runWithSegmentParams, T as setSegmentParams, b as markResponseFlushed, f as getCookie, g as getHeader, h as applyRequestHeaderOverlay, i as coerce, m as getSetCookieHeaders, o as DenySignal, s as RedirectSignal, t as executeAction, v as getSearchParams, w as setMutableCookieContext, x as runWithRequestContext, y as getSegmentParams } from "../_chunks/actions-DprvPi7O.js";
15
+ import { _ as getWaitUntil, a as storeOverlayEntry, c as lookupArtifactSeed, d as checkVersionSkew, g as observeKeyDiscipline, i as overlayKey, l as setPrebuiltPayloadSource, n as lookupOverlay, o as hasPrebuiltPayloadSource, r as mayStoreRerender, s as isParamIndependent, u as applyReloadHeaders } from "../_chunks/cache-api-BjE-nNC0.js";
15
16
  import { n as createSingleflight } from "../_chunks/singleflight-CzoOVB9Y.js";
16
17
  import { l as TIMBER_ERROR_HEADER, t as StatusPageMarker } from "../_chunks/status-page-marker-C8POawuF.js";
17
18
  import { n as toBracketKey } from "../_chunks/resolve-schema-B-aCuTu3.js";
@@ -300,11 +301,20 @@ var CSRF_REJECT_VALUE = "csrf";
300
301
  * See design/08-forms-and-actions.md §"CSRF Protection"
301
302
  * See design/13-security.md §"Security Testing Checklist" #6
302
303
  */
303
- /** HTTP methods that are considered safe (no mutation). */
304
+ /**
305
+ * HTTP methods that are considered safe (no mutation). `QUERY` (RFC 10008)
306
+ * is safe by definition, is not a CORS-safelisted method, so a cross-origin
307
+ * browser `QUERY` is preflighted, and HTML forms cannot send it: a cross-site
308
+ * page cannot make a browser send one with the user's cookies unless the
309
+ * app's own CORS policy allows it. A handler
310
+ * that mutates on `QUERY` breaks the method's contract, as one that mutates
311
+ * on `GET` does.
312
+ */
304
313
  var SAFE_METHODS = /* @__PURE__ */ new Set([
305
314
  "GET",
306
315
  "HEAD",
307
- "OPTIONS"
316
+ "OPTIONS",
317
+ "QUERY"
308
318
  ]);
309
319
  /**
310
320
  * `Sec-Fetch-Site` values that mean the browser itself vouches for the
@@ -346,7 +356,7 @@ function deriveRequestScheme(req) {
346
356
  * origin derived from the scheme and `Host`.
347
357
  * 4. Neither header → allow: not a browser, so no ambient cookies to abuse.
348
358
  *
349
- * Safe methods (GET, HEAD, OPTIONS) and `csrf: false` always pass.
359
+ * Safe methods (GET, HEAD, OPTIONS, QUERY) and `csrf: false` always pass.
350
360
  */
351
361
  function validateCsrf(req, config) {
352
362
  if (SAFE_METHODS.has(req.method)) return { ok: true };
@@ -1342,16 +1352,6 @@ function stripHeadBody(response, method) {
1342
1352
  });
1343
1353
  }
1344
1354
  // src/server/route-handler.ts
1345
- /** All recognized HTTP method export names. */
1346
- var HTTP_METHODS = [
1347
- "GET",
1348
- "POST",
1349
- "PUT",
1350
- "PATCH",
1351
- "DELETE",
1352
- "HEAD",
1353
- "OPTIONS"
1354
- ];
1355
1355
  /**
1356
1356
  * Resolve the full list of allowed methods for a route module.
1357
1357
  *
@@ -1366,10 +1366,8 @@ function resolveAllowedMethods(mod) {
1366
1366
  if (method === "HEAD" || method === "OPTIONS") continue;
1367
1367
  if (mod[method]) methods.push(method);
1368
1368
  }
1369
- if (mod.GET && !mod.HEAD) methods.push("HEAD");
1370
- else if (mod.HEAD) methods.push("HEAD");
1371
- if (!mod.OPTIONS) methods.push("OPTIONS");
1372
- else methods.push("OPTIONS");
1369
+ if (mod.GET || mod.HEAD) methods.push("HEAD");
1370
+ methods.push("OPTIONS");
1373
1371
  return methods;
1374
1372
  }
1375
1373
  /**
@@ -1379,7 +1377,7 @@ function resolveAllowedMethods(mod) {
1379
1377
  * and merges response headers from ctx.headers.
1380
1378
  */
1381
1379
  async function handleRouteRequest(mod, ctx) {
1382
- const method = ctx.req.method.toUpperCase();
1380
+ const method = ctx.req.method;
1383
1381
  const allowHeader = resolveAllowedMethods(mod).join(", ");
1384
1382
  if (method === "OPTIONS") {
1385
1383
  if (mod.OPTIONS) return runHandler(mod.OPTIONS, ctx);
@@ -1392,7 +1390,7 @@ async function handleRouteRequest(mod, ctx) {
1392
1390
  if (mod.HEAD) return stripHeadBody(await runHandler(mod.HEAD, ctx), method);
1393
1391
  if (mod.GET) return stripHeadBody(await runHandler(mod.GET, ctx), method);
1394
1392
  }
1395
- const handler = mod[method];
1393
+ const handler = isHttpMethod(method) ? mod[method] : void 0;
1396
1394
  if (!handler) return mergeResponseHeaders(new Response(null, {
1397
1395
  status: 405,
1398
1396
  headers: { Allow: allowHeader }
@@ -4457,7 +4455,7 @@ function noteWrapperRender(innerId, options, props) {
4457
4455
  }
4458
4456
  }
4459
4457
  // src/server/flight-source.ts
4460
- var nodeFlight = typeof process !== "undefined" && process.release?.name === "node" && !(typeof navigator !== "undefined" && navigator.userAgent === "Cloudflare-Workers") ? await import("../_chunks/flight-source-node-0Tp6evlz.js") : null;
4458
+ var nodeFlight = typeof process !== "undefined" && process.release?.name === "node" && !(typeof navigator !== "undefined" && navigator.userAgent === "Cloudflare-Workers") ? await import("../_chunks/flight-source-node-CZJ9Drb7.js") : null;
4461
4459
  /** The Node helpers, which a `kind: 'node'` source can only exist alongside. */
4462
4460
  function requireNodeFlight() {
4463
4461
  if (!nodeFlight) throw new Error("[timber] a Node Flight source reached a runtime without node:stream");