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
@@ -0,0 +1,127 @@
1
+ import { type ComponentType, type Context, type ReactElement } from "react";
2
+ /**
3
+ * When an island's code is fetched and hydrated, per marker.
4
+ *
5
+ * - `"eager"` (default): as soon as the page has parsed. The island's chunks
6
+ * and React are `modulepreload`ed from the head, so they are usually in
7
+ * cache by then.
8
+ * - `"idle"`: on `requestIdleCallback` (a timeout where unsupported).
9
+ * - `"visible"`: when the island's content first scrolls into view. Suits a
10
+ * heavy island far down the page, like a canvas or a map.
11
+ */
12
+ export type IslandLoad = "eager" | "idle" | "visible";
13
+ export interface IslandOptions {
14
+ /** When the island hydrates on a static page. Defaults to `"eager"`. */
15
+ load?: IslandLoad;
16
+ /** Which export of the module is the component. Defaults to `"default"`. */
17
+ export?: string;
18
+ }
19
+ /**
20
+ * `() => import("./Counter")`, the argument `island()` takes. gemi's Vite
21
+ * plugin adds the module's build key and the module itself, so the server can
22
+ * render it synchronously in a hydrated view and point a static page at its
23
+ * built chunk.
24
+ */
25
+ export type IslandLoader<M = any> = (() => Promise<M>) & {
26
+ /** @internal The module's path from the project root, the client manifest's key. */
27
+ gemiIsland?: string;
28
+ /** @internal The module, statically imported by the plugin. */
29
+ gemiModule?: M;
30
+ };
31
+ /** @internal One island module a static page uses: an entry of the page's island table. */
32
+ export interface IslandEntry {
33
+ /** The module's build key, or `undefined` when the plugin did not run. */
34
+ module: string | undefined;
35
+ export: string;
36
+ load: IslandLoad;
37
+ }
38
+ interface IslandInstance {
39
+ html: Promise<string>;
40
+ index: number;
41
+ uid: string;
42
+ props: string | undefined;
43
+ }
44
+ /**
45
+ * @internal Provided by the view router around a static view's render; `null`
46
+ * everywhere else, which is how `island()` knows to render a plain component.
47
+ */
48
+ export interface StaticRenderCollector {
49
+ /** The page's island table: what the loader imports, by marker index. */
50
+ islands: IslandEntry[];
51
+ /**
52
+ * Renders one island as its own React root, settled, to HTML. Supplied by
53
+ * the server, so this module never imports `react-dom/server`.
54
+ */
55
+ render: (element: ReactElement, identifierPrefix: string) => Promise<string>;
56
+ /** Per-instance render state, keyed by the island's props object. */
57
+ instances: WeakMap<object, IslandInstance>;
58
+ /** Instances rendered so far, for each one's `identifierPrefix`. */
59
+ count: number;
60
+ }
61
+ /** @internal */
62
+ export declare function createStaticRenderCollector(render: StaticRenderCollector["render"]): StaticRenderCollector;
63
+ /** @internal The element an island's static children land in. */
64
+ export declare const ISLAND_SLOT_TAG = "gemi-slot";
65
+ /** @internal On the empty slot an island's own render leaves for its children. */
66
+ export declare const ISLAND_SLOT_ATTRIBUTE = "data-slot";
67
+ /** @internal On the template holding the children the page tree rendered. */
68
+ export declare const ISLAND_SLOT_TEMPLATE_ATTRIBUTE = "data-gemi-slot";
69
+ /** The property gemi's Vite plugin attaches to an island's loader. */
70
+ export declare const ISLAND_MODULE_KEY = "gemiIsland";
71
+ /**
72
+ * @internal On `globalThis` rather than a module-level `createContext`: the
73
+ * published package bundles `gemi/client` and the server side separately, so a
74
+ * plain module singleton would give the provider and the islands two different
75
+ * context objects.
76
+ */
77
+ export declare const StaticRenderContext: Context<StaticRenderCollector | null>;
78
+ /**
79
+ * Throws when `value` would not survive `JSON.stringify` and `JSON.parse`
80
+ * unchanged, naming the prop. An island's props cross from the server to the
81
+ * browser as JSON: a function would vanish and a `Date` would arrive as a
82
+ * string, so the island would hydrate with other props than it rendered with.
83
+ */
84
+ export declare function assertSerialisableProps(value: unknown, island: string): void;
85
+ type AnyComponent = ComponentType<any>;
86
+ /**
87
+ * Makes a component an island: hydrated on its own on a static page, an
88
+ * ordinary component everywhere else.
89
+ *
90
+ * ```tsx
91
+ * // app/views/site/Counter.tsx: a plain React component
92
+ * export default function Counter({ start }: { start: number }) {
93
+ * const [n, setN] = useState(start);
94
+ * return <button onClick={() => setN(n + 1)}>{n}</button>;
95
+ * }
96
+ *
97
+ * // where it is used
98
+ * const Counter = island(() => import("./Counter"), { load: "visible" });
99
+ * <Counter start={3} />
100
+ * ```
101
+ *
102
+ * - In a **static** view (`this.view(...).static()`), it server-renders the
103
+ * component as its own React root inside a `<gemi-island>` marker and
104
+ * serialises its props. The page gets a tiny loader that, on the island's
105
+ * `load` trigger, imports React (one chunk shared by every island) and the
106
+ * component's chunk and calls `hydrateRoot` on the marker.
107
+ * - In a **hydrated** view, it is the component itself: rendered inline, with
108
+ * the page's context, and nothing extra to load.
109
+ *
110
+ * Write the loader exactly as `() => import("./path")` inside the `island(`
111
+ * call: gemi's Vite plugin finds that call, builds the module as its own
112
+ * client entry and imports it statically for the server.
113
+ *
114
+ * Props must be plain data (checked in dev). `children` are rendered on the
115
+ * server as static HTML and passed through untouched. On a static page the
116
+ * island is a separate React root, so context from the page does not reach it.
117
+ */
118
+ export declare function island<M extends {
119
+ default: AnyComponent;
120
+ }>(loader: () => Promise<M>, options?: IslandOptions & {
121
+ export?: "default";
122
+ }): M["default"];
123
+ export declare function island<M, K extends keyof M & string>(loader: () => Promise<M>, options: IslandOptions & {
124
+ export: K;
125
+ }): M[K];
126
+ export {};
127
+ //# sourceMappingURL=islands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"islands.d.ts","sourceRoot":"","sources":["../../client/islands.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,OAAO,EACZ,KAAK,YAAY,EAQlB,MAAM,OAAO,CAAC;AAEf;;;;;;;;;GASG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAEtD,MAAM,WAAW,aAAa;IAC5B,wEAAwE;IACxE,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG;IACvD,oFAAoF;IACpF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,CAAC,CAAC;CAChB,CAAC;AAEF,2FAA2F;AAC3F,MAAM,WAAW,WAAW;IAC1B,0EAA0E;IAC1E,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,yEAAyE;IACzE,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB;;;OAGG;IACH,MAAM,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,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1,8 @@
1
1
  import type { PluginOption } from "vite";
2
2
  import type { BunPlugin } from "bun";
3
3
  import type { PreviousAssetsConfig } from "../vite/previousAssets";
