gemi 0.108.0 → 0.110.0

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 (280) hide show
  1. package/dist/ai/index.js +2 -2
  2. package/dist/ai/index.js.map +1 -1
  3. package/dist/app/index.js +2 -2
  4. package/dist/app/index.js.map +1 -1
  5. package/dist/bin/gemi.js +535 -55
  6. package/dist/bin/gemi.js.map +11 -6
  7. package/dist/bun/plugin.js +2 -2
  8. package/dist/bun/plugin.js.map +1 -1
  9. package/dist/bun/preload.js +2 -2
  10. package/dist/bun/preload.js.map +1 -1
  11. package/dist/{chunk-xpyhmg45.js → chunk-09ypnhjv.js} +3 -3
  12. package/dist/{chunk-3s3awh38.js.map → chunk-09ypnhjv.js.map} +1 -1
  13. package/dist/{chunk-rjernda5.js → chunk-0d9qsmx2.js} +3 -3
  14. package/dist/{chunk-rjernda5.js.map → chunk-0d9qsmx2.js.map} +1 -1
  15. package/dist/{chunk-xg9vye7c.js → chunk-0sjh5v1n.js} +1 -1
  16. package/dist/{chunk-2mhx4e4g.js → chunk-11fsn5mr.js} +3 -3
  17. package/dist/{chunk-2mhx4e4g.js.map → chunk-11fsn5mr.js.map} +1 -1
  18. package/dist/{chunk-wzqkdmjd.js → chunk-1c1d0e60.js} +3 -3
  19. package/dist/{chunk-wzqkdmjd.js.map → chunk-1c1d0e60.js.map} +1 -1
  20. package/dist/{chunk-wedwkqe7.js → chunk-1kr25rcg.js} +3 -3
  21. package/dist/{chunk-wedwkqe7.js.map → chunk-1kr25rcg.js.map} +1 -1
  22. package/dist/{chunk-6wrhc9bq.js → chunk-1pem26zc.js} +3 -3
  23. package/dist/{chunk-6wrhc9bq.js.map → chunk-1pem26zc.js.map} +1 -1
  24. package/dist/{chunk-ydkjf626.js → chunk-1va15sfq.js} +2 -2
  25. package/dist/{chunk-ydkjf626.js.map → chunk-1va15sfq.js.map} +2 -2
  26. package/dist/{chunk-3s3awh38.js → chunk-1yx2e0bh.js} +2 -2
  27. package/dist/{chunk-xpyhmg45.js.map → chunk-1yx2e0bh.js.map} +1 -1
  28. package/dist/{chunk-9r3znmqq.js → chunk-303mprnv.js} +2 -2
  29. package/dist/{chunk-9r3znmqq.js.map → chunk-303mprnv.js.map} +1 -1
  30. package/dist/{chunk-sbyqs03h.js → chunk-30xjcyzh.js} +2 -2
  31. package/dist/{chunk-sbyqs03h.js.map → chunk-30xjcyzh.js.map} +1 -1
  32. package/dist/{chunk-k17prwhx.js → chunk-358sdcx9.js} +3 -3
  33. package/dist/{chunk-k17prwhx.js.map → chunk-358sdcx9.js.map} +1 -1
  34. package/dist/{chunk-2gmgd05c.js → chunk-3cg7y62b.js} +2 -2
  35. package/dist/{chunk-2gmgd05c.js.map → chunk-3cg7y62b.js.map} +1 -1
  36. package/dist/{chunk-t26n9vzw.js → chunk-3y8q8x11.js} +2 -2
  37. package/dist/{chunk-t26n9vzw.js.map → chunk-3y8q8x11.js.map} +1 -1
  38. package/dist/chunk-4mfrgd5m.js +34 -0
  39. package/dist/chunk-4mfrgd5m.js.map +10 -0
  40. package/dist/chunk-5cygrbxv.js +4 -0
  41. package/dist/{chunk-vj2t77x1.js.map → chunk-5cygrbxv.js.map} +2 -2
  42. package/dist/{chunk-tvy2fqza.js → chunk-5stgtwqw.js} +2 -2
  43. package/dist/{chunk-tvy2fqza.js.map → chunk-5stgtwqw.js.map} +1 -1
  44. package/dist/chunk-61f4m5px.js +6 -0
  45. package/dist/chunk-61f4m5px.js.map +12 -0
  46. package/dist/chunk-6chz1ktz.js +9 -0
  47. package/dist/chunk-6chz1ktz.js.map +13 -0
  48. package/dist/{chunk-1rs13253.js → chunk-6vr7f5fq.js} +4 -4
  49. package/dist/{chunk-1rs13253.js.map → chunk-6vr7f5fq.js.map} +1 -1
  50. package/dist/{chunk-2q7m8a16.js → chunk-7tx5y712.js} +2 -2
  51. package/dist/{chunk-2q7m8a16.js.map → chunk-7tx5y712.js.map} +1 -1
  52. package/dist/{chunk-eytdyahy.js → chunk-8afxrmdc.js} +3 -3
  53. package/dist/{chunk-eytdyahy.js.map → chunk-8afxrmdc.js.map} +1 -1
  54. package/dist/{chunk-anp4kv3w.js → chunk-8b2tw2yp.js} +1 -1
  55. package/dist/{chunk-kqff894s.js → chunk-9rchedr4.js} +2 -2
  56. package/dist/{chunk-kqff894s.js.map → chunk-9rchedr4.js.map} +1 -1
  57. package/dist/{chunk-6rz8kyqb.js → chunk-9s851qz8.js} +2 -2
  58. package/dist/{chunk-6rz8kyqb.js.map → chunk-9s851qz8.js.map} +1 -1
  59. package/dist/{chunk-8pynv9rw.js → chunk-a6453d9s.js} +3 -3
  60. package/dist/{chunk-8pynv9rw.js.map → chunk-a6453d9s.js.map} +1 -1
  61. package/dist/{chunk-5wt25tyd.js → chunk-bn5yn731.js} +2 -2
  62. package/dist/{chunk-5wt25tyd.js.map → chunk-bn5yn731.js.map} +1 -1
  63. package/dist/{chunk-zrdbytx4.js → chunk-c098fzvk.js} +2 -2
  64. package/dist/{chunk-zrdbytx4.js.map → chunk-c098fzvk.js.map} +1 -1
  65. package/dist/{chunk-mhq2bd9c.js → chunk-cttmy1jp.js} +4 -4
  66. package/dist/{chunk-mhq2bd9c.js.map → chunk-cttmy1jp.js.map} +2 -2
  67. package/dist/{chunk-331s9wqr.js → chunk-cy5qp6mz.js} +3 -3
  68. package/dist/{chunk-331s9wqr.js.map → chunk-cy5qp6mz.js.map} +1 -1
  69. package/dist/{chunk-kh273hj0.js → chunk-ddr4qvvt.js} +3 -3
  70. package/dist/{chunk-kh273hj0.js.map → chunk-ddr4qvvt.js.map} +1 -1
  71. package/dist/chunk-e1n8zs3h.js +58 -0
  72. package/dist/chunk-e1n8zs3h.js.map +14 -0
  73. package/dist/{chunk-2xqrh6d0.js → chunk-et4pv1b1.js} +1 -1
  74. package/dist/{chunk-a1g0bahx.js → chunk-frerzsxq.js} +2 -2
  75. package/dist/{chunk-a1g0bahx.js.map → chunk-frerzsxq.js.map} +1 -1
  76. package/dist/{chunk-pj2e1p07.js → chunk-gb37722w.js} +3 -3
  77. package/dist/{chunk-pj2e1p07.js.map → chunk-gb37722w.js.map} +1 -1
  78. package/dist/chunk-h3864a8z.js +17 -0
  79. package/dist/{chunk-ncfxmtd5.js.map → chunk-h3864a8z.js.map} +14 -11
  80. package/dist/{chunk-661wezaf.js → chunk-h4sw6nt3.js} +3 -3
  81. package/dist/{chunk-661wezaf.js.map → chunk-h4sw6nt3.js.map} +1 -1
  82. package/dist/{chunk-m31pfz1s.js → chunk-he7z7y9j.js} +2 -2
  83. package/dist/{chunk-m31pfz1s.js.map → chunk-he7z7y9j.js.map} +1 -1
  84. package/dist/{chunk-kstvyvr0.js → chunk-hf7a51s3.js} +2 -2
  85. package/dist/{chunk-kstvyvr0.js.map → chunk-hf7a51s3.js.map} +1 -1
  86. package/dist/chunk-hn67spz6.js +5 -0
  87. package/dist/{chunk-mrvcaakf.js.map → chunk-hn67spz6.js.map} +1 -1
  88. package/dist/{chunk-fq3sb3xt.js → chunk-jbrwt3cs.js} +4 -4
  89. package/dist/{chunk-fq3sb3xt.js.map → chunk-jbrwt3cs.js.map} +1 -1
  90. package/dist/{chunk-jnw73s8c.js → chunk-k1vw22t2.js} +2 -2
  91. package/dist/{chunk-jnw73s8c.js.map → chunk-k1vw22t2.js.map} +1 -1
  92. package/dist/chunk-k1xt2tw7.js +4 -0
  93. package/dist/{chunk-hdhahvd4.js.map → chunk-k1xt2tw7.js.map} +2 -2
  94. package/dist/chunk-k9wgtrc5.js +24 -0
  95. package/dist/{chunk-h2hdpm70.js.map → chunk-k9wgtrc5.js.map} +4 -4
  96. package/dist/{chunk-00y49jcf.js → chunk-kf71mjxa.js} +3 -3
  97. package/dist/{chunk-00y49jcf.js.map → chunk-kf71mjxa.js.map} +1 -1
  98. package/dist/{chunk-kqz8jp6v.js → chunk-m6ystvtk.js} +2 -2
  99. package/dist/{chunk-kqz8jp6v.js.map → chunk-m6ystvtk.js.map} +1 -1
  100. package/dist/{chunk-ftgd68se.js → chunk-mb7q7s0a.js} +3 -3
  101. package/dist/{chunk-ftgd68se.js.map → chunk-mb7q7s0a.js.map} +1 -1
  102. package/dist/{chunk-rh9j8cwv.js → chunk-mn5xw79b.js} +3 -3
  103. package/dist/{chunk-rh9j8cwv.js.map → chunk-mn5xw79b.js.map} +1 -1
  104. package/dist/{chunk-wsftnxzs.js → chunk-mwqg079k.js} +2 -2
  105. package/dist/{chunk-wsftnxzs.js.map → chunk-mwqg079k.js.map} +1 -1
  106. package/dist/{chunk-yebaheh7.js → chunk-nncz308h.js} +3 -3
  107. package/dist/{chunk-yebaheh7.js.map → chunk-nncz308h.js.map} +1 -1
  108. package/dist/{chunk-82hpq0bq.js → chunk-nsvktvp4.js} +2 -2
  109. package/dist/{chunk-82hpq0bq.js.map → chunk-nsvktvp4.js.map} +1 -1
  110. package/dist/{chunk-h7pafjej.js → chunk-nvv9wej6.js} +3 -3
  111. package/dist/{chunk-h7pafjej.js.map → chunk-nvv9wej6.js.map} +1 -1
  112. package/dist/chunk-p1aqq0ga.js +16 -0
  113. package/dist/{chunk-q7y9v2v5.js.map → chunk-p1aqq0ga.js.map} +5 -8
  114. package/dist/chunk-p7r2w4qw.js +5 -0
  115. package/dist/{chunk-h3t4n0bn.js.map → chunk-p7r2w4qw.js.map} +2 -2
  116. package/dist/{chunk-fwympxqk.js → chunk-pwmgqq7z.js} +2 -2
  117. package/dist/{chunk-fwympxqk.js.map → chunk-pwmgqq7z.js.map} +1 -1
  118. package/dist/chunk-pyj7cd9t.js +4 -0
  119. package/dist/{chunk-q2fyp44f.js.map → chunk-pyj7cd9t.js.map} +2 -2
  120. package/dist/{chunk-9mqqr05d.js → chunk-q9s7kwgt.js} +3 -3
  121. package/dist/{chunk-9mqqr05d.js.map → chunk-q9s7kwgt.js.map} +1 -1
  122. package/dist/{chunk-9hbwvcxn.js → chunk-qd2v93y4.js} +2 -2
  123. package/dist/{chunk-9hbwvcxn.js.map → chunk-qd2v93y4.js.map} +1 -1
  124. package/dist/{chunk-tyhrrnp5.js → chunk-rfcygmf5.js} +3 -3
  125. package/dist/{chunk-tyhrrnp5.js.map → chunk-rfcygmf5.js.map} +1 -1
  126. package/dist/{chunk-4rr9wmh8.js → chunk-s6jjy4y9.js} +2 -2
  127. package/dist/{chunk-4rr9wmh8.js.map → chunk-s6jjy4y9.js.map} +1 -1
  128. package/dist/{chunk-njkk498k.js → chunk-sq2wkynk.js} +2 -2
  129. package/dist/{chunk-njkk498k.js.map → chunk-sq2wkynk.js.map} +1 -1
  130. package/dist/{chunk-kda25fn4.js → chunk-td8tha3j.js} +3 -3
  131. package/dist/{chunk-kda25fn4.js.map → chunk-td8tha3j.js.map} +1 -1
  132. package/dist/{chunk-cfsscms3.js → chunk-tk5q8hkv.js} +4 -4
  133. package/dist/{chunk-cfsscms3.js.map → chunk-tk5q8hkv.js.map} +2 -2
  134. package/dist/{chunk-1npdp1w2.js → chunk-tq85n8zh.js} +2 -2
  135. package/dist/{chunk-1npdp1w2.js.map → chunk-tq85n8zh.js.map} +1 -1
  136. package/dist/{chunk-gqpge54c.js → chunk-twnn7r66.js} +2 -2
  137. package/dist/{chunk-gqpge54c.js.map → chunk-twnn7r66.js.map} +1 -1
  138. package/dist/chunk-w7jsh3xd.js +5 -0
  139. package/dist/{chunk-9jz4rggd.js.map → chunk-w7jsh3xd.js.map} +2 -2
  140. package/dist/{chunk-we2sj339.js → chunk-wsttx9rg.js} +2 -2
  141. package/dist/{chunk-we2sj339.js.map → chunk-wsttx9rg.js.map} +1 -1
  142. package/dist/{chunk-47rgq59q.js → chunk-wvsv1jgg.js} +2 -2
  143. package/dist/{chunk-47rgq59q.js.map → chunk-wvsv1jgg.js.map} +1 -1
  144. package/dist/chunk-x78jrs4y.js +4 -0
  145. package/dist/{chunk-ffagkj3x.js.map → chunk-x78jrs4y.js.map} +2 -2
  146. package/dist/chunk-xk930yaw.js +5 -0
  147. package/dist/{chunk-rn2kgbg4.js.map → chunk-xk930yaw.js.map} +2 -2
  148. package/dist/chunk-xkc7ftnq.js +9 -0
  149. package/dist/chunk-xkc7ftnq.js.map +10 -0
  150. package/dist/{chunk-564zfdd1.js → chunk-yer1r3t3.js} +2 -2
  151. package/dist/{chunk-564zfdd1.js.map → chunk-yer1r3t3.js.map} +1 -1
  152. package/dist/{chunk-v52dyw0q.js → chunk-yqavgpwd.js} +3 -3
  153. package/dist/{chunk-v52dyw0q.js.map → chunk-yqavgpwd.js.map} +1 -1
  154. package/dist/{chunk-hyfzw1fk.js → chunk-z10cas5r.js} +2 -2
  155. package/dist/{chunk-hyfzw1fk.js.map → chunk-z10cas5r.js.map} +1 -1
  156. package/dist/{chunk-h4x7cba0.js → chunk-zhs1r1z0.js} +3 -3
  157. package/dist/{chunk-h4x7cba0.js.map → chunk-zhs1r1z0.js.map} +1 -1
  158. package/dist/chunks/{ThemeProvider-Cqfwr6dk.js → ThemeProvider-BgLyzzOL.js} +8 -2
  159. package/dist/chunks/ThemeProvider-BgLyzzOL.js.map +1 -0
  160. package/dist/client/ClientRouterContext.d.ts.map +1 -1
  161. package/dist/client/ServerDataProvider.d.ts +2 -0
  162. package/dist/client/ServerDataProvider.d.ts.map +1 -1
  163. package/dist/client/createRoot.d.ts.map +1 -1
  164. package/dist/client/index.d.ts +2 -0
  165. package/dist/client/index.d.ts.map +1 -1
  166. package/dist/client/index.js +127 -4
  167. package/dist/client/index.js.map +1 -1
  168. package/dist/client/islands.d.ts +127 -0
  169. package/dist/client/islands.d.ts.map +1 -0
  170. package/dist/config/index.d.ts +8 -1
  171. package/dist/config/index.d.ts.map +1 -1
  172. package/dist/config/index.js +1 -1
  173. package/dist/config/index.js.map +2 -2
  174. package/dist/console/run.js +2 -2
  175. package/dist/console/run.js.map +1 -1
  176. package/dist/container/index.js +2 -2
  177. package/dist/container/index.js.map +1 -1
  178. package/dist/database/index.js +2 -2
  179. package/dist/database/index.js.map +1 -1
  180. package/dist/email/index.js +2 -2
  181. package/dist/email/index.js.map +1 -1
  182. package/dist/facades/Lang.d.ts +7 -1
  183. package/dist/facades/Lang.d.ts.map +1 -1
  184. package/dist/facades/index.js +2 -2
  185. package/dist/facades/index.js.map +1 -1
  186. package/dist/foundation/index.js +2 -2
  187. package/dist/foundation/index.js.map +1 -1
  188. package/dist/http/CorsMiddleware.d.ts +13 -0
  189. package/dist/http/CorsMiddleware.d.ts.map +1 -1
  190. package/dist/http/Middleware.d.ts +11 -0
  191. package/dist/http/Middleware.d.ts.map +1 -1
  192. package/dist/http/ViewRouter.d.ts +67 -0
  193. package/dist/http/ViewRouter.d.ts.map +1 -1
  194. package/dist/http/index.d.ts +1 -1
  195. package/dist/http/index.d.ts.map +1 -1
  196. package/dist/http/index.js +2 -2
  197. package/dist/http/index.js.map +1 -1
  198. package/dist/i18n/dictionaryRuntime.js +2 -2
  199. package/dist/i18n/dictionaryRuntime.js.map +1 -1
  200. package/dist/i18n/index.js +2 -2
  201. package/dist/i18n/index.js.map +1 -1
  202. package/dist/internal/islandRuntime.d.ts +45 -0
  203. package/dist/internal/islandRuntime.d.ts.map +1 -0
  204. package/dist/kernel/index.js +2 -2
  205. package/dist/kernel/index.js.map +1 -1
  206. package/dist/orm/context.d.ts +24 -0
  207. package/dist/orm/context.d.ts.map +1 -1
  208. package/dist/orm/index.d.ts +1 -1
  209. package/dist/orm/index.d.ts.map +1 -1
  210. package/dist/orm/index.js +3 -3
  211. package/dist/orm/index.js.map +2 -2
  212. package/dist/server/devFetch.d.ts.map +1 -1
  213. package/dist/server/httpDev.d.ts.map +1 -1
  214. package/dist/server/httpProd.d.ts.map +1 -1
  215. package/dist/server/idleTimeout.d.ts +24 -0
  216. package/dist/server/idleTimeout.d.ts.map +1 -0
  217. package/dist/server/index.js +2 -2
  218. package/dist/server/index.js.map +1 -1
  219. package/dist/server/modulePreloads.d.ts +18 -0
  220. package/dist/server/modulePreloads.d.ts.map +1 -1
  221. package/dist/server/styles.d.ts +3 -1
  222. package/dist/server/styles.d.ts.map +1 -1
  223. package/dist/services/index.d.ts +1 -0
  224. package/dist/services/index.d.ts.map +1 -1
  225. package/dist/services/index.js +3 -3
  226. package/dist/services/index.js.map +2 -2
  227. package/dist/services/middleware/MiddlewareRegistry.d.ts +13 -2
  228. package/dist/services/middleware/MiddlewareRegistry.d.ts.map +1 -1
  229. package/dist/services/queue/work.js +2 -2
  230. package/dist/services/queue/work.js.map +1 -1
  231. package/dist/services/router/DomainRouter.d.ts +10 -0
  232. package/dist/services/router/DomainRouter.d.ts.map +1 -1
  233. package/dist/services/router/ViewRouteDispatcher.d.ts +30 -2
  234. package/dist/services/router/ViewRouteDispatcher.d.ts.map +1 -1
  235. package/dist/services/router/createFlatViewRoutes.d.ts +13 -1
  236. package/dist/services/router/createFlatViewRoutes.d.ts.map +1 -1
  237. package/dist/services/router/staticCache.d.ts +23 -0
  238. package/dist/services/router/staticCache.d.ts.map +1 -0
  239. package/dist/services/router/staticDocument.d.ts +66 -0
  240. package/dist/services/router/staticDocument.d.ts.map +1 -0
  241. package/dist/stats/bundleStats.d.ts +104 -0
  242. package/dist/stats/bundleStats.d.ts.map +1 -0
  243. package/dist/stats/route-table.d.ts +2 -0
  244. package/dist/stats/route-table.d.ts.map +1 -0
  245. package/dist/stats/route-table.js +4 -0
  246. package/dist/stats/route-table.js.map +11 -0
  247. package/dist/stats/routeTable.d.ts +25 -0
  248. package/dist/stats/routeTable.d.ts.map +1 -0
  249. package/dist/stats/run.d.ts +43 -0
  250. package/dist/stats/run.d.ts.map +1 -0
  251. package/dist/support/index.js +2 -2
  252. package/dist/support/index.js.map +1 -1
  253. package/dist/testing/index.js +1 -1
  254. package/dist/vite/index.mjs +173 -2
  255. package/dist/vitest/index.d.ts +18 -0
  256. package/dist/vitest/index.d.ts.map +1 -1
  257. package/dist/vitest/index.js +2 -2
  258. package/dist/vitest/index.js.map +3 -3
  259. package/package.json +2 -1
  260. package/dist/chunk-9jz4rggd.js +0 -5
  261. package/dist/chunk-b9av1sgb.js +0 -58
  262. package/dist/chunk-b9av1sgb.js.map +0 -14
  263. package/dist/chunk-cewyag0d.js +0 -6
  264. package/dist/chunk-cewyag0d.js.map +0 -11
  265. package/dist/chunk-ffagkj3x.js +0 -4
  266. package/dist/chunk-h2hdpm70.js +0 -24
  267. package/dist/chunk-h3t4n0bn.js +0 -5
  268. package/dist/chunk-hdhahvd4.js +0 -4
  269. package/dist/chunk-k9qmr2wa.js +0 -9
  270. package/dist/chunk-k9qmr2wa.js.map +0 -10
  271. package/dist/chunk-mrvcaakf.js +0 -5
  272. package/dist/chunk-ncfxmtd5.js +0 -17
  273. package/dist/chunk-q2fyp44f.js +0 -4
  274. package/dist/chunk-q7y9v2v5.js +0 -18
  275. package/dist/chunk-rn2kgbg4.js +0 -5
  276. package/dist/chunk-vj2t77x1.js +0 -4
  277. package/dist/chunks/ThemeProvider-Cqfwr6dk.js.map +0 -1
  278. /package/dist/{chunk-xg9vye7c.js.map → chunk-0sjh5v1n.js.map} +0 -0
  279. /package/dist/{chunk-anp4kv3w.js.map → chunk-8b2tw2yp.js.map} +0 -0
  280. /package/dist/{chunk-2xqrh6d0.js.map → chunk-et4pv1b1.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"DomainRouter.d.ts","sourceRoot":"","sources":["../../../services/router/DomainRouter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,cAAc,EAId,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAsB,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGnG;;;;GAIG;AACH,eAAO,MAAM,eAAe,0BAA0B,CAAC;AAEvD,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,kBAAkB,CAAC;IACxB,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED;;;;;GAKG;AACH,qBAAa,YAAY;IACvB,MAAM,CAA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,SAAoB;IAEhC,+EAA+E;IAC/E,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IACzC,wFAAwF;IACxF,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACvC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwC;gBAG7D,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE;QAAE,GAAG,EAAE,cAAc,CAAC;QAAC,IAAI,EAAE,eAAe,CAAC;QAAC,OAAO,CAAC,EAAE,aAAa,CAAA;KAAE;IAuBjF;;;;;;OAMG;IACG,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAiB5D;;;;;;;;;;;OAWG;IACG,GAAG,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAgBjD,kEAAkE;IAClE,WAAW,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,GAAG,iBAAiB;IAI7D,mGAAmG;IACnG,eAAe,IAAI,mBAAmB,EAAE;IAIxC;;;;;OAKG;IACH,UAAU,IAAI,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,mBAAmB,CAAA;KAAE,CAAC;CAUlE"}
@@ -3,6 +3,7 @@ import { type CarriedContext } from "../../http/requestContext";
3
3
  import { type FlatViewRoutes } from "./createFlatViewRoutes";
4
4
  import { type ViewRouteConfig } from "./config";
5
5
  import type { ComponentTree } from "../../client/types";
6
+ import { type IslandResolver } from "./staticDocument";
6
7
  /**
7
8
  * `/assets` is where the client build output is served from, ahead of the
8
9
  * router — a route mounted there could never be reached in production, and in
@@ -30,6 +31,12 @@ export declare class ViewRouteDispatcher {
30
31
  clientRouteManifest: Record<string, string[]>;
31
32
  componentTree: ComponentTree;
32
33
  flatComponentTree: string[];
34
+ /**
35
+ * Route patterns declared `.static()`. Shipped to the browser so a
36
+ * client-side navigation to one becomes a full page load: the page has no
37
+ * client router to render it into.
38
+ */
39
+ staticRoutes: string[];
33
40
  root: any;
34
41
  /**
35
42
  * The shell-content hint (#294): React defers any boundary over
@@ -63,7 +70,9 @@ export declare class ViewRouteDispatcher {
63
70
  * a route inside a gated section cannot be more reachable than the section.
64
71
  */
65
72
  private passesFeatureGates;
66
- onRequestEnd(req: HttpRequest): Promise<void>;
73
+ onRequestEnd(req: HttpRequest, options?: {
74
+ mintSession?: boolean;
75
+ }): Promise<void>;
67
76
  /**
68
77
  * Fires the provider's `onStreamComplete` from a stream callback — an
69
78
  * observability hook must never break the response body it observes, so
@@ -78,9 +87,26 @@ export declare class ViewRouteDispatcher {
78
87
  private completeStream;
79
88
  /** See `preloadCache`. */
80
89
  private modulePreloadLinks;
90
+ /**
91
+ * A `.static()` view's document: the same tree a hydrated view renders, but
92
+ * settled before the first byte and sent with no client runtime — no entry
93
+ * module, `modulepreload`s, `__GEMI_DATA__`, theme script, query or
94
+ * dictionary payloads, or React's streaming scripts. Islands that rendered
95
+ * add their loader (`injectIslands`).
96
+ */
97
+ private renderStatic;
81
98
  private render;
82
99
  handleViewRequest(req: Request, carried?: CarriedContext | null): Promise<Response | ((params: {
83
- getStyles: (p: string[]) => Promise<any[]>;
100
+ /**
101
+ * `static` is set for a static view, which has no client to load CSS
102
+ * later: the styles must cover the views' whole import graph. `layout`
103
+ * is its own document layout, whose CSS then replaces the app's
104
+ * stylesheet.
105
+ */
106
+ getStyles: (p: string[], options?: {
107
+ static?: boolean;
108
+ layout?: string;
109
+ }) => Promise<any[]>;
84
110
  viewImportMap: any;
85
111
  bootstrapModules?: string[];
86
112
  loaders: string;
@@ -119,6 +145,8 @@ export declare class ViewRouteDispatcher {
119
145
  * each one is inlined into — so the client needs the base to fetch one.
120
146
  */
121
147
  assetBase?: string;
148
+ /** Where island client modules are served from; see `injectIslands`. */
149
+ resolveIsland?: IslandResolver;
122
150
  }) => Promise<Response>)>;
123
151
  }
124
152
  //# sourceMappingURL=ViewRouteDispatcher.d.ts.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}
@@ -1,5 +1,5 @@
1
1
  import type { HttpRequest } from "../../http";
2
- import type { ViewRoutes } from "../../http/ViewRouter";
2
+ import type { StaticViewOptions, ViewRoutes } from "../../http/ViewRouter";
3
3
  export type ViewRouteExec = (req: HttpRequest<any, any>) => any;
4
4
  /**
5
5
  * One entry per segment of a route, parallel to `exec` — `segments[i]` is what
@@ -27,6 +27,12 @@ export type FlatViewRoutes = Record<string, {
27
27
  * itself is built once at boot and cannot vary by user.
28
28
  */
29
29
  features: string[];
30
+ /**
31
+ * Set when the route's view was declared `.static()`: the document is sent
32
+ * settled and without the client runtime. Only a leaf view can be static;
33
+ * the layouts above it render into the same static document.
34
+ */
35
+ static?: StaticViewOptions;
30
36
  }>;
