gemi 0.64.0 → 0.66.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 (250) hide show
  1. package/dist/ai/Agent.d.ts +128 -1
  2. package/dist/ai/Agent.d.ts.map +1 -1
  3. package/dist/ai/AgentController.d.ts +75 -6
  4. package/dist/ai/AgentController.d.ts.map +1 -1
  5. package/dist/ai/AgentProvider.d.ts +13 -45
  6. package/dist/ai/AgentProvider.d.ts.map +1 -1
  7. package/dist/ai/ImageModel.d.ts +127 -0
  8. package/dist/ai/ImageModel.d.ts.map +1 -0
  9. package/dist/ai/ImageProvider.d.ts +94 -0
  10. package/dist/ai/ImageProvider.d.ts.map +1 -0
  11. package/dist/ai/Schema.d.ts +62 -0
  12. package/dist/ai/Schema.d.ts.map +1 -1
  13. package/dist/ai/client/index.js +10 -4
  14. package/dist/ai/client/index.js.map +1 -1
  15. package/dist/ai/client/reducer.d.ts.map +1 -1
  16. package/dist/ai/index.d.ts +7 -1
  17. package/dist/ai/index.d.ts.map +1 -1
  18. package/dist/ai/index.js +11 -11
  19. package/dist/ai/index.js.map +14 -10
  20. package/dist/ai/live/harness.d.ts +5 -3
  21. package/dist/ai/live/harness.d.ts.map +1 -1
  22. package/dist/ai/providers/call.d.ts +12 -0
  23. package/dist/ai/providers/call.d.ts.map +1 -1
  24. package/dist/ai/providers/endpoints.d.ts +153 -0
  25. package/dist/ai/providers/endpoints.d.ts.map +1 -0
  26. package/dist/ai/providers/fakeProvider.d.ts +54 -0
  27. package/dist/ai/providers/fakeProvider.d.ts.map +1 -1
  28. package/dist/ai/providers/http.d.ts +28 -0
  29. package/dist/ai/providers/http.d.ts.map +1 -1
  30. package/dist/ai/providers/images.d.ts +126 -0
  31. package/dist/ai/providers/images.d.ts.map +1 -0
  32. package/dist/ai/store/Attachments.d.ts +52 -0
  33. package/dist/ai/store/Attachments.d.ts.map +1 -1
  34. package/dist/ai/types.d.ts +55 -1
  35. package/dist/ai/types.d.ts.map +1 -1
  36. package/dist/ai/useChat.d.ts +60 -4
  37. package/dist/ai/useChat.d.ts.map +1 -1
  38. package/dist/app/index.js +1 -1
  39. package/dist/bin/gemi.js +9 -1
  40. package/dist/bin/gemi.js.map +3 -3
  41. package/dist/broadcasting/index.js +1 -1
  42. package/dist/bun/plugin.js +1 -1
  43. package/dist/bun/preload.js +1 -1
  44. package/dist/{chunk-jv9k1qfr.js → chunk-2bb3rdqq.js} +3 -3
  45. package/dist/{chunk-jv9k1qfr.js.map → chunk-2bb3rdqq.js.map} +1 -1
  46. package/dist/{chunk-e785380d.js → chunk-2dvjj3ad.js} +2 -2
  47. package/dist/{chunk-e785380d.js.map → chunk-2dvjj3ad.js.map} +1 -1
  48. package/dist/{chunk-rj3fnc4h.js → chunk-2ghpxrw1.js} +1 -1
  49. package/dist/{chunk-dqbm9vd0.js → chunk-3mp9p38x.js} +2 -2
  50. package/dist/{chunk-dqbm9vd0.js.map → chunk-3mp9p38x.js.map} +1 -1
  51. package/dist/{chunk-cdpeh7tt.js → chunk-3pwn2r6s.js} +2 -2
  52. package/dist/{chunk-cdpeh7tt.js.map → chunk-3pwn2r6s.js.map} +1 -1
  53. package/dist/{chunk-7qfzrkab.js → chunk-45g3hd0e.js} +2 -2
  54. package/dist/{chunk-7qfzrkab.js.map → chunk-45g3hd0e.js.map} +1 -1
  55. package/dist/{chunk-wqmzad46.js → chunk-5g1j29p2.js} +2 -2
  56. package/dist/{chunk-wqmzad46.js.map → chunk-5g1j29p2.js.map} +1 -1
  57. package/dist/{chunk-bxtx4y4w.js → chunk-5pm9zvtp.js} +2 -2
  58. package/dist/{chunk-bxtx4y4w.js.map → chunk-5pm9zvtp.js.map} +1 -1
  59. package/dist/{chunk-pbx9p6g0.js → chunk-6waph5k8.js} +1 -1
  60. package/dist/{chunk-nnc40mf3.js → chunk-70y8wajy.js} +2 -2
  61. package/dist/{chunk-nnc40mf3.js.map → chunk-70y8wajy.js.map} +1 -1
  62. package/dist/{chunk-71yhw8aw.js → chunk-731etrh2.js} +2 -2
  63. package/dist/{chunk-71yhw8aw.js.map → chunk-731etrh2.js.map} +1 -1
  64. package/dist/{chunk-1s1cd1e8.js → chunk-7438nrkm.js} +3 -3
  65. package/dist/{chunk-1s1cd1e8.js.map → chunk-7438nrkm.js.map} +1 -1
  66. package/dist/{chunk-ssg20z9s.js → chunk-7wgk7q33.js} +3 -3
  67. package/dist/{chunk-ssg20z9s.js.map → chunk-7wgk7q33.js.map} +1 -1
  68. package/dist/chunk-7xc64j6p.js +5 -0
  69. package/dist/chunk-7xc64j6p.js.map +14 -0
  70. package/dist/{chunk-jmse5hec.js → chunk-7zg1mt1g.js} +2 -2
  71. package/dist/{chunk-jmse5hec.js.map → chunk-7zg1mt1g.js.map} +1 -1
  72. package/dist/{chunk-0qchadp1.js → chunk-87c0cy5v.js} +2 -2
  73. package/dist/{chunk-0qchadp1.js.map → chunk-87c0cy5v.js.map} +1 -1
  74. package/dist/{chunk-773qa4av.js → chunk-8bjxk57p.js} +2 -2
  75. package/dist/{chunk-773qa4av.js.map → chunk-8bjxk57p.js.map} +1 -1
  76. package/dist/{chunk-81yzec62.js → chunk-8jpvj3cj.js} +2 -2
  77. package/dist/{chunk-81yzec62.js.map → chunk-8jpvj3cj.js.map} +1 -1
  78. package/dist/{chunk-9e5c5e15.js → chunk-9ch1q7nd.js} +2 -2
  79. package/dist/{chunk-9e5c5e15.js.map → chunk-9ch1q7nd.js.map} +1 -1
  80. package/dist/{chunk-9e5v1t73.js → chunk-9x5eefh0.js} +2 -2
  81. package/dist/{chunk-9e5v1t73.js.map → chunk-9x5eefh0.js.map} +1 -1
  82. package/dist/{chunk-62xjrz5e.js → chunk-9zmcz7yq.js} +2 -2
  83. package/dist/{chunk-62xjrz5e.js.map → chunk-9zmcz7yq.js.map} +1 -1
  84. package/dist/{chunk-0amv13g6.js → chunk-a85fn4zf.js} +3 -3
  85. package/dist/{chunk-0amv13g6.js.map → chunk-a85fn4zf.js.map} +1 -1
  86. package/dist/chunk-adj6dnvj.js +5 -0
  87. package/dist/{chunk-dq2hgzje.js.map → chunk-adj6dnvj.js.map} +1 -1
  88. package/dist/{chunk-exwbtfe9.js → chunk-aq09ta7k.js} +2 -2
  89. package/dist/{chunk-exwbtfe9.js.map → chunk-aq09ta7k.js.map} +1 -1
  90. package/dist/{chunk-43xw9n4f.js → chunk-dmr7yzyr.js} +2 -2
  91. package/dist/{chunk-43xw9n4f.js.map → chunk-dmr7yzyr.js.map} +1 -1
  92. package/dist/{chunk-q4wdg0y3.js → chunk-e0v4byjp.js} +2 -2
  93. package/dist/{chunk-ptjexzn1.js.map → chunk-e0v4byjp.js.map} +1 -1
  94. package/dist/{chunk-8wpccvbt.js → chunk-e1fkxt82.js} +2 -2
  95. package/dist/{chunk-8wpccvbt.js.map → chunk-e1fkxt82.js.map} +1 -1
  96. package/dist/{chunk-xadk41cs.js → chunk-ex9ns7pf.js} +4 -4
  97. package/dist/{chunk-xadk41cs.js.map → chunk-ex9ns7pf.js.map} +1 -1
  98. package/dist/{chunk-95d8jj11.js → chunk-fd7wfcft.js} +2 -2
  99. package/dist/{chunk-95d8jj11.js.map → chunk-fd7wfcft.js.map} +1 -1
  100. package/dist/{chunk-kx7vgcjp.js → chunk-fmcq21hg.js} +3 -3
  101. package/dist/{chunk-kx7vgcjp.js.map → chunk-fmcq21hg.js.map} +1 -1
  102. package/dist/{chunk-k1wkvrj0.js → chunk-ftaxfq7p.js} +3 -3
  103. package/dist/{chunk-k1wkvrj0.js.map → chunk-ftaxfq7p.js.map} +1 -1
  104. package/dist/{chunk-zdj2wmbj.js → chunk-fxkh2rfd.js} +2 -2
  105. package/dist/{chunk-zdj2wmbj.js.map → chunk-fxkh2rfd.js.map} +1 -1
  106. package/dist/{chunk-9k5daets.js → chunk-g2ywq30n.js} +2 -2
  107. package/dist/{chunk-9k5daets.js.map → chunk-g2ywq30n.js.map} +1 -1
  108. package/dist/{chunk-fwnf3jc6.js → chunk-gyc91g26.js} +2 -2
  109. package/dist/{chunk-fwnf3jc6.js.map → chunk-gyc91g26.js.map} +1 -1
  110. package/dist/chunk-hq496pa4.js +5 -0
  111. package/dist/chunk-hq496pa4.js.map +10 -0
  112. package/dist/{chunk-4sv5zpb4.js → chunk-hrtkjv41.js} +2 -2
  113. package/dist/{chunk-4sv5zpb4.js.map → chunk-hrtkjv41.js.map} +1 -1
  114. package/dist/{chunk-dhe1hsyz.js → chunk-jkjt3e06.js} +2 -2
  115. package/dist/{chunk-dhe1hsyz.js.map → chunk-jkjt3e06.js.map} +1 -1
  116. package/dist/{chunk-5wzyx4ts.js → chunk-ks94h71z.js} +2 -2
  117. package/dist/{chunk-5wzyx4ts.js.map → chunk-ks94h71z.js.map} +1 -1
  118. package/dist/{chunk-rhr8qavq.js → chunk-m44ar4he.js} +2 -2
  119. package/dist/{chunk-rhr8qavq.js.map → chunk-m44ar4he.js.map} +1 -1
  120. package/dist/{chunk-mzpczes2.js → chunk-nxg51m0q.js} +2 -2
  121. package/dist/{chunk-mzpczes2.js.map → chunk-nxg51m0q.js.map} +1 -1
  122. package/dist/{chunk-qrfp7pg2.js → chunk-nxh5a3eb.js} +3 -3
  123. package/dist/{chunk-qrfp7pg2.js.map → chunk-nxh5a3eb.js.map} +1 -1
  124. package/dist/{chunk-qcbtr7hm.js → chunk-p0m3qgs5.js} +2 -2
  125. package/dist/{chunk-qcbtr7hm.js.map → chunk-p0m3qgs5.js.map} +1 -1
  126. package/dist/{chunk-jk8mn861.js → chunk-p5m0da00.js} +2 -2
  127. package/dist/{chunk-jk8mn861.js.map → chunk-p5m0da00.js.map} +1 -1
  128. package/dist/{chunk-fv223805.js → chunk-pb0m0ryf.js} +3 -3
  129. package/dist/{chunk-fv223805.js.map → chunk-pb0m0ryf.js.map} +1 -1
  130. package/dist/{chunk-7hbhbht2.js → chunk-pcxxnnad.js} +3 -3
  131. package/dist/{chunk-7hbhbht2.js.map → chunk-pcxxnnad.js.map} +1 -1
  132. package/dist/{chunk-2d92pev2.js → chunk-pxc51549.js} +2 -2
  133. package/dist/{chunk-2d92pev2.js.map → chunk-pxc51549.js.map} +1 -1
  134. package/dist/{chunk-454c7vn3.js → chunk-q1nq7n6y.js} +2 -2
  135. package/dist/{chunk-454c7vn3.js.map → chunk-q1nq7n6y.js.map} +1 -1
  136. package/dist/{chunk-48qybp63.js → chunk-qqchc40s.js} +2 -2
  137. package/dist/{chunk-48qybp63.js.map → chunk-qqchc40s.js.map} +1 -1
  138. package/dist/{chunk-3tmw1gy2.js → chunk-qttk7k60.js} +2 -2
  139. package/dist/{chunk-3tmw1gy2.js.map → chunk-qttk7k60.js.map} +1 -1
  140. package/dist/{chunk-feyr4851.js → chunk-r069158p.js} +2 -2
  141. package/dist/{chunk-feyr4851.js.map → chunk-r069158p.js.map} +1 -1
  142. package/dist/{chunk-ptjexzn1.js → chunk-r6v21jn6.js} +2 -2
  143. package/dist/{chunk-q4wdg0y3.js.map → chunk-r6v21jn6.js.map} +1 -1
  144. package/dist/{chunk-6j129573.js → chunk-r77f1482.js} +2 -2
  145. package/dist/{chunk-6j129573.js.map → chunk-r77f1482.js.map} +1 -1
  146. package/dist/{chunk-jmbdr550.js → chunk-rnjbja88.js} +2 -2
  147. package/dist/{chunk-jmbdr550.js.map → chunk-rnjbja88.js.map} +1 -1
  148. package/dist/{chunk-q8msf1gf.js → chunk-rq2k9frr.js} +2 -2
  149. package/dist/{chunk-q8msf1gf.js.map → chunk-rq2k9frr.js.map} +1 -1
  150. package/dist/{chunk-2nqxhy1f.js → chunk-se5ekvgb.js} +4 -4
  151. package/dist/{chunk-2nqxhy1f.js.map → chunk-se5ekvgb.js.map} +3 -3
  152. package/dist/{chunk-v6v03hy7.js → chunk-sqc6fkqt.js} +2 -2
  153. package/dist/{chunk-v6v03hy7.js.map → chunk-sqc6fkqt.js.map} +1 -1
  154. package/dist/{chunk-78cvy4je.js → chunk-tn71d46d.js} +2 -2
  155. package/dist/{chunk-78cvy4je.js.map → chunk-tn71d46d.js.map} +1 -1
  156. package/dist/{chunk-hkhxkeeb.js → chunk-v6q4990x.js} +3 -3
  157. package/dist/{chunk-hkhxkeeb.js.map → chunk-v6q4990x.js.map} +1 -1
  158. package/dist/{chunk-e41vdprh.js → chunk-w34j3cd3.js} +3 -3
  159. package/dist/{chunk-e41vdprh.js.map → chunk-w34j3cd3.js.map} +1 -1
  160. package/dist/{chunk-w8ncmp2z.js → chunk-w6fnt1xv.js} +2 -2
  161. package/dist/{chunk-w8ncmp2z.js.map → chunk-w6fnt1xv.js.map} +2 -2
  162. package/dist/{chunk-35fbxgjh.js → chunk-wzqxtrpt.js} +2 -2
  163. package/dist/{chunk-35fbxgjh.js.map → chunk-wzqxtrpt.js.map} +1 -1
  164. package/dist/{chunk-z2fnf49p.js → chunk-xzexftx1.js} +1 -1
  165. package/dist/{chunk-dfv5eqma.js → chunk-z4k18gnp.js} +2 -2
  166. package/dist/{chunk-dfv5eqma.js.map → chunk-z4k18gnp.js.map} +1 -1
  167. package/dist/{chunk-b6948dnh.js → chunk-z6gzasra.js} +2 -2
  168. package/dist/{chunk-b6948dnh.js.map → chunk-z6gzasra.js.map} +1 -1
  169. package/dist/{chunk-p57x55qd.js → chunk-zqpskwk9.js} +2 -2
  170. package/dist/{chunk-p57x55qd.js.map → chunk-zqpskwk9.js.map} +1 -1
  171. package/dist/chunks/ThemeProvider-Bz-y1g2i.js.map +1 -1
  172. package/dist/client/ClientRouter.d.ts.map +1 -1
  173. package/dist/client/ProgressManager.d.ts +1 -1
  174. package/dist/client/index.d.ts +1 -1
  175. package/dist/client/index.d.ts.map +1 -1
  176. package/dist/client/index.js +1 -1
  177. package/dist/client/index.js.map +1 -1
  178. package/dist/client/types.d.ts +72 -2
  179. package/dist/client/types.d.ts.map +1 -1
  180. package/dist/client/useNavigate.d.ts +29 -6
  181. package/dist/client/useNavigate.d.ts.map +1 -1
  182. package/dist/client/usePrefetch.d.ts +13 -3
  183. package/dist/client/usePrefetch.d.ts.map +1 -1
  184. package/dist/config/index.js +1 -1
  185. package/dist/console/run.js +2 -2
  186. package/dist/console/run.js.map +1 -1
  187. package/dist/container/index.js +2 -2
  188. package/dist/container/index.js.map +1 -1
  189. package/dist/database/Connection.d.ts.map +1 -1
  190. package/dist/database/index.d.ts +1 -0
  191. package/dist/database/index.d.ts.map +1 -1
  192. package/dist/database/index.js +2 -2
  193. package/dist/database/index.js.map +1 -1
  194. package/dist/database/sqlitePath.d.ts +46 -0
  195. package/dist/database/sqlitePath.d.ts.map +1 -0
  196. package/dist/email/index.js +2 -2
  197. package/dist/email/index.js.map +1 -1
  198. package/dist/facades/index.js +2 -2
  199. package/dist/facades/index.js.map +1 -1
  200. package/dist/foundation/index.js +2 -2
  201. package/dist/foundation/index.js.map +1 -1
  202. package/dist/http/ApiRouter.d.ts +1 -1
  203. package/dist/http/ApiRouter.d.ts.map +1 -1
  204. package/dist/http/index.js +2 -2
  205. package/dist/http/index.js.map +1 -1
  206. package/dist/i18n/dictionaryRuntime.js +2 -2
  207. package/dist/i18n/dictionaryRuntime.js.map +1 -1
  208. package/dist/i18n/index.js +2 -2
  209. package/dist/i18n/index.js.map +1 -1
  210. package/dist/kernel/index.js +2 -2
  211. package/dist/kernel/index.js.map +1 -1
  212. package/dist/orm/index.js +2 -2
  213. package/dist/orm/index.js.map +1 -1
  214. package/dist/server/index.js +2 -2
  215. package/dist/server/index.js.map +1 -1
  216. package/dist/services/index.js +2 -2
  217. package/dist/services/index.js.map +1 -1
  218. package/dist/services/queue/work.js +2 -2
  219. package/dist/services/queue/work.js.map +1 -1
  220. package/dist/support/index.js +2 -2
  221. package/dist/support/index.js.map +1 -1
  222. package/package.json +1 -1
  223. package/dist/ai/Agent.test-d.d.ts +0 -2
  224. package/dist/ai/Agent.test-d.d.ts.map +0 -1
  225. package/dist/ai/Schema.test-d.d.ts +0 -2
  226. package/dist/ai/Schema.test-d.d.ts.map +0 -1
  227. package/dist/ai/client/reducer.test-d.d.ts +0 -2
  228. package/dist/ai/client/reducer.test-d.d.ts.map +0 -1
  229. package/dist/ai/example.d.ts +0 -129
  230. package/dist/ai/example.d.ts.map +0 -1
  231. package/dist/chunk-4728yrmt.js +0 -5
  232. package/dist/chunk-4728yrmt.js.map +0 -10
  233. package/dist/chunk-dq2hgzje.js +0 -5
  234. package/dist/chunk-f9ccncar.js +0 -5
  235. package/dist/chunk-f9ccncar.js.map +0 -13
  236. package/dist/client/useDictionary.test-d.d.ts +0 -2
  237. package/dist/client/useDictionary.test-d.d.ts.map +0 -1
  238. package/dist/console/builder.test-d.d.ts +0 -2
  239. package/dist/console/builder.test-d.d.ts.map +0 -1
  240. package/dist/http/ApiRouter.test-d.d.ts +0 -2
  241. package/dist/http/ApiRouter.test-d.d.ts.map +0 -1
  242. package/dist/http/McpRouter.test-d.d.ts +0 -2
  243. package/dist/http/McpRouter.test-d.d.ts.map +0 -1
  244. package/dist/services/events/FakeEventManager.test-d.d.ts +0 -2
  245. package/dist/services/events/FakeEventManager.test-d.d.ts.map +0 -1
  246. package/dist/services/events/Listener.test-d.d.ts +0 -2
  247. package/dist/services/events/Listener.test-d.d.ts.map +0 -1
  248. /package/dist/{chunk-rj3fnc4h.js.map → chunk-2ghpxrw1.js.map} +0 -0
  249. /package/dist/{chunk-pbx9p6g0.js.map → chunk-6waph5k8.js.map} +0 -0
  250. /package/dist/{chunk-z2fnf49p.js.map → chunk-xzexftx1.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{k as Nt}from"./chunk-q4wdg0y3.js";import{A as Mt,B as Ut,C as wt,D as xt,E as pt,F as Xt,l as er,n as L,o as At,p as Wt,q as Yt,s as Hr,t as Lr,u as Rt,v as jt,w as ar,x as Bt,y as Jt,z as lr}from"./chunk-e41vdprh.js";import{G as Ft}from"./chunk-q8msf1gf.js";import"./chunk-dqbm9vd0.js";import{I as Nr,J as at,L as Dt,P as He,T as M}from"./chunk-qrfp7pg2.js";import{U as zt}from"./chunk-jmse5hec.js";import"./chunk-8wpccvbt.js";import{Y as ut}from"./chunk-62xjrz5e.js";import{Z as lt}from"./chunk-773qa4av.js";import"./chunk-dhe1hsyz.js";import"./chunk-81yzec62.js";import{ha as bt}from"./chunk-jmbdr550.js";import{sg as p}from"./chunk-ptjexzn1.js";var V=p((se)=>{Object.defineProperty(se,"__esModule",{value:!0});se.resolveHttpAuthSchemeConfig=se.defaultSigninHttpAuthSchemeProvider=se.defaultSigninHttpAuthSchemeParametersProvider=void 0;var Mr=L(),H=Nr(),Ur=async(e,r,t)=>{return{operation:(0,H.getSmithyContext)(r).operation,region:await(0,H.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};se.defaultSigninHttpAuthSchemeParametersProvider=Ur;function wr(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:e.region},propertiesExtractor:(r,t)=>({signingProperties:{config:r,context:t}})}}function xr(e){return{schemeId:"smithy.api#noAuth"}}var gr=(e)=>{let r=[];switch(e.operation){case"CreateOAuth2Token":{r.push(xr(e));break}default:r.push(wr(e))}return r};se.defaultSigninHttpAuthSchemeProvider=gr;var fr=(e)=>{let r=(0,Mr.resolveAwsSdkSigV4Config)(e);return Object.assign(r,{authSchemePreference:(0,H.normalizeProvider)(e.authSchemePreference??[])})};se.resolveHttpAuthSchemeConfig=fr});var Se=p((Ee)=>{Object.defineProperty(Ee,"__esModule",{value:!0});Ee.ruleSet=void 0;var ve="required",o="fn",n="argv",c="ref",ne=!0,ie="isSet",S="booleanEquals",I="error",E="endpoint",l="tree",N="PartitionResult",z="stringEquals",de={[ve]:!0,default:!1,type:"boolean"},ue={[ve]:!1,type:"string"},ae={[c]:"Endpoint"},A={[o]:S,[n]:[{[c]:"UseFIPS"},!0]},W={[o]:S,[n]:[{[c]:"UseDualStack"},!0]},s={},Y={[o]:"getAttr",[n]:[{[c]:N},"name"]},R={[o]:S,[n]:[{[c]:"UseFIPS"},!1]},F={[o]:S,[n]:[{[c]:"UseDualStack"},!1]},le={[o]:"getAttr",[n]:[{[c]:N},"supportsFIPS"]},pe={[o]:S,[n]:[!0,{[o]:"getAttr",[n]:[{[c]:N},"supportsDualStack"]}]},ce=[{[c]:"Region"}],hr={version:"1.0",parameters:{UseDualStack:de,UseFIPS:de,Endpoint:ue,Region:ue},rules:[{conditions:[{[o]:ie,[n]:[ae]}],rules:[{conditions:[A],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:I},{rules:[{conditions:[W],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:I},{endpoint:{url:ae,properties:s,headers:s},type:E}],type:l}],type:l},{rules:[{conditions:[{[o]:ie,[n]:ce}],rules:[{conditions:[{[o]:"aws.partition",[n]:ce,assign:N}],rules:[{conditions:[{[o]:z,[n]:[Y,"aws"]},R,F],endpoint:{url:"https://{Region}.signin.aws.amazon.com",properties:s,headers:s},type:E},{conditions:[{[o]:z,[n]:[Y,"aws-cn"]},R,F],endpoint:{url:"https://{Region}.signin.amazonaws.cn",properties:s,headers:s},type:E},{conditions:[{[o]:z,[n]:[Y,"aws-us-gov"]},R,F],endpoint:{url:"https://{Region}.signin.amazonaws-us-gov.com",properties:s,headers:s},type:E},{conditions:[A,W],rules:[{conditions:[{[o]:S,[n]:[ne,le]},pe],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:s,headers:s},type:E}],type:l},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:I}],type:l},{conditions:[A,F],rules:[{conditions:[{[o]:S,[n]:[le,ne]}],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",properties:s,headers:s},type:E}],type:l},{error:"FIPS is enabled but this partition does not support FIPS",type:I}],type:l},{conditions:[R,W],rules:[{conditions:[pe],rules:[{endpoint:{url:"https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:s,headers:s},type:E}],type:l},{error:"DualStack is enabled but this partition does not support DualStack",type:I}],type:l},{endpoint:{url:"https://signin.{Region}.{PartitionResult#dnsSuffix}",properties:s,headers:s},type:E}],type:l}],type:l},{error:"Invalid Configuration: Missing Region",type:I}],type:l}]};Ee.ruleSet=hr});var Ie=p((Pe)=>{Object.defineProperty(Pe,"__esModule",{value:!0});Pe.defaultEndpointResolver=void 0;var Vr=Lr(),j=Hr(),zr=Se(),Ar=new j.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Wr=(e,r={})=>{return Ar.get(e,()=>(0,j.resolveEndpoint)(zr.ruleSet,{endpointParams:e,logger:r.logger}))};Pe.defaultEndpointResolver=Wr;j.customEndpointFunctions.aws=Vr.awsEndpointFunctions});var U=p((J)=>{Object.defineProperty(J,"__esModule",{value:!0});J.SigninServiceException=J.__ServiceException=void 0;var qe=M();Object.defineProperty(J,"__ServiceException",{enumerable:!0,get:function(){return qe.ServiceException}});class B extends qe.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,B.prototype)}}J.SigninServiceException=B});var k=p((be)=>{Object.defineProperty(be,"__esModule",{value:!0});be.ValidationException=be.TooManyRequestsError=be.InternalServerException=be.AccessDeniedException=void 0;var w=U();class X extends w.SigninServiceException{name="AccessDeniedException";$fault="client";error;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});Object.setPrototypeOf(this,X.prototype),this.error=e.error}}be.AccessDeniedException=X;class Q extends w.SigninServiceException{name="InternalServerException";$fault="server";error;constructor(e){super({name:"InternalServerException",$fault:"server",...e});Object.setPrototypeOf(this,Q.prototype),this.error=e.error}}be.InternalServerException=Q;class Z extends w.SigninServiceException{name="TooManyRequestsError";$fault="client";error;constructor(e){super({name:"TooManyRequestsError",$fault:"client",...e});Object.setPrototypeOf(this,Z.prototype),this.error=e.error}}be.TooManyRequestsError=Z;class K extends w.SigninServiceException{name="ValidationException";$fault="client";error;constructor(e){super({name:"ValidationException",$fault:"client",...e});Object.setPrototypeOf(this,K.prototype),this.error=e.error}}be.ValidationException=K});var C=p((We)=>{Object.defineProperty(We,"__esModule",{value:!0});We.CreateOAuth2Token$=We.CreateOAuth2TokenResponseBody$=We.CreateOAuth2TokenResponse$=We.CreateOAuth2TokenRequestBody$=We.CreateOAuth2TokenRequest$=We.AccessToken$=We.errorTypeRegistries=We.ValidationException$=We.TooManyRequestsError$=We.InternalServerException$=We.AccessDeniedException$=We.SigninServiceException$=void 0;var Jr="AccessDeniedException",Xr="AccessToken",Qr="CreateOAuth2Token",Zr="CreateOAuth2TokenRequest",Kr="CreateOAuth2TokenRequestBody",kr="CreateOAuth2TokenResponseBody",Tr="CreateOAuth2TokenResponse",mr="InternalServerException",Cr="RefreshToken",_r="TooManyRequestsError",et="ValidationException",Fe="accessKeyId",Ne="accessToken",T="client",Me="clientId",Ue="codeVerifier",rt="code",y="error",we="expiresIn",xe="grantType",tt="http",m="httpError",ge="idToken",d="jsonName",g="message",x="refreshToken",fe="redirectUri",Le="smithy.ts.sdk.synthetic.com.amazonaws.signin",Ge="secretAccessKey",$e="sessionToken",st="server",ot="tokenInput",nt="tokenOutput",he="tokenType",u="com.amazonaws.signin",Ve=He(),f=k(),it=U(),ze=Ve.TypeRegistry.for(Le);We.SigninServiceException$=[-3,Le,"SigninServiceException",0,[],[]];ze.registerError(We.SigninServiceException$,it.SigninServiceException);var q=Ve.TypeRegistry.for(u);We.AccessDeniedException$=[-3,u,Jr,{[y]:T},[y,g],[0,0],2];q.registerError(We.AccessDeniedException$,f.AccessDeniedException);We.InternalServerException$=[-3,u,mr,{[y]:st,[m]:500},[y,g],[0,0],2];q.registerError(We.InternalServerException$,f.InternalServerException);We.TooManyRequestsError$=[-3,u,_r,{[y]:T,[m]:429},[y,g],[0,0],2];q.registerError(We.TooManyRequestsError$,f.TooManyRequestsError);We.ValidationException$=[-3,u,et,{[y]:T,[m]:400},[y,g],[0,0],2];q.registerError(We.ValidationException$,f.ValidationException);We.errorTypeRegistries=[ze,q];var Ae=[0,u,Cr,8,0];We.AccessToken$=[3,u,Xr,8,[Fe,Ge,$e],[[0,{[d]:Fe}],[0,{[d]:Ge}],[0,{[d]:$e}]],3];We.CreateOAuth2TokenRequest$=[3,u,Zr,0,[ot],[[()=>We.CreateOAuth2TokenRequestBody$,16]],1];We.CreateOAuth2TokenRequestBody$=[3,u,Kr,0,[Me,xe,rt,fe,Ue,x],[[0,{[d]:Me}],[0,{[d]:xe}],0,[0,{[d]:fe}],[0,{[d]:Ue}],[()=>Ae,{[d]:x}]],2];We.CreateOAuth2TokenResponse$=[3,u,Tr,0,[nt],[[()=>We.CreateOAuth2TokenResponseBody$,16]],1];We.CreateOAuth2TokenResponseBody$=[3,u,kr,0,[Ne,he,we,x,ge],[[()=>We.AccessToken$,{[d]:Ne}],[0,{[d]:he}],[1,{[d]:we}],[()=>Ae,{[d]:x}],[0,{[d]:ge}]],4];We.CreateOAuth2Token$=[9,u,Qr,{[tt]:["POST","/v1/token",200]},()=>We.CreateOAuth2TokenRequest$,()=>We.CreateOAuth2TokenResponse$]});var sr=p((rr)=>{Object.defineProperty(rr,"__esModule",{value:!0});rr.getRuntimeConfig=void 0;var ct=L(),vt=pt(),Et=er(),yt=M(),St=lt(),Ce=at(),_e=ut(),Pt=V(),Ot=Ie(),It=C(),qt=(e)=>{return{apiVersion:"2023-01-01",base64Decoder:e?.base64Decoder??Ce.fromBase64,base64Encoder:e?.base64Encoder??Ce.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ot.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Pt.defaultSigninHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(r)=>r.getIdentityProvider("aws.auth#sigv4"),signer:new ct.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(r)=>r.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Et.NoAuthSigner}],logger:e?.logger??new yt.NoOpLogger,protocol:e?.protocol??vt.AwsRestJsonProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:It.errorTypeRegistries,version:"2023-01-01",serviceTarget:"Signin"},serviceId:e?.serviceId??"Signin",urlParser:e?.urlParser??St.parseUrl,utf8Decoder:e?.utf8Decoder??_e.fromUtf8,utf8Encoder:e?.utf8Encoder??_e.toUtf8}};rr.getRuntimeConfig=qt});var vr=p((pr)=>{Object.defineProperty(pr,"__esModule",{value:!0});pr.getRuntimeConfig=void 0;var gt=bt(),ft=gt.__importDefault(Nt()),or=L(),nr=Mt(),G=ar(),Gt=Ut(),ir=lr(),P=Ft(),dr=Dt(),ur=M(),$t=wt(),ht=xt(),Ht=Rt(),Lt=sr(),Vt=(e)=>{(0,ur.emitWarningIfUnsupportedVersion)(process.version);let r=(0,ht.resolveDefaultsModeConfig)(e),t=()=>r().then(ur.loadConfigsForDefaultMode),a=(0,Lt.getRuntimeConfig)(e);(0,or.emitWarningIfUnsupportedVersion)(process.version);let i={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:r,authSchemePreference:e?.authSchemePreference??(0,P.loadConfig)(or.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,i),bodyLengthChecker:e?.bodyLengthChecker??$t.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,nr.createDefaultUserAgentProvider)({serviceId:a.serviceId,clientVersion:ft.default.version}),maxAttempts:e?.maxAttempts??(0,P.loadConfig)(ir.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,P.loadConfig)(G.NODE_REGION_CONFIG_OPTIONS,{...G.NODE_REGION_CONFIG_FILE_OPTIONS,...i}),requestHandler:dr.NodeHttpHandler.create(e?.requestHandler??t),retryMode:e?.retryMode??(0,P.loadConfig)({...ir.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await t()).retryMode||Ht.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Gt.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??dr.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,P.loadConfig)(G.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,i),useFipsEndpoint:e?.useFipsEndpoint??(0,P.loadConfig)(G.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,i),userAgentAppId:e?.userAgentAppId??(0,P.loadConfig)(nr.NODE_APP_ID_CONFIG_OPTIONS,i)}};pr.getRuntimeConfig=Vt});var vs=p((v)=>{var Er=At(),Qt=Wt(),Zt=Yt(),yr=jt(),Kt=ar(),_=er(),kt=He(),Tt=Bt(),qr=Jt(),Sr=lr(),O=M(),Pr=V(),mt=vr(),Or=Xt(),Ir=zt(),D=C(),$=k(),Ct=U(),_t=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"signin"})},es={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},rs=(e)=>{let{httpAuthSchemes:r,httpAuthSchemeProvider:t,credentials:a}=e;return{setHttpAuthScheme(i){let b=r.findIndex((h)=>h.schemeId===i.schemeId);if(b===-1)r.push(i);else r.splice(b,1,i)},httpAuthSchemes(){return r},setHttpAuthSchemeProvider(i){t=i},httpAuthSchemeProvider(){return t},setCredentials(i){a=i},credentials(){return a}}},ts=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}},ss=(e,r)=>{let t=Object.assign(Or.getAwsRegionExtensionConfiguration(e),O.getDefaultExtensionConfiguration(e),Ir.getHttpHandlerExtensionConfiguration(e),rs(e));return r.forEach((a)=>a.configure(t)),Object.assign(e,Or.resolveAwsRegionExtensionConfiguration(t),O.resolveDefaultRuntimeConfig(t),Ir.resolveHttpHandlerRuntimeConfig(t),ts(t))};class ee extends O.Client{config;constructor(...[e]){let r=mt.getRuntimeConfig(e||{});super(r);this.initConfig=r;let t=_t(r),a=yr.resolveUserAgentConfig(t),i=Sr.resolveRetryConfig(a),b=Kt.resolveRegionConfig(i),h=Er.resolveHostHeaderConfig(b),Dr=qr.resolveEndpointConfig(h),br=Pr.resolveHttpAuthSchemeConfig(Dr),Rr=ss(br,e?.extensions||[]);this.config=Rr,this.middlewareStack.use(kt.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(yr.getUserAgentPlugin(this.config)),this.middlewareStack.use(Sr.getRetryPlugin(this.config)),this.middlewareStack.use(Tt.getContentLengthPlugin(this.config)),this.middlewareStack.use(Er.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Qt.getLoggerPlugin(this.config)),this.middlewareStack.use(Zt.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(_.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Pr.defaultSigninHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(Fr)=>new _.DefaultIdentityProviderConfig({"aws.auth#sigv4":Fr.credentials})})),this.middlewareStack.use(_.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class re extends O.Command.classBuilder().ep(es).m(function(e,r,t,a){return[qr.getEndpointPlugin(t,e.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(D.CreateOAuth2Token$).build(){}var os={CreateOAuth2TokenCommand:re};class te extends ee{}O.createAggregatedClient(os,te);var ns={AUTHCODE_EXPIRED:"AUTHCODE_EXPIRED",INSUFFICIENT_PERMISSIONS:"INSUFFICIENT_PERMISSIONS",INVALID_REQUEST:"INVALID_REQUEST",SERVER_ERROR:"server_error",TOKEN_EXPIRED:"TOKEN_EXPIRED",USER_CREDENTIALS_CHANGED:"USER_CREDENTIALS_CHANGED"};v.$Command=O.Command;v.__Client=O.Client;v.SigninServiceException=Ct.SigninServiceException;v.CreateOAuth2TokenCommand=re;v.OAuth2ErrorCode=ns;v.Signin=te;v.SigninClient=ee;Object.prototype.hasOwnProperty.call(D,"__proto__")&&!Object.prototype.hasOwnProperty.call(v,"__proto__")&&Object.defineProperty(v,"__proto__",{enumerable:!0,value:D.__proto__});Object.keys(D).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(v,e))v[e]=D[e]});Object.prototype.hasOwnProperty.call($,"__proto__")&&!Object.prototype.hasOwnProperty.call(v,"__proto__")&&Object.defineProperty(v,"__proto__",{enumerable:!0,value:$.__proto__});Object.keys($).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(v,e))v[e]=$[e]})});export default vs();
