@rshono/core 1.0.0-rc.2 → 1.0.0-rc.21

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 (208) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +348 -158
  3. package/bin/rshono.mjs +3 -4
  4. package/dist/builder/env-shadow-loader.cjs +123 -8
  5. package/dist/builder/page-entry-loader.cjs +28 -1
  6. package/dist/builder/page-files.d.ts +0 -1
  7. package/dist/builder/page-files.js +7 -3
  8. package/dist/builder/page-files.js.map +1 -1
  9. package/dist/builder/public-env.d.ts +7 -1
  10. package/dist/builder/public-env.js +7 -0
  11. package/dist/builder/public-env.js.map +1 -1
  12. package/dist/builder/react-versions.d.ts +12 -0
  13. package/dist/builder/react-versions.js +74 -0
  14. package/dist/builder/react-versions.js.map +1 -0
  15. package/dist/builder/rspack-config.d.ts +13 -4
  16. package/dist/builder/rspack-config.js +136 -53
  17. package/dist/builder/rspack-config.js.map +1 -1
  18. package/dist/builder/server-only-imports.d.ts +32 -0
  19. package/dist/builder/server-only-imports.js +51 -0
  20. package/dist/builder/server-only-imports.js.map +1 -0
  21. package/dist/cli/build.d.ts +2 -3
  22. package/dist/cli/build.js +51 -13
  23. package/dist/cli/build.js.map +1 -1
  24. package/dist/cli/dev.d.ts +2 -3
  25. package/dist/cli/dev.js +149 -45
  26. package/dist/cli/dev.js.map +1 -1
  27. package/dist/cli/exit.d.ts +12 -0
  28. package/dist/cli/exit.js +16 -0
  29. package/dist/cli/exit.js.map +1 -0
  30. package/dist/cli/index.d.ts +0 -1
  31. package/dist/cli/index.js +91 -30
  32. package/dist/cli/index.js.map +1 -1
  33. package/dist/cli/start.d.ts +0 -1
  34. package/dist/cli/start.js +15 -18
  35. package/dist/cli/start.js.map +1 -1
  36. package/dist/config.d.ts +72 -78
  37. package/dist/config.js +17 -1
  38. package/dist/config.js.map +1 -1
  39. package/dist/deploy/aws-lambda/runtime.d.ts +4 -7
  40. package/dist/deploy/aws-lambda/runtime.js +5 -8
  41. package/dist/deploy/aws-lambda/runtime.js.map +1 -1
  42. package/dist/deploy/build-marker.d.ts +9 -6
  43. package/dist/deploy/build-marker.js +8 -4
  44. package/dist/deploy/build-marker.js.map +1 -1
  45. package/dist/deploy/cloudflare/build.d.ts +0 -1
  46. package/dist/deploy/cloudflare/build.js +17 -13
  47. package/dist/deploy/cloudflare/build.js.map +1 -1
  48. package/dist/deploy/cloudflare/runtime.d.ts +2 -6
  49. package/dist/deploy/cloudflare/runtime.js +73 -68
  50. package/dist/deploy/cloudflare/runtime.js.map +1 -1
  51. package/dist/deploy/contract.d.ts +57 -41
  52. package/dist/deploy/contract.js.map +1 -1
  53. package/dist/deploy/filesystem.d.ts +3 -6
  54. package/dist/deploy/filesystem.js +23 -20
  55. package/dist/deploy/filesystem.js.map +1 -1
  56. package/dist/deploy/node/runtime.d.ts +5 -3
  57. package/dist/deploy/node/runtime.js +23 -9
  58. package/dist/deploy/node/runtime.js.map +1 -1
  59. package/dist/deploy/presets.d.ts +34 -30
  60. package/dist/deploy/presets.js +56 -44
  61. package/dist/deploy/presets.js.map +1 -1
  62. package/dist/deploy/public-paths.d.ts +42 -0
  63. package/dist/deploy/public-paths.js +66 -0
  64. package/dist/deploy/public-paths.js.map +1 -0
  65. package/dist/deploy/vercel/build.d.ts +0 -1
  66. package/dist/deploy/vercel/build.js +25 -16
  67. package/dist/deploy/vercel/build.js.map +1 -1
  68. package/dist/deploy/vercel/runtime.d.ts +10 -7
  69. package/dist/deploy/vercel/runtime.js +48 -11
  70. package/dist/deploy/vercel/runtime.js.map +1 -1
  71. package/dist/index.d.ts +19 -17
  72. package/dist/index.js +20 -10
  73. package/dist/index.js.map +1 -1
  74. package/dist/router.d.ts +212 -120
  75. package/dist/router.js +3 -8
  76. package/dist/router.js.map +1 -1
  77. package/dist/runtime/boundaries.d.ts +62 -48
  78. package/dist/runtime/boundaries.js +32 -34
  79. package/dist/runtime/boundaries.js.map +1 -1
  80. package/dist/runtime/client.d.ts +20 -11
  81. package/dist/runtime/client.js +20 -10
  82. package/dist/runtime/client.js.map +1 -1
  83. package/dist/runtime/context.d.ts +304 -123
  84. package/dist/runtime/context.js +377 -149
  85. package/dist/runtime/context.js.map +1 -1
  86. package/dist/runtime/control.d.ts +15 -1
  87. package/dist/runtime/control.js +24 -0
  88. package/dist/runtime/control.js.map +1 -1
  89. package/dist/runtime/dev-protocol.d.ts +4 -9
  90. package/dist/runtime/dev-protocol.js.map +1 -1
  91. package/dist/runtime/empty-server-app.d.ts +0 -1
  92. package/dist/runtime/entry.client.d.ts +4 -1
  93. package/dist/runtime/entry.client.js +455 -313
  94. package/dist/runtime/entry.client.js.map +1 -1
  95. package/dist/runtime/entry.rsc.d.ts +15 -7
  96. package/dist/runtime/entry.rsc.js +811 -252
  97. package/dist/runtime/entry.rsc.js.map +1 -1
  98. package/dist/runtime/entry.ssr.d.ts +27 -10
  99. package/dist/runtime/entry.ssr.js +30 -48
  100. package/dist/runtime/entry.ssr.js.map +1 -1
  101. package/dist/runtime/failure-document.d.ts +11 -0
  102. package/dist/runtime/failure-document.js +35 -0
  103. package/dist/runtime/failure-document.js.map +1 -0
  104. package/dist/runtime/flight-inject.d.ts +23 -0
  105. package/dist/runtime/flight-inject.js +403 -0
  106. package/dist/runtime/flight-inject.js.map +1 -0
  107. package/dist/runtime/hot-update.d.ts +44 -0
  108. package/dist/runtime/hot-update.js +44 -0
  109. package/dist/runtime/hot-update.js.map +1 -0
  110. package/dist/runtime/navigation.d.ts +46 -54
  111. package/dist/runtime/navigation.js +22 -63
  112. package/dist/runtime/navigation.js.map +1 -1
  113. package/dist/runtime/request.d.ts +42 -8
  114. package/dist/runtime/request.js +84 -7
  115. package/dist/runtime/request.js.map +1 -1
  116. package/dist/runtime/server.d.ts +20 -18
  117. package/dist/runtime/server.js +22 -17
  118. package/dist/runtime/server.js.map +1 -1
  119. package/dist/runtime/validate-entries.d.ts +77 -0
  120. package/dist/runtime/validate-entries.js +405 -0
  121. package/dist/runtime/validate-entries.js.map +1 -0
  122. package/dist/server/headers.d.ts +41 -15
  123. package/dist/server/headers.js +53 -24
  124. package/dist/server/headers.js.map +1 -1
  125. package/dist/server/load-config.d.ts +4 -5
  126. package/dist/server/load-config.js +22 -14
  127. package/dist/server/load-config.js.map +1 -1
  128. package/dist/server/load-env.d.ts +0 -1
  129. package/dist/server/prerendered.d.ts +88 -34
  130. package/dist/server/prerendered.js +184 -24
  131. package/dist/server/prerendered.js.map +1 -1
  132. package/dist/server/server-config.d.ts +35 -50
  133. package/dist/server/server-config.js +27 -74
  134. package/dist/server/server-config.js.map +1 -1
  135. package/dist/server/shutdown.d.ts +5 -4
  136. package/dist/server/shutdown.js +5 -3
  137. package/dist/server/shutdown.js.map +1 -1
  138. package/dist/server/ssg.d.ts +9 -7
  139. package/dist/server/ssg.js +209 -65
  140. package/dist/server/ssg.js.map +1 -1
  141. package/dist/server/static.d.ts +0 -1
  142. package/dist/server/static.js +7 -1
  143. package/dist/server/static.js.map +1 -1
  144. package/package.json +21 -23
  145. package/dist/builder/page-files.d.ts.map +0 -1
  146. package/dist/builder/public-env.d.ts.map +0 -1
  147. package/dist/builder/rspack-config.d.ts.map +0 -1
  148. package/dist/cli/build.d.ts.map +0 -1
  149. package/dist/cli/dev.d.ts.map +0 -1
  150. package/dist/cli/index.d.ts.map +0 -1
  151. package/dist/cli/start.d.ts.map +0 -1
  152. package/dist/config.d.ts.map +0 -1
  153. package/dist/deploy/aws-lambda/runtime.d.ts.map +0 -1
  154. package/dist/deploy/build-marker.d.ts.map +0 -1
  155. package/dist/deploy/bun/runtime.d.ts +0 -11
  156. package/dist/deploy/bun/runtime.d.ts.map +0 -1
  157. package/dist/deploy/bun/runtime.js +0 -22
  158. package/dist/deploy/bun/runtime.js.map +0 -1
  159. package/dist/deploy/cloudflare/build.d.ts.map +0 -1
  160. package/dist/deploy/cloudflare/runtime.d.ts.map +0 -1
  161. package/dist/deploy/contract.d.ts.map +0 -1
  162. package/dist/deploy/deno/runtime.d.ts +0 -11
  163. package/dist/deploy/deno/runtime.d.ts.map +0 -1
  164. package/dist/deploy/deno/runtime.js +0 -16
  165. package/dist/deploy/deno/runtime.js.map +0 -1
  166. package/dist/deploy/filesystem.d.ts.map +0 -1
  167. package/dist/deploy/listen.d.ts +0 -20
  168. package/dist/deploy/listen.d.ts.map +0 -1
  169. package/dist/deploy/listen.js +0 -24
  170. package/dist/deploy/listen.js.map +0 -1
  171. package/dist/deploy/netlify/build.d.ts +0 -8
  172. package/dist/deploy/netlify/build.d.ts.map +0 -1
  173. package/dist/deploy/netlify/build.js +0 -52
  174. package/dist/deploy/netlify/build.js.map +0 -1
  175. package/dist/deploy/netlify/runtime.d.ts +0 -13
  176. package/dist/deploy/netlify/runtime.d.ts.map +0 -1
  177. package/dist/deploy/netlify/runtime.js +0 -24
  178. package/dist/deploy/netlify/runtime.js.map +0 -1
  179. package/dist/deploy/node/runtime.d.ts.map +0 -1
  180. package/dist/deploy/presets.d.ts.map +0 -1
  181. package/dist/deploy/vercel/build.d.ts.map +0 -1
  182. package/dist/deploy/vercel/runtime.d.ts.map +0 -1
  183. package/dist/index.d.ts.map +0 -1
  184. package/dist/router.d.ts.map +0 -1
  185. package/dist/runtime/boundaries.d.ts.map +0 -1
  186. package/dist/runtime/client.d.ts.map +0 -1
  187. package/dist/runtime/context.d.ts.map +0 -1
  188. package/dist/runtime/control.d.ts.map +0 -1
  189. package/dist/runtime/dev-protocol.d.ts.map +0 -1
  190. package/dist/runtime/empty-server-app.d.ts.map +0 -1
  191. package/dist/runtime/entry.client.d.ts.map +0 -1
  192. package/dist/runtime/entry.rsc.d.ts.map +0 -1
  193. package/dist/runtime/entry.ssr.d.ts.map +0 -1
  194. package/dist/runtime/navigation.d.ts.map +0 -1
  195. package/dist/runtime/request.d.ts.map +0 -1
  196. package/dist/runtime/server.d.ts.map +0 -1
  197. package/dist/server/compress.d.ts +0 -15
  198. package/dist/server/compress.d.ts.map +0 -1
  199. package/dist/server/compress.js +0 -76
  200. package/dist/server/compress.js.map +0 -1
  201. package/dist/server/headers.d.ts.map +0 -1
  202. package/dist/server/load-config.d.ts.map +0 -1
  203. package/dist/server/load-env.d.ts.map +0 -1
  204. package/dist/server/prerendered.d.ts.map +0 -1
  205. package/dist/server/server-config.d.ts.map +0 -1
  206. package/dist/server/shutdown.d.ts.map +0 -1
  207. package/dist/server/ssg.d.ts.map +0 -1
  208. package/dist/server/static.d.ts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"public-env.d.ts","sourceRoot":"","sources":["../../src/builder/public-env.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAGhE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"rspack-config.d.ts","sourceRoot":"","sources":["../../src/builder/rspack-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,aAAa,EAAoB,MAAM,cAAc,CAAC;AAK3F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AA4FzD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,2IAA2I;IAC3I,MAAM,EAAE,YAAY,CAAC;IACrB,4GAA4G;IAC5G,MAAM,EAAE,YAAY,CAAC;IACrB,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;CACvC;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,mBAAmB,GAAG,CAAC,aAAa,EAAE,aAAa,CAAC,CA6M1F"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/cli/build.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIzD,UAAU,YAAY;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,YAAY,CAAC;IACrB,iGAAiG;IACjG,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA6DvE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/cli/dev.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAQjD,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAuNnE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/cli/start.ts"],"names":[],"mappings":"AAOA,UAAU,YAAY;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAiCvE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,kGAAkG;AAClG,MAAM,WAAW,iBAAiB;IAChC,oGAAoG;IACpG,QAAQ,EAAE,OAAO,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AC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-marker.d.ts","sourceRoot":"","sources":["../../src/deploy/build-marker.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,8FAA8F;AAC9F,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,YAAY,CAAC;CACtB;AAID,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAE5E;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CASpE"}
