gemi 0.238.0 → 0.240.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 (216) hide show
  1. package/dist/ai/Agent.d.ts +3 -3
  2. package/dist/ai/Agent.d.ts.map +1 -1
  3. package/dist/ai/client/conformance.d.ts.map +1 -1
  4. package/dist/ai/client/index.js +88 -40
  5. package/dist/ai/client/index.js.map +1 -1
  6. package/dist/ai/client/reducer.d.ts +6 -6
  7. package/dist/ai/client/reducer.d.ts.map +1 -1
  8. package/dist/ai/index.js +12 -12
  9. package/dist/ai/index.js.map +3 -3
  10. package/dist/ai/providers/anthropicRequest.d.ts +2 -1
  11. package/dist/ai/providers/anthropicRequest.d.ts.map +1 -1
  12. package/dist/ai/providers/request.d.ts +11 -0
  13. package/dist/ai/providers/request.d.ts.map +1 -1
  14. package/dist/ai/testing/index.js +1 -1
  15. package/dist/ai/useChat.d.ts.map +1 -1
  16. package/dist/app/index.js +1 -1
  17. package/dist/bun/plugin.js +1 -1
  18. package/dist/bun/preload.js +1 -1
  19. package/dist/{chunk-psdcmh65.js → chunk-0wa8ztk5.js} +8 -8
  20. package/dist/{chunk-psdcmh65.js.map → chunk-0wa8ztk5.js.map} +3 -3
  21. package/dist/{chunk-34a5b9xt.js → chunk-13eq76tw.js} +2 -2
  22. package/dist/{chunk-34a5b9xt.js.map → chunk-13eq76tw.js.map} +1 -1
  23. package/dist/{chunk-hk37x8mp.js → chunk-1kjyhseb.js} +1 -1
  24. package/dist/{chunk-s3fpkpdh.js → chunk-1wfwqgm5.js} +2 -2
  25. package/dist/{chunk-s3fpkpdh.js.map → chunk-1wfwqgm5.js.map} +1 -1
  26. package/dist/{chunk-8kp4rkd3.js → chunk-342ydn4n.js} +2 -2
  27. package/dist/{chunk-8kp4rkd3.js.map → chunk-342ydn4n.js.map} +1 -1
  28. package/dist/{chunk-ajyfp09w.js → chunk-387fpg2k.js} +2 -2
  29. package/dist/{chunk-ajyfp09w.js.map → chunk-387fpg2k.js.map} +1 -1
  30. package/dist/{chunk-xe76d4v6.js → chunk-3ady4k66.js} +2 -2
  31. package/dist/{chunk-4rs6w1gp.js.map → chunk-3ady4k66.js.map} +1 -1
  32. package/dist/{chunk-97t5t8jp.js → chunk-3crknzwp.js} +3 -3
  33. package/dist/{chunk-97t5t8jp.js.map → chunk-3crknzwp.js.map} +1 -1
  34. package/dist/{chunk-gbgwtaqq.js → chunk-3kgp6xka.js} +1 -1
  35. package/dist/{chunk-wj0q7tyn.js → chunk-3mq0wmq7.js} +3 -3
  36. package/dist/{chunk-wj0q7tyn.js.map → chunk-3mq0wmq7.js.map} +1 -1
  37. package/dist/{chunk-mhvg8nnb.js → chunk-3qmhe96e.js} +2 -2
  38. package/dist/{chunk-mhvg8nnb.js.map → chunk-3qmhe96e.js.map} +1 -1
  39. package/dist/{chunk-xm0fb17q.js → chunk-3rm4v7ht.js} +3 -3
  40. package/dist/{chunk-xm0fb17q.js.map → chunk-3rm4v7ht.js.map} +1 -1
  41. package/dist/{chunk-358krc4n.js → chunk-4mysb5ej.js} +2 -2
  42. package/dist/{chunk-358krc4n.js.map → chunk-4mysb5ej.js.map} +1 -1
  43. package/dist/{chunk-8adbpxpm.js → chunk-4sv5vkab.js} +2 -2
  44. package/dist/{chunk-8adbpxpm.js.map → chunk-4sv5vkab.js.map} +1 -1
  45. package/dist/{chunk-prvncxxf.js → chunk-4wj4bwvc.js} +3 -3
  46. package/dist/{chunk-prvncxxf.js.map → chunk-4wj4bwvc.js.map} +1 -1
  47. package/dist/{chunk-5na9khtz.js → chunk-51mz612v.js} +2 -2
  48. package/dist/{chunk-5na9khtz.js.map → chunk-51mz612v.js.map} +1 -1
  49. package/dist/{chunk-41bpne77.js → chunk-58xb0s71.js} +27 -27
  50. package/dist/{chunk-41bpne77.js.map → chunk-58xb0s71.js.map} +3 -3
  51. package/dist/{chunk-wt80ekv9.js → chunk-6gek696n.js} +92 -92
  52. package/dist/{chunk-wt80ekv9.js.map → chunk-6gek696n.js.map} +4 -4
  53. package/dist/{chunk-wgjbd4vm.js → chunk-7azdbwdc.js} +2 -2
  54. package/dist/{chunk-wgjbd4vm.js.map → chunk-7azdbwdc.js.map} +1 -1
  55. package/dist/{chunk-dh1wbntq.js → chunk-7fh7cfjh.js} +2 -2
  56. package/dist/{chunk-dh1wbntq.js.map → chunk-7fh7cfjh.js.map} +1 -1
  57. package/dist/{chunk-ea5fv4h9.js → chunk-7sxbq483.js} +2 -2
  58. package/dist/{chunk-ea5fv4h9.js.map → chunk-7sxbq483.js.map} +1 -1
  59. package/dist/{chunk-4wdc4q33.js → chunk-7ycjs0xn.js} +2 -2
  60. package/dist/{chunk-4wdc4q33.js.map → chunk-7ycjs0xn.js.map} +1 -1
  61. package/dist/{chunk-ygfwbh8p.js → chunk-8e14zcdc.js} +2 -2
  62. package/dist/{chunk-ygfwbh8p.js.map → chunk-8e14zcdc.js.map} +1 -1
  63. package/dist/{chunk-szyr67g7.js → chunk-8wvh099n.js} +2 -2
  64. package/dist/{chunk-szyr67g7.js.map → chunk-8wvh099n.js.map} +1 -1
  65. package/dist/{chunk-pe4f30nw.js → chunk-9fgyanab.js} +2 -2
  66. package/dist/{chunk-pe4f30nw.js.map → chunk-9fgyanab.js.map} +1 -1
  67. package/dist/{chunk-wskms8nf.js → chunk-a8q7ds6w.js} +1 -1
  68. package/dist/chunk-aczp96k5.js +13 -0
  69. package/dist/chunk-aczp96k5.js.map +16 -0
  70. package/dist/{chunk-7qhqqf0q.js → chunk-agpty0p6.js} +2 -2
  71. package/dist/{chunk-7qhqqf0q.js.map → chunk-agpty0p6.js.map} +1 -1
  72. package/dist/{chunk-nxap8bmy.js → chunk-bvgcv0jx.js} +2 -2
  73. package/dist/{chunk-nxap8bmy.js.map → chunk-bvgcv0jx.js.map} +1 -1
  74. package/dist/chunk-by0ydsqs.js +5 -0
  75. package/dist/{chunk-cwkf46bk.js.map → chunk-by0ydsqs.js.map} +1 -1
  76. package/dist/{chunk-4rs6w1gp.js → chunk-c7hbdsjv.js} +2 -2
  77. package/dist/{chunk-xe76d4v6.js.map → chunk-c7hbdsjv.js.map} +1 -1
  78. package/dist/chunk-ccymw1ed.js +9 -0
  79. package/dist/chunk-ccymw1ed.js.map +10 -0
  80. package/dist/{chunk-9wf36729.js → chunk-cjwjrk12.js} +1 -1
  81. package/dist/{chunk-ca1qwsjj.js → chunk-e4adgvd6.js} +2 -2
  82. package/dist/{chunk-ca1qwsjj.js.map → chunk-e4adgvd6.js.map} +1 -1
  83. package/dist/{chunk-xr8mcx1y.js → chunk-etj63p4p.js} +2 -2
  84. package/dist/{chunk-xr8mcx1y.js.map → chunk-etj63p4p.js.map} +1 -1
  85. package/dist/{chunk-engdyem1.js → chunk-fec4qnr3.js} +2 -2
  86. package/dist/{chunk-engdyem1.js.map → chunk-fec4qnr3.js.map} +1 -1
  87. package/dist/{chunk-2fw9pm64.js → chunk-feh44g4f.js} +2 -2
  88. package/dist/{chunk-2fw9pm64.js.map → chunk-feh44g4f.js.map} +1 -1
  89. package/dist/{chunk-kgpqz8te.js → chunk-ff8rtz9h.js} +2 -2
  90. package/dist/{chunk-kgpqz8te.js.map → chunk-ff8rtz9h.js.map} +1 -1
  91. package/dist/{chunk-bxby9c62.js → chunk-g9q39z7t.js} +2 -2
  92. package/dist/{chunk-bxby9c62.js.map → chunk-g9q39z7t.js.map} +1 -1
  93. package/dist/{chunk-wccb6v3p.js → chunk-gjpwvet7.js} +2 -2
  94. package/dist/{chunk-wccb6v3p.js.map → chunk-gjpwvet7.js.map} +1 -1
  95. package/dist/chunk-gpngw61t.js +12 -0
  96. package/dist/{chunk-zz0k1na4.js.map → chunk-gpngw61t.js.map} +4 -4
  97. package/dist/{chunk-692nx054.js → chunk-gs8fvb6a.js} +2 -2
  98. package/dist/{chunk-692nx054.js.map → chunk-gs8fvb6a.js.map} +1 -1
  99. package/dist/{chunk-ycwv9n7m.js → chunk-gxre6wnc.js} +1 -1
  100. package/dist/{chunk-pb7n7vaq.js → chunk-gykwq8py.js} +1 -1
  101. package/dist/{chunk-h2cvg5r5.js → chunk-j3zz8046.js} +2 -2
  102. package/dist/{chunk-h2cvg5r5.js.map → chunk-j3zz8046.js.map} +1 -1
  103. package/dist/{chunk-y73xy0zy.js → chunk-kabkxq5q.js} +2 -2
  104. package/dist/{chunk-y73xy0zy.js.map → chunk-kabkxq5q.js.map} +1 -1
  105. package/dist/{chunk-dt8bxq4c.js → chunk-kgbgj7v4.js} +2 -2
  106. package/dist/{chunk-dt8bxq4c.js.map → chunk-kgbgj7v4.js.map} +1 -1
  107. package/dist/{chunk-1etmnz40.js → chunk-p0dgpm5r.js} +2 -2
  108. package/dist/{chunk-1etmnz40.js.map → chunk-p0dgpm5r.js.map} +1 -1
  109. package/dist/{chunk-y89vn9da.js → chunk-q8pr18w6.js} +4 -4
  110. package/dist/{chunk-y89vn9da.js.map → chunk-q8pr18w6.js.map} +1 -1
  111. package/dist/{chunk-d2jafhaf.js → chunk-qb8pjdez.js} +4 -4
  112. package/dist/{chunk-d2jafhaf.js.map → chunk-qb8pjdez.js.map} +1 -1
  113. package/dist/{chunk-hgwtg5zp.js → chunk-qkfd84hx.js} +2 -2
  114. package/dist/{chunk-hgwtg5zp.js.map → chunk-qkfd84hx.js.map} +1 -1
  115. package/dist/{chunk-mykr2v6g.js → chunk-rc86ewq1.js} +3 -3
  116. package/dist/{chunk-mykr2v6g.js.map → chunk-rc86ewq1.js.map} +1 -1
  117. package/dist/{chunk-88c8ck33.js → chunk-re13gf4s.js} +3 -3
  118. package/dist/{chunk-88c8ck33.js.map → chunk-re13gf4s.js.map} +1 -1
  119. package/dist/{chunk-dnqmvmnp.js → chunk-rftxm3ny.js} +2 -2
  120. package/dist/{chunk-dnqmvmnp.js.map → chunk-rftxm3ny.js.map} +1 -1
  121. package/dist/{chunk-80kga3p1.js → chunk-rpwvwsq9.js} +1 -1
  122. package/dist/{chunk-9779ngzq.js → chunk-rreb2k19.js} +2 -2
  123. package/dist/{chunk-9779ngzq.js.map → chunk-rreb2k19.js.map} +1 -1
  124. package/dist/{chunk-7ytazpjd.js → chunk-samm4h7d.js} +1 -1
  125. package/dist/{chunk-vf9jtq9h.js → chunk-t495wyhh.js} +2 -2
  126. package/dist/{chunk-vf9jtq9h.js.map → chunk-t495wyhh.js.map} +1 -1
  127. package/dist/{chunk-f0bz1q3t.js → chunk-tvb68dqg.js} +1 -1
  128. package/dist/{chunk-4pjv77s5.js → chunk-vk1x3rsw.js} +2 -2
  129. package/dist/{chunk-4pjv77s5.js.map → chunk-vk1x3rsw.js.map} +1 -1
  130. package/dist/{chunk-mn5xxg4q.js → chunk-vq1q8mgm.js} +2 -2
  131. package/dist/{chunk-mn5xxg4q.js.map → chunk-vq1q8mgm.js.map} +1 -1
  132. package/dist/{chunk-49kkapvr.js → chunk-vqmy8jfr.js} +2 -2
  133. package/dist/{chunk-49kkapvr.js.map → chunk-vqmy8jfr.js.map} +1 -1
  134. package/dist/{chunk-wzng3k56.js → chunk-vvq18rrr.js} +2 -2
  135. package/dist/{chunk-wzng3k56.js.map → chunk-vvq18rrr.js.map} +1 -1
  136. package/dist/{chunk-wh451qrp.js → chunk-wefcda84.js} +2 -2
  137. package/dist/{chunk-wh451qrp.js.map → chunk-wefcda84.js.map} +1 -1
  138. package/dist/{chunk-vtf7tkef.js → chunk-wgb26e02.js} +2 -2
  139. package/dist/{chunk-vtf7tkef.js.map → chunk-wgb26e02.js.map} +1 -1
  140. package/dist/{chunk-g7exgg3k.js → chunk-wjjxqw9b.js} +2 -2
  141. package/dist/{chunk-g7exgg3k.js.map → chunk-wjjxqw9b.js.map} +1 -1
  142. package/dist/{chunk-q1grt110.js → chunk-wkw8afk0.js} +2 -2
  143. package/dist/{chunk-q1grt110.js.map → chunk-wkw8afk0.js.map} +1 -1
  144. package/dist/{chunk-kbz5s9wb.js → chunk-x68jra5n.js} +2 -2
  145. package/dist/{chunk-kbz5s9wb.js.map → chunk-x68jra5n.js.map} +1 -1
  146. package/dist/{chunk-p7ae0rnf.js → chunk-z0jf5kzx.js} +2 -2
  147. package/dist/{chunk-p7ae0rnf.js.map → chunk-z0jf5kzx.js.map} +1 -1
  148. package/dist/{chunk-cckfxk08.js → chunk-z6gwn4xf.js} +2 -2
  149. package/dist/{chunk-cckfxk08.js.map → chunk-z6gwn4xf.js.map} +1 -1
  150. package/dist/{chunk-j5r7vm8a.js → chunk-zsmwmg8x.js} +2 -2
  151. package/dist/{chunk-j5r7vm8a.js.map → chunk-zsmwmg8x.js.map} +1 -1
  152. package/dist/config/index.js +1 -1
  153. package/dist/console/run.js +2 -2
  154. package/dist/console/run.js.map +1 -1
  155. package/dist/container/index.js +2 -2
  156. package/dist/container/index.js.map +1 -1
  157. package/dist/database/Connection.d.ts +7 -0
  158. package/dist/database/Connection.d.ts.map +1 -1
  159. package/dist/database/config.d.ts +16 -0
  160. package/dist/database/config.d.ts.map +1 -1
  161. package/dist/database/index.js +2 -2
  162. package/dist/database/index.js.map +1 -1
  163. package/dist/database/sqliteClient.d.ts +42 -0
  164. package/dist/database/sqliteClient.d.ts.map +1 -0
  165. package/dist/database/sqliteQueue.d.ts +67 -0
  166. package/dist/database/sqliteQueue.d.ts.map +1 -0
  167. package/dist/email/index.js +2 -2
  168. package/dist/email/index.js.map +1 -1
  169. package/dist/facades/index.js +1 -1
  170. package/dist/foundation/index.js +2 -2
  171. package/dist/foundation/index.js.map +1 -1
  172. package/dist/http/index.js +1 -1
  173. package/dist/i18n/dictionaryRuntime.js +2 -2
  174. package/dist/i18n/dictionaryRuntime.js.map +1 -1
  175. package/dist/i18n/index.js +2 -2
  176. package/dist/i18n/index.js.map +1 -1
  177. package/dist/kernel/index.js +2 -2
  178. package/dist/kernel/index.js.map +1 -1
  179. package/dist/orm/context.d.ts +3 -61
  180. package/dist/orm/context.d.ts.map +1 -1
  181. package/dist/orm/index.js +2 -2
  182. package/dist/orm/index.js.map +1 -1
  183. package/dist/probe/index.js +2 -2
  184. package/dist/probe/index.js.map +1 -1
  185. package/dist/server/index.js +2 -2
  186. package/dist/server/index.js.map +1 -1
  187. package/dist/services/change-feed/DatabaseChangeFeedDriver.d.ts +0 -1
  188. package/dist/services/change-feed/DatabaseChangeFeedDriver.d.ts.map +1 -1
  189. package/dist/services/index.js +2 -2
  190. package/dist/services/index.js.map +1 -1
  191. package/dist/services/lock/DatabaseLockStore.d.ts +6 -1
  192. package/dist/services/lock/DatabaseLockStore.d.ts.map +1 -1
  193. package/dist/services/queue/DatabaseQueueDriver.d.ts +6 -1
  194. package/dist/services/queue/DatabaseQueueDriver.d.ts.map +1 -1
  195. package/dist/services/queue/work.js +2 -2
  196. package/dist/services/queue/work.js.map +1 -1
  197. package/dist/stats/route-table.js +1 -1
  198. package/dist/support/index.js +2 -2
  199. package/dist/support/index.js.map +1 -1
  200. package/dist/vitest/index.js +1 -1
  201. package/package.json +1 -1
  202. package/dist/chunk-2as2xfem.js +0 -5
  203. package/dist/chunk-2as2xfem.js.map +0 -14
  204. package/dist/chunk-cwkf46bk.js +0 -5
  205. package/dist/chunk-mxqrmjha.js +0 -13
  206. package/dist/chunk-mxqrmjha.js.map +0 -10
  207. package/dist/chunk-zz0k1na4.js +0 -12
  208. /package/dist/{chunk-hk37x8mp.js.map → chunk-1kjyhseb.js.map} +0 -0
  209. /package/dist/{chunk-gbgwtaqq.js.map → chunk-3kgp6xka.js.map} +0 -0
  210. /package/dist/{chunk-wskms8nf.js.map → chunk-a8q7ds6w.js.map} +0 -0
  211. /package/dist/{chunk-9wf36729.js.map → chunk-cjwjrk12.js.map} +0 -0
  212. /package/dist/{chunk-ycwv9n7m.js.map → chunk-gxre6wnc.js.map} +0 -0
  213. /package/dist/{chunk-pb7n7vaq.js.map → chunk-gykwq8py.js.map} +0 -0
  214. /package/dist/{chunk-80kga3p1.js.map → chunk-rpwvwsq9.js.map} +0 -0
  215. /package/dist/{chunk-7ytazpjd.js.map → chunk-samm4h7d.js.map} +0 -0
  216. /package/dist/{chunk-f0bz1q3t.js.map → chunk-tvb68dqg.js.map} +0 -0
