@timber-js/app 0.2.0-alpha.200 → 0.2.0-alpha.201

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 (135) hide show
  1. package/bin/timber.mjs +15 -1
  2. package/dist/_chunks/{actions-d1hCqnU3.js → actions-HUdJADAD.js} +3 -3
  3. package/dist/_chunks/{actions-d1hCqnU3.js.map → actions-HUdJADAD.js.map} +1 -1
  4. package/dist/_chunks/{build-manifest-DTmSGLRz.js → build-manifest-DWppEdLB.js} +2 -51
  5. package/dist/_chunks/build-manifest-DWppEdLB.js.map +1 -0
  6. package/dist/_chunks/{cache-api-ByagcC-J.js → cache-api-CAPbZTga.js} +2 -2
  7. package/dist/_chunks/{cache-api-ByagcC-J.js.map → cache-api-CAPbZTga.js.map} +1 -1
  8. package/dist/_chunks/{chains-Bpb0W4ax.js → chains-CBNA0Ozj.js} +3 -3
  9. package/dist/_chunks/{chains-Bpb0W4ax.js.map → chains-CBNA0Ozj.js.map} +1 -1
  10. package/dist/_chunks/{cli-check-D6VolrDV.js → cli-check-BzMGuIH6.js} +3 -3
  11. package/dist/_chunks/{cli-check-D6VolrDV.js.map → cli-check-BzMGuIH6.js.map} +1 -1
  12. package/dist/_chunks/{cli-schema-sync-D6rO-VcS.js → cli-schema-sync-DnXqcIIj.js} +2 -2
  13. package/dist/_chunks/{cli-schema-sync-D6rO-VcS.js.map → cli-schema-sync-DnXqcIIj.js.map} +1 -1
  14. package/dist/_chunks/{cloudflare-BFb__LYG.js → cloudflare-DxX1SU0g.js} +3 -3
  15. package/dist/_chunks/{cloudflare-BFb__LYG.js.map → cloudflare-DxX1SU0g.js.map} +1 -1
  16. package/dist/_chunks/{convention-lint-fRkwVwEH.js → convention-lint-DHOFvX5s.js} +5 -95
  17. package/dist/_chunks/convention-lint-DHOFvX5s.js.map +1 -0
  18. package/dist/_chunks/csp-nonce-hOGniaG4.js +227 -0
  19. package/dist/_chunks/csp-nonce-hOGniaG4.js.map +1 -0
  20. package/dist/_chunks/dev-server-DioP7tkQ.js +2288 -0
  21. package/dist/_chunks/dev-server-DioP7tkQ.js.map +1 -0
  22. package/dist/_chunks/{error-boundary-BfPHZjm0.js → error-boundary-BQKxl6EX.js} +11 -17
  23. package/dist/_chunks/{error-boundary-BfPHZjm0.js.map → error-boundary-BQKxl6EX.js.map} +1 -1
  24. package/dist/_chunks/{graph-cache-CP4GEmf9.js → graph-cache-Cv3njEH8.js} +2 -2
  25. package/dist/_chunks/{graph-cache-CP4GEmf9.js.map → graph-cache-Cv3njEH8.js.map} +1 -1
  26. package/dist/_chunks/{live-graph-D_2D32Ad.js → live-graph-VjHFF5EV.js} +3 -3
  27. package/dist/_chunks/{live-graph-D_2D32Ad.js.map → live-graph-VjHFF5EV.js.map} +1 -1
  28. package/dist/_chunks/{logger-uLBuGKDI.js → logger-DqJ2VoAY.js} +450 -458
  29. package/dist/_chunks/logger-DqJ2VoAY.js.map +1 -0
  30. package/dist/_chunks/{segment-keys-lqtdookO.js → metadata-routes-DSDjM_hJ.js} +2 -61
  31. package/dist/_chunks/metadata-routes-DSDjM_hJ.js.map +1 -0
  32. package/dist/_chunks/{poison-scan-Bm9Yyqk9.js → poison-scan-lEbz4pQE.js} +2 -2
  33. package/dist/_chunks/{poison-scan-Bm9Yyqk9.js.map → poison-scan-lEbz4pQE.js.map} +1 -1
  34. package/dist/_chunks/{scanner-AiazgH_f.js → scanner-B_tnqFcF.js} +37 -137
  35. package/dist/_chunks/scanner-B_tnqFcF.js.map +1 -0
  36. package/dist/_chunks/segment-keys-D5hu1hz4.js +62 -0
  37. package/dist/_chunks/segment-keys-D5hu1hz4.js.map +1 -0
  38. package/dist/_chunks/tree-match-CdbvYTBz.js +122 -0
  39. package/dist/_chunks/tree-match-CdbvYTBz.js.map +1 -0
  40. package/dist/_chunks/{walkers-B6XUtmqK.js → walkers-Cm3PC5JT.js} +2 -2
  41. package/dist/_chunks/{walkers-B6XUtmqK.js.map → walkers-Cm3PC5JT.js.map} +1 -1
  42. package/dist/adapters/cloudflare-dev.js +1 -1
  43. package/dist/adapters/cloudflare-kv-cache.js +1 -1
  44. package/dist/adapters/cloudflare.js +1 -1
  45. package/dist/analyze/crawl-entry.js +2 -2
  46. package/dist/analyze/graph-command.js +3 -3
  47. package/dist/cache/index.js +1 -1
  48. package/dist/cli.d.ts +7 -2
  49. package/dist/cli.d.ts.map +1 -1
  50. package/dist/cli.js +44 -7
  51. package/dist/cli.js.map +1 -1
  52. package/dist/client/browser-entry/action-dispatch.d.ts.map +1 -1
  53. package/dist/client/browser-entry/action-queue.d.ts +20 -1
  54. package/dist/client/browser-entry/action-queue.d.ts.map +1 -1
  55. package/dist/client/browser-entry/rsc-stream.d.ts.map +1 -1
  56. package/dist/client/error-boundary.d.ts +3 -15
  57. package/dist/client/error-boundary.d.ts.map +1 -1
  58. package/dist/client/error-boundary.js +1 -1
  59. package/dist/client/error-reconstituter.d.ts +4 -4
  60. package/dist/client/error-reconstituter.d.ts.map +1 -1
  61. package/dist/client/internal.js +1 -1
  62. package/dist/dev-tools/debug-channel.d.ts +55 -0
  63. package/dist/dev-tools/debug-channel.d.ts.map +1 -0
  64. package/dist/index.d.ts.map +1 -1
  65. package/dist/index.js +17 -2119
  66. package/dist/index.js.map +1 -1
  67. package/dist/plugins/dev-server.d.ts +7 -0
  68. package/dist/plugins/dev-server.d.ts.map +1 -1
  69. package/dist/plugins/mdx.d.ts.map +1 -1
  70. package/dist/routing/convention-lint.d.ts.map +1 -1
  71. package/dist/routing/index.js +2 -2
  72. package/dist/routing/scanner.d.ts +4 -4
  73. package/dist/routing/scanner.d.ts.map +1 -1
  74. package/dist/server/access-gate.d.ts +2 -2
  75. package/dist/server/deny-boundary.d.ts +3 -5
  76. package/dist/server/deny-boundary.d.ts.map +1 -1
  77. package/dist/server/deny-renderer.d.ts +0 -1
  78. package/dist/server/deny-renderer.d.ts.map +1 -1
  79. package/dist/server/error-boundary-wrapper.d.ts +5 -12
  80. package/dist/server/error-boundary-wrapper.d.ts.map +1 -1
  81. package/dist/server/index.js +2 -2
  82. package/dist/server/internal.js +20 -195
  83. package/dist/server/internal.js.map +1 -1
  84. package/dist/server/pipeline.d.ts +8 -0
  85. package/dist/server/pipeline.d.ts.map +1 -1
  86. package/dist/server/primitives.d.ts +15 -13
  87. package/dist/server/primitives.d.ts.map +1 -1
  88. package/dist/server/rsc-entry/error-renderer.d.ts +3 -7
  89. package/dist/server/rsc-entry/error-renderer.d.ts.map +1 -1
  90. package/dist/server/rsc-entry/helpers.d.ts +6 -27
  91. package/dist/server/rsc-entry/helpers.d.ts.map +1 -1
  92. package/dist/server/rsc-entry/index.d.ts.map +1 -1
  93. package/dist/server/rsc-entry/render-route.d.ts +1 -0
  94. package/dist/server/rsc-entry/render-route.d.ts.map +1 -1
  95. package/dist/server/rsc-entry/rsc-stream.d.ts +4 -1
  96. package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
  97. package/dist/server/rsc-entry/ssr-renderer.d.ts +1 -0
  98. package/dist/server/rsc-entry/ssr-renderer.d.ts.map +1 -1
  99. package/docs/api/30-api-server.mdx +5 -5
  100. package/docs/api/34-api-config.mdx +2 -2
  101. package/docs/api/36-cli.mdx +1 -1
  102. package/docs/learn/12-error-handling.mdx +7 -8
  103. package/package.json +1 -2
  104. package/src/cli.ts +62 -8
  105. package/src/client/browser-entry/action-dispatch.ts +12 -0
  106. package/src/client/browser-entry/action-queue.ts +70 -8
  107. package/src/client/browser-entry/rsc-stream.ts +78 -22
  108. package/src/client/error-boundary.tsx +13 -39
  109. package/src/client/error-reconstituter.tsx +5 -5
  110. package/src/dev-tools/debug-channel.ts +151 -0
  111. package/src/index.ts +8 -12
  112. package/src/plugins/dev-server.ts +58 -7
  113. package/src/plugins/mdx.ts +2 -1
  114. package/src/routing/convention-lint.ts +4 -111
  115. package/src/routing/scanner.ts +33 -22
  116. package/src/server/access-gate.tsx +3 -3
  117. package/src/server/deny-boundary.ts +5 -23
  118. package/src/server/deny-renderer.ts +4 -7
  119. package/src/server/error-boundary-wrapper.ts +11 -35
  120. package/src/server/pipeline.ts +9 -0
  121. package/src/server/primitives.ts +20 -26
  122. package/src/server/rsc-entry/error-renderer.ts +15 -43
  123. package/src/server/rsc-entry/helpers.ts +10 -67
  124. package/src/server/rsc-entry/index.ts +1 -0
  125. package/src/server/rsc-entry/render-route.ts +12 -1
  126. package/src/server/rsc-entry/rsc-stream.ts +27 -24
  127. package/src/server/rsc-entry/ssr-renderer.ts +7 -1
  128. package/dist/_chunks/build-manifest-DTmSGLRz.js.map +0 -1
  129. package/dist/_chunks/convention-lint-fRkwVwEH.js.map +0 -1
  130. package/dist/_chunks/logger-uLBuGKDI.js.map +0 -1
  131. package/dist/_chunks/scanner-AiazgH_f.js.map +0 -1
  132. package/dist/_chunks/segment-keys-lqtdookO.js.map +0 -1
  133. package/dist/server/utils/mdx-file.d.ts +0 -17
  134. package/dist/server/utils/mdx-file.d.ts.map +0 -1
  135. package/src/server/utils/mdx-file.ts +0 -22