31
37
  export declare function createFlatViewRoutes(routes: ViewRoutes): {
32
38
  [k: string]: {
@@ -41,6 +47,12 @@ export declare function createFlatViewRoutes(routes: ViewRoutes): {
41
47
  * itself is built once at boot and cannot vary by user.
42
48
  */
43
49
  features: string[];
50
+ /**
51
+ * Set when the route's view was declared `.static()`: the document is sent
52
+ * settled and without the client runtime. Only a leaf view can be static;
53
+ * the layouts above it render into the same static document.
54
+ */
55
+ static?: StaticViewOptions;
44
56
  };
45
57
  };
46
58
  //# sourceMappingURL=createFlatViewRoutes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createFlatViewRoutes.d.ts","sourceRoot":"","sources":["../../../services/router/createFlatViewRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC;AAEhE;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,4DAA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AE,gBAAgB,EAAE,CAAC;IAC7B;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B,CACF,CAAC;AAmCF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU;;cArD7C,aAAa,EAAE;oBACT,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE;kBAClB,MAAM;kBACN,gBAAgB,EAAE;QAC5B;;;;;WAKG;kBACO,MAAM,EAAE;QAClB;;;;WAIG;iBACM,iBAAiB;;EAiH7B"}
@@ -0,0 +1,23 @@
1
+ import type { StaticViewOptions } from "../../http/ViewRouter";
2
+ /**
3
+ * Which of the cookies gemi sets on its own a view request gets.
4
+ *
5
+ * A hydrated view gets all three. A static view (`.static()`) gets none unless
6
+ * it asked: it is one body for every visitor, and a per-visitor `Set-Cookie`
7
+ * is what keeps a CDN from caching it. `i18n-locale` has no opt-in — the url
8
+ * carries a static page's locale.
9
+ */
10
+ export declare function staticCookiePolicy(staticView: StaticViewOptions | undefined): {
11
+ locale: boolean;
12
+ session: boolean;
13
+ csrf: boolean;
14
+ };
15
+ /**
16
+ * Sets a static page's `Cache-Control` from `.static({ cacheControl })`.
17
+ *
18
+ * The handler's own header wins. A response that sets a cookie is never handed
19
+ * to a shared cache, whatever the option says: one visitor's cookie stored with
20
+ * the page would be replayed to everyone who gets that copy.
21
+ */
22
+ export declare function applyStaticCacheControl(headers: Headers, staticView: StaticViewOptions): void;
23
+ //# sourceMappingURL=staticCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"staticCache.d.ts","sourceRoot":"","sources":["../../../services/router/staticCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,iBAAiB,GAAG,SAAS;;;;EAS3E;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,iBAAiB,QAatF"}
@@ -0,0 +1,66 @@
1
+ import { type StaticRenderCollector } from "../../client/islands";
2
+ /**
3
+ * Where an island's entry is served from: `src` is imported by the loader,
4
+ * `preload` is every chunk that import pulls in (itself first), React
5
+ * included.
6
+ */
7
+ export type IslandAsset = {
8
+ src: string;
9
+ preload: string[];
10
+ };
11
+ /** Maps an island module's build key (`app/views/site/Counter.tsx`) to its entry. */
12
+ export type IslandResolver = (moduleKey: string) => IslandAsset | undefined;
13
+ /** The id of the JSON block the loader reads its island table from. */
14
+ export declare const ISLAND_DATA_ID = "gemi-islands";
15
+ /**
16
+ * The island loader, inlined into a static document that uses islands.
17
+ *
18
+ * Kept byte-for-byte constant (the per-page island table travels in a
19
+ * separate `<script type="application/json">`, which a Content Security Policy
20
+ * does not treat as script), so a strict policy can allow it by hash:
21
+ * `script-src 'sha256-…'` with `ISLAND_LOADER_CSP_HASH`. Everything it loads
22
+ * is a plain `import()` of a same-origin (or asset-base) file.
23
+ *
24
+ * The table is `{ i: [{ s: entry URL, e: export, l: load }] }` and each
25
+ * marker's `data-island` indexes `i`. Per marker, on its schedule: import the
26
+ * island's entry (the module as `m`, the runtime's `h`), then
27
+ * `h(marker, m[export])`, which calls `hydrateRoot`. A failure is logged and
28
+ * leaves the server-rendered markup in place.
29
+ */
30
+ export declare const ISLAND_LOADER_SOURCE: string;
31
+ /**
32
+ * `'sha256-…'` for the production island loader, ready to put in a
33
+ * `script-src` directive. The dev loader also installs the React Refresh
34
+ * preamble and Vite's HMR client first, so it does not match; a dev policy
35
+ * needs `'unsafe-inline'` as Vite itself does.
36
+ */
37
+ export declare const ISLAND_LOADER_CSP_HASH: string;
38
+ /**
39
+ * Adds the island loader to a settled static document, only when the render
40
+ * recorded an island, so a page without one keeps no script at all.
41
+ *
42
+ * Eager islands get `modulepreload`s in the head for their entry's whole
43
+ * static import closure (React included); lazy ones are fetched when their
44
+ * schedule fires, so nothing about them is announced up front.
45
+ *
46
+ * Without a resolver (a test rendering through `app.fetch`), the markup is
47
+ * the whole result: nothing is injected and nothing is logged.
48
+ */
49
+ export declare function injectIslands(html: string, collector: StaticRenderCollector, resolveIsland: IslandResolver | undefined, dev: boolean): string;
50
+ /**
51
+ * Moves each island's children into its slot.
52
+ *
53
+ * An island's own render (a root of its own) leaves an empty
54
+ * `<gemi-slot data-slot="i0-">`; the page tree renders the children, with the
55
+ * page's context, right after the marker in `<template data-gemi-slot="i0-">`.
56
+ * Here the template's content replaces the placeholder (as
57
+ * `<gemi-slot style="display:contents">…</gemi-slot>`, what the browser
58
+ * hydrates against) and the template goes away.
59
+ *
60
+ * The last template is spliced first: nothing after it can be inside it, so it
61
+ * holds no other island's children, and an island's children that contain
62
+ * islands are spliced after theirs are. Children the island didn't render are
63
+ * dropped, as a component that ignores `children` drops them anywhere.
64
+ */
65
+ export declare function spliceIslandSlots(html: string): string;
66
+ //# sourceMappingURL=staticDocument.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"staticDocument.d.ts","sourceRoot":"","sources":["../../../services/router/staticDocument.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AAG9B;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAE7D,qFAAqF;AACrF,MAAM,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,WAAW,GAAG,SAAS,CAAC;AAE5E,uEAAuE;AACvE,eAAO,MAAM,cAAc,iBAAiB,CAAC;AAE7C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,QAM8G,CAAC;AAEhJ;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,QAEb,CAAC;AA0BvB;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,qBAAqB,EAChC,aAAa,EAAE,cAAc,GAAG,SAAS,EACzC,GAAG,EAAE,OAAO,GACX,MAAM,CAiCR;AAcD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAgBtD"}
@@ -0,0 +1,104 @@
1
+ import { type ViteManifest } from "../server/modulePreloads";
2
+ import type { RouteTableEntry } from "./routeTable";
3
+ /**
4
+ * `gemi stats`: the JavaScript each route loads before it can run, from the
5
+ * client build's manifest.
6
+ *
7
+ * A **hydrated** route loads the client entry and every view in its chain
8
+ * (layouts and page), each with its static imports followed transitively: the
9
+ * same walk the server does for the route's `modulepreload` links. Lazy chunks
10
+ * (`import()`) aren't initial and don't count.
11
+ *
12
+ * A **static** route (`.static()`) loads no client entry and no view code, only
13
+ * the islands its views can render. Each island has a client entry of its own,
14
+ * keyed `<module>?gemi-island` in the manifest, that imports the chunk holding
15
+ * the island's module and the island runtime (React, `react-dom/client`). A
16
+ * route can render an island when the chunk holding its module is reachable
17
+ * from the route's views (and the document layout) through static or lazy
18
+ * imports; the route then counts that island entry with its static imports. A
19
+ * page loads only the islands it shows, so this is its most. Chunks the islands
20
+ * share (the runtime, React) count once per route. The island loader is inline
21
+ * in the HTML and not counted.
22
+ *
23
+ * Sizes are raw, gzip -9 and brotli q11, the encodings `gemi build` writes
24
+ * next to each asset; those files are read when present.
25
+ */
26
+ export type Size = {
27
+ raw: number;
28
+ gzip: number;
29
+ brotli: number;
30
+ };
31
+ export type SizeUnit = keyof Size;
32
+ export interface RouteStats extends Size {
33
+ /** View paths that render the route, outermost layout first. */
34
+ views: string[];
35
+ /** Set for a `.static()` route. */
36
+ static?: true;
37
+ /** A static route's island entries (manifest keys, `<module>?gemi-island`). */
38
+ islands?: string[];
39
+ /** The JS chunks counted, by name without the content hash. */
40
+ chunks: string[];
41
+ }
42
+ export interface BuildStats {
43
+ /** The JSON shape, bumped when it changes incompatibly. */
44
+ version: 1;
45
+ /**
46
+ * `routes`: keyed by route path (`/p/:slug`; `<group>:/path` for a host group
47
+ * other than the root). `views`: the route table could not be read, so each
48
+ * view is reported as a hydrated page, keyed by view path.
49
+ */
50
+ by: "routes" | "views";
51
+ routes: Record<string, RouteStats>;
52
+ /** Each island entry (`<module>?gemi-island`) with its static imports. */
53
+ islands: Record<string, Size & {
54
+ chunks: string[];
55
+ }>;
56
+ /** Every JS chunk in the build, by name without the content hash. */
57
+ chunks: Record<string, Size>;
58
+ /** All CSS in the build. */
59
+ css: Size;
60
+ }
61
+ /** `stats` in `gemi.config.ts`. */
62
+ export interface StatsConfig {
63
+ budgets?: StatsBudgets;
64
+ }
65
+ /** Initial-JS budgets in KB (1024 bytes). `gemi stats` fails when a route is over its. */
66
+ export interface StatsBudgets {
67
+ /** Which size the budgets are in. Default `gzip`. */
68
+ unit?: SizeUnit;
69
+ /** Applies to every route without its own budget. Unset: only listed routes are checked. */
70
+ default?: number;
71
+ /** By route path (`/p/:slug`) or by view path (`site/Page`, the route's page view). */
72
+ routes?: Record<string, number>;
73
+ }
74
+ /**
75
+ * A chunk by its name without the content hash, so the same chunk compares
76
+ * across builds: `assets/PageBuilder-C4f9a1Xz.js` is `PageBuilder.js`.
77
+ */
78
+ export declare function chunkName(file: string): string;
79
+ /** The route key in `BuildStats.routes`: the path, prefixed by a non-root host group. */
80
+ export declare function routeKey(entry: Pick<RouteTableEntry, "group" | "path">): string;
81
+ export interface BundleStatsOptions {
82
+ /** The client build, `dist/client`. */
83
+ clientDir: string;
84
+ /** The route table; without it every view is reported as a hydrated page. */
85
+ routes?: RouteTableEntry[] | null;
86
+ /** The manifest, if already read; otherwise `<clientDir>/.vite/manifest.json`. */
87
+ manifest?: ViteManifest;
88
+ }
89
+ export declare function bundleStats(options: BundleStatsOptions): BuildStats;
90
+ /** The budget that applies to a route: its own, its page view's, or the default. */
91
+ export declare function budgetFor(key: string, route: Pick<RouteStats, "views">, budgets: StatsBudgets | undefined): number | undefined;
92
+ /** The routes over their budget, as messages. */
93
+ export declare function overBudget(stats: BuildStats, budgets: StatsBudgets | undefined): string[];
94
+ /** Budget keys that match no route and no route's page view: probably a typo or a removed view. */
95
+ export declare function unusedBudgets(stats: BuildStats, budgets: StatsBudgets | undefined): string[];
96
+ /**
97
+ * The stats as a Markdown table, compared with `base` (another build's JSON,
98
+ * e.g. `main`'s) when given: per-route deltas, then the chunks that came, went
99
+ * or changed. Meant for a PR comment.
100
+ */
101
+ export declare function markdownReport(stats: BuildStats, base: BuildStats | null, budgets: StatsBudgets | undefined): string;
102
+ /** The stats as a plain-text table for the terminal, largest route first. */
103
+ export declare function textReport(stats: BuildStats, budgets: StatsBudgets | undefined): string;
104
+ //# sourceMappingURL=bundleStats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundleStats.d.ts","sourceRoot":"","sources":["../../stats/bundleStats.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,YAAY,EAElB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,MAAM,MAAM,IAAI,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AACjE,MAAM,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC;AAElC,MAAM,WAAW,UAAW,SAAQ,IAAI;IACtC,gEAAgE;IAChE,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,mCAAmC;IACnC,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,+DAA+D;IAC/D,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,2DAA2D;IAC3D,OAAO,EAAE,CAA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C,EAChC,OAAO,EAAE,YAAY,GAAG,SAAS,GAChC,MAAM,GAAG,SAAS,CAIpB;AAED,iDAAiD;AACjD,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,SAAS,GAAG,MAAM,EAAE,CASzF;AAED,mGAAmG;AACnG,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,SAAS,GAAG,MAAM,EAAE,CAQ5F;AAQD;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,UAAU,GAAG,IAAI,EACvB,OAAO,EAAE,YAAY,GAAG,SAAS,GAChC,MAAM,CA6CR;AAED,6EAA6E;AAC7E,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,SAAS,GAAG,MAAM,CAkDvF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=route-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route-table.d.ts","sourceRoot":"","sources":["../../stats/route-table.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import"../chunk-1yx2e0bh.js";import M from"path";import{writeFileSync as Q}from"fs";var L=new Set(["FILE","REDIRECT"]);function H(j){return j.run(()=>{let x=[];for(let{group:z,view:D}of j.domains().viewGroups())for(let[G,B]of Object.entries(D.flatViewRoutes)){let C=D.routeManifest[G]??B.segments.map((K)=>K.viewPath);if(C.length===0||L.has(C.at(-1)))continue;x.push({path:G,group:z,views:C,...B.static?{static:B.static.layout?{layout:B.static.layout}:{}}:{}})}return x})}var J=process.argv[2];async function U(){if(!J)throw Error("usage: route-table <out.json>");let j=M.resolve(process.cwd(),"app/kernel/Kernel.ts"),x=await import(j);if(typeof x.default!=="function")throw Error(`${j} has no default export (the Kernel subclass).`);let z=new x.default;z.boot();try{Q(J,JSON.stringify(H(z)))}finally{z.destroy()}}U().then(()=>process.exit(0),(j)=>{console.error(j?.stack??String(j)),process.exit(1)});
3
+
4
+ //# debugId=2C354352EBF6475164756E2164756E21
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../stats/route-table.ts", "../stats/routeTable.ts"],
4
+ "sourcesContent": [
5
+ "/**\n * The entry `gemi stats` (and `gemi build --stats`) spawns to read the app's\n * route table: `bun --preload gemi/bun/preload stats/route-table.ts <out>`.\n *\n * `gemi build` deliberately never boots the app (see `bin/createRollupInput`).\n * This doesn't either, in the sense that matters: it imports the Kernel and\n * runs only its synchronous `boot()`, which registers providers and constructs\n * nothing that does I/O. No provider `boot()`, no service, no database, no\n * queue claiming and no scheduler. Importing the app's route files is the one\n * side effect, the same one `gemi app:route-manifest` has.\n *\n * Exposed as `gemi/stats/route-table` and resolved from the application's\n * `node_modules`, like `gemi/console/run`: the routers the app's files extend\n * are the app's copy of gemi, so the code reading them has to be as well.\n *\n * The table is written to the file named by the first argument rather than to\n * stdout, which app code is free to log to while it is imported.\n */\nimport path from \"node:path\";\nimport { writeFileSync } from \"node:fs\";\nimport type { Kernel } from \"../kernel/Kernel\";\nimport { collectRouteTable } from \"./routeTable\";\n\nconst out = process.argv[2];\n\nasync function main() {\n if (!out) throw new Error(\"usage: route-table <out.json>\");\n const kernelPath = path.resolve(process.cwd(), \"app/kernel/Kernel.ts\");\n const module: { default?: new () => Kernel } = await import(kernelPath);\n if (typeof module.default !== \"function\") {\n throw new Error(`${kernelPath} has no default export (the Kernel subclass).`);\n }\n const kernel = new module.default();\n kernel.boot();\n try {\n writeFileSync(out, JSON.stringify(collectRouteTable(kernel)));\n } finally {\n kernel.destroy();\n }\n}\n\n// `.then` rather than a top-level `await`; see `console/run.ts`.\nmain().then(\n () => process.exit(0),\n (error) => {\n console.error((error as Error)?.stack ?? String(error));\n process.exit(1);\n },\n);\n",
6
+ "import type { Kernel } from \"../kernel/Kernel\";\n\n/**\n * One document route, as `gemi stats` needs it: which views render it (layouts\n * first, the page last) and whether it is a `.static()` view.\n */\nexport interface RouteTableEntry {\n /** The route pattern, e.g. `/p/:slug`. */\n path: string;\n /** The host group: `\"\"` for the root, a subdomain, `\"*\"` for the custom fallback. */\n group: string;\n /** View paths (`app/views/<path>.tsx`), outermost layout first. */\n views: string[];\n /** Set for a `.static()` route; `layout` is its document layout, if any. */\n static?: { layout?: string };\n}\n\n/** View paths that name no component: file and redirect routes. */\nconst NOT_A_VIEW = new Set([\"FILE\", \"REDIRECT\"]);\n\n/**\n * Every document route the app declares, from a kernel that has only run its\n * synchronous `boot()`: providers have registered, nothing has booted, so no\n * database, queue, scheduler or listener is touched. Reading the routers only\n * constructs them, which is what `app:route-manifest` has always done.\n */\nexport function collectRouteTable(kernel: Kernel): RouteTableEntry[] {\n return kernel.run(() => {\n const entries: RouteTableEntry[] = [];\n for (const { group, view } of kernel.domains().viewGroups()) {\n for (const [path, route] of Object.entries(view.flatViewRoutes)) {\n const views = view.routeManifest[path] ?? route.segments.map((s) => s.viewPath);\n if (views.length === 0 || NOT_A_VIEW.has(views.at(-1)!)) continue;\n entries.push({\n path,\n group,\n views,\n ...(route.static\n ? { static: route.static.layout ? { layout: route.static.layout } : {} }\n : {}),\n });\n }\n }\n return entries;\n });\n}\n"
7
+ ],
8
+ "mappings": ";6BAkBA,oBACA,wBAAS,WCDT,IAAM,EAAa,IAAI,IAAI,CAAC,OAAQ,UAAU,CAAC,EAQxC,SAAS,CAAiB,CAAC,EAAmC,CACnE,OAAO,EAAO,IAAI,IAAM,CACtB,IAAM,EAA6B,CAAC,EACpC,QAAa,QAAO,UAAU,EAAO,QAAQ,EAAE,WAAW,EACxD,QAAY,EAAM,KAAU,OAAO,QAAQ,EAAK,cAAc,EAAG,CAC/D,IAAM,EAAQ,EAAK,cAAc,IAAS,EAAM,SAAS,IAAI,CAAC,IAAM,EAAE,QAAQ,EAC9E,GAAI,EAAM,SAAW,GAAK,EAAW,IAAI,EAAM,GAAG,EAAE,CAAE,EAAG,SACzD,EAAQ,KAAK,CACX,OACA,QACA,WACI,EAAM,OACN,CAAE,OAAQ,EAAM,OAAO,OAAS,CAAE,OAAQ,EAAM,OAAO,MAAO,EAAI,CAAC,CAAE,EACrE,CAAC,CACP,CAAC,EAGL,OAAO,EACR,EDrBH,IAAM,EAAM,QAAQ,KAAK,GAEzB,eAAe,CAAI,EAAG,CACpB,GAAI,CAAC,EAAK,MAAU,MAAM,+BAA+B,EACzD,IAAM,EAAa,EAAK,QAAQ,QAAQ,IAAI,EAAG,sBAAsB,EAC/D,EAAyC,MAAa,UAC5D,GAAI,OAAO,EAAO,UAAY,WAC5B,MAAU,MAAM,GAAG,gDAAyD,EAE9E,IAAM,EAAS,IAAI,EAAO,QAC1B,EAAO,KAAK,EACZ,GAAI,CACF,EAAc,EAAK,KAAK,UAAU,EAAkB,CAAM,CAAC,CAAC,SAC5D,CACA,EAAO,QAAQ,GAKnB,EAAK,EAAE,KACL,IAAM,QAAQ,KAAK,CAAC,EACpB,CAAC,IAAU,CACT,QAAQ,MAAO,GAAiB,OAAS,OAAO,CAAK,CAAC,EACtD,QAAQ,KAAK,CAAC,EAElB",
9
+ "debugId": "2C354352EBF6475164756E2164756E21",
10
+ "names": []
11
+ }
@@ -0,0 +1,25 @@
1
+ import type { Kernel } from "../kernel/Kernel";
2
+ /**
3
+ * One document route, as `gemi stats` needs it: which views render it (layouts
4
+ * first, the page last) and whether it is a `.static()` view.
5
+ */
6
+ export interface RouteTableEntry {
7
+ /** The route pattern, e.g. `/p/:slug`. */
8
+ path: string;
9
+ /** The host group: `""` for the root, a subdomain, `"*"` for the custom fallback. */
10
+ group: string;
11
+ /** View paths (`app/views/<path>.tsx`), outermost layout first. */
12
+ views: string[];
13
+ /** Set for a `.static()` route; `layout` is its document layout, if any. */
14
+ static?: {
15
+ layout?: string;
16
+ };
17
+ }
18
+ /**
19
+ * Every document route the app declares, from a kernel that has only run its
20
+ * synchronous `boot()`: providers have registered, nothing has booted, so no
21
+ * database, queue, scheduler or listener is touched. Reading the routers only
22
+ * constructs them, which is what `app:route-manifest` has always done.
23
+ */
24
+ export declare function collectRouteTable(kernel: Kernel): RouteTableEntry[];
25
+ //# sourceMappingURL=routeTable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routeTable.d.ts","sourceRoot":"","sources":["../../stats/routeTable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,qFAAqF;IACrF,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,4EAA4E;IAC5E,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9B;AAKD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,EAAE,CAmBnE"}
@@ -0,0 +1,43 @@
1
+ import { type StatsConfig } from "./bundleStats";
2
+ import type { RouteTableEntry } from "./routeTable";
3
+ export interface RunStatsOptions {
4
+ rootDir: string;
5
+ /** `stats` from `gemi.config.ts`. */
6
+ config?: StatsConfig;
7
+ /** Write the stats as JSON here. */
8
+ json?: string;
9
+ /** Another build's JSON to compare with; a missing file is no comparison. */
10
+ base?: string;
11
+ /** Write the Markdown table here. */
12
+ markdown?: string;
13
+ /** `false` skips the route table and reports per view. */
14
+ routes?: boolean;
15
+ /** `bun --preload` args for the app's own preload (see `bin/gemi.ts`). */
16
+ preloadArgs?: string[];
17
+ log?: (line: string) => void;
18
+ error?: (line: string) => void;
19
+ }
20
+ /**
21
+ * Reads the client build in `<rootDir>/dist/client`, prints the initial JS per
22
+ * route, writes the requested files and checks the budgets. Returns the exit
23
+ * code: 1 when a route is over its budget or there is no build to read.
24
+ */
25
+ export declare function runStats(options: RunStatsOptions): Promise<number>;
26
+ export type RouteTableResult = {
27
+ ok: true;
28
+ routes: RouteTableEntry[];
29
+ } | {
30
+ ok: false;
31
+ message: string;
32
+ };
33
+ /**
34
+ * The app's route table, read in a child process (`gemi/stats/route-table`)
35
+ * that imports the Kernel and runs only its synchronous `boot()`, with the same
36
+ * preloads as `gemi start`. A child, because the app's code has to load under
37
+ * the app's own gemi with the request transform registered, and because it
38
+ * must not leave anything running in the build process.
39
+ */
40
+ export declare function loadRouteTable(rootDir: string, preloadArgs: string[], options?: {
41
+ timeoutMs?: number;
42
+ }): Promise<RouteTableResult>;
43
+ //# sourceMappingURL=run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../stats/run.ts"],"names":[],"mappings":"AAGA,OAAO,EAOL,KAAK,WAAW,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CA6CxE;AAED,MAAM,MAAM,gBAAgB,GACxB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,eAAe,EAAE,CAAA;CAAE,GACvC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnC;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EAAE,EACrB,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GACnC,OAAO,CAAC,gBAAgB,CAAC,CAuC3B"}
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{hc as Y}from"../chunk-9hbwvcxn.js";import{$f as M}from"../chunk-5wt25tyd.js";import{$g as P,bh as R}from"../chunk-9mqqr05d.js";import"../chunk-2gmgd05c.js";import{kh as Q,lh as U,mh as V,nh as W}from"../chunk-kqz8jp6v.js";import"../chunk-3s3awh38.js";class S{static token;async boot(){}static inject(){if(!this.token)throw Error(`Service [${this.name}] does not declare a \`static token\`, so the container has no key to resolve it by.`);try{return R(this)}catch(x){throw Error(`Could not inject [${this.name}]. Services are constructed when the kernel boots, so `+"inject() only works from code that runs after that \u2014 a constructor default or a method "+`body, never module top level. Check that [${this.name}] is listed in \`services\` on your Kernel.`,{cause:x})}}static with(x){let f=new this;for(let[C,g]of Object.entries(x))if(g!==void 0)f[C]=g;return f}}import{readdir as z}from"fs/promises";import{join as B,parse as j}from"path";var H=[".ts",".tsx",".js",".mjs",".jsx"];function J(x={}){let f={};for(let[C,g]of Object.entries(x))f[C]=q(g);return new P(f)}async function L(x,f=new P){let C=[];try{C=await z(x)}catch(D){return f}let g=C.filter((D)=>{let{ext:v,name:F}=j(D);return H.includes(v)&&!F.startsWith(".")}).sort();for(let D of g){let{name:v}=j(D),F=await import(B(x,D));f.set(v,q(F))}return f}function q(x){if(x&&typeof x==="object"&&"default"in x)return x.default;return x}export{M as withDefaults,Q as sourceFiles,W as projectRoot,L as loadConfigFrom,V as discoverClasses,J as createConfigRepository,Y as ServiceProvider,S as Service,P as Repository,U as DiscoveryError};
2
+ import{pc as Y}from"../chunk-qd2v93y4.js";import{ig as M}from"../chunk-bn5yn731.js";import{jh as P,lh as R}from"../chunk-q9s7kwgt.js";import"../chunk-3cg7y62b.js";import{uh as Q,vh as U,wh as V,xh as W}from"../chunk-m6ystvtk.js";import"../chunk-1yx2e0bh.js";class S{static token;async boot(){}static inject(){if(!this.token)throw Error(`Service [${this.name}] does not declare a \`static token\`, so the container has no key to resolve it by.`);try{return R(this)}catch(x){throw Error(`Could not inject [${this.name}]. Services are constructed when the kernel boots, so `+"inject() only works from code that runs after that \u2014 a constructor default or a method "+`body, never module top level. Check that [${this.name}] is listed in \`services\` on your Kernel.`,{cause:x})}}static with(x){let f=new this;for(let[C,g]of Object.entries(x))if(g!==void 0)f[C]=g;return f}}import{readdir as z}from"fs/promises";import{join as B,parse as j}from"path";var H=[".ts",".tsx",".js",".mjs",".jsx"];function J(x={}){let f={};for(let[C,g]of Object.entries(x))f[C]=q(g);return new P(f)}async function L(x,f=new P){let C=[];try{C=await z(x)}catch(D){return f}let g=C.filter((D)=>{let{ext:v,name:F}=j(D);return H.includes(v)&&!F.startsWith(".")}).sort();for(let D of g){let{name:v}=j(D),F=await import(B(x,D));f.set(v,q(F))}return f}function q(x){if(x&&typeof x==="object"&&"default"in x)return x.default;return x}export{M as withDefaults,Q as sourceFiles,W as projectRoot,L as loadConfigFrom,V as discoverClasses,J as createConfigRepository,Y as ServiceProvider,S as Service,P as Repository,U as DiscoveryError};
3
3
 