@@ -13,4 +13,20 @@ export declare function defineDatabaseConfig(config: DatabaseConfig): DatabaseCo
13
13
  export declare function databaseConfigDefaults(): DatabaseConfig;
14
14
  export declare const SLOW_TRANSACTION_THRESHOLD = 2000;
15
15
  export type { SQL };
16
+ /**
17
+ * The warning threshold in milliseconds, or `null` when the warning is off.
18
+ *
19
+ * `configured` is `database.slowTransactionThreshold` — see `DatabaseConfig`.
20
+ * It arrives as a value rather than being read from here so that this file
21
+ * keeps knowing nothing about the container: `withTransaction` is reachable
22
+ * with a bare pool, and its tests use one.
23
+ *
24
+ * Exported for its own tests. The behaviour worth pinning is the fallback —
25
+ * that a malformed threshold lands on the default rather than disabling — and
26
+ * that cannot be observed through `withTransaction`: "no warning fired" is what
27
+ * a disabled warning looks like too, so a behavioural test of it passes just as
28
+ * happily when the fallback is gone. Asserting the number directly is the only
29
+ * form of that test that can fail.
30
+ */
31
+ export declare function slowTransactionThreshold(configured?: number | false): number | null;
16
32
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../database/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASzC,MAAM,WAAW,gBAAgB;IAI/B,GAAG,CAAC,EAAE,MAAM,CAAC;IAOb,OAAO,CAAC,EAAE,OAAO,CAAC;IAIlB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAqBlC,wBAAwB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC3C;AAOD,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IAoCtD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CAChD;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAE3E;AAED,wBAAgB,sBAAsB,IAAI,cAAc,CAQvD;AAMD,eAAO,MAAM,0BAA0B,OAAQ,CAAC;AAEhD,YAAY,EAAE,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../database/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASzC,MAAM,WAAW,gBAAgB;IAI/B,GAAG,CAAC,EAAE,MAAM,CAAC;IAOb,OAAO,CAAC,EAAE,OAAO,CAAC;IAIlB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAqBlC,wBAAwB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC3C;AAOD,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IAoCtD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CAChD;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAE3E;AAED,wBAAgB,sBAAsB,IAAI,cAAc,CAQvD;AAMD,eAAO,MAAM,0BAA0B,OAAQ,CAAC;AAEhD,YAAY,EAAE,GAAG,EAAE,CAAC;AAEpB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,IAAI,CAgBnF"}
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Ta as N}from"../chunk-4wdc4q33.js";import"../chunk-bhycdjcv.js";import"../chunk-c3c37k46.js";import"../chunk-768yza4f.js";import"../chunk-6wv3k8ap.js";import{Il as j,Jl as k,Ll as w,Ml as x,Nl as z,Ol as A,Pl as E,Ql as F,Rl as G,Sl as H,Tl as I,Ul as J,Vl as K,Wl as L}from"../chunk-2as2xfem.js";import"../chunk-4rs6w1gp.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{Ta as N}from"../chunk-7ycjs0xn.js";import"../chunk-bhycdjcv.js";import"../chunk-c3c37k46.js";import"../chunk-768yza4f.js";import"../chunk-6wv3k8ap.js";import{Hl as j,Il as k,Kl as w,Ll as x,Ml as z,Nl as A,Ol as E,Sl as F,Tl as G,Ul as H,Vl as I,Wl as J,Xl as K,Yl as L}from"../chunk-aczp96k5.js";import"../chunk-c7hbdsjv.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=20D7CCF91005895E64756E2164756E21
4
+ //# debugId=FB5568CEFACE994364756E2164756E21
@@ -4,6 +4,6 @@
4
4
  "sourcesContent": [
5
5
  ],