2
+ import{k as Nt}from"./chunk-e0v4byjp.js";import{A as Mt,B as Ut,C as wt,D as xt,E as pt,F as Xt,l as er,n as L,o as At,p as Wt,q as Yt,s as Hr,t as Lr,u as Rt,v as jt,w as ar,x as Bt,y as Jt,z as lr}from"./chunk-w34j3cd3.js";import{G as Ft}from"./chunk-rq2k9frr.js";import"./chunk-3mp9p38x.js";import{I as Nr,J as at,L as Dt,P as He,T as M}from"./chunk-nxh5a3eb.js";import{U as zt}from"./chunk-7zg1mt1g.js";import"./chunk-e1fkxt82.js";import{Y as ut}from"./chunk-9zmcz7yq.js";import{Z as lt}from"./chunk-8bjxk57p.js";import"./chunk-jkjt3e06.js";import"./chunk-8jpvj3cj.js";import{ha as bt}from"./chunk-rnjbja88.js";import{ug as p}from"./chunk-r6v21jn6.js";var V=p((se)=>{Object.defineProperty(se,"__esModule",{value:!0});se.resolveHttpAuthSchemeConfig=se.defaultSigninHttpAuthSchemeProvider=se.defaultSigninHttpAuthSchemeParametersProvider=void 0;var Mr=L(),H=Nr(),Ur=async(e,r,t)=>{return{operation:(0,H.getSmithyContext)(r).operation,region:await(0,H.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};se.defaultSigninHttpAuthSchemeParametersProvider=Ur;function wr(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:e.region},propertiesExtractor:(r,t)=>({signingProperties:{config:r,context:t}})}}function xr(e){return{schemeId:"smithy.api#noAuth"}}var gr=(e)=>{let r=[];switch(e.operation){case"CreateOAuth2Token":{r.push(xr(e));break}default:r.push(wr(e))}return r};se.defaultSigninHttpAuthSchemeProvider=gr;var fr=(e)=>{let r=(0,Mr.resolveAwsSdkSigV4Config)(e);return Object.assign(r,{authSchemePreference:(0,H.normalizeProvider)(e.authSchemePreference??[])})};se.resolveHttpAuthSchemeConfig=fr});var Se=p((Ee)=>{Object.defineProperty(Ee,"__esModule",{value:!0});Ee.ruleSet=void 0;var ve="required",o="fn",n="argv",c="ref",ne=!0,ie="isSet",S="booleanEquals",I="error",E="endpoint",l="tree",N="PartitionResult",z="stringEquals",de={[ve]:!0,default:!1,type:"boolean"},ue={[ve]:!1,type:"string"},ae={[c]:"Endpoint"},A={[o]:S,[n]:[{[c]:"UseFIPS"},!0]},W={[o]:S,[n]:[{[c]:"UseDualStack"},!0]},s={},Y={[o]:"getAttr",[n]:[{[c]:N},"name"]},R={[o]:S,[n]:[{[c]:"UseFIPS"},!1]},F={[o]:S,[n]:[{[c]:"UseDualStack"},!1]},le={[o]:"getAttr",[n]:[{[c]:N},"supportsFIPS"]},pe={[o]:S,[n]:[!0,{[o]:"getAttr",[n]:[{[c]:N},"supportsDualStack"]}]},ce=[{[c]:"Region"}],hr={version:"1.0",parameters:{UseDualStack:de,UseFIPS:de,Endpoint:ue,Region:ue},rules:[{conditions:[{[o]:ie,[n]:[ae]}],rules:[{conditions:[A],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:I},{rules:[{conditions:[W],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:I},{endpoint:{url:ae,properties:s,headers:s},type:E}],type:l}],type:l},{rules:[{conditions:[{[o]:ie,[n]:ce}],rules:[{conditions:[{[o]:"aws.partition",[n]:ce,assign:N}],rules:[{conditions:[{[o]:z,[n]:[Y,"aws"]},R,F],endpoint:{url:"https://{Region}.signin.aws.amazon.com",properties:s,headers:s},type:E},{conditions:[{[o]:z,[n]:[Y,"aws-cn"]},R,F],endpoint:{url:"https://{Region}.signin.amazonaws.cn",properties:s,headers:s},type:E},{conditions:[{[o]:z,[n]:[Y,"aws-us-gov"]},R,F],endpoint:{url:"https://{Region}.signin.amazonaws-us-gov.com",properties:s,headers:s},type:E},{conditions:[A,W],rules:[{conditions:[{[o]:S,[n]:[ne,le]},pe],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:s,headers:s},type:E}],type:l},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:I}],type:l},{conditions:[A,F],rules:[{conditions:[{[o]:S,[n]:[le,ne]}],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",properties:s,headers:s},type:E}],type:l},{error:"FIPS is enabled but this partition does not support FIPS",type:I}],type:l},{conditions:[R,W],rules:[{conditions:[pe],rules:[{endpoint:{url:"https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:s,headers:s},type:E}],type:l},{error:"DualStack is enabled but this partition does not support DualStack",type:I}],type:l},{endpoint:{url:"https://signin.{Region}.{PartitionResult#dnsSuffix}",properties:s,headers:s},type:E}],type:l}],type:l},{error:"Invalid Configuration: Missing Region",type:I}],type:l}]};Ee.ruleSet=hr});var Ie=p((Pe)=>{Object.defineProperty(Pe,"__esModule",{value:!0});Pe.defaultEndpointResolver=void 0;var Vr=Lr(),j=Hr(),zr=Se(),Ar=new j.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Wr=(e,r={})=>{return Ar.get(e,()=>(0,j.resolveEndpoint)(zr.ruleSet,{endpointParams:e,logger:r.logger}))};Pe.defaultEndpointResolver=Wr;j.customEndpointFunctions.aws=Vr.awsEndpointFunctions});var U=p((J)=>{Object.defineProperty(J,"__esModule",{value:!0});J.SigninServiceException=J.__ServiceException=void 0;var qe=M();Object.defineProperty(J,"__ServiceException",{enumerable:!0,get:function(){return qe.ServiceException}});class B extends qe.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,B.prototype)}}J.SigninServiceException=B});var k=p((be)=>{Object.defineProperty(be,"__esModule",{value:!0});be.ValidationException=be.TooManyRequestsError=be.InternalServerException=be.AccessDeniedException=void 0;var w=U();class X extends w.SigninServiceException{name="AccessDeniedException";$fault="client";error;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});Object.setPrototypeOf(this,X.prototype),this.error=e.error}}be.AccessDeniedException=X;class Q extends w.SigninServiceException{name="InternalServerException";$fault="server";error;constructor(e){super({name:"InternalServerException",$fault:"server",...e});Object.setPrototypeOf(this,Q.prototype),this.error=e.error}}be.InternalServerException=Q;class Z extends w.SigninServiceException{name="TooManyRequestsError";$fault="client";error;constructor(e){super({name:"TooManyRequestsError",$fault:"client",...e});Object.setPrototypeOf(this,Z.prototype),this.error=e.error}}be.TooManyRequestsError=Z;class K extends w.SigninServiceException{name="ValidationException";$fault="client";error;constructor(e){super({name:"ValidationException",$fault:"client",...e});Object.setPrototypeOf(this,K.prototype),this.error=e.error}}be.ValidationException=K});var C=p((We)=>{Object.defineProperty(We,"__esModule",{value:!0});We.CreateOAuth2Token$=We.CreateOAuth2TokenResponseBody$=We.CreateOAuth2TokenResponse$=We.CreateOAuth2TokenRequestBody$=We.CreateOAuth2TokenRequest$=We.AccessToken$=We.errorTypeRegistries=We.ValidationException$=We.TooManyRequestsError$=We.InternalServerException$=We.AccessDeniedException$=We.SigninServiceException$=void 0;var Jr="AccessDeniedException",Xr="AccessToken",Qr="CreateOAuth2Token",Zr="CreateOAuth2TokenRequest",Kr="CreateOAuth2TokenRequestBody",kr="CreateOAuth2TokenResponseBody",Tr="CreateOAuth2TokenResponse",mr="InternalServerException",Cr="RefreshToken",_r="TooManyRequestsError",et="ValidationException",Fe="accessKeyId",Ne="accessToken",T="client",Me="clientId",Ue="codeVerifier",rt="code",y="error",we="expiresIn",xe="grantType",tt="http",m="httpError",ge="idToken",d="jsonName",g="message",x="refreshToken",fe="redirectUri",Le="smithy.ts.sdk.synthetic.com.amazonaws.signin",Ge="secretAccessKey",$e="sessionToken",st="server",ot="tokenInput",nt="tokenOutput",he="tokenType",u="com.amazonaws.signin",Ve=He(),f=k(),it=U(),ze=Ve.TypeRegistry.for(Le);We.SigninServiceException$=[-3,Le,"SigninServiceException",0,[],[]];ze.registerError(We.SigninServiceException$,it.SigninServiceException);var q=Ve.TypeRegistry.for(u);We.AccessDeniedException$=[-3,u,Jr,{[y]:T},[y,g],[0,0],2];q.registerError(We.AccessDeniedException$,f.AccessDeniedException);We.InternalServerException$=[-3,u,mr,{[y]:st,[m]:500},[y,g],[0,0],2];q.registerError(We.InternalServerException$,f.InternalServerException);We.TooManyRequestsError$=[-3,u,_r,{[y]:T,[m]:429},[y,g],[0,0],2];q.registerError(We.TooManyRequestsError$,f.TooManyRequestsError);We.ValidationException$=[-3,u,et,{[y]:T,[m]:400},[y,g],[0,0],2];q.registerError(We.ValidationException$,f.ValidationException);We.errorTypeRegistries=[ze,q];var Ae=[0,u,Cr,8,0];We.AccessToken$=[3,u,Xr,8,[Fe,Ge,$e],[[0,{[d]:Fe}],[0,{[d]:Ge}],[0,{[d]:$e}]],3];We.CreateOAuth2TokenRequest$=[3,u,Zr,0,[ot],[[()=>We.CreateOAuth2TokenRequestBody$,16]],1];We.CreateOAuth2TokenRequestBody$=[3,u,Kr,0,[Me,xe,rt,fe,Ue,x],[[0,{[d]:Me}],[0,{[d]:xe}],0,[0,{[d]:fe}],[0,{[d]:Ue}],[()=>Ae,{[d]:x}]],2];We.CreateOAuth2TokenResponse$=[3,u,Tr,0,[nt],[[()=>We.CreateOAuth2TokenResponseBody$,16]],1];We.CreateOAuth2TokenResponseBody$=[3,u,kr,0,[Ne,he,we,x,ge],[[()=>We.AccessToken$,{[d]:Ne}],[0,{[d]:he}],[1,{[d]:we}],[()=>Ae,{[d]:x}],[0,{[d]:ge}]],4];We.CreateOAuth2Token$=[9,u,Qr,{[tt]:["POST","/v1/token",200]},()=>We.CreateOAuth2TokenRequest$,()=>We.CreateOAuth2TokenResponse$]});var sr=p((rr)=>{Object.defineProperty(rr,"__esModule",{value:!0});rr.getRuntimeConfig=void 0;var ct=L(),vt=pt(),Et=er(),yt=M(),St=lt(),Ce=at(),_e=ut(),Pt=V(),Ot=Ie(),It=C(),qt=(e)=>{return{apiVersion:"2023-01-01",base64Decoder:e?.base64Decoder??Ce.fromBase64,base64Encoder:e?.base64Encoder??Ce.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ot.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Pt.defaultSigninHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(r)=>r.getIdentityProvider("aws.auth#sigv4"),signer:new ct.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(r)=>r.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Et.NoAuthSigner}],logger:e?.logger??new yt.NoOpLogger,protocol:e?.protocol??vt.AwsRestJsonProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:It.errorTypeRegistries,version:"2023-01-01",serviceTarget:"Signin"},serviceId:e?.serviceId??"Signin",urlParser:e?.urlParser??St.parseUrl,utf8Decoder:e?.utf8Decoder??_e.fromUtf8,utf8Encoder:e?.utf8Encoder??_e.toUtf8}};rr.getRuntimeConfig=qt});var vr=p((pr)=>{Object.defineProperty(pr,"__esModule",{value:!0});pr.getRuntimeConfig=void 0;var gt=bt(),ft=gt.__importDefault(Nt()),or=L(),nr=Mt(),G=ar(),Gt=Ut(),ir=lr(),P=Ft(),dr=Dt(),ur=M(),$t=wt(),ht=xt(),Ht=Rt(),Lt=sr(),Vt=(e)=>{(0,ur.emitWarningIfUnsupportedVersion)(process.version);let r=(0,ht.resolveDefaultsModeConfig)(e),t=()=>r().then(ur.loadConfigsForDefaultMode),a=(0,Lt.getRuntimeConfig)(e);(0,or.emitWarningIfUnsupportedVersion)(process.version);let i={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:r,authSchemePreference:e?.authSchemePreference??(0,P.loadConfig)(or.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,i),bodyLengthChecker:e?.bodyLengthChecker??$t.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,nr.createDefaultUserAgentProvider)({serviceId:a.serviceId,clientVersion:ft.default.version}),maxAttempts:e?.maxAttempts??(0,P.loadConfig)(ir.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,P.loadConfig)(G.NODE_REGION_CONFIG_OPTIONS,{...G.NODE_REGION_CONFIG_FILE_OPTIONS,...i}),requestHandler:dr.NodeHttpHandler.create(e?.requestHandler??t),retryMode:e?.retryMode??(0,P.loadConfig)({...ir.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await t()).retryMode||Ht.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Gt.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??dr.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,P.loadConfig)(G.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,i),useFipsEndpoint:e?.useFipsEndpoint??(0,P.loadConfig)(G.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,i),userAgentAppId:e?.userAgentAppId??(0,P.loadConfig)(nr.NODE_APP_ID_CONFIG_OPTIONS,i)}};pr.getRuntimeConfig=Vt});var vs=p((v)=>{var Er=At(),Qt=Wt(),Zt=Yt(),yr=jt(),Kt=ar(),_=er(),kt=He(),Tt=Bt(),qr=Jt(),Sr=lr(),O=M(),Pr=V(),mt=vr(),Or=Xt(),Ir=zt(),D=C(),$=k(),Ct=U(),_t=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"signin"})},es={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},rs=(e)=>{let{httpAuthSchemes:r,httpAuthSchemeProvider:t,credentials:a}=e;return{setHttpAuthScheme(i){let b=r.findIndex((h)=>h.schemeId===i.schemeId);if(b===-1)r.push(i);else r.splice(b,1,i)},httpAuthSchemes(){return r},setHttpAuthSchemeProvider(i){t=i},httpAuthSchemeProvider(){return t},setCredentials(i){a=i},credentials(){return a}}},ts=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}},ss=(e,r)=>{let t=Object.assign(Or.getAwsRegionExtensionConfiguration(e),O.getDefaultExtensionConfiguration(e),Ir.getHttpHandlerExtensionConfiguration(e),rs(e));return r.forEach((a)=>a.configure(t)),Object.assign(e,Or.resolveAwsRegionExtensionConfiguration(t),O.resolveDefaultRuntimeConfig(t),Ir.resolveHttpHandlerRuntimeConfig(t),ts(t))};class ee extends O.Client{config;constructor(...[e]){let r=mt.getRuntimeConfig(e||{});super(r);this.initConfig=r;let t=_t(r),a=yr.resolveUserAgentConfig(t),i=Sr.resolveRetryConfig(a),b=Kt.resolveRegionConfig(i),h=Er.resolveHostHeaderConfig(b),Dr=qr.resolveEndpointConfig(h),br=Pr.resolveHttpAuthSchemeConfig(Dr),Rr=ss(br,e?.extensions||[]);this.config=Rr,this.middlewareStack.use(kt.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(yr.getUserAgentPlugin(this.config)),this.middlewareStack.use(Sr.getRetryPlugin(this.config)),this.middlewareStack.use(Tt.getContentLengthPlugin(this.config)),this.middlewareStack.use(Er.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Qt.getLoggerPlugin(this.config)),this.middlewareStack.use(Zt.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(_.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Pr.defaultSigninHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(Fr)=>new _.DefaultIdentityProviderConfig({"aws.auth#sigv4":Fr.credentials})})),this.middlewareStack.use(_.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class re extends O.Command.classBuilder().ep(es).m(function(e,r,t,a){return[qr.getEndpointPlugin(t,e.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(D.CreateOAuth2Token$).build(){}var os={CreateOAuth2TokenCommand:re};class te extends ee{}O.createAggregatedClient(os,te);var ns={AUTHCODE_EXPIRED:"AUTHCODE_EXPIRED",INSUFFICIENT_PERMISSIONS:"INSUFFICIENT_PERMISSIONS",INVALID_REQUEST:"INVALID_REQUEST",SERVER_ERROR:"server_error",TOKEN_EXPIRED:"TOKEN_EXPIRED",USER_CREDENTIALS_CHANGED:"USER_CREDENTIALS_CHANGED"};v.$Command=O.Command;v.__Client=O.Client;v.SigninServiceException=Ct.SigninServiceException;v.CreateOAuth2TokenCommand=re;v.OAuth2ErrorCode=ns;v.Signin=te;v.SigninClient=ee;Object.prototype.hasOwnProperty.call(D,"__proto__")&&!Object.prototype.hasOwnProperty.call(v,"__proto__")&&Object.defineProperty(v,"__proto__",{enumerable:!0,value:D.__proto__});Object.keys(D).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(v,e))v[e]=D[e]});Object.prototype.hasOwnProperty.call($,"__proto__")&&!Object.prototype.hasOwnProperty.call(v,"__proto__")&&Object.defineProperty(v,"__proto__",{enumerable:!0,value:$.__proto__});Object.keys($).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(v,e))v[e]=$[e]})});export default vs();
3
3
 