4
- //# debugId=3E389AC0A1C738F164756E2164756E21
4
+ //# debugId=447CF5C12AD6A7A564756E2164756E21
@@ -6,6 +6,6 @@
6
6
  "import { readdir } from \"node:fs/promises\";\nimport { join, parse } from \"node:path\";\n\nimport { Repository } from \"./Repository\";\n\nconst CONFIG_EXTENSIONS = [\".ts\", \".tsx\", \".js\", \".mjs\", \".jsx\"];\n\n// Builds a Repository from an already-imported map of config modules. The map\n// key becomes the top-level config key, so `{ mail: mailModule }` is readable\n// as `config.get(\"mail.driver\")`. Each entry may be either the module namespace\n// (its `default` export is unwrapped) or the config object itself.\nexport function createConfigRepository(\n modules: Record<string, any> = {},\n): Repository {\n const items: Record<string, any> = {};\n\n for (const [key, mod] of Object.entries(modules)) {\n items[key] = unwrap(mod);\n }\n\n return new Repository(items);\n}\n\n// Reads every config module in an app's `app/config` directory into a\n// Repository. The file's basename is the top-level key: `app/config/mail.ts`\n// populates `mail.*`. A missing directory yields an empty Repository so apps\n// that declare no config still boot.\nexport async function loadConfigFrom(\n directory: string,\n repository = new Repository(),\n): Promise<Repository> {\n let entries: string[] = [];\n\n try {\n entries = await readdir(directory);\n } catch (err) {\n return repository;\n }\n\n const files = entries\n .filter((entry) => {\n const { ext, name } = parse(entry);\n return CONFIG_EXTENSIONS.includes(ext) && !name.startsWith(\".\");\n })\n .sort();\n\n for (const file of files) {\n const { name } = parse(file);\n const mod = await import(join(directory, file));\n repository.set(name, unwrap(mod));\n }\n\n return repository;\n}\n\nfunction unwrap(mod: any) {\n if (mod && typeof mod === \"object\" && \"default\" in mod) {\n return mod.default;\n }\n return mod;\n}\n"