6
6
  "mappings": "",
7
- "debugId": "20D7CCF91005895E64756E2164756E21",
7
+ "debugId": "FB5568CEFACE994364756E2164756E21",
8
8
  "names": []
9
9
  }
@@ -0,0 +1,42 @@
1
+ import type { SQL } from "bun";
2
+ /**
3
+ * A multi-statement string (`unsafe`, `file`) that met the lock of another
4
+ * process. It isn't run again: the statements before the one that met the
5
+ * lock may have committed, and running the whole string twice would repeat
6
+ * them.
7
+ */
8
+ export declare class SqliteBusyError extends Error {
9
+ constructor(cause: unknown);
10
+ }
11
+ /** `SQLITE_BUSY` or one of its extended codes. Never `SQLITE_LOCKED`, which a retry can't fix. */
12
+ export declare function isSqliteBusy(error: unknown): boolean;
13
+ /**
14
+ * Whether a SQL string holds more than one statement: a `;` with more SQL
15
+ * after it. Semicolons inside string literals (`'…'`), quoted identifiers
16
+ * (`"…"`, `` `…` ``, `[…]`) and comments (`-- …` and block comments) don't count, and
17
+ * neither do trailing ones or a trailing comment.
18
+ */
19
+ export declare function isMultiStatement(text: string): boolean;
20
+ /** The pragmas each client gets, in order, before anything else it runs. */
21
+ export declare const SQLITE_FILE_PRAGMAS: string[];
22
+ /** Whether a SQLite client is on a file, which a second connection can open, rather than in memory. */
23
+ export declare function isFileDatabase(client: SQL): boolean;
24
+ /**
25
+ * Whether `sql` waits out `SQLITE_BUSY` itself, in JS (a SQLite file's
26
+ * client, #1375). A store that would otherwise give the connection a
27
+ * `busy_timeout` leaves it at 0 then: SQLite's own wait blocks the event
28
+ * loop, and against this process's own open transaction it can only time out.
29
+ */
30
+ export declare function retriesSqliteBusy(sql: unknown): boolean;
31
+ /**
32
+ * A store's `busyTimeout` option given for a connection that retries in JS,
33
+ * where it is ignored: warned once per process.
34
+ */
35
+ export declare function warnIgnoredBusyTimeout(sql: unknown, busyTimeout: number | undefined): void;
36
+ /**
37
+ * The plain client's stand-in. `plain` runs statements outside transactions,
38
+ * `transactions` runs transactions. The queue is keyed by the stand-in, which
39
+ * is the `sql` everything else holds.
40
+ */
41
+ export declare function plainSqliteClient(plain: SQL, transactions: SQL): SQL;
42
+ //# sourceMappingURL=sqliteClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqliteClient.d.ts","sourceRoot":"","sources":["../../database/sqliteClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAmC/B;;;;;GAKG;AACH,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,KAAK,EAAE,OAAO;CAS3B;AAED,kGAAkG;AAClG,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAGpD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAiCtD;AAED,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,UAI/B,CAAC;AAEF,uGAAuG;AACvG,wBAAgB,cAAc,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAKnD;AAMD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEvD;AAID;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAc1F;AAOD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,GAAG,GAAG,CA2KpE"}
@@ -0,0 +1,67 @@
1
+ import type { SQL } from "bun";
2
+ /**
3
+ * A transaction on a SQLite pool waited, in the queue, for one it is itself
4
+ * inside (#1362). It would wait forever: the open transaction can't commit
5
+ * until this one, which it is waiting on, has run.
6
+ *
7
+ * Thrown, rather than hung, when a transaction that isn't nested through the
8
+ * ORM's scope starts from inside an open one on the same connection, and is
9
+ * still waiting on it 5 seconds later: a raw
10
+ * `sql.begin` (a store's), or code that deliberately left the transaction's
11
+ * ORM scope while still awaited by it (an in-process API call or channel
12
+ * message, `ormContext.exit`). Run that work after the commit
13
+ * (`afterCommit`), or inside the transaction, where it becomes a savepoint.
14
+ */
15
+ export declare class TransactionQueueDeadlockError extends Error {
16
+ /**
17
+ * Where the waiting statement or transaction was issued: an `Error` whose
18
+ * stack is the call's. The error's own `stack` is this one too, so a log
19
+ * points at the line rather than at the queue's timer.
20
+ */
21
+ readonly callSite: Error | undefined;
22
+ constructor(kind?: "transaction" | "statement", detail?: {
23
+ callSite?: Error;
24
+ text?: string;
25
+ });
26
+ }
27
+ /**
28
+ * `begin` once the transactions queued on `pool` before it have let it go
29
+ * (#1362). Exported for the stores that open their own transactions on an
30
+ * app connection, so every transaction on the pool takes the same turns.
31
+ *
32
+ * `release` lets the next one go. The ORM calls it first thing after COMMIT,
33
+ * before the after-commit callbacks: `begin` resolves only after those have
34
+ * run, and one that opened a transaction would otherwise wait on the very
35
+ * transaction that waits on it. Settling lets it go too, so a caller that
36
+ * ignores `release` (a raw `sql.begin`, whose commit is its settle) holds the
37
+ * queue until its promise settles, including any work it does after its own
38
+ * commit. `begin` must not queue on the same pool again from inside (it
39
+ * would wait for itself; see below).
40
+ *
41
+ * Savepoints never come here: they run inside the open transaction.
42
+ *
43
+ * A transaction queued from inside the one holding the pool (its async
44
+ * context says so) is only a suspected deadlock: async context is inherited
45
+ * by work the transaction never waits for too (a `setTimeout`, an un-awaited
46
+ * call), which just waits its turn. So it queues like any other, and is
47
+ * rejected with `TransactionQueueDeadlockError` only if, after 5 seconds, it
48
+ * is still waiting on a transaction it is inside. In development any
49
+ * transaction still waiting then warns (`slowTransactionThreshold: false`
50
+ * turns the warning off).
51
+ */
52
+ export declare function queuedOnSqlite<T>(pool: SQL, begin: (release: () => void) => Promise<T>, options?: {
53
+ slowTransactionThreshold?: number | false;
54
+ /** A plain statement waiting for its turn (`sqliteClient.ts`), for the error it fails with. */
55
+ statement?: boolean;
56
+ /** The statement's SQL, named by the deadlock error. */
57
+ text?: string;
58
+ /** Where the caller issued it, when it was captured earlier than this call. */
59
+ callSite?: Error;
60
+ }): Promise<T>;
61
+ /**
62
+ * Whether the current async context is inside the transaction holding
63
+ * `pool`'s queue: a statement issued now would be a suspected deadlock if it
64
+ * had to wait. Cheap: what a statement checks before capturing a stack.
65
+ */
66
+ export declare function insideQueueHolder(pool: SQL): boolean;
67
+ //# sourceMappingURL=sqliteQueue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqliteQueue.d.ts","sourceRoot":"","sources":["../../database/sqliteQueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAa/B;;;;;;;;;;;;GAYG;AACH,qBAAa,6BAA8B,SAAQ,KAAK;IACtD;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,KAAK,GAAG,SAAS,CAAC;gBAGnC,IAAI,GAAE,aAAa,GAAG,WAA2B,EACjD,MAAM,GAAE;QAAE,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAO;CAyBnD;AAgBD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAC9B,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,EAC1C,OAAO,GAAE;IACP,wBAAwB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC1C,+FAA+F;IAC/F,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,KAAK,CAAC;CACb,GACL,OAAO,CAAC,CAAC,CAAC,CAqDZ;AAaD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAGpD"}
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{jm as A,km as F}from"../chunk-mykr2v6g.js";import{qm as w}from"../chunk-kbz5s9wb.js";import{um as O}from"../chunk-wj0q7tyn.js";import"../chunk-vtf7tkef.js";import{Zm as T}from"../chunk-4rs6w1gp.js";import{render as Z}from"jsx-email";function M(q){return Array.from(q,(k)=>{let B=k.charCodeAt(0);return k==="/"||k==="\\"||B<32||B===127?"_":k}).join("")}async function Y(q,k,B={}){let z=`${q}/${new Date().toISOString()}${M(k.subject)}`,J={to:k.to,cc:k.cc,bcc:k.bcc,replyTo:k.replyTo??[],from:k.from,subject:k.subject,headers:k.headers??{},attachments:k.attachments.map((C)=>({filename:C.filename,bytes:Buffer.byteLength(C.content)})),scheduledAt:k.scheduledAt??null,idempotencyKey:k.idempotencyKey??null,locale:B.locale??null,driver:B.driver??null,text:k.text??null};return await Bun.write(`${z}.json`,`${JSON.stringify(J,null,2)}
2
+ import{lm as A,mm as F}from"../chunk-rc86ewq1.js";import{sm as w}from"../chunk-x68jra5n.js";import{wm as O}from"../chunk-3mq0wmq7.js";import"../chunk-wgb26e02.js";import{$m as T}from"../chunk-c7hbdsjv.js";import{render as Z}from"jsx-email";function M(q){return Array.from(q,(k)=>{let B=k.charCodeAt(0);return k==="/"||k==="\\"||B<32||B===127?"_":k}).join("")}async function Y(q,k,B={}){let z=`${q}/${new Date().toISOString()}${M(k.subject)}`,J={to:k.to,cc:k.cc,bcc:k.bcc,replyTo:k.replyTo??[],from:k.from,subject:k.subject,headers:k.headers??{},attachments:k.attachments.map((C)=>({filename:C.filename,bytes:Buffer.byteLength(C.content)})),scheduledAt:k.scheduledAt??null,idempotencyKey:k.idempotencyKey??null,locale:B.locale??null,driver:B.driver??null,text:k.text??null};return await Bun.write(`${z}.json`,`${JSON.stringify(J,null,2)}
3
3
  `),await Bun.write(`${z}.html`,k.html),`${z}.html`}import{jsx as $}from"react/jsx-runtime";function j(q,k){if(typeof q.driverFor!=="function")throw Error(`Can't send through mail driver "${k}": the bound MailManager has no \`driverFor\`.`);return q.driverFor(k)}class S{from="";to=[];subject="No Subject";cc=[];bcc=[];attachments=[];template;headers={};replyTo;driver;static async send(q){let k=new this,B=O(w).defaultLocale,z=O(F),{to:J=k.to,from:C=k.from,subject:W=typeof k.subject==="string"?k.subject:k.subject[q.locale||B],cc:_=k.cc,bcc:D=k.bcc,attachments:E=k.attachments,replyTo:P=k.replyTo,data:Q,headers:H={}}=q,K=q.driver??k.driver,R=K===void 0?void 0:j(z,K),L={...z.headers??{},...k.headers??{},...H??{}},U=process.env.EMAIL_DEBUG==="true",G=U?"debug":(R??z.driver)?.provider??"custom",V=await z.filterRecipients(J);if(!V.length)return{id:null,provider:G,status:"skipped"};let[x,y]=await Promise.all([k.render({...Q,locale:q.locale}),k.renderText({...Q,locale:q.locale})]),X={bcc:D,cc:_,from:C,subject:W,to:V,...P?.length?{replyTo:P}:{},attachments:E,html:x,headers:L,text:y,scheduledAt:q.scheduledAt,idempotencyKey:q.idempotencyKey};if(U){let N=await Y(`${process.env.ROOT_DIR}/.debug/emails`,X,{locale:q.locale,driver:K});if(process.env.CI!=="true"&&process.env.EMAIL_DEBUG_OPEN!=="false"){let{default:f}=await import("open");await f(N)}return{id:`debug_${crypto.randomUUID()}`,provider:G,status:"debug"}}let I=await A(R??z,X);return I.ok?{id:I.id,provider:G,status:"sent"}:{id:I.id,provider:G,status:"failed",error:I.error}}static async preview(q){return await new this().render({...q.data,locale:q.locale})}async render(q){let k=this.template;return await Z($(k,{...q}))}async renderText(q){let k=this.template;return await Z($(k,{...q}),{plainText:!0})}}export{S as Email};
4
4
 
5
- //# debugId=4C839F1EB897B01864756E2164756E21
5
+ //# debugId=BAA7AD04CD047FEA64756E2164756E21
@@ -6,6 +6,6 @@
6
6
  "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 replyTo: 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 /** The named driver the send picked (`driver` on the class or the send). */\n driver: 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; driver?: 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 replyTo: params.replyTo ?? [],\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 driver: options.driver ?? 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"
7
7
  ],
8
8
  "mappings": ";iOACA,YAAS,aCiCF,IAAS,JAAqB,CAAC,EAAiB,CACrD,OAAO,MAAM,KAAK,EAAS,CAAC,IAAS,CACnC,IAAM,EAAO,EAAK,WAAW,CAAC,EAC9B,OAAO,IAAS,KAAO,IAAS,MAAQ,EAAO,IAAQ,IAAS,IAAO,IAAM,EAC9E,EAAE,KAAK,EAAE,EAQZ,eAAsB,CAAe,CACnC,EACA,EACA,EAAgD,CAAC,EACjD,CACA,IAAM,EAAO,GAAG,KAAO,IAAI,KAAK,EAAE,YAAY,IAAI,EAAsB,EAAO,OAAO,IAEhF,EAA2B,CAC/B,GAAI,EAAO,GACX,GAAI,EAAO,GACX,IAAK,EAAO,IACZ,QAAS,EAAO,SAAW,CAAC,EAC5B,KAAM,EA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AAU,CAClE,IAAM,EAAW,KAAK,SACtB,OAAO,MAAM,EAAO,EAAC,EAAD,IAAc,EAAO,EAAI,CAAE,UAAW,EAAK,CAAC,EAEpE",
9
- "debugId": "4C839F1EB897B01864756E2164756E21",
9
+ "debugId": "BAA7AD04CD047FEA64756E2164756E21",
10
10
  "names": []
11
11
  }
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{$f as j,Bg as q,Mg as r,Ng as s,Og as t,Pg as u,Tf as a,Wf as c,Xf as e,Yf as f,Zf as h,_f as i,gg as k,hg as l,ig as m,jg as n,kg as o,lg as p,yh as v}from"../chunk-y89vn9da.js";import"../chunk-vcmwp7pv.js";import"../chunk-c3c37k46.js";import{Bj as d}from"../chunk-h2cvg5r5.js";import"../chunk-2g1h9ktj.js";import{Mj as b,Qj as g}from"../chunk-ca1qwsjj.js";import"../chunk-0xmk4jyj.js";import"../chunk-szyr67g7.js";import"../chunk-8adbpxpm.js";import"../chunk-768yza4f.js";import"../chunk-9a3wbbr6.js";import"../chunk-psdcmh65.js";import"../chunk-6wv3k8ap.js";import"../chunk-mxqrmjha.js";import"../chunk-2as2xfem.js";import"../chunk-mhvg8nnb.js";import"../chunk-kbz5s9wb.js";import"../chunk-wj0q7tyn.js";import"../chunk-vtf7tkef.js";import"../chunk-dh1wbntq.js";import"../chunk-49kkapvr.js";import"../chunk-j5r7vm8a.js";import"../chunk-358krc4n.js";import"../chunk-4rs6w1gp.js";export{f as Url,d as Storage,r as Runs,j as Redis,a as Redirect,l as RateLimiter,e as Query,h as Meta,g as Log,m as Lock,c as Lang,s as Features,b as Facade,u as DB,n as Crypt,i as Cookie,o as Connections,t as ConnectionQueries,p as ChangeFeed,k as Cache,q as Broadcast,v as Auth};
2
+ import{$f as j,Bg as q,Mg as r,Ng as s,Og as t,Pg as u,Tf as a,Wf as c,Xf as e,Yf as f,Zf as h,_f as i,gg as k,hg as l,ig as m,jg as n,kg as o,lg as p,yh as v}from"../chunk-q8pr18w6.js";import"../chunk-vcmwp7pv.js";import"../chunk-c3c37k46.js";import{Bj as d}from"../chunk-j3zz8046.js";import"../chunk-2g1h9ktj.js";import{Mj as b,Qj as g}from"../chunk-e4adgvd6.js";import"../chunk-0xmk4jyj.js";import"../chunk-8wvh099n.js";import"../chunk-4sv5vkab.js";import"../chunk-768yza4f.js";import"../chunk-9a3wbbr6.js";import"../chunk-0wa8ztk5.js";import"../chunk-6wv3k8ap.js";import"../chunk-ccymw1ed.js";import"../chunk-aczp96k5.js";import"../chunk-3qmhe96e.js";import"../chunk-x68jra5n.js";import"../chunk-3mq0wmq7.js";import"../chunk-wgb26e02.js";import"../chunk-7fh7cfjh.js";import"../chunk-vqmy8jfr.js";import"../chunk-zsmwmg8x.js";import"../chunk-4mysb5ej.js";import"../chunk-c7hbdsjv.js";export{f as Url,d as Storage,r as Runs,j as Redis,a as Redirect,l as RateLimiter,e as Query,h as Meta,g as Log,m as Lock,c as Lang,s as Features,b as Facade,u as DB,n as Crypt,i as Cookie,o as Connections,t as ConnectionQueries,p as ChangeFeed,k as Cache,q as Broadcast,v as Auth};
3
3
 
