gemi 0.87.0 → 0.88.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 (221) 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 +1 -1
  4. package/dist/auth/AuthController.d.ts +45 -3
  5. package/dist/auth/AuthController.d.ts.map +1 -1
  6. package/dist/auth/AuthManager.d.ts +42 -1
  7. package/dist/auth/AuthManager.d.ts.map +1 -1
  8. package/dist/auth/UserProvider.d.ts +18 -1
  9. package/dist/auth/UserProvider.d.ts.map +1 -1
  10. package/dist/auth/config.d.ts +109 -0
  11. package/dist/auth/config.d.ts.map +1 -1
  12. package/dist/auth/oneTimeCode.d.ts +99 -0
  13. package/dist/auth/oneTimeCode.d.ts.map +1 -0
  14. package/dist/auth/routes.d.ts +13 -0
  15. package/dist/auth/routes.d.ts.map +1 -1
  16. package/dist/auth/types.d.ts +8 -0
  17. package/dist/auth/types.d.ts.map +1 -1
  18. package/dist/bin/gemi.js +198 -39
  19. package/dist/bin/gemi.js.map +5 -4
  20. package/dist/bun/plugin.js +1 -1
  21. package/dist/bun/preload.js +1 -1
  22. package/dist/{chunk-3epp751c.js → chunk-0808z3mq.js} +2 -2
  23. package/dist/{chunk-3epp751c.js.map → chunk-0808z3mq.js.map} +1 -1
  24. package/dist/{chunk-q9g7g995.js → chunk-0efykzjy.js} +3 -3
  25. package/dist/{chunk-q9g7g995.js.map → chunk-0efykzjy.js.map} +1 -1
  26. package/dist/{chunk-tkhrvd30.js → chunk-16mnpn6c.js} +2 -2
  27. package/dist/{chunk-tkhrvd30.js.map → chunk-16mnpn6c.js.map} +1 -1
  28. package/dist/{chunk-r8ak7k9b.js → chunk-17nh5gfm.js} +2 -2
  29. package/dist/{chunk-r8ak7k9b.js.map → chunk-17nh5gfm.js.map} +1 -1
  30. package/dist/{chunk-m4fg0k5f.js → chunk-3ph0aj0x.js} +2 -2
  31. package/dist/{chunk-m4fg0k5f.js.map → chunk-3ph0aj0x.js.map} +1 -1
  32. package/dist/{chunk-h5mz3zdr.js → chunk-3rb5ht8v.js} +3 -3
  33. package/dist/{chunk-h5mz3zdr.js.map → chunk-3rb5ht8v.js.map} +1 -1
  34. package/dist/chunk-3w65ra1s.js +5 -0
  35. package/dist/{chunk-vme0xdf4.js.map → chunk-3w65ra1s.js.map} +1 -1
  36. package/dist/{chunk-70ha7xye.js → chunk-443dm19c.js} +2 -2
  37. package/dist/{chunk-70ha7xye.js.map → chunk-443dm19c.js.map} +1 -1
  38. package/dist/{chunk-41mz2fs2.js → chunk-49v5xq8q.js} +2 -2
  39. package/dist/{chunk-41mz2fs2.js.map → chunk-49v5xq8q.js.map} +1 -1
  40. package/dist/{chunk-hj93em1r.js → chunk-4v4v5wkh.js} +2 -2
  41. package/dist/{chunk-hj93em1r.js.map → chunk-4v4v5wkh.js.map} +1 -1
  42. package/dist/{chunk-9yd5d1ff.js → chunk-523t3bcz.js} +4 -4
  43. package/dist/{chunk-9yd5d1ff.js.map → chunk-523t3bcz.js.map} +1 -1
  44. package/dist/{chunk-xcqw162y.js → chunk-56p9a7nx.js} +3 -3
  45. package/dist/{chunk-xcqw162y.js.map → chunk-56p9a7nx.js.map} +1 -1
  46. package/dist/{chunk-4f48z676.js → chunk-61rs7kxf.js} +2 -2
  47. package/dist/{chunk-4f48z676.js.map → chunk-61rs7kxf.js.map} +1 -1
  48. package/dist/{chunk-zgy7jtcq.js → chunk-64z2zt41.js} +2 -2
  49. package/dist/{chunk-zgy7jtcq.js.map → chunk-64z2zt41.js.map} +1 -1
  50. package/dist/{chunk-2zsfntsf.js → chunk-6dyt8w27.js} +4 -4
  51. package/dist/{chunk-2zsfntsf.js.map → chunk-6dyt8w27.js.map} +1 -1
  52. package/dist/{chunk-f32t2eny.js → chunk-6rc6yec4.js} +3 -3
  53. package/dist/{chunk-f32t2eny.js.map → chunk-6rc6yec4.js.map} +1 -1
  54. package/dist/{chunk-bjd9wr4t.js → chunk-6s6fj97j.js} +2 -2
  55. package/dist/{chunk-bjd9wr4t.js.map → chunk-6s6fj97j.js.map} +1 -1
  56. package/dist/{chunk-ngqgm026.js → chunk-6tt3ynm7.js} +2 -2
  57. package/dist/{chunk-ngqgm026.js.map → chunk-6tt3ynm7.js.map} +1 -1
  58. package/dist/{chunk-brd6tb1s.js → chunk-6y62ccam.js} +3 -3
  59. package/dist/{chunk-brd6tb1s.js.map → chunk-6y62ccam.js.map} +1 -1
  60. package/dist/{chunk-f6qhsdsn.js → chunk-713fezaz.js} +2 -2
  61. package/dist/{chunk-f6qhsdsn.js.map → chunk-713fezaz.js.map} +1 -1
  62. package/dist/{chunk-27k2zsq8.js → chunk-78gs7xvn.js} +2 -2
  63. package/dist/{chunk-27k2zsq8.js.map → chunk-78gs7xvn.js.map} +1 -1
  64. package/dist/{chunk-4mynkrv4.js → chunk-7r78cdyd.js} +2 -2
  65. package/dist/{chunk-4mynkrv4.js.map → chunk-7r78cdyd.js.map} +1 -1
  66. package/dist/chunk-86p57tjw.js +5 -0
  67. package/dist/{chunk-p4125aj9.js.map → chunk-86p57tjw.js.map} +3 -6
  68. package/dist/{chunk-fsad7g9c.js → chunk-8dpnghvk.js} +2 -2
  69. package/dist/{chunk-fsad7g9c.js.map → chunk-8dpnghvk.js.map} +1 -1
  70. package/dist/{chunk-mxmw42c1.js → chunk-8pesk2wm.js} +2 -2
  71. package/dist/{chunk-mxmw42c1.js.map → chunk-8pesk2wm.js.map} +1 -1
  72. package/dist/{chunk-tx51rqct.js → chunk-8r7xhy1g.js} +2 -2
  73. package/dist/{chunk-tx51rqct.js.map → chunk-8r7xhy1g.js.map} +1 -1
  74. package/dist/{chunk-c8bjqw07.js → chunk-8y08amzz.js} +2 -2
  75. package/dist/{chunk-c8bjqw07.js.map → chunk-8y08amzz.js.map} +1 -1
  76. package/dist/{chunk-ryj4wqcp.js → chunk-9c1zx81w.js} +2 -2
  77. package/dist/{chunk-ryj4wqcp.js.map → chunk-9c1zx81w.js.map} +1 -1
  78. package/dist/{chunk-3k2ykvez.js → chunk-ak3yy4za.js} +2 -2
  79. package/dist/{chunk-3k2ykvez.js.map → chunk-ak3yy4za.js.map} +1 -1
  80. package/dist/{chunk-es6gxzyf.js → chunk-aqtf14yz.js} +2 -2
  81. package/dist/{chunk-es6gxzyf.js.map → chunk-aqtf14yz.js.map} +1 -1
  82. package/dist/{chunk-vemwqxx2.js → chunk-bsbn7qtd.js} +2 -2
  83. package/dist/{chunk-vemwqxx2.js.map → chunk-bsbn7qtd.js.map} +1 -1
  84. package/dist/{chunk-grtmy031.js → chunk-d1r618e8.js} +1 -1
  85. package/dist/{chunk-mjrxyvwr.js → chunk-d5h5v4rj.js} +2 -2
  86. package/dist/{chunk-mjrxyvwr.js.map → chunk-d5h5v4rj.js.map} +1 -1
  87. package/dist/{chunk-ma2zdn5s.js → chunk-e3fnjj0h.js} +2 -2
  88. package/dist/{chunk-ma2zdn5s.js.map → chunk-e3fnjj0h.js.map} +1 -1
  89. package/dist/chunk-efzvxta5.js +24 -0
  90. package/dist/{chunk-smtcmc20.js.map → chunk-efzvxta5.js.map} +6 -5
  91. package/dist/{chunk-yr51wvkr.js → chunk-fkt43zw1.js} +2 -2
  92. package/dist/{chunk-yr51wvkr.js.map → chunk-fkt43zw1.js.map} +1 -1
  93. package/dist/{chunk-x74r8j5k.js → chunk-g2bsmw1m.js} +2 -2
  94. package/dist/{chunk-3bjj31n9.js.map → chunk-g2bsmw1m.js.map} +1 -1
  95. package/dist/{chunk-v36ey99b.js → chunk-gzfat1x1.js} +2 -2
  96. package/dist/{chunk-v36ey99b.js.map → chunk-gzfat1x1.js.map} +1 -1
  97. package/dist/{chunk-97bt619e.js → chunk-hnbj9jx2.js} +3 -3
  98. package/dist/{chunk-97bt619e.js.map → chunk-hnbj9jx2.js.map} +1 -1
  99. package/dist/{chunk-y3trr7xh.js → chunk-j0fgc58k.js} +2 -2
  100. package/dist/{chunk-y3trr7xh.js.map → chunk-j0fgc58k.js.map} +1 -1
  101. package/dist/{chunk-08qvtx8v.js → chunk-j3y6pdqp.js} +2 -2
  102. package/dist/{chunk-08qvtx8v.js.map → chunk-j3y6pdqp.js.map} +1 -1
  103. package/dist/{chunk-fev2yjmb.js → chunk-jfgjscq6.js} +2 -2
  104. package/dist/{chunk-fev2yjmb.js.map → chunk-jfgjscq6.js.map} +1 -1
  105. package/dist/{chunk-165mrqab.js → chunk-ngq4n2b3.js} +2 -2
  106. package/dist/{chunk-165mrqab.js.map → chunk-ngq4n2b3.js.map} +1 -1
  107. package/dist/{chunk-t70a927z.js → chunk-pqydkns8.js} +2 -2
  108. package/dist/{chunk-t70a927z.js.map → chunk-pqydkns8.js.map} +1 -1
  109. package/dist/{chunk-yd04n99w.js → chunk-pw95y0fx.js} +2 -2
  110. package/dist/{chunk-yd04n99w.js.map → chunk-pw95y0fx.js.map} +1 -1
  111. package/dist/{chunk-04ebkq8a.js → chunk-pwaftx6n.js} +3 -3
  112. package/dist/{chunk-04ebkq8a.js.map → chunk-pwaftx6n.js.map} +1 -1
  113. package/dist/{chunk-x02whwn3.js → chunk-q6ydpt33.js} +2 -2
  114. package/dist/{chunk-x02whwn3.js.map → chunk-q6ydpt33.js.map} +1 -1
  115. package/dist/{chunk-76ar9z69.js → chunk-r1sj312m.js} +2 -2
  116. package/dist/{chunk-76ar9z69.js.map → chunk-r1sj312m.js.map} +1 -1
  117. package/dist/{chunk-0w95nc15.js → chunk-r78aqvne.js} +2 -2
  118. package/dist/{chunk-0w95nc15.js.map → chunk-r78aqvne.js.map} +1 -1
  119. package/dist/{chunk-mdpm06cg.js → chunk-r9qzgvpx.js} +2 -2
  120. package/dist/{chunk-mdpm06cg.js.map → chunk-r9qzgvpx.js.map} +1 -1
  121. package/dist/{chunk-hp96c8hp.js → chunk-rhe7s1fm.js} +3 -3
  122. package/dist/{chunk-hp96c8hp.js.map → chunk-rhe7s1fm.js.map} +1 -1
  123. package/dist/{chunk-n9n3sqx5.js → chunk-rp0reqjn.js} +2 -2
  124. package/dist/{chunk-n9n3sqx5.js.map → chunk-rp0reqjn.js.map} +1 -1
  125. package/dist/{chunk-7g90me53.js → chunk-rw0t90pf.js} +2 -2
  126. package/dist/{chunk-7g90me53.js.map → chunk-rw0t90pf.js.map} +1 -1
  127. package/dist/{chunk-9zkgvggh.js → chunk-s72y1w84.js} +2 -2
  128. package/dist/{chunk-9zkgvggh.js.map → chunk-s72y1w84.js.map} +1 -1
  129. package/dist/{chunk-3bjj31n9.js → chunk-t93t317r.js} +2 -2
  130. package/dist/{chunk-x74r8j5k.js.map → chunk-t93t317r.js.map} +1 -1
  131. package/dist/{chunk-m0kbpywd.js → chunk-ttckhvew.js} +2 -2
  132. package/dist/{chunk-m0kbpywd.js.map → chunk-ttckhvew.js.map} +1 -1
  133. package/dist/{chunk-gsv1syg3.js → chunk-whjhrz97.js} +2 -2
  134. package/dist/{chunk-gsv1syg3.js.map → chunk-whjhrz97.js.map} +1 -1
  135. package/dist/{chunk-ebbft1yj.js → chunk-x85x83pa.js} +1 -1
  136. package/dist/{chunk-tqzddk5e.js → chunk-xc90ycw2.js} +2 -2
  137. package/dist/{chunk-tqzddk5e.js.map → chunk-xc90ycw2.js.map} +1 -1
  138. package/dist/{chunk-w8cf1kqd.js → chunk-xqyx8kzr.js} +2 -2
  139. package/dist/{chunk-w8cf1kqd.js.map → chunk-xqyx8kzr.js.map} +2 -2
  140. package/dist/{chunk-x2ds4xaj.js → chunk-yafxbmy3.js} +1 -1
  141. package/dist/{chunk-71vjxehx.js → chunk-yc3n6zhr.js} +3 -3
  142. package/dist/{chunk-71vjxehx.js.map → chunk-yc3n6zhr.js.map} +1 -1
  143. package/dist/chunk-ymgehegb.js +17 -0
  144. package/dist/{chunk-z61sdvb0.js.map → chunk-ymgehegb.js.map} +12 -8
  145. package/dist/{chunk-rj81ysxm.js → chunk-zf8bgrnj.js} +2 -2
  146. package/dist/{chunk-rj81ysxm.js.map → chunk-zf8bgrnj.js.map} +1 -1
  147. package/dist/{chunk-0ms02b96.js → chunk-zn5bqe6m.js} +3 -3
  148. package/dist/{chunk-0ms02b96.js.map → chunk-zn5bqe6m.js.map} +1 -1
  149. package/dist/{chunk-7bynhyt1.js → chunk-ztzd90gp.js} +2 -2
  150. package/dist/{chunk-7bynhyt1.js.map → chunk-ztzd90gp.js.map} +1 -1
  151. package/dist/chunks/{ThemeProvider-D1kDfCwY.js → ThemeProvider-z_MW40tl.js} +126 -6
  152. package/dist/chunks/ThemeProvider-z_MW40tl.js.map +1 -0
  153. package/dist/client/ClientRouter.d.ts.map +1 -1
  154. package/dist/client/ClientRouterContext.d.ts.map +1 -1
  155. package/dist/client/ComponentContext.d.ts +8 -1
  156. package/dist/client/ComponentContext.d.ts.map +1 -1
  157. package/dist/client/MutationError.d.ts +4 -4
  158. package/dist/client/auth/useEmailCode.d.ts +36 -0
  159. package/dist/client/auth/useEmailCode.d.ts.map +1 -0
  160. package/dist/client/chunkLoadRecovery.d.ts +96 -0
  161. package/dist/client/chunkLoadRecovery.d.ts.map +1 -0
  162. package/dist/client/index.d.ts +4 -0
  163. package/dist/client/index.d.ts.map +1 -1
  164. package/dist/client/index.js +53 -4
  165. package/dist/client/index.js.map +1 -1
  166. package/dist/client/init.d.ts +9 -0
  167. package/dist/client/init.d.ts.map +1 -1
  168. package/dist/config/index.d.ts +12 -0
  169. package/dist/config/index.d.ts.map +1 -1
  170. package/dist/config/index.js +1 -1
  171. package/dist/config/index.js.map +2 -2
  172. package/dist/console/run.js +2 -2
  173. package/dist/console/run.js.map +1 -1
  174. package/dist/container/index.js +2 -2
  175. package/dist/container/index.js.map +1 -1
  176. package/dist/database/index.js +2 -2
  177. package/dist/database/index.js.map +1 -1
  178. package/dist/email/index.js +2 -2
  179. package/dist/email/index.js.map +1 -1
  180. package/dist/facades/index.js +2 -2
  181. package/dist/facades/index.js.map +1 -1
  182. package/dist/foundation/index.js +2 -2
  183. package/dist/foundation/index.js.map +1 -1
  184. package/dist/http/Error.d.ts +2 -2
  185. package/dist/http/index.js +2 -2
  186. package/dist/http/index.js.map +1 -1
  187. package/dist/i18n/dictionaryRuntime.js +2 -2
  188. package/dist/i18n/dictionaryRuntime.js.map +1 -1
  189. package/dist/i18n/index.js +2 -2
  190. package/dist/i18n/index.js.map +1 -1
  191. package/dist/kernel/index.d.ts +2 -0
  192. package/dist/kernel/index.d.ts.map +1 -1
  193. package/dist/kernel/index.js +3 -3
  194. package/dist/kernel/index.js.map +2 -2
  195. package/dist/orm/index.js +3 -3
  196. package/dist/orm/index.js.map +1 -1
  197. package/dist/server/forwardedFor.d.ts +1 -1
  198. package/dist/server/index.js +2 -2
  199. package/dist/server/index.js.map +1 -1
  200. package/dist/server/staticAssetMiss.d.ts +7 -0
  201. package/dist/server/staticAssetMiss.d.ts.map +1 -1
  202. package/dist/services/index.d.ts +1 -1
  203. package/dist/services/index.d.ts.map +1 -1
  204. package/dist/services/index.js +3 -3
  205. package/dist/services/index.js.map +1 -1
  206. package/dist/services/queue/work.js +2 -2
  207. package/dist/services/queue/work.js.map +1 -1
  208. package/dist/services/rate-limiter/drivers/InMemoryRateLimiterDriver.d.ts +10 -1
  209. package/dist/services/rate-limiter/drivers/InMemoryRateLimiterDriver.d.ts.map +1 -1
  210. package/dist/support/index.js +2 -2
  211. package/dist/support/index.js.map +1 -1
  212. package/dist/testing/index.js +1 -1
  213. package/package.json +1 -1
  214. package/dist/chunk-p4125aj9.js +0 -5
  215. package/dist/chunk-smtcmc20.js +0 -24
  216. package/dist/chunk-vme0xdf4.js +0 -5
  217. package/dist/chunk-z61sdvb0.js +0 -17
  218. package/dist/chunks/ThemeProvider-D1kDfCwY.js.map +0 -1
  219. /package/dist/{chunk-grtmy031.js.map → chunk-d1r618e8.js.map} +0 -0
  220. /package/dist/{chunk-ebbft1yj.js.map → chunk-x85x83pa.js.map} +0 -0
  221. /package/dist/{chunk-x2ds4xaj.js.map → chunk-yafxbmy3.js.map} +0 -0