@@ -12,6 +12,22 @@
12
12
  */
13
13
  export interface ActionQueueDeps {
14
14
  refreshWhenIdle: () => void;
15
+ /**
16
+ * Called once when an action's holds exceed `holdTimeoutMs`. The chain
17
+ * releases regardless; this is the recovery hook. It must not wait on
18
+ * the same thing the hold is stuck on — in dispatch the hold IS the
19
+ * router's own refresh/commit, so a deferred `refreshWhenIdle` would
20
+ * park forever. Dispatch forces a fresh `router.refresh()` instead,
21
+ * which supersedes the stuck owner (TIM-1485).
22
+ */
23
+ recoverStalledHold: () => void;
24
+ /**
25
+ * Maximum time (ms) the queue stays blocked on held promises after an
26
+ * action's result has been returned. A hung hold (e.g. a refresh commit
27
+ * awaiting a stalled flight stream) would otherwise brick the chain for
28
+ * the life of the page. `0` disables the guard. Default: 30s.
29
+ */
30
+ holdTimeoutMs?: number;
15
31
  }
16
32
  /**
17
33
  * Passed into `work` so it can return a result to React immediately
@@ -36,7 +52,10 @@ export interface ActionQueue {
36
52
  run: <T>(work: (q: ActionQueueRun) => Promise<T>) => Promise<T>;
37
53
  /**
38
54
  * Mark that a discarded action would have revalidated. When the queue
39
- * drains, one refresh fires via `deps.refreshWhenIdle`.
55
+ * drains, one refresh fires via `deps.refreshWhenIdle`. If the queue is
56
+ * already idle — a hold settling after its timeout released the chain —
57
+ * the refresh fires immediately rather than waiting for a future
58
+ * action's drain (TIM-1485).
40
59
  */
41
60
  markNeedsRefresh: () => void;
42
61
  }
@@ -1 +1 @@
1
- {"version":3,"file":"action-queue.d.ts","sourceRoot":"","sources":["../../../src/client/browser-entry/action-queue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAID;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;OAUG;IACH,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAChE;;;OAGG;IACH,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,eAAe,GAAG,WAAW,CAyCpE"}
1
+ {"version":3,"file":"action-queue.d.ts","sourceRoot":"","sources":["../../../src/client/browser-entry/action-queue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B;;;;;;;OAOG;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAgCD;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;OAUG;IACH,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAChE;;;;;;OAMG;IACH,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,eAAe,GAAG,WAAW,CAwDpE"}
@@ -1 +1 @@
1
- {"version":3,"file":"rsc-stream.d.ts","sourceRoot":"","sources":["../../../src/client/browser-entry/rsc-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAItF,MAAM,WAAW,eAAe;IAC9B,gFAAgF;IAChF,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CAClC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,eAAe,GAAG,IAAI,CAgI/D"}
1
+ {"version":3,"file":"rsc-stream.d.ts","sourceRoot":"","sources":["../../../src/client/browser-entry/rsc-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAItF,MAAM,WAAW,eAAe;IAC9B,gFAAgF;IAChF,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CAClC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,eAAe,GAAG,IAAI,CA+G/D"}
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Catches errors thrown by children and renders a fallback component
5
5
  * with the appropriate props based on error type:
6
- * - DenySignal (4xx) → { status, dangerouslyPassData }
6
+ * - DenySignal (4xx) → { status, data }
7
7
  * - RenderError (5xx) → { error, digest, reset }
8
8
  * - Unhandled error → { error, digest: null, reset }
9
9
  *
@@ -28,15 +28,6 @@ export { DenyAncestryContext };
28
28
  export interface TimberErrorBoundaryProps {
29
29
  /** The component to render when an error is caught. */
30
30
  fallbackComponent?: (...args: unknown[]) => ReactNode;
31
- /**
32
- * Pre-rendered fallback element. Used for MDX status files which are server
33
- * components and cannot be passed as function props across the RSC→client
34
- * boundary. When set, rendered directly instead of calling fallbackComponent.
35
- *
36
- * See design/10-error-handling.md §"Status-Code File Variants" — MDX status
37
- * files are server components by default (zero client JS).
38
- */
39
- fallbackElement?: ReactNode;
40
31
  /**
41
32
  * Status code filter. If set, only catches errors matching this status.
42
33
  * 400 = any 4xx, 500 = any 5xx, specific number = exact match.
@@ -88,12 +79,9 @@ export declare class TimberErrorBoundary extends Component<TimberErrorBoundaryPr
88
79
  /**
89
80
  * The status page this boundary shows for a row it claimed. Its shape is
90
81
  * the file's documented contract: TSX status files get `{ status,
91
- * dangerouslyPassData }`, `error.tsx` gets `{ error, digest, reset }` (plus
82
+ * data }`, `error.tsx` gets `{ error, digest, reset }` (plus
92
83
  * the deny extras for dual-shape implementations — without the error prop,
93
- * an error.tsx reading error.message crashes on deny fall-through, TIM-1081),
94
- * and an MDX status file is the element pre-rendered for it at tree-build
95
- * time, since a server component cannot cross the RSC→client boundary as a
96
- * function prop.
84
+ * an error.tsx reading error.message crashes on deny fall-through, TIM-1081).
97
85
  */
98
86
  private renderFallback;
99
87
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../src/client/error-boundary.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,SAAS,EAA4C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAc5F;;;;;;GAMG;AACH,QAAA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AS,CA6JlB;IAED;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;IA4BtB;;;;;;;OAOG;IACH,OAAO,CAAC,cAAc;CAIvB"}
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use client";
3
- import { n as TimberErrorBoundary, t as DenyAncestryContext } from "../_chunks/error-boundary-BfPHZjm0.js";
3
+ import { n as TimberErrorBoundary, t as DenyAncestryContext } from "../_chunks/error-boundary-BQKxl6EX.js";
4
4
  export { DenyAncestryContext, TimberErrorBoundary };
@@ -28,7 +28,7 @@ export interface SerializableError {
28
28
  * - digest: plain JSON or null
29
29
  * - reset: undefined (only meaningful on client after boundary catch)
30
30
  * - component: client module reference (RSC Flight serializes as opaque ref)
31
- * - status / dangerouslyPassData: set only when error.tsx serves a deny()
31
+ * - status / data: set only when error.tsx serves a deny()
32
32
  * as the last entry in the 4xx fallback chain — forwarded so dual-shape
33
33
  * error.tsx implementations can branch on the deny status (TIM-1081)
34
34
  */
@@ -47,15 +47,15 @@ interface ErrorReconstituterProps {
47
47
  } | null;
48
48
  reset: (() => void) | undefined;
49
49
  status?: number;
50
- dangerouslyPassData?: unknown;
50
+ data?: unknown;
51
51
  }>;
52
52
  status?: number;
53
- dangerouslyPassData?: unknown;
53
+ data?: unknown;
54
54
  }
55
55
  /**
56
56
  * Reconstitute a SerializableError into a real Error instance and render
57
57
  * the user's error component with the proper props.
58
58
  */
59
- export declare function ErrorReconstituter({ error: serialized, digest, reset, component, status, dangerouslyPassData, }: ErrorReconstituterProps): ReactNode;
59
+ export declare function ErrorReconstituter({ error: serialized, digest, reset, component, status, data, }: ErrorReconstituterProps): ReactNode;
60
60
  export {};
61
61
  //# sourceMappingURL=error-reconstituter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-reconstituter.d.ts","sourceRoot":"","sources":["../../src/client/error-reconstituter.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAiB,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAE1E;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;GAUG;AACH,UAAU,uBAAuB;IAC/B,KAAK,EAAE,iBAAiB,CAAC;IACzB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAC/C,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,EAAE,aAAa,CAAC;QACvB,KAAK,EAAE,KAAK,CAAC;QACb,MAAM,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,OAAO,CAAA;SAAE,GAAG,IAAI,CAAC;QAC/C,KAAK,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;QAChC,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,mBAAmB,CAAC,EAAE,OAAO,CAAC;KAC/B,CAAC,CAAC;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EAAE,UAAU,EACjB,MAAM,EACN,KAAK,EACL,SAAS,EACT,MAAM,EACN,mBAAmB,GACpB,EAAE,uBAAuB,GAAG,SAAS,CAarC"}
1
+ {"version":3,"file":"error-reconstituter.d.ts","sourceRoot":"","sources":["../../src/client/error-reconstituter.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAiB,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAE1E;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;GAUG;AACH,UAAU,uBAAuB;IAC/B,KAAK,EAAE,iBAAiB,CAAC;IACzB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAC/C,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,EAAE,aAAa,CAAC;QACvB,KAAK,EAAE,KAAK,CAAC;QACb,MAAM,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,OAAO,CAAA;SAAE,GAAG,IAAI,CAAC;QAC/C,KAAK,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;QAChC,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,OAAO,CAAC;KAChB,CAAC,CAAC;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EAAE,UAAU,EACjB,MAAM,EACN,KAAK,EACL,SAAS,EACT,MAAM,EACN,IAAI,GACL,EAAE,uBAAuB,GAAG,SAAS,CAarC"}
@@ -5,7 +5,7 @@ import { c as cachedSearchParams, s as cachedSearch, t as _setCachedSearch } fro
5
5
  import { a as setGlobalRouter, i as getRouterOrNull, r as getRouter } from "../_chunks/navigation-root-mHSK9psY.js";
6
6
  import { n as getSsrData, r as setSsrData, t as clearSsrData } from "../_chunks/ssr-data-D6T6Y3ef.js";
7
7
  import { n as useSegmentContext, t as SegmentProvider } from "../_chunks/segment-context-D9_89u34.js";
8
- import { a as createSpaExits, c as NonRscResponse, d as readPublishedParams, i as createScrollEffects, l as fetchRscPayload, n as TimberErrorBoundary, o as recordSkew, r as createNavigationRecovery, s as isClientStale, u as readPayloadTree } from "../_chunks/error-boundary-BfPHZjm0.js";
8
+ import { a as createSpaExits, c as NonRscResponse, d as readPublishedParams, i as createScrollEffects, l as fetchRscPayload, n as TimberErrorBoundary, o as recordSkew, r as createNavigationRecovery, s as isClientStale, u as readPayloadTree } from "../_chunks/error-boundary-BQKxl6EX.js";
9
9
  import { t as bindUseQueryStates } from "../_chunks/use-query-states-I3JMng6J.js";
10
10
  //#region src/client/history.ts
11
11
  /**
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Dev-mode RSC debug channel transport — pipes Flight debug data to
3
+ * the browser via Vite's HMR WebSocket.
4
+ *
5
+ * React Flight writes debug rows (component info, owner stacks, $E
6
+ * source entries) to a debug channel writable. This module reads
7
+ * from the paired readable and buffers chunks until the browser
8
+ * subscribes via 'timber:debug-subscribe'. Chunks are then replayed
9
+ * and live-forwarded to that specific client (never broadcast).
10
+ *
11
+ * This matches the approach used by Next.js and Waku — debug data
12
+ * travels out-of-band via WebSocket, not inline in the HTML response.
13
+ *
14
+ * Design ref: 13-security.md §7, TIM-1507
15
+ */
16
+ import { type DebugComponentEntry } from '../server/rsc-entry/helpers.ts';
17
+ export declare const DEBUG_CHANNEL_EVENT = "timber:debug-data";
18
+ export declare const DEBUG_SUBSCRIBE_EVENT = "timber:debug-subscribe";
19
+ export interface DebugChannelMessage {
20
+ id: string;
21
+ chunk?: string;
22
+ done?: boolean;
23
+ }
24
+ /** Per-client send function (Vite's HotChannelClient shape). */
25
+ export type ClientSendFn = (event: string, payload: unknown) => void;
26
+ /**
27
+ * Registry of active debug channel sessions. The dev-server plugin
28
+ * creates one instance and wires it into the HMR handlers.
29
+ */
30
+ export declare class DebugChannelRegistry {
31
+ private sessions;
32
+ /** Called by pipeToTransport when a chunk arrives from the RSC render. */
33
+ push(id: string, chunk: string): void;
34
+ /** Called by pipeToTransport when the debug channel stream ends. */
35
+ finish(id: string): void;
36
+ /** Called by the HMR subscribe handler when the browser requests its debug data. */
37
+ subscribe(id: string, clientSend: ClientSendFn): void;
38
+ /** Parse buffered debug rows into component entries for the error overlay. */
39
+ getComponents(id: string): DebugComponentEntry[];
40
+ /** Create a new session for a render request. Returns the requestId. */
41
+ create(): string;
42
+ private evict;
43
+ }
44
+ /**
45
+ * Create a debug channel for a single render request.
46
+ *
47
+ * Returns `{ writable }` for Flight's renderToReadableStream, plus a
48
+ * `requestId` to embed in the HTML so the browser can correlate.
49
+ */
50
+ export declare function createDevDebugChannel(registry: DebugChannelRegistry): {
51
+ writable: WritableStream;
52
+ requestId: string;
53
+ getComponents: () => DebugComponentEntry[];
54
+ };
55
+ //# sourceMappingURL=debug-channel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debug-channel.d.ts","sourceRoot":"","sources":["../../src/dev-tools/debug-channel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAE1F,eAAO,MAAM,mBAAmB,sBAAsB,CAAC;AACvD,eAAO,MAAM,qBAAqB,2BAA2B,CAAC;AAE9D,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,gEAAgE;AAChE,MAAM,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;AAYrE;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAmC;IAEnD,0EAA0E;IAC1E,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAOpC;IAED,oEAAoE;IACpE,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAQvB;IAED,oFAAoF;IACpF,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,GAAG,IAAI,CAgBpD;IAED,8EAA8E;IAC9E,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,mBAAmB,EAAE,CAK/C;IAED,wEAAwE;IACxE,MAAM,IAAI,MAAM,CAMf;IAED,OAAO,CAAC,KAAK;CAYd;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,oBAAoB,GAAG;IACrE,QAAQ,EAAE,cAAc,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,mBAAmB,EAAE,CAAC;CAC5C,CAqBA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAU,YAAY,EAAE,MAAM,MAAM,CAAC;AAyCjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAa1D,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAQ1D,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAElG;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,MAAM;CAAG;AAE1B;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,GAAG,gBAAgB,CAEvE;AAyGD,wBAAgB,MAAM,CAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,YAAY,EAAE,CAqXhE;eAEc,MAAM"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAU,YAAY,EAAE,MAAM,MAAM,CAAC;AAyCjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAa1D,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAQ1D,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAElG;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,MAAM;CAAG;AAE1B;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,GAAG,gBAAgB,CAEvE;AAyGD,wBAAgB,MAAM,CAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,YAAY,EAAE,CAiXhE;eAEc,MAAM"}