4
4
  //# debugId=F741325AA0CAAD4764756E2164756E21
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{tm as o,um as r}from"../chunk-wj0q7tyn.js";import"../chunk-vtf7tkef.js";import"../chunk-4rs6w1gp.js";export{r as app,o as Application};
2
+ import{vm as o,wm as r}from"../chunk-3mq0wmq7.js";import"../chunk-wgb26e02.js";import"../chunk-c7hbdsjv.js";export{r as app,o as Application};
3
3
 
4
- //# debugId=E7701BF7B4E1D55564756E2164756E21
4
+ //# debugId=935B7B745BF51AD664756E2164756E21
@@ -4,6 +4,6 @@
4
4
  "sourcesContent": [
5
5
  ],
6
6
  "mappings": "",
7
- "debugId": "E7701BF7B4E1D55564756E2164756E21",
7
+ "debugId": "935B7B745BF51AD664756E2164756E21",
8
8
  "names": []
9
9
  }
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{$e as v,Ah as ca,Bh as da,Eh as ea,Fh as fa,Gh as ga,Hh as ha,Ih as ia,Jh as ja,Kh as ka,Lh as la,Mh as ma,Nh as na,Oh as oa,Ph as pa,Qh as qa,Rf as K,Rh as ra,Sf as L,Sh as sa,Th as ta,Uf as M,Uh as ua,Vf as N,Vh as va,Xg as aa,Ze as t,_e as u,af as w,bf as x,cf as E,hf as F,lf as G,mf as H,nf as I,of as J,zh as ba}from"../chunk-y89vn9da.js";import"../chunk-vcmwp7pv.js";import"../chunk-c3c37k46.js";import{$i as C,Ai as e,Bi as f,Ci as g,Di as h,Ei as i,Fi as j,Ii as n,Ni as o,Oi as p,Pi as q,Qi as r,Vi as s,Xi as y,Yi as z,Zi as A,_i as B,aj as D,kj as O,lj as P,mj as Q,nj as R,oj as S,pj as T,qj as U,rj as V,sj as W,ti as a,tj as X,ui as b,uj as Y,vi as d,wj as Z,xj as _,yj as $}from"../chunk-h2cvg5r5.js";import{Fj as c}from"../chunk-2g1h9ktj.js";import"../chunk-ca1qwsjj.js";import{Tj as k,Uj as l,Vj as m}from"../chunk-0xmk4jyj.js";import"../chunk-szyr67g7.js";import"../chunk-8adbpxpm.js";import"../chunk-768yza4f.js";import"../chunk-9a3wbbr6.js";import"../chunk-psdcmh65.js";import"../chunk-6wv3k8ap.js";import"../chunk-mxqrmjha.js";import"../chunk-2as2xfem.js";import"../chunk-mhvg8nnb.js";import"../chunk-kbz5s9wb.js";import"../chunk-wj0q7tyn.js";import"../chunk-vtf7tkef.js";import"../chunk-dh1wbntq.js";import"../chunk-49kkapvr.js";import"../chunk-j5r7vm8a.js";import"../chunk-358krc4n.js";import"../chunk-4rs6w1gp.js";export{g as toRangeHeaderValue,v as toMiddlewareList,k as stateKey,$ as safeFetch,f as resolveRange,e as parseRangeHeader,h as parseContentRange,r as parseByteSize,ja as middlewareConfigDefaults,u as httpError,d as getCookies,j as formatUnsatisfiedContentRange,i as formatContentRange,ra as defineResourcePolicy,ia as defineMiddlewareConfig,n as cspNonce,w as createUnsatisfiableResponse,x as createStreamResponse,M as createFileResponse,I as clientIp,J as clientAddress,Z as classifyAddress,da as authorizeChannel,N as ViewRouter,o as ValidationError,W as TooManyRedirectsError,U as TooLargeError,T as TimeoutError,sa as SitemapError,ta as Sitemap,L as SameSiteBounceMiddleware,_ as SafeResponse,O as SafeFetchError,K as SAME_SITE_BOUNCE_PARAM,ua as RobotsTxt,va as Robots,qa as ResourcePolicy,b as ResourceController,m as RequestState,c as RequestBreakerError,H as RateLimitMiddleware,F as RateLimitExceededError,A as RangeNotSatisfiableError,oa as PoliciesServiceProvider,pa as Policies,q as PayloadTooLargeError,B as NotFoundError,X as NetworkError,l as MissingRequestStateError,G as Middleware,ga as McpToolDeclaration,ha as McpRouter,fa as McpRouteDeclaration,ea as McpModelParam,p as InvalidValidationRuleError,P as InvalidUrlError,z as InsufficientPermissionsError,Y as HttpStatusError,t as HttpResponse,s as HttpRequest,C as FileNotFoundError,S as DnsError,ma as CorsMiddleware,a as Controller,V as ContentTypeError,ca as ChannelRouter,ba as ChannelDeclaration,la as CacheMiddleware,na as CSRFMiddleware,aa as BodyLimitMiddleware,Q as BlockedHostError,R as BlockedAddressError,y as AuthorizationError,ka as AuthenticationMiddleware,D as AuthenticationError,E as ApiRouter};
2
+ import{$e as v,Ah as ca,Bh as da,Eh as ea,Fh as fa,Gh as ga,Hh as ha,Ih as ia,Jh as ja,Kh as ka,Lh as la,Mh as ma,Nh as na,Oh as oa,Ph as pa,Qh as qa,Rf as K,Rh as ra,Sf as L,Sh as sa,Th as ta,Uf as M,Uh as ua,Vf as N,Vh as va,Xg as aa,Ze as t,_e as u,af as w,bf as x,cf as E,hf as F,lf as G,mf as H,nf as I,of as J,zh as ba}from"../chunk-q8pr18w6.js";import"../chunk-vcmwp7pv.js";import"../chunk-c3c37k46.js";import{$i as C,Ai as e,Bi as f,Ci as g,Di as h,Ei as i,Fi as j,Ii as n,Ni as o,Oi as p,Pi as q,Qi as r,Vi as s,Xi as y,Yi as z,Zi as A,_i as B,aj as D,kj as O,lj as P,mj as Q,nj as R,oj as S,pj as T,qj as U,rj as V,sj as W,ti as a,tj as X,ui as b,uj as Y,vi as d,wj as Z,xj as _,yj as $}from"../chunk-j3zz8046.js";import{Fj as c}from"../chunk-2g1h9ktj.js";import"../chunk-e4adgvd6.js";import{Tj as k,Uj as l,Vj as m}from"../chunk-0xmk4jyj.js";import"../chunk-8wvh099n.js";import"../chunk-4sv5vkab.js";import"../chunk-768yza4f.js";import"../chunk-9a3wbbr6.js";import"../chunk-0wa8ztk5.js";import"../chunk-6wv3k8ap.js";import"../chunk-ccymw1ed.js";import"../chunk-aczp96k5.js";import"../chunk-3qmhe96e.js";import"../chunk-x68jra5n.js";import"../chunk-3mq0wmq7.js";import"../chunk-wgb26e02.js";import"../chunk-7fh7cfjh.js";import"../chunk-vqmy8jfr.js";import"../chunk-zsmwmg8x.js";import"../chunk-4mysb5ej.js";import"../chunk-c7hbdsjv.js";export{g as toRangeHeaderValue,v as toMiddlewareList,k as stateKey,$ as safeFetch,f as resolveRange,e as parseRangeHeader,h as parseContentRange,r as parseByteSize,ja as middlewareConfigDefaults,u as httpError,d as getCookies,j as formatUnsatisfiedContentRange,i as formatContentRange,ra as defineResourcePolicy,ia as defineMiddlewareConfig,n as cspNonce,w as createUnsatisfiableResponse,x as createStreamResponse,M as createFileResponse,I as clientIp,J as clientAddress,Z as classifyAddress,da as authorizeChannel,N as ViewRouter,o as ValidationError,W as TooManyRedirectsError,U as TooLargeError,T as TimeoutError,sa as SitemapError,ta as Sitemap,L as SameSiteBounceMiddleware,_ as SafeResponse,O as SafeFetchError,K as SAME_SITE_BOUNCE_PARAM,ua as RobotsTxt,va as Robots,qa as ResourcePolicy,b as ResourceController,m as RequestState,c as RequestBreakerError,H as RateLimitMiddleware,F as RateLimitExceededError,A as RangeNotSatisfiableError,oa as PoliciesServiceProvider,pa as Policies,q as PayloadTooLargeError,B as NotFoundError,X as NetworkError,l as MissingRequestStateError,G as Middleware,ga as McpToolDeclaration,ha as McpRouter,fa as McpRouteDeclaration,ea as McpModelParam,p as InvalidValidationRuleError,P as InvalidUrlError,z as InsufficientPermissionsError,Y as HttpStatusError,t as HttpResponse,s as HttpRequest,C as FileNotFoundError,S as DnsError,ma as CorsMiddleware,a as Controller,V as ContentTypeError,ca as ChannelRouter,ba as ChannelDeclaration,la as CacheMiddleware,na as CSRFMiddleware,aa as BodyLimitMiddleware,Q as BlockedHostError,R as BlockedAddressError,y as AuthorizationError,ka as AuthenticationMiddleware,D as AuthenticationError,E as ApiRouter};
3
3
 