4
- //# debugId=7521E42AED1FD9F964756E2164756E21
4
+ //# debugId=7E606FC52DF39DB664756E2164756E21
@@ -13,6 +13,6 @@
13
13
  "'use strict';\n\nvar middlewareHostHeader = require('@aws-sdk/middleware-host-header');\nvar middlewareLogger = require('@aws-sdk/middleware-logger');\nvar middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');\nvar middlewareUserAgent = require('@aws-sdk/middleware-user-agent');\nvar configResolver = require('@smithy/config-resolver');\nvar core = require('@smithy/core');\nvar schema = require('@smithy/core/schema');\nvar middlewareContentLength = require('@smithy/middleware-content-length');\nvar middlewareEndpoint = require('@smithy/middleware-endpoint');\nvar middlewareRetry = require('@smithy/middleware-retry');\nvar smithyClient = require('@smithy/smithy-client');\nvar httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');\nvar runtimeConfig = require('./runtimeConfig');\nvar regionConfigResolver = require('@aws-sdk/region-config-resolver');\nvar protocolHttp = require('@smithy/protocol-http');\nvar schemas_0 = require('./schemas/schemas_0');\nvar errors = require('./models/errors');\nvar SigninServiceException = require('./models/SigninServiceException');\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"signin\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SigninClient extends smithyClient.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);\n const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);\n const _config_4 = configResolver.resolveRegionConfig(_config_3);\n const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);\n const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);\n const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));\n this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));\n this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));\n this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));\n this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSigninHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(core.getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nclass CreateOAuth2TokenCommand extends smithyClient.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"Signin\", \"CreateOAuth2Token\", {})\n .n(\"SigninClient\", \"CreateOAuth2TokenCommand\")\n .sc(schemas_0.CreateOAuth2Token$)\n .build() {\n}\n\nconst commands = {\n CreateOAuth2TokenCommand,\n};\nclass Signin extends SigninClient {\n}\nsmithyClient.createAggregatedClient(commands, Signin);\n\nconst OAuth2ErrorCode = {\n AUTHCODE_EXPIRED: \"AUTHCODE_EXPIRED\",\n INSUFFICIENT_PERMISSIONS: \"INSUFFICIENT_PERMISSIONS\",\n INVALID_REQUEST: \"INVALID_REQUEST\",\n SERVER_ERROR: \"server_error\",\n TOKEN_EXPIRED: \"TOKEN_EXPIRED\",\n USER_CREDENTIALS_CHANGED: \"USER_CREDENTIALS_CHANGED\",\n};\n\nexports.$Command = smithyClient.Command;\nexports.__Client = smithyClient.Client;\nexports.SigninServiceException = SigninServiceException.SigninServiceException;\nexports.CreateOAuth2TokenCommand = CreateOAuth2TokenCommand;\nexports.OAuth2ErrorCode = OAuth2ErrorCode;\nexports.Signin = Signin;\nexports.SigninClient = SigninClient;\nObject.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&\n !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n Object.defineProperty(exports, '__proto__', {\n enumerable: true,\n value: schemas_0['__proto__']\n });\n\nObject.keys(schemas_0).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];\n});\nObject.prototype.hasOwnProperty.call(errors, '__proto__') &&\n !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n Object.defineProperty(exports, '__proto__', {\n enumerable: true,\n value: errors['__proto__']\n });\n\nObject.keys(errors).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];\n});\n"
14
14
  ],