7
7
  ],
8
8
  "mappings": ";2RAgCO,CAAe,JAAQ,EAOrB,OAMD,AAAI,EAAkB,QAmBrB,OAAS,EAKX,CACH,GAAI,CAAC,KAAK,MACR,MAAU,MACR,YAAY,KAAK,0FACnB,EAGF,GAAI,CACF,OAAO,EAAI,IAAuB,EAClC,MAAO,EAAO,CACd,MAAU,MACR,qBAAqB,KAAK,6DACxB,+FACA,6CAA6C,KAAK,kDAEpD,CAAE,OAAM,CACV,SAoBG,KAAuB,CAAoB,EAA0B,CAC1E,IAAM,EAAW,IAAI,KACrB,QAAY,EAAK,KAAU,OAAO,QAAQ,CAAS,EACjD,GAAI,IAAU,OAAW,EAAS,GAAO,EAE3C,OAAO,EAEX,CChHA,kBAAS,oBACT,eAAS,WAAM,aAIf,IAAM,EAAoB,CAAC,MAAO,OAAQ,MAAO,OAAQ,MAAM,EAMxD,SAAS,CAAsB,CACpC,EAA+B,CAAC,EACpB,CACZ,IAAM,EAA6B,CAAC,EAEpC,QAAY,EAAK,KAAQ,OAAO,QAAQ,CAAO,EAC7C,EAAM,GAAO,EAAO,CAAG,EAGzB,OAAO,IAAI,EAAW,CAAK,EAO7B,eAAsB,CAAc,CAClC,EACA,EAAa,IAAI,EACI,CACrB,IAAI,EAAoB,CAAC,EAEzB,GAAI,CACF,EAAU,MAAM,EAAQ,CAAS,EACjC,MAAO,EAAK,CACZ,OAAO,EAGT,IAAM,EAAQ,EACX,OAAO,CAAC,IAAU,CACjB,IAAQ,MAAK,QAAS,EAAM,CAAK,EACjC,OAAO,EAAkB,SAAS,CAAG,GAAK,CAAC,EAAK,WAAW,GAAG,EAC/D,EACA,KAAK,EAER,QAAW,KAAQ,EAAO,CACxB,IAAQ,QAAS,EAAM,CAAI,EACrB,EAAM,MAAa,SAAK,EAAW,CAAI,GAC7C,EAAW,IAAI,EAAM,EAAO,CAAG,CAAC,EAGlC,OAAO,EAGT,SAAS,CAAM,CAAC,EAAU,CACxB,GAAI,GAAO,OAAO,IAAQ,UAAY,YAAa,EACjD,OAAO,EAAI,QAEb,OAAO",