4
4
  //# debugId=74C09A0363F7972064756E2164756E21
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{ra as y,sa as p}from"../chunk-7qhqqf0q.js";import{Ja as c,Ka as d,Ma as l}from"../chunk-hke4hzfm.js";import{$l as t,Yl as e,Zl as i,am as r,bm as o,cm as n,dm as a,em as s}from"../chunk-mhvg8nnb.js";import"../chunk-4rs6w1gp.js";export{o as setActiveLocale,r as seedDictionaries,t as preloadDictionaries,d as localeStrings,i as loadDictionary,n as getActiveLocale,e as dictionaryRegistrationMark,c as dictionaryLocales,l as dictionaryId,y as defineDictionary,s as createDictionarySink,a as __resetDictionaryRegistry,p as __gemi_dict__};
2
+ import{ra as y,sa as p}from"../chunk-agpty0p6.js";import{Ja as c,Ka as d,Ma as l}from"../chunk-hke4hzfm.js";import{$l as i,_l as e,bm as t,cm as r,dm as o,em as n,fm as a,gm as s}from"../chunk-3qmhe96e.js";import"../chunk-c7hbdsjv.js";export{o as setActiveLocale,r as seedDictionaries,t as preloadDictionaries,d as localeStrings,i as loadDictionary,n as getActiveLocale,e as dictionaryRegistrationMark,c as dictionaryLocales,l as dictionaryId,y as defineDictionary,s as createDictionarySink,a as __resetDictionaryRegistry,p as __gemi_dict__};
3
3
 
4
- //# debugId=6DE61DBCE6583EEB64756E2164756E21
4
+ //# debugId=52DC9100B9FFAD4464756E2164756E21
@@ -4,6 +4,6 @@
4
4
  "sourcesContent": [
5
5
  ],
6
6
  "mappings": "",
7
- "debugId": "6DE61DBCE6583EEB64756E2164756E21",
7
+ "debugId": "52DC9100B9FFAD4464756E2164756E21",
8
8
  "names": []
9
9
  }
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{ra as T}from"../chunk-7qhqqf0q.js";import"../chunk-hke4hzfm.js";import{pb as D}from"../chunk-cwkf46bk.js";import{We as b,Xe as w}from"../chunk-g7exgg3k.js";import"../chunk-bhycdjcv.js";import{Wf as j}from"../chunk-y89vn9da.js";import"../chunk-vcmwp7pv.js";import"../chunk-c3c37k46.js";import"../chunk-h2cvg5r5.js";import"../chunk-2g1h9ktj.js";import"../chunk-ca1qwsjj.js";import"../chunk-0xmk4jyj.js";import"../chunk-szyr67g7.js";import"../chunk-8adbpxpm.js";import"../chunk-768yza4f.js";import"../chunk-9a3wbbr6.js";import"../chunk-psdcmh65.js";import"../chunk-6wv3k8ap.js";import"../chunk-mxqrmjha.js";import"../chunk-2as2xfem.js";import"../chunk-mhvg8nnb.js";import{lm as V,mm as X,nm as E,om as L,pm as R,qm as S}from"../chunk-kbz5s9wb.js";import"../chunk-wj0q7tyn.js";import"../chunk-vtf7tkef.js";import"../chunk-dh1wbntq.js";import"../chunk-49kkapvr.js";import"../chunk-j5r7vm8a.js";import"../chunk-358krc4n.js";import"../chunk-4rs6w1gp.js";import{createElement as J,Fragment as M,isValidElement as U}from"react";function $(q,B){let G=Object.values(B).some((z)=>typeof z==="function"&&U(z(""))),Q=/{{([^{}]+?)(?::([^{}\[\]]+?))?(?:\[(.*?)\])?}}/g;if(!G)return q.replace(Q,(W,O,_,Z)=>{let C=O.includes(":")?O.split(":")[0]:O,H=B[C];if(H===void 0)return W;if(typeof H==="function"){let K=H(Z!==void 0?Z:"");if(U(K))throw Error("JSX returned in string context");return String(K)}if(_)switch(_.toLowerCase()){case"number":return Number(H).toString();case"string":return String(H);case"boolean":return Boolean(H).toString();default:return String(H)}return String(H)});else{let z=[],W=0,O=null;while((O=Q.exec(q))!==null){let[_,Z,C,H]=O,F=O.index,K=Z.includes(":")?Z.split(":")[0]:Z;if(F>W)z.push(q.substring(W,F));let Y=B[K];if(Y===void 0)z.push(_);else if(typeof Y==="function"){let A=Y(H!==void 0?H:"");z.push(A)}else if(C)switch(C.toLowerCase()){case"number":z.push(Number(Y).toString());break;case"string":z.push(String(Y));break;case"boolean":z.push(Boolean(Y).toString());break;default:z.push(String(Y))}else z.push(String(Y));W=F+_.length}if(W<q.length)z.push(q.substring(W));return J(M,{},...z)}}class P{name;dictionary;constructor(q,B){this.name=q;this.dictionary=B}reference(q){if(typeof window<"u")throw Error("Cannot use reference in the browser");if(!this.dictionary?.[q])throw Error(`Translation not found for ${String(q)}`);return this.dictionary[q]}render(q,...B){let{locale:G=j.locale(),params:Q}={params:{},...B[0]};if(typeof window<"u")throw Error("Cannot use render in the browser");if(!this.dictionary?.[q]?.[G])throw Error(`Translation not found for ${String(q)} in ${String(G)}`);return $(this.dictionary[q][G],Q??{})}static create(q,B){return new P(q,B)}static text(q,...B){let{locale:G=j.locale(),params:Q}={params:{},...B?.[0]};if(!q?.[G])throw Error(`Translation not found for ${String(G)}`);return $(q[G],Q??{})}}async function N(q,B,...G){let{locale:Q=j.locale(),params:z}={params:{},...G[0]},O=(await q.load(String(Q)))[B];if(typeof O!=="string")throw Error(`Translation not found for "${B}" in "${String(Q)}" (dictionary ${q.id})`);return $(O,z??{})}export{w as translationConfigDefaults,N as translate,V as resolveLocale,X as negotiateLocale,L as isValidTimeZone,b as defineTranslationConfig,T as defineDictionary,R as createFormatter,S as Translator,D as TranslationServiceProvider,P as Dictionary,E as DEFAULT_TIME_ZONE};
2
+ import{ra as T}from"../chunk-agpty0p6.js";import"../chunk-hke4hzfm.js";import{pb as D}from"../chunk-by0ydsqs.js";import{We as b,Xe as w}from"../chunk-wjjxqw9b.js";import"../chunk-bhycdjcv.js";import{Wf as j}from"../chunk-q8pr18w6.js";import"../chunk-vcmwp7pv.js";import"../chunk-c3c37k46.js";import"../chunk-j3zz8046.js";import"../chunk-2g1h9ktj.js";import"../chunk-e4adgvd6.js";import"../chunk-0xmk4jyj.js";import"../chunk-8wvh099n.js";import"../chunk-4sv5vkab.js";import"../chunk-768yza4f.js";import"../chunk-9a3wbbr6.js";import"../chunk-0wa8ztk5.js";import"../chunk-6wv3k8ap.js";import"../chunk-ccymw1ed.js";import"../chunk-aczp96k5.js";import"../chunk-3qmhe96e.js";import{nm as V,om as X,pm as E,qm as L,rm as R,sm as S}from"../chunk-x68jra5n.js";import"../chunk-3mq0wmq7.js";import"../chunk-wgb26e02.js";import"../chunk-7fh7cfjh.js";import"../chunk-vqmy8jfr.js";import"../chunk-zsmwmg8x.js";import"../chunk-4mysb5ej.js";import"../chunk-c7hbdsjv.js";import{createElement as J,Fragment as M,isValidElement as U}from"react";function $(q,B){let G=Object.values(B).some((z)=>typeof z==="function"&&U(z(""))),Q=/{{([^{}]+?)(?::([^{}\[\]]+?))?(?:\[(.*?)\])?}}/g;if(!G)return q.replace(Q,(W,O,_,Z)=>{let C=O.includes(":")?O.split(":")[0]:O,H=B[C];if(H===void 0)return W;if(typeof H==="function"){let K=H(Z!==void 0?Z:"");if(U(K))throw Error("JSX returned in string context");return String(K)}if(_)switch(_.toLowerCase()){case"number":return Number(H).toString();case"string":return String(H);case"boolean":return Boolean(H).toString();default:return String(H)}return String(H)});else{let z=[],W=0,O=null;while((O=Q.exec(q))!==null){let[_,Z,C,H]=O,F=O.index,K=Z.includes(":")?Z.split(":")[0]:Z;if(F>W)z.push(q.substring(W,F));let Y=B[K];if(Y===void 0)z.push(_);else if(typeof Y==="function"){let A=Y(H!==void 0?H:"");z.push(A)}else if(C)switch(C.toLowerCase()){case"number":z.push(Number(Y).toString());break;case"string":z.push(String(Y));break;case"boolean":z.push(Boolean(Y).toString());break;default:z.push(String(Y))}else z.push(String(Y));W=F+_.length}if(W<q.length)z.push(q.substring(W));return J(M,{},...z)}}class P{name;dictionary;constructor(q,B){this.name=q;this.dictionary=B}reference(q){if(typeof window<"u")throw Error("Cannot use reference in the browser");if(!this.dictionary?.[q])throw Error(`Translation not found for ${String(q)}`);return this.dictionary[q]}render(q,...B){let{locale:G=j.locale(),params:Q}={params:{},...B[0]};if(typeof window<"u")throw Error("Cannot use render in the browser");if(!this.dictionary?.[q]?.[G])throw Error(`Translation not found for ${String(q)} in ${String(G)}`);return $(this.dictionary[q][G],Q??{})}static create(q,B){return new P(q,B)}static text(q,...B){let{locale:G=j.locale(),params:Q}={params:{},...B?.[0]};if(!q?.[G])throw Error(`Translation not found for ${String(G)}`);return $(q[G],Q??{})}}async function N(q,B,...G){let{locale:Q=j.locale(),params:z}={params:{},...G[0]},O=(await q.load(String(Q)))[B];if(typeof O!=="string")throw Error(`Translation not found for "${B}" in "${String(Q)}" (dictionary ${q.id})`);return $(O,z??{})}export{w as translationConfigDefaults,N as translate,V as resolveLocale,X as negotiateLocale,L as isValidTimeZone,b as defineTranslationConfig,T as defineDictionary,R as createFormatter,S as Translator,D as TranslationServiceProvider,P as Dictionary,E as DEFAULT_TIME_ZONE};
3
3
 