4
- export type { PreviousAssetsConfig };
4
+ import type { StatsBudgets, StatsConfig } from "../stats/bundleStats";
5
+ export type { PreviousAssetsConfig, StatsBudgets, StatsConfig };
5
6
  export interface GemiViteConfig {
6
7
  plugins?: PluginOption[];
7
8
  [key: string]: unknown;
@@ -31,6 +32,12 @@ export interface GemiConfig {
31
32
  * previous image's. Off by default.
32
33
  */
33
34
  previousAssets?: PreviousAssetsConfig | boolean;
35
+ /**
36
+ * `gemi stats` and `gemi build --stats`: initial-JS budgets per route, in KB.
37
+ * A route over its budget fails the command, so CI can hold pages to a size.
38
+ * See the docs' "Bundle stats" page.
39
+ */
40
+ stats?: StatsConfig;
34
41
  }
35
42
  export declare function defineConfig(config: GemiConfig): GemiConfig;
36
43
  export declare function reactCompiler(): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,YAAY,EAAE,oBAAoB,EAAE,CAAC;AAMrC,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAKD,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;OAQG;I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SAAS,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC"}
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import"../chunk-3s3awh38.js";function k(b){return b}function q(b){if((process.env.GEMI_REACT_COMPILER??"auto").toLowerCase()==="off")return!1;return b??!0}export{q as reactCompiler,k as defineConfig};
2
+ import"../chunk-1yx2e0bh.js";function k(b){return b}function q(b){if((process.env.GEMI_REACT_COMPILER??"auto").toLowerCase()==="off")return!1;return b??!0}export{q as reactCompiler,k as defineConfig};
3
3
 
4
4
  //# debugId=2F7F86887FCF6F1A64756E2164756E21
@@ -2,9 +2,9 @@
2
2
  "version": 3,
3
3
  "sources": ["../config/index.ts"],
4
4
  "sourcesContent": [
5
- "import type { PluginOption } from \"vite\";\nimport type { BunPlugin } from \"bun\";\nimport type { PreviousAssetsConfig } from \"../vite/previousAssets\";\n\nexport type { PreviousAssetsConfig };\n\n// Vite configuration contributed by the app. `plugins` are appended to gemi's\n// own Vite plugins; every other key is a standard Vite `UserConfig` field and is\n// merged (by Vite) on top of gemi's base config for the client + SSR view\n// builds. See `gemi/vite`.\nexport interface GemiViteConfig {\n plugins?: PluginOption[];\n [key: string]: unknown;\n}\n\n// Bun configuration contributed by the app. `plugins` are applied both at build\n// time (the server `Bun.build`) and at runtime (registered via `--preload` for\n// `dev`/`start`), alongside gemi's built-in custom-request plugin.\nexport interface GemiBunConfig {\n plugins?: BunPlugin[];\n}\n\nexport interface GemiConfig {\n vite?: GemiViteConfig;\n bun?: GemiBunConfig;\n /**\n * Where browsers fetch the client build from, e.g.\n * `https://cdn.example.com/<release>/` — an absolute URL or a path starting\n * with `/`. Applied at build time to the bundle and recorded in\n * `dist/client`, so the documents `gemi start` renders link the same base the\n * bundle was built with. `GEMI_ASSET_BASE` overrides it. Unset, assets are\n * root-relative (`/assets/...`), as they always were.\n */\n assetBase?: string;\n /**\n * Keep serving earlier releases' client assets after a deploy, so a tab\n * still on the old release can load its lazy chunks. `gemi build` copies the\n * previous `dist/client/assets` files into the new build and drops them\n * after `maxAge` seconds (default 7 days) or `releases` deploys (default 2).\n * `true` uses the defaults with this app's own `dist/client` as the source;\n * a container build points `from` (or `GEMI_PREVIOUS_ASSETS`) at the\n * previous image's. Off by default.\n */\n previousAssets?: PreviousAssetsConfig | boolean;\n}\n\n// Identity helper that gives `gemi.config.ts` full type-checking and editor\n// autocomplete. Usage:\n//\n// import { defineConfig } from \"gemi/config\";\n// export default defineConfig({ vite: { plugins: [] }, bun: { plugins: [] } });\nexport function defineConfig(config: GemiConfig): GemiConfig {\n return config;\n}\n\n// The value to pass as `@vitejs/plugin-react`'s `compiler` option, with an\n// environment switch in front of it:\n//\n// import react from \"@vitejs/plugin-react\";\n// import { defineConfig, reactCompiler } from \"gemi/config\";\n// export default defineConfig({ vite: { plugins: [react({ compiler: reactCompiler() })] } });\n//\n// `GEMI_REACT_COMPILER=off` turns the React Compiler off; any other value (or\n// none) leaves it on. Case-insensitive, and the same shape as `GEMI_COMPRESSION`\n// — a named opt-out rather than a boolean, because `=0`, `=false` and `=no` all\n// read as \"off\" to a human and only one of them can be the one that works.\n//\n// It lives here rather than as a `process.env` read in each app's\n// `gemi.config.ts` so the flag means the same thing in every gemi project, and\n// so bisecting a compiler-shaped bug is one variable rather than one edit:\n//\n// GEMI_REACT_COMPILER=off bun dev # is it the compiler?\n//\n// The variable is read where `gemi.config.ts` is loaded — inside the Vite\n// process that `dev` and `build` spawn — so it is inherited from the shell and\n// also picked up from `.env`, which Bun loads before the config imports.\n//\n// Pass compiler options through it to keep the switch and the options together;\n// `false` is returned in their place when the environment opts out.\nexport function reactCompiler(): boolean;\nexport function reactCompiler<T extends object>(options: T): T | false;\nexport function reactCompiler(options?: object): boolean | object {\n const enabled = (process.env.GEMI_REACT_COMPILER ?? \"auto\").toLowerCase() !== \"off\";\n if (!enabled) return false;\n return options ?? true;\n}\n"
5
+ "import type { PluginOption } from \"vite\";\nimport type { BunPlugin } from \"bun\";\nimport type { PreviousAssetsConfig } from \"../vite/previousAssets\";\nimport type { StatsBudgets, StatsConfig } from \"../stats/bundleStats\";\n\nexport type { PreviousAssetsConfig, StatsBudgets, StatsConfig };\n\n// Vite configuration contributed by the app. `plugins` are appended to gemi's\n// own Vite plugins; every other key is a standard Vite `UserConfig` field and is\n// merged (by Vite) on top of gemi's base config for the client + SSR view\n// builds. See `gemi/vite`.\nexport interface GemiViteConfig {\n plugins?: PluginOption[];\n [key: string]: unknown;\n}\n\n// Bun configuration contributed by the app. `plugins` are applied both at build\n// time (the server `Bun.build`) and at runtime (registered via `--preload` for\n// `dev`/`start`), alongside gemi's built-in custom-request plugin.\nexport interface GemiBunConfig {\n plugins?: BunPlugin[];\n}\n\nexport interface GemiConfig {\n vite?: GemiViteConfig;\n bun?: GemiBunConfig;\n /**\n * Where browsers fetch the client build from, e.g.\n * `https://cdn.example.com/<release>/` — an absolute URL or a path starting\n * with `/`. Applied at build time to the bundle and recorded in\n * `dist/client`, so the documents `gemi start` renders link the same base the\n * bundle was built with. `GEMI_ASSET_BASE` overrides it. Unset, assets are\n * root-relative (`/assets/...`), as they always were.\n */\n assetBase?: string;\n /**\n * Keep serving earlier releases' client assets after a deploy, so a tab\n * still on the old release can load its lazy chunks. `gemi build` copies the\n * previous `dist/client/assets` files into the new build and drops them\n * after `maxAge` seconds (default 7 days) or `releases` deploys (default 2).\n * `true` uses the defaults with this app's own `dist/client` as the source;\n * a container build points `from` (or `GEMI_PREVIOUS_ASSETS`) at the\n * previous image's. Off by default.\n */\n previousAssets?: PreviousAssetsConfig | boolean;\n /**\n * `gemi stats` and `gemi build --stats`: initial-JS budgets per route, in KB.\n * A route over its budget fails the command, so CI can hold pages to a size.\n * See the docs' \"Bundle stats\" page.\n */\n stats?: StatsConfig;\n}\n\n// Identity helper that gives `gemi.config.ts` full type-checking and editor\n// autocomplete. Usage:\n//\n// import { defineConfig } from \"gemi/config\";\n// export default defineConfig({ vite: { plugins: [] }, bun: { plugins: [] } });\nexport function defineConfig(config: GemiConfig): GemiConfig {\n return config;\n}\n\n// The value to pass as `@vitejs/plugin-react`'s `compiler` option, with an\n// environment switch in front of it:\n//\n// import react from \"@vitejs/plugin-react\";\n// import { defineConfig, reactCompiler } from \"gemi/config\";\n// export default defineConfig({ vite: { plugins: [react({ compiler: reactCompiler() })] } });\n//\n// `GEMI_REACT_COMPILER=off` turns the React Compiler off; any other value (or\n// none) leaves it on. Case-insensitive, and the same shape as `GEMI_COMPRESSION`\n// — a named opt-out rather than a boolean, because `=0`, `=false` and `=no` all\n// read as \"off\" to a human and only one of them can be the one that works.\n//\n// It lives here rather than as a `process.env` read in each app's\n// `gemi.config.ts` so the flag means the same thing in every gemi project, and\n// so bisecting a compiler-shaped bug is one variable rather than one edit:\n//\n// GEMI_REACT_COMPILER=off bun dev # is it the compiler?\n//\n// The variable is read where `gemi.config.ts` is loaded — inside the Vite\n// process that `dev` and `build` spawn — so it is inherited from the shell and\n// also picked up from `.env`, which Bun loads before the config imports.\n//\n// Pass compiler options through it to keep the switch and the options together;\n// `false` is returned in their place when the environment opts out.\nexport function reactCompiler(): boolean;\nexport function reactCompiler<T extends object>(options: T): T | false;\nexport function reactCompiler(options?: object): boolean | object {\n const enabled = (process.env.GEMI_REACT_COMPILER ?? \"auto\").toLowerCase() !== \"off\";\n if (!enabled) return false;\n return options ?? true;\n}\n"
6
6
  ],
7
- "mappings": ";6BAmDO,SAAS,CAAY,CAAC,EAAgC,CAC3D,OAAO,EA6BF,SAAS,CAAa,CAAC,EAAoC,CAEhE,IADiB,QAAQ,IAAI,qBAAuB,QAAQ,YAAY,IAAM,MAChE,MAAO,GACrB,OAAO,GAAW",
7
+ "mappings": ";6BA0DO,SAAS,CAAY,CAAC,EAAgC,CAC3D,OAAO,EA6BF,SAAS,CAAa,CAAC,EAAoC,CAEhE,IADiB,QAAQ,IAAI,qBAAuB,QAAQ,YAAY,IAAM,MAChE,MAAO,GACrB,OAAO,GAAW",
8
8
  "debugId": "2F7F86887FCF6F1A64756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Za as A,_a as l}from"../chunk-hyfzw1fk.js";import{Gb as q,Jb as m,Tb as p}from"../chunk-ftgd68se.js";import"../chunk-6wrhc9bq.js";import"../chunk-gqpge54c.js";import{$f as u}from"../chunk-5wt25tyd.js";import"../chunk-k9qmr2wa.js";import"../chunk-4rr9wmh8.js";import"../chunk-9mqqr05d.js";import"../chunk-2gmgd05c.js";import"../chunk-6rz8kyqb.js";import{lh as c}from"../chunk-kqz8jp6v.js";import"../chunk-3s3awh38.js";function F(){let z=Promise.resolve(),M=Promise.resolve(),X=(Q,G)=>new Promise(($)=>{Q.write(G,()=>$())});return{stdout:(Q)=>{z=X(process.stdout,Q)},stderr:(Q)=>{M=X(process.stderr,Q)},flush:async()=>{await Promise.all([z,M])}}}function b(z){let M=z.writers??F();return{args:z.args,options:z.options,argv:z.argv,line:(X="")=>M.stdout(`${X}
2
+ import{fb as A,gb as l}from"../chunk-z10cas5r.js";import{$b as p,Ob as q,Rb as m}from"../chunk-mb7q7s0a.js";import"../chunk-1pem26zc.js";import"../chunk-twnn7r66.js";import{ig as u}from"../chunk-bn5yn731.js";import"../chunk-xkc7ftnq.js";import"../chunk-s6jjy4y9.js";import"../chunk-q9s7kwgt.js";import"../chunk-3cg7y62b.js";import"../chunk-9s851qz8.js";import{vh as c}from"../chunk-m6ystvtk.js";import"../chunk-1yx2e0bh.js";function F(){let z=Promise.resolve(),M=Promise.resolve(),X=(Q,G)=>new Promise(($)=>{Q.write(G,()=>$())});return{stdout:(Q)=>{z=X(process.stdout,Q)},stderr:(Q)=>{M=X(process.stderr,Q)},flush:async()=>{await Promise.all([z,M])}}}function b(z){let M=z.writers??F();return{args:z.args,options:z.options,argv:z.argv,line:(X="")=>M.stdout(`${X}
3
3
  `),error:(X)=>M.stderr(`${X}
4
4
  `),fail:(X,Q=1)=>{throw new q(X,Q)}}}import w from"path";function V(z){return z.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function t(z){let M=new Map,X=new Map;for(let Q of z){M.set(V(Q.name),Q),M.set(Q.name,Q);let G="alias"in Q?Q.alias:void 0;if(G)X.set(G,Q)}return{byName:M,byAlias:X}}function x(z){if(z==="--")return!0;if(!z.startsWith("-"))return!1;if(z==="-")return!1;if(/^-(\d|\.\d)/.test(z))return!1;return!0}function k(z,M){let{byName:X,byAlias:Q}=t(z.options),G=[],$=[],Z=new Map,S=!X.has("help"),C=!Q.has("h"),P=!1,D=!1,I=(J)=>G.push(`Unknown option ${J} for command "${z.commandName}".`),T=(J,Y)=>{if(Y==="--help"||Y==="-h")D=!0;G.push(Y===void 0?`Option ${J} needs a value.`:`Option ${J} needs a value, but the next token is ${JSON.stringify(Y)}, which is another option. If that really is the value, write ${J}=${Y}.`)},_=0;while(_<M.length){let J=M[_];if(J==="--"){$.push(...M.slice(_+1));break}if(J.startsWith("--")){let Y=J.slice(2),j=Y.indexOf("="),B=j===-1?Y:Y.slice(0,j),K=j===-1?void 0:Y.slice(j+1),H=X.get(B),E=!1;if(!H&&B.startsWith("no-")){let W=X.get(B.slice(3));if(W&&W.type==="boolean")H=W,E=!0}if(!H&&B==="help"&&S){P=!0,_+=1;continue}if(!H){I(`--${B}`),_+=1;continue}if(H.type==="boolean"){if(K!==void 0&&K!=="true"&&K!=="false")G.push(`Option --${V(H.name)} is a flag and takes no value, but got ${JSON.stringify(K)}.`);else{let W=K===void 0?!0:K==="true";Z.set(H.name,E?!W:W)}_+=1;continue}if(K!==void 0){Z.set(H.name,K),_+=1;continue}let U=M[_+1];if(U===void 0||x(U)){T(`--${V(H.name)}`,U),_+=1;continue}Z.set(H.name,U),_+=2;continue}if(J.startsWith("-")&&J.length>1){let Y=J.slice(1),j=!1;for(let B=0;B<Y.length;B+=1){let K=Q.get(Y[B]);if(!K){if(Y[B]==="h"&&C){P=!0;continue}I(`-${Y[B]}`);break}if(K.type==="boolean"){Z.set(K.name,!0);continue}let H=Y.slice(B+1),E=H.startsWith("=")?H.slice(1):H;if(E!==""){Z.set(K.name,E);break}let U=M[_+1];if(U===void 0||x(U)){T(`-${K.alias}`,U);break}Z.set(K.name,U),j=!0;break}_+=j?2:1;continue}$.push(J),_+=1}let L={},O=0;for(let J of z.args){if(J.variadic){let j=$.slice(O);if(O=$.length,L[J.name]=j,J.required&&j.length===0)G.push(`Missing required argument <${J.name}...>. Command "${z.commandName}" needs at least one.`);continue}let Y=$[O];if(O+=1,Y!==void 0){L[J.name]=Y;continue}if(J.default!==void 0){L[J.name]=J.default;continue}if(J.required)G.push(`Missing required argument <${J.name}>.`);L[J.name]=void 0}if(O<$.length){let J=$.slice(O);G.push(`Unexpected argument${J.length===1?"":"s"} ${J.map((Y)=>JSON.stringify(Y)).join(", ")}. Command "${z.commandName}" takes ${z.args.length} argument${z.args.length===1?"":"s"}.`)}let R={};for(let J of z.options){let Y=Z.get(J.name);if(J.type==="boolean"){R[J.name]=Y===void 0?J.default??!1:Boolean(Y);continue}if(Y===void 0){if(J.default!==void 0)R[J.name]=J.default;else if(J.required)G.push(`Missing required option --${V(J.name)}.`),R[J.name]=void 0;else R[J.name]=void 0;continue}let j=String(Y);if(J.type==="number"){let B=Number(j);if(j.trim()===""||!Number.isFinite(B))G.push(`Option --${V(J.name)} expects a number, but got ${JSON.stringify(j)}.`),R[J.name]=void 0;else R[J.name]=B;continue}R[J.name]=j}let N=P&&!D;if(G.length>0)return{ok:!1,help:N,errors:G};return{ok:!0,help:N,args:L,options:R}}function f(z,M=" "){let X=z.reduce((Q,[G])=>Math.max(Q,G.length),0);return z.map(([Q,G])=>G===""?`${M}${Q}`:`${M}${Q.padEnd(X)} ${G}`)}function g(z){let M=z.variadic?`${z.name}...`:z.name;return z.required?`<${M}>`:`[${M}]`}function s(z){let M=(G)=>z.options.some(G),X=M((G)=>G.name==="help"||V(G.name)==="help"),Q=M((G)=>("alias"in G)&&G.alias==="h");if(X&&Q)return[];if(X)return[["-h","Show this message"]];return[[`${Q?"":"-h, "}--help`,"Show this message"]]}function v(z){let M=[],X=z.args.map(g).join(" "),Q=["gemi run",z.commandName,z.options.length>0?"[options]":"",X].filter(Boolean).join(" ");if(M.push(`Usage: ${Q}`),z.description)M.push("",z.description);if(z.args.length>0)M.push("","Arguments:"),M.push(...f(z.args.map((G)=>{let $=[G.description??"",G.default!==void 0?`(default: ${JSON.stringify(G.default)})`:""].filter(Boolean).join(" ");return[g(G),$]})));return M.push("","Options:"),M.push(...f([...z.options.map((G)=>{let $="alias"in G&&G.alias?`-${G.alias}, `:"",Z=G.type==="boolean"?"":` <${G.type}>`,S=[G.description??"",G.default!==void 0?`(default: ${JSON.stringify(G.default)})`:"","required"in G&&G.required?"(required)":""].filter(Boolean).join(" ");return[`${$}--${V(G.name)}${Z}`,S]}),...s(z)])),M.join(`
5
5
  `)}function y(z,M){let X=M.declared?`${z.length} command${z.length===1?"":"s"} declared in app/config/command.ts:`:`Commands in ${M.dir}:`;if(z.length===0)return M.declared?`app/config/command.ts declares no commands.
@@ -13,4 +13,4 @@ A command is registered by existing: write a file there that exports a \`defineC
13
13
  ${Q.message}
14
14
  \`gemi run\` boots your application the way the server does, so it needs the Kernel. Run it from the root of a gemi project.`,{cause:Q})}if(typeof X.default!=="function")throw new A(`${M} has no default export. gemi expects the Kernel subclass to be the default export of that file.`);return new X.default}function h(z,M,X,Q="returned"){if(z===void 0||z===null)return 0;if(typeof z==="number"&&Number.isInteger(z)&&z>=0&&z<=255)return z;let G=M?`Command "${M.commandName}"`:"The command";return X(`${G} ${Q} ${JSON.stringify(z)}, which is not an exit `+"code \u2014 an exit code is an integer from 0 to 255. Treating this as a "+"failure."),1}var[a,...o]=process.argv.slice(2),i=F();d({rootDir:process.cwd(),name:a,argv:o,writers:i}).then(async(z)=>{await i.flush(),process.exit(z)});