15
15
  "mappings": ";uuBACA,CAAO,SAAe,HAAS,OAAc,LAAE,AAAO,JAAK,LAAC,JACpD,yBAAsC,iCAA8C,2CAAqD,OACjJ,IAAM,OACA,OACA,GAAgD,MAAO,EAAQ,EAAS,IAAU,CACpF,MAAO,CACH,WAAY,EAAG,EAAkB,kBAAkB,CAAO,EAAE,UAC5D,OAAS,MAAO,EAAG,EAAkB,mBAAmB,EAAO,MAAM,EAAE,IAClE,IAAM,CACH,MAAU,MAAM,yDAAyD,IAC1E,CACX,GAEI,iDAAgD,GACxD,SAAS,EAAgC,CAAC,EAAgB,CACtD,MAAO,CACH,SAAU,iBACV,kBAAmB,CACf,KAAM,SACN,OAAQ,EAAe,MAC3B,EACA,oBAAqB,CAAC,EAAQ,KAAa,CACvC,kBAAmB,CACf,SACA,SACJ,CACJ,EACJ,EAEJ,SAAS,EAAmC,CAAC,EAAgB,CACzD,MAAO,CACH,SAAU,mBACd,EAEJ,IAAM,GAAsC,CAAC,IAAmB,CAC5D,IAAM,EAAU,CAAC,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Aa,CACxC,WAAY,GACZ,MAAO,EAAU,SACrB,CAAC,EAEL,OAAO,KAAK,CAAS,EAAE,QAAQ,QAAS,CAAC,EAAG,CACxC,GAAI,IAAM,WAAa,CAAC,OAAO,UAAU,eAAe,KAAK,EAAS,CAAC,EAAG,EAAQ,GAAK,EAAU,GACpG,EACD,OAAO,UAAU,eAAe,KAAK,EAAQ,WAAW,GACpD,CAAC,OAAO,UAAU,eAAe,KAAK,EAAS,WAAW,GAC1D,OAAO,eAAe,EAAS,YAAa,CACxC,WAAY,GACZ,MAAO,EAAO,SAClB,CAAC,EAEL,OAAO,KAAK,CAAM,EAAE,QAAQ,QAAS,CAAC,EAAG,CACrC,GAAI,IAAM,WAAa,CAAC,OAAO,UAAU,eAAe,KAAK,EAAS,CAAC,EAAG,EAAQ,GAAK,EAAO,GACjG",