4
- //# debugId=07DB790F57444D9964756E2164756E21
4
+ //# debugId=2359CBA62B93F5EA64756E2164756E21
@@ -7,6 +7,6 @@
7
7
  "import { Lang } from \"../facades\";\nimport { parseTranslation } from \"../utils/parseTranslation\";\nimport type { ParseTranslationParamsServer, Prettify } from \"../utils/type\";\nimport type { DictionaryHandle } from \"./defineDictionary\";\nimport type { DictionaryTranslations } from \"./dictionaryShape\";\n\n/**\n * Read one string from a `defineDictionary` dictionary outside React — a\n * controller, a job, an email template.\n *\n * Async because a bundled dictionary loads its locale on demand. Server code\n * does not go through the bundler, so in practice this resolves without ever\n * yielding; the `await` is what makes the same call work either way.\n *\n * Kept out of `defineDictionary.ts` on purpose: that module is imported by\n * components and has to stay free of the server facades this one needs.\n */\nexport async function translate<\n T extends DictionaryTranslations,\n K extends keyof T & string,\n U extends keyof T[K],\n R = Prettify<ParseTranslationParamsServer<T[K][U] & string>>,\n>(\n dictionary: DictionaryHandle<T>,\n key: K,\n ...args: R extends Record<string, never>\n ? [args?: { locale?: U | (string & {}) }]\n : [args: { locale?: U | (string & {}); params: R }]\n): Promise<string> {\n const { locale = Lang.locale(), params } = { params: {}, ...args[0] };\n const strings = await dictionary.load(String(locale));\n const template = strings[key];\n\n if (typeof template !== \"string\") {\n throw new Error(\n `Translation not found for \"${key}\" in \"${String(locale)}\" (dictionary ${dictionary.id})`,\n );\n }\n\n return parseTranslation(template, (params ?? {}) as any) as string;\n}\n"
8
8
  ],
9
9
  "mappings": ";skCAAA,mBAAS,SAAe,eAAU,SAO3B,IAAS,JAAgB,JAAC,HAAkB,HAAwB,JAEzE,DAAM,HAAS,EAAO,EAAO,JAAM,HAAE,AACnC,JAAC,DACC,EAAO,DAAU,OACjB,HAAgB,HAAkC,HAAE,JAAC,JACzD,HAMM,EAAQ,kDAEd,GAAI,CAAC,EAqCH,OAnCe,EAAS,QAAQ,EAAO,CAAC,EAAO,EAAM,EAAM,IAAY,CAErE,IAAM,EAAY,EAAK,SAAS,GAAG,EAAI,EAAK,MAAM,GAAG,EAAE,GAAK,EAEtD,EAAQ,EAAO,GACrB,GAAI,IAAU,OACZ,OAAO,EAGT,GAAI,OAAO,IAAU,WAAY,CAG/B,IAAM,EAAiB,EADD,IAAY,OAAY,EAAU,EACd,EAE1C,GAAI,EAAe,CAAc,EAC/B,MAAU,MAAM,gCAAgC,EAElD,OAAO,OAAO,CAAc,EAI9B,GAAI,EACF,OAAQ,EAAK,YAAY,OAClB,SACH,OAAO,OAAO,CAAK,EAAE,SAAS,MAC3B,SACH,OAAO,OAAO,CAAK,MAChB,UACH,OAAO,QAAQ,CAAK,EAAE,SAAS,UAE/B,OAAO,OAAO,CAAK,EAGzB,OAAO,OAAO,CAAK,EACpB,EAEI,KAEL,IAAM,EAAqC,CAAC,EACxC,EAAY,EACZ,EAAgC,KAEpC,OAAQ,EAAQ,EAAM,KAAK,CAAQ,KAAO,KAAM,CAC9C,IAAO,EAAW,EAAM,EAAM,GAAW,EACnC,EAAa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EAEF,OAAO,EAAiB,KAAK,WAAW,GAAK,GAAS,GAAU,CAAC,CAAC,QAU7D,OAAoC,CAAC,EAAc,EAAiB,CACzE,OAAO,IAAI,EAAc,EAAM,CAAY,QAGtC,KAA+D,CACpE,KACG,EAWK,CACR,IAAQ,SAAS,EAAK,OAAO,EAAG,UAAW,CAAE,OAAQ,CAAC,KAAM,IAAO,EAAG,EAEtE,GAAI,CAAC,IAAU,GACb,MAAU,MAAM,6BAA6B,OAAO,CAAM,GAAG,EAG/D,OAAO,EAAiB,EAAQ,GAAS,GAAU,CAAC,CAAC,EAEzD,CC7EA,eAAsB,CAKrB,CACC,EACA,KACG,EAGc,CACjB,IAAQ,SAAS,EAAK,OAAO,EAAG,UAAW,CAAE,OAAQ,CAAC,KAAM,EAAK,EAAG,EAE9D,GADU,MAAM,EAAW,KAAK,OAAO,CAAM,CAAC,GAC3B,GAEzB,GAAI,OAAO,IAAa,SACtB,MAAU,MACR,8BAA8B,UAAY,OAAO,CAAM,kBAAkB,EAAW,KACtF,EAGF,OAAO,EAAiB,EAAW,GAAU,CAAC,CAAS",
10
- "debugId": "07DB790F57444D9964756E2164756E21",
10
+ "debugId": "2359CBA62B93F5EA64756E2164756E21",
11
11
  "names": []