15
15
 
16
- //# debugId=62901C99B72D711064756E2164756E21
16
+ //# debugId=0925E4DE68E8324C64756E2164756E21
@@ -9,6 +9,6 @@
9
9
  "/**\n * The entry point `gemi run` spawns.\n *\n * Exposed through the exports map as `gemi/console/run` and resolved by the CLI\n * out of the *application's* `node_modules`, the same way `dev` and `start`\n * resolve `gemi/bun/preload`. That indirection is the point: the runner has to\n * be the application's copy of gemi, not the one bundled into `dist/bin/gemi.js`\n * — see the note at the top of `runner.ts`.\n *\n * Nothing but argv handling lives here, so that everything worth testing lives\n * in `runConsole`, which returns an exit code instead of taking one.\n */\nimport { processWriters } from \"./context\";\nimport { runConsole } from \"./runner\";\n\n// The tail is forwarded exactly as commander handed it over, `--` and all.\n// commander passes a `--` through as a literal operand (verified: `gemi run x --\n// --weird` arrives as `[\"--\", \"--weird\"]`), and `parse.ts` already treats a `--`\n// as \"everything after this is positional\". Stripping it here — which an earlier\n// draft did — consumed the escape hatch before the only thing that reads it,\n// leaving `-- --weird` reported as an unknown option and `-- --` the only way to\n// pass a flag-shaped value.\nconst [name, ...argv] = process.argv.slice(2);\n\nconst writers = processWriters();\n\n// `.then` rather than a top-level `await`, so this file typechecks under the\n// package's inherited `module: NodeNext` — the same TS1309 that keeps `bun/` out\n// of tsconfig.json's `include`. Bun runs it as ESM either way; this just avoids\n// buying a nested tsconfig for two lines.\nrunConsole({ rootDir: process.cwd(), name, argv, writers }).then(\n async (code) => {\n // Everything written has to reach the OS before the exit below discards it —\n // see `processWriters` for what that costs when it is skipped.\n await writers.flush();\n\n // Explicit, and not belt-and-braces. `kernel.destroy()` stops the scheduler,\n // but an open database pool, a Redis client or an unref'd timer will happily\n // hold the loop open after the work is done — a command that finishes and then\n // sits there, which is the failure `kernel/exit.test.ts` exists for and the\n // one `orm/context.test.ts` names by example.\n process.exit(code);\n },\n);\n"