9
- "debugId": "3E389AC0A1C738F164756E2164756E21",
9
+ "debugId": "447CF5C12AD6A7A564756E2164756E21",
10
10
  "names": []
11
11
  }
@@ -1,4 +1,4 @@
1
- import { B as QueryManagerProvider, D as I18nProvider, F as createMemoryHistory, I as toVariantKey, J as Subject, L as applyParams, N as ProgressManager, O as ServerDataContext, P as Action, i as RouteTransitionProvider, o as ClientRouterContext, r as m, t as ThemeProvider, z as QueryManagerContext } from "../chunks/ThemeProvider-Cqfwr6dk.js";
1
+ import { B as QueryManagerProvider, D as I18nProvider, F as createMemoryHistory, I as toVariantKey, J as Subject, L as applyParams, N as ProgressManager, O as ServerDataContext, P as Action, i as RouteTransitionProvider, o as ClientRouterContext, r as m, t as ThemeProvider, z as QueryManagerContext } from "../chunks/ThemeProvider-BgLyzzOL.js";
2
2
  import { r as RouteStateProvider } from "../chunks/useParams-BN3XXfmG.js";
3
3
  import { Suspense, useContext, useMemo, useRef, useState } from "react";
4
4
  import { jsx } from "react/jsx-runtime";