12
12
  }
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ta as E}from"../chunk-4wdc4q33.js";import{ob as l}from"../chunk-ycwv9n7m.js";import{pb as H}from"../chunk-cwkf46bk.js";import{$b as I,Cb as g,Db as W,Eb as _,Fb as p,Gb as P,Hb as u,Ib as $,Jb as V,Kb as q,Lb as B,Mb as K,Qb as L,Rb as Q,Sb as T,Wb as U,Xb as y,Yb as F,Zb as C,_b as D,dc as b,gc as f,hc as k,ic as m}from"../chunk-dnqmvmnp.js";import"../chunk-41bpne77.js";import"../chunk-7ytazpjd.js";import"../chunk-5na9khtz.js";import"../chunk-w9v8bbp8.js";import{Qe as h}from"../chunk-wt80ekv9.js";import"../chunk-g7exgg3k.js";import"../chunk-bhycdjcv.js";import{Pf as n,Qf as v,oh as w,sh as A,tf as d,uf as s,wh as R}from"../chunk-y89vn9da.js";import"../chunk-vcmwp7pv.js";import"../chunk-c3c37k46.js";import"../chunk-h2cvg5r5.js";import"../chunk-2g1h9ktj.js";import"../chunk-ca1qwsjj.js";import"../chunk-0xmk4jyj.js";import"../chunk-szyr67g7.js";import{hk as M}from"../chunk-8adbpxpm.js";import"../chunk-768yza4f.js";import"../chunk-9a3wbbr6.js";import"../chunk-psdcmh65.js";import"../chunk-6wv3k8ap.js";import"../chunk-mxqrmjha.js";import"../chunk-2as2xfem.js";import"../chunk-mhvg8nnb.js";import"../chunk-mykr2v6g.js";import"../chunk-kbz5s9wb.js";import{rm as O,tm as J}from"../chunk-wj0q7tyn.js";import"../chunk-vtf7tkef.js";import"../chunk-dh1wbntq.js";import"../chunk-49kkapvr.js";import"../chunk-j5r7vm8a.js";import"../chunk-358krc4n.js";import"../chunk-4rs6w1gp.js";var N=[C,I,E,T,L,k,B,Q,D,y,_,U,f,V,F,H,b,K,q,m,$];class S{config={};providers=[];services=[];serviceInstances=[];serviceTokens=new Set;servicesBooted=!1;models=[];app=new J;boot(){if(this.models.length>0)l(...this.models);else a();this.app.config.merge(this.config),J.setInstance(this.app),this.app.registerMany([...N,...this.providers]),this.registerServices()}registerServices(){let j=this.serviceTokens;this.serviceInstances=[],this.serviceTokens=new Set,this.servicesBooted=!1;let X=new Map;for(let z of this.services){let G=typeof z==="function"?new z:z,x=G.constructor;if(!x.token)throw Error(`Service [${x.name}] is listed in \`services\` but does not declare a \`static token\`.`);let Y=X.get(x.token);if(Y)throw Error(`Services [${Y}] and [${x.name}] both declare the token "${x.token}". Tokens are the container's keys, so they must be unique.`);X.set(x.token,x.name);let Z=x;if(!j.has(x.token)&&this.app.bound(Z))throw Error(`Service [${x.name}] declares the token "${x.token}", which is already bound in the container by the framework or a provider. Binding it would replace that service everywhere, so pick a token nothing else owns.`);this.app.instance(Z,G),this.serviceInstances.push(G),this.serviceTokens.add(x.token)}this.app.setShutdownHooks(this.serviceInstances.map((z)=>({name:`${z.constructor.name}.onShutdown`,shutdown:(G)=>z.onShutdown(G)})))}async waitForBoot(){await this.app.boot(),await this.bootServices(),p(this.app)}async bootServices(){if(this.servicesBooted)return;for(let j of this.serviceInstances)await j.boot();this.servicesBooted=!0}shutdown(j){return this.run(()=>this.app.shutdown(j))}run(j){return O.run(this.app,j)}resolve(j){return this.app.make(j)}apiRoutes(){return this.app.make(A)}viewRoutes(){return this.app.make(w)}domains(){return this.app.make(R)}queue(){return this.app.make(h)}mcpHttp(){return this.app.config.get("route.mcp.remote.enabled")===!0?this.app.make(g):null}sockets(){return this.app.config.get("route.channels")?this.app.make(u):null}globalMiddleware(j){return P(j)}destroy(){if(this.app.resolved(W))this.app.make(W).stop();if(this.app.flush(),J.getInstance()===this.app)J.setInstance(void 0);O.disable()}}function a(){if(Bun.env.NODE_ENV==="production")return;let j=M();if(j.length===0)return;console.warn(`[gemi] ${j.length} model${j.length===1?" is":"s are"} registered, but Kernel.models is empty.
2
+ import{Ta as E}from"../chunk-7ycjs0xn.js";import{ob as l}from"../chunk-gxre6wnc.js";import{pb as H}from"../chunk-by0ydsqs.js";import{$b as I,Cb as g,Db as W,Eb as _,Fb as p,Gb as P,Hb as u,Ib as $,Jb as V,Kb as q,Lb as B,Mb as K,Qb as L,Rb as Q,Sb as T,Wb as U,Xb as y,Yb as F,Zb as C,_b as D,dc as b,gc as f,hc as k,ic as m}from"../chunk-rftxm3ny.js";import"../chunk-58xb0s71.js";import"../chunk-samm4h7d.js";import"../chunk-51mz612v.js";import"../chunk-w9v8bbp8.js";import{Qe as h}from"../chunk-6gek696n.js";import"../chunk-wjjxqw9b.js";import"../chunk-bhycdjcv.js";import{Pf as n,Qf as v,oh as w,sh as A,tf as d,uf as s,wh as R}from"../chunk-q8pr18w6.js";import"../chunk-vcmwp7pv.js";import"../chunk-c3c37k46.js";import"../chunk-j3zz8046.js";import"../chunk-2g1h9ktj.js";import"../chunk-e4adgvd6.js";import"../chunk-0xmk4jyj.js";import"../chunk-8wvh099n.js";import{hk as M}from"../chunk-4sv5vkab.js";import"../chunk-768yza4f.js";import"../chunk-9a3wbbr6.js";import"../chunk-0wa8ztk5.js";import"../chunk-6wv3k8ap.js";import"../chunk-ccymw1ed.js";import"../chunk-aczp96k5.js";import"../chunk-3qmhe96e.js";import"../chunk-rc86ewq1.js";import"../chunk-x68jra5n.js";import{tm as O,vm as J}from"../chunk-3mq0wmq7.js";import"../chunk-wgb26e02.js";import"../chunk-7fh7cfjh.js";import"../chunk-vqmy8jfr.js";import"../chunk-zsmwmg8x.js";import"../chunk-4mysb5ej.js";import"../chunk-c7hbdsjv.js";var N=[C,I,E,T,L,k,B,Q,D,y,_,U,f,V,F,H,b,K,q,m,$];class S{config={};providers=[];services=[];serviceInstances=[];serviceTokens=new Set;servicesBooted=!1;models=[];app=new J;boot(){if(this.models.length>0)l(...this.models);else a();this.app.config.merge(this.config),J.setInstance(this.app),this.app.registerMany([...N,...this.providers]),this.registerServices()}registerServices(){let j=this.serviceTokens;this.serviceInstances=[],this.serviceTokens=new Set,this.servicesBooted=!1;let X=new Map;for(let z of this.services){let G=typeof z==="function"?new z:z,x=G.constructor;if(!x.token)throw Error(`Service [${x.name}] is listed in \`services\` but does not declare a \`static token\`.`);let Y=X.get(x.token);if(Y)throw Error(`Services [${Y}] and [${x.name}] both declare the token "${x.token}". Tokens are the container's keys, so they must be unique.`);X.set(x.token,x.name);let Z=x;if(!j.has(x.token)&&this.app.bound(Z))throw Error(`Service [${x.name}] declares the token "${x.token}", which is already bound in the container by the framework or a provider. Binding it would replace that service everywhere, so pick a token nothing else owns.`);this.app.instance(Z,G),this.serviceInstances.push(G),this.serviceTokens.add(x.token)}this.app.setShutdownHooks(this.serviceInstances.map((z)=>({name:`${z.constructor.name}.onShutdown`,shutdown:(G)=>z.onShutdown(G)})))}async waitForBoot(){await this.app.boot(),await this.bootServices(),p(this.app)}async bootServices(){if(this.servicesBooted)return;for(let j of this.serviceInstances)await j.boot();this.servicesBooted=!0}shutdown(j){return this.run(()=>this.app.shutdown(j))}run(j){return O.run(this.app,j)}resolve(j){return this.app.make(j)}apiRoutes(){return this.app.make(A)}viewRoutes(){return this.app.make(w)}domains(){return this.app.make(R)}queue(){return this.app.make(h)}mcpHttp(){return this.app.config.get("route.mcp.remote.enabled")===!0?this.app.make(g):null}sockets(){return this.app.config.get("route.channels")?this.app.make(u):null}globalMiddleware(j){return P(j)}destroy(){if(this.app.resolved(W))this.app.make(W).stop();if(this.app.flush(),J.getInstance()===this.app)J.setInstance(void 0);O.disable()}}function a(){if(Bun.env.NODE_ENV==="production")return;let j=M();if(j.length===0)return;console.warn(`[gemi] ${j.length} model${j.length===1?" is":"s are"} registered, but Kernel.models is empty.
3
3
  Nested relation reads resolve a model by name, so a policy on a subclass that does not own its
4
4
  `+" name is skipped inside every include \u2014 scoped at the root, "+`unscoped in an include, with nothing
5
5
  to notice it. Declaring the modules registers each class under its own name and audits the set:
@@ -13,4 +13,4 @@ import{Ta as E}from"../chunk-4wdc4q33.js";import{ob as l}from"../chunk-ycwv9n7m.
13
13
 
14
14
  See docs/orm.md#your-model-class. Development only; this never prints in production.`)}export{s as oneTimeSecretMatches,d as hashOneTimeSecret,N as frameworkProviders,v as UserProvider,n as SESSION_SELECT,S as Kernel};
15
15
 
16
- //# debugId=7F3A1BDB9E160FD964756E2164756E21
16
+ //# debugId=61C7E93C947041A964756E2164756E21
@@ -6,6 +6,6 @@
6
6
  "import { McpHttpServer } from \"../services/mcp/http/McpHttpServer\";\nimport { Application } from \"../foundation/Application\";\nimport type { ServiceProviderConstructor, ShutdownReport } from \"../foundation/Application\";\nimport type { ServiceToken } from \"../container/Container\";\nimport type { ConfigItems } from \"../support/Repository\";\nimport type { Service, ServiceConstructor } from \"../support/Service\";\nimport { registerModels } from \"../orm/registration\";\nimport { registeredNames } from \"../orm/registry\";\nimport { Scheduler } from \"../services/cron/Scheduler\";\nimport { QueueManager } from \"../services/queue/QueueManager\";\nimport { startClaimingIfServing } from \"../services/queue/QueueServiceProvider\";\nimport { ApiRouteDispatcher } from \"../services/router/ApiRouteDispatcher\";\nimport { ViewRouteDispatcher } from \"../services/router/ViewRouteDispatcher\";\nimport { DomainRouter } from \"../services/router/DomainRouter\";\nimport { runGlobalMiddleware } from \"../services/router/globalMiddleware\";\nimport { SocketHub } from \"../services/broadcast/SocketHub\";\nimport { kernelContext } from \"./context\";\nimport { frameworkProviders } from \"./providers\";\n\n/**\n * The app's entry point into the framework. A Kernel subclass declares what the\n * app adds — its `config` slices and any extra `providers` — and everything\n * else lives in the Application container it owns.\n */\nexport class Kernel {\n /**\n * App-level config, merged over the framework defaults. Each key is a config\n * slice: `{ mail: { ... }, route: { ... } }`, normally the modules under\n * `app/config`.\n */\n protected config: ConfigItems = {};\n\n /**\n * App-level providers, registered after the framework's own so they can\n * rebind anything the framework bound.\n */\n protected providers: ServiceProviderConstructor[] = [];\n\n /**\n * The app's own singleton services. Each is constructed during the\n * synchronous boot phase and its `boot()` awaited during the asynchronous\n * one, in the order listed — so a service whose `boot()` depends on another\n * goes after it.\n *\n * An entry is either the class itself or a configured instance from\n * `Service.with({ ... })`. Listing is explicit rather than discovered because\n * the order is load-bearing here, and because a service is always imported by\n * whatever injects it — there is no file the import graph would miss.\n */\n protected services: Array<ServiceConstructor | Service> = [];\n\n private serviceInstances: Service[] = [];\n private serviceTokens = new Set<string>();\n private servicesBooted = false;\n\n /**\n * The modules holding the app's model classes — normally\n * `[generated, models]`, the generated namespace and the barrel of subclasses\n * written over it. Every model class they export is registered under the name\n * its schema carries, later modules winning, and the whole set is audited\n * before anything else boots.\n *\n * ### Why this is a Kernel field and not a line in a file somewhere\n *\n * Registration used to be `register(\"User\", User)` next to each subclass, and\n * the failure mode of forgetting it is an authorization hole that nothing\n * reports: a relation read resolves its target by name, so an unregistered\n * policied subclass leaves the generated base owning the name and every\n * nested `include` of that model comes back unscoped. No error at the root\n * either, because `$exec`'s divergence guard begins `registered !== this` and\n * the base it is running on *is* the registered one. A model only ever read\n * through an include — a membership, a pivot, the kind that carries a tenant\n * scope — never trips anything.\n *\n * Listing the modules here says it once, in the same place the app already\n * declares its config slices and providers, and turns the mistake into a\n * failure to boot rather than a quiet cross-tenant read.\n *\n * It sees the modules it is given, so a model class in a file that no barrel\n * re-exports is still invisible. That is the residual, and it is a smaller\n * one: a barrel is a place to notice an omission, and thirteen `register`\n * lines scattered across thirteen files is not.\n */\n protected models: Array<Record<string, unknown>> = [];\n\n readonly app = new Application();\n\n /**\n * Phase one, synchronous: every provider is constructed and its `register()`\n * runs. Only bindings are recorded here — no service is instantiated, so this\n * is safe to call from a synchronous constructor (`new App({ kernel })`).\n * Phase two is `waitForBoot()`.\n */\n boot() {\n // Before the container, deliberately. This throws on a model whose policies\n // would be skipped, and the useful moment for that is the one where nothing\n // has been constructed and no request can be in flight.\n if (this.models.length > 0) registerModels(...this.models);\n else warnIfModelsAreRegisteredButUndeclared();\n\n this.app.config.merge(this.config);\n Application.setInstance(this.app);\n this.app.registerMany([...frameworkProviders, ...this.providers]);\n this.registerServices();\n }\n\n /**\n * Constructs every listed service and binds it into the container. Runs after\n * the providers have registered, so a provider's `boot()` can `inject()` one;\n * a `Service` constructor does no I/O, so doing this synchronously costs\n * nothing beyond the field initializers.\n */\n private registerServices() {\n // What a previous pass bound, so re-running this on the same kernel is not\n // mistaken for a collision with something else.\n const ours = this.serviceTokens;\n\n this.serviceInstances = [];\n this.serviceTokens = new Set();\n this.servicesBooted = false;\n\n const owners = new Map<string, string>();\n\n for (const declaration of this.services) {\n const instance =\n typeof declaration === \"function\" ? new declaration() : declaration;\n const ctor = instance.constructor as ServiceConstructor;\n\n if (!ctor.token) {\n throw new Error(\n `Service [${ctor.name}] is listed in \\`services\\` but does not declare a \\`static token\\`.`,\n );\n }\n\n // Two services under one token is the failure this refuses to have\n // silently: the second would replace the first in the container, and\n // every `inject()` written against either would hand back whichever was\n // listed last.\n const owner = owners.get(ctor.token);\n if (owner) {\n throw new Error(\n `Services [${owner}] and [${ctor.name}] both declare the token \"${ctor.token}\". Tokens are the container's keys, so they must be unique.`,\n );\n }\n owners.set(ctor.token, ctor.name);\n\n // The same failure one level out. `Container.instance()` writes into\n // `instances`, which `make()` consults before `bindings`, so a token that\n // is already spoken for is not shared with its owner — it replaces it, for\n // every `app()` and `inject()` in the process. An app service that named\n // itself \"mail\" would leave `Mail.send()` resolving to an object with no\n // `send`, and the boot that caused it would report nothing. Providers have\n // all registered by now, so anything bound here belongs to somebody else.\n const token = ctor as unknown as ServiceToken<Service>;\n if (!ours.has(ctor.token) && this.app.bound(token)) {\n throw new Error(\n `Service [${ctor.name}] declares the token \"${ctor.token}\", which is already bound in the container by the framework or a provider. Binding it would replace that service everywhere, so pick a token nothing else owns.`,\n );\n }\n\n this.app.instance(token, instance);\n this.serviceInstances.push(instance);\n this.serviceTokens.add(ctor.token);\n }\n this.app.setShutdownHooks(\n this.serviceInstances.map((service) => ({\n name: `${service.constructor.name}.onShutdown`,\n shutdown: (options) => service.onShutdown(options),\n })),\n );\n }\n\n /**\n * Phase two, asynchronous: every provider's `boot()` runs, in registration\n * order, after all of them have registered. Idempotent.\n */\n async waitForBoot() {\n await this.app.boot();\n await this.bootServices();\n // Last, once every job — queued listeners included — is registered.\n startClaimingIfServing(this.app);\n }\n\n /**\n * Phase two for services, after every provider's `boot()` — so a service may\n * use the facades and anything else a provider owns. Idempotent, like the\n * provider phase it follows.\n */\n private async bootServices() {\n if (this.servicesBooted) {\n return;\n }\n for (const service of this.serviceInstances) {\n await service.boot();\n }\n this.servicesBooted = true;\n }\n\n /**\n * Every provider's `shutdown()`, in reverse registration order, inside the\n * application context — so a hook may use the facades, as a cron tick or a\n * request would. See `Application.shutdown` for the deadline and the\n * report. Idempotent.\n */\n shutdown(options?: { timeoutMs?: number }): Promise<ShutdownReport> {\n return this.run(() => this.app.shutdown(options));\n }\n\n run<T>(cb: () => T) {\n return kernelContext.run(this.app, cb);\n }\n\n /**\n * Resolve a service by token. Callers outside this module should prefer the\n * named accessors below or `app()`; this exists for tooling that holds a\n * Kernel but no ambient context.\n */\n resolve<T>(token: ServiceToken<T>): T {\n return this.app.make(token);\n }\n\n // Named accessors. `app/App.ts` goes through these rather than importing the\n // service classes itself — see the note in that file about the two copies of\n // gemi that coexist at build time.\n apiRoutes(): ApiRouteDispatcher {\n return this.app.make(ApiRouteDispatcher);\n }\n\n viewRoutes(): ViewRouteDispatcher {\n return this.app.make(ViewRouteDispatcher);\n }\n\n domains(): DomainRouter {\n return this.app.make(DomainRouter);\n }\n\n queue(): QueueManager {\n return this.app.make(QueueManager);\n }\n\n /** The MCP endpoint, or `null` when `route.mcp.remote` is not enabled. */\n mcpHttp(): McpHttpServer | null {\n return this.app.config.get(\"route.mcp.remote.enabled\") === true\n ? this.app.make(McpHttpServer)\n : null;\n }\n\n /**\n * The broadcast WebSocket endpoint, or `null` when the app declares no\n * `route.channels` (nothing could be subscribed to, so nothing is upgraded).\n */\n sockets(): SocketHub | null {\n return this.app.config.get(\"route.channels\") ? this.app.make(SocketHub) : null;\n }\n\n /** The `global` middleware list for one request. Call it inside `run`. */\n globalMiddleware(req: Request) {\n return runGlobalMiddleware(req);\n }\n\n destroy() {\n // Only touch services that were actually resolved — resolving one here\n // would construct it purely to tear it down.\n if (this.app.resolved(Scheduler)) {\n this.app.make(Scheduler).stop();\n }\n\n this.app.flush();\n\n if (Application.getInstance() === this.app) {\n Application.setInstance(undefined);\n }\n\n kernelContext.disable();\n }\n}\n\n/**\n * Says something to an application that has models and has not declared them.\n *\n * Without this the fix for #316 defaults to off. `models` is `[]`, `boot()`\n * no-ops, and an app upgrading from 0.48 is in exactly the state the issue\n * describes until somebody edits their Kernel by hand — while the only place\n * that says to is the **Setup** section of `docs/orm.md`, which an existing app\n * read once and will not read again. #316 was filed by an app mid-migration\n * with a 79-model schema, which is precisely the reader who never sees it.\n *\n * The condition is what makes this worth printing. A populated registry with an\n * empty `models` means the generated `index.ts` was imported and its bases are\n * what every nested read resolves to — so if any policy lives on a subclass, it\n * is being skipped inside includes right now. A Kernel with no ORM at all has\n * an empty registry and hears nothing.\n *\n * Development only, and a warning rather than a throw: an app in this state is\n * running today, and turning a working deploy into a failure to start over an\n * arrangement that *might* be fine is not a patch-level thing to do. The\n * failure it points at is silent, so the fix for it has to be noisy somewhere,\n * and the terminal an author is already looking at is the cheapest somewhere\n * there is.\n */\nfunction warnIfModelsAreRegisteredButUndeclared(): void {\n if (process.env.NODE_ENV === \"production\") return;\n\n const registered = registeredNames();\n if (registered.length === 0) return;\n\n console.warn(\n `[gemi] ${registered.length} model${registered.length === 1 ? \" is\" : \"s are\"} ` +\n `registered, but Kernel.models is empty.\\n` +\n ` Nested relation reads resolve a model by name, so a policy on a ` +\n `subclass that does not own its\\n` +\n ` name is skipped inside every include — scoped at the root, ` +\n `unscoped in an include, with nothing\\n` +\n ` to notice it. Declaring the modules registers each class under ` +\n `its own name and audits the set:\\n\\n` +\n ` import * as generated from \"../models/generated\"\\n` +\n ` import * as models from \"../models\"\\n\\n` +\n ` export default class extends Kernel {\\n` +\n ` models = [generated, models]\\n` +\n ` }\\n\\n` +\n ` See docs/orm.md#your-model-class. Development only; this never ` +\n `prints in production.`,\n );\n}\n"