10
10
  ],
11
11
  "mappings": ";+dA+FO,IAAS,JAAc,HAAmB,JAG/C,DAAI,HAAwB,GAAQ,GAAQ,HACxC,HAAwB,GAAQ,QAAQ,EAEtC,EAAQ,CAAC,EAA4B,IACzC,IAAI,QAAQ,CAAC,IAAY,CAIvB,EAAO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AO,CAAM,CACjB,EAGF,GAAI,OAAO,EAAO,UAAY,WAC5B,MAAM,IAAI,EACR,GAAG,kGAEL,EAGF,OAAO,IAAI,EAAO,QAgBpB,SAAS,CAAW,CAClB,EACA,EACA,EACA,EAAS,WACD,CACR,GAAI,IAAW,QAAa,IAAW,KAAM,MAAO,GAEpD,GACE,OAAO,IAAW,UAClB,OAAO,UAAU,CAAM,GACvB,GAAU,GACV,GAAU,IAEV,OAAO,EAGT,IAAM,EAAU,EAAU,YAAY,EAAQ,eAAiB,cAO/D,OALA,EACE,GAAG,KAAW,KAAU,KAAK,UAAU,CAAM,2BAC3C,4EACA,UACJ,EACO,EGlPT,IAAO,KAAS,GAAQ,QAAQ,KAAK,MAAM,CAAC,EAEtC,EAAU,EAAe,EAM/B,EAAW,CAAE,QAAS,QAAQ,IAAI,EAAG,OAAM,OAAM,SAAQ,CAAC,EAAE,KAC1D,MAAO,IAAS,CAGd,MAAM,EAAQ,MAAM,EAOpB,QAAQ,KAAK,CAAI,EAErB",
12
- "debugId": "62901C99B72D711064756E2164756E21",
12
+ "debugId": "0925E4DE68E8324C64756E2164756E21",
13
13
  "names": []
14
14
  }
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{ch as e,dh as o}from"../chunk-2gmgd05c.js";import"../chunk-3s3awh38.js";export{o as Container,e as BindingResolutionError};
2
+ import{mh as e,nh as o}from"../chunk-3cg7y62b.js";import"../chunk-1yx2e0bh.js";export{o as Container,e as BindingResolutionError};
3
3
 
4
- //# debugId=6ED57CE4AAC9574B64756E2164756E21
4
+ //# debugId=4A1CBDCD7608980964756E2164756E21
@@ -4,6 +4,6 @@
4
4
  "sourcesContent": [
5
5
  ],
6
6
  "mappings": "",
7
- "debugId": "6ED57CE4AAC9574B64756E2164756E21",
7
+ "debugId": "4A1CBDCD7608980964756E2164756E21",
8
8
  "names": []
9
9
  }
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Aa as N}from"../chunk-yebaheh7.js";import"../chunk-9hbwvcxn.js";import"../chunk-1npdp1w2.js";import"../chunk-5wt25tyd.js";import{Ag as H,Bg as I,Cg as J,Dg as K,Eg as L,qg as j,rg as k,tg as w,ug as x,vg as z,wg as A,xg as E,yg as F,zg as G}from"../chunk-4rr9wmh8.js";import"../chunk-3s3awh38.js";export{A as isSqlite,E as isMysqlFamily,z as inferDialect,j as defineDatabaseConfig,k as databaseConfigDefaults,w as UnknownDatabaseUrlError,H as UnknownConnectionError,I as ReservedConnectionNameError,x as MissingDatabaseUrlError,N as DatabaseServiceProvider,L as DatabaseManager,G as DEFAULT_CONNECTION,J as CrossConnectionTransactionError,K as Connection,F as AmbiguousSqlitePathError};
2
+ import{Ia as N}from"../chunk-nncz308h.js";import"../chunk-qd2v93y4.js";import"../chunk-tq85n8zh.js";import"../chunk-bn5yn731.js";import{Ag as j,Bg as k,Dg as w,Eg as x,Fg as z,Gg as A,Hg as E,Ig as F,Jg as G,Kg as H,Lg as I,Mg as J,Ng as K,Og as L}from"../chunk-s6jjy4y9.js";import"../chunk-1yx2e0bh.js";export{A as isSqlite,E as isMysqlFamily,z as inferDialect,j as defineDatabaseConfig,k as databaseConfigDefaults,w as UnknownDatabaseUrlError,H as UnknownConnectionError,I as ReservedConnectionNameError,x as MissingDatabaseUrlError,N as DatabaseServiceProvider,L as DatabaseManager,G as DEFAULT_CONNECTION,J as CrossConnectionTransactionError,K as Connection,F as AmbiguousSqlitePathError};
3
3
 