@@ -4,7 +4,16 @@ export interface InMemoryRateLimiterOptions {
4
4
  /**
5
5
  * Hard cap on tracked keys. Reached only by traffic that never repeats a key
6
6
  * (spoofed `x-forwarded-for`, for instance); the map is swept of dead buckets
7
- * first and only then evicts live ones, oldest touched first.
7
+ * first and only then evicts live ones down to 90% of the cap, the least
8
+ * spent (as a share of their limit) first and, among equals, the oldest
9
+ * touched first.
10
+ *
11
+ * Spending-first is what keeps key churn from buying a fresh budget: a
12
+ * bucket close to its limit (a code's guesses, an address under attack)
13
+ * outlives the one-hit keys an attacker makes to push it out, and is only
14
+ * reached once every less-spent key has gone. Eviction can still reset a
15
+ * bucket under enough churn, so a limit that guards a secret belongs on a
16
+ * shared store (`RedisRateLimiter`) in production.
8
17
  *
9
18
  * Defaults to 100k keys — a few MB, and far more than a single instance
10
19
  * legitimately sees inside one window.
@@ -1 +1 @@
1
- {"version":3,"file":"InMemoryRateLimiterDriver.d.ts","sourceRoot":"","sources":["../../../../services/rate-limiter/drivers/InMemoryRateLimiterDriver.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAUxD,MAAM,WAAW,0BAA0B;IACzC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,qBAAa,mBAAoB,SAAQ,iBAAiB;IACxD,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,GAAE,0BAA+B;IAKpD,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,eAAe;IAwC/C,kDAAkD;IAClD,KAAK;IAIL,iEAAiE;IACjE,IAAI,IAAI,WAEP;IAED,4EAA4E;IAC5E,OAAO,CAAC,IAAI;IAyBZ,OAAO,CAAC,KAAK;CAgBd"}
1
+ {"version":3,"file":"InMemoryRateLimiterDriver.d.ts","sourceRoot":"","sources":["../../../../services/rate-limiter/drivers/InMemoryRateLimiterDriver.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAYxD,MAAM,WAAW,0BAA0B;IACzC;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,qBAAa,mBAAoB,SAAQ,iBAAiB;IACxD,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,GAAE,0BAA+B;IAKpD,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,eAAe;IAyC/C,kDAAkD;IAClD,KAAK;IAIL,iEAAiE;IACjE,IAAI,IAAI,WAEP;IAED,4EAA4E;IAC5E,OAAO,CAAC,IAAI;IAyBZ,OAAO,CAAC,KAAK;CA6Bd"}
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{kc as Y}from"../chunk-vemwqxx2.js";import{kg as M}from"../chunk-m0kbpywd.js";import{sg as P,ug as R}from"../chunk-q9g7g995.js";import"../chunk-tx51rqct.js";import"../chunk-3epp751c.js";import{Eg as Q,Fg as U,Gg as V,Hg as W}from"../chunk-zgy7jtcq.js";import"../chunk-3bjj31n9.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{gc as Y}from"../chunk-bsbn7qtd.js";import{mg as M}from"../chunk-ttckhvew.js";import{ug as P,wg as R}from"../chunk-0efykzjy.js";import"../chunk-8r7xhy1g.js";import"../chunk-0808z3mq.js";import{Gg as Q,Hg as U,Ig as V,Jg as W}from"../chunk-64z2zt41.js";import"../chunk-t93t317r.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=15312E34A305D93264756E2164756E21
4
+ //# debugId=A06A28FF50F2D98064756E2164756E21
@@ -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": ";6TAgCO,CAAe,JAAQ,EAOrB,OAMD,AAAI,HAAkB,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": "15312E34A305D93264756E2164756E21",
9
+ "debugId": "A06A28FF50F2D98064756E2164756E21",
10
10
  "names": []
11
11
  }
@@ -1,4 +1,4 @@
1
- import { A as Action, C as I18nProvider, F as QueryManagerContext, I as QueryManagerProvider, M as toVariantKey, N as applyParams, W as Subject, i as RouteTransitionProvider, j as createMemoryHistory, k as ProgressManager, o as ClientRouterContext, r as m, t as ThemeProvider, w as ServerDataContext } from "../chunks/ThemeProvider-D1kDfCwY.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-z_MW40tl.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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemi",
3
- "version": "0.87.0",
3
+ "version": "0.88.0",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "Enes Tufekci <enes@gemijs.dev>",
@@ -1,5 +0,0 @@
1
- // @bun
2
- import{Db as NZ,Jb as b}from"./chunk-hj93em1r.js";import{Sb as m,Ub as k,Wb as WZ,Xb as HZ,Yb as XZ,_b as UZ}from"./chunk-xcqw162y.js";import{bc as r,cc as a,dc as C,ec as e,fc as ZZ,hc as $Z}from"./chunk-2zsfntsf.js";import{kc as I}from"./chunk-vemwqxx2.js";import{Ad as v,Bd as w,Mc as o,Vc as zZ,Wc as c,_c as j,gd as d,hd as f,ld as l,sd as S,xc as CZ,zd as F}from"./chunk-z61sdvb0.js";import{Jd as YZ,Kd as h}from"./chunk-f32t2eny.js";import{mf as u,of as y,pf as D,qf as E}from"./chunk-hp96c8hp.js";import{Ef as JZ}from"./chunk-brd6tb1s.js";import{kg as U}from"./chunk-m0kbpywd.js";import{pg as p}from"./chunk-71vjxehx.js";import{ug as M}from"./chunk-q9g7g995.js";import{vg as VZ}from"./chunk-tx51rqct.js";async function xZ(Z){try{if(!await Z.shouldRun.call(Z))return}catch($){console.error(`Error evaluating shouldRun for cron job ${Z.name}:`,$);return}try{await Z.onTick.call(Z)}catch($){console.error(`Error executing cron job ${Z.name}:`,$)}try{await Z.callback.call(Z)}catch($){console.error(`Error in cron job ${Z.name}:`,$)}try{await Z.onComplete.call(Z)}catch($){console.error(`Error completing cron job ${Z.name}:`,$)}}class A{static token="scheduler";handles=[];resolved;inFlight=new Map;stopped=!1;constructor(Z){this.resolved=Z.jobs}get jobs(){return[...this.resolved]}useJobs(Z){this.resolved=Z}start(Z=($)=>$()){if(this.stopped=!1,this.resolved.length===0)return;let $=globalThis.__gemiCronJobs??=new Map,H=new Map;for(let G of this.resolved){let V=new G;if(!V.name){console.error(`Cron job must have a name \u2014 ${G.name||"an anonymous class"} has none, so it is not scheduled. If this is a base class that other jobs extend, move it out of the discovered directory: \`abstract\` does not survive to runtime, so a class under app/cron is indistinguishable from a job.`);continue}if(!V.cron){console.error(`Cron job must have an expression. Job: ${V.name}`);continue}let X=H.get(V.name);if(X!==void 0){console.error(`Two cron jobs claim the name "${V.name}" \u2014 ${X} is scheduled and ${G.name||"an anonymous class"} is not. A name is the scheduler's key, so only one job can hold it. Rename one.`);continue}H.set(V.name,G.name||"an anonymous class"),$.get(V.name)?.stop();let Y=Bun.cron(V.cron,()=>{if(this.stopped)return;return this.track(V.name,()=>Z(()=>xZ(V)))});$.set(V.name,Y),this.handles.push(Y)}}stop(){this.stopped=!0;for(let Z of this.handles)Z.stop();this.handles=[]}async drain(Z=1/0){this.stop();let $,H=new Promise((G)=>{if(Z!==1/0)$=setTimeout(G,Z)});return await Promise.race([Promise.allSettled([...this.inFlight.values()].map((G)=>G.done)),H]),clearTimeout($),{unfinished:[...this.inFlight.values()].map((G)=>({...G.tick}))}}get running(){return this.inFlight.size}track(Z,$){let H={},G=Promise.resolve().then($).finally(()=>this.inFlight.delete(H));return this.inFlight.set(H,{tick:{name:Z,startedAt:new Date},done:G}),G}}import{isMainThread as EZ}from"worker_threads";var TZ=100,SZ=(Z)=>Math.min(TZ,Math.floor(Z/10));class RZ extends I{register(){this.app.singleton(C,()=>new C(this.app.config.get("queue",{}),{application:this.app}))}async boot(){let Z=this.app.config.get("queue",{});if(Z.jobs!==void 0)return;let{jobsDir:$}=U(r(),Z);this.app.make(C).useJobs(await HZ($))}async shutdown(Z){if(!this.app.resolved(C))return;let $=this.app.make(C);if($.running>0)console.log(`[gemi] Shutting down: waiting for ${$.running} running queued job(s).`);let H=Z?.timeoutMs,{unfinished:G}=await $.drain(H===void 0?1/0:Math.max(0,H-SZ(H)));if(G.length>0)return console.error("[gemi] Queued jobs still running at shutdown: "+G.map((V)=>`${V.name} (${V.id})`).join(", ")),{abandoned:!0}}}function C3(Z){if(jZ(Z),Bun.env.NODE_ENV!=="production")return MZ(Z);if(GZ(Z))return;if(!e())return;if(!Z.bound(C))return;Z.make(C).start()}function GZ(Z){let $=Z.config.get("queue",{}).driver??"memory";return $==="memory"||$ instanceof a}function DZ(Z){if(GZ(Z))return!0;if(typeof Z.config.get("queue",{}).driver!=="function"||!Z.bound(C))return!1;try{return!Z.make(C).durable}catch{return!1}}function jZ(Z){let $=process.env.GEMI_QUEUE_CLAIM;if($===void 0||$Z())return;if(process.env.ROOT_DIR===void 0||!EZ)return;if(ZZ()){if(!DZ(Z))return;console.warn('[gemi] GEMI_QUEUE_CLAIM=off is ignored: the memory queue driver keeps jobs in the process that dispatched them, so no worker could run them. This server runs its own jobs. Use a driver other processes can read, such as "database", to hand jobs to `gemi queue:work`.')}else if($.trim().toLowerCase()!=="on")console.warn(`[gemi] GEMI_QUEUE_CLAIM="${$}" is not "off" or "on", so this server claims jobs. Set it to "off" to leave them to \`gemi queue:work\`.`)}function MZ(Z){let $=globalThis.__gemiDevQueue;if(!$)return;if(globalThis.__gemiDevQueue=void 0,$.stop(),Z.bound(C))Z.make(C).start()}class kZ extends I{register(){this.app.singleton(w,()=>new w(this.app.config.get("auth",{})))}}var yZ=100,fZ=(Z)=>Math.min(yZ,Math.floor(Z/10));class bZ extends I{register(){this.app.singleton(A,()=>new A(U(m(),this.app.config.get("schedule",{}))))}async boot(){let Z=this.app.make(A),$=this.app.config.get("schedule",{});if($.jobs===void 0){let{jobsDir:G}=U(m(),$);Z.useJobs(await XZ(G))}if(process.env.GEMI_NO_SCHEDULE==="1")return;let H=this.app;Z.start((G)=>VZ.run(H,G))}async shutdown(Z){if(!this.app.resolved(A))return;let $=this.app.make(A);if($.running>0)console.log(`[gemi] Shutting down: waiting for ${$.running} running cron tick(s).`);let H=Z?.timeoutMs,{unfinished:G}=await $.drain(H===void 0?1/0:Math.max(0,H-fZ(H)));if(G.length>0)return console.error("[gemi] Cron jobs still running at shutdown: "+G.map((V)=>`${V.name} (started ${V.startedAt.toISOString()})`).join(", ")),{abandoned:!0}}}class N extends zZ{modelName;constructor(Z="FeatureFlag"){super();this.modelName=Z}get available(){return YZ(this.modelName)}async load(){if(!this.available)throw new c(this.modelName);let Z=h(this.modelName);return await Z.asSystem(()=>Z.findMany())}async write(Z,$,H){if(!this.available)throw new c(this.modelName);let G=h(this.modelName),V=this.hasActorColumn(G),X={active:$};if(V)X.updatedBy=H.actor;return await G.asSystem(()=>G.upsert({where:{key:Z},create:{key:Z,...X},update:X})),{actorRecorded:V}}hasActorColumn(Z){let $=Z?.$schema?.fields?.updatedBy;return $!==void 0&&$.type==="String"}}function j3(Z){return Z}function KZ(){return{features:void 0,enabled:!0,source:new N,model:"FeatureFlag",ttl:30,context:void 0,onEvaluate:void 0,maxClientFlags:200}}class gZ extends I{register(){this.app.singleton(j,()=>{let Z=this.app.config.get("features",{}),$=U(KZ(),Z);if(Z?.model!==void 0&&Z?.source===void 0)$.source=new N(Z.model);else if(Z?.model!==void 0&&Z.source instanceof N&&Z.source.modelName!==Z.model)D.warning(`app/config/features.ts sets \`model: "${Z.model}"\` and a source reading "${Z.source.modelName}". The source wins; drop \`model\` to silence this.`);return new j($,(H)=>D.warning(H))})}async boot(){let Z=this.app.make(j);if(!Z.config.enabled)return;try{await Z.refresh()}catch($){D.error(`Could not warm the feature flag cache at boot. ${$ instanceof Error?$.message:String($)}`)}}}class vZ extends I{register(){this.app.singleton(p,()=>new p(this.app.config.get("mail",{})))}}function wZ(Z){return`listener:${Z}`}function IZ(Z,$){mZ(Z);let{maxAttempts:H,backoff:G,worker:V}=$,X=Z.event.name,Y=class extends WZ{maxAttempts=H;backoff=G;worker=V;async run(...z){let[K,B]=hZ(z),J=M(Q).rehydrate(K,B);await new Z().handle(J)}onFail(z){console.error(`The listener ${Z.name} threw while handling ${X} off the queue. The queue will retry it up to ${H} times in total; nothing the dispatcher did is waiting on it.`,z)}onDeadletter(z){console.error(`The listener ${Z.name} failed every one of its ${H} attempts at ${X} and has been dead-lettered, so this side effect did not happen and will not be retried.`,z)}};return Object.defineProperty(Y,"name",{value:wZ(Z.name),writable:!0}),Y}function mZ(Z){if(Object.getOwnPropertyDescriptor(Z,"name")?.writable)return;throw Error(`The listener ${Z.name} sets \`queued = true\` but does not declare \`static name\`, so it would be registered with the queue `+"under its class name \u2014 which a production build renames while the "+`payload that names it does not. Add: static name = "${Z.name}";`)}function hZ(Z){return typeof Z[0]==="string"?Z:Z[0]}class Q{static token="events";listeners={};events={};warnedFor=new Set;warnedAboutWaiting=new Set;config;constructor(Z={}){this.config=U(k(),Z),this.useListeners(this.config.listeners)}useListeners(Z){this.config.listeners=Z,this.listeners={},this.events={};let $=new Set;for(let H of Z){if(!H.event){console.error(`Listener ${H.name} does not declare \`static event\`, so there is no event name to register it under and its handle will never run. Add: static event = SomeEvent;`);continue}if($.has(H.name)){console.error(`Two event listeners are named "${H.name}" \u2014 the first is `+"registered and this one is not. A listener's name identifies it across the framework, so only one class can hold it. Rename one.");continue}$.add(H.name);let G=H.event.name,V=new H;this.events[G]??=H.event,(this.listeners[G]??=[]).push({listener:H,job:V.queued?IZ(H,V):null})}}get queuedListenerJobs(){return Object.values(this.listeners).flat().flatMap(({job:Z})=>Z?[Z]:[])}get registeredListeners(){return[...this.config.listeners]}dispatch(Z,$){if(this.deferToCommit(Z,$,!1))return;this.runListeners(Z,$)}async dispatchAndWait(Z,$){if(this.deferToCommit(Z,$,!0))return;return this.runListeners(Z,$)}deferToCommit(Z,$,H){let{name:G,afterCommit:V}=Z.constructor;if(!V)return!1;let X=JZ(()=>this.runListeners(Z,$));if(X&&H)this.warnNothingIsWaitedFor(G);return X}async runListeners(Z,$){let H=Z.constructor.name,G=this.listeners[H];if(!G?.length){this.warnNothingIsListening(H);return}for(let{listener:V,job:X}of G){if(X){this.enqueue(X,V,H,$);continue}try{await new V().handle(Z)}catch(Y){console.error(`The listener ${V.name} threw while handling ${H}. The `+"listeners after it still ran \u2014 a listener's failure is its own.",Y)}}}rehydrate(Z,$=[]){let H=this.events[Z];if(!H)throw Error(`Cannot rebuild the event "${Z}" that came off the queue: no registered listener binds to an event of that name, so there is no class to construct. A queued listener runs in an application that `+"discovered its own listeners \u2014 check that this process sees the "+`same app/listeners as the one that dispatched, and that the event declares \`static name = "${Z}"\`.`);return new H(...$)}enqueue(Z,$,H,G){if(G===void 0){console.error(`The listener ${$.name} is queued, but ${H} reached the dispatcher without its constructor arguments, so there is nothing for the queue to rebuild it from and the listener was skipped. Dispatch through ${H}.dispatch(...) or ${H}.dispatchAndWait(...), which carry them.`);return}let V=(X)=>console.error(`The listener ${$.name} could not be queued for ${H}, so it did not run and will not be retried. The listeners after it still ran.`,X);try{M(C).push(Z,JSON.stringify([H,G]),{reportFailure:!1}).catch(V)}catch(X){V(X)}}warnNothingIsWaitedFor(Z){if(Bun.env.NODE_ENV==="production")return;if(this.warnedAboutWaiting.has(Z))return;this.warnedAboutWaiting.add(Z),console.warn(`[gemi] ${Z}.dispatchAndWait() was called inside a transaction and ${Z} declares \`static afterCommit = true\`, so it resolved `+"immediately with no listener having run \u2014 they run when the "+"transaction commits. Await the transaction instead, or drop afterCommit if the caller needs the side effects first. Development only.")}warnNothingIsListening(Z){if(Bun.env.NODE_ENV==="production")return;if(this.warnedFor.has(Z))return;this.warnedFor.add(Z),console.warn(`[gemi] ${Z} was dispatched and nothing is listening for it. A listener registers under the name its event declares, so check that app/listeners holds a Listener with \`static event = ${Z}\` and that ${Z} declares \`static name = "${Z}"\`. Development only.`)}}class cZ extends I{register(){this.app.singleton(Q,()=>new Q(this.app.config.get("events",{})))}async boot(){let Z=this.app.make(Q),$=this.app.config.get("events",{});if($.listeners===void 0){let{listenersDir:V}=U(k(),$);Z.useListeners(await UZ(V))}let H=Z.queuedListenerJobs;if(H.length===0)return;let G=this.app.make(C);for(let V of H)G.registerJob(V)}}class pZ extends I{register(){this.app.singleton(u,()=>new u(this.app.config.get("filesystem",{})))}}class uZ extends I{register(){this.app.singleton(d,()=>new d(this.app.config.get("image",{})))}}class dZ extends I{register(){this.app.instance(l,new l)}}function _4(Z){return Z}function BZ(){return{maxFileSize:10485760,onLogFileClosed:()=>{},onLogCreated:()=>{}}}class lZ extends I{register(){this.app.singleton(y,()=>new y(U(BZ(),this.app.config.get("log",{}))))}async boot(){if(!process.env.ROOT_DIR)return;await this.app.make(y).boot()}}class sZ extends I{register(){this.app.singleton(f,()=>new f(U(CZ(),this.app.config.get("middleware",{}))))}boot(){this.app.make(f).assertGlobalMiddleware()}}class s{}function PZ(Z,$){return Math.floor(Z/$)*$}function iZ(Z,$){if($<=0)return 0;return Math.min(1,Math.max(0,($-Z)/$))}function i(Z,$,H,G){return $*iZ(H,G)+Z}function nZ(Z){let{current:$,previous:H,elapsed:G,window:V,limit:X,cost:Y}=Z,z=X-Y;if(z<0)return V;let K=Math.max(0,V-G);if(H>0){let J=V*(1-(z-$)/H);if(J<=V)return Math.max(0,Math.ceil(J-G))}if($<=z)return K;if($<=0)return K;let B=V*(1-z/$);return K+Math.max(0,Math.ceil(B))}function _Z(Z){let{allowed:$,current:H,previous:G,now:V,elapsed:X,window:Y,limit:z,cost:K}=Z;if($){let J=i(H,G,X,Y);return{allowed:!0,limit:z,remaining:Math.max(0,Math.floor(z-J)),resetAt:V-X+Y,retryAfter:0}}let B=nZ({current:H,previous:G,elapsed:X,window:Y,limit:z,cost:K});return{allowed:!1,limit:z,remaining:0,resetAt:V+B,retryAfter:B}}class n extends s{buckets=new Map;maxKeys;constructor(Z={}){super();this.maxKeys=Math.max(1,Z.maxKeys??1e5)}consume(Z){let{key:$,limit:H,window:G}=Z,V=Z.cost??1,X=Date.now(),Y=PZ(X,G),z=X-Y,K=this.roll($,G,Y),J=i(K.current,K.previous,z,G)+V<=H;if(J)K.current+=V;if(this.buckets.delete($),this.buckets.set($,K),this.buckets.size>this.maxKeys)this.evict(X);return _Z({allowed:J,current:K.current,previous:K.previous,now:X,elapsed:z,window:G,limit:H,cost:V})}clear(){this.buckets.clear()}get size(){return this.buckets.size}roll(Z,$,H){let G=this.buckets.get(Z);if(!G||G.window!==$)return{window:$,windowStart:H,current:0,previous:0};if(G.windowStart===H)return G;if(G.windowStart+$===H)return G.previous=G.current,G.current=0,G.windowStart=H,G;return G.previous=0,G.current=0,G.windowStart=H,G}evict(Z){for(let[$,H]of this.buckets)if(Z-H.windowStart>=H.window*2)this.buckets.delete($);for(let $ of this.buckets.keys()){if(this.buckets.size<=this.maxKeys)break;this.buckets.delete($)}}}function f4(Z){return Z}function OZ(){return{driver:new n,limit:1000,window:60}}class oZ extends I{register(){this.app.singleton(o,()=>new o(U(OZ(),this.app.config.get("ratelimiter",{}))))}}function c4(Z){return Z}function qZ(){return{url:process.env.REDIS_URL,options:void 0}}class tZ extends I{register(){this.app.singleton(E,()=>new E(U(qZ(),this.app.config.get("redis",{}))))}shutdown(){if(!this.app.resolved(E))return;this.app.make(E).close()}}class P extends NZ{status;constructor(Z,$){super(Z);this.status=$;this.name="McpToolError"}}var rZ=/^[A-Za-z0-9_-]{1,64}$/,aZ=/:([A-Za-z_][A-Za-z0-9_]*)([?*+]?)/g,LZ=4000,t=1e5,eZ=/^(text\/|application\/([\w.+-]*\+)?(json|xml))/i;class T{dispatcher;static token="router.mcp";plans=new Map;constructor(Z,$){this.dispatcher=$;for(let[H,G]of Object.entries(Z.routes??{}))this.plans.set(H,this.plan(H,G))}list(Z,$){return AZ(Z),this.descriptors($)}descriptors(Z){let $=[];for(let{descriptor:H}of this.plans.values()){if(Z?.names&&!Z.names.includes(H.name))continue;if(Z?.tags&&!H.tags.some((G)=>Z.tags.includes(G)))continue;$.push(H)}return $}async execute(Z,$,H,G){AZ(Z);let V=this.plans.get($);if(!V)throw Error(`McpRegistry: there is no tool named "${$}".`);let{descriptor:X}=V,Y=X.inputSchema.safeParse(H);if(Y.ok===!1)throw new P(`Invalid arguments for "${$}": ${Y.errors.join(", ")}`);let z=Y.value,K=await this.fillPath(V,z,Z.req),{path:B}=this.dispatcher.getRouteHandlerAndParams(new Request(`http://gemi.internal/api${K}`));if(B!==X.url)throw new P(`"${$}" has nothing at ${K}.`,404);let J={};for(let L of V.jsonKeys)if(z[L]!==void 0)J[L]=z[L];let _,O="";if(V.fileFields.length>0)_=await this.formData(V,z,J,G);else if(X.method==="GET")O=G3(J);else if(V.jsonKeys.length>0)_=J;let x;try{x=await this.dispatcher.dispatchAs(Z.req,X.method,O?`${K}?${O}`:K,_)}catch(L){throw console.error(`[gemi/mcp] Dispatching "${$}" failed:`,L),new P(`"${$}" failed on the server.`,500)}return await V3($,x)}plan(Z,$){if(!rZ.test(Z))throw Error(`McpRouter: "${Z}" is not a valid tool name. A routes key is the tool's name as a model and an MCP client see it, used verbatim \u2014 letters, digits, "_" and "-", at most 64.`);let H=`McpRouter: "${Z}" (${$?.method} ${$?.url})`;if(!($ instanceof Object)||$.__internal_brand!=="McpRoute")throw Error(`McpRouter: "${Z}" is not a route. Declare it with this.fromApiRoute(...).`);let{method:G,url:V,meta:X}=$;if(V.startsWith("/__gemi__"))throw Error(`${H} is a framework route, not an app route.`);let Y=this.dispatcher.flatRoutes[V]?.[G];if(!Y)throw Error(`${H} names no route of this app. Expose a route by the path and verb it is mounted at.`);let z=[...V.matchAll(aZ)].map(([,W,q])=>({name:W,modifier:q})),K=X.params??{};for(let W of z)if(!(W.name in K))throw Error(`${H}: the path param "${W.name}" must be bound or declared "input".`);for(let[W,q]of Object.entries(K)){if(!z.some((R)=>R.name===W))throw Error(`${H}: "${W}" in params is not a param of the url.`);QZ(H,`params.${W}`,q)}let B=[],J;if(X.input){if(J=X.input.toJSONSchema(),J.type!=="object"||!J.properties)throw Error(`${H}: input must be an s.object(...), the fields of the request body.`);B=Object.keys(J.properties)}let _=Object.entries(X.files??{}).map(([W,q])=>({name:W,binder:q}));for(let W of _)QZ(H,`files.${W.name}`,W.binder);if(_.length>0&&G==="GET")throw Error(`${H}: a GET has no body to carry a file.`);let O={},x=new Map;for(let W of z){let q=K[W.name];if(q==="input"){let R=b.string().describe(`The ":${W.name}" segment of the url.`);O[W.name]=W.modifier==="?"||W.modifier==="*"?R.optional():R}else x.set(W.name,q)}for(let W of _)if(W.binder==="input")O[W.name]=b.string().describe("The id of an attachment the user uploaded or a tool produced (gemi_att_\u2026), whose file is sent as this field.");let L=[...Object.keys(O),..._.map((W)=>W.name)];for(let W of new Set(L))if(B.includes(W))throw Error(`${H}: "${W}" is both an input field and a param or file, and the model can only send one.`);return{descriptor:Object.freeze({name:Z,description:X.description,method:G,url:V,inputSchema:$3(X.input,J,b.object(O)),annotations:Z3(G),tags:Object.freeze([...X.tags??[]]),requiresApproval:X.requiresApproval===!0,...Y.source?{source:Y.source}:{}}),params:z,paramBinders:x,fileFields:_,jsonKeys:B}}async fillPath(Z,$,H){let G=Z.descriptor.url;for(let V of Z.params){let X=Z.paramBinders.get(V.name),Y;if(X){if(Y=await this.bind(Z,`the param "${V.name}"`,()=>X(H)),Y===void 0||Y===null||Y==="")throw console.error(`[gemi/mcp] The binder for "${V.name}" of "${Z.descriptor.name}" returned ${JSON.stringify(Y)}.`),new P(`"${Z.descriptor.name}" failed on the server.`,500)}else Y=$[V.name];let z=`:${V.name}${V.modifier}`;if(Y===void 0||Y===null||Y===""){if(V.modifier!=="?"&&V.modifier!=="*")throw new P(`"${V.name}" of "${Z.descriptor.name}" must not be empty.`);G=G.replace(`/${z}`,"");continue}G=G.replace(z,H3(Z.descriptor.name,V,String(Y)))}return G}async formData(Z,$,H,G){let V=Z.descriptor.name;if(!G)throw Error(`McpRegistry: "${V}" sends a file, which is resolved through the tool context's attachments, and none was passed to execute().`);let X=new FormData;for(let[Y,z]of Object.entries(H))FZ(X,Y,z);for(let Y of Z.fileFields){let z=Y.binder==="input"?$[Y.name]:await this.bind(Z,`the file "${Y.name}"`,()=>Y.binder(G));if(typeof z!=="string"||z==="")throw new P(`"${V}" needs a file for "${Y.name}", and this turn has none. Ask the user to attach one.`);X.append(Y.name,await G.attachments.file(z))}return X}async bind(Z,$,H){try{return await H()}catch(G){throw console.error(`[gemi/mcp] Binding ${$} of "${Z.descriptor.name}" failed:`,G),new P(`"${Z.descriptor.name}" failed on the server.`,500)}}}function AZ(Z){if(Z?.kind!=="local")throw Error("McpRegistry: only local callers are implemented. A remote caller needs a bearer-token resolver, which v1 does not have \u2014 and until it does there is no remote surface to call from.")}function QZ(Z,$,H){if(H!=="input"&&typeof H!=="function")throw Error(`${Z}: ${$} must be a function or "input".`)}function Z3(Z){switch(Z){case"GET":return Object.freeze({readOnlyHint:!0});case"DELETE":return Object.freeze({destructiveHint:!0});case"PUT":return Object.freeze({idempotentHint:!0});default:return Object.freeze({})}}function $3(Z,$,H){let G=H.toJSONSchema(),V={...$??{},type:"object",properties:{...$?.properties??{},...G.properties},required:[...$?.required??[],...G.required??[]],additionalProperties:!1},X=(Y)=>{if(typeof Y!=="object"||Y===null||Array.isArray(Y))return{ok:!1,errors:["expected an object"]};let z=[],K={};if(Z){let J=Z.safeParse(Y);if(J.ok===!1)z.push(...J.errors);else K={...J.value}}let B=H.safeParse(Y);if(B.ok===!1)z.push(...B.errors);else K={...K,...B.value};return z.length>0?{ok:!1,errors:z}:{ok:!0,value:K}};return{toJSONSchema:()=>V,safeParse:X,parse(Y){let z=X(Y);if(z.ok===!1)throw Error(z.errors.join(", "));return z.value}}}function H3(Z,$,H){let G=$.modifier==="*"||$.modifier==="+"?H.split("/"):[H];if(G.some((V)=>V==="."||V===".."))throw new P(`"${H}" is not a valid value for "${$.name}" of "${Z}".`);return G.map(encodeURIComponent).join("/")}function FZ(Z,$,H){if(H===void 0||H===null)return;if(Array.isArray(H)){for(let G of H)FZ(Z,$,G);return}Z.append($,typeof H==="object"?JSON.stringify(H):String(H))}function G3(Z){let $=new URLSearchParams,H=(G,V)=>{if(V===void 0||V===null)return;if(Array.isArray(V)){for(let X of V)H(G,X);return}$.append(G,typeof V==="object"?JSON.stringify(V):String(V))};for(let[G,V]of Object.entries(Z))H(G,V);return $.toString()}async function V3(Z,$){if($.status>=200&&$.status<300){let G=$.headers.get("Content-Type");if(G&&!eZ.test(G)){let X=(await $.arrayBuffer()).byteLength;return`"${Z}" answered with ${X} bytes of ${G}, which is not shown.`}let V=await $.text();if(V==="")return null;if(V.length>t)return`${V.slice(0,t)}\u2026 [cut at ${t} of ${V.length} characters]`;try{return JSON.parse(V)}catch{return V}}let H=await $.text();if($.status>=400&&$.status<500){let G=H.length>LZ?`${H.slice(0,LZ)}\u2026`:H;throw new P(`"${Z}" was refused with ${$.status}${G?`: ${G}`:"."}`,$.status)}if($.status<500)console.error(`[gemi/mcp] "${Z}" answered ${$.status}${$.headers.get("Location")?` to ${$.headers.get("Location")}`:""}, which a tool call cannot follow.`);throw new P(`"${Z}" failed on the server.`,$.status)}function g(Z,$){let H=Z.get($);if(!H)throw Error(`Missing "${$}" configuration. Route dispatching needs a root router \u2014 declare it in "app/config/route.ts".`);return H}class X3 extends I{register(){this.app.singleton(F,()=>new F(g(this.app.config,"route.api"))),this.app.singleton(S,()=>new S(g(this.app.config,"route.view"))),this.app.singleton(v,()=>new v({api:this.app.make(F),view:this.app.make(S)},{api:g(this.app.config,"route.api"),view:g(this.app.config,"route.view"),domains:this.app.config.get("route.domains")})),this.app.singleton(T,()=>{let Z=this.app.config.get("route.mcp");if(!Z?.router)throw Error('No MCP router is configured. Declare one as `mcp: { router }` in "app/config/route.ts".');return new T(new Z.router,this.app.make(F))})}boot(){if(this.app.make(F),this.app.make(S),this.app.make(v),this.app.config.get("route.mcp"))this.app.make(T)}}
3
- export{A as Za,RZ as _a,C3 as $a,kZ as ab,bZ as bb,N as cb,j3 as db,KZ as eb,gZ as fb,vZ as gb,Q as hb,cZ as ib,pZ as jb,uZ as kb,dZ as lb,_4 as mb,BZ as nb,lZ as ob,sZ as pb,PZ as qb,_Z as rb,s as sb,n as tb,f4 as ub,OZ as vb,oZ as wb,c4 as xb,qZ as yb,tZ as zb,P as Ab,T as Bb,X3 as Cb};
4
-
5
- //# debugId=E097EB1EB8B765D664756E2164756E21
@@ -1,24 +0,0 @@
1
- // @bun
2
- import{i as N,j as r}from"./chunk-08qvtx8v.js";import{ka as P,oa as C,pa as s}from"./chunk-zq5m4scz.js";import"./chunk-8z37k28d.js";import{mc as c,od as l,pd as b}from"./chunk-z61sdvb0.js";import"./chunk-f32t2eny.js";import"./chunk-165mrqab.js";import{Pe as f,Qe as u,Te as m}from"./chunk-hp96c8hp.js";import{vf as n}from"./chunk-w8cf1kqd.js";import"./chunk-r8ak7k9b.js";import"./chunk-brd6tb1s.js";import"./chunk-v36ey99b.js";import"./chunk-41mz2fs2.js";import"./chunk-m0kbpywd.js";import"./chunk-ma2zdn5s.js";import"./chunk-q9g7g995.js";import"./chunk-tx51rqct.js";import"./chunk-3epp751c.js";import{Hg as t}from"./chunk-zgy7jtcq.js";import{Ig as A}from"./chunk-4mynkrv4.js";import"./chunk-3bjj31n9.js";import{join as F,resolve as qJ,sep as yJ}from"path";import{Duplex as HJ}from"stream";import{constants as L,createBrotliCompress as KJ,createGzip as OJ}from"zlib";var YJ=["br","gzip"],xJ=1024,UJ=5,VJ=19,CJ=6;function IJ($){if($===void 0)return 1;if(!/^\d+(\.\d{0,3})?$/.test($.trim()))return 1;let J=Number($.trim());return Number.isFinite(J)?Math.min(J,1):1}function LJ($){if($===null||$===void 0)return null;let J=new Map;for(let X of $.split(",")){let[Z,...G]=X.split(";"),W=Z.trim().toLowerCase();if(W==="")continue;let Q=1;for(let j of G){let Y=j.indexOf("=");if(Y===-1)continue;if(j.slice(0,Y).trim().toLowerCase()==="q"){Q=IJ(j.slice(Y+1));break}}J.set(W,Q)}return J}function SJ($,J=YJ){let X=LJ($);if(!X)return null;let Z=X.get("*"),G=null,W=0;for(let Q of J){let j=X.get(Q)??Z??0;if(j>W)G=Q,W=j}return G}function bJ($,J){if(!$)return!1;return $.split(",").some((X)=>X.trim().toLowerCase().split("=")[0].trim()===J)}function AJ($,J){if($==="HEAD")return!1;if(!J.body)return!1;if(J.status<200||J.status===204||J.status===206||J.status===304)return!1;if(J.headers.has("Content-Range"))return!1;let X=J.headers.get("Content-Type");if(!X||!/^\s*text\/html\s*(;|$)/i.test(X))return!1;let Z=J.headers.get("Content-Encoding");if(Z&&Z.trim().toLowerCase()!=="identity")return!1;if(bJ(J.headers.get("Cache-Control"),"no-transform"))return!1;let G=J.headers.get("Content-Length");if(G!==null&&Number(G)<xJ)return!1;return!0}function MJ($){let J=$==="br"?KJ({params:{[L.BROTLI_PARAM_QUALITY]:UJ,[L.BROTLI_PARAM_LGWIN]:VJ},flush:L.BROTLI_OPERATION_FLUSH}):OJ({level:CJ,flush:L.Z_SYNC_FLUSH});return HJ.toWeb(J)}function _J($){let J=$.get("Vary");if(!J){$.set("Vary","Accept-Encoding");return}let X=J.split(",").map((Z)=>Z.trim().toLowerCase());if(X.includes("*")||X.includes("accept-encoding"))return;$.append("Vary","Accept-Encoding")}function v($,J){if(!AJ($.method,J))return J;let X=new Headers(J.headers);_J(X);let Z=SJ($.headers.get("Accept-Encoding"));if(!Z)return new Response(J.body,{status:J.status,statusText:J.statusText,headers:X});let G;try{G=MJ(Z)}catch{return new Response(J.body,{status:J.status,statusText:J.statusText,headers:X})}return X.set("Content-Encoding",Z),X.delete("Content-Length"),new Response(J.body.pipeThrough(G),{status:J.status,statusText:J.statusText,headers:X})}import{readdir as PJ,stat as TJ}from"fs/promises";import{join as DJ}from"path";function E($){let J=$.toString(),X=new Bun.CryptoHasher("sha1");return X.update(J),X.digest("hex")}async function h($){let J=new Set;async function X(Z,G){let W;try{W=await PJ(Z,{withFileTypes:!0})}catch{return}for(let Q of W){if(Q.name.startsWith("."))continue;if(G&&Q.name==="assets")continue;let j=DJ(Z,Q.name),Y=Q.isDirectory(),V=Q.isFile();if(Q.isSymbolicLink())try{let I=await TJ(j);Y=I.isDirectory(),V=I.isFile()}catch{continue}if(V)J.add(j);else if(Y&&!Q.isSymbolicLink())await X(j,!1)}}return await X($,!0),J}var NJ="public, max-age=31536000, must-revalidate";function p($,J){let X=Bun.file(J),Z=X.size,G=E(X.lastModified),W={"Content-Type":X.type||"application/octet-stream","Cache-Control":NJ,"Accept-Ranges":"bytes",ETag:G},Q=f($.headers.get("Range"));if(Q){let j=u(Q,Z);if(!j)return c(Z);return new Response(X.slice(j.start,j.end+1).stream(),{status:206,headers:{...W,"Content-Range":m(j.start,j.end,Z),"Content-Length":String(j.length)}})}return new Response(X.stream(),{headers:{...W,"Content-Length":String(Z)}})}import{stat as wJ}from"fs/promises";var S="app/client.tsx";function d($,J=P){let X=$[S]?.file;if(!X)return;return{module:C(X,J),preload:T($,S,J)}}function T($,J,X=P){let Z=[],G=new Set,W=(Q)=>{if(G.has(Q))return;G.add(Q);let j=$[Q];if(!j?.file)return;Z.push(C(j.file,X));for(let Y of j.imports??[])W(Y)};return W(J),Z}var BJ=new RegExp(`^${l}/.+\\.m?js$`);function FJ($){return BJ.test($)}function o($){if(FJ($))return new Response("window.location.reload();export {}",{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store"}});if(b($))return new Response("Not found",{status:404});return}var kJ=`<!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="UTF-8" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>Internal Server Error</title>
8
- <style>
9
- body { font-family: system-ui, sans-serif; margin: 0; min-height: 100vh; display: grid; place-items: center; }
10
- main { text-align: center; padding: 16px; }
11
- h1 { font-size: 1.5rem; margin: 0 0 0.5rem; }
12
- p { margin: 0; opacity: 0.7; }
13
- </style>
14
- </head>
15
- <body>
16
- <main>
17
- <h1>Something went wrong</h1>
18
- <p>Please try again later.</p>
19
- </main>
20
- </body>
21
- </html>`;function D($,J,X){if(!X)console.error($);else try{X($ instanceof Error?$:Error(String($),{cause:$}))}catch(Z){console.error($),console.error(Z)}if(A(J))return new Response(JSON.stringify({error:n("server_error","Internal Server Error",500)}),{status:500,headers:{"Content-Type":"application/json"}});return new Response(kJ,{status:500,headers:{"Content-Type":"text/html; charset=utf-8"}})}var RJ={kind:"none"};function i($){let J=($??"").trim().toLowerCase();if(J===""||J==="false"||J==="off"||J==="0")return RJ;if(J==="true")return{kind:"all"};if(/^[1-9]\d*$/.test(J))return{kind:"hops",hops:Number(J)};throw Error(`GEMI_TRUST_PROXY must be "false", "true" or the number of proxies in front of the app (e.g. 1). Got ${JSON.stringify($)}.`)}function a($,J,X){if(X.kind==="all"){if(!$.get("x-forwarded-for")&&J)$.set("x-forwarded-for",J);return}$.delete("x-real-ip");let Z=J;if(X.kind==="hops"){let G=($.get("x-forwarded-for")??"").split(",").map((Q)=>Q.trim()).filter(Boolean),W=G.length-X.hops;Z=W>=0?G[W]:G[0]??J}if(Z)$.set("x-forwarded-for",Z);else $.delete("x-forwarded-for")}var M=t(),gJ=F(M,"app"),U=F(M,"dist"),B=F(U,"client");function vJ($){let J;try{J=decodeURIComponent($)}catch{return null}let X=qJ(B,"."+J.replace("/assets/assets","/assets"));return X.startsWith(B+yJ)?X:null}async function EJ($){try{return(await wJ($)).isFile()}catch{return!1}}async function V3($,J){let X=await import(`${U}/client/.vite/manifest.json`),Z=await import(`${U}/server/.vite/manifest.json`),G=await s(`${U}/client`);process.env.ROOT_DIR=M,process.env.APP_DIR=gJ,process.env.DIST_DIR=U;let W={},Q={},j={},Y={},V={},I=(z,H)=>`"${z}": () => import("${H}")`,k=[];for(let z of["404",...$.getFlatComponentTree.call($)]){let H=Z[`app/views/${z}.tsx`];if(!H?.file){console.log(`Server file not found for ${z}`),console.log(H);let x=Object.keys(Z),y=`app/views/${z}.tsx`;console.log(`${y} not found in server manifest`),console.log(x)}let O=await import(`${process.env.DIST_DIR}/server/${H?.file}`);W[z]=O.default,Q[z]=O.OpenGraph,j[z]=O;let K=X[`app/views/${z}.tsx`];if(K?.css&&K?.css.length>0)Y[z]=K?.css;if(K)k.push(I(z,C(K?.file,G))),V[z]=T(X,`app/views/${z}.tsx`,G)}let e=`{${k.join(",")}}`,R=d(X,G);if(!R)console.error(`Client manifest has no "${S}" entry \u2014 dist/client is incomplete, so documents will render but never hydrate.`);let JJ=X["app/client.tsx"]?.css??[],$J=(await Promise.all(JJ.map((z)=>Bun.file(`${U}/client/${z}`).text()))).join(`
22
- `),XJ=await h(B);async function ZJ(z){let{pathname:H}=new URL(z.url);if(A(H))return await _(z,H);let O=vJ(H);if(b(H)||H.startsWith("/.well-known")||O!==null&&XJ.has(O)){if(!O||!await EJ(O))return o(H)??await _(z,H);try{return p(z,O)}catch(x){return $.onException?.(x),new Response("Not found",{status:404})}}return await _(z,H)}async function _(z,H){let O=$.fetch.bind($);try{let K=await O(z);if(K instanceof Response)return K;else{let x=[];return x.push({content:$J}),await K({getStyles:async(w)=>{if(!w)return N([]);for(let QJ of w){let jJ=X[`app/views/${QJ}.tsx`];for(let g of jJ?.css??[]){let WJ=Bun.file(`${process.env.DIST_DIR}/client/${g}`);x.push({id:g,content:await WJ.text()})}}return N(x)},clientEntry:R,modulePreloadManifest:V,loaders:e,viewImportMap:W,viewModules:j,ogMap:Q,cssManifest:Y,assetBase:G})}}catch(K){return D(K,H,$.onException)}}let zJ=(process.env.GEMI_COMPRESSION??"auto").toLowerCase()!=="off",GJ=i(process.env.GEMI_TRUST_PROXY),q=Bun.serve({maxRequestBodySize:10737418240,fetch:async(z,H)=>{a(z.headers,H.requestIP(z)?.address??null,GJ);let O=await J(z,(K)=>$.withGlobalMiddleware(K,ZJ,(x)=>D(x,new URL(K.url).pathname,$.onException)));return zJ?v(z,O):O},idleTimeout:Number(process.env.SERVER_IDLE_TIMEOUT??10),port:process.env.PORT||5173});return r({port:q.port,rootDir:M}),q}export{V3 as httpProd};
23
-
24
- //# debugId=B0F6859F83A952A864756E2164756E21
@@ -1,5 +0,0 @@
1
- // @bun
2
- import{jc as o}from"./chunk-x02whwn3.js";import{kc as i}from"./chunk-vemwqxx2.js";import{kg as t}from"./chunk-m0kbpywd.js";import{rg as r}from"./chunk-ma2zdn5s.js";class n extends i{register(){this.app.singleton(r,()=>new r(t(o(),this.app.config.get("translation",{}))))}}
3
- export{n as Wa};
4
-
5
- //# debugId=0B1F8E310934FD5E64756E2164756E21