16
- "debugId": "7521E42AED1FD9F964756E2164756E21",
16
+ "debugId": "7E606FC52DF39DB664756E2164756E21",
17
17
  "names": []
18
18
  }
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{$b as T,bc as D}from"./chunk-ssg20z9s.js";import{bg as C}from"./chunk-7hbhbht2.js";import{mg as I,ng as Z,og as A}from"./chunk-e785380d.js";class R extends Error{code;constructor(G,H=1){super(G);this.code=H;this.name="CommandFailed"}}class K{static commandName="unset";static description="";static args=[];static options=[];run(G){}}function p(G){return G}function S(){return{commands:[],commandsDir:"app/commands"}}var Q=Symbol.for("gemi.console.builder");function x(G){if(G.trim()==="")throw Error("A command name cannot be empty.");if(/[{}]/.test(G)||/\s/.test(G))throw Error(`Invalid command name ${JSON.stringify(G)}. gemi does not parse a signature string; the name is the whole of it. Declare arguments with .arg() and flags with .option():
2
+ import{ac as T,cc as D}from"./chunk-7wgk7q33.js";import{dg as C}from"./chunk-pcxxnnad.js";import{og as I,pg as Z,qg as A}from"./chunk-2dvjj3ad.js";class R extends Error{code;constructor(G,H=1){super(G);this.code=H;this.name="CommandFailed"}}class K{static commandName="unset";static description="";static args=[];static options=[];run(G){}}function p(G){return G}function S(){return{commands:[],commandsDir:"app/commands"}}var Q=Symbol.for("gemi.console.builder");function x(G){if(G.trim()==="")throw Error("A command name cannot be empty.");if(/[{}]/.test(G)||/\s/.test(G))throw Error(`Invalid command name ${JSON.stringify(G)}. gemi does not parse a signature string; the name is the whole of it. Declare arguments with .arg() and flags with .option():
3
3
 
4
4
  defineCommand("mail:send")
5
5
  .arg("user", { required: true })
@@ -14,6 +14,6 @@ import{$b as T,bc as D}from"./chunk-ssg20z9s.js";import{bg as C}from"./chunk-7hb
14
14
  static event = UserRegistered;
15
15
 
16
16
  If this is an abstract base its subclasses extend, move it out of the `+"listeners directory \u2014 the walk excludes gemi's `Listener` and "+"nothing else, so a base sitting beside its subclasses is registered and run like one of them.")}function v(G){for(let H of G){if(Object.getOwnPropertyDescriptor(H,"name")?.writable)continue;console.warn(`Event listener ${H.name} does not declare \`static name\`, so it is registered under its class name, which a production build renames. Nothing reads that name across a build boundary while the `+"listener is sync, which is why this is a warning \u2014 but adding "+`\`queued = true\` to it is refused at boot for the same reason, because the queue's key is that string. Add: static name = "${H.name}";`)}}function b(G){let H=new Set;for(let{event:P}of G){if(H.has(P))continue;if(Object.getOwnPropertyDescriptor(P,"name")?.writable)continue;H.add(P),console.warn(`Event ${P.name} does not declare \`static name\`, so it is dispatched under its class name. A production build minifies the code that dispatches it and renames the class, while discovery reads `+"the listener's copy from source and does not \u2014 so the dispatch would "+`reach no listener in production and nowhere else. Add: static name = "${P.name}";`)}}
17
- export{R as Jb,K as Kb,p as Lb,S as Mb,c as Nb,_ as Ob,o as Pb,W as Qb,i as Rb,B as Sb,M as Tb,U as Ub,JG as Vb,OG as Wb,QG as Xb,_G as Yb};
17
+ export{R as Kb,K as Lb,p as Mb,S as Nb,c as Ob,_ as Pb,o as Qb,W as Rb,i as Sb,B as Tb,M as Ub,U as Vb,JG as Wb,OG as Xb,QG as Yb,_G as Zb};
18
18
 
19
- //# debugId=7579C0620CDF411764756E2164756E21
19
+ //# debugId=B83C1DAF42EDD27564756E2164756E21
@@ -13,6 +13,6 @@
13
13
  "import { existsSync } from \"node:fs\";\nimport { dirname, isAbsolute, join } from \"node:path\";\n\nimport {\n discoverClasses,\n DiscoveryError,\n projectRoot,\n} from \"../support/discover\";\nimport { Command, type CommandClass } from \"../console/Command\";\nimport { commandConfigDefaults } from \"../console/config\";\nimport { isUnfinishedBuilder } from \"../console/builder\";\nimport { CronJob } from \"./cron/CronJob\";\nimport { scheduleConfigDefaults } from \"./cron/config\";\nimport { eventConfigDefaults } from \"./events/config\";\nimport type { EventClass } from \"./events/Event\";\nimport { Listener, type ListenerClass } from \"./events/Listener\";\nimport { Job } from \"./queue/Job\";\nimport { queueConfigDefaults } from \"./queue/config\";\n\n/**\n * Reading an application's jobs off the filesystem, for the two subsystems that\n * were asking every app to write its job list twice.\n *\n * Both functions here are the same call to `discoverClasses` with a different\n * base class, which is deliberate: one walk, one set of skip rules, one answer\n * to \"what does this app have\". They are exported from `gemi/services` rather\n * than kept private to the providers because the list stopped being something\n * an app could import — a test that used to walk the exported `jobs` array\n * needs somewhere to ask the same question, and so does a script.\n *\n * What the providers add on top of these is the decision of *whether* to ask,\n * which is the config's to make and not this file's.\n */\n\n/**\n * A directory the app named, resolved the way the app meant it.\n *\n * Relative paths hang off the project root rather than `process.cwd()` at the\n * moment of the call, because a config slice saying `app/jobs` means the app's\n * `app/jobs` and not whatever directory somebody happened to launch a script\n * from. Absolute paths are taken as given, which is what makes these callable\n * from a test that has no project around it.\n */\nfunction resolveDir(dir: string): string {\n return isAbsolute(dir) ? dir : join(projectRoot(), dir);\n}\n\n/**\n * Says something when the directory is missing *and so is the tree it lives in*.\n *\n * A missing directory has two readings and they want opposite responses. An app\n * that has never written a cron job has no `app/cron`, and warning about that on\n * every boot for the rest of its life is noise — the answer \"you have no cron\n * jobs\" is correct and uninteresting. But a deploy that ships `dist/` and\n * `node_modules/` without the source has no `app/cron` *and no `app/`*, and\n * there discovery quietly returns nothing while the app very much does have\n * jobs: the exact silence #322 and #323 exist to remove, reintroduced one layer\n * down and in production only.\n *\n * The parent directory is what tells them apart. If neither the directory nor\n * the one above it is there, the tree this was pointed into is not there\n * either, and that is worth a sentence.\n */\nfunction warnIfSourceIsMissing(\n resolved: string,\n subject: string,\n slice: string,\n) {\n if (existsSync(resolved) || existsSync(dirname(resolved))) return;\n\n console.warn(\n `No ${subject} were discovered: neither ${resolved} nor the directory ` +\n `above it exists, so this process cannot see the application's source. ` +\n `If this is a deploy that ships only the build output, list the classes ` +\n `explicitly in app/config/${slice}.ts so they travel with it.`,\n );\n}\n\n/**\n * The `Job` subclasses under `dir`, defaulting to the config slice's `app/jobs`.\n *\n * This is what a `queue` config slice with no `jobs` key resolves to. Call it\n * directly to ask the question a test used to answer by importing the array:\n * every job this application would register, in the order it would register\n * them.\n *\n * Every file underneath is imported, so calling this runs the app's job modules\n * — the cost `discoverClasses` documents at length, paid once per call.\n */\nexport async function discoverJobs(\n dir: string = queueConfigDefaults().jobsDir,\n): Promise<Array<new () => Job>> {\n const resolved = resolveDir(dir);\n warnIfSourceIsMissing(resolved, \"queue jobs\", \"queue\");\n const jobs = await discoverClasses(resolved, Job);\n warnIfNameWillNotSurviveTheBuild(jobs);\n return jobs;\n}\n\n/**\n * Says something about a discovered job that never declared `static name`.\n *\n * This is the one hazard discovery introduces rather than removes, and it is\n * production-only. `gemi build` minifies the server entry, and app code\n * reachable from it — a controller, and every job class that controller\n * imports to dispatch — is bundled and minified with it. Minification renames\n * the class binding, and a class's implicit `.name` is that binding: a\n * `TestJob` in the bundle reports `\"D\"`. Discovery, meanwhile, imports\n * `app/jobs/TestJob.ts` from source at runtime, where it is still `\"TestJob\"`.\n * The queue is keyed by that name, so the two halves stop agreeing and the\n * dispatch is dropped — in production, and only there.\n *\n * A declared `static name = \"TestJob\"` is a string literal, which survives\n * minification intact, and the two halves agree again. `docs/jobs-and-queues.md`\n * has always called it required; before discovery an app could get away without\n * it, because the explicit `jobs` array was bundled too and both sides were\n * wrong in the same way.\n *\n * The check is exact rather than a guess: a `static name = \"...\"` class field\n * defines a *writable* own property, while the implicit class name is\n * non-writable. Cron is unaffected — `CronJob.name` is an instance field\n * holding a string literal, not the class binding.\n */\nfunction warnIfNameWillNotSurviveTheBuild(jobs: Array<new () => Job>) {\n for (const job of jobs) {\n if (Object.getOwnPropertyDescriptor(job, \"name\")?.writable) continue;\n\n console.warn(\n `Queued job ${job.name} does not declare \\`static name\\`, so it is ` +\n `registered under its class name. A production build minifies the ` +\n `class that dispatches it and renames it, while discovery reads this ` +\n `file from source and does not — so the dispatch would be dropped in ` +\n `production and nowhere else. Add: static name = \"${job.name}\";`,\n );\n }\n}\n\n/**\n * The `CronJob` subclasses under `dir`, defaulting to the config slice's\n * `app/cron`.\n *\n * This is what a `schedule` config slice with no `jobs` key resolves to. Call it\n * directly to ask the question a test used to answer by importing the array —\n * though after boot `app(Scheduler).jobs` is the better one, because it is what\n * the scheduler actually took rather than what this would find if asked again.\n *\n * Every file underneath is imported, so calling this runs the app's cron\n * modules — the cost `discoverClasses` documents at length, paid once per call.\n */\nexport async function discoverCronJobs(\n dir: string = scheduleConfigDefaults().jobsDir,\n): Promise<Array<new () => CronJob>> {\n const resolved = resolveDir(dir);\n warnIfSourceIsMissing(resolved, \"cron jobs\", \"schedule\");\n return await discoverClasses(resolved, CronJob);\n}\n\n/**\n * The `Command` subclasses under `dir`, defaulting to the config slice's\n * `app/commands`.\n *\n * This is what a `commands`-less `command` slice resolves to, and what\n * `gemi run` lists. Unlike the two above it is not called during boot — a\n * command registry has one consumer, and importing every file under\n * `app/commands` into every server process would be a cost paid on every start\n * for code no request reaches.\n *\n * Every file underneath is imported, so calling this runs the app's command\n * modules — the cost `discoverClasses` documents at length, paid once per call.\n */\nexport async function discoverCommands(\n dir: string = commandConfigDefaults().commandsDir,\n): Promise<CommandClass[]> {\n const resolved = resolveDir(dir);\n warnIfSourceIsMissing(resolved, \"commands\", \"command\");\n\n const unfinished: string[] = [];\n\n const commands = await discoverClasses(\n resolved,\n Command,\n [],\n (value, file) => {\n if (isUnfinishedBuilder(value)) unfinished.push(file);\n },\n );\n\n refuseUnfinishedBuilders(unfinished);\n\n return commands as CommandClass[];\n}\n\n/**\n * Stops the walk for a builder chain that was never finished.\n *\n * This is the one silence the builder introduces, and it is the exact shape\n * #322 and #323 exist to remove. `defineCommand(...).arg(...)` without a\n * trailing `.handle(...)` is a plain object rather than a class, so\n * `discoverClasses` discards it along with every constant and helper a command\n * file happens to export — and the command disappears from `gemi run` with\n * nothing raised. The author sees a listing containing every command except the\n * one they just wrote.\n *\n * A throw rather than a warning, because there is no reading of an unfinished\n * builder under which the author meant it: the chain builds a description of a\n * command and then discards it.\n *\n * \"Unfinished\" is decided by `.handle()` clearing the brand, not by the export\n * still being a builder object. Those differ for the natural way to share\n * declarations —\n *\n * export const base = defineCommand(\"reindex\").option(\"verbose\", …);\n * export default base.handle(async () => {});\n *\n * — where `base` is a builder that *did* produce a command. Keying off the shape\n * alone made that file abort the whole of `gemi run`, taking every other command\n * in the project down with it, under a message that was untrue for it.\n */\nfunction refuseUnfinishedBuilders(files: string[]): void {\n if (files.length === 0) return;\n\n const subject =\n files.length === 1\n ? `${files[0]} exports a command builder that never called \\`.handle()\\``\n : `${files.length} files export a command builder that never called ` +\n `\\`.handle()\\`:\\n ${files.join(\"\\n \")}`;\n\n throw new DiscoveryError(\n `${subject}, so there is no command to run. \\`.handle()\\` is what turns ` +\n `the chain into a command — finish it:\\n\\n` +\n ` export default defineCommand(\"my-command\")\\n` +\n ` .handle(async ({ line }) => { line(\"hello\") })`,\n );\n}\n\n/**\n * The `Listener` subclasses under `dir`, defaulting to the config slice's\n * `app/listeners`.\n *\n * This is what an `events` config slice with no `listeners` key resolves to.\n * Call it directly to ask what an application would register: every listener,\n * in the order it would register them.\n *\n * Only listeners are walked. Event classes are never discovered — each is\n * imported by the listener that binds to it and by the code that dispatches it,\n * so there is nothing a walk over them would find that is not already in the\n * module graph.\n *\n * **Known residual, matching jobs and cron.** `discoverClasses` excludes the\n * `base` it is handed and not intermediates, so an abstract listener base\n * written in `listenersDir` and extended by its siblings is discovered and\n * registered alongside them — constructed, with its `handle` called, on every\n * dispatch of whatever event it declares. Keep shared bases outside the\n * directory.\n *\n * Every file underneath is imported, so calling this runs the app's listener\n * modules — the cost `discoverClasses` documents at length, paid once per call.\n *\n * @throws DiscoveryError if a discovered listener declares no `static event`.\n */\nexport async function discoverListeners(\n dir: string = eventConfigDefaults().listenersDir,\n): Promise<ListenerClass[]> {\n const resolved = resolveDir(dir);\n warnIfSourceIsMissing(resolved, \"event listeners\", \"events\");\n\n const listeners = (await discoverClasses(\n resolved,\n Listener,\n )) as ListenerClass[];\n\n refuseListenersWithNoEvent(listeners);\n warnIfListenerNameWillNotSurviveTheBuild(listeners);\n warnIfEventNameWillNotSurviveTheBuild(listeners);\n\n return listeners;\n}\n\n/**\n * Stops the walk for a listener that binds to nothing.\n *\n * `static event` is declared as required on the base and the compiler still\n * cannot see it missing: every subclass inherits the declaration whether or not\n * it assigns to one, so `typeof SomeListener` type-checks either way. What the\n * author gets instead is a file that is imported, registered under no name, and\n * never called — the silence this whole module is arranged against.\n *\n * A throw rather than a warning, because there is no reading of a listener with\n * no event under which the author meant it. The usual cause is the residual\n * above: an abstract base sharing a gate between two listeners, sitting in\n * `listenersDir` where the walk finds it. Moving it out is the fix, and the\n * message says so — the alternative, excluding it by some guess about\n * abstractness, is how a discovery pass ends up quietly covering less than the\n * directory holds.\n */\nfunction refuseListenersWithNoEvent(listeners: ListenerClass[]): void {\n const orphans = listeners.filter((listener) => !listener.event);\n if (orphans.length === 0) return;\n\n throw new DiscoveryError(\n `${orphans\n .map((listener) => listener.name)\n .join(\", \")} declare no \\`static event\\`, so there is no event name to ` +\n `register them under and their \\`handle\\` would never run. Every ` +\n `listener binds to exactly one event:\\n\\n` +\n ` static event = UserRegistered;\\n\\n` +\n `If this is an abstract base its subclasses extend, move it out of the ` +\n `listeners directory — the walk excludes gemi's \\`Listener\\` and ` +\n `nothing else, so a base sitting beside its subclasses is registered ` +\n `and run like one of them.`,\n );\n}\n\n/**\n * Says something about a discovered listener that never declared `static name`.\n *\n * The hazard is `warnIfNameWillNotSurviveTheBuild`'s, one subsystem over: a\n * `static name = \"...\"` class field defines a *writable* own property while the\n * implicit class binding does not, and a minifier renames the binding while\n * leaving the string literal alone. The two spellings are indistinguishable by\n * value — both read `\"SendWelcomeEmail\"` in development — so the descriptor is\n * the only thing that tells them apart, and the difference only becomes visible\n * in a production build.\n *\n * A warning rather than a refusal, because a *sync* listener's name has no\n * second half to disagree with: every reader of it comes from this same\n * source-side walk, so a minified build and this walk cannot produce two\n * different strings for it. A **queued** listener does have one — the name is\n * the queue's key and it crosses a JSON boundary — and that case is refused\n * outright, by `jobForListener`, at the point the listener is registered with\n * the queue rather than here. This walk cannot tell the two apart without\n * constructing every listener it found; the registry constructs them anyway.\n */\nfunction warnIfListenerNameWillNotSurviveTheBuild(listeners: ListenerClass[]) {\n for (const listener of listeners) {\n if (Object.getOwnPropertyDescriptor(listener, \"name\")?.writable) continue;\n\n console.warn(\n `Event listener ${listener.name} does not declare \\`static name\\`, so ` +\n `it is registered under its class name, which a production build ` +\n `renames. Nothing reads that name across a build boundary while the ` +\n `listener is sync, which is why this is a warning — but adding ` +\n `\\`queued = true\\` to it is refused at boot for the same reason, ` +\n `because the queue's key is that string. Add: static name = ` +\n `\"${listener.name}\";`,\n );\n }\n}\n\n/**\n * Says something about the *event* a discovered listener binds to, when that\n * event's name is the implicit class binding.\n *\n * This is the check that matters from the first dispatch, and it is the reason\n * `discoverListeners` reads `static event` at all. The registry is keyed by the\n * event's name; the dispatcher supplies that name from the class it constructs.\n * A production build minifies the server entry and the app code reachable from\n * it — the controller, and the event class it imports in order to dispatch —\n * while discovery imports `app/listeners/*.ts` from source, and those files\n * import `app/events/*.ts` from source too. Two module graphs, two class\n * objects, and an implicit `.name` that reads `\"UserRegistered\"` on one side\n * and `\"D\"` on the other. The dispatch then finds no listeners, which is legal,\n * normal, and completely silent.\n *\n * A declared `static name` is a string literal, which survives minification\n * intact, and the two halves agree again.\n *\n * Checked through the descriptor rather than the string, and not by comparing\n * `event.name` to anything: in development the two spellings produce the same\n * value, so a check on the string would be a tautology that passes forever.\n */\nfunction warnIfEventNameWillNotSurviveTheBuild(listeners: ListenerClass[]) {\n const warned = new Set<EventClass>();\n\n for (const { event } of listeners) {\n if (warned.has(event)) continue;\n if (Object.getOwnPropertyDescriptor(event, \"name\")?.writable) continue;\n warned.add(event);\n\n console.warn(\n `Event ${event.name} does not declare \\`static name\\`, so it is ` +\n `dispatched under its class name. A production build minifies the ` +\n `code that dispatches it and renames the class, while discovery reads ` +\n `the listener's copy from source and does not — so the dispatch would ` +\n `reach no listener in production and nowhere else. Add: ` +\n `static name = \"${event.name}\";`,\n );\n }\n}\n"