4
- //# debugId=35C85FB5F8D769EF64756E2164756E21
4
+ //# debugId=ACAD5BCFEBBA779564756E2164756E21
@@ -4,6 +4,6 @@
4
4
  "sourcesContent": [
5
5
  ],
6
6
  "mappings": "",
7
- "debugId": "35C85FB5F8D769EF64756E2164756E21",
7
+ "debugId": "ACAD5BCFEBBA779564756E2164756E21",
8
8
  "names": []
9
9
  }
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{Tg as qS,Ug as JS}from"../chunk-tyhrrnp5.js";import{Zg as $S}from"../chunk-2q7m8a16.js";import{bh as P}from"../chunk-9mqqr05d.js";import"../chunk-2gmgd05c.js";import"../chunk-3s3awh38.js";import{render as s}from"jsx-email";import B from"process";import{Buffer as n}from"buffer";import r from"path";import{fileURLToPath as PS}from"url";import{promisify as yS}from"util";import o from"child_process";import wS,{constants as fS}from"fs/promises";import h from"process";import l,{constants as zS}from"fs/promises";import g from"process";import NS from"os";import W from"fs";import RS from"fs";import b from"fs";var F;function HS(){try{return b.statSync("/.dockerenv"),!0}catch{return!1}}function XS(){try{return b.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function L(){if(F===void 0)F=HS()||XS();return F}var O,US=()=>{try{return RS.statSync("/run/.containerenv"),!0}catch{return!1}};function R(){if(O===void 0)O=US()||L();return O}var u=()=>{if(g.platform!=="linux")return!1;if(NS.release().toLowerCase().includes("microsoft")){if(R())return!1;return!0}try{if(W.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft"))return!R()}catch{}if(W.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")||W.existsSync("/run/WSL"))return!R();return!1},H=g.env.__IS_WSL_TEST__?u:u();var ES=(()=>{let S;return async function(){if(S)return S;let q="/etc/wsl.conf",J=!1;try{await l.access(q,zS.F_OK),J=!0}catch{}if(!J)return"/mnt/";let K=await l.readFile(q,{encoding:"utf8"}),Q=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(K);if(!Q)return"/mnt/";return S=Q.groups.mountPoint.trim(),S=S.endsWith("/")?S:`${S}/`,S}})(),MS=async()=>{return`${await ES()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`},v=async()=>{if(H)return MS();return`${h.env.SYSTEMROOT||h.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`};function X($,S,q){let J=(K)=>Object.defineProperty($,S,{value:K,enumerable:!0,writable:!0});return Object.defineProperty($,S,{configurable:!0,enumerable:!0,get(){let K=q();return J(K),K},set(K){J(K)}}),$}import{promisify as jS}from"util";import j from"process";import{execFile as xS}from"child_process";import{promisify as _S}from"util";import kS from"process";import{execFile as DS}from"child_process";var FS=_S(DS);async function T(){if(kS.platform!=="darwin")throw Error("macOS only");let{stdout:$}=await FS("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]),q=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec($)?.groups.id??"com.apple.Safari";if(q==="com.apple.safari")return"com.apple.Safari";return q}import LS from"process";import{promisify as OS}from"util";import{execFile as WS,execFileSync as H0}from"child_process";var vS=OS(WS);async function m($,{humanReadableOutput:S=!0,signal:q}={}){if(LS.platform!=="darwin")throw Error("macOS only");let J=S?[]:["-ss"],K={};if(q)K.signal=q;let{stdout:Q}=await vS("osascript",["-e",$,J],K);return Q.trim()}async function C($){return m(`tell application "Finder" to set app_path to application file id "${$}" as string
2
+ import{bh as qS,ch as JS}from"../chunk-rfcygmf5.js";import{hh as $S}from"../chunk-7tx5y712.js";import{lh as P}from"../chunk-q9s7kwgt.js";import"../chunk-3cg7y62b.js";import"../chunk-1yx2e0bh.js";import{render as s}from"jsx-email";import B from"process";import{Buffer as n}from"buffer";import r from"path";import{fileURLToPath as PS}from"url";import{promisify as yS}from"util";import o from"child_process";import wS,{constants as fS}from"fs/promises";import h from"process";import l,{constants as zS}from"fs/promises";import g from"process";import NS from"os";import W from"fs";import RS from"fs";import b from"fs";var F;function HS(){try{return b.statSync("/.dockerenv"),!0}catch{return!1}}function XS(){try{return b.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function L(){if(F===void 0)F=HS()||XS();return F}var O,US=()=>{try{return RS.statSync("/run/.containerenv"),!0}catch{return!1}};function R(){if(O===void 0)O=US()||L();return O}var u=()=>{if(g.platform!=="linux")return!1;if(NS.release().toLowerCase().includes("microsoft")){if(R())return!1;return!0}try{if(W.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft"))return!R()}catch{}if(W.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")||W.existsSync("/run/WSL"))return!R();return!1},H=g.env.__IS_WSL_TEST__?u:u();var ES=(()=>{let S;return async function(){if(S)return S;let q="/etc/wsl.conf",J=!1;try{await l.access(q,zS.F_OK),J=!0}catch{}if(!J)return"/mnt/";let K=await l.readFile(q,{encoding:"utf8"}),Q=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(K);if(!Q)return"/mnt/";return S=Q.groups.mountPoint.trim(),S=S.endsWith("/")?S:`${S}/`,S}})(),MS=async()=>{return`${await ES()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`},v=async()=>{if(H)return MS();return`${h.env.SYSTEMROOT||h.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`};function X($,S,q){let J=(K)=>Object.defineProperty($,S,{value:K,enumerable:!0,writable:!0});return Object.defineProperty($,S,{configurable:!0,enumerable:!0,get(){let K=q();return J(K),K},set(K){J(K)}}),$}import{promisify as jS}from"util";import j from"process";import{execFile as xS}from"child_process";import{promisify as _S}from"util";import kS from"process";import{execFile as DS}from"child_process";var FS=_S(DS);async function T(){if(kS.platform!=="darwin")throw Error("macOS only");let{stdout:$}=await FS("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]),q=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec($)?.groups.id??"com.apple.Safari";if(q==="com.apple.safari")return"com.apple.Safari";return q}import LS from"process";import{promisify as OS}from"util";import{execFile as WS,execFileSync as H0}from"child_process";var vS=OS(WS);async function m($,{humanReadableOutput:S=!0,signal:q}={}){if(LS.platform!=="darwin")throw Error("macOS only");let J=S?[]:["-ss"],K={};if(q)K.signal=q;let{stdout:Q}=await vS("osascript",["-e",$,J],K);return Q.trim()}async function C($){return m(`tell application "Finder" to set app_path to application file id "${$}" as string
3
3
  tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}import{promisify as TS}from"util";import{execFile as CS}from"child_process";var IS=TS(CS),_={MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},MSEdgeBHTML:{name:"Edge Beta",id:"com.microsoft.edge.beta"},MSEdgeDHTML:{name:"Edge Dev",id:"com.microsoft.edge.dev"},AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},ChromeBHTML:{name:"Chrome Beta",id:"com.google.chrome.beta"},ChromeDHTML:{name:"Chrome Dev",id:"com.google.chrome.dev"},ChromiumHTM:{name:"Chromium",id:"org.chromium.Chromium"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveDHTML:{name:"Brave Dev",id:"com.brave.Browser.dev"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},OperaStable:{name:"Opera",id:"com.operasoftware.Opera"},VivaldiHTM:{name:"Vivaldi",id:"com.vivaldi.Vivaldi"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"}},E0=new Map(Object.entries(_));class c extends Error{}async function I($=IS){let{stdout:S}=await $("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),q=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(S);if(!q)throw new c(`Cannot find Windows browser in stdout: ${JSON.stringify(S)}`);let{id:J}=q.groups,K=J.lastIndexOf("."),Q=J.lastIndexOf("-"),Z=K===-1?void 0:J.slice(0,K),V=Q===-1?void 0:J.slice(0,Q);return _[J]??_[Z]??_[V]??{name:J,id:J}}var BS=jS(xS),AS=($)=>$.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,(S)=>S.toUpperCase());async function x(){if(j.platform==="darwin"){let $=await T();return{name:await C($),id:$}}if(j.platform==="linux"){let{stdout:$}=await BS("xdg-mime",["query","default","x-scheme-handler/http"]),S=$.trim();return{name:AS(S.replace(/.desktop$/,"").replace("-"," ")),id:S}}if(j.platform==="win32")return I();throw Error("Only macOS, Linux, and Windows are supported")}var bS=yS(o.execFile),A=r.dirname(PS(import.meta.url)),d=r.join(A,"xdg-open"),{platform:N,arch:p}=B;async function uS(){let $=await v(),S=String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,q=n.from(S,"utf16le").toString("base64"),{stdout:J}=await bS($,["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand",q],{encoding:"utf8"}),K=J.trim(),Q={ChromeHTML:"com.google.chrome",BraveHTML:"com.brave.Browser",MSEdgeHTM:"com.microsoft.edge",FirefoxURL:"org.mozilla.firefox"};return Q[K]?{id:Q[K]}:{}}var t=async($,S)=>{let q;for(let J of $)try{return await S(J)}catch(K){q=K}throw q},k=async($)=>{if($={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...$},Array.isArray($.app))return t($.app,(V)=>k({...$,app:V}));let{name:S,arguments:q=[]}=$.app??{};if(q=[...q],Array.isArray(S))return t(S,(V)=>k({...$,app:{name:V,arguments:q}}));if(S==="browser"||S==="browserPrivate"){let V={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","com.brave.Browser":"brave","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","com.microsoft.edgemac":"edge","microsoft-edge.desktop":"edge"},Y={chrome:"--incognito",brave:"--incognito",firefox:"--private-window",edge:"--inPrivate"},G=H?await uS():await x();if(G.id in V){let z=V[G.id];if(S==="browserPrivate")q.push(Y[z]);return k({...$,app:{name:U[z],arguments:q}})}throw Error(`${G.name} is not supported as a default browser`)}let J,K=[],Q={};if(N==="darwin"){if(J="open",$.wait)K.push("--wait-apps");if($.background)K.push("--background");if($.newInstance)K.push("--new");if(S)K.push("-a",S)}else if(N==="win32"||H&&!R()&&!S){if(J=await v(),K.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),!H)Q.windowsVerbatimArguments=!0;let V=["Start"];if($.wait)V.push("-Wait");if(S){if(V.push(`"\`"${S}\`""`),$.target)q.push($.target)}else if($.target)V.push(`"${$.target}"`);if(q.length>0)q=q.map((Y)=>`"\`"${Y}\`""`),V.push("-ArgumentList",q.join(","));$.target=n.from(V.join(" "),"utf16le").toString("base64")}else{if(S)J=S;else{let V=!A||A==="/",Y=!1;try{await wS.access(d,fS.X_OK),Y=!0}catch{}J=B.versions.electron??(N==="android"||V||!Y)?"xdg-open":d}if(q.length>0)K.push(...q);if(!$.wait)Q.stdio="ignore",Q.detached=!0}if(N==="darwin"&&q.length>0)K.push("--args",...q);if($.target)K.push($.target);let Z=o.spawn(J,K,Q);if($.wait)return new Promise((V,Y)=>{Z.once("error",Y),Z.once("close",(G)=>{if(!$.allowNonzeroExitCode&&G>0){Y(Error(`Exited with code ${G}`));return}V(Z)})});return Z.unref(),Z},gS=($,S)=>{if(typeof $!=="string")throw TypeError("Expected a `target`");return k({...S,target:$})};function i($){if(typeof $==="string"||Array.isArray($))return $;let{[p]:S}=$;if(!S)throw Error(`${p} is not supported`);return S}function D({[N]:$},{wsl:S}){if(S&&H)return i(S);if(!$)throw Error(`${N} is not supported`);return i($)}var U={};X(U,"chrome",()=>D({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));X(U,"brave",()=>D({darwin:"brave browser",win32:"brave",linux:["brave-browser","brave"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",x64:["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe","/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]}}));X(U,"firefox",()=>D({darwin:"firefox",win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));X(U,"edge",()=>D({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));X(U,"browser",()=>"browser");X(U,"browserPrivate",()=>"browserPrivate");var a=gS;function hS($){return Array.from($,(S)=>{let q=S.charCodeAt(0);return S==="/"||S==="\\"||q<32||q===127?"_":S}).join("")}async function e($,S,q={}){let J=`${$}/${new Date().toISOString()}${hS(S.subject)}`,K={to:S.to,cc:S.cc,bcc:S.bcc,from:S.from,subject:S.subject,headers:S.headers??{},attachments:S.attachments.map((Q)=>({filename:Q.filename,bytes:Buffer.byteLength(Q.content)})),scheduledAt:S.scheduledAt??null,idempotencyKey:S.idempotencyKey??null,locale:q.locale??null,text:S.text??null};return await Bun.write(`${J}.json`,`${JSON.stringify(K,null,2)}
4
4
  `),await Bun.write(`${J}.html`,S.html),`${J}.html`}import{jsx as SS}from"react/jsx-runtime";class KS{from="";to=[];subject="No Subject";cc=[];bcc=[];attachments=[];template;headers={};static async send($){let S=new this,q=P($S).defaultLocale,J=P(JS),{to:K=S.to,from:Q=S.from,subject:Z=typeof S.subject==="string"?S.subject:S.subject[$.locale||q],cc:V=S.cc,bcc:Y=S.bcc,attachments:G=S.attachments,data:z,headers:QS={}}=$,VS={...J.headers??{},...S.headers??{},...QS??{}},y=process.env.EMAIL_DEBUG==="true",E=y?"debug":J.driver?.provider??"custom",w=await J.filterRecipients(K);if(!w.length)return{id:null,provider:E,status:"skipped"};let[YS,ZS]=await Promise.all([S.render({...z,locale:$.locale}),S.renderText({...z,locale:$.locale})]),f={bcc:Y,cc:V,from:Q,subject:Z,to:w,attachments:G,html:YS,headers:VS,text:ZS,scheduledAt:$.scheduledAt,idempotencyKey:$.idempotencyKey};if(y){let GS=await e(`${process.env.ROOT_DIR}/.debug/emails`,f,{locale:$.locale});if(process.env.CI!=="true")await a(GS);return{id:`debug_${crypto.randomUUID()}`,provider:E,status:"debug"}}let M=await qS(J,f);return M.ok?{id:M.id,provider:E,status:"sent"}:{id:M.id,provider:E,status:"failed",error:M.error}}static async preview($){return await new this().render({...$.data,locale:$.locale})}async render($){let S=this.template;return await s(SS(S,{...$}))}async renderText($){let S=this.template;return await s(SS(S,{...$}),{plainText:!0})}}export{KS as Email};
5
5
 
6
- //# debugId=F7F823A67F42C4B264756E2164756E21
6
+ //# debugId=9B5044B25C2D49EC64756E2164756E21
@@ -17,6 +17,6 @@
17
17
  "import type { SendEmailParams } from \"../services/email/drivers/types\";\n\n/**\n * What `EMAIL_DEBUG=true` records about a send, next to the rendered HTML.\n *\n * The HTML alone can't say who a mail went to: plenty of templates render\n * nothing per recipient, so a test asserting \"this action mailed this user\"\n * could match another send with the same subject. The sidecar holds the\n * envelope the driver would have been handed, with `to` already filtered.\n */\nexport interface DebugEmailRecord {\n to: string[];\n cc: string[];\n bcc: string[];\n from: string;\n subject: string;\n headers: Record<string, string>;\n // Attachment bodies are left out: name and size are enough to assert on.\n attachments: Array<{ filename: string; bytes: number }>;\n scheduledAt: string | null;\n idempotencyKey: string | null;\n locale: string | null;\n text: string | null;\n}\n\n/**\n * A subject as a filename fragment. Path separators would write into a\n * subdirectory (or fail), and control characters aren't valid on every\n * filesystem. Everything else is kept, so a reader matching on the subject\n * substring keeps working.\n */\nexport function debugEmailFileSubject(subject: string) {\n return Array.from(subject, (char) => {\n const code = char.charCodeAt(0);\n return char === \"/\" || char === \"\\\\\" || code < 0x20 || code === 0x7f ? \"_\" : char;\n }).join(\"\");\n}\n\n/**\n * Writes `<dir>/<iso><subject>.json` and then `<dir>/<iso><subject>.html`, and\n * returns the HTML path. The sidecar goes first so a reader that sees the HTML\n * can rely on its envelope being there.\n */\nexport async function writeDebugEmail(\n dir: string,\n params: SendEmailParams,\n options: { locale?: string } = {},\n) {\n const base = `${dir}/${new Date().toISOString()}${debugEmailFileSubject(params.subject)}`;\n\n const record: DebugEmailRecord = {\n to: params.to,\n cc: params.cc,\n bcc: params.bcc,\n from: params.from,\n subject: params.subject,\n headers: params.headers ?? {},\n attachments: params.attachments.map((attachment) => ({\n filename: attachment.filename,\n bytes: Buffer.byteLength(attachment.content),\n })),\n scheduledAt: params.scheduledAt ?? null,\n idempotencyKey: params.idempotencyKey ?? null,\n locale: options.locale ?? null,\n text: params.text ?? null,\n };\n\n await Bun.write(`${base}.json`, `${JSON.stringify(record, null, 2)}\\n`);\n await Bun.write(`${base}.html`, params.html);\n\n return `${base}.html`;\n}\n"
18
18
  ],
19
19
  "mappings": ";uNACA,YAAS,aCDT,kBACA,YAAQ,eACR,oBACA,wBAAQ,aACR,oBAAQ,cACR,6BACA,wBAAY,qBCNZ,uBACA,uBAAY,qBCDZ,uBACA,mBACA,kBCFA,mBCAA,kBAEA,IAAI,EAEJ,SAAS,EAAY,EAAG,CACvB,GAAI,CAEH,OADA,EAAG,SAAS,aAAa,EAClB,GACN,KAAM,CACP,MAAO,IAIT,SAAS,EAAe,EAAG,CAC1B,GAAI,CACH,OAAO,EAAG,aAAa,oBAAqB,MAAM,EAAE,SAAS,QAAQ,EACpE,KAAM,CACP,MAAO,IAIT,SAAwB,CAAQ,EAAG,CAElC,GAAI,IAAmB,OACtB,EAAiB,GAAa,GAAK,GAAgB,EAGpD,OAAO,EDxBR,IAAI,EAGE,GAAkB,IAAM,CAC7B,GAAI,CAEH,OADA,GAAG,SAAS,oBAAoB,EACzB,GACN,KAAM,CACP,MAAO,KAIT,SAAwB,CAAiB,EAAG,CAE3C,GAAI,IAAiB,OACpB,EAAe,GAAgB,GAAK,EAAS,EAG9C,OAAO,EDhBR,IAAM,EAAQ,IAAM,CACnB,GAAI,EAAQ,WAAa,QACxB,MAAO,GAGR,GA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AO,MAAM,EAAO,GAAC,EAAD,IAAc,EAAO,CAAE,OAG7B,WAAyC,CAAC,EAAU,CAClE,IAAM,EAAW,KAAK,SACtB,OAAO,MAAM,EAAO,GAAC,EAAD,IAAc,EAAO,EAAI,CAAE,UAAW,EAAK,CAAC,EAEpE",
20
- "debugId": "F7F823A67F42C4B264756E2164756E21",
20
+ "debugId": "9B5044B25C2D49EC64756E2164756E21",
21
21
  "names": []
22
22
  }
@@ -24,6 +24,12 @@ export declare class Lang extends Facade {
24
24
  locale?: string;
25
25
  timeZone?: string;
26
26
  }): import("gemi/client").Formatter;
27
- static setLocale(locale?: string): string;
27
+ /**
28
+ * Sets the locale for the rest of this request and, unless `cookie` is
29
+ * `false`, remembers it in the `i18n-locale` cookie for the next one.
30
+ */
31
+ static setLocale(locale?: string, options?: {
32
+ cookie?: boolean;
33
+ }): string;
28
34
  }
29
35
  //# sourceMappingURL=Lang.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Lang.d.ts","sourceRoot":"","sources":["../../facades/Lang.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,qBAAa,IAAK,SAAQ,MAAM;IAC9B,MAAM,CAAC,iBAAiB;IAIxB,MAAM,CAAC,mBAAmB;IAI1B,MAAM,CAAC,gBAAgB;IAIvB,MAAM,CAAC,MAAM;IAkBb;;;;OAIG;IACH,MAAM,CAAC,QAAQ;IAKf;;;;;;;;OAQG;IACH,MAAM,CAAC,SAAS,CAAC,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAO;IAQrE,MAAM,CAAC,SAAS,CAAC,MAAM,SAAgB;CAuBxC"}
1
+ {"version":3,"file":"Lang.d.ts","sourceRoot":"","sources":["../../facades/Lang.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,qBAAa,IAAK,SAAQ,MAAM;IAC9B,MAAM,CAAC,iBAAiB;IAIxB,MAAM,CAAC,mBAAmB;IAI1B,MAAM,CAAC,gBAAgB;IAIvB,MAAM,CAAC,MAAM;IAkBb;;;;OAIG;IACH,MAAM,CAAC,QAAQ;IAKf;;;;;;;;OAQG;IACH,MAAM,CAAC,SAAS,CAAC,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAO;IAQrE;;;OAGG;IACH,MAAM,CAAC,SAAS,CAAC,MAAM,SAAgB,EAAE,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAO;CAyB5E"}
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Qc as c,Rc as d,Sc as f,Tc as g,Uc as i,Vc as j,Wc as k,Xc as l,Yc as m,kd as n,ld as o,md as p,rc as a}from"../chunk-ncfxmtd5.js";import"../chunk-h7pafjej.js";import"../chunk-1npdp1w2.js";import{Ef as b,Mf as e,Of as h}from"../chunk-rh9j8cwv.js";import"../chunk-fwympxqk.js";import"../chunk-njkk498k.js";import"../chunk-gqpge54c.js";import"../chunk-5wt25tyd.js";import"../chunk-k9qmr2wa.js";import"../chunk-4rr9wmh8.js";import"../chunk-47rgq59q.js";import"../chunk-2q7m8a16.js";import"../chunk-9mqqr05d.js";import"../chunk-2gmgd05c.js";import"../chunk-kqz8jp6v.js";import"../chunk-82hpq0bq.js";import"../chunk-3s3awh38.js";export{g as Url,e as Storage,k as Redis,a as Redirect,l as RateLimiter,f as Query,i as Meta,h as Log,m as Lock,d as Lang,n as Features,b as Facade,p as DB,j as Cookie,o as ConnectionQueries,c as Auth};
2
+ import{$c as g,Yc as c,Zc as d,_c as f,ad as i,bd as j,cd as k,dd as l,ed as m,sd as n,td as o,ud as p,zc as a}from"../chunk-h3864a8z.js";import"../chunk-nvv9wej6.js";import"../chunk-tq85n8zh.js";import{Nf as b,Vf as e,Xf as h}from"../chunk-mn5xw79b.js";import"../chunk-pwmgqq7z.js";import"../chunk-sq2wkynk.js";import"../chunk-twnn7r66.js";import"../chunk-bn5yn731.js";import"../chunk-xkc7ftnq.js";import"../chunk-s6jjy4y9.js";import"../chunk-wvsv1jgg.js";import"../chunk-7tx5y712.js";import"../chunk-q9s7kwgt.js";import"../chunk-3cg7y62b.js";import"../chunk-m6ystvtk.js";import"../chunk-nsvktvp4.js";import"../chunk-1yx2e0bh.js";export{g as Url,e as Storage,k as Redis,a as Redirect,l as RateLimiter,f as Query,i as Meta,h as Log,m as Lock,d as Lang,n as Features,b as Facade,p as DB,j as Cookie,o as ConnectionQueries,c as Auth};
3
3
 
4
- //# debugId=09461EE0626509F964756E2164756E21
4
+ //# debugId=F75778A0982EEA1864756E2164756E21
@@ -4,6 +4,6 @@
4
4
  "sourcesContent": [
5
5
  ],
6
6
  "mappings": "",
7
- "debugId": "09461EE0626509F964756E2164756E21",
7
+ "debugId": "F75778A0982EEA1864756E2164756E21",
8
8
  "names": []
9
9
  }
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{ah as o,bh as r}from"../chunk-9mqqr05d.js";import"../chunk-2gmgd05c.js";import"../chunk-3s3awh38.js";export{r as app,o as Application};
2
+ import{kh as o,lh as r}from"../chunk-q9s7kwgt.js";import"../chunk-3cg7y62b.js";import"../chunk-1yx2e0bh.js";export{r as app,o as Application};
3
3
 