@@ -1,11 +0,0 @@
1
- import type { DeployRuntime } from '../contract.js';
2
- /**
3
- * Bun: a long-lived process like Node, but the runtime — not the app — opens the socket. Bun reads
4
- * `fetch`, `port` and `hostname` off the module's default export and serves it, so there is nothing to
5
- * bind here and no server handle to close on shutdown.
6
- *
7
- * Everything else is Node's: Bun implements the `node:` APIs `server/` uses, so assets, gzip and
8
- * `.env` loading are the same code.
9
- */
10
- export declare const runtime: DeployRuntime;
11
- //# sourceMappingURL=runtime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/deploy/bun/runtime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAIpD;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,EAAE,aAUrB,CAAC"}
@@ -1,22 +0,0 @@
1
- import { fileSystemRuntime } from '../filesystem.js';
2
- import { listenAddress, readyMessage } from '../listen.js';
3
- /**
4
- * Bun: a long-lived process like Node, but the runtime — not the app — opens the socket. Bun reads
5
- * `fetch`, `port` and `hostname` off the module's default export and serves it, so there is nothing to
6
- * bind here and no server handle to close on shutdown.
7
- *
8
- * Everything else is Node's: Bun implements the `node:` APIs `server/` uses, so assets, gzip and
9
- * `.env` loading are the same code.
10
- */
11
- export const runtime = {
12
- ...fileSystemRuntime,
13
- serveApp(app) {
14
- const address = listenAddress();
15
- // The prerender pass imports this bundle; returning the export is inert either way, so unlike the
16
- // Node preset there is nothing to suppress. Only the log line is worth skipping.
17
- if (!process.env.RSHONO_PRERENDER)
18
- console.log(readyMessage(address));
19
- return { fetch: app.fetch, ...address };
20
- },
21
- };
22
- //# sourceMappingURL=runtime.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../../src/deploy/bun/runtime.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE3D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,OAAO,GAAkB;IACpC,GAAG,iBAAiB;IAEpB,QAAQ,CAAC,GAAS;QAChB,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;QAChC,kGAAkG;QAClG,iFAAiF;QACjF,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB;YAAE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;QACtE,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC;IAC1C,CAAC;CACF,CAAC","sourcesContent":["import type { Hono } from 'hono';\nimport type { DeployRuntime } from '../contract.js';\nimport { fileSystemRuntime } from '../filesystem.js';\nimport { listenAddress, readyMessage } from '../listen.js';\n\n/**\n * Bun: a long-lived process like Node, but the runtime — not the app — opens the socket. Bun reads\n * `fetch`, `port` and `hostname` off the module's default export and serves it, so there is nothing to\n * bind here and no server handle to close on shutdown.\n *\n * Everything else is Node's: Bun implements the `node:` APIs `server/` uses, so assets, gzip and\n * `.env` loading are the same code.\n */\nexport const runtime: DeployRuntime = {\n ...fileSystemRuntime,\n\n serveApp(app: Hono): unknown {\n const address = listenAddress();\n // The prerender pass imports this bundle; returning the export is inert either way, so unlike the\n // Node preset there is nothing to suppress. Only the log line is worth skipping.\n if (!process.env.RSHONO_PRERENDER) console.log(readyMessage(address));\n return { fetch: app.fetch, ...address };\n },\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/deploy/cloudflare/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAmDxD;;;GAGG;AACH,wBAAsB,uBAAuB,CAAC,GAAG,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BpF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/deploy/cloudflare/runtime.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AA2EpD;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,EAAE,aA4DrB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/deploy/contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAElF;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,YAAY,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,CAAC;AAExG;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;;;OAOG;IACH,QAAQ,CAAC,GAAG,EAAE,IAAI,GAAG,OAAO,CAAC;IAC7B;;;;;OAKG;IACH,iBAAiB,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,CAAC;IACnC;;;OAGG;IACH,mBAAmB,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,CAAC;IACrC;;;;;;;;OAQG;IACH,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC;IACxF;;;;;OAKG;IACH,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACnC,4GAA4G;IAC5G,OAAO,IAAI,IAAI,CAAC;CACjB"}
@@ -1,11 +0,0 @@
1
- import type { DeployRuntime } from '../contract.js';
2
- /**
3
- * Deno: `deno serve` and Deno Deploy both look for a `fetch` on the default export, so the handoff is
4
- * an export rather than a listener — which is also what makes one build work for both.
5
- *
6
- * The compiler settings stay Node's deliberately. Deno's `node:` compatibility covers everything
7
- * `server/` uses, so the Node builds of React and the RSC runtime run as-is, and the alternative would
8
- * be a second bundle shape to keep working for no behavioural gain.
9
- */
10
- export declare const runtime: DeployRuntime;
11
- //# sourceMappingURL=runtime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/deploy/deno/runtime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,EAAE,aAMrB,CAAC"}
@@ -1,16 +0,0 @@
1
- import { fileSystemRuntime } from '../filesystem.js';
2
- /**
3
- * Deno: `deno serve` and Deno Deploy both look for a `fetch` on the default export, so the handoff is
4
- * an export rather than a listener — which is also what makes one build work for both.
5
- *
6
- * The compiler settings stay Node's deliberately. Deno's `node:` compatibility covers everything
7
- * `server/` uses, so the Node builds of React and the RSC runtime run as-is, and the alternative would
8
- * be a second bundle shape to keep working for no behavioural gain.
9
- */
10
- export const runtime = {
11
- ...fileSystemRuntime,
12
- serveApp(app) {
13
- return { fetch: app.fetch };
14
- },
15
- };
16
- //# sourceMappingURL=runtime.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../../src/deploy/deno/runtime.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,OAAO,GAAkB;IACpC,GAAG,iBAAiB;IAEpB,QAAQ,CAAC,GAAS;QAChB,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACF,CAAC","sourcesContent":["import type { Hono } from 'hono';\nimport type { DeployRuntime } from '../contract.js';\nimport { fileSystemRuntime } from '../filesystem.js';\n\n/**\n * Deno: `deno serve` and Deno Deploy both look for a `fetch` on the default export, so the handoff is\n * an export rather than a listener — which is also what makes one build work for both.\n *\n * The compiler settings stay Node's deliberately. Deno's `node:` compatibility covers everything\n * `server/` uses, so the Node builds of React and the RSC runtime run as-is, and the alternative would\n * be a second bundle shape to keep working for no behavioural gain.\n */\nexport const runtime: DeployRuntime = {\n ...fileSystemRuntime,\n\n serveApp(app: Hono): unknown {\n return { fetch: app.fetch };\n },\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"filesystem.d.ts","sourceRoot":"","sources":["../../src/deploy/filesystem.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAqBnD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,CAmB7D,CAAC"}
@@ -1,20 +0,0 @@
1
- /** What to bind, for the targets where rshono owns the process rather than being handed a request. */
2
- export interface ListenAddress {
3
- port: number;
4
- hostname: string;
5
- }
6
- /**
7
- * Resolves the address to listen on: an explicit override (the dev server, which picks the port for
8
- * its worker) beats the environment, which beats `rshono.config.ts`, which beats the built-in default.
9
- *
10
- * `PORT` and `HOST` stay env-overridable because that is the deployment convention everywhere this
11
- * runs — a container, a process manager, a PaaS. `??` rather than `||` so an explicit `PORT=0`, which
12
- * means "any free port", is honoured.
13
- */
14
- export declare function listenAddress(overrides?: {
15
- port?: number;
16
- hostname?: string;
17
- }): ListenAddress;
18
- /** What to print once listening — `localhost` rather than the wildcard the socket is actually bound to. */
19
- export declare function readyMessage({ port, hostname }: ListenAddress): string;
20
- //# sourceMappingURL=listen.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"listen.d.ts","sourceRoot":"","sources":["../../src/deploy/listen.ts"],"names":[],"mappings":"AAOA,sGAAsG;AACtG,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,SAAS,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,aAAa,CAM7F;AAED,2GAA2G;AAC3G,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,aAAa,GAAG,MAAM,CAEtE"}
@@ -1,24 +0,0 @@
1
- import { SERVER_DEFAULTS } from '../server/server-config.js';
2
- const CONFIG = __RSHONO_CONFIG__;
3
- /** Bound to every interface — so the address printed on start is `localhost`, not this. */
4
- const WILDCARD_HOST = '0.0.0.0';
5
- /**
6
- * Resolves the address to listen on: an explicit override (the dev server, which picks the port for
7
- * its worker) beats the environment, which beats `rshono.config.ts`, which beats the built-in default.
8
- *
9
- * `PORT` and `HOST` stay env-overridable because that is the deployment convention everywhere this
10
- * runs — a container, a process manager, a PaaS. `??` rather than `||` so an explicit `PORT=0`, which
11
- * means "any free port", is honoured.
12
- */
13
- export function listenAddress(overrides) {
14
- const envPort = process.env.PORT !== undefined ? Number(process.env.PORT) : undefined;
15
- return {
16
- port: overrides?.port ?? envPort ?? CONFIG.port ?? SERVER_DEFAULTS.port,
17
- hostname: overrides?.hostname ?? process.env.HOST ?? CONFIG.host ?? SERVER_DEFAULTS.host,
18
- };
19
- }
20
- /** What to print once listening — `localhost` rather than the wildcard the socket is actually bound to. */
21
- export function readyMessage({ port, hostname }) {
22
- return ` ➜ rshono serving on http://${hostname === WILDCARD_HOST ? 'localhost' : hostname}:${port}`;
23
- }
24
- //# sourceMappingURL=listen.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"listen.js","sourceRoot":"","sources":["../../src/deploy/listen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,MAAM,MAAM,GAAG,iBAAiB,CAAC;AAEjC,2FAA2F;AAC3F,MAAM,aAAa,GAAG,SAAS,CAAC;AAQhC;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,SAAgD;IAC5E,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACtF,OAAO;QACL,IAAI,EAAE,SAAS,EAAE,IAAI,IAAI,OAAO,IAAI,MAAM,CAAC,IAAI,IAAI,eAAe,CAAC,IAAI;QACvE,QAAQ,EAAE,SAAS,EAAE,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,IAAI,eAAe,CAAC,IAAI;KACzF,CAAC;AACJ,CAAC;AAED,2GAA2G;AAC3G,MAAM,UAAU,YAAY,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAiB;IAC5D,OAAO,gCAAgC,QAAQ,KAAK,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC;AACvG,CAAC","sourcesContent":["import { SERVER_DEFAULTS } from '../server/server-config.js';\n\nconst CONFIG = __RSHONO_CONFIG__;\n\n/** Bound to every interface — so the address printed on start is `localhost`, not this. */\nconst WILDCARD_HOST = '0.0.0.0';\n\n/** What to bind, for the targets where rshono owns the process rather than being handed a request. */\nexport interface ListenAddress {\n port: number;\n hostname: string;\n}\n\n/**\n * Resolves the address to listen on: an explicit override (the dev server, which picks the port for\n * its worker) beats the environment, which beats `rshono.config.ts`, which beats the built-in default.\n *\n * `PORT` and `HOST` stay env-overridable because that is the deployment convention everywhere this\n * runs — a container, a process manager, a PaaS. `??` rather than `||` so an explicit `PORT=0`, which\n * means \"any free port\", is honoured.\n */\nexport function listenAddress(overrides?: { port?: number; hostname?: string }): ListenAddress {\n const envPort = process.env.PORT !== undefined ? Number(process.env.PORT) : undefined;\n return {\n port: overrides?.port ?? envPort ?? CONFIG.port ?? SERVER_DEFAULTS.port,\n hostname: overrides?.hostname ?? process.env.HOST ?? CONFIG.host ?? SERVER_DEFAULTS.host,\n };\n}\n\n/** What to print once listening — `localhost` rather than the wildcard the socket is actually bound to. */\nexport function readyMessage({ port, hostname }: ListenAddress): string {\n return ` ➜ rshono serving on http://${hostname === WILDCARD_HOST ? 'localhost' : hostname}:${port}`;\n}\n"]}
@@ -1,8 +0,0 @@
1
- import type { DeployBuildContext } from '../presets.js';
2
- /**
3
- * `dist/server/main.mjs` is kept at that exact path inside the function bundle because the runtime
4
- * derives the project root from where it sits (see `deploy/filesystem.ts`), which is what puts
5
- * `dist/ssg` within reach at request time.
6
- */
7
- export declare function finalizeNetlifyBuild(ctx: DeployBuildContext): Promise<void>;
8
- //# sourceMappingURL=build.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/deploy/netlify/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AA0BxD;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBjF"}
@@ -1,52 +0,0 @@
1
- import { cpSync, existsSync, mkdirSync, writeFileSync } from 'node:fs';
2
- import { rm } from 'node:fs/promises';
3
- import { join } from 'node:path';
4
- /**
5
- * What Netlify uploads: a publish directory the CDN serves, and an internal function directory the
6
- * platform picks handlers up from without the project needing a `netlify/functions` folder of its own.
7
- */
8
- const PUBLISH_DIR = join('.netlify', 'publish');
9
- const FUNCTIONS_DIR = join('.netlify', 'functions-internal');
10
- const FUNCTION_NAME = 'rshono-server';
11
- /**
12
- * The function entry Netlify loads. It re-exports the built bundle's default handler and, next to it,
13
- * the v2 `config` that claims every path — so routing is declared in code rather than in a redirect
14
- * rule the project would have to maintain.
15
- *
16
- * `preferStatic` is what keeps the CDN in front: a path that exists in the publish directory is served
17
- * from there and the function is never invoked.
18
- */
19
- const FUNCTION_ENTRY = `export { default } from '../../dist/server/main.mjs';
20
-
21
- export const config = {
22
- path: '/*',
23
- preferStatic: true,
24
- };
25
- `;
26
- /**
27
- * `dist/server/main.mjs` is kept at that exact path inside the function bundle because the runtime
28
- * derives the project root from where it sits (see `deploy/filesystem.ts`), which is what puts
29
- * `dist/ssg` within reach at request time.
30
- */
31
- export async function finalizeNetlifyBuild(ctx) {
32
- const publishDir = join(ctx.rootDir, PUBLISH_DIR);
33
- const functionsDir = join(ctx.rootDir, FUNCTIONS_DIR);
34
- // Rebuilt from scratch, so a deleted page or asset cannot survive in the uploaded output.
35
- await rm(publishDir, { recursive: true, force: true });
36
- await rm(functionsDir, { recursive: true, force: true });
37
- mkdirSync(publishDir, { recursive: true });
38
- mkdirSync(functionsDir, { recursive: true });
39
- cpSync(ctx.staticDir, join(publishDir, '_static'), { recursive: true });
40
- if (ctx.publicDir)
41
- cpSync(ctx.publicDir, publishDir, { recursive: true });
42
- // The one header the CDN cannot infer; everything else keeps Netlify's defaults.
43
- writeFileSync(join(publishDir, '_headers'), '/_static/*\n Cache-Control: public, max-age=31536000, immutable\n');
44
- cpSync(join(ctx.distDir, 'server'), join(functionsDir, 'dist', 'server'), { recursive: true });
45
- if (existsSync(ctx.ssgDir))
46
- cpSync(ctx.ssgDir, join(functionsDir, 'dist', 'ssg'), { recursive: true });
47
- if (ctx.publicDir)
48
- cpSync(ctx.publicDir, join(functionsDir, 'dist', 'public'), { recursive: true });
49
- writeFileSync(join(functionsDir, `${FUNCTION_NAME}.mjs`), FUNCTION_ENTRY);
50
- console.log(` • assembled ${PUBLISH_DIR} and ${FUNCTIONS_DIR}`);
51
- }
52
- //# sourceMappingURL=build.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build.js","sourceRoot":"","sources":["../../../src/deploy/netlify/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC;;;GAGG;AACH,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;AAChD,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAC;AAC7D,MAAM,aAAa,GAAG,eAAe,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,cAAc,GAAG;;;;;;CAMtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,GAAuB;IAChE,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAClD,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAEtD,0FAA0F;IAC1F,MAAM,EAAE,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACvD,MAAM,EAAE,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACzD,SAAS,CAAC,UAAU,EAAE,EAAE,SAAS,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ises';\nimport { join } from 'node:path';\nimport type { DeployBuildContext } from '../presets.js';\n\n/**\n * What Netlify uploads: a publish directory the CDN serves, and an internal function directory the\n * platform picks handlers up from without the project needing a `netlify/functions` folder of its own.\n */\nconst PUBLISH_DIR = join('.netlify', 'publish');\nconst FUNCTIONS_DIR = join('.netlify', 'functions-internal');\nconst FUNCTION_NAME = 'rshono-server';\n\n/**\n * The function entry Netlify loads. It re-exports the built bundle's default handler and, next to it,\n * the v2 `config` that claims every path — so routing is declared in code rather than in a redirect\n * rule the project would have to maintain.\n *\n * `preferStatic` is what keeps the CDN in front: a path that exists in the publish directory is served\n * from there and the function is never invoked.\n */\nconst FUNCTION_ENTRY = `export { default } from '../../dist/server/main.mjs';\n\nexport const config = {\n path: '/*',\n preferStatic: true,\n};\n`;\n\n/**\n * `dist/server/main.mjs` is kept at that exact path inside the function bundle because the runtime\n * derives the project root from where it sits (see `deploy/filesystem.ts`), which is what puts\n * `dist/ssg` within reach at request time.\n */\nexport async function finalizeNetlifyBuild(ctx: DeployBuildContext): Promise<void> {\n const publishDir = join(ctx.rootDir, PUBLISH_DIR);\n const functionsDir = join(ctx.rootDir, FUNCTIONS_DIR);\n\n // Rebuilt from scratch, so a deleted page or asset cannot survive in the uploaded output.\n await rm(publishDir, { recursive: true, force: true });\n await rm(functionsDir, { recursive: true, force: true });\n mkdirSync(publishDir, { recursive: true });\n mkdirSync(functionsDir, { recursive: true });\n\n cpSync(ctx.staticDir, join(publishDir, '_static'), { recursive: true });\n if (ctx.publicDir) cpSync(ctx.publicDir, publishDir, { recursive: true });\n // The one header the CDN cannot infer; everything else keeps Netlify's defaults.\n writeFileSync(join(publishDir, '_headers'), '/_static/*\\n Cache-Control: public, max-age=31536000, immutable\\n');\n\n cpSync(join(ctx.distDir, 'server'), join(functionsDir, 'dist', 'server'), { recursive: true });\n if (existsSync(ctx.ssgDir)) cpSync(ctx.ssgDir, join(functionsDir, 'dist', 'ssg'), { recursive: true });\n if (ctx.publicDir) cpSync(ctx.publicDir, join(functionsDir, 'dist', 'public'), { recursive: true });\n writeFileSync(join(functionsDir, `${FUNCTION_NAME}.mjs`), FUNCTION_ENTRY);\n\n console.log(` • assembled ${PUBLISH_DIR} and ${FUNCTIONS_DIR}`);\n}\n"]}
@@ -1,13 +0,0 @@
1
- import type { DeployRuntime } from '../contract.js';
2
- /**
3
- * Netlify, as one Functions v2 handler behind the CDN.
4
- *
5
- * Same division as Vercel: the publish directory holds `/_static` and `public/`, so the CDN answers
6
- * those and the function is only reached for a page. Prerendered pages ship inside the function and are
7
- * read from disk, because serving them from the CDN would lose the `Accept` negotiation that decides
8
- * between a document and a flight payload.
9
- *
10
- * Functions v2 streams a `Response` body, so streamed SSR survives.
11
- */
12
- export declare const runtime: DeployRuntime;
13
- //# sourceMappingURL=runtime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/deploy/netlify/runtime.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,EAAE,aAarB,CAAC"}
@@ -1,24 +0,0 @@
1
- import { handle } from 'hono/netlify';
2
- import { fileSystemRuntime } from '../filesystem.js';
3
- /**
4
- * Netlify, as one Functions v2 handler behind the CDN.
5
- *
6
- * Same division as Vercel: the publish directory holds `/_static` and `public/`, so the CDN answers
7
- * those and the function is only reached for a page. Prerendered pages ship inside the function and are
8
- * read from disk, because serving them from the CDN would lose the `Accept` negotiation that decides
9
- * between a document and a flight payload.
10
- *
11
- * Functions v2 streams a `Response` body, so streamed SSR survives.
12
- */
13
- export const runtime = {
14
- ...fileSystemRuntime,
15
- mountStaticAssets() {
16
- // Served from the publish directory before the function runs.
17
- },
18
- serveApp(app) {
19
- return handle(app);
20
- },
21
- // Netlify compresses at the edge.
22
- compress: null,
23
- };
24
- //# sourceMappingURL=runtime.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../../src/deploy/netlify/runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,OAAO,GAAkB;IACpC,GAAG,iBAAiB;IAEpB,iBAAiB;QACf,8DAA8D;IAChE,CAAC;IAED,QAAQ,CAAC,GAAS;QAChB,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IAED,kCAAkC;IAClC,QAAQ,EAAE,IAAI;CACf,CAAC","sourcesContent":["import type { Hono } from 'hono';\nimport { handle } from 'hono/netlify';\nimport type { DeployRuntime } from '../contract.js';\nimport { fileSystemRuntime } from '../filesystem.js';\n\n/**\n * Netlify, as one Functions v2 handler behind the CDN.\n *\n * Same division as Vercel: the publish directory holds `/_static` and `public/`, so the CDN answers\n * those and the function is only reached for a page. Prerendered pages ship inside the function and are\n * read from disk, because serving them from the CDN would lose the `Accept` negotiation that decides\n * between a document and a flight payload.\n *\n * Functions v2 streams a `Response` body, so streamed SSR survives.\n */\nexport const runtime: DeployRuntime = {\n ...fileSystemRuntime,\n\n mountStaticAssets(): void {\n // Served from the publish directory before the function runs.\n },\n\n serveApp(app: Hono): unknown {\n return handle(app);\n },\n\n // Netlify compresses at the edge.\n compress: null,\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/deploy/node/runtime.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAIpD;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,aA2BrB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../src/deploy/presets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE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IACnG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,aAAkB,GAAG,YAAY,CAS7E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/deploy/vercel/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AA6BxD,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqChF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/deploy/vercel/runtime.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,OAAO,EAAE,aAcrB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,YAAY,EACZ,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,KAAK,EACV,KAAK,WAAW,GACjB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEtF,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;;GAGG;AACH,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC"}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,CAAC;CAClB;AAED,8GAA8G;AAC9G,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAC;AAIvF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAE/D;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAQtG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"control.d.ts","sourceRoot":"","sources":["../../src/runtime/control.ts"],"names":[],"mappings":"AAGA,qBAAa,cAAe,SAAQ,KAAK;IAGrC,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM;IAHzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,YACW,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EAKxB;CACF;AAED,qBAAa,cAAe,SAAQ,KAAK;IACvC,QAAQ,CAAC,MAAM,sBAAoB;IACnC,cAGC;CACF;AAED,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG,cAAc,CAAC;AAE5D,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAEtE;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,MAAM,CAEjE;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAQ/F"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dev-protocol.d.ts","sourceRoot":"","sources":["../../src/runtime/dev-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"empty-server-app.d.ts","sourceRoot":"","sources":["../../src/runtime/empty-server-app.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"entry.client.d.ts","sourceRoot":"","sources":["../../src/runtime/entry.client.tsx"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"entry.rsc.d.ts","sourceRoot":"","sources":["../../src/runtime/entry.rsc.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAwBvD,OAAO,EAAsF,KAAK,KAAK,EAAoB,MAAM,cAAc,CAAC;AAyChJ,eAAO,MAAM,MAAM,EAAE,SAAS,KAAK,EAAuB,CAAC;AAE3D,0HAA0H;AAC1H,MAAM,MAAM,YAAY,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC;AAExF,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAycF,eAAO,MAAM,GAAG,4EAAa,CAAC;AAE9B;;;;;;;GAOG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"entry.ssr.d.ts","sourceRoot":"","sources":["../../src/runtime/entry.ssr.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOvD,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC;AAsDD,wBAAsB,UAAU,CAAC,SAAS,EAAE,cAAc,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,iBAAiB;;;GAiDjG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/runtime/navigation.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA2D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEhG;;;;;;GAMG;AACH,MAAM,WAAW,MAAM;IACrB,0DAA0D;IAC1D,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,sFAAsF;IACtF,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,sDAAsD;IACtD,IAAI,IAAI,IAAI,CAAC;IACb,4DAA4D;IAC5D,OAAO,IAAI,IAAI,CAAC;IAChB,sFAAsF;IACtF,OAAO,IAAI,IAAI,CAAC;IAChB,kGAAkG;IAClG,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,0FAA0F;AAC1F,MAAM,WAAW,UAAU;IACzB;;;;OAIG;IACH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AAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAAG,OAAO,CASpG;AAID,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,CAQlE;AAED,gHAAgH;AAChH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAEpD;AAED,sFAAsF;AACtF,wBAAgB,QAAQ,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAE9D;AAED,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,aAAa,EAAE,aAAa,GAAG,aAAa,IAAI,OAAO,CAAC,aAAa,EAAE;IAAE,IAAI,EAAE,aAAa,GAAG,YAAY,CAAA;CAAE,CAAC,CAE7I"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/runtime/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,UAAU,EACV,QAAQ,EACR,aAAa,EACb,QAAQ,EAGR,KAAK,GAAG,EACR,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,GACvB,MAAM,cAAc,CAAC"}
@@ -1,15 +0,0 @@
1
- import type { MiddlewareHandler } from 'hono';
2
- /**
3
- * Gzips compressible responses, **without breaking streaming**.
4
- *
5
- * The obvious implementation — the platform's `CompressionStream`, which Hono's own `compress`
6
- * middleware uses — buffers: zlib holds bytes back until it has a full block, so a streamed SSR
7
- * shell would sit in the compressor instead of reaching the browser. That defeats the entire point
8
- * of streaming a page. Node's zlib with `Z_SYNC_FLUSH` instead ends every write at a byte boundary
9
- * the client can decode immediately, so each chunk the renderer flushes is a chunk the browser
10
- * receives, at the cost of a few bytes of framing per chunk.
11
- *
12
- * Registered as the outermost middleware so it sees the finished response, headers and all.
13
- */
14
- export declare function compress(): MiddlewareHandler;
15
- //# sourceMappingURL=compress.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compress.d.ts","sourceRoot":"","sources":["../../src/server/compress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AA0B9C;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,IAAI,iBAAiB,CAsC5C"}
@@ -1,76 +0,0 @@
1
- import { COMPRESSIBLE_CONTENT_TYPE_REGEX } from 'hono/utils/compress';
2
- import { Duplex } from 'node:stream';
3
- import { constants, createGzip } from 'node:zlib';
4
- import { appendVary } from './headers.js';
5
- /** Below this many uncompressed bytes the gzip framing costs more than it saves. Only applied when the length is known up front. */
6
- const COMPRESSION_THRESHOLD_BYTES = 1024;
7
- /** `Cache-Control: no-transform` is a proxy asking not to be re-encoded; honour it. */
8
- const NO_TRANSFORM = /(?:^|,)\s*no-transform\s*(?:,|$)/i;
9
- /** Every browser that sends `Accept-Encoding` at all accepts gzip, so one encoding covers the field. */
10
- function acceptsGzip(acceptEncoding) {
11
- if (!acceptEncoding)
12
- return false;
13
- // No `q=` anywhere (what every real browser sends) means there is no refusal to look for.
14
- if (!acceptEncoding.includes('q='))
15
- return acceptEncoding.includes('gzip') || acceptEncoding.includes('*');
16
- return acceptEncoding.split(',').some((entry) => {
17
- const [name, ...params] = entry.trim().split(';');
18
- if (name.toLowerCase() !== 'gzip' && name.trim() !== '*')
19
- return false;
20
- // `gzip;q=0` is an explicit refusal, not an offer.
21
- const q = params.map((p) => p.trim()).find((p) => p.startsWith('q='));
22
- return q === undefined || Number(q.slice(2)) > 0;
23
- });
24
- }
25
- /**
26
- * Gzips compressible responses, **without breaking streaming**.
27
- *
28
- * The obvious implementation — the platform's `CompressionStream`, which Hono's own `compress`
29
- * middleware uses — buffers: zlib holds bytes back until it has a full block, so a streamed SSR
30
- * shell would sit in the compressor instead of reaching the browser. That defeats the entire point
31
- * of streaming a page. Node's zlib with `Z_SYNC_FLUSH` instead ends every write at a byte boundary
32
- * the client can decode immediately, so each chunk the renderer flushes is a chunk the browser
33
- * receives, at the cost of a few bytes of framing per chunk.
34
- *
35
- * Registered as the outermost middleware so it sees the finished response, headers and all.
36
- */
37
- export function compress() {
38
- return async (c, next) => {
39
- await next();
40
- const res = c.res;
41
- if (c.req.method === 'HEAD')
42
- return;
43
- // 204/304 have no body to speak of; a 206 range is counted in *uncompressed* bytes.
44
- if (res.status === 204 || res.status === 304 || res.status === 206)
45
- return;
46
- if (res.headers.has('content-encoding'))
47
- return;
48
- if (!COMPRESSIBLE_CONTENT_TYPE_REGEX.test(res.headers.get('content-type') ?? ''))
49
- return;
50
- if (NO_TRANSFORM.test(res.headers.get('cache-control') ?? ''))
51
- return;
52
- const contentLength = res.headers.get('content-length');
53
- if (contentLength !== null && Number(contentLength) < COMPRESSION_THRESHOLD_BYTES)
54
- return;
55
- if (!acceptsGzip(c.req.header('accept-encoding')))
56
- return;
57
- // Read `.body` only once we know we're compressing: it is what makes @hono/node-server's
58
- // lightweight Response materialize a real one, throwing away the [status, body, headers] tuple
59
- // it would otherwise write straight to the socket. The guards above touch only `.status` and
60
- // `.headers`, which leave that fast path intact for every response we decide to pass through.
61
- const body = res.body;
62
- if (!body)
63
- return;
64
- const gzip = Duplex.toWeb(createGzip({ flush: constants.Z_SYNC_FLUSH }));
65
- c.res = new Response(body.pipeThrough(gzip), res);
66
- c.res.headers.set('content-encoding', 'gzip');
67
- c.res.headers.delete('content-length'); // no longer the length of what goes on the wire
68
- appendVary(c.res.headers, 'Accept-Encoding');
69
- // The bytes changed, so a strong validator no longer describes them — but it is still the same
70
- // representation, which is exactly what a weak one means.
71
- const etag = c.res.headers.get('etag');
72
- if (etag && !etag.startsWith('W/'))
73
- c.res.headers.set('etag', `W/${etag}`);
74
- };
75
- }
76
- //# sourceMappingURL=compress.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compress.js","sourceRoot":"","sources":["../../src/server/compress.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CA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CAAC,GAAG,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QAClD,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;QAC9C,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,gDAAgD;QACxF,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAE7C,+FAA+F;QAC/F,0DAA0D;QAC1D,MAAM,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACvC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;IAC7E,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import type { MiddlewareHandler } from 'hono';\nimport { COMPRESSIBLE_CONTENT_TYPE_REGEX } from 'hono/utils/compress';\nimport { Duplex } from 'node:stream';\nimport { constants, createGzip } from 'node:zlib';\nimport { appendVary } from './headers.js';\n\n/** Below this many uncompressed bytes the gzip framing costs more than it saves. Only applied when the length is known up front. */\nconst COMPRESSION_THRESHOLD_BYTES = 1024;\n\n/** `Cache-Control: no-transform` is a proxy asking not to be re-encoded; honour it. */\nconst NO_TRANSFORM = /(?:^|,)\\s*no-transform\\s*(?:,|$)/i;\n\n/** Every browser that sends `Accept-Encoding` at all accepts gzip, so one encoding covers the field. */\nfunction acceptsGzip(acceptEncoding: string | undefined): boolean {\n if (!acceptEncoding) return false;\n // No `q=` anywhere (what every real browser sends) means there is no refusal to look for.\n if (!acceptEncoding.includes('q=')) return acceptEncoding.includes('gzip') || acceptEncoding.includes('*');\n return acceptEncoding.split(',').some((entry) => {\n const [name, ...params] = entry.trim().split(';');\n if (name.toLowerCase() !== 'gzip' && name.trim() !== '*') return false;\n // `gzip;q=0` is an explicit refusal, not an offer.\n const q = params.map((p) => p.trim()).find((p) => p.startsWith('q='));\n return q === undefined || Number(q.slice(2)) > 0;\n });\n}\n\n/**\n * Gzips compressible responses, **without breaking streaming**.\n *\n * The obvious implementation — the platform's `CompressionStream`, which Hono's own `compress`\n * middleware uses — buffers: zlib holds bytes back until it has a full block, so a streamed SSR\n * shell would sit in the compressor instead of reaching the browser. That defeats the entire point\n * of streaming a page. Node's zlib with `Z_SYNC_FLUSH` instead ends every write at a byte boundary\n * the client can decode immediately, so each chunk the renderer flushes is a chunk the browser\n * receives, at the cost of a few bytes of framing per chunk.\n *\n * Registered as the outermost middleware so it sees the finished response, headers and all.\n */\nexport function compress(): MiddlewareHandler {\n return async (c, next) => {\n await next();\n\n const res = c.res;\n if (c.req.method === 'HEAD') return;\n // 204/304 have no body to speak of; a 206 range is counted in *uncompressed* bytes.\n if (res.status === 204 || res.status === 304 || res.status === 206) return;\n if (res.headers.has('content-encoding')) return;\n if (!COMPRESSIBLE_CONTENT_TYPE_REGEX.test(res.headers.get('content-type') ?? '')) return;\n if (NO_TRANSFORM.test(res.headers.get('cache-control') ?? '')) return;\n\n const contentLength = res.headers.get('content-length');\n if (contentLength !== null && Number(contentLength) < COMPRESSION_THRESHOLD_BYTES) return;\n if (!acceptsGzip(c.req.header('accept-encoding'))) return;\n\n // Read `.body` only once we know we're compressing: it is what makes @hono/node-server's\n // lightweight Response materialize a real one, throwing away the [status, body, headers] tuple\n // it would otherwise write straight to the socket. The guards above touch only `.status` and\n // `.headers`, which leave that fast path intact for every response we decide to pass through.\n const body = res.body;\n if (!body) return;\n\n const gzip = Duplex.toWeb(createGzip({ flush: constants.Z_SYNC_FLUSH })) as unknown as {\n readable: ReadableStream<Uint8Array>;\n writable: WritableStream<Uint8Array>;\n };\n\n c.res = new Response(body.pipeThrough(gzip), res);\n c.res.headers.set('content-encoding', 'gzip');\n c.res.headers.delete('content-length'); // no longer the length of what goes on the wire\n appendVary(c.res.headers, 'Accept-Encoding');\n\n // The bytes changed, so a strong validator no longer describes them — but it is still the same\n // representation, which is exactly what a weak one means.\n const etag = c.res.headers.get('etag');\n if (etag && !etag.startsWith('W/')) c.res.headers.set('etag', `W/${etag}`);\n };\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../src/server/headers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAShE;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAQlF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"load-config.d.ts","sourceRoot":"","sources":["../../src/server/load-config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAmBjD;;;GAGG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAe5F"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"load-env.d.ts","sourceRoot":"","sources":["../../src/server/load-env.ts"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAKlD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"prerendered.d.ts","sourceRoot":"","sources":["../../src/server/prerendered.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEjD,eAAO,MAAM,QAAQ;;iBACX,IAAI,EAAE,YAAY;iBA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E,MAAM,CAAC;IACd,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe;aAC1B,eAAe,EAAE,KAAM;aACvB,YAAY;aACZ,IAAI,EAAE,IAAI;aACV,IAAI,EAAE,SAAS;CACP,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAY/C,CAAC;AAIF,iHAAiH;AACjH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAS5F;AA0BD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG,YAAY,CAiBrG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"shutdown.d.ts","sourceRoot":"","sources":["../../src/server/shutdown.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,KAAK,IAAI,GAAG,IAAI,CAI1E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ssg.d.ts","sourceRoot":"","sources":["../../src/server/ssg.ts"],"names":[],"mappings":"AAIA,OAAO,EAA+B,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,EAA6C,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAS1H;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAUrE;AAoCD,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAyB,GAAG,OAAO,CAAC,eAAe,GAA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