14
14
  ],
15
15
  "mappings": ";+JA4GO,AAAM,IAAsB,KAAM,CAG5B,KAFX,WAAW,CACT,EACS,EAAe,EACxB,CACA,MAAM,CAAO,EAFJ,YAGT,KAAK,KAAO,gBAEhB,CAYO,MAAM,CAAQ,OAKZ,aAAc,cAGd,aAAc,SAGd,MAA0B,CAAC,QAG3B,SAA2B,CAAC,EAWnC,GAAG,CAAC,EAA0B,EAChC,CC1GO,SAAS,CAAmB,CAAC,EAAsC,CACxE,OAAO,EAGF,SAAS,CAAqB,EAA4B,CAC/D,MAAO,CACL,SAAU,CAAC,EACX,YAAa,cACf,ECDK,IAAM,EAA+B,OAAO,IAAI,sBAAsB,EAoF7E,SAAS,CAAgB,CAAC,EAAoB,CAC5C,GAAI,EAAK,KAAK,IAAM,GAClB,MAAU,MAAM,iCAAiC,EAGnD,GAAI,OAAO,KAAK,CAAI,GAAK,KAAK,KAAK,CAAI,EACrC,MAAU,MACR,wBAAwB,KAAK,UAAU,CAAI;AAAA;AAAA;AAAA;AAAA;AAAA,oDAO7C,EAIG,SAAS,CAAa,CAAC,EAAsC,CAClE,EAAiB,CAAI,EAErB,IAAM,EAA0B,CAA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AmB,QAAQ,EAE3D,IAAM,EAAa,MAAM,EACvB,EACA,CACF,EAMA,OAJA,EAA2B,CAAS,EACpC,EAAyC,CAAS,EAClD,EAAsC,CAAS,EAExC,EAoBT,SAAS,CAA0B,CAAC,EAAkC,CACpE,IAAM,EAAU,EAAU,OAAO,CAAC,IAAa,CAAC,EAAS,KAAK,EAC9D,GAAI,EAAQ,SAAW,EAAG,OAE1B,MAAM,IAAI,EACR,GAAG,EACA,IAAI,CAAC,IAAa,EAAS,IAAI,EAC/B,KAAK,IAAI;AAAA;AAAA;AAAA;AAAA,wEAKV,sEACA,+FAEJ,EAuBF,SAAS,CAAwC,CAAC,EAA4B,CAC5E,QAAW,KAAY,EAAW,CAChC,GAAI,OAAO,yBAAyB,EAAU,MAAM,GAAG,SAAU,SAEjE,QAAQ,KACN,kBAAkB,EAAS,gLAGzB,sEACA,+HAEI,EAAS,QACjB,GA0BJ,SAAS,CAAqC,CAAC,EAA4B,CACzE,IAAM,EAAS,IAAI,IAEnB,QAAa,WAAW,EAAW,CACjC,GAAI,EAAO,IAAI,CAAK,EAAG,SACvB,GAAI,OAAO,yBAAyB,EAAO,MAAM,GAAG,SAAU,SAC9D,EAAO,IAAI,CAAK,EAEhB,QAAQ,KACN,SAAS,EAAM,yLAGb,6EACA,yEACkB,EAAM,QAC5B",
16
- "debugId": "7579C0620CDF411764756E2164756E21",
16
+ "debugId": "B83C1DAF42EDD27564756E2164756E21",
17
17
  "names": []
18
18
  }
@@ -1,9 +1,9 @@
1
1
  // @bun
2
- import{Bf as K,Ef as W,Jf as X}from"./chunk-f9ccncar.js";import{AsyncLocalStorage as U}from"async_hooks";var v=new U;function h(){return v.getStore()?.tx}function S(){return v.getStore()?.connection??K}function E(j,q){let z=v.getStore();if(S()===j)return q();return y(j),v.run({...z,depth:z?.depth??0,connection:j===K?void 0:j},q)}function y(j){let q=v.getStore();if(q?.tx===void 0)return;let z=q.connection??K;if(z===j)return;throw new W(z,j)}function g(j){let q=v.getStore();if(q?.tx===void 0||q.afterCommit===void 0)return!1;return q.afterCommit.push(j),!0}function k(j){let q=v.getStore();if(q?.tx===void 0||q.commitDependsOn===void 0)return!1;return q.commitDependsOn.push(j),!0}class F extends Error{constructor(j){super(`A statement this transaction depended on failed after being issued on it, so the transaction rolled back instead of committing: ${j instanceof Error?j.message:String(j)}`,{cause:j});this.name="TransactionDependencyError"}}async function R(j,q){if(j.length===q)return;let B=(await Promise.allSettled(j.slice(q))).find((J)=>J.status==="rejected");if(B)throw new F(B.reason)}function O(){let j=v.getStore();return j?.tx===void 0?null:j.depth}function N(){return v.getStore()?.system===!0}function x(j){let q=v.getStore();return v.run({...q,depth:q?.depth??0,system:!0},j)}function T(){return v.getStore()?.actor}function p(j,q){let z=v.getStore();return v.run({...z,depth:z?.depth??0,system:!1,actor:{user:j??null}},q)}function L(j){if(Bun.env.NODE_ENV!=="development")return null;if(j===!1)return null;if(j===void 0)return X;if(!Number.isFinite(j)||j<=0)return X;return j}function _(j){let q=L(j);if(q===null)return()=>{};let z=Error("transaction opened here"),B=setTimeout(()=>{let J=z.stack?.split(`
2
+ import{Df as K,Gf as W,Lf as X}from"./chunk-7xc64j6p.js";import{AsyncLocalStorage as U}from"async_hooks";var v=new U;function h(){return v.getStore()?.tx}function S(){return v.getStore()?.connection??K}function E(j,q){let z=v.getStore();if(S()===j)return q();return y(j),v.run({...z,depth:z?.depth??0,connection:j===K?void 0:j},q)}function y(j){let q=v.getStore();if(q?.tx===void 0)return;let z=q.connection??K;if(z===j)return;throw new W(z,j)}function g(j){let q=v.getStore();if(q?.tx===void 0||q.afterCommit===void 0)return!1;return q.afterCommit.push(j),!0}function k(j){let q=v.getStore();if(q?.tx===void 0||q.commitDependsOn===void 0)return!1;return q.commitDependsOn.push(j),!0}class F extends Error{constructor(j){super(`A statement this transaction depended on failed after being issued on it, so the transaction rolled back instead of committing: ${j instanceof Error?j.message:String(j)}`,{cause:j});this.name="TransactionDependencyError"}}async function R(j,q){if(j.length===q)return;let B=(await Promise.allSettled(j.slice(q))).find((J)=>J.status==="rejected");if(B)throw new F(B.reason)}function O(){let j=v.getStore();return j?.tx===void 0?null:j.depth}function N(){return v.getStore()?.system===!0}function x(j){let q=v.getStore();return v.run({...q,depth:q?.depth??0,system:!0},j)}function T(){return v.getStore()?.actor}function p(j,q){let z=v.getStore();return v.run({...z,depth:z?.depth??0,system:!1,actor:{user:j??null}},q)}function L(j){if(Bun.env.NODE_ENV!=="development")return null;if(j===!1)return null;if(j===void 0)return X;if(!Number.isFinite(j)||j<=0)return X;return j}function _(j){let q=L(j);if(q===null)return()=>{};let z=Error("transaction opened here"),B=setTimeout(()=>{let J=z.stack?.split(`
3
3
  `).slice(1).join(`
4
4
  `)??"";console.warn(`[gemi] A database transaction has not settled after ${q}ms. It `+"reserves a pooled connection until it does \u2014 check for network or "+`filesystem I/O inside the callback, and move it outside the transaction if you find any.
5
5
  ${J}
6
6
  (development only; set database.slowTransactionThreshold to change the threshold, or false to switch this off)`)},q);return B.unref?.(),()=>clearTimeout(B)}async function b(j,q){if(j.length===0)return;await v.run({...q,tx:void 0,afterCommit:void 0,commitDependsOn:void 0,depth:q?.depth??0},async()=>{for(let z of j)try{await z()}catch(B){console.error("An after-commit callback threw. The transaction it was waiting on had already committed and stays committed, and the callbacks after it still ran.",B)}})}function l(j,q,z){let B=v.getStore(),J=z?.connection??K;if(y(J),B?.tx){let G=B.afterCommit,Q=G?.length??0,P=B.commitDependsOn,M=P?.length??0;return B.tx.savepoint((V)=>{let H=V;return v.run({...B,tx:H,depth:B.depth+1},async()=>{let I=await q(H);if(P)await R(P,M);return I})}).catch((V)=>{if(G)G.length=Q;if(P)P.length=M;throw V})}let Y=_(z?.slowTransactionThreshold),Z=[],$=[];try{return j.begin((G)=>v.run({...B,tx:G,depth:0,connection:J===K?void 0:J,afterCommit:Z,commitDependsOn:$},async()=>{let Q=await q(G);return await R($,0),Q})).finally(Y).then(async(G)=>{return await b(Z,B),G})}catch(G){throw Y(),G}}
7
- export{v as if,h as jf,S as kf,E as lf,y as mf,g as nf,k as of,F as pf,O as qf,N as rf,x as sf,T as tf,p as uf,l as vf};
7
+ export{v as jf,h as kf,S as lf,E as mf,y as nf,g as of,k as pf,F as qf,O as rf,N as sf,x as tf,T as uf,p as vf,l as wf};
8
8
 
9
- //# debugId=A1FE7CA8F2F212ED64756E2164756E21
9
+ //# debugId=A464D2D060C433F364756E2164756E21
@@ -5,6 +5,6 @@
5
5
  "import type { SQL, TransactionSQL } from \"bun\";\nimport { AsyncLocalStorage } from \"node:async_hooks\";\nimport { SLOW_TRANSACTION_THRESHOLD } from \"../database/config\";\nimport {\n CrossConnectionTransactionError,\n DEFAULT_CONNECTION,\n} from \"../database/Connection\";\n\n/**\n * The ambient transaction: the ORM's own `AsyncLocalStorage`, holding nothing\n * but the open handle and how deep the nesting is.\n *\n * One store per scope with one owner, which is the pattern the framework\n * already follows — `kernel/context.ts` holds the Application,\n * `http/requestContext.ts` the request and its user,\n * `services/pubsub/BroadcastManager.ts` a socket's headers. The reasoning for\n * not folding this into the kernel's is written up beside it, and the short\n * version is that a transaction scope has to *nest inside* an Application scope\n * without replacing it, and `foundation/app.ts` must keep reading exactly one\n * shape out of the kernel store or resolving a service becomes a transaction\n * concern.\n *\n * What makes an ALS the right home rather than a field somewhere: two concurrent\n * requests each in their own transaction must never see each other's handle.\n * Anything reachable from the Application — which is one object shared by every\n * in-flight request — fails that by construction, and fails it as silently\n * written data, not as an error. \"two concurrent transactions never see each\n * other's handle\" in `context.test.ts` is the test that would catch it.\n */\nexport interface OrmScope {\n /**\n * Bun's transaction handle. Every ORM statement in scope runs on it, which\n * means they all run on one reserved connection — so nothing here may issue\n * two statements concurrently. `Model.$exec` already runs its nested writes\n * and its relation reads sequentially, for exactly this reason.\n */\n tx?: TransactionSQL;\n /** 0 for the outermost transaction, 1+ for each savepoint inside it. */\n depth: number;\n /**\n * Which named connection this subtree's queries run on, and — when `tx` is\n * set — which connection the open transaction belongs to.\n *\n * Ambient rather than an argument threaded through `$exec`, for the same\n * reason the handle above is: a relation read resolves its target through the\n * registry and calls that class's `$exec`, so an argument would have to be\n * carried by every intermediate that has no interest in it, and the one that\n * forgot would silently read a nested `include` off the *other* pool. There\n * is no error that shape produces; there are just rows from the wrong place.\n *\n * `undefined` means the default connection. Kept as absent-rather-than-\n * `\"default\"` so that entering a scope on the default connection is\n * indistinguishable from not entering one, which is what makes the\n * cross-connection check below cost a comparison of two `undefined`s on every\n * application that never declares a second connection.\n */\n connection?: string;\n /**\n * Whether policies are suspended for this scope. Set only by\n * `Model.asSystem`, and never by anything ambient — the whole point is that\n * unscoped access is a decision visible at the call site, not the accidental\n * result of a missing user.\n */\n system?: boolean;\n /**\n * The user policies should scope to, when there is no request to read one\n * from. Set only by `Model.asUser`.\n *\n * A sentinel wrapper rather than the bare value, so that \"a scope was entered\n * with `null`\" stays distinguishable from \"no scope was entered\" — the two\n * mean different things under deny-by-default.\n */\n actor?: { user: unknown };\n /**\n * Work that must not happen unless this transaction commits — an event whose\n * `static afterCommit` is set, today, and nothing else.\n *\n * **Created by the outermost `withTransaction` and never by a savepoint.** A\n * savepoint's scope is a spread of its parent's (`{ ...current, tx: nested }`),\n * so the array arrives here already shared by reference with the transaction\n * that opened it — which is the behaviour wanted rather than a leak. A\n * dispatch made inside a savepoint that commits, in a transaction that then\n * rolls back, must not run: rolling back the outermost transaction discards\n * the list whole, savepoint entries included, because nothing ever drains it.\n *\n * The inverse — a savepoint that rolls back under a transaction that commits\n * — is the case sharing gets wrong on its own, and `withTransaction`'s\n * savepoint branch is where it is put right.\n *\n * Absent, rather than an empty array, on every scope that is not a\n * transaction: `runAsSystem`, `runAsUser` and `runOnConnection` spread\n * whatever they are given, so \"there is a list here\" and \"there is an open\n * transaction here\" have to stay the same question. `deferUntilCommit`\n * answers `false` when either half is missing and the caller runs the work\n * now, which is what keeps a hand-built scope carrying a `tx` — the shape\n * tests write — from swallowing a dispatch into a list nothing drains.\n */\n afterCommit?: AfterCommitCallback[];\n /**\n * Statements written on `tx` that the commit must wait for and must not\n * outlive — today, a job row the database queue driver wrote on the\n * transaction (#563), and nothing else. See `commitDependsOn`.\n *\n * Created and shared exactly as `afterCommit` is, and truncated with it\n * when a savepoint rolls back.\n */\n commitDependsOn?: Promise<unknown>[];\n}\n\n/**\n * Work deferred to a transaction's commit.\n *\n * Awaited when it is drained, and its rejection is caught there: a callback is\n * a side effect that the transaction is not waiting on and cannot be told\n * about, so the only thing left to do with a failure is report it.\n *\n * Not exported: a caller passes a lambda and never names this, and an export\n * nothing outside this file uses is what `orm/architecture.test.ts` is pointed\n * at. The declaration emit carries it along regardless, so `OrmScope` stays\n * readable from a `.d.ts`.\n */\ntype AfterCommitCallback = () => void | Promise<void>;\n\n/**\n * One ambient scope for the ORM, not one per feature.\n *\n * Transactions (iteration 5) and system access (iteration 6) are both\n * \"something is true for this async subtree and every query in it\", so they\n * share a store rather than minting a second `AsyncLocalStorage` each. The\n * inventory note in `kernel/context.ts` sets the bar for adding one; two\n * booleans-worth of ORM state does not clear it.\n */\nexport const ormContext = new AsyncLocalStorage<OrmScope>();\n\n/**\n * The open transaction, or `undefined` outside one. This is what `Model.$exec`\n * consults to decide which connection a statement runs on.\n *\n * Exported as the escape hatch for code that genuinely needs the handle — a raw\n * query that must join the surrounding transaction, say. **Do not store what it\n * returns.** Bun's handle stays callable after its `begin` resolves: queries on\n * it then run on the pooled connection, outside any transaction, and succeed.\n * Verified against both dialects, and it is the reason `Model.transaction`'s\n * callback takes no argument.\n */\nexport function currentTransaction(): TransactionSQL | undefined {\n return ormContext.getStore()?.tx;\n}\n\n/**\n * The connection every query in this scope runs on unless it names another.\n *\n * `\"default\"` outside any scope, so callers get a name rather than a\n * `string | undefined` to normalise themselves — the store keeps it absent,\n * which is not the same distinction and is nobody else's business.\n */\nexport function currentConnectionName(): string {\n return ormContext.getStore()?.connection ?? DEFAULT_CONNECTION;\n}\n\n/**\n * Run `fn` with `name` as the ambient connection.\n *\n * Merged into the current scope rather than replacing it, exactly as\n * `runAsSystem` and `runAsUser` are: naming a connection must not drop an open\n * transaction handle or re-enable policies underneath it.\n *\n * Deliberately absent from `orm/index.ts`, so it is not part of what an\n * application can reach — `Model.on(name)` and `DB.connection(name)` are the\n * two doors, and both funnel through here so that a nested relation read,\n * which resolves its own class out of the registry and calls its `$exec`,\n * inherits the connection without anything having to pass it along.\n */\nexport function runOnConnection<T>(\n name: string,\n fn: () => Promise<T>,\n): Promise<T> {\n const current = ormContext.getStore();\n if (currentConnectionName() === name) return fn();\n\n // ENTERING A CONNECTION IS WHERE THE CROSS-CONNECTION CHECK BELONGS, not at\n // each door — and it has to be *here*, before the scope is entered, because\n // entering it is what makes the check impossible afterwards.\n //\n // The scope carries `tx` and `connection` together, so overwriting the name\n // while an open handle stays in place produces a store that says \"a\n // transaction on analytics\" while holding the *default* connection's handle.\n // Every check downstream then agrees with itself and the statement runs on\n // the wrong connection's transaction. `Model.save` found this: it routes to\n // the row's own connection, so it is the one caller that switches connections\n // with a transaction already open.\n assertConnectionUsable(name);\n\n return ormContext.run(\n {\n ...current,\n depth: current?.depth ?? 0,\n connection: name === DEFAULT_CONNECTION ? undefined : name,\n },\n fn,\n );\n}\n\n/**\n * Refuse a statement that names one connection while a transaction is open on\n * another.\n *\n * The check `withTransaction`'s single-connection note asked for, and the\n * reasoning for refusing rather than routing is on\n * `CrossConnectionTransactionError`. Both doors call it — `Model.$exec` for\n * every model operation, `DB` for a raw fragment — because either one alone\n * leaves the other free to straddle the two connections, and a raw `DB.execute`\n * escaping a transaction is the more damaging of the two.\n *\n * Only ever fires on a query that *names* a connection: an unqualified one\n * resolves to the ambient name, which is the transaction's own.\n */\nexport function assertConnectionUsable(name: string): void {\n const store = ormContext.getStore();\n if (store?.tx === undefined) return;\n\n const open = store.connection ?? DEFAULT_CONNECTION;\n if (open === name) return;\n\n throw new CrossConnectionTransactionError(open, name);\n}\n\n/**\n * Hold `callback` until the open transaction commits, and say whether that\n * happened.\n *\n * `false` means there was nothing to wait for — no transaction is open, or the\n * scope was entered by hand rather than by `withTransaction` — and the caller\n * must run the work itself, now. That return value is the whole contract: a\n * caller that ignores it turns \"no transaction here\" into a side effect queued\n * on a list nothing will ever drain, which is a dispatch that silently never\n * happens.\n *\n * `true` means the callback is on the outermost scope's list and will run after\n * `begin` resolves, outside the transaction, whatever the caller does next. It\n * will not run at all if the transaction rolls back, or if a savepoint it was\n * registered inside rolls back — both of which are the point.\n *\n * Nothing here is ordered against anything but the other deferred callbacks:\n * they run in registration order, one at a time, after the commit round-trip.\n */\nexport function deferUntilCommit(callback: AfterCommitCallback): boolean {\n const store = ormContext.getStore();\n if (store?.tx === undefined || store.afterCommit === undefined) return false;\n\n store.afterCommit.push(callback);\n return true;\n}\n\n/**\n * Make the open transaction's commit depend on `write`, a statement issued on\n * its handle: the transaction does not commit until `write` settles, and\n * rolls back — rejecting with `TransactionDependencyError` — if it rejected.\n *\n * For a write the caller may not await. A queued listener's dispatch never is\n * (`EventManager` pushes it and moves on), and on Postgres a statement that\n * fails aborts the whole transaction: every statement after it is refused and\n * Bun's `COMMIT` quietly becomes a rollback. Without this, the callback's\n * promise resolved, `begin` resolved, and the rows the caller wrote were gone\n * with nothing to say so. MySQL does not abort on a failed statement, and is\n * failed here anyway, so that a joined write means the same thing on both:\n * it commits with the transaction or the transaction does not commit.\n *\n * `false` when there is no transaction to depend on, as for\n * `deferUntilCommit`.\n */\nexport function commitDependsOn(write: Promise<unknown>): boolean {\n const store = ormContext.getStore();\n if (store?.tx === undefined || store.commitDependsOn === undefined) {\n return false;\n }\n store.commitDependsOn.push(write);\n return true;\n}\n\n/**\n * A write the transaction's commit depended on failed, so the transaction —\n * or the savepoint the write was made in — rolled back. `cause` is the write's\n * own error.\n */\nexport class TransactionDependencyError extends Error {\n constructor(cause: unknown) {\n super(\n `A statement this transaction depended on failed after being issued on ` +\n `it, so the transaction rolled back instead of committing: ` +\n `${cause instanceof Error ? cause.message : String(cause)}`,\n { cause },\n );\n this.name = \"TransactionDependencyError\";\n }\n}\n\n/**\n * Wait for the writes registered from `mark` on, and throw if one failed.\n *\n * Called at the end of a transaction's or savepoint's callback, *inside*\n * `begin`/`savepoint`, so a throw is what makes Bun roll back rather than\n * commit — after `begin` has resolved it is too late to do anything but\n * report. Every write is settled before throwing, so none is still running on\n * the handle when the rollback is issued.\n */\nasync function awaitDependencies(\n writes: Promise<unknown>[],\n mark: number,\n): Promise<void> {\n if (writes.length === mark) return;\n const settled = await Promise.allSettled(writes.slice(mark));\n const failed = settled.find(\n (outcome): outcome is PromiseRejectedResult => outcome.status === \"rejected\",\n );\n if (failed) throw new TransactionDependencyError(failed.reason);\n}\n\n/** How deeply nested the current transaction is; `null` outside one. */\nexport function transactionDepth(): number | null {\n const store = ormContext.getStore();\n return store?.tx === undefined ? null : store.depth;\n}\n\n/** Whether policies are suspended for the current async scope. */\nexport function isSystemScope(): boolean {\n return ormContext.getStore()?.system === true;\n}\n\n/**\n * Run `fn` with policies suspended.\n *\n * The escape hatch the deny-by-default rule needs to be usable: a cron tick, a\n * queue worker or a seed script has no user, and under deny-by-default every\n * policied model would refuse it. This makes that intent explicit *at the call\n * site*, which is the property that matters — unscoped access must never be\n * what happens when a user simply fails to turn up.\n *\n * It nests inside a transaction and a transaction nests inside it: the scope is\n * merged rather than replaced, so `asSystem` does not silently drop an open\n * handle.\n */\nexport function runAsSystem<T>(fn: () => Promise<T>): Promise<T> {\n const current = ormContext.getStore();\n return ormContext.run({ ...current, depth: current?.depth ?? 0, system: true }, fn);\n}\n\n/** The explicitly-set actor, or `undefined` when none was. */\nexport function currentActor(): { user: unknown } | undefined {\n return ormContext.getStore()?.actor;\n}\n\n/**\n * Run `fn` with policies scoped to `user`, for code with no request to read one\n * from.\n *\n * The counterpart to `runAsSystem`, and the reason that one is not the only\n * escape hatch. A queue worker processing \"send the invoice for organisation 7\"\n * genuinely acts *as somebody*; giving it `asSystem` would suspend policies\n * entirely and leave it hand-scoping every query — which is precisely the\n * unscoped-by-accident failure the deny-by-default rule exists to prevent. The\n * narrow tool should be the easy one.\n *\n * It is also what makes policies testable without reaching into\n * `RequestContext`'s internals.\n *\n * Takes precedence over the request store, so a job that says who it is acting\n * as is not quietly overridden by an ambient request that happens to enclose it.\n *\n * It also **clears `system`**, which is the more surprising half. Acting as a\n * user is strictly narrower than acting as the system, so naming one inside an\n * `asSystem` block has to narrow back — and the spread would otherwise carry\n * `system: true` forward, leaving `$exec` to skip policies entirely while\n * `currentUser()` cheerfully returned the actor. Silently unscoped, from the\n * realistic shape: a worker enters `asSystem` to read its job queue, then\n * narrows to the job's owner for the work itself. The reverse nesting —\n * `asSystem` inside `asUser` — suspends policies, which is what it should do.\n */\nexport function runAsUser<T>(user: unknown, fn: () => Promise<T>): Promise<T> {\n const current = ormContext.getStore();\n return ormContext.run(\n {\n ...current,\n depth: current?.depth ?? 0,\n system: false,\n actor: { user: user ?? null },\n },\n fn,\n );\n}\n\n/**\n * The warning threshold in milliseconds, or `null` when the warning is off.\n *\n * `configured` is `database.slowTransactionThreshold` — see `DatabaseConfig`.\n * It arrives as a value rather than being read from here so that this file\n * keeps knowing nothing about the container: `withTransaction` is reachable\n * with a bare pool, and its tests use one.\n *\n * Exported for its own tests. The behaviour worth pinning is the fallback —\n * that a malformed threshold lands on the default rather than disabling — and\n * that cannot be observed through `withTransaction`: \"no warning fired\" is what\n * a disabled warning looks like too, so a behavioural test of it passes just as\n * happily when the fallback is gone. Asserting the number directly is the only\n * form of that test that can fail.\n */\nexport function slowTransactionThreshold(\n configured?: number | false,\n): number | null {\n // Read per call, never cached at module scope. `scripts/build.ts` rewrites\n // `process.env.NODE_ENV` to `Bun.env.NODE_ENV` precisely so mode stays a\n // runtime question in the built framework; caching it here would undo that.\n if (process.env.NODE_ENV !== \"development\") return null;\n\n // The one way to switch it off, and it has to be spelled. Everything else\n // falls back, so the warning is never lost to a mistyped value — only to an\n // explicit `false`.\n if (configured === false) return null;\n\n if (configured === undefined) return SLOW_TRANSACTION_THRESHOLD;\n if (!Number.isFinite(configured) || configured <= 0) {\n return SLOW_TRANSACTION_THRESHOLD;\n }\n return configured;\n}\n\n/**\n * Warn, in development only, about a transaction that has been open too long.\n *\n * The risk is structural rather than occasional: an open transaction holds one\n * reserved connection for as long as its callback runs, and nothing about\n * `Model.transaction(async () => { ... })` stops that callback from awaiting a\n * `fetch`, an S3 upload or a slow queue push. Under concurrency that drains the\n * pool, and the symptom — every unrelated query in the process blocking on\n * connection acquisition — names neither the callback nor the I/O in it.\n *\n * A timer rather than measuring elapsed time on the way out, for one reason:\n * the worst case is the transaction that *never* settles (a hung request, a\n * lock wait, a deadlock). After-the-fact measurement is silent for exactly that\n * case; a timer fires while it is still open and still holding the connection.\n *\n * The `Error` is constructed up front and read only if the timer fires — V8\n * formats `.stack` lazily on first access, so an ordinary fast transaction pays\n * for an object allocation and nothing else.\n *\n * The clock starts at the `begin` call, not at the moment a connection is\n * acquired, and stops when `begin` settles rather than when the callback\n * returns — so it spans the pool wait and the commit round-trip as well as the\n * callback. That is deliberate: all three are time this transaction is in\n * flight, and a warning that only covered the callback would stay silent for a\n * transaction stuck waiting on an exhausted pool, which is the exact situation\n * a long transaction elsewhere creates. Hence \"not settled\" rather than \"open\n * for\" — the message must not claim a connection was held for the whole span.\n */\nfunction watchForSlowTransaction(configured?: number | false): () => void {\n const threshold = slowTransactionThreshold(configured);\n if (threshold === null) return () => {};\n\n const site = new Error(\"transaction opened here\");\n\n const timer = setTimeout(() => {\n const stack = site.stack?.split(\"\\n\").slice(1).join(\"\\n\") ?? \"\";\n console.warn(\n `[gemi] A database transaction has not settled after ${threshold}ms. It ` +\n `reserves a pooled connection until it does — check for network or ` +\n `filesystem I/O inside the callback, and move it outside the ` +\n `transaction if you find any.\\n${stack}\\n` +\n `(development only; set database.slowTransactionThreshold to change ` +\n `the threshold, or false to switch this off)`,\n );\n }, threshold);\n\n // Otherwise the warning timer is itself a reason the process stays alive,\n // which would turn a diagnostic into a hang in short-lived commands and\n // scripts.\n timer.unref?.();\n\n return () => clearTimeout(timer);\n}\n\n/**\n * Runs what a committed transaction deferred, outside the transaction it was\n * deferred by.\n *\n * `outside` is the scope that was ambient before `begin` — an `asSystem` block,\n * a named connection, or nothing at all — and re-entering it explicitly is the\n * guarantee rather than a tidy-up. The alternative is relying on where a `.then`\n * happens to have captured its context, and the failure that produces is the\n * one the whole feature is about: a listener that runs \"after commit\" while\n * still holding the closed transaction's handle joins nothing, because Bun's\n * handle stays callable and simply runs on the pool. So the scope is rebuilt\n * with `tx` and the drained list cleared, and a listener that opens its own\n * transaction gets a real one.\n *\n * Errors are caught per callback and the next one still runs, for the reason\n * the event subsystem catches per listener: these are independent side effects\n * whose order came from a filesystem walk. And the transaction is not failed by\n * one — it committed, the database kept the rows, and reporting a rejection to\n * the caller would have it roll back or retry work that is already durable.\n * stderr is all that is left, and it is enough: the caller has no decision to\n * make here.\n *\n * The transaction's own promise does not resolve until this has finished, which\n * is the one thing about `afterCommit` that a caller can feel. Deliberate: the\n * alternative is a floating promise whose rejection nobody sees and whose work\n * a short-lived process — a command, a seed — exits out from under.\n */\nasync function drainAfterCommit(\n callbacks: AfterCommitCallback[],\n outside: OrmScope | undefined,\n): Promise<void> {\n if (callbacks.length === 0) return;\n\n await ormContext.run(\n {\n ...outside,\n tx: undefined,\n afterCommit: undefined,\n commitDependsOn: undefined,\n depth: outside?.depth ?? 0,\n },\n async () => {\n for (const callback of callbacks) {\n try {\n await callback();\n } catch (error) {\n console.error(\n `An after-commit callback threw. The transaction it was waiting ` +\n `on had already committed and stays committed, and the ` +\n `callbacks after it still ran.`,\n error,\n );\n }\n }\n },\n );\n}\n\n/**\n * Run `fn` inside a transaction, entering the ambient scope for its whole async\n * subtree.\n *\n * The single implementation behind both `Model.transaction` and\n * `DB.transaction`, so the two cannot become transaction systems that ignore\n * each other: a `Model.create` inside a `DB.transaction` joins it, and a raw\n * `DB.sql` inside a `Model.transaction` can join it through\n * `currentTransaction()`.\n *\n * Nesting becomes a savepoint. Not a preference — Bun refuses the alternative\n * outright (`cannot call begin inside a transaction use savepoint() instead`),\n * and a savepoint is the semantics worth having anyway: an inner failure rolls\n * back to it and leaves the outer transaction usable, which a caller that\n * catches can rely on. Verified on SQLite and Postgres.\n *\n * Note Bun hands the savepoint callback the *same* handle object as the outer\n * transaction (`sp === tx`), so the depth counter is the only thing that\n * actually changes on the way in. The callback's argument is still what gets\n * stored, so this keeps working if that ever stops being true. The cast is\n * because Bun types a savepoint handle as plain `SQL` — without `savepoint` on\n * it — while the runtime object does carry the method, which is what makes\n * three levels of nesting work.\n *\n * Anything `deferUntilCommit` queued is drained once `begin` resolves, outside\n * the transaction and only on the outermost call — a savepoint has committed\n * nothing durable, so draining there would run work that a later rollback of\n * the enclosing transaction was meant to have prevented. See `drainAfterCommit`\n * for what that costs the caller.\n *\n * In development, an outermost transaction that stays open past\n * `options.slowTransactionThreshold` (2s by default, `false` to disable) warns\n * — see `watchForSlowTransaction`. Nothing here *prevents* a long transaction;\n * the warning exists because the cost of one is paid by unrelated queries\n * elsewhere in the process, which makes it hard to trace back.\n *\n * The threshold is passed in rather than read from `app(DatabaseManager)` here.\n * Every caller already holds the manager — it is where `pool` came from — and\n * taking it as an argument keeps this file free of the container, so a bare\n * `SQL` is still enough to call it. Its tests rely on that.\n *\n * `options.connection` is the name `pool` belongs to, and follows the same rule\n * for the same reason: the pool cannot be asked what it is called. Passing it\n * is what lets a nested `withTransaction` tell \"the same connection, so take a\n * savepoint\" from \"a different one, so refuse\" — omitting it means the default\n * connection, which is what a two-argument call always meant.\n *\n * The return type is asserted rather than inferred for one reason worth\n * knowing: Bun's `begin` unwraps a callback that resolves to an *array of\n * promises*, awaiting each. So `Model.transaction(async () => [a, b])` where\n * `a` and `b` are promises resolves to their values, not to the promises. That\n * is Bun's behaviour and is left alone; it is only surprising if unmentioned.\n */\nexport function withTransaction<T>(\n pool: SQL,\n fn: (tx: TransactionSQL) => Promise<T>,\n options?: { slowTransactionThreshold?: number | false; connection?: string },\n): Promise<T> {\n const current = ormContext.getStore();\n\n // THE SINGLE-CONNECTION ASSUMPTION, WHICH IS NOW CHECKED RATHER THAN PINNED.\n //\n // The savepoint branch below ignores `pool` entirely. That was correct while\n // there was one `DatabaseManager` and one `SQL` — the ambient handle and\n // whatever pool the caller passed were necessarily the same database — and\n // the note that stood here said what would happen when a second connection\n // became configurable (#327): a `DB.transaction` on B inside a\n // `Model.transaction` on A would savepoint on **A** and hand the callback A's\n // handle, so statements landed in the wrong database with no error at all.\n //\n // So the name is compared before the branch is taken, and a mismatch raises.\n // Refusing is the whole answer rather than half of one — there is no way to\n // make one transaction span two pools, and the alternatives are covered on\n // `CrossConnectionTransactionError`.\n //\n // A caller that passes no `connection` is treated as naming the default,\n // which is what `withTransaction(pool, fn)` meant before this argument\n // existed.\n const name = options?.connection ?? DEFAULT_CONNECTION;\n assertConnectionUsable(name);\n\n // `current?.tx` rather than `current`: since iteration 6 a scope can exist\n // with no open transaction — `Model.asSystem` enters one — and a savepoint\n // needs an actual handle, not merely a store.\n if (current?.tx) {\n // WHERE THE SHARED AFTER-COMMIT LIST IS PUT RIGHT.\n //\n // The savepoint's scope is a spread of this one, so it appends to the\n // transaction's list rather than to a list of its own — which is what makes\n // \"the outer transaction rolled back, so nothing runs\" free. The case that\n // is not free is this one: the savepoint rolls back and the transaction\n // goes on to commit. Its entries have to go, or a dispatch made inside a\n // block the database threw away runs anyway, which is the same wrong answer\n // as before with an extra step.\n //\n // A mark on the way in and a truncate on the way out, rather than tagging\n // each entry with its depth and dropping everything at or below the failing\n // one. Depth cannot tell two *siblings* apart: a savepoint that committed\n // and one that rolled back both left entries at the same depth, adjacent in\n // the list, and dropping by depth would discard the committed sibling's\n // work as well. The index is exact because the ORM issues one statement at\n // a time on a transaction handle — see `OrmScope.tx` — so nothing appends\n // between the mark and the failure but this savepoint's own subtree.\n const deferred = current.afterCommit;\n const mark = deferred?.length ?? 0;\n // The same mark for the writes the commit depends on. The savepoint waits\n // for its own before it releases, so one that failed rolls back only the\n // savepoint — which a caller that catches can survive, exactly as it\n // survives a statement that threw inside it — and is then forgotten\n // rather than failing the transaction a second time.\n const dependencies = current.commitDependsOn;\n const dependencyMark = dependencies?.length ?? 0;\n\n return current.tx\n .savepoint((sp) => {\n const nested = sp as TransactionSQL;\n return ormContext.run(\n { ...current, tx: nested, depth: current.depth + 1 },\n async () => {\n const result = await fn(nested);\n if (dependencies) {\n await awaitDependencies(dependencies, dependencyMark);\n }\n return result;\n },\n );\n })\n .catch((error: unknown) => {\n if (deferred) deferred.length = mark;\n if (dependencies) dependencies.length = dependencyMark;\n throw error;\n }) as Promise<T>;\n }\n\n // Only the outermost scope is watched. A savepoint reserves no connection of\n // its own — its lifetime is bounded by the transaction it sits in, which is\n // already being timed — so warning per depth would report one slow block as\n // several warnings and point at the innermost frame rather than the one\n // holding the connection.\n const stopWatching = watchForSlowTransaction(\n options?.slowTransactionThreshold,\n );\n\n // Built out here rather than inside the `begin` callback, because the drain\n // below needs it *after* that callback's scope is gone, and reading it off\n // the store then is exactly what is no longer possible.\n const deferred: AfterCommitCallback[] = [];\n const dependencies: Promise<unknown>[] = [];\n\n // The `try` covers a *synchronous* throw from `begin` — a closed pool, say.\n // `.finally` alone would not: it is only attached once `begin` has returned a\n // promise, so a synchronous throw escapes with the timer still armed and\n // eventually warns about a transaction that never opened. `unref` keeps that\n // from holding the process, which makes it cosmetic rather than a leak, but\n // it is the same gap the `.finally` below exists to close.\n try {\n // Spread rather than replace: a `Model.transaction` inside a\n // `Model.asSystem` must not silently re-enable policies for its subtree.\n //\n // The connection goes into the scope alongside the handle, and the pair is\n // what makes the check at the top of this function possible: \"which\n // connection is this transaction on\" has to be answerable from the store,\n // because the handle itself does not say. It is also what makes an\n // unqualified query inside `DB.connection(\"analytics\").transaction(...)`\n // *join* the transaction instead of being refused by it — the query\n // inherits the name rather than defaulting to the hot path.\n return (\n pool\n .begin((tx) =>\n ormContext.run(\n {\n ...current,\n tx,\n depth: 0,\n connection: name === DEFAULT_CONNECTION ? undefined : name,\n // A fresh list per outermost transaction, assigned rather than\n // left to the spread. `current` holds no list today — the drain\n // clears the field before it runs anything — and assigning is\n // what keeps that from being load-bearing: a transaction opened\n // by a callback during a drain gets its own list either way,\n // rather than appending to the array it is being run out of.\n afterCommit: deferred,\n commitDependsOn: dependencies,\n },\n async () => {\n const result = await fn(tx);\n await awaitDependencies(dependencies, 0);\n return result;\n },\n ),\n )\n // `finally` and not a `then`/`catch` pair: the connection is released on\n // rollback exactly as it is on commit, so a throwing callback must clear\n // the timer too or every failed transaction leaves a warning armed\n // against a connection that has already gone back to the pool.\n //\n // Before the drain, so that a slow after-commit listener is not\n // reported as a transaction that will not settle. The connection went\n // back to the pool at the commit; the warning is about holding it.\n .finally(stopWatching)\n // Only here, on the fulfilled path. A rejected `begin` rolled back, so\n // the scope and everything queued on it are discarded unread — which is\n // the whole of what `afterCommit` promises.\n .then(async (result) => {\n await drainAfterCommit(deferred, current);\n return result;\n }) as Promise<T>\n );\n } catch (error) {\n stopWatching();\n throw error;\n }\n}\n"
6
6
  ],
7
7
  "mappings": ";yDACA,4BAAS,oBAmIF,IAAM,EAAa,IAAI,EAavB,SAAS,CAAkB,EAA+B,CAC/D,OAAO,EAAW,SAAS,GAAG,GAUzB,SAAS,CAAqB,EAAW,CAC9C,OAAO,EAAW,SAAS,GAAG,YAAc,EAgBvC,SAAS,CAAkB,CAChC,EACA,EACY,CACZ,IAAM,EAAU,EAAW,SAAS,EACpC,GAAI,EAAsB,IAAM,EAAM,OAAO,EAAG,EAehD,OAFA,EAAuB,CAAI,EAEpB,EAAW,IAChB,IACK,EACH,MAAO,GAAS,OAAS,EACzB,WAAY,IAAS,EAAqB,OAAY,CACxD,EACA,CACF,EAiBK,SAAS,CAAsB,CAAC,EAAoB,CACzD,IAAM,EAAQ,EAAW,SAAS,EAClC,GAAI,GAAO,KAAO,OAAW,OAE7B,IAAM,EAAO,EAAM,YAAc,EACjC,GAAI,IAAS,EAAM,OAEnB,MAAM,IAAI,EAAgC,EAAM,CAAI,EAsB/C,SAAS,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