7
7
  ],
8
8
  "mappings": ";2hDA2CO,DAAM,HAAmD,JAC9D,HACA,HACA,HAIA,HAGA,HACA,HACA,HACA,HACA,HACA,HACA,HACA,HACA,HACA,HACA,HACA,HACA,HACA,HACA,HACA,HACA,JACF,HC9CO,CAAM,JAAO,JAMR,EAAsB,JAAC,HAMvB,KAA0C,JAAC,HAa3C,IAAgD,CAAC,EAEnD,iBAA8B,CAAC,EAC/B,cAAgB,IAAI,IACpB,eAAiB,GA8Bf,OAAyC,CAAC,EAE3C,IAAM,IAAI,EAQnB,IAAI,EAAG,CAIL,GAAI,KAAK,OAAO,OAAS,EAAG,EAAe,GAAG,KAAK,MAAM,EACpD,OAAuC,EAE5C,KAAK,IAAI,OAAO,MAAM,KAAK,MAAM,EACj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@ -1,5 +1,8 @@
1
1
  import type { SQL, TransactionSQL } from "bun";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
+ import { slowTransactionThreshold } from "../database/config";
4
+ export { slowTransactionThreshold };
5
+ export { queuedOnSqlite, TransactionQueueDeadlockError } from "../database/sqliteQueue";
3
6
  /**
4
7
  * The ambient transaction: the ORM's own `AsyncLocalStorage`, holding nothing
5
8
  * but the open handle and how deep the nesting is.
@@ -355,22 +358,6 @@ export declare function currentActor(): {
355
358
  * `asSystem` inside `asUser` — suspends policies, which is what it should do.
356
359
  */
357
360
  export declare function runAsUser<T>(user: unknown, fn: () => Promise<T>): Promise<T>;
358
- /**
359
- * The warning threshold in milliseconds, or `null` when the warning is off.
360
- *
361
- * `configured` is `database.slowTransactionThreshold` — see `DatabaseConfig`.
362
- * It arrives as a value rather than being read from here so that this file
363
- * keeps knowing nothing about the container: `withTransaction` is reachable
364
- * with a bare pool, and its tests use one.
365
- *
366
- * Exported for its own tests. The behaviour worth pinning is the fallback —
367
- * that a malformed threshold lands on the default rather than disabling — and
368
- * that cannot be observed through `withTransaction`: "no warning fired" is what
369
- * a disabled warning looks like too, so a behavioural test of it passes just as
370
- * happily when the fallback is gone. Asserting the number directly is the only
371
- * form of that test that can fail.
372
- */
373
- export declare function slowTransactionThreshold(configured?: number | false): number | null;
374
361
  /**
375
362
  * Run `fn` inside a transaction, entering the ambient scope for its whole async
376
363
  * subtree.
@@ -440,50 +427,6 @@ export declare function withTransaction<T>(pool: SQL, fn: (tx: TransactionSQL) =
440
427
  */
441
428
  dialect?: string;
442
429
  }): Promise<T>;
443
- /**
444
- * A transaction on a SQLite pool waited, in the queue, for one it is itself
445
- * inside (#1362). It would wait forever: the open transaction can't commit
446
- * until this one, which it is waiting on, has run.
447
- *
448
- * Thrown, rather than hung, when a transaction that isn't nested through the
449
- * ORM's scope starts from inside an open one on the same connection, and is
450
- * still waiting on it 5 seconds later: a raw
451
- * `sql.begin` (a store's), or code that deliberately left the transaction's
452
- * ORM scope while still awaited by it (an in-process API call or channel
453
- * message, `ormContext.exit`). Run that work after the commit
454
- * (`afterCommit`), or inside the transaction, where it becomes a savepoint.
455
- */
456
- export declare class TransactionQueueDeadlockError extends Error {
457
- constructor();
458
- }
459
- /**
460
- * `begin` once the transactions queued on `pool` before it have let it go
461
- * (#1362). Exported for the stores that open their own transactions on an
462
- * app connection, so every transaction on the pool takes the same turns.
463
- *
464
- * `release` lets the next one go. The ORM calls it first thing after COMMIT,
465
- * before the after-commit callbacks: `begin` resolves only after those have
466
- * run, and one that opened a transaction would otherwise wait on the very
467
- * transaction that waits on it. Settling lets it go too, so a caller that
468
- * ignores `release` (a raw `sql.begin`, whose commit is its settle) holds the
469
- * queue until its promise settles, including any work it does after its own
470
- * commit. `begin` must not queue on the same pool again from inside (it
471
- * would wait for itself; see below).
472
- *
473
- * Savepoints never come here: they run inside the open transaction.
474
- *
475
- * A transaction queued from inside the one holding the pool (its async
476
- * context says so) is only a suspected deadlock: async context is inherited
477
- * by work the transaction never waits for too (a `setTimeout`, an un-awaited
478
- * call), which just waits its turn. So it queues like any other, and is
479
- * rejected with `TransactionQueueDeadlockError` only if, after 5 seconds, it
480
- * is still waiting on a transaction it is inside. In development any
481
- * transaction still waiting then warns (`slowTransactionThreshold: false`
482
- * turns the warning off).
483
- */
484
- export declare function queuedOnSqlite<T>(pool: SQL, begin: (release: () => void) => Promise<T>, options?: {
485
- slowTransactionThreshold?: number | false;
486
- }): Promise<T>;
487
430
  /** The value a setting can be given. `null` sets it to the empty string. */
488
431
  export type SessionSettingValue = string | number | boolean | bigint | null;
489
432
  /**
@@ -517,5 +460,4 @@ export declare function applyTransactionSettings(): Promise<void>;
517
460
  * set another value throws `SessionSettingConflictError`.
518
461
  */
519
462
  export declare function runWithSettings<T>(settings: Record<string, SessionSettingValue>, fn: () => Promise<T>): Promise<T>;
520
- export {};
521
463
  //# sourceMappingURL=context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRo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