4
- //# debugId=9C3EF9CB8F6B65D164756E2164756E21
4
+ //# debugId=F23EE65A34FE132C64756E2164756E21
@@ -4,6 +4,6 @@
4
4
  "sourcesContent": [
5
5
  ],
6
6
  "mappings": "",
7
- "debugId": "9C3EF9CB8F6B65D164756E2164756E21",
7
+ "debugId": "F23EE65A34FE132C64756E2164756E21",
8
8
  "names": []
9
9
  }
@@ -4,7 +4,20 @@ type CorsHeaders = {
4
4
  "Access-Control-Allow-Headers": string;
5
5
  "Access-Control-Allow-Credentials": string;
6
6
  };
7
+ /**
8
+ * Sets CORS headers for a request whose `Origin` is a key of `origins`, or for
9
+ * any origin when `origins` has a `"*"` key. An exact key wins over `"*"`.
10
+ *
11
+ * `"*"` answers `Access-Control-Allow-Origin: *` and leaves
12
+ * `Access-Control-Allow-Credentials` out (browsers refuse the pair), so it suits
13
+ * a public endpoint that takes no cookies — a form posted from any site.
14
+ *
15
+ * It runs on refusals too (`runsOnRefusal`): a `rate-limit` 429 or a
16
+ * `body-limit` 413 from a middleware listed before it still carries its headers,
17
+ * so the browser sees the status rather than a CORS failure.
18
+ */
7
19
  export declare class CorsMiddleware extends Middleware {
20
+ static runsOnRefusal: boolean;
8
21
  config: {
9
22
  origins: Record<string, Partial<CorsHeaders>>;
10
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CorsMiddleware.d.ts","sourceRoot":"","sources":["../../http/CorsMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,KAAK,WAAW,GAAG;IACjB,8BAA8B,EAAE,MAAM,CAAC;IACvC,8BAA8B,EAAE,MAAM,CAAC;IACvC,kCAAkC,EAAE,MAAM,CAAC;CAC5C,CAAC;AASF,qBAAa,cAAe,SAAQ,UAAU;IAC5C,MAAM;iBAQC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;MACzC;IACF,GAAG;CAcJ"}
1
+ {"version":3,"file":"CorsMiddleware.d.ts","sourceRoot":"","sources":["../../http/CorsMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,KAAK,WAAW,GAAG;IACjB,8BAA8B,EAAE,MAAM,CAAC;IACvC,8BAA8B,EAAE,MAAM,CAAC;IACvC,kCAAkC,EAAE,MAAM,CAAC;CAC5C,CAAC;AASF;;;;;;;;;;;GAWG;AACH,qBAAa,cAAe,SAAQ,UAAU;IAC5C,OAAgB,aAAa,UAAQ;IAErC,MAAM;iBAQC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;MACzC;IACF,GAAG;CAuBJ"}
@@ -1,6 +1,17 @@
1
1
  import { HttpRequest } from "./HttpRequest";
2
2
  export declare class Middleware<T extends Record<string, any> = Record<string, any>> {
3
3
  protected req: HttpRequest;
4
+ /**
5
+ * Run this middleware even when one before it in the chain refused the
6
+ * request, so the headers it sets reach the refusal (a `body-limit` 413, a
7
+ * `rate-limit` 429, an `auth` 401). `CorsMiddleware` sets it, and so should
8
+ * an app's own middleware that only adds response headers such as CORS.
9
+ *
10
+ * Such a middleware must not refuse, read the body, or rely on what the
11
+ * middleware before it returned: after a refusal it runs on a request that
12
+ * will not reach the handler. One that throws then is logged and ignored.
13
+ */
14
+ static runsOnRefusal: boolean;
4
15
  config: T;
5
16
  constructor(req: HttpRequest);
6
17
  run(..._args: any[]): Promise<any> | any;
@@ -1 +1 @@
1
- {"version":3,"file":"Middleware.d.ts","sourceRoot":"","sources":["../../http/Middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAE7D,SAAS,CAAC,GAAG,EAAE,WAAW;IADtC,MAAM,EAAE,CAAC,CAAW;gBACE,GAAG,EAAE,WAAW;IACtC,GAAG,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG;IAIxC,MAAM,CAAC,SAAS,CAAC,CAAC,SAAS,UAAU,CAAC,GAAG,CAAC,EACxC,IAAI,EAAE,KAAK,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,EAC3C,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,GAKd,GAAG;CAEX"}
1
+ {"version":3,"file":"Middleware.d.ts","sourceRoot":"","sources":["../../http/Middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAc7D,SAAS,CAAC,GAAG,EAAE,WAAW;IAbtC;;;;;;;;;OASG;IACH,MAAM,CAAC,aAAa,UAAS;IAE7B,MAAM,EAAE,CAAC,CAAW;gBACE,GAAG,EAAE,WAAW;IACtC,GAAG,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG;IAIxC,MAAM,CAAC,SAAS,CAAC,CAAC,SAAS,UAAU,CAAC,GAAG,CAAC,EACxC,IAAI,EAAE,KAAK,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,EAC3C,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,GAKd,GAAG;CAEX"}
@@ -111,10 +111,55 @@ export declare class FileRoute<Input, Params> {
111
111
  */
112
112
  feature(key: FeatureKey): this;
113
113
  }
114
+ /** Options for `ViewRoute.static()`. */
115
+ export interface StaticViewOptions {
116
+ /**
117
+ * A view path (a file under `app/views`, like any view) whose default export
118
+ * renders the whole document — `<html>`, `<Head />`, `<body>` — in place of
119
+ * the app's `RootLayout`. Its stylesheet replaces the app's: the page gets
120
+ * the CSS this layout and the route's own views import, and none of what the
121
+ * app's client entry imports.
122
+ *
123
+ * Left out, the page renders inside the app's `RootLayout` with the app's
124
+ * stylesheet, exactly as a hydrated view would.
125
+ */
126
+ layout?: string;
127
+ /**
128
+ * The `Cache-Control` header the page is sent with, for example
129
+ * `"public, max-age=60, s-maxage=600, stale-while-revalidate=86400"` to let a
130
+ * CDN cache it. Left out, gemi sends none and the cache in front decides.
131
+ *
132
+ * Only the rendered page gets it — not a redirect, an error or the 404 a
133
+ * missing record turns the request into — and only when the response sets
134
+ * no cookie: a page whose handler or middleware set one is sent
135
+ * `private, no-store` instead, so a shared cache never stores one visitor's
136
+ * cookie and hands it to the next. A `Cache-Control` the handler set itself
137
+ * (`req.ctx().headers`) wins over this option.
138
+ */
139
+ cacheControl?: string;
140
+ /**
141
+ * Mint the `session_id` cookie for a visitor who has none, as a hydrated view
142
+ * does. Off by default: a static page is one body for everyone, and a
143
+ * per-visitor `Set-Cookie` keeps a CDN from caching it. Turn it on when the
144
+ * page's flags roll out by percentage to anonymous visitors (the rollout
145
+ * subject is that cookie) and the page is not meant to be cached.
146
+ */
147
+ session?: boolean;
148
+ /**
149
+ * Set the `csrf_token` cookie, as a hydrated view does. Off by default, for
150
+ * the same reason as `session`. Turn it on only when a form on this page
151
+ * posts to a same-origin route behind `CSRFMiddleware`; a form that posts to
152
+ * an api route with its own protection (a honeypot, a token in the body, an
153
+ * `Origin` check) needs nothing from the page.
154
+ */
155
+ csrf?: boolean;
156
+ }
114
157
  export declare class ViewRoute<Input, Output, Params> {
115
158
  viewPath: string;
116
159
  middlewares: string[];
117
160
  featureGates: string[];
161
+ /** @internal Set by `static()`. `null` for a hydrated view. */
162
+ staticOptions: StaticViewOptions | null;
118
163
  private handler;
119
164
  constructor(viewPath: string, handler?: CallbackHandler<Input, Output, Params> | [new () => Controller, ControllerMethods<any>]);
120
165
  run(req: HttpRequest<Input, Params>, path: string): Promise<{
@@ -126,6 +171,28 @@ export declare class ViewRoute<Input, Output, Params> {
126
171
  };
127
172
  }>;
128
173
  middleware(middlewares: MiddlewareInput): this;
174
+ /**
175
+ * Serves this view as a static document: rendered on the server as usual,
176
+ * but sent with no React on the client.
177
+ *
178
+ * The handler, middleware, redirects, `Query.prefetch`, `useQuery` reads,
179
+ * `Head` metadata, dictionaries and status codes all work as for any view.
180
+ * What changes is the document: gemi waits for the whole tree to settle
181
+ * (no streaming) and sends it without the client entry, `modulepreload`s,
182
+ * the `__GEMI_DATA__` payload, the theme script or React's streaming
183
+ * scripts. A page with no islands ships no JavaScript at all.
184
+ *
185
+ * Interactive parts are islands — see `island()` in `gemi/client` — which
186
+ * add one small loader plus each used island's own module.
187
+ *
188
+ * Because nothing hydrates, event handlers, effects and state in the view
189
+ * never run in the browser. Links are plain `<a>`s, and a client-side
190
+ * navigation from a hydrated page to this route becomes a full page load.
191
+ *
192
+ * Returns `this`, so the route's type (and its `ViewPaths` entry) is
193
+ * unchanged.
194
+ */
195
+ static(options?: StaticViewOptions): this;
129
196
  /**
130
197
  * Hides this route behind a feature flag.
131
198
  *