@timber-js/app 0.2.0-alpha.192 → 0.2.0-alpha.195

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 (678) hide show
  1. package/agent-skill.md +2 -0
  2. package/dist/_chunks/{actions-BjbbNRFN.js → actions-CWYtq6ii.js} +3 -3
  3. package/dist/_chunks/actions-CWYtq6ii.js.map +1 -0
  4. package/dist/_chunks/als-registry-C6kcfprT.js.map +1 -1
  5. package/dist/_chunks/als-slots-BEEIPKYm.js.map +1 -1
  6. package/dist/_chunks/{build-output-helper-C3DrfzZR.js → build-output-helper-9dqCv1pZ.js} +3 -2
  7. package/dist/_chunks/build-output-helper-9dqCv1pZ.js.map +1 -0
  8. package/dist/_chunks/{cache-api-DllJ-Lyw.js → cache-api-CQeYzA5g.js} +6 -8
  9. package/dist/_chunks/cache-api-CQeYzA5g.js.map +1 -0
  10. package/dist/_chunks/chains-h7EO-u3n.js +412 -0
  11. package/dist/_chunks/chains-h7EO-u3n.js.map +1 -0
  12. package/dist/_chunks/{cli-check-DJZDc22E.js → cli-check-BVthpfLS.js} +43 -6
  13. package/dist/_chunks/cli-check-BVthpfLS.js.map +1 -0
  14. package/dist/_chunks/{cli-schema-sync-D4_AZVUb.js → cli-schema-sync-3Wutm8pH.js} +7 -6
  15. package/dist/_chunks/{cli-schema-sync-D4_AZVUb.js.map → cli-schema-sync-3Wutm8pH.js.map} +1 -1
  16. package/dist/_chunks/{cloudflare-CGP6BZKO.js → cloudflare-BKJC3SC_.js} +28 -22
  17. package/dist/_chunks/{cloudflare-CGP6BZKO.js.map → cloudflare-BKJC3SC_.js.map} +1 -1
  18. package/dist/_chunks/codec-registry-oOUxugz3.js.map +1 -1
  19. package/dist/_chunks/{convention-lint-CpteIpTm.js → convention-lint-DO10_pVl.js} +93 -7
  20. package/dist/_chunks/convention-lint-DO10_pVl.js.map +1 -0
  21. package/dist/_chunks/dist-DtrJyBbw.js +386 -0
  22. package/dist/_chunks/dist-DtrJyBbw.js.map +1 -0
  23. package/dist/_chunks/{error-boundary-D-ODYX41.js → error-boundary-D-lkwyaD.js} +3 -3
  24. package/dist/_chunks/{error-boundary-D-ODYX41.js.map → error-boundary-D-lkwyaD.js.map} +1 -1
  25. package/dist/_chunks/{file-cache-DmX7OqZP.js → file-cache-Dw6BJPG7.js} +5 -1
  26. package/dist/_chunks/{file-cache-DmX7OqZP.js.map → file-cache-Dw6BJPG7.js.map} +1 -1
  27. package/dist/_chunks/{format-CfwjgPz9.js → format-BKclgVbk.js} +3 -3
  28. package/dist/_chunks/{format-CfwjgPz9.js.map → format-BKclgVbk.js.map} +1 -1
  29. package/dist/_chunks/graph-cache-CP4GEmf9.js +304 -0
  30. package/dist/_chunks/graph-cache-CP4GEmf9.js.map +1 -0
  31. package/dist/_chunks/href-validation-CMc5JRls.js.map +1 -1
  32. package/dist/_chunks/live-graph-Bx4HodF1.js +150 -0
  33. package/dist/_chunks/live-graph-Bx4HodF1.js.map +1 -0
  34. package/dist/_chunks/{logger-CH7IcMmg.js → logger-pumCm3Il.js} +25 -7
  35. package/dist/_chunks/{logger-CH7IcMmg.js.map → logger-pumCm3Il.js.map} +1 -1
  36. package/dist/_chunks/{mdx-file-C005ay-P.js → mdx-file-CXyHGUpS.js} +3 -3
  37. package/dist/_chunks/mdx-file-CXyHGUpS.js.map +1 -0
  38. package/dist/_chunks/{plugin-context-rCinWLiE.js → plugin-context-8idfR3UZ.js} +2 -2
  39. package/dist/_chunks/plugin-context-8idfR3UZ.js.map +1 -0
  40. package/dist/_chunks/poison-rules-DoEhbqaY.js +110 -0
  41. package/dist/_chunks/poison-rules-DoEhbqaY.js.map +1 -0
  42. package/dist/_chunks/poison-scan-BAxfTT5L.js +101 -0
  43. package/dist/_chunks/poison-scan-BAxfTT5L.js.map +1 -0
  44. package/dist/_chunks/resolve-schema-CBR6Lm4i.js.map +1 -1
  45. package/dist/_chunks/rolldown-runtime-D7D4PA-g.js +13 -0
  46. package/dist/_chunks/{router-ref-DuYuV_0Q.js → router-ref-BzqbPwYC.js} +2 -2
  47. package/dist/_chunks/{router-ref-DuYuV_0Q.js.map → router-ref-BzqbPwYC.js.map} +1 -1
  48. package/dist/_chunks/{rsc-media-type-DRqE_lD_.js → rsc-media-type-DDc7duTD.js} +17 -2
  49. package/dist/_chunks/{rsc-media-type-DRqE_lD_.js.map → rsc-media-type-DDc7duTD.js.map} +1 -1
  50. package/dist/_chunks/scan-BoP17W3w.js +140 -0
  51. package/dist/_chunks/scan-BoP17W3w.js.map +1 -0
  52. package/dist/_chunks/{scanner-CAietmj4.js → scanner-BRIOmHE2.js} +43 -4
  53. package/dist/_chunks/scanner-BRIOmHE2.js.map +1 -0
  54. package/dist/_chunks/schema-bridge-C83xa9lT.js.map +1 -1
  55. package/dist/_chunks/segment-classify-C539Pa2O.js.map +1 -1
  56. package/dist/_chunks/{segment-keys-BawYuNFO.js → segment-keys-BhqoHiLc.js} +14 -2
  57. package/dist/_chunks/{segment-keys-BawYuNFO.js.map → segment-keys-BhqoHiLc.js.map} +1 -1
  58. package/dist/_chunks/slot-params-BCTmZkQB.js.map +1 -1
  59. package/dist/_chunks/{ssr-data-14MXm7Pj.js → ssr-data-Ya2HJPFp.js} +1 -7
  60. package/dist/_chunks/{ssr-data-14MXm7Pj.js.map → ssr-data-Ya2HJPFp.js.map} +1 -1
  61. package/dist/_chunks/use-query-states-I3JMng6J.js.map +1 -1
  62. package/dist/_chunks/{use-segment-params-C4r4BD9T.js → use-segment-params-DzTBpkvj.js} +3 -3
  63. package/dist/_chunks/use-segment-params-DzTBpkvj.js.map +1 -0
  64. package/dist/_chunks/{walkers-BsVLmD1S.js → walkers-BU6z9xRV.js} +9 -6
  65. package/dist/_chunks/{walkers-BsVLmD1S.js.map → walkers-BU6z9xRV.js.map} +1 -1
  66. package/dist/adapters/build-output-helper.d.ts +1 -1
  67. package/dist/adapters/build-output-helper.d.ts.map +1 -1
  68. package/dist/adapters/cloudflare-dev.d.ts.map +1 -1
  69. package/dist/adapters/cloudflare-dev.js +2 -1
  70. package/dist/adapters/cloudflare-dev.js.map +1 -1
  71. package/dist/adapters/cloudflare-kv-cache.d.ts +1 -1
  72. package/dist/adapters/cloudflare-kv-cache.d.ts.map +1 -1
  73. package/dist/adapters/cloudflare-kv-cache.js +7 -8
  74. package/dist/adapters/cloudflare-kv-cache.js.map +1 -1
  75. package/dist/adapters/cloudflare.d.ts +1 -1
  76. package/dist/adapters/cloudflare.d.ts.map +1 -1
  77. package/dist/adapters/cloudflare.js +1 -1
  78. package/dist/adapters/nitro-presets.d.ts +37 -0
  79. package/dist/adapters/nitro-presets.d.ts.map +1 -0
  80. package/dist/adapters/nitro-preview.d.ts +32 -0
  81. package/dist/adapters/nitro-preview.d.ts.map +1 -0
  82. package/dist/adapters/nitro.d.ts +28 -51
  83. package/dist/adapters/nitro.d.ts.map +1 -1
  84. package/dist/adapters/nitro.js +224 -171
  85. package/dist/adapters/nitro.js.map +1 -1
  86. package/dist/analyze/chains.d.ts +124 -0
  87. package/dist/analyze/chains.d.ts.map +1 -0
  88. package/dist/analyze/classify.d.ts +150 -0
  89. package/dist/analyze/classify.d.ts.map +1 -0
  90. package/dist/analyze/crawl-entry.d.ts +17 -0
  91. package/dist/analyze/crawl-entry.d.ts.map +1 -0
  92. package/dist/analyze/crawl-entry.js +313 -0
  93. package/dist/analyze/crawl-entry.js.map +1 -0
  94. package/dist/analyze/crawl.d.ts +134 -0
  95. package/dist/analyze/crawl.d.ts.map +1 -0
  96. package/dist/analyze/graph-cache.d.ts +104 -0
  97. package/dist/analyze/graph-cache.d.ts.map +1 -0
  98. package/dist/analyze/graph-command.d.ts +43 -0
  99. package/dist/analyze/graph-command.d.ts.map +1 -0
  100. package/dist/analyze/graph-command.js +472 -0
  101. package/dist/analyze/graph-command.js.map +1 -0
  102. package/dist/analyze/live-graph.d.ts +81 -0
  103. package/dist/analyze/live-graph.d.ts.map +1 -0
  104. package/dist/analyze/poison-rules.d.ts +72 -0
  105. package/dist/analyze/poison-rules.d.ts.map +1 -0
  106. package/dist/analyze/poison-scan.d.ts +48 -0
  107. package/dist/analyze/poison-scan.d.ts.map +1 -0
  108. package/dist/analyze/scan.d.ts +73 -0
  109. package/dist/analyze/scan.d.ts.map +1 -0
  110. package/dist/cache/cache-api.d.ts +2 -2
  111. package/dist/cache/cache-api.d.ts.map +1 -1
  112. package/dist/cache/index.d.ts +8 -8
  113. package/dist/cache/index.d.ts.map +1 -1
  114. package/dist/cache/index.js +1 -1
  115. package/dist/cache/redis-handler.d.ts +1 -1
  116. package/dist/cache/redis-handler.d.ts.map +1 -1
  117. package/dist/cache/stores/cloudflare-kv.d.ts +1 -1
  118. package/dist/cache/stores/cloudflare-kv.d.ts.map +1 -1
  119. package/dist/cache/stores/cloudflare-kv.js.map +1 -1
  120. package/dist/cache/stores/memory.d.ts +1 -1
  121. package/dist/cache/stores/memory.d.ts.map +1 -1
  122. package/dist/cache/stores/memory.js.map +1 -1
  123. package/dist/cache/stores/redis.d.ts +1 -1
  124. package/dist/cache/stores/redis.d.ts.map +1 -1
  125. package/dist/cache/stores/redis.js.map +1 -1
  126. package/dist/cache/stores/vercel.d.ts +1 -1
  127. package/dist/cache/stores/vercel.d.ts.map +1 -1
  128. package/dist/cache/stores/vercel.js.map +1 -1
  129. package/dist/cache/tag-aware-handler.d.ts +2 -2
  130. package/dist/cache/tag-aware-handler.d.ts.map +1 -1
  131. package/dist/cache/timber-cache.d.ts +1 -1
  132. package/dist/cache/timber-cache.d.ts.map +1 -1
  133. package/dist/cdn/cloudflare-purge.d.ts +1 -1
  134. package/dist/cdn/cloudflare-purge.d.ts.map +1 -1
  135. package/dist/cdn/cloudflare-purge.js.map +1 -1
  136. package/dist/cdn/fastly-purge.d.ts +1 -1
  137. package/dist/cdn/fastly-purge.d.ts.map +1 -1
  138. package/dist/cdn/fastly-purge.js.map +1 -1
  139. package/dist/cdn/index.d.ts +4 -4
  140. package/dist/cdn/index.d.ts.map +1 -1
  141. package/dist/cdn/workers-cache-purge.d.ts +5 -1
  142. package/dist/cdn/workers-cache-purge.d.ts.map +1 -1
  143. package/dist/cdn/workers-cache-purge.js.map +1 -1
  144. package/dist/cli-check.d.ts +10 -0
  145. package/dist/cli-check.d.ts.map +1 -1
  146. package/dist/cli.d.ts +12 -4
  147. package/dist/cli.d.ts.map +1 -1
  148. package/dist/cli.js +30 -6
  149. package/dist/cli.js.map +1 -1
  150. package/dist/client/browser-entry/hydrate.d.ts +2 -2
  151. package/dist/client/browser-entry/hydrate.d.ts.map +1 -1
  152. package/dist/client/browser-entry/post-hydration.d.ts +2 -2
  153. package/dist/client/browser-entry/router-init.d.ts +2 -2
  154. package/dist/client/browser-entry/rsc-stream.d.ts +1 -1
  155. package/dist/client/error-boundary.js +1 -1
  156. package/dist/client/form.d.ts +2 -2
  157. package/dist/client/form.d.ts.map +1 -1
  158. package/dist/client/history.d.ts +2 -2
  159. package/dist/client/index.d.ts +18 -18
  160. package/dist/client/index.d.ts.map +1 -1
  161. package/dist/client/index.js +3 -3
  162. package/dist/client/index.js.map +1 -1
  163. package/dist/client/internal.d.ts +19 -19
  164. package/dist/client/internal.d.ts.map +1 -1
  165. package/dist/client/internal.js +15 -19
  166. package/dist/client/internal.js.map +1 -1
  167. package/dist/client/link.d.ts +3 -3
  168. package/dist/client/navigation-commit.d.ts +5 -5
  169. package/dist/client/navigation-root.d.ts +1 -1
  170. package/dist/client/navigation-root.d.ts.map +1 -1
  171. package/dist/client/params-context.d.ts +3 -3
  172. package/dist/client/router-pipeline.d.ts +7 -7
  173. package/dist/client/router-ref.d.ts +1 -1
  174. package/dist/client/router-types.d.ts +6 -6
  175. package/dist/client/router-types.d.ts.map +1 -1
  176. package/dist/client/router.d.ts +1 -1
  177. package/dist/client/rsc-fetch.d.ts +4 -4
  178. package/dist/client/rsc-fetch.d.ts.map +1 -1
  179. package/dist/client/segment-cache.d.ts +2 -2
  180. package/dist/client/slot-provider.d.ts +1 -1
  181. package/dist/client/ssr-data.d.ts +2 -2
  182. package/dist/client/state.d.ts +4 -4
  183. package/dist/client/use-query-states.d.ts +1 -1
  184. package/dist/client/use-segment-params.d.ts +3 -3
  185. package/dist/codec.d.ts +2 -2
  186. package/dist/codec.js.map +1 -1
  187. package/dist/config-types.d.ts +12 -9
  188. package/dist/config-types.d.ts.map +1 -1
  189. package/dist/config-validation.d.ts +1 -1
  190. package/dist/cookies/define-cookie.d.ts +3 -3
  191. package/dist/cookies/index.d.ts +3 -3
  192. package/dist/cookies/index.js +4 -5
  193. package/dist/cookies/index.js.map +1 -1
  194. package/dist/cookies/json-cookie.d.ts +1 -1
  195. package/dist/dev-tools/404-page.d.ts +2 -2
  196. package/dist/dev-tools/error-page.d.ts +2 -2
  197. package/dist/dev-tools/index.d.ts +12 -12
  198. package/dist/dev-tools/instrumentation.d.ts +1 -1
  199. package/dist/dev-tools/logs.d.ts +1 -1
  200. package/dist/dev-tools/overlay.d.ts +2 -2
  201. package/dist/dev-tools/terminal.d.ts +1 -1
  202. package/dist/fonts/ast.d.ts +4 -4
  203. package/dist/fonts/bundle.d.ts +3 -3
  204. package/dist/fonts/css.d.ts +1 -1
  205. package/dist/fonts/dev-middleware.d.ts +1 -1
  206. package/dist/fonts/google.d.ts +1 -1
  207. package/dist/fonts/local.d.ts +1 -1
  208. package/dist/fonts/pipeline.d.ts +3 -3
  209. package/dist/fonts/transform.d.ts +2 -2
  210. package/dist/fonts/types.d.ts +1 -1
  211. package/dist/fonts/virtual-modules.d.ts +1 -1
  212. package/dist/index.d.ts +3 -18
  213. package/dist/index.d.ts.map +1 -1
  214. package/dist/index.js +861 -314
  215. package/dist/index.js.map +1 -1
  216. package/dist/params/codec-registry.d.ts +1 -1
  217. package/dist/params/define-schema.d.ts +2 -2
  218. package/dist/params/index.d.ts +4 -4
  219. package/dist/params/index.js.map +1 -1
  220. package/dist/params/resolve-schema.d.ts +1 -1
  221. package/dist/plugin-context.d.ts +9 -9
  222. package/dist/plugin-context.d.ts.map +1 -1
  223. package/dist/plugins/adapter-build.d.ts +2 -2
  224. package/dist/plugins/build-manifest.d.ts +2 -2
  225. package/dist/plugins/build-report.d.ts +5 -5
  226. package/dist/plugins/cache.d.ts +1 -1
  227. package/dist/plugins/callsite-jsx.d.ts +2 -2
  228. package/dist/plugins/chunks.d.ts +1 -1
  229. package/dist/plugins/chunks.d.ts.map +1 -1
  230. package/dist/plugins/cloudflare-wasm.d.ts +1 -1
  231. package/dist/plugins/content.d.ts +1 -1
  232. package/dist/plugins/content.d.ts.map +1 -1
  233. package/dist/plugins/dev-discovery.d.ts +123 -0
  234. package/dist/plugins/dev-discovery.d.ts.map +1 -0
  235. package/dist/plugins/dev-server.d.ts +1 -1
  236. package/dist/plugins/dev-server.d.ts.map +1 -1
  237. package/dist/plugins/entries.d.ts +1 -1
  238. package/dist/plugins/fonts.d.ts +3 -3
  239. package/dist/plugins/fonts.d.ts.map +1 -1
  240. package/dist/plugins/graph-endpoint.d.ts +112 -0
  241. package/dist/plugins/graph-endpoint.d.ts.map +1 -0
  242. package/dist/plugins/mdx.d.ts +1 -1
  243. package/dist/plugins/mdx.d.ts.map +1 -1
  244. package/dist/plugins/prebuilt-capture.d.ts +2 -2
  245. package/dist/plugins/prebuilt-options-analysis.d.ts +1 -1
  246. package/dist/plugins/prebuilt.d.ts +1 -1
  247. package/dist/plugins/prerender-sugar.d.ts +11 -14
  248. package/dist/plugins/prerender-sugar.d.ts.map +1 -1
  249. package/dist/plugins/request-dep/analysis.d.ts +1 -1
  250. package/dist/plugins/request-dep/index.d.ts +5 -5
  251. package/dist/plugins/request-dep/origin.d.ts +1 -1
  252. package/dist/plugins/routing.d.ts +1 -1
  253. package/dist/plugins/routing.d.ts.map +1 -1
  254. package/dist/plugins/server-bundle.d.ts.map +1 -1
  255. package/dist/plugins/shims.d.ts +1 -1
  256. package/dist/plugins/shims.d.ts.map +1 -1
  257. package/dist/plugins/static-build.d.ts +5 -5
  258. package/dist/routing/codegen-shared.d.ts +1 -1
  259. package/dist/routing/codegen-write.d.ts +1 -1
  260. package/dist/routing/codegen.d.ts +1 -1
  261. package/dist/routing/collision-probe.d.ts +1 -1
  262. package/dist/routing/collision-spaces.d.ts +1 -1
  263. package/dist/routing/convention-lint.d.ts +1 -1
  264. package/dist/routing/convention-lint.d.ts.map +1 -1
  265. package/dist/routing/index.d.ts +13 -13
  266. package/dist/routing/index.js +3 -3
  267. package/dist/routing/interception.d.ts +1 -1
  268. package/dist/routing/interception.d.ts.map +1 -1
  269. package/dist/routing/link-codegen.d.ts +1 -1
  270. package/dist/routing/manifest-codegen.d.ts +1 -1
  271. package/dist/routing/scanner.d.ts +14 -1
  272. package/dist/routing/scanner.d.ts.map +1 -1
  273. package/dist/routing/schema-validation.d.ts +1 -1
  274. package/dist/routing/segment-classify.d.ts +1 -1
  275. package/dist/routing/segment-codegen.d.ts +1 -1
  276. package/dist/routing/segment-keys.d.ts +1 -1
  277. package/dist/routing/slot-placement.d.ts +1 -1
  278. package/dist/routing/walkers.d.ts +1 -1
  279. package/dist/rsc-runtime/transforms.d.ts +13 -0
  280. package/dist/rsc-runtime/transforms.d.ts.map +1 -0
  281. package/dist/schema-bridge.d.ts +1 -1
  282. package/dist/search-params/define.d.ts +3 -3
  283. package/dist/search-params/index.d.ts +3 -3
  284. package/dist/search-params/index.js.map +1 -1
  285. package/dist/search-params/wrappers.d.ts +1 -1
  286. package/dist/server/access-gate.d.ts +1 -1
  287. package/dist/server/action-client.d.ts +1 -1
  288. package/dist/server/action-handler.d.ts +5 -5
  289. package/dist/server/actions.d.ts +2 -2
  290. package/dist/server/als-registry.d.ts +8 -8
  291. package/dist/server/asset-headers.d.ts +1 -1
  292. package/dist/server/chain-url-parts.d.ts +3 -3
  293. package/dist/server/children-interception.d.ts +2 -2
  294. package/dist/server/cookie-context.d.ts +1 -1
  295. package/dist/server/cookie-parsing.d.ts +2 -2
  296. package/dist/server/default-logger.d.ts +1 -1
  297. package/dist/server/deny-boundary.d.ts +2 -2
  298. package/dist/server/deny-renderer.d.ts +5 -5
  299. package/dist/server/early-hints.d.ts +1 -1
  300. package/dist/server/error-boundary-wrapper.d.ts +2 -4
  301. package/dist/server/error-boundary-wrapper.d.ts.map +1 -1
  302. package/dist/server/fallback-error.d.ts +5 -5
  303. package/dist/server/flight-injection-state.d.ts +1 -1
  304. package/dist/server/form-flash.d.ts +1 -1
  305. package/dist/server/html-injector-core.d.ts +2 -2
  306. package/dist/server/html-injectors.d.ts +1 -1
  307. package/dist/server/index.d.ts +18 -18
  308. package/dist/server/index.d.ts.map +1 -1
  309. package/dist/server/index.js +34 -38
  310. package/dist/server/index.js.map +1 -1
  311. package/dist/server/instrumentation.d.ts +1 -1
  312. package/dist/server/internal.d.ts +50 -50
  313. package/dist/server/internal.d.ts.map +1 -1
  314. package/dist/server/internal.js +1024 -1026
  315. package/dist/server/internal.js.map +1 -1
  316. package/dist/server/metadata-collector.d.ts +2 -2
  317. package/dist/server/metadata-platform.d.ts +2 -2
  318. package/dist/server/metadata-render.d.ts +2 -2
  319. package/dist/server/metadata-routes.d.ts +3 -3
  320. package/dist/server/metadata-social.d.ts +2 -2
  321. package/dist/server/metadata.d.ts +2 -2
  322. package/dist/server/middleware-runner.d.ts +1 -1
  323. package/dist/server/node-stream-transforms.d.ts +1 -1
  324. package/dist/server/param-coercion.d.ts +4 -4
  325. package/dist/server/pipeline-helpers.d.ts +3 -3
  326. package/dist/server/pipeline-interception.d.ts +1 -1
  327. package/dist/server/pipeline-metadata.d.ts +1 -1
  328. package/dist/server/pipeline-outcome.d.ts +2 -2
  329. package/dist/server/pipeline-phases.d.ts +3 -3
  330. package/dist/server/pipeline-phases.d.ts.map +1 -1
  331. package/dist/server/pipeline.d.ts +9 -9
  332. package/dist/server/prebuilt/cache-key.d.ts +1 -1
  333. package/dist/server/prebuilt/capture-state.d.ts +1 -1
  334. package/dist/server/prebuilt/key-discipline.d.ts +1 -1
  335. package/dist/server/prebuilt/manifest-tag-index.d.ts +1 -1
  336. package/dist/server/prebuilt/overlay.d.ts +2 -2
  337. package/dist/server/prebuilt/payload-source.d.ts +1 -1
  338. package/dist/server/prebuilt/slots.d.ts +1 -1
  339. package/dist/server/prebuilt/synthetic-store.d.ts +2 -2
  340. package/dist/server/prebuilt-builder.d.ts +2 -2
  341. package/dist/server/primitives.d.ts +2 -2
  342. package/dist/server/publish-params.d.ts +1 -1
  343. package/dist/server/request-context.d.ts +3 -3
  344. package/dist/server/route-element-builder.d.ts +16 -6
  345. package/dist/server/route-element-builder.d.ts.map +1 -1
  346. package/dist/server/route-handler.d.ts +1 -1
  347. package/dist/server/route-matcher.d.ts +4 -4
  348. package/dist/server/rsc-cache-key-guard.d.ts.map +1 -1
  349. package/dist/server/rsc-entry/action-middleware-runner.d.ts +2 -2
  350. package/dist/server/rsc-entry/api-handler.d.ts +1 -1
  351. package/dist/server/rsc-entry/api-handler.d.ts.map +1 -1
  352. package/dist/server/rsc-entry/deny-fallback.d.ts +3 -3
  353. package/dist/server/rsc-entry/error-renderer.d.ts +4 -4
  354. package/dist/server/rsc-entry/helpers.d.ts +6 -6
  355. package/dist/server/rsc-entry/index.d.ts +7 -6
  356. package/dist/server/rsc-entry/index.d.ts.map +1 -1
  357. package/dist/server/rsc-entry/render-route.d.ts +4 -4
  358. package/dist/server/rsc-entry/revalidate-renderer.d.ts +4 -4
  359. package/dist/server/rsc-entry/rsc-payload.d.ts +4 -4
  360. package/dist/server/rsc-entry/rsc-payload.d.ts.map +1 -1
  361. package/dist/server/rsc-entry/rsc-stream.d.ts +3 -3
  362. package/dist/server/rsc-entry/ssr-bridge.d.ts +1 -1
  363. package/dist/server/rsc-entry/ssr-renderer.d.ts +7 -7
  364. package/dist/server/rsc-entry/wrap-action-dispatch.d.ts +5 -5
  365. package/dist/server/sitemap-generator.d.ts +2 -2
  366. package/dist/server/sitemap-handler.d.ts +1 -1
  367. package/dist/server/skippable-prefix.d.ts +3 -3
  368. package/dist/server/slot-interception.d.ts +2 -2
  369. package/dist/server/slot-resolver.d.ts +3 -7
  370. package/dist/server/slot-resolver.d.ts.map +1 -1
  371. package/dist/server/ssr-bridge-types.d.ts +2 -2
  372. package/dist/server/ssr-entry.d.ts +1 -1
  373. package/dist/server/static-generator.d.ts +1 -1
  374. package/dist/server/static-not-found.d.ts +1 -1
  375. package/dist/server/status-code-resolver.d.ts +1 -1
  376. package/dist/server/tracing.d.ts +3 -3
  377. package/dist/server/tree-builder.d.ts +3 -3
  378. package/dist/server/tree-match.d.ts +1 -1
  379. package/dist/server/types.d.ts +2 -2
  380. package/dist/server/utils/mdx-file.d.ts +2 -0
  381. package/dist/server/utils/mdx-file.d.ts.map +1 -1
  382. package/dist/server/workers-cache-bridge.d.ts +1 -1
  383. package/dist/shared/als-slots.d.ts +1 -1
  384. package/dist/shared/payload-root.d.ts +2 -2
  385. package/dist/shared/rsc-media-type.d.ts +12 -0
  386. package/dist/shared/rsc-media-type.d.ts.map +1 -1
  387. package/dist/shared/slot-params.d.ts +1 -1
  388. package/dist/shims/font-google.d.ts +1 -1
  389. package/dist/shims/font-google.js.map +1 -1
  390. package/dist/shims/font-local.d.ts +1 -1
  391. package/dist/shims/font-local.js.map +1 -1
  392. package/dist/shims/navigation-client.d.ts +4 -4
  393. package/dist/shims/navigation.d.ts +2 -2
  394. package/docs/api/34-api-config.mdx +7 -4
  395. package/docs/api/36-cli.mdx +23 -3
  396. package/docs/learn/11-error-handling.mdx +11 -0
  397. package/docs/learn/13-configuration.mdx +1 -1
  398. package/docs/more/01-advanced-routing.mdx +1 -0
  399. package/package.json +11 -10
  400. package/src/adapters/build-output-helper.ts +4 -4
  401. package/src/adapters/cloudflare-dev.ts +7 -1
  402. package/src/adapters/cloudflare-kv-cache.ts +11 -8
  403. package/src/adapters/cloudflare.ts +21 -15
  404. package/src/adapters/compress-module.ts +2 -2
  405. package/src/adapters/nitro-presets.ts +139 -0
  406. package/src/adapters/nitro-preview.ts +340 -0
  407. package/src/adapters/nitro.ts +100 -465
  408. package/src/adapters/shared.ts +1 -1
  409. package/src/analyze/chains.ts +411 -0
  410. package/src/analyze/classify.ts +258 -0
  411. package/src/analyze/crawl-entry.ts +68 -0
  412. package/src/analyze/crawl.ts +500 -0
  413. package/src/analyze/graph-cache.ts +332 -0
  414. package/src/analyze/graph-command.ts +762 -0
  415. package/src/analyze/live-graph.ts +232 -0
  416. package/src/analyze/poison-rules.ts +165 -0
  417. package/src/analyze/poison-scan.ts +162 -0
  418. package/src/analyze/scan.ts +149 -0
  419. package/src/cache/cache-api.ts +7 -7
  420. package/src/cache/index.ts +9 -9
  421. package/src/cache/redis-handler.ts +2 -2
  422. package/src/cache/stores/cloudflare-kv.ts +1 -1
  423. package/src/cache/stores/memory.ts +2 -2
  424. package/src/cache/stores/redis.ts +1 -1
  425. package/src/cache/stores/vercel.ts +1 -1
  426. package/src/cache/tag-aware-handler.ts +2 -2
  427. package/src/cache/timber-cache.ts +8 -8
  428. package/src/cdn/cloudflare-purge.ts +1 -1
  429. package/src/cdn/fastly-purge.ts +1 -1
  430. package/src/cdn/index.ts +10 -4
  431. package/src/cdn/workers-cache-purge.ts +6 -2
  432. package/src/cli-check.ts +53 -4
  433. package/src/cli-schema-sync.ts +3 -3
  434. package/src/cli.ts +50 -11
  435. package/src/client/browser-dev.ts +1 -1
  436. package/src/client/browser-entry/action-dispatch.ts +5 -5
  437. package/src/client/browser-entry/hmr.ts +1 -1
  438. package/src/client/browser-entry/hydrate.ts +9 -9
  439. package/src/client/browser-entry/index.ts +10 -10
  440. package/src/client/browser-entry/post-hydration.ts +5 -5
  441. package/src/client/browser-entry/router-init.ts +9 -9
  442. package/src/client/browser-entry/rsc-stream.ts +3 -3
  443. package/src/client/error-boundary.tsx +4 -4
  444. package/src/client/form.tsx +7 -2
  445. package/src/client/history.ts +2 -2
  446. package/src/client/index.ts +21 -18
  447. package/src/client/internal.ts +19 -19
  448. package/src/client/link.tsx +9 -9
  449. package/src/client/navigation-api.ts +1 -1
  450. package/src/client/navigation-commit.ts +5 -5
  451. package/src/client/navigation-context.ts +1 -1
  452. package/src/client/navigation-root.tsx +1 -1
  453. package/src/client/nuqs-adapter.tsx +2 -2
  454. package/src/client/params-context.ts +4 -4
  455. package/src/client/router-effects.ts +3 -3
  456. package/src/client/router-lifecycle.ts +2 -2
  457. package/src/client/router-pipeline.ts +10 -10
  458. package/src/client/router-ref.ts +2 -2
  459. package/src/client/router-skew.ts +2 -2
  460. package/src/client/router-types.ts +6 -6
  461. package/src/client/router.ts +13 -13
  462. package/src/client/rsc-fetch.ts +11 -16
  463. package/src/client/segment-cache.ts +2 -2
  464. package/src/client/segment-outlet.tsx +1 -1
  465. package/src/client/shallow-url.ts +1 -1
  466. package/src/client/slot-outlet.tsx +1 -1
  467. package/src/client/slot-provider.tsx +1 -1
  468. package/src/client/ssr-data.ts +3 -3
  469. package/src/client/stale-client.ts +1 -1
  470. package/src/client/state.ts +4 -4
  471. package/src/client/top-loader.tsx +1 -1
  472. package/src/client/unload-guard.ts +1 -1
  473. package/src/client/use-cookie.ts +2 -2
  474. package/src/client/use-pathname.ts +2 -2
  475. package/src/client/use-pending-navigation.ts +1 -1
  476. package/src/client/use-query-states.ts +3 -3
  477. package/src/client/use-router.ts +2 -2
  478. package/src/client/use-search-params.ts +3 -3
  479. package/src/client/use-segment-params.ts +6 -6
  480. package/src/client/use-selected-layout-segment.ts +2 -2
  481. package/src/codec.ts +2 -2
  482. package/src/config-types.ts +12 -9
  483. package/src/config-validation.ts +1 -1
  484. package/src/cookies/define-cookie.ts +6 -6
  485. package/src/cookies/index.ts +3 -3
  486. package/src/cookies/json-cookie.ts +1 -1
  487. package/src/dev-tools/404-page.ts +4 -4
  488. package/src/dev-tools/dev-page-shell.ts +1 -1
  489. package/src/dev-tools/error-page.ts +4 -4
  490. package/src/dev-tools/index.ts +12 -12
  491. package/src/dev-tools/instrumentation.ts +1 -1
  492. package/src/dev-tools/logs.ts +1 -1
  493. package/src/dev-tools/overlay.ts +3 -3
  494. package/src/dev-tools/terminal.ts +2 -2
  495. package/src/fonts/ast.ts +5 -5
  496. package/src/fonts/bundle.ts +5 -5
  497. package/src/fonts/css.ts +1 -1
  498. package/src/fonts/dev-middleware.ts +2 -2
  499. package/src/fonts/google.ts +2 -2
  500. package/src/fonts/local.ts +4 -4
  501. package/src/fonts/pipeline.ts +8 -8
  502. package/src/fonts/transform.ts +5 -5
  503. package/src/fonts/types.ts +1 -1
  504. package/src/fonts/virtual-modules.ts +1 -1
  505. package/src/index.ts +90 -95
  506. package/src/params/codec-registry.ts +1 -1
  507. package/src/params/define-schema.ts +2 -2
  508. package/src/params/index.ts +4 -4
  509. package/src/params/resolve-schema.ts +2 -2
  510. package/src/plugin-context.ts +10 -10
  511. package/src/plugins/adapter-build.ts +5 -5
  512. package/src/plugins/build-manifest.ts +4 -4
  513. package/src/plugins/build-report.ts +6 -6
  514. package/src/plugins/cache.ts +3 -3
  515. package/src/plugins/callsite-ast.ts +1 -1
  516. package/src/plugins/callsite-jsx.ts +2 -2
  517. package/src/plugins/chunks.ts +1 -1
  518. package/src/plugins/cloudflare-wasm.ts +1 -1
  519. package/src/plugins/content.ts +5 -1
  520. package/src/plugins/dev-discovery.ts +218 -0
  521. package/src/plugins/dev-server.ts +97 -12
  522. package/src/plugins/entries.ts +1 -1
  523. package/src/plugins/fonts.ts +17 -10
  524. package/src/plugins/graph-endpoint.ts +532 -0
  525. package/src/plugins/mdx.ts +4 -3
  526. package/src/plugins/prebuilt-capture.ts +3 -3
  527. package/src/plugins/prebuilt-options-analysis.ts +1 -1
  528. package/src/plugins/prebuilt.ts +7 -7
  529. package/src/plugins/prerender-sugar.ts +11 -19
  530. package/src/plugins/request-dep/analysis.ts +1 -1
  531. package/src/plugins/request-dep/index.ts +8 -8
  532. package/src/plugins/request-dep/origin.ts +1 -1
  533. package/src/plugins/routing.ts +12 -7
  534. package/src/plugins/server-bundle.ts +9 -2
  535. package/src/plugins/shims.ts +16 -31
  536. package/src/plugins/static-build.ts +10 -10
  537. package/src/routing/codegen-shared.ts +1 -1
  538. package/src/routing/codegen-write.ts +3 -3
  539. package/src/routing/codegen.ts +14 -5
  540. package/src/routing/collision-probe.ts +3 -3
  541. package/src/routing/collision-spaces.ts +3 -3
  542. package/src/routing/convention-lint.ts +136 -6
  543. package/src/routing/export-detect.ts +1 -1
  544. package/src/routing/index.ts +13 -13
  545. package/src/routing/interception.ts +41 -4
  546. package/src/routing/link-codegen.ts +3 -3
  547. package/src/routing/manifest-codegen.ts +2 -2
  548. package/src/routing/scanner.ts +33 -9
  549. package/src/routing/schema-validation.ts +4 -4
  550. package/src/routing/segment-classify.ts +2 -2
  551. package/src/routing/segment-codegen.ts +1 -1
  552. package/src/routing/segment-keys.ts +1 -1
  553. package/src/routing/slot-placement.ts +1 -1
  554. package/src/routing/walkers.ts +1 -1
  555. package/src/rsc-runtime/transforms.ts +13 -0
  556. package/src/rsc-runtime/vendor-types.d.ts +12 -0
  557. package/src/schema-bridge.ts +1 -1
  558. package/src/search-params/define.ts +8 -8
  559. package/src/search-params/index.ts +3 -3
  560. package/src/search-params/wrappers.ts +3 -3
  561. package/src/server/access-gate.tsx +6 -6
  562. package/src/server/action-client.ts +5 -5
  563. package/src/server/action-handler.ts +16 -16
  564. package/src/server/actions.ts +5 -5
  565. package/src/server/als-registry.ts +8 -8
  566. package/src/server/asset-headers.ts +2 -2
  567. package/src/server/chain-url-parts.ts +5 -5
  568. package/src/server/children-interception.ts +4 -4
  569. package/src/server/compress.ts +1 -1
  570. package/src/server/cookie-context.ts +4 -4
  571. package/src/server/cookie-parsing.ts +2 -2
  572. package/src/server/default-logger.ts +3 -3
  573. package/src/server/deny-boundary.ts +10 -10
  574. package/src/server/deny-renderer.ts +38 -25
  575. package/src/server/early-hints-sender.ts +2 -2
  576. package/src/server/early-hints.ts +2 -2
  577. package/src/server/error-boundary-wrapper.ts +4 -12
  578. package/src/server/fallback-error.ts +13 -13
  579. package/src/server/flight-injection-state.ts +1 -1
  580. package/src/server/form-flash.ts +2 -2
  581. package/src/server/html-injector-core.ts +4 -4
  582. package/src/server/html-injectors.ts +5 -5
  583. package/src/server/index.ts +18 -18
  584. package/src/server/instrumentation.ts +1 -1
  585. package/src/server/internal.ts +50 -50
  586. package/src/server/logger.ts +4 -4
  587. package/src/server/metadata-collector.ts +7 -7
  588. package/src/server/metadata-platform.ts +2 -2
  589. package/src/server/metadata-render.ts +4 -4
  590. package/src/server/metadata-routes.ts +3 -3
  591. package/src/server/metadata-social.ts +2 -2
  592. package/src/server/metadata.ts +2 -2
  593. package/src/server/middleware-runner.ts +1 -1
  594. package/src/server/node-stream-transforms.ts +4 -4
  595. package/src/server/param-coercion.ts +8 -8
  596. package/src/server/pipeline-helpers.ts +7 -7
  597. package/src/server/pipeline-interception.ts +2 -2
  598. package/src/server/pipeline-metadata.ts +1 -1
  599. package/src/server/pipeline-outcome.ts +8 -8
  600. package/src/server/pipeline-phases.ts +24 -28
  601. package/src/server/pipeline.ts +22 -22
  602. package/src/server/prebuilt/cache-key.ts +1 -1
  603. package/src/server/prebuilt/capture-state.ts +1 -1
  604. package/src/server/prebuilt/key-discipline.ts +1 -1
  605. package/src/server/prebuilt/manifest-tag-index.ts +1 -1
  606. package/src/server/prebuilt/overlay.ts +6 -6
  607. package/src/server/prebuilt/payload-source.ts +2 -2
  608. package/src/server/prebuilt/slots.ts +5 -5
  609. package/src/server/prebuilt/synthetic-store.ts +2 -2
  610. package/src/server/prebuilt-builder.ts +16 -16
  611. package/src/server/prebuilt-runtime.ts +12 -12
  612. package/src/server/primitives.ts +7 -7
  613. package/src/server/publish-params.ts +3 -3
  614. package/src/server/request-context.ts +7 -7
  615. package/src/server/route-element-builder.ts +108 -50
  616. package/src/server/route-handler.ts +4 -4
  617. package/src/server/route-matcher.ts +5 -5
  618. package/src/server/rsc-cache-key-guard.ts +3 -5
  619. package/src/server/rsc-entry/action-middleware-runner.ts +7 -7
  620. package/src/server/rsc-entry/api-handler.ts +18 -9
  621. package/src/server/rsc-entry/deny-fallback.ts +10 -10
  622. package/src/server/rsc-entry/error-renderer.ts +27 -27
  623. package/src/server/rsc-entry/helpers.ts +10 -10
  624. package/src/server/rsc-entry/index.ts +51 -47
  625. package/src/server/rsc-entry/render-route.ts +20 -20
  626. package/src/server/rsc-entry/revalidate-renderer.ts +12 -12
  627. package/src/server/rsc-entry/rsc-payload.ts +19 -15
  628. package/src/server/rsc-entry/rsc-stream.ts +8 -8
  629. package/src/server/rsc-entry/ssr-bridge.ts +3 -3
  630. package/src/server/rsc-entry/ssr-renderer.ts +23 -23
  631. package/src/server/rsc-entry/wrap-action-dispatch.ts +9 -9
  632. package/src/server/rsc-prop-warnings.ts +1 -1
  633. package/src/server/sensitive-fields.ts +1 -1
  634. package/src/server/server-timing.ts +1 -1
  635. package/src/server/sitemap-generator.ts +3 -3
  636. package/src/server/sitemap-handler.ts +3 -3
  637. package/src/server/skippable-prefix.ts +7 -7
  638. package/src/server/slot-interception.ts +5 -5
  639. package/src/server/slot-resolver.ts +20 -28
  640. package/src/server/ssr-bridge-types.ts +2 -2
  641. package/src/server/ssr-entry.ts +18 -18
  642. package/src/server/ssr-render.ts +4 -4
  643. package/src/server/ssr-wrappers.tsx +1 -1
  644. package/src/server/state-tree-diff.ts +1 -1
  645. package/src/server/static-generator.ts +6 -6
  646. package/src/server/static-not-found.ts +3 -3
  647. package/src/server/status-code-resolver.ts +1 -1
  648. package/src/server/tracing.ts +5 -5
  649. package/src/server/tree-builder.ts +4 -4
  650. package/src/server/tree-match.ts +1 -1
  651. package/src/server/types.ts +2 -2
  652. package/src/server/utils/mdx-file.ts +2 -2
  653. package/src/server/waituntil-bridge.ts +1 -1
  654. package/src/server/workers-cache-bridge.ts +2 -2
  655. package/src/shared/als-slots.ts +1 -1
  656. package/src/shared/payload-root.ts +2 -2
  657. package/src/shared/rsc-media-type.ts +16 -0
  658. package/src/shared/slot-params.ts +1 -1
  659. package/src/shims/font-google.ts +1 -1
  660. package/src/shims/font-local.ts +1 -1
  661. package/src/shims/navigation-client.ts +5 -5
  662. package/src/shims/navigation.ts +2 -2
  663. package/dist/_chunks/actions-BjbbNRFN.js.map +0 -1
  664. package/dist/_chunks/build-output-helper-C3DrfzZR.js.map +0 -1
  665. package/dist/_chunks/cache-api-DllJ-Lyw.js.map +0 -1
  666. package/dist/_chunks/cli-check-DJZDc22E.js.map +0 -1
  667. package/dist/_chunks/convention-lint-CpteIpTm.js.map +0 -1
  668. package/dist/_chunks/dist-BA3u1z3W.js +0 -423
  669. package/dist/_chunks/dist-BA3u1z3W.js.map +0 -1
  670. package/dist/_chunks/mdx-file-C005ay-P.js.map +0 -1
  671. package/dist/_chunks/plugin-context-rCinWLiE.js.map +0 -1
  672. package/dist/_chunks/scanner-CAietmj4.js.map +0 -1
  673. package/dist/_chunks/use-segment-params-C4r4BD9T.js.map +0 -1
  674. package/dist/content/index.d.ts +0 -2
  675. package/dist/content/index.d.ts.map +0 -1
  676. package/dist/content/index.js +0 -0
  677. package/src/content/index.ts +0 -5
  678. package/src/shims/server-only-noop.js +0 -6
@@ -13,8 +13,8 @@
13
13
  import type { ViteDevServer } from 'vite';
14
14
  import { readFileSync, existsSync } from 'node:fs';
15
15
  import { resolve, normalize } from 'node:path';
16
- import type { FontPipeline } from './pipeline.js';
17
- import { fontOutputBasename, fontUrlPrefix } from './paths.js';
16
+ import type { FontPipeline } from './pipeline.ts';
17
+ import { fontOutputBasename, fontUrlPrefix } from './paths.ts';
18
18
 
19
19
  const FONT_MIME_TYPES: Record<string, string> = {
20
20
  woff2: 'font/woff2',
@@ -18,8 +18,8 @@
18
18
  import { createHash } from 'node:crypto';
19
19
  import { readFile, writeFile, mkdir, stat } from 'node:fs/promises';
20
20
  import { join } from 'node:path';
21
- import type { ExtractedFont, FontFaceDescriptor } from './types.js';
22
- import { fontUrlPrefix } from './paths.js';
21
+ import type { ExtractedFont, FontFaceDescriptor } from './types.ts';
22
+ import { fontUrlPrefix } from './paths.ts';
23
23
 
24
24
  /**
25
25
  * Extract a recognizable error code (ETIMEDOUT, ENOTFOUND, etc.) from a
@@ -14,10 +14,10 @@
14
14
  */
15
15
 
16
16
  import { resolve, dirname, extname } from 'node:path';
17
- import type { LocalFontConfig, LocalFontSrc, FontFaceDescriptor, ExtractedFont } from './types.js';
18
- import { buildFontStack } from './fallbacks.js';
19
- import { extractLocalFontConfigAst } from './ast.js';
20
- import { fontOutputBasename, fontUrlPrefix } from './paths.js';
17
+ import type { LocalFontConfig, LocalFontSrc, FontFaceDescriptor, ExtractedFont } from './types.ts';
18
+ import { buildFontStack } from './fallbacks.ts';
19
+ import { extractLocalFontConfigAst } from './ast.ts';
20
+ import { fontOutputBasename, fontUrlPrefix } from './paths.ts';
21
21
 
22
22
  /**
23
23
  * Infer the font format from a file extension.
@@ -28,14 +28,14 @@
28
28
 
29
29
  import { readFileSync, existsSync } from 'node:fs';
30
30
  import { resolve, normalize } from 'node:path';
31
- import type { ExtractedFont, FontEntry, FontFaceDescriptor } from './types.js';
32
- import type { CachedFont } from './google.js';
33
- import { contentHash } from './google.js';
34
- import { generateVariableClass, generateFontFamilyClass, generateFontFaces } from './css.js';
35
- import { generateFallbackCss } from './fallbacks.js';
36
- import { generateLocalFontFaces } from './local.js';
37
- import { hashedFontBasename, fontUrlPrefix } from './paths.js';
38
- import { VirtualFontCssIdMap } from './virtual-modules.js';
31
+ import type { ExtractedFont, FontEntry, FontFaceDescriptor } from './types.ts';
32
+ import type { CachedFont } from './google.ts';
33
+ import { contentHash } from './google.ts';
34
+ import { generateVariableClass, generateFontFamilyClass, generateFontFaces } from './css.ts';
35
+ import { generateFallbackCss } from './fallbacks.ts';
36
+ import { generateLocalFontFaces } from './local.ts';
37
+ import { hashedFontBasename, fontUrlPrefix } from './paths.ts';
38
+ import { VirtualFontCssIdMap } from './virtual-modules.ts';
39
39
 
40
40
  export class FontPipeline {
41
41
  /**
@@ -14,17 +14,17 @@
14
14
  */
15
15
 
16
16
  import MagicString from 'magic-string';
17
- import type { ExtractedFont, GoogleFontConfig } from './types.js';
18
- import { buildFontStack } from './fallbacks.js';
19
- import { processLocalFont } from './local.js';
17
+ import type { ExtractedFont, GoogleFontConfig } from './types.ts';
18
+ import { buildFontStack } from './fallbacks.ts';
19
+ import { processLocalFont } from './local.ts';
20
20
  import {
21
21
  extractFontConfigAst,
22
22
  detectDynamicFontCallAst,
23
23
  findFontCallSites,
24
24
  extractGoogleFontConfigFromNode,
25
25
  extractLocalFontConfigFromNode,
26
- } from './ast.js';
27
- import type { FontPipeline } from './pipeline.js';
26
+ } from './ast.ts';
27
+ import type { FontPipeline } from './pipeline.ts';
28
28
 
29
29
  /**
30
30
  * Convert a font family name to a scoped class name.
@@ -9,7 +9,7 @@
9
9
 
10
10
  // `CachedFont` lives in `google.ts`. Importing it here is type-only so
11
11
  // there is no runtime dependency cycle — TypeScript erases the import.
12
- import type { CachedFont } from './google.js';
12
+ import type { CachedFont } from './google.ts';
13
13
 
14
14
  /** Configuration passed to a Google font function (e.g. `Inter({ ... })`). */
15
15
  export interface GoogleFontConfig {
@@ -30,7 +30,7 @@
30
30
  */
31
31
 
32
32
  import { createHash } from 'node:crypto';
33
- import type { ExtractedFont } from './types.js';
33
+ import type { ExtractedFont } from './types.ts';
34
34
 
35
35
  export const VIRTUAL_GOOGLE = '@timber/fonts/google';
36
36
  export const VIRTUAL_LOCAL = '@timber/fonts/local';
package/src/index.ts CHANGED
@@ -11,38 +11,48 @@
11
11
  */
12
12
 
13
13
  import type { Plugin, PluginOption } from 'vite';
14
+ import type { ReactCompilerOptions } from '@vitejs/plugin-react';
14
15
  import { createLogger } from 'vite';
15
16
  import { join, relative, resolve } from 'node:path';
16
17
  import { createRequire } from 'node:module';
17
- import react, { reactCompilerPreset } from '@vitejs/plugin-react';
18
- import { timberContent } from './plugins/content';
19
- import { timberDevServer } from './plugins/dev-server';
20
- import { timberEntries } from './plugins/entries';
21
- import { timberMdx } from './plugins/mdx';
22
- import { timberRouting } from './plugins/routing';
23
- import { timberShims } from './plugins/shims';
24
- import { timberFonts } from './plugins/fonts';
25
- import { timberStaticBuild } from './plugins/static-build';
26
- import { timberBuildManifest } from './plugins/build-manifest';
27
- import { timberDevLogs, originalConsole, wrapLoggerWithOriginalConsole } from './dev-tools/logs';
28
- import { resolveForwardConsole } from './dev-tools/browser-logs';
29
- import { timberReactProd } from './plugins/react-prod';
30
- import { timberChunks } from './plugins/chunks';
31
- import { clientChunkGroup } from './plugins/client-chunks';
32
- import { timberServerBundle } from './plugins/server-bundle';
33
- import { timberCacheTransform } from './plugins/cache';
34
- import { timberRequestDep } from './plugins/request-dep/index.js';
35
- import { timberPrebuilt } from './plugins/prebuilt';
36
- import { timberPrerenderSugar } from './plugins/prerender-sugar';
37
- import { timberCloudflareWasm } from './plugins/cloudflare-wasm';
38
- import { timberAdapterBuild } from './plugins/adapter-build';
39
- import { timberBuildReport } from './plugins/build-report';
40
- import { createNoopTimer } from './utils/startup-timer';
41
- import { resolveEncryptionKeyExpression, shouldEnableEncryption } from './server/action-encryption';
42
- import { createHoldingServer } from './dev-tools/holding-server.js';
43
- import { resolveStartPort, startDevServerPort } from './server/port-resolution.js';
44
- import type { TimberUserConfig } from './config-types.js';
45
- import type { PluginContext, TimberPluginApi } from './plugin-context.js';
18
+ import react from '@vitejs/plugin-react';
19
+ import { timberContent } from './plugins/content.ts';
20
+ import { timberDevServer } from './plugins/dev-server.ts';
21
+ import { timberEntries } from './plugins/entries.ts';
22
+ import { timberMdx } from './plugins/mdx.ts';
23
+ import { timberRouting } from './plugins/routing.ts';
24
+ import { timberShims } from './plugins/shims.ts';
25
+ import { timberFonts } from './plugins/fonts.ts';
26
+ import { timberStaticBuild } from './plugins/static-build.ts';
27
+ import { timberBuildManifest } from './plugins/build-manifest.ts';
28
+ import { timberDevLogs, originalConsole, wrapLoggerWithOriginalConsole } from './dev-tools/logs.ts';
29
+ import { resolveForwardConsole } from './dev-tools/browser-logs.ts';
30
+ import { timberReactProd } from './plugins/react-prod.ts';
31
+ import { timberChunks } from './plugins/chunks.ts';
32
+ import { clientChunkGroup } from './plugins/client-chunks.ts';
33
+ import { timberServerBundle } from './plugins/server-bundle.ts';
34
+ import { timberCacheTransform } from './plugins/cache.ts';
35
+ import { timberRequestDep } from './plugins/request-dep/index.ts';
36
+ import { timberPrebuilt } from './plugins/prebuilt.ts';
37
+ import { timberPrerenderSugar } from './plugins/prerender-sugar.ts';
38
+ import { timberCloudflareWasm } from './plugins/cloudflare-wasm.ts';
39
+ import { timberAdapterBuild } from './plugins/adapter-build.ts';
40
+ import { timberBuildReport } from './plugins/build-report.ts';
41
+ import { createNoopTimer } from './utils/startup-timer.ts';
42
+ import {
43
+ validateConfig,
44
+ formatConfigErrors,
45
+ checkPeerDependencies,
46
+ formatMissingPeers,
47
+ } from './config-validation.ts';
48
+ import {
49
+ resolveEncryptionKeyExpression,
50
+ shouldEnableEncryption,
51
+ } from './server/action-encryption.ts';
52
+ import { createHoldingServer } from './dev-tools/holding-server.ts';
53
+ import { resolveStartPort, startDevServerPort } from './server/port-resolution.ts';
54
+ import type { TimberUserConfig } from './config-types.ts';
55
+ import type { PluginContext, TimberPluginApi } from './plugin-context.ts';
46
56
  import {
47
57
  createPluginContext,
48
58
  loadTimberConfigFile,
@@ -50,11 +60,11 @@ import {
50
60
  resolveAppDir,
51
61
  resolveClientJavascript,
52
62
  resolveBuildDir,
53
- } from './plugin-context.js';
63
+ } from './plugin-context.ts';
54
64
 
55
65
  // ── Public API ────────────────────────────────────────────────────────────
56
66
 
57
- export type { TimberUserConfig } from './config-types.js';
67
+ export type { TimberUserConfig } from './config-types.ts';
58
68
 
59
69
  // Metadata route handler types — re-exported so user-authored metadata
60
70
  // route files (sitemap.ts, robots.ts, manifest.ts, icon.tsx, etc.) can
@@ -62,7 +72,7 @@ export type { TimberUserConfig } from './config-types.js';
62
72
  // The canonical location for these types is '@timber-js/app/server'; this
63
73
  // root re-export is a convenience for typed metadata route handlers.
64
74
  // See design/16-metadata.md §"Metadata Routes".
65
- export type { Metadata, MetadataRoute, MetadataHandler, MetadataResult } from './server/types.js';
75
+ export type { Metadata, MetadataRoute, MetadataHandler, MetadataResult } from './server/types.ts';
66
76
 
67
77
  /**
68
78
  * Route map interface — augmented by the generated timber-routes.d.ts.
@@ -104,38 +114,6 @@ export function defineConfig(config: TimberUserConfig): TimberUserConfig {
104
114
 
105
115
  // ── Private helpers ───────────────────────────────────────────────────────
106
116
 
107
- /**
108
- * Resolve the React Compiler plugin via @rolldown/plugin-babel.
109
- *
110
- * Uses the `reactCompilerPreset` from @vitejs/plugin-react, which:
111
- * - Uses Babel ONLY for the compiler pass (OXC handles JSX)
112
- * - Automatically scopes to client environment via applyToEnvironmentHook
113
- * - Uses react/compiler-runtime built into React 19
114
- *
115
- * @rolldown/plugin-babel and babel-plugin-react-compiler are optional peer deps.
116
- * If either is missing, require() fails with a clear error message.
117
- */
118
- function resolveReactCompilerPlugin(
119
- config: true | { compilationMode?: string; target?: string },
120
- req: NodeJS.Require
121
- ): PluginOption {
122
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
123
- let babel: any;
124
- try {
125
- babel = req('@rolldown/plugin-babel');
126
- } catch {
127
- throw new Error(
128
- '[timber] reactCompiler requires @rolldown/plugin-babel. ' +
129
- 'Install it: pnpm add -D @rolldown/plugin-babel babel-plugin-react-compiler'
130
- );
131
- }
132
- const options = typeof config === 'object' ? config : {};
133
- const babelPlugin = babel.default ?? babel;
134
- return babelPlugin({
135
- presets: [reactCompilerPreset(options as Parameters<typeof reactCompilerPreset>[0])],
136
- }) as PluginOption;
137
- }
138
-
139
117
  /**
140
118
  * Build the options object for @vitejs/plugin-rsc.
141
119
  *
@@ -211,6 +189,32 @@ function createRscOptions(
211
189
  * causing file-based config for reactCompiler, actionEncryption, and
212
190
  * output mode to be silently ignored. See TIM-451.
213
191
  */
192
+ /**
193
+ * Wrap plugin-react's `vite:react-compiler` configResolved so it always
194
+ * sees `isProduction: true` during builds. The compiler plugin uses
195
+ * `!config.isProduction` to decide whether to emit jsxDEV calls, but
196
+ * Vite derives isProduction from process.env.NODE_ENV — which may be
197
+ * "development" in the shell. Rather than mutating the env, we pass a
198
+ * prototype-based view with the single property overridden.
199
+ */
200
+ function patchReactCompilerForProdJsx(plugins: PluginOption[]): PluginOption[] {
201
+ for (const p of plugins) {
202
+ if (p && typeof p === 'object' && 'name' in p && p.name === 'vite:react-compiler') {
203
+ const orig = (p as Plugin).configResolved;
204
+ if (typeof orig === 'function') {
205
+ (p as Plugin).configResolved = function (config) {
206
+ const view =
207
+ config.command === 'build' && !config.isProduction
208
+ ? Object.create(config, { isProduction: { value: true } })
209
+ : config;
210
+ return orig.call(this, view);
211
+ };
212
+ }
213
+ }
214
+ }
215
+ return plugins;
216
+ }
217
+
214
218
  export function timber(config?: TimberUserConfig): PluginOption[] {
215
219
  const ctx = createPluginContext(config);
216
220
 
@@ -243,6 +247,7 @@ export function timber(config?: TimberUserConfig): PluginOption[] {
243
247
  const earlyFileConfig = loadTimberConfigFile(process.cwd());
244
248
 
245
249
  // ── Step 4: Build rootSync plugin ───────────────────────────────────
250
+
246
251
  // rootSync loads timber.config.ts from Vite's resolved root and merges
247
252
  // it into ctx.config. Plugin resolution is handled eagerly above — the
248
253
  // config() hook must NOT return a `plugins` field (Vite ignores it).
@@ -305,19 +310,14 @@ export function timber(config?: TimberUserConfig): PluginOption[] {
305
310
  }
306
311
  }
307
312
 
308
- // Force production JSX transform for builds.
309
- //
310
- // Vite determines dev vs prod JSX via `isProduction`, which checks
311
- // `process.env.NODE_ENV === 'production'`. If the shell has
312
- // NODE_ENV=development (common in dev toolchains), `vite build`
313
- // respects that and emits jsxDEV calls with fileName/lineNumber
314
- // args. This causes runtime crashes because the production React
315
- // jsx-runtime doesn't export jsxDEV, and also leaks file paths
316
- // into production bundles (security concern).
313
+ // Force production JSX for builds.
317
314
  //
318
- // We explicitly set `oxc.jsx.development: false` for builds so
319
- // the client bundle always uses jsx/jsxs from react/jsx-runtime,
320
- // regardless of the ambient NODE_ENV value.
315
+ // Vite derives `config.isProduction` from `process.env.NODE_ENV`.
316
+ // If the shell has NODE_ENV=development, isProduction stays false
317
+ // and Vite's built-in OXC transform emits jsxDEV calls (the
318
+ // production jsx-runtime doesn't export jsxDEV). The oxc.jsx
319
+ // override below fixes Vite's native path; plugin-react's compiler
320
+ // plugin is handled by patchReactCompilerForProdJsx above.
321
321
  // ── Resolve dev/preview port (TIM-842) ───────────────────────
322
322
  // Default port is 3000 with auto-bump on conflict. Explicit user
323
323
  // overrides (`--port`, `PORT` env, `vite.config.ts` server.port)
@@ -338,7 +338,12 @@ export function timber(config?: TimberUserConfig): PluginOption[] {
338
338
  // See design/21-dev-server.md §"Default Port and Auto-Bump".
339
339
  let resolvedDevPort: number | null = null;
340
340
  let resolvedDevPortExplicit = false;
341
- if (command === 'serve' && !isPreview) {
341
+ // Middleware-mode embeddings (the analyze crawl, custom servers)
342
+ // never bind a port, and the dev-server plugin's listen() handoff
343
+ // that closes the holding server never runs — starting it would
344
+ // occupy the default port for the embedding's lifetime.
345
+ const isMiddlewareMode = Boolean(userConfig.server?.middlewareMode);
346
+ if (command === 'serve' && !isPreview && !isMiddlewareMode) {
342
347
  ctx.holdingServer = createHoldingServer();
343
348
  const holdingRef = ctx.holdingServer;
344
349
  const result = await startDevServerPort({
@@ -513,11 +518,6 @@ export function timber(config?: TimberUserConfig): PluginOption[] {
513
518
  // Validate config and check peer dependencies at startup.
514
519
  // Errors are logged to stderr but don't block startup — Vite may
515
520
  // still work partially, and the errors guide the user to fix things.
516
- /* eslint-disable no-var-requires -- sync require for startup validation */
517
- const { validateConfig, formatConfigErrors, checkPeerDependencies, formatMissingPeers } =
518
- require('./config-validation.js') as typeof import('./config-validation.js');
519
- /* eslint-enable no-var-requires */
520
-
521
521
  const configErrors = validateConfig(ctx.config);
522
522
  if (configErrors.length > 0) {
523
523
  process.stderr.write(`${formatConfigErrors(configErrors)}\n\n`);
@@ -531,19 +531,11 @@ export function timber(config?: TimberUserConfig): PluginOption[] {
531
531
  },
532
532
  };
533
533
 
534
- // ── Step 5: Resolve optional plugins ────────────────────────────────
535
- // React Compiler — resolved eagerly from either inline or file config.
536
- // Vite's config() hook return type is Omit<UserConfig, 'plugins'>, so
537
- // plugins MUST be in the top-level array — returning them from config()
538
- // silently drops them. See TIM-632.
539
- //
534
+ // ── Step 5: Resolve React Compiler config ───────────────────────────
540
535
  // Inline config takes precedence. File config (from the early cwd-based
541
536
  // load) is used when inline config doesn't set reactCompiler.
542
- const reactCompilerPlugins: PluginOption[] = [];
543
- const effectiveReactCompiler = config?.reactCompiler ?? earlyFileConfig?.reactCompiler;
544
- if (effectiveReactCompiler) {
545
- reactCompilerPlugins.push(resolveReactCompilerPlugin(effectiveReactCompiler, consumerRequire));
546
- }
537
+ // Default: true — oxc-transform-react is a direct dependency.
538
+ const effectiveReactCompiler = config?.reactCompiler ?? earlyFileConfig?.reactCompiler ?? true;
547
539
 
548
540
  // ── Step 6: Assemble plugin array ─────────────────────────────────────
549
541
  // @vitejs/plugin-rsc handles:
@@ -571,8 +563,11 @@ export function timber(config?: TimberUserConfig): PluginOption[] {
571
563
  // for client components via Babel transform. Placed before @vitejs/plugin-rsc
572
564
  // following Vinext's convention — the RSC plugin's virtual browser entry
573
565
  // coordinates with plugin-react via __vite_plugin_react_preamble_installed__.
574
- react(),
575
- ...reactCompilerPlugins,
566
+ ...patchReactCompilerForProdJsx(
567
+ react({
568
+ compiler: (effectiveReactCompiler || false) as boolean | ReactCompilerOptions,
569
+ })
570
+ ),
576
571
  vitePluginRsc(createRscOptions(ctx, encryptionKeyExpr)),
577
572
  timberShims(ctx),
578
573
  timberRouting(ctx),
@@ -12,7 +12,7 @@
12
12
  * Design doc: design/41-global-params.md §"Link Component"
13
13
  */
14
14
 
15
- import type { Codec } from '../codec.js';
15
+ import type { Codec } from '../codec.ts';
16
16
 
17
17
  let _codecs: Record<string, Codec<unknown>> | null = null;
18
18
 
@@ -8,8 +8,8 @@
8
8
  * Design doc: design/41-global-params.md
9
9
  */
10
10
 
11
- import type { Codec, CatchAllCodec, OptionalCatchAllCodec } from '../codec.js';
12
- import type { StandardSchemaV1 } from '../schema-bridge.js';
11
+ import type { Codec, CatchAllCodec, OptionalCatchAllCodec } from '../codec.ts';
12
+ import type { StandardSchemaV1 } from '../schema-bridge.ts';
13
13
 
14
14
  // ---------------------------------------------------------------------------
15
15
  // Types
@@ -5,13 +5,13 @@
5
5
  //
6
6
  // See design/41-global-params.md
7
7
 
8
- export { defineSchema } from './define-schema.js';
8
+ export { defineSchema } from './define-schema.ts';
9
9
  export type {
10
10
  InferCodecType,
11
11
  SchemaConfig,
12
12
  SegmentParamCodec,
13
13
  ValidDynamicSegmentKeys,
14
14
  ValidDynamicSegmentKeysRegistry,
15
- } from './define-schema.js';
16
- export { resolveSchemaCodecs, toBracketKey } from './resolve-schema.js';
17
- export { setLinkCodecs, getLinkCodec } from './codec-registry.js';
15
+ } from './define-schema.ts';
16
+ export { resolveSchemaCodecs, toBracketKey } from './resolve-schema.ts';
17
+ export { setLinkCodecs, getLinkCodec } from './codec-registry.ts';
@@ -9,8 +9,8 @@
9
9
  * Design doc: design/41-global-params.md §Pipeline Integration
10
10
  */
11
11
 
12
- import type { Codec } from '../codec.js';
13
- import { isCodec, resolveCodecOrSchema } from '../schema-bridge.js';
12
+ import type { Codec } from '../codec.ts';
13
+ import { isCodec, resolveCodecOrSchema } from '../schema-bridge.ts';
14
14
 
15
15
  /**
16
16
  * Reconstruct the bracket key for a segment from its type and param name.
@@ -12,18 +12,18 @@ import { existsSync } from 'node:fs';
12
12
  import { join, resolve } from 'node:path';
13
13
  import { createRequire } from 'node:module';
14
14
  import { parseAst } from 'vite';
15
- import type { RouteTree } from './routing/types';
16
- import type { BuildManifest } from './server/build-manifest';
17
- import type { CaptureSummary } from './server/prebuilt-builder';
18
- import type { StartupTimer } from './utils/startup-timer';
19
- import { createStartupTimer } from './utils/startup-timer';
20
- import type { TimberUserConfig, ClientJavascriptConfig } from './config-types.js';
21
- import type { RscManifest } from './plugins/static-build.js';
22
- import type { HoldingServer } from './dev-tools/holding-server.js';
23
- import type { ProgramNode } from './plugins/callsite-ast.js';
15
+ import type { RouteTree } from './routing/types.ts';
16
+ import type { BuildManifest } from './server/build-manifest.ts';
17
+ import type { CaptureSummary } from './server/prebuilt-builder.ts';
18
+ import type { StartupTimer } from './utils/startup-timer.ts';
19
+ import { createStartupTimer } from './utils/startup-timer.ts';
20
+ import type { TimberUserConfig, ClientJavascriptConfig } from './config-types.ts';
21
+ import type { RscManifest } from './plugins/static-build.ts';
22
+ import type { HoldingServer } from './dev-tools/holding-server.ts';
23
+ import type { ProgramNode } from './plugins/callsite-ast.ts';
24
24
 
25
25
  // Re-export for sub-plugin convenience — they import from plugin-context.ts
26
- export type { TimberUserConfig, ClientJavascriptConfig } from './config-types.js';
26
+ export type { TimberUserConfig, ClientJavascriptConfig } from './config-types.ts';
27
27
 
28
28
  // ── Client JavaScript config ─────────────────────────────────────────────
29
29
 
@@ -17,11 +17,11 @@ import type { Plugin } from 'vite';
17
17
  import { join } from 'node:path';
18
18
  import { pathToFileURL } from 'node:url';
19
19
  import { readFile, writeFile } from 'node:fs/promises';
20
- import type { PluginContext } from '../plugin-context.js';
21
- import type { TimberPlatformAdapter, TimberConfig } from '../adapters/types.js';
22
- import type { BuildManifest } from '../server/build-manifest.js';
23
- import { swallow } from '../server/logger.js';
24
- import { normalizeBasePath } from '../shared/base-path.js';
20
+ import type { PluginContext } from '../plugin-context.ts';
21
+ import type { TimberPlatformAdapter, TimberConfig } from '../adapters/types.ts';
22
+ import type { BuildManifest } from '../server/build-manifest.ts';
23
+ import { swallow } from '../server/logger.ts';
24
+ import { normalizeBasePath } from '../shared/base-path.ts';
25
25
 
26
26
  export function timberAdapterBuild(ctx: PluginContext): Plugin {
27
27
  return {
@@ -19,10 +19,10 @@
19
19
  import { randomUUID, createHash } from 'node:crypto';
20
20
  import { readFileSync } from 'node:fs';
21
21
  import type { Plugin, ResolvedConfig } from 'vite';
22
- import type { PluginContext } from '../plugin-context.js';
23
- import { EMPTY_BUILD_MANIFEST, type BuildManifest } from '../server/build-manifest.js';
24
- import type { SegmentNode, RouteFile } from '../routing/types.js';
25
- import { isDynamicMetadataExtension } from '../server/metadata-routes.js';
22
+ import type { PluginContext } from '../plugin-context.ts';
23
+ import { EMPTY_BUILD_MANIFEST, type BuildManifest } from '../server/build-manifest.ts';
24
+ import type { SegmentNode, RouteFile } from '../routing/types.ts';
25
+ import { isDynamicMetadataExtension } from '../server/metadata-routes.ts';
26
26
 
27
27
  // Rollup types used by generateBundle hook — imported from vite which re-exports them.
28
28
  // We define minimal interfaces here to avoid a direct 'rollup' dependency.
@@ -17,12 +17,12 @@ import { readFileSync } from 'node:fs';
17
17
  import { join, relative } from 'node:path';
18
18
  import { gzipSync } from 'node:zlib';
19
19
  import type { Plugin, Logger } from 'vite';
20
- import type { PluginContext } from '../plugin-context.js';
21
- import type { SegmentNode, RouteTree } from '../routing/types.js';
22
- import type { CaptureSummary } from '../server/prebuilt-builder.js';
23
- import type { PrebuiltManifest } from '../server/prebuilt/payload-source.js';
24
- import { collectLeafRoutes } from '../routing/walkers.js';
25
- import { formatSize } from '../utils/format.js';
20
+ import type { PluginContext } from '../plugin-context.ts';
21
+ import type { SegmentNode, RouteTree } from '../routing/types.ts';
22
+ import type { CaptureSummary } from '../server/prebuilt-builder.ts';
23
+ import type { PrebuiltManifest } from '../server/prebuilt/payload-source.ts';
24
+ import { collectLeafRoutes } from '../routing/walkers.ts';
25
+ import { formatSize } from '../utils/format.ts';
26
26
 
27
27
  // ─── Public types ─────────────────────────────────────────────────────────
28
28
 
@@ -56,14 +56,14 @@
56
56
  import { relative } from 'node:path';
57
57
  import MagicString from 'magic-string';
58
58
  import type { Plugin } from 'vite';
59
- import type { PluginContext } from '../plugin-context.js';
59
+ import type { PluginContext } from '../plugin-context.ts';
60
60
  import {
61
61
  CACHE_MODULE_SOURCES,
62
62
  collectShadowRanges,
63
63
  findCallSites,
64
64
  findImportBindings,
65
65
  generateStableCallsiteId,
66
- } from './callsite-ast.js';
66
+ } from './callsite-ast.ts';
67
67
  import type {
68
68
  CallExpressionNode,
69
69
  IdentifierNode,
@@ -72,7 +72,7 @@ import type {
72
72
  PositionedNode,
73
73
  ProgramNode,
74
74
  ShadowRange,
75
- } from './callsite-ast.js';
75
+ } from './callsite-ast.ts';
76
76
 
77
77
  /**
78
78
  * Is this callee a `cache.data(...)` call? Matches two forms:
@@ -10,7 +10,7 @@
10
10
  * See TIM-997, TIM-1053, design/06-caching.md §"Cache Key Security".
11
11
  */
12
12
 
13
- import { fnv1aHash } from '../cache/fast-hash.js';
13
+ import { fnv1aHash } from '../cache/fast-hash.ts';
14
14
 
15
15
  /** Module specifiers whose bindings the transforms track. */
16
16
  export const CACHE_MODULE_SOURCES = new Set(['@timber-js/app/cache', 'timber/cache']);
@@ -11,8 +11,8 @@
11
11
  * See design/44-render-at-build-time.md §Props Derivation at Build Time.
12
12
  */
13
13
 
14
- import type { PluginContext } from '../plugin-context.js';
15
- import type { IdentifierNode, PositionedNode, ProgramNode } from './callsite-ast.js';
14
+ import type { PluginContext } from '../plugin-context.ts';
15
+ import type { IdentifierNode, PositionedNode, ProgramNode } from './callsite-ast.ts';
16
16
 
17
17
  interface JSXElementNode extends PositionedNode {
18
18
  type: 'JSXElement';
@@ -22,7 +22,7 @@
22
22
  */
23
23
 
24
24
  import type { Plugin, Rollup } from 'vite';
25
- import type { PluginContext } from '../plugin-context';
25
+ import type { PluginContext } from '../plugin-context.ts';
26
26
 
27
27
  /**
28
28
  * Check if a module is part of the timber framework runtime.
@@ -20,7 +20,7 @@ import { basename, resolve, dirname } from 'node:path';
20
20
  import { createHash } from 'node:crypto';
21
21
  import { copyFile, mkdir, readFile } from 'node:fs/promises';
22
22
  import type { Plugin, ResolvedConfig } from 'vite';
23
- import type { PluginContext } from '../plugin-context.js';
23
+ import type { PluginContext } from '../plugin-context.ts';
24
24
 
25
25
  function isCloudflareAdapter(ctx: PluginContext): boolean {
26
26
  const adapter = ctx.config.adapter as { name?: string } | undefined;
@@ -11,7 +11,7 @@
11
11
  import type { Plugin } from 'vite';
12
12
  import { existsSync } from 'node:fs';
13
13
  import { join } from 'node:path';
14
- import type { PluginContext } from '../plugin-context.js';
14
+ import type { PluginContext } from '../plugin-context.ts';
15
15
 
16
16
  const CONFIG_FILE_NAMES = [
17
17
  'content-collections.ts',
@@ -127,6 +127,10 @@ export function timberContent(ctx: PluginContext): Plugin {
127
127
  },
128
128
 
129
129
  async configureServer(server) {
130
+ // The analyze crawl child must not start content-collections'
131
+ // file watcher — it outlives server.close() and holds the
132
+ // process open (the child relies on process.exit to clean up).
133
+ if (process.env.TIMBER_ANALYZE === '1') return;
130
134
  if (!innerPlugin) return;
131
135
  if (typeof innerPlugin.configureServer === 'function') {
132
136
  await (innerPlugin.configureServer as (...args: unknown[]) => unknown).call(this, server);