gemi 0.55.0 → 0.57.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 (199) hide show
  1. package/dist/app/index.js +1 -1
  2. package/dist/broadcasting/index.js +1 -1
  3. package/dist/bun/plugin.js +1 -1
  4. package/dist/bun/preload.js +1 -1
  5. package/dist/{chunk-rsdg619q.js → chunk-11dkjm1r.js} +2 -2
  6. package/dist/{chunk-rsdg619q.js.map → chunk-11dkjm1r.js.map} +1 -1
  7. package/dist/{chunk-eqrd31ye.js → chunk-17m5wxv0.js} +2 -2
  8. package/dist/{chunk-eqrd31ye.js.map → chunk-17m5wxv0.js.map} +1 -1
  9. package/dist/{chunk-ct274qts.js → chunk-1esnvq2z.js} +2 -2
  10. package/dist/{chunk-ct274qts.js.map → chunk-1esnvq2z.js.map} +1 -1
  11. package/dist/{chunk-4xx78ba9.js → chunk-1nqdzmvm.js} +2 -2
  12. package/dist/{chunk-4xx78ba9.js.map → chunk-1nqdzmvm.js.map} +1 -1
  13. package/dist/{chunk-dzzmqv0j.js → chunk-32d510cd.js} +2 -2
  14. package/dist/{chunk-dzzmqv0j.js.map → chunk-32d510cd.js.map} +1 -1
  15. package/dist/{chunk-kgmr9qxx.js → chunk-4f69ygc8.js} +2 -2
  16. package/dist/{chunk-kgmr9qxx.js.map → chunk-4f69ygc8.js.map} +1 -1
  17. package/dist/chunk-5fmbsy4q.js +6 -0
  18. package/dist/{chunk-9r1atj8w.js.map → chunk-5fmbsy4q.js.map} +2 -2
  19. package/dist/{chunk-699z6d8y.js → chunk-5txddtaa.js} +3 -3
  20. package/dist/{chunk-699z6d8y.js.map → chunk-5txddtaa.js.map} +1 -1
  21. package/dist/{chunk-gasdfwva.js → chunk-5z5xskg1.js} +2 -2
  22. package/dist/{chunk-gasdfwva.js.map → chunk-5z5xskg1.js.map} +1 -1
  23. package/dist/{chunk-3e88tyee.js → chunk-64bq12j3.js} +2 -2
  24. package/dist/{chunk-3e88tyee.js.map → chunk-64bq12j3.js.map} +1 -1
  25. package/dist/{chunk-javjeayw.js → chunk-67zyjx0c.js} +2 -2
  26. package/dist/{chunk-javjeayw.js.map → chunk-67zyjx0c.js.map} +1 -1
  27. package/dist/{chunk-xjy5apyr.js → chunk-6c14bexh.js} +2 -2
  28. package/dist/{chunk-xjy5apyr.js.map → chunk-6c14bexh.js.map} +1 -1
  29. package/dist/{chunk-vkngcrzq.js → chunk-6fc909z5.js} +2 -2
  30. package/dist/{chunk-vkngcrzq.js.map → chunk-6fc909z5.js.map} +1 -1
  31. package/dist/{chunk-v6v6sem5.js → chunk-74aj8ms2.js} +2 -2
  32. package/dist/{chunk-v6v6sem5.js.map → chunk-74aj8ms2.js.map} +1 -1
  33. package/dist/{chunk-npg72mez.js → chunk-7pn0bnsc.js} +2 -2
  34. package/dist/{chunk-npg72mez.js.map → chunk-7pn0bnsc.js.map} +1 -1
  35. package/dist/{chunk-x14sk95v.js → chunk-8v81dvje.js} +3 -3
  36. package/dist/{chunk-x14sk95v.js.map → chunk-8v81dvje.js.map} +1 -1
  37. package/dist/chunk-9j9wqrb2.js +5 -0
  38. package/dist/chunk-9j9wqrb2.js.map +33 -0
  39. package/dist/{chunk-enhkf60v.js → chunk-a70s8pz4.js} +2 -2
  40. package/dist/{chunk-enhkf60v.js.map → chunk-a70s8pz4.js.map} +1 -1
  41. package/dist/{chunk-wgpa04jb.js → chunk-ae6xz52s.js} +2 -2
  42. package/dist/{chunk-wgpa04jb.js.map → chunk-ae6xz52s.js.map} +1 -1
  43. package/dist/{chunk-62ke19q4.js → chunk-ba0rkpk5.js} +4 -4
  44. package/dist/{chunk-62ke19q4.js.map → chunk-ba0rkpk5.js.map} +1 -1
  45. package/dist/{chunk-4yafsffx.js → chunk-btr9kyqh.js} +2 -2
  46. package/dist/{chunk-4yafsffx.js.map → chunk-btr9kyqh.js.map} +1 -1
  47. package/dist/{chunk-gzdf2025.js → chunk-bw8kt7ps.js} +2 -2
  48. package/dist/{chunk-gzdf2025.js.map → chunk-bw8kt7ps.js.map} +1 -1
  49. package/dist/{chunk-02gdzs5t.js → chunk-cecq6q1b.js} +1 -1
  50. package/dist/{chunk-d36dfqxw.js → chunk-d6kgxmp7.js} +3 -3
  51. package/dist/{chunk-d36dfqxw.js.map → chunk-d6kgxmp7.js.map} +1 -1
  52. package/dist/{chunk-g30q4n5y.js → chunk-dcwjwfjc.js} +2 -2
  53. package/dist/{chunk-g30q4n5y.js.map → chunk-dcwjwfjc.js.map} +1 -1
  54. package/dist/{chunk-77xj0dgc.js → chunk-dwz0wbhj.js} +2 -2
  55. package/dist/{chunk-77xj0dgc.js.map → chunk-dwz0wbhj.js.map} +1 -1
  56. package/dist/{chunk-9r0sb4zn.js → chunk-dxxak51x.js} +2 -2
  57. package/dist/{chunk-9r0sb4zn.js.map → chunk-dxxak51x.js.map} +1 -1
  58. package/dist/{chunk-62723jyy.js → chunk-e9zz0zfv.js} +1 -1
  59. package/dist/{chunk-01am9k5v.js → chunk-f233yzxf.js} +2 -2
  60. package/dist/{chunk-01am9k5v.js.map → chunk-f233yzxf.js.map} +1 -1
  61. package/dist/{chunk-tja0c815.js → chunk-fck5yw2s.js} +2 -2
  62. package/dist/{chunk-tja0c815.js.map → chunk-fck5yw2s.js.map} +1 -1
  63. package/dist/chunk-g5pj95dz.js +9 -0
  64. package/dist/{chunk-kry5vwam.js.map → chunk-g5pj95dz.js.map} +3 -3
  65. package/dist/{chunk-31kcf7dq.js → chunk-j21tm6jf.js} +2 -2
  66. package/dist/{chunk-31kcf7dq.js.map → chunk-j21tm6jf.js.map} +1 -1
  67. package/dist/{chunk-pvdbrt4z.js → chunk-jny4f23c.js} +3 -3
  68. package/dist/{chunk-pvdbrt4z.js.map → chunk-jny4f23c.js.map} +1 -1
  69. package/dist/{chunk-64s1pzz1.js → chunk-jzatvtjd.js} +2 -2
  70. package/dist/{chunk-64s1pzz1.js.map → chunk-jzatvtjd.js.map} +1 -1
  71. package/dist/{chunk-cn2r5jfj.js → chunk-k5bjfhz8.js} +2 -2
  72. package/dist/{chunk-cn2r5jfj.js.map → chunk-k5bjfhz8.js.map} +1 -1
  73. package/dist/{chunk-kgg1eqne.js → chunk-ka4tdhm8.js} +2 -2
  74. package/dist/{chunk-kgg1eqne.js.map → chunk-ka4tdhm8.js.map} +1 -1
  75. package/dist/{chunk-h3mwgbg7.js → chunk-katt90qz.js} +2 -2
  76. package/dist/{chunk-h3mwgbg7.js.map → chunk-katt90qz.js.map} +1 -1
  77. package/dist/{chunk-y9fp58bg.js → chunk-knvxwrwh.js} +2 -2
  78. package/dist/{chunk-y9fp58bg.js.map → chunk-knvxwrwh.js.map} +1 -1
  79. package/dist/{chunk-9c89q2mz.js → chunk-ma5rj4st.js} +2 -2
  80. package/dist/{chunk-9c89q2mz.js.map → chunk-ma5rj4st.js.map} +1 -1
  81. package/dist/{chunk-v06qcyj5.js → chunk-mqwrmbh4.js} +3 -3
  82. package/dist/{chunk-v06qcyj5.js.map → chunk-mqwrmbh4.js.map} +1 -1
  83. package/dist/{chunk-jdj7k3r9.js → chunk-msyqr4y7.js} +2 -2
  84. package/dist/{chunk-jdj7k3r9.js.map → chunk-msyqr4y7.js.map} +1 -1
  85. package/dist/{chunk-q0waxxz5.js → chunk-n2zmg475.js} +2 -2
  86. package/dist/{chunk-q0waxxz5.js.map → chunk-n2zmg475.js.map} +1 -1
  87. package/dist/{chunk-33wjsw4r.js → chunk-nkbreczg.js} +3 -3
  88. package/dist/{chunk-33wjsw4r.js.map → chunk-nkbreczg.js.map} +1 -1
  89. package/dist/{chunk-1pwwrpa3.js → chunk-nqk3cx97.js} +2 -2
  90. package/dist/{chunk-1pwwrpa3.js.map → chunk-nqk3cx97.js.map} +1 -1
  91. package/dist/{chunk-4qwwy968.js → chunk-q8k3gh8k.js} +2 -2
  92. package/dist/{chunk-4qwwy968.js.map → chunk-q8k3gh8k.js.map} +1 -1
  93. package/dist/{chunk-f9mfw82d.js → chunk-qfzyym5h.js} +3 -3
  94. package/dist/{chunk-f9mfw82d.js.map → chunk-qfzyym5h.js.map} +1 -1
  95. package/dist/{chunk-rgb69nh1.js → chunk-qkrba9c2.js} +2 -2
  96. package/dist/{chunk-rgb69nh1.js.map → chunk-qkrba9c2.js.map} +1 -1
  97. package/dist/{chunk-1zfsgffv.js → chunk-r8637cqv.js} +3 -3
  98. package/dist/{chunk-1zfsgffv.js.map → chunk-r8637cqv.js.map} +1 -1
  99. package/dist/chunk-r9as9htn.js +5 -0
  100. package/dist/{chunk-b50zmz3t.js.map → chunk-r9as9htn.js.map} +1 -1
  101. package/dist/{chunk-tmnhkphv.js → chunk-r9h6aj7g.js} +4 -4
  102. package/dist/{chunk-tmnhkphv.js.map → chunk-r9h6aj7g.js.map} +1 -1
  103. package/dist/{chunk-w9k9s4wh.js → chunk-rc2asvyf.js} +2 -2
  104. package/dist/{chunk-w9k9s4wh.js.map → chunk-rc2asvyf.js.map} +1 -1
  105. package/dist/{chunk-m0ggfy1m.js → chunk-rxsmwbxv.js} +2 -2
  106. package/dist/{chunk-m0ggfy1m.js.map → chunk-rxsmwbxv.js.map} +1 -1
  107. package/dist/{chunk-rjxdc0xh.js → chunk-swe2b6rv.js} +1 -1
  108. package/dist/chunk-tzsnadg1.js +37 -0
  109. package/dist/chunk-tzsnadg1.js.map +20 -0
  110. package/dist/{chunk-3y75q5a2.js → chunk-vdzb29p5.js} +2 -2
  111. package/dist/{chunk-3y75q5a2.js.map → chunk-vdzb29p5.js.map} +1 -1
  112. package/dist/{chunk-8k1zqrvh.js → chunk-wrypq618.js} +2 -2
  113. package/dist/{chunk-8k1zqrvh.js.map → chunk-wrypq618.js.map} +1 -1
  114. package/dist/{chunk-hs5v3eqj.js → chunk-yhzb9qpk.js} +2 -2
  115. package/dist/{chunk-hs5v3eqj.js.map → chunk-yhzb9qpk.js.map} +1 -1
  116. package/dist/client/index.d.ts +3 -2
  117. package/dist/client/index.d.ts.map +1 -1
  118. package/dist/config/index.js +1 -1
  119. package/dist/console/run.js +2 -2
  120. package/dist/console/run.js.map +1 -1
  121. package/dist/container/index.js +2 -2
  122. package/dist/container/index.js.map +1 -1
  123. package/dist/database/index.js +2 -2
  124. package/dist/database/index.js.map +1 -1
  125. package/dist/email/index.js +2 -2
  126. package/dist/email/index.js.map +1 -1
  127. package/dist/facades/index.d.ts +1 -0
  128. package/dist/facades/index.d.ts.map +1 -1
  129. package/dist/facades/index.js +2 -2
  130. package/dist/facades/index.js.map +1 -1
  131. package/dist/foundation/index.js +2 -2
  132. package/dist/foundation/index.js.map +1 -1
  133. package/dist/gemi.d.ts +45 -0
  134. package/dist/http/index.js +2 -2
  135. package/dist/http/index.js.map +1 -1
  136. package/dist/i18n/dictionaryRuntime.js +2 -2
  137. package/dist/i18n/dictionaryRuntime.js.map +1 -1
  138. package/dist/i18n/index.js +2 -2
  139. package/dist/i18n/index.js.map +1 -1
  140. package/dist/ide/typescript-plugin/index.js +1206 -0
  141. package/dist/ide/typescript-plugin/index.js.map +17 -0
  142. package/dist/internal/type-stubs/app/http/routes/api.d.ts +24 -0
  143. package/dist/internal/type-stubs/app/http/routes/api.d.ts.map +1 -0
  144. package/dist/internal/type-stubs/app/http/routes/view.d.ts +6 -0
  145. package/dist/internal/type-stubs/app/http/routes/view.d.ts.map +1 -0
  146. package/dist/internal/type-stubs/app/i18n/index.d.ts +4 -0
  147. package/dist/internal/type-stubs/app/i18n/index.d.ts.map +1 -0
  148. package/dist/kernel/index.js +3 -3
  149. package/dist/kernel/index.js.map +3 -3
  150. package/dist/kernel/providers.d.ts +16 -4
  151. package/dist/kernel/providers.d.ts.map +1 -1
  152. package/dist/orm/context.d.ts +65 -0
  153. package/dist/orm/context.d.ts.map +1 -1
  154. package/dist/orm/index.js +2 -2
  155. package/dist/orm/index.js.map +1 -1
  156. package/dist/server/index.js +2 -2
  157. package/dist/server/index.js.map +1 -1
  158. package/dist/services/discovery.d.ts +27 -0
  159. package/dist/services/discovery.d.ts.map +1 -1
  160. package/dist/services/events/Event.d.ts +208 -0
  161. package/dist/services/events/Event.d.ts.map +1 -0
  162. package/dist/services/events/EventManager.d.ts +285 -0
  163. package/dist/services/events/EventManager.d.ts.map +1 -0
  164. package/dist/services/events/EventServiceProvider.d.ts +46 -0
  165. package/dist/services/events/EventServiceProvider.d.ts.map +1 -0
  166. package/dist/services/events/FakeEventManager.d.ts +155 -0
  167. package/dist/services/events/FakeEventManager.d.ts.map +1 -0
  168. package/dist/services/events/FakeEventManager.test-d.d.ts +2 -0
  169. package/dist/services/events/FakeEventManager.test-d.d.ts.map +1 -0
  170. package/dist/services/events/Listener.d.ts +189 -0
  171. package/dist/services/events/Listener.d.ts.map +1 -0
  172. package/dist/services/events/Listener.test-d.d.ts +2 -0
  173. package/dist/services/events/Listener.test-d.d.ts.map +1 -0
  174. package/dist/services/events/config.d.ts +55 -0
  175. package/dist/services/events/config.d.ts.map +1 -0
  176. package/dist/services/events/listenerJob.d.ts +43 -0
  177. package/dist/services/events/listenerJob.d.ts.map +1 -0
  178. package/dist/services/index.d.ts +6 -1
  179. package/dist/services/index.d.ts.map +1 -1
  180. package/dist/services/index.js +8 -8
  181. package/dist/services/index.js.map +5 -3
  182. package/dist/services/queue/QueueManager.d.ts +31 -0
  183. package/dist/services/queue/QueueManager.d.ts.map +1 -1
  184. package/dist/support/index.js +2 -2
  185. package/dist/support/index.js.map +1 -1
  186. package/dist/testing/index.d.ts +24 -0
  187. package/dist/testing/index.d.ts.map +1 -1
  188. package/ide/typescript-plugin/package.json +5 -0
  189. package/package.json +4 -2
  190. package/dist/chunk-4t80js0n.js +0 -33
  191. package/dist/chunk-4t80js0n.js.map +0 -18
  192. package/dist/chunk-98a576s9.js +0 -5
  193. package/dist/chunk-98a576s9.js.map +0 -30
  194. package/dist/chunk-9r1atj8w.js +0 -6
  195. package/dist/chunk-b50zmz3t.js +0 -5
  196. package/dist/chunk-kry5vwam.js +0 -9
  197. /package/dist/{chunk-02gdzs5t.js.map → chunk-cecq6q1b.js.map} +0 -0
  198. /package/dist/{chunk-62723jyy.js.map → chunk-e9zz0zfv.js.map} +0 -0
  199. /package/dist/{chunk-rjxdc0xh.js.map → chunk-swe2b6rv.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{a as Tr}from"./chunk-npg72mez.js";import{b as je,d as C,e as wr,f as fr,g as jr,i as It,j as Tt,k as qr,l as mr,m as We,n as zr,o as kr,p as Qe,q as Pr,r as Nr,s as br,t as Dr,u as ur,v as Hr}from"./chunk-699z6d8y.js";import{w as Ir}from"./chunk-tja0c815.js";import{A as vr,E as Te,I as q,x as lt,y as pr}from"./chunk-d36dfqxw.js";import{J as gr}from"./chunk-9r0sb4zn.js";import{M as ir}from"./chunk-v6v6sem5.js";import{N as ar}from"./chunk-9c89q2mz.js";import"./chunk-dzzmqv0j.js";import"./chunk-m0ggfy1m.js";import"./chunk-3e88tyee.js";import"./chunk-h3mwgbg7.js";import{ha as Or}from"./chunk-8k1zqrvh.js";import{ef as us,ff as u}from"./chunk-kgmr9qxx.js";var G=u((Y)=>{Object.defineProperty(Y,"__esModule",{value:!0});Y.resolveHttpAuthSchemeConfig=Y.defaultSSOHttpAuthSchemeProvider=Y.defaultSSOHttpAuthSchemeParametersProvider=void 0;var _t=C(),U=lt(),Et=async(e,t,r)=>{return{operation:(0,U.getSmithyContext)(t).operation,region:await(0,U.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};Y.defaultSSOHttpAuthSchemeParametersProvider=Et;function Rt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function yt(e){return{schemeId:"smithy.api#noAuth"}}var St=(e)=>{let t=[];switch(e.operation){case"GetRoleCredentials":{t.push(yt(e));break}default:t.push(Rt(e))}return t};Y.defaultSSOHttpAuthSchemeProvider=St;var xt=(e)=>{let t=(0,_t.resolveAwsSdkSigV4Config)(e);return Object.assign(t,{authSchemePreference:(0,U.normalizeProvider)(e.authSchemePreference??[])})};Y.resolveHttpAuthSchemeConfig=xt});var Ee=u((le)=>{Object.defineProperty(le,"__esModule",{value:!0});le.ruleSet=void 0;var ae="required",n="fn",i="argv",y="ref",X=!0,Z="isSet",S="booleanEquals",E="error",R="endpoint",c="tree",A="PartitionResult",g="getAttr",ee={[ae]:!1,type:"string"},te={[ae]:!0,default:!1,type:"boolean"},re={[y]:"Endpoint"},ue={[n]:S,[i]:[{[y]:"UseFIPS"},!0]},ce={[n]:S,[i]:[{[y]:"UseDualStack"},!0]},o={},se={[n]:g,[i]:[{[y]:A},"supportsFIPS"]},de={[y]:A},oe={[n]:S,[i]:[!0,{[n]:g,[i]:[de,"supportsDualStack"]}]},ne=[ue],ie=[ce],pe=[{[y]:"Region"}],qt={version:"1.0",parameters:{Region:ee,UseDualStack:te,UseFIPS:te,Endpoint:ee},rules:[{conditions:[{[n]:Z,[i]:[re]}],rules:[{conditions:ne,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:E},{conditions:ie,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:E},{endpoint:{url:re,properties:o,headers:o},type:R}],type:c},{conditions:[{[n]:Z,[i]:pe}],rules:[{conditions:[{[n]:"aws.partition",[i]:pe,assign:A}],rules:[{conditions:[ue,ce],rules:[{conditions:[{[n]:S,[i]:[X,se]},oe],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:o,headers:o},type:R}],type:c},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:E}],type:c},{conditions:ne,rules:[{conditions:[{[n]:S,[i]:[se,X]}],rules:[{conditions:[{[n]:"stringEquals",[i]:[{[n]:g,[i]:[de,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:o,headers:o},type:R},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:o,headers:o},type:R}],type:c},{error:"FIPS is enabled but this partition does not support FIPS",type:E}],type:c},{conditions:ie,rules:[{conditions:[oe],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:o,headers:o},type:R}],type:c},{error:"DualStack is enabled but this partition does not support DualStack",type:E}],type:c},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:o,headers:o},type:R}],type:c}],type:c},{error:"Invalid Configuration: Missing Region",type:E}]};le.ruleSet=qt});var Se=u((Re)=>{Object.defineProperty(Re,"__esModule",{value:!0});Re.defaultEndpointResolver=void 0;var Pt=Tt(),w=It(),Nt=Ee(),bt=new w.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Dt=(e,t={})=>{return bt.get(e,()=>(0,w.resolveEndpoint)(Nt.ruleSet,{endpointParams:e,logger:t.logger}))};Re.defaultEndpointResolver=Dt;w.customEndpointFunctions.aws=Pt.awsEndpointFunctions});var I=u((j)=>{Object.defineProperty(j,"__esModule",{value:!0});j.SSOServiceException=j.__ServiceException=void 0;var xe=q();Object.defineProperty(j,"__ServiceException",{enumerable:!0,get:function(){return xe.ServiceException}});class f extends xe.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,f.prototype)}}j.SSOServiceException=f});var K=u((Oe)=>{Object.defineProperty(Oe,"__esModule",{value:!0});Oe.UnauthorizedException=Oe.TooManyRequestsException=Oe.ResourceNotFoundException=Oe.InvalidRequestException=void 0;var T=I();class m extends T.SSOServiceException{name="InvalidRequestException";$fault="client";constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});Object.setPrototypeOf(this,m.prototype)}}Oe.InvalidRequestException=m;class z extends T.SSOServiceException{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,z.prototype)}}Oe.ResourceNotFoundException=z;class k extends T.SSOServiceException{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});Object.setPrototypeOf(this,k.prototype)}}Oe.TooManyRequestsException=k;class H extends T.SSOServiceException{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});Object.setPrototypeOf(this,H.prototype)}}Oe.UnauthorizedException=H});var L=u((De)=>{Object.defineProperty(De,"__esModule",{value:!0});De.GetRoleCredentials$=De.RoleCredentials$=De.GetRoleCredentialsResponse$=De.GetRoleCredentialsRequest$=De.errorTypeRegistries=De.UnauthorizedException$=De.TooManyRequestsException$=De.ResourceNotFoundException$=De.InvalidRequestException$=De.SSOServiceException$=void 0;var Mt="AccessTokenType",Ut="GetRoleCredentials",Ct="GetRoleCredentialsRequest",Gt="GetRoleCredentialsResponse",At="InvalidRequestException",gt="RoleCredentials",wt="ResourceNotFoundException",ft="SecretAccessKeyType",jt="SessionTokenType",mt="TooManyRequestsException",zt="UnauthorizedException",kt="accountId",Ht="accessKeyId",Kt="accessToken",Lt="account_id",P="client",N="error",Vt="expiration",Bt="http",b="httpError",Wt="httpHeader",Ie="httpQuery",D="message",Qt="roleCredentials",Yt="roleName",Jt="role_name",Pe="smithy.ts.sdk.synthetic.com.amazonaws.sso",Xt="secretAccessKey",Zt="sessionToken",er="x-amz-sso_bearer_token",p="com.amazonaws.sso",Ne=Te(),$=K(),tr=I(),be=Ne.TypeRegistry.for(Pe);De.SSOServiceException$=[-3,Pe,"SSOServiceException",0,[],[]];be.registerError(De.SSOServiceException$,tr.SSOServiceException);var x=Ne.TypeRegistry.for(p);De.InvalidRequestException$=[-3,p,At,{[N]:P,[b]:400},[D],[0]];x.registerError(De.InvalidRequestException$,$.InvalidRequestException);De.ResourceNotFoundException$=[-3,p,wt,{[N]:P,[b]:404},[D],[0]];x.registerError(De.ResourceNotFoundException$,$.ResourceNotFoundException);De.TooManyRequestsException$=[-3,p,mt,{[N]:P,[b]:429},[D],[0]];x.registerError(De.TooManyRequestsException$,$.TooManyRequestsException);De.UnauthorizedException$=[-3,p,zt,{[N]:P,[b]:401},[D],[0]];x.registerError(De.UnauthorizedException$,$.UnauthorizedException);De.errorTypeRegistries=[be,x];var rr=[0,p,Mt,8,0],sr=[0,p,ft,8,0],or=[0,p,jt,8,0];De.GetRoleCredentialsRequest$=[3,p,Ct,0,[Yt,kt,Kt],[[0,{[Ie]:Jt}],[0,{[Ie]:Lt}],[()=>rr,{[Wt]:er}]],3];De.GetRoleCredentialsResponse$=[3,p,Gt,0,[Qt],[[()=>De.RoleCredentials$,0]]];De.RoleCredentials$=[3,p,gt,0,[Ht,Xt,Zt,Vt],[0,[()=>sr,0],[()=>or,0],1]];De.GetRoleCredentials$=[9,p,Ut,{[Bt]:["GET","/federation/credentials",200]},()=>De.GetRoleCredentialsRequest$,()=>De.GetRoleCredentialsResponse$]});var ke=u((me)=>{Object.defineProperty(me,"__esModule",{value:!0});me.getRuntimeConfig=void 0;var cr=C(),dr=ur(),lr=je(),_r=q(),Er=ar(),we=pr(),fe=ir(),Rr=G(),yr=Se(),Sr=L(),xr=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??we.fromBase64,base64Encoder:e?.base64Encoder??we.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??yr.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Rr.defaultSSOHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(t)=>t.getIdentityProvider("aws.auth#sigv4"),signer:new cr.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(t)=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new lr.NoAuthSigner}],logger:e?.logger??new _r.NoOpLogger,protocol:e?.protocol??dr.AwsRestJsonProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sso",errorTypeRegistries:Sr.errorTypeRegistries,version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??Er.parseUrl,utf8Decoder:e?.utf8Decoder??fe.fromUtf8,utf8Encoder:e?.utf8Encoder??fe.toUtf8}};me.getRuntimeConfig=xr});var Xe=u((Ye)=>{Object.defineProperty(Ye,"__esModule",{value:!0});Ye.getRuntimeConfig=void 0;var $r=Or(),Fr=$r.__importDefault(Tr()),He=C(),Ke=Pr(),F=We(),hr=Nr(),Le=Qe(),l=Ir(),Ve=vr(),Be=q(),Mr=br(),Ur=Dr(),Cr=qr(),Gr=ke(),Ar=(e)=>{(0,Be.emitWarningIfUnsupportedVersion)(process.version);let t=(0,Ur.resolveDefaultsModeConfig)(e),r=()=>t().then(Be.loadConfigsForDefaultMode),a=(0,Gr.getRuntimeConfig)(e);(0,He.emitWarningIfUnsupportedVersion)(process.version);let s={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,l.loadConfig)(He.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,s),bodyLengthChecker:e?.bodyLengthChecker??Mr.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Ke.createDefaultUserAgentProvider)({serviceId:a.serviceId,clientVersion:Fr.default.version}),maxAttempts:e?.maxAttempts??(0,l.loadConfig)(Le.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,l.loadConfig)(F.NODE_REGION_CONFIG_OPTIONS,{...F.NODE_REGION_CONFIG_FILE_OPTIONS,...s}),requestHandler:Ve.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,l.loadConfig)({...Le.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||Cr.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??hr.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??Ve.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,l.loadConfig)(F.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,s),useFipsEndpoint:e?.useFipsEndpoint??(0,l.loadConfig)(F.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,s),userAgentAppId:e?.userAgentAppId??(0,l.loadConfig)(Ke.NODE_APP_ID_CONFIG_OPTIONS,s)}};Ye.getRuntimeConfig=Ar});var it=u((d)=>{var Ze=wr(),Kr=fr(),Lr=jr(),et=mr(),Vr=We(),V=je(),Br=Te(),Wr=zr(),nt=kr(),tt=Qe(),_=q(),rt=G(),Qr=Xe(),st=Hr(),ot=gr(),v=L(),h=K(),Yr=I(),Jr=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"})},Xr={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Zr=(e)=>{let{httpAuthSchemes:t,httpAuthSchemeProvider:r,credentials:a}=e;return{setHttpAuthScheme(s){let O=t.findIndex((M)=>M.schemeId===s.schemeId);if(O===-1)t.push(s);else t.splice(O,1,s)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(s){r=s},httpAuthSchemeProvider(){return r},setCredentials(s){a=s},credentials(){return a}}},es=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}},ts=(e,t)=>{let r=Object.assign(st.getAwsRegionExtensionConfiguration(e),_.getDefaultExtensionConfiguration(e),ot.getHttpHandlerExtensionConfiguration(e),Zr(e));return t.forEach((a)=>a.configure(r)),Object.assign(e,st.resolveAwsRegionExtensionConfiguration(r),_.resolveDefaultRuntimeConfig(r),ot.resolveHttpHandlerRuntimeConfig(r),es(r))};class B extends _.Client{config;constructor(...[e]){let t=Qr.getRuntimeConfig(e||{});super(t);this.initConfig=t;let r=Jr(t),a=et.resolveUserAgentConfig(r),s=tt.resolveRetryConfig(a),O=Vr.resolveRegionConfig(s),M=Ze.resolveHostHeaderConfig(O),at=nt.resolveEndpointConfig(M),ut=rt.resolveHttpAuthSchemeConfig(at),ct=ts(ut,e?.extensions||[]);this.config=ct,this.middlewareStack.use(Br.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(et.getUserAgentPlugin(this.config)),this.middlewareStack.use(tt.getRetryPlugin(this.config)),this.middlewareStack.use(Wr.getContentLengthPlugin(this.config)),this.middlewareStack.use(Ze.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Kr.getLoggerPlugin(this.config)),this.middlewareStack.use(Lr.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(V.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:rt.defaultSSOHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(dt)=>new V.DefaultIdentityProviderConfig({"aws.auth#sigv4":dt.credentials})})),this.middlewareStack.use(V.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class W extends _.Command.classBuilder().ep(Xr).m(function(e,t,r,a){return[nt.getEndpointPlugin(r,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc(v.GetRoleCredentials$).build(){}var rs={GetRoleCredentialsCommand:W};class Q extends B{}_.createAggregatedClient(rs,Q);d.$Command=_.Command;d.__Client=_.Client;d.SSOServiceException=Yr.SSOServiceException;d.GetRoleCredentialsCommand=W;d.SSO=Q;d.SSOClient=B;Object.prototype.hasOwnProperty.call(v,"__proto__")&&!Object.prototype.hasOwnProperty.call(d,"__proto__")&&Object.defineProperty(d,"__proto__",{enumerable:!0,value:v.__proto__});Object.keys(v).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(d,e))d[e]=v[e]});Object.prototype.hasOwnProperty.call(h,"__proto__")&&!Object.prototype.hasOwnProperty.call(d,"__proto__")&&Object.defineProperty(d,"__proto__",{enumerable:!0,value:h.__proto__});Object.keys(h).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(d,e))d[e]=h[e]})});var pt=us(it(),1);var export_SSOClient=pt.SSOClient;var export_GetRoleCredentialsCommand=pt.GetRoleCredentialsCommand;export{export_SSOClient as SSOClient,export_GetRoleCredentialsCommand as GetRoleCredentialsCommand};
2
+ import{a as Tr}from"./chunk-7pn0bnsc.js";import{b as je,d as C,e as wr,f as fr,g as jr,i as It,j as Tt,k as qr,l as mr,m as We,n as zr,o as kr,p as Qe,q as Pr,r as Nr,s as br,t as Dr,u as ur,v as Hr}from"./chunk-5txddtaa.js";import{w as Ir}from"./chunk-fck5yw2s.js";import{A as vr,E as Te,I as q,x as lt,y as pr}from"./chunk-d6kgxmp7.js";import{J as gr}from"./chunk-dxxak51x.js";import{M as ir}from"./chunk-74aj8ms2.js";import{N as ar}from"./chunk-ma5rj4st.js";import"./chunk-32d510cd.js";import"./chunk-rxsmwbxv.js";import"./chunk-64bq12j3.js";import"./chunk-katt90qz.js";import{ha as Or}from"./chunk-wrypq618.js";import{lf as us,mf as u}from"./chunk-4f69ygc8.js";var G=u((Y)=>{Object.defineProperty(Y,"__esModule",{value:!0});Y.resolveHttpAuthSchemeConfig=Y.defaultSSOHttpAuthSchemeProvider=Y.defaultSSOHttpAuthSchemeParametersProvider=void 0;var _t=C(),U=lt(),Et=async(e,t,r)=>{return{operation:(0,U.getSmithyContext)(t).operation,region:await(0,U.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};Y.defaultSSOHttpAuthSchemeParametersProvider=Et;function Rt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function yt(e){return{schemeId:"smithy.api#noAuth"}}var St=(e)=>{let t=[];switch(e.operation){case"GetRoleCredentials":{t.push(yt(e));break}default:t.push(Rt(e))}return t};Y.defaultSSOHttpAuthSchemeProvider=St;var xt=(e)=>{let t=(0,_t.resolveAwsSdkSigV4Config)(e);return Object.assign(t,{authSchemePreference:(0,U.normalizeProvider)(e.authSchemePreference??[])})};Y.resolveHttpAuthSchemeConfig=xt});var Ee=u((le)=>{Object.defineProperty(le,"__esModule",{value:!0});le.ruleSet=void 0;var ae="required",n="fn",i="argv",y="ref",X=!0,Z="isSet",S="booleanEquals",E="error",R="endpoint",c="tree",A="PartitionResult",g="getAttr",ee={[ae]:!1,type:"string"},te={[ae]:!0,default:!1,type:"boolean"},re={[y]:"Endpoint"},ue={[n]:S,[i]:[{[y]:"UseFIPS"},!0]},ce={[n]:S,[i]:[{[y]:"UseDualStack"},!0]},o={},se={[n]:g,[i]:[{[y]:A},"supportsFIPS"]},de={[y]:A},oe={[n]:S,[i]:[!0,{[n]:g,[i]:[de,"supportsDualStack"]}]},ne=[ue],ie=[ce],pe=[{[y]:"Region"}],qt={version:"1.0",parameters:{Region:ee,UseDualStack:te,UseFIPS:te,Endpoint:ee},rules:[{conditions:[{[n]:Z,[i]:[re]}],rules:[{conditions:ne,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:E},{conditions:ie,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:E},{endpoint:{url:re,properties:o,headers:o},type:R}],type:c},{conditions:[{[n]:Z,[i]:pe}],rules:[{conditions:[{[n]:"aws.partition",[i]:pe,assign:A}],rules:[{conditions:[ue,ce],rules:[{conditions:[{[n]:S,[i]:[X,se]},oe],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:o,headers:o},type:R}],type:c},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:E}],type:c},{conditions:ne,rules:[{conditions:[{[n]:S,[i]:[se,X]}],rules:[{conditions:[{[n]:"stringEquals",[i]:[{[n]:g,[i]:[de,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:o,headers:o},type:R},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:o,headers:o},type:R}],type:c},{error:"FIPS is enabled but this partition does not support FIPS",type:E}],type:c},{conditions:ie,rules:[{conditions:[oe],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:o,headers:o},type:R}],type:c},{error:"DualStack is enabled but this partition does not support DualStack",type:E}],type:c},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:o,headers:o},type:R}],type:c}],type:c},{error:"Invalid Configuration: Missing Region",type:E}]};le.ruleSet=qt});var Se=u((Re)=>{Object.defineProperty(Re,"__esModule",{value:!0});Re.defaultEndpointResolver=void 0;var Pt=Tt(),w=It(),Nt=Ee(),bt=new w.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Dt=(e,t={})=>{return bt.get(e,()=>(0,w.resolveEndpoint)(Nt.ruleSet,{endpointParams:e,logger:t.logger}))};Re.defaultEndpointResolver=Dt;w.customEndpointFunctions.aws=Pt.awsEndpointFunctions});var I=u((j)=>{Object.defineProperty(j,"__esModule",{value:!0});j.SSOServiceException=j.__ServiceException=void 0;var xe=q();Object.defineProperty(j,"__ServiceException",{enumerable:!0,get:function(){return xe.ServiceException}});class f extends xe.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,f.prototype)}}j.SSOServiceException=f});var K=u((Oe)=>{Object.defineProperty(Oe,"__esModule",{value:!0});Oe.UnauthorizedException=Oe.TooManyRequestsException=Oe.ResourceNotFoundException=Oe.InvalidRequestException=void 0;var T=I();class m extends T.SSOServiceException{name="InvalidRequestException";$fault="client";constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});Object.setPrototypeOf(this,m.prototype)}}Oe.InvalidRequestException=m;class z extends T.SSOServiceException{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,z.prototype)}}Oe.ResourceNotFoundException=z;class k extends T.SSOServiceException{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});Object.setPrototypeOf(this,k.prototype)}}Oe.TooManyRequestsException=k;class H extends T.SSOServiceException{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});Object.setPrototypeOf(this,H.prototype)}}Oe.UnauthorizedException=H});var L=u((De)=>{Object.defineProperty(De,"__esModule",{value:!0});De.GetRoleCredentials$=De.RoleCredentials$=De.GetRoleCredentialsResponse$=De.GetRoleCredentialsRequest$=De.errorTypeRegistries=De.UnauthorizedException$=De.TooManyRequestsException$=De.ResourceNotFoundException$=De.InvalidRequestException$=De.SSOServiceException$=void 0;var Mt="AccessTokenType",Ut="GetRoleCredentials",Ct="GetRoleCredentialsRequest",Gt="GetRoleCredentialsResponse",At="InvalidRequestException",gt="RoleCredentials",wt="ResourceNotFoundException",ft="SecretAccessKeyType",jt="SessionTokenType",mt="TooManyRequestsException",zt="UnauthorizedException",kt="accountId",Ht="accessKeyId",Kt="accessToken",Lt="account_id",P="client",N="error",Vt="expiration",Bt="http",b="httpError",Wt="httpHeader",Ie="httpQuery",D="message",Qt="roleCredentials",Yt="roleName",Jt="role_name",Pe="smithy.ts.sdk.synthetic.com.amazonaws.sso",Xt="secretAccessKey",Zt="sessionToken",er="x-amz-sso_bearer_token",p="com.amazonaws.sso",Ne=Te(),$=K(),tr=I(),be=Ne.TypeRegistry.for(Pe);De.SSOServiceException$=[-3,Pe,"SSOServiceException",0,[],[]];be.registerError(De.SSOServiceException$,tr.SSOServiceException);var x=Ne.TypeRegistry.for(p);De.InvalidRequestException$=[-3,p,At,{[N]:P,[b]:400},[D],[0]];x.registerError(De.InvalidRequestException$,$.InvalidRequestException);De.ResourceNotFoundException$=[-3,p,wt,{[N]:P,[b]:404},[D],[0]];x.registerError(De.ResourceNotFoundException$,$.ResourceNotFoundException);De.TooManyRequestsException$=[-3,p,mt,{[N]:P,[b]:429},[D],[0]];x.registerError(De.TooManyRequestsException$,$.TooManyRequestsException);De.UnauthorizedException$=[-3,p,zt,{[N]:P,[b]:401},[D],[0]];x.registerError(De.UnauthorizedException$,$.UnauthorizedException);De.errorTypeRegistries=[be,x];var rr=[0,p,Mt,8,0],sr=[0,p,ft,8,0],or=[0,p,jt,8,0];De.GetRoleCredentialsRequest$=[3,p,Ct,0,[Yt,kt,Kt],[[0,{[Ie]:Jt}],[0,{[Ie]:Lt}],[()=>rr,{[Wt]:er}]],3];De.GetRoleCredentialsResponse$=[3,p,Gt,0,[Qt],[[()=>De.RoleCredentials$,0]]];De.RoleCredentials$=[3,p,gt,0,[Ht,Xt,Zt,Vt],[0,[()=>sr,0],[()=>or,0],1]];De.GetRoleCredentials$=[9,p,Ut,{[Bt]:["GET","/federation/credentials",200]},()=>De.GetRoleCredentialsRequest$,()=>De.GetRoleCredentialsResponse$]});var ke=u((me)=>{Object.defineProperty(me,"__esModule",{value:!0});me.getRuntimeConfig=void 0;var cr=C(),dr=ur(),lr=je(),_r=q(),Er=ar(),we=pr(),fe=ir(),Rr=G(),yr=Se(),Sr=L(),xr=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??we.fromBase64,base64Encoder:e?.base64Encoder??we.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??yr.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Rr.defaultSSOHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(t)=>t.getIdentityProvider("aws.auth#sigv4"),signer:new cr.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(t)=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new lr.NoAuthSigner}],logger:e?.logger??new _r.NoOpLogger,protocol:e?.protocol??dr.AwsRestJsonProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sso",errorTypeRegistries:Sr.errorTypeRegistries,version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??Er.parseUrl,utf8Decoder:e?.utf8Decoder??fe.fromUtf8,utf8Encoder:e?.utf8Encoder??fe.toUtf8}};me.getRuntimeConfig=xr});var Xe=u((Ye)=>{Object.defineProperty(Ye,"__esModule",{value:!0});Ye.getRuntimeConfig=void 0;var $r=Or(),Fr=$r.__importDefault(Tr()),He=C(),Ke=Pr(),F=We(),hr=Nr(),Le=Qe(),l=Ir(),Ve=vr(),Be=q(),Mr=br(),Ur=Dr(),Cr=qr(),Gr=ke(),Ar=(e)=>{(0,Be.emitWarningIfUnsupportedVersion)(process.version);let t=(0,Ur.resolveDefaultsModeConfig)(e),r=()=>t().then(Be.loadConfigsForDefaultMode),a=(0,Gr.getRuntimeConfig)(e);(0,He.emitWarningIfUnsupportedVersion)(process.version);let s={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,l.loadConfig)(He.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,s),bodyLengthChecker:e?.bodyLengthChecker??Mr.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Ke.createDefaultUserAgentProvider)({serviceId:a.serviceId,clientVersion:Fr.default.version}),maxAttempts:e?.maxAttempts??(0,l.loadConfig)(Le.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,l.loadConfig)(F.NODE_REGION_CONFIG_OPTIONS,{...F.NODE_REGION_CONFIG_FILE_OPTIONS,...s}),requestHandler:Ve.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,l.loadConfig)({...Le.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||Cr.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??hr.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??Ve.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,l.loadConfig)(F.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,s),useFipsEndpoint:e?.useFipsEndpoint??(0,l.loadConfig)(F.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,s),userAgentAppId:e?.userAgentAppId??(0,l.loadConfig)(Ke.NODE_APP_ID_CONFIG_OPTIONS,s)}};Ye.getRuntimeConfig=Ar});var it=u((d)=>{var Ze=wr(),Kr=fr(),Lr=jr(),et=mr(),Vr=We(),V=je(),Br=Te(),Wr=zr(),nt=kr(),tt=Qe(),_=q(),rt=G(),Qr=Xe(),st=Hr(),ot=gr(),v=L(),h=K(),Yr=I(),Jr=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"})},Xr={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Zr=(e)=>{let{httpAuthSchemes:t,httpAuthSchemeProvider:r,credentials:a}=e;return{setHttpAuthScheme(s){let O=t.findIndex((M)=>M.schemeId===s.schemeId);if(O===-1)t.push(s);else t.splice(O,1,s)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(s){r=s},httpAuthSchemeProvider(){return r},setCredentials(s){a=s},credentials(){return a}}},es=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}},ts=(e,t)=>{let r=Object.assign(st.getAwsRegionExtensionConfiguration(e),_.getDefaultExtensionConfiguration(e),ot.getHttpHandlerExtensionConfiguration(e),Zr(e));return t.forEach((a)=>a.configure(r)),Object.assign(e,st.resolveAwsRegionExtensionConfiguration(r),_.resolveDefaultRuntimeConfig(r),ot.resolveHttpHandlerRuntimeConfig(r),es(r))};class B extends _.Client{config;constructor(...[e]){let t=Qr.getRuntimeConfig(e||{});super(t);this.initConfig=t;let r=Jr(t),a=et.resolveUserAgentConfig(r),s=tt.resolveRetryConfig(a),O=Vr.resolveRegionConfig(s),M=Ze.resolveHostHeaderConfig(O),at=nt.resolveEndpointConfig(M),ut=rt.resolveHttpAuthSchemeConfig(at),ct=ts(ut,e?.extensions||[]);this.config=ct,this.middlewareStack.use(Br.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(et.getUserAgentPlugin(this.config)),this.middlewareStack.use(tt.getRetryPlugin(this.config)),this.middlewareStack.use(Wr.getContentLengthPlugin(this.config)),this.middlewareStack.use(Ze.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Kr.getLoggerPlugin(this.config)),this.middlewareStack.use(Lr.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(V.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:rt.defaultSSOHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(dt)=>new V.DefaultIdentityProviderConfig({"aws.auth#sigv4":dt.credentials})})),this.middlewareStack.use(V.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class W extends _.Command.classBuilder().ep(Xr).m(function(e,t,r,a){return[nt.getEndpointPlugin(r,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc(v.GetRoleCredentials$).build(){}var rs={GetRoleCredentialsCommand:W};class Q extends B{}_.createAggregatedClient(rs,Q);d.$Command=_.Command;d.__Client=_.Client;d.SSOServiceException=Yr.SSOServiceException;d.GetRoleCredentialsCommand=W;d.SSO=Q;d.SSOClient=B;Object.prototype.hasOwnProperty.call(v,"__proto__")&&!Object.prototype.hasOwnProperty.call(d,"__proto__")&&Object.defineProperty(d,"__proto__",{enumerable:!0,value:v.__proto__});Object.keys(v).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(d,e))d[e]=v[e]});Object.prototype.hasOwnProperty.call(h,"__proto__")&&!Object.prototype.hasOwnProperty.call(d,"__proto__")&&Object.defineProperty(d,"__proto__",{enumerable:!0,value:h.__proto__});Object.keys(h).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(d,e))d[e]=h[e]})});var pt=us(it(),1);var export_SSOClient=pt.SSOClient;var export_GetRoleCredentialsCommand=pt.GetRoleCredentialsCommand;export{export_SSOClient as SSOClient,export_GetRoleCredentialsCommand as GetRoleCredentialsCommand};
3
3
 
4
- //# debugId=E078E82FD33E428B64756E2164756E21
4
+ //# debugId=0ED2BDDE3B7497A064756E2164756E21
@@ -14,6 +14,6 @@
14
14
  "import { GetRoleCredentialsCommand, SSOClient } from \"@aws-sdk/nested-clients/sso\";\nexport { GetRoleCredentialsCommand, SSOClient };\n"
15
15
  ],
16
16
  "mappings": ";+uBACA,CAAO,SAAe,JAAS,OAAc,LAAE,AAAO,JAAK,LAAC,JACpD,wBAAsC,6BAA2C,uCAAkD,OAC3I,IAAM,OACA,OACA,GAA6C,MAAO,EAAQ,EAAS,IAAU,CACjF,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,6CAA6C,GACrD,SAAS,EAAgC,CAAC,EAAgB,CACtD,MAAO,CACH,SAAU,iBACV,kBAAmB,CACf,KAAM,eACN,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,GAAmC,CAAC,IAAmB,CACzD,IAAM,EAAU,CAAC,EACjB,OAAQ,EAAe,eACd,qBAAsB,CACvB,EAAQ,KAAK,GAAoC,CAAc,CAAC,EAChE,KACJ,SAEI,EAAQ,KAAK,GAAiC,CAAc,CAAC,EAGrE,OAAO,GAEH,mCAAmC,GAC3C,IAAM,GAA8B,CAA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,EAAE,QAAQ,QAAS,CAAC,EAAG,CACrC,GAAI,IAAM,WAAa,CAAC,OAAO,UAAU,eAAe,KAAK,EAAS,CAAC,EAAG,EAAQ,GAAK,EAAO,GACjG,IC/JD",
17
- "debugId": "E078E82FD33E428B64756E2164756E21",
17
+ "debugId": "0ED2BDDE3B7497A064756E2164756E21",
18
18
  "names": []
19
19
  }
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{ff as h}from"./chunk-kgmr9qxx.js";var A=h((f)=>{f.HttpAuthLocation=void 0;(function(t){t.HEADER="header",t.QUERY="query"})(f.HttpAuthLocation||(f.HttpAuthLocation={}));f.HttpApiKeyAuthLocation=void 0;(function(t){t.HEADER="header",t.QUERY="query"})(f.HttpApiKeyAuthLocation||(f.HttpApiKeyAuthLocation={}));f.EndpointURLScheme=void 0;(function(t){t.HTTP="http",t.HTTPS="https"})(f.EndpointURLScheme||(f.EndpointURLScheme={}));f.AlgorithmId=void 0;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(f.AlgorithmId||(f.AlgorithmId={}));var x=(t)=>{let o=[];if(t.sha256!==void 0)o.push({algorithmId:()=>f.AlgorithmId.SHA256,checksumConstructor:()=>t.sha256});if(t.md5!=null)o.push({algorithmId:()=>f.AlgorithmId.MD5,checksumConstructor:()=>t.md5});return{addChecksumAlgorithm(s){o.push(s)},checksumAlgorithms(){return o}}},d=(t)=>{let o={};return t.checksumAlgorithms().forEach((s)=>{o[s.algorithmId()]=s.checksumConstructor()}),o},a=(t)=>{return x(t)},E=(t)=>{return d(t)};f.FieldPosition=void 0;(function(t){t[t.HEADER=0]="HEADER",t[t.TRAILER=1]="TRAILER"})(f.FieldPosition||(f.FieldPosition={}));var m="__smithy_context";f.IniSectionType=void 0;(function(t){t.PROFILE="profile",t.SSO_SESSION="sso-session",t.SERVICES="services"})(f.IniSectionType||(f.IniSectionType={}));f.RequestHandlerProtocol=void 0;(function(t){t.HTTP_0_9="http/0.9",t.HTTP_1_0="http/1.0",t.TDS_8_0="tds/8.0"})(f.RequestHandlerProtocol||(f.RequestHandlerProtocol={}));f.SMITHY_CONTEXT_KEY=m;f.getDefaultClientConfiguration=a;f.resolveDefaultRuntimeConfig=E});
2
+ import{mf as h}from"./chunk-4f69ygc8.js";var A=h((f)=>{f.HttpAuthLocation=void 0;(function(t){t.HEADER="header",t.QUERY="query"})(f.HttpAuthLocation||(f.HttpAuthLocation={}));f.HttpApiKeyAuthLocation=void 0;(function(t){t.HEADER="header",t.QUERY="query"})(f.HttpApiKeyAuthLocation||(f.HttpApiKeyAuthLocation={}));f.EndpointURLScheme=void 0;(function(t){t.HTTP="http",t.HTTPS="https"})(f.EndpointURLScheme||(f.EndpointURLScheme={}));f.AlgorithmId=void 0;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(f.AlgorithmId||(f.AlgorithmId={}));var x=(t)=>{let o=[];if(t.sha256!==void 0)o.push({algorithmId:()=>f.AlgorithmId.SHA256,checksumConstructor:()=>t.sha256});if(t.md5!=null)o.push({algorithmId:()=>f.AlgorithmId.MD5,checksumConstructor:()=>t.md5});return{addChecksumAlgorithm(s){o.push(s)},checksumAlgorithms(){return o}}},d=(t)=>{let o={};return t.checksumAlgorithms().forEach((s)=>{o[s.algorithmId()]=s.checksumConstructor()}),o},a=(t)=>{return x(t)},E=(t)=>{return d(t)};f.FieldPosition=void 0;(function(t){t[t.HEADER=0]="HEADER",t[t.TRAILER=1]="TRAILER"})(f.FieldPosition||(f.FieldPosition={}));var m="__smithy_context";f.IniSectionType=void 0;(function(t){t.PROFILE="profile",t.SSO_SESSION="sso-session",t.SERVICES="services"})(f.IniSectionType||(f.IniSectionType={}));f.RequestHandlerProtocol=void 0;(function(t){t.HTTP_0_9="http/0.9",t.HTTP_1_0="http/1.0",t.TDS_8_0="tds/8.0"})(f.RequestHandlerProtocol||(f.RequestHandlerProtocol={}));f.SMITHY_CONTEXT_KEY=m;f.getDefaultClientConfiguration=a;f.resolveDefaultRuntimeConfig=E});
3
3
  export{A as P};
4
4
 
5
- //# debugId=B757B47ACCED55E564756E2164756E21
5
+ //# debugId=F7108BFAC31B36AF64756E2164756E21
@@ -5,6 +5,6 @@
5
5
  "'use strict';\n\nexports.HttpAuthLocation = void 0;\n(function (HttpAuthLocation) {\n HttpAuthLocation[\"HEADER\"] = \"header\";\n HttpAuthLocation[\"QUERY\"] = \"query\";\n})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {}));\n\nexports.HttpApiKeyAuthLocation = void 0;\n(function (HttpApiKeyAuthLocation) {\n HttpApiKeyAuthLocation[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation[\"QUERY\"] = \"query\";\n})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {}));\n\nexports.EndpointURLScheme = void 0;\n(function (EndpointURLScheme) {\n EndpointURLScheme[\"HTTP\"] = \"http\";\n EndpointURLScheme[\"HTTPS\"] = \"https\";\n})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {}));\n\nexports.AlgorithmId = void 0;\n(function (AlgorithmId) {\n AlgorithmId[\"MD5\"] = \"md5\";\n AlgorithmId[\"CRC32\"] = \"crc32\";\n AlgorithmId[\"CRC32C\"] = \"crc32c\";\n AlgorithmId[\"SHA1\"] = \"sha1\";\n AlgorithmId[\"SHA256\"] = \"sha256\";\n})(exports.AlgorithmId || (exports.AlgorithmId = {}));\nconst getChecksumConfiguration = (runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== undefined) {\n checksumAlgorithms.push({\n algorithmId: () => exports.AlgorithmId.SHA256,\n checksumConstructor: () => runtimeConfig.sha256,\n });\n }\n if (runtimeConfig.md5 != undefined) {\n checksumAlgorithms.push({\n algorithmId: () => exports.AlgorithmId.MD5,\n checksumConstructor: () => runtimeConfig.md5,\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n },\n };\n};\nconst resolveChecksumRuntimeConfig = (clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n};\n\nconst getDefaultClientConfiguration = (runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n};\nconst resolveDefaultRuntimeConfig = (config) => {\n return resolveChecksumRuntimeConfig(config);\n};\n\nexports.FieldPosition = void 0;\n(function (FieldPosition) {\n FieldPosition[FieldPosition[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition[FieldPosition[\"TRAILER\"] = 1] = \"TRAILER\";\n})(exports.FieldPosition || (exports.FieldPosition = {}));\n\nconst SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\nexports.IniSectionType = void 0;\n(function (IniSectionType) {\n IniSectionType[\"PROFILE\"] = \"profile\";\n IniSectionType[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType[\"SERVICES\"] = \"services\";\n})(exports.IniSectionType || (exports.IniSectionType = {}));\n\nexports.RequestHandlerProtocol = void 0;\n(function (RequestHandlerProtocol) {\n RequestHandlerProtocol[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol[\"TDS_8_0\"] = \"tds/8.0\";\n})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {}));\n\nexports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY;\nexports.getDefaultClientConfiguration = getDefaultClientConfiguration;\nexports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig;\n"
6
6
  ],
7
7
  "mappings": ";uDAEQ,mBAAwB,QAC/B,QAAS,CAAC,EAAkB,CACzB,EAAiB,OAAY,SAC7B,EAAiB,MAAW,UACrB,qBAA6B,mBAAmB,CAAC,EAAE,EAEtD,yBAA8B,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Ae,QAAa,UAC5B,EAAe,YAAiB,cAChC,EAAe,SAAc,aACtB,mBAA2B,iBAAiB,CAAC,EAAE,EAElD,yBAA8B,QACrC,QAAS,CAAC,EAAwB,CAC/B,EAAuB,SAAc,WACrC,EAAuB,SAAc,WACrC,EAAuB,QAAa,YAC7B,2BAAmC,yBAAyB,CAAC,EAAE,EAElE,qBAAqB,EACrB,gCAAgC,EAChC,8BAA8B",
8
- "debugId": "B757B47ACCED55E564756E2164756E21",
8
+ "debugId": "F7108BFAC31B36AF64756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{$ as D,Z as x}from"./chunk-9r1atj8w.js";import{ia as y,ja as I}from"./chunk-v7y8zm61.js";import"./chunk-5ad8era8.js";import"./chunk-ejrcyzx8.js";import"./chunk-tkdxv6cq.js";import"./chunk-xnytbrda.js";import"./chunk-kgmr9qxx.js";import{IncomingMessage as T,ServerResponse as g}from"http";import{Socket as w}from"net";import{join as E}from"path";import{createServer as k}from"vite";function N(H){return H.replace(/\x1b\[[0-9;]*m/g,"").replace(/\[[0-9;]*m/g,"").replace(/\n\s*\n/g,`
2
+ import{$ as D,Z as x}from"./chunk-5fmbsy4q.js";import{ia as y,ja as I}from"./chunk-v7y8zm61.js";import"./chunk-5ad8era8.js";import"./chunk-ejrcyzx8.js";import"./chunk-tkdxv6cq.js";import"./chunk-xnytbrda.js";import"./chunk-4f69ygc8.js";import{IncomingMessage as T,ServerResponse as g}from"http";import{Socket as w}from"net";import{join as E}from"path";import{createServer as k}from"vite";function N(H){return H.replace(/\x1b\[[0-9;]*m/g,"").replace(/\[[0-9;]*m/g,"").replace(/\n\s*\n/g,`
3
3
  `).split(`
4
4
  `).map((J)=>J.trim()).filter((J)=>J.length>0).join(`
5
5
  `).trim()}function R(H){return`
@@ -0,0 +1,37 @@
1
+ // @bun
2
+ import{Nb as E,Ob as O,Pb as x}from"./chunk-vdzb29p5.js";import{_e as B}from"./chunk-btr9kyqh.js";import{if as I}from"./chunk-mqwrmbh4.js";function b(_){return _}function P(){return{jobs:[],jobsDir:"app/jobs",concurrency:1}}function D(){let _=process.env.APP_DIR,Q=process.env.ROOT_DIR,F=Bun.env.NODE_ENV==="production"?`${Q}/dist/server/bootstrap.mjs`:`${_}/bootstrap.ts`,X=new File([`
3
+ import { app } from "${F}"
4
+ self.onmessage = async (event) => {
5
+ const clone = app.clone()
6
+ let result = null;
7
+ let error = null;
8
+ try {
9
+ result = await clone.dispatchJob(event.data.jobName, event.data.args)
10
+ } catch (err) {
11
+ error = err
12
+ }
13
+ clone.destroy()
14
+ if(error) {
15
+ self.postMessage({error});
16
+ } else {
17
+ self.postMessage({result});
18
+ }
19
+ };
20
+ `],"worker.ts"),H=URL.createObjectURL(X);return new Worker(H)}async function N(_,Q){let F=D();return F.postMessage({jobName:_,args:Q}),await new Promise((X,H)=>{F.onmessage=(G)=>{let V=G.data;if("error"in V)H(V.error);else X(V.result)}})}class J{static token="queue";queue=new Set;activeRunningJobsCount=0;isRunning=!1;jobs={};config;constructor(_={}){this.config=B(P(),_),this.useJobs(this.config.jobs)}useJobs(_){this.config.jobs=_,this.jobs={};for(let Q of _)this.claim(Q)}registerJob(_){this.config.jobs=[...this.config.jobs,_],this.claim(_)}claim(_){if(this.jobs[_.name]){console.error(`Two queued jobs are named "${_.name}" \u2014 the first is registered `+"and this one is not, so dispatching either would have run one of them. A class name is the queue's key, so only one job can hold it. Rename one.");return}this.jobs[_.name]=_}get registeredJobs(){return[...this.config.jobs]}dispatchJob(_,Q){if(this.jobs[_])return new this.jobs[_]().run(JSON.parse(Q))}async next(){if(!this.isRunning)this.isRunning=!0;if(this.activeRunningJobsCount>=this.config.concurrency)return await new Promise((Q)=>setTimeout(Q,1000)),this.next();let _=this.queue.values().next().value;if(_)if(this.queue.delete(_),this.jobs[_.class])this.run(_);else console.error(`Dropped a queued job: nothing is registered under the name "${_.class}". If the class exists, it was not `+"discovered \u2014 check that it is under the queue slice's jobsDir "+"(app/jobs by default), or list it in app/config/queue.ts.");if(this.queue.size===0){this.isRunning=!1;return}await this.next()}async run(_){let Q=this.jobs[_.class],F=new Q,X=JSON.parse(_.args);this.activeRunningJobsCount++;try{let H=await(F.worker?N(_.class,_.args):F.run(...X));F.onSuccess(H,...X)}catch(H){if(F.onFail(H,...X),_.retries>=F.maxAttempts-1)F.onDeadletter(H,...X);else this.push(Q,_.args,_.retries+1)}this.activeRunningJobsCount--}push(_,Q,F=0){if(this.queue.add({class:_.name,args:Q,createdAt:Date.now(),retries:F}),!this.isRunning)this.next()}}class k extends Error{code;constructor(_,Q=1){super(_);this.code=Q;this.name="CommandFailed"}}class K{static commandName="unset";static description="";static args=[];static options=[];run(_){}}function n(_){return _}function C(){return{commands:[],commandsDir:"app/commands"}}var M=Symbol.for("gemi.console.builder");function y(_){if(_.trim()==="")throw Error("A command name cannot be empty.");if(/[{}]/.test(_)||/\s/.test(_))throw Error(`Invalid command name ${JSON.stringify(_)}. gemi does not parse a signature string; the name is the whole of it. Declare arguments with .arg() and flags with .option():
21
+
22
+ defineCommand("mail:send")
23
+ .arg("user", { required: true })
24
+ .option("queue", { type: "boolean" })
25
+ .handle(async ({ args, options }) => { ... })`)}function s(_){y(_);let Q=[],F=[],X="",H={[M]:_,describe(G){return X=G,H},arg(G,V={}){if(V.required&&V.default!==void 0)throw Error(`Argument "${G}" of command "${_}" is both required and has a default. An argument that is supplied when absent cannot also be `+"absent \u2014 drop one.");if(V.variadic&&V.default!==void 0)throw Error(`Argument "${G}" of command "${_}" is variadic and has a default. A variadic argument collects the remaining values and is an empty list when there are none, so the default could never `+"apply \u2014 drop it, or drop `variadic`.");let $=Q.find((Y)=>Y.variadic);if($)throw Error(`Argument "${G}" of command "${_}" is declared after the variadic argument "${$.name}", which collects everything that follows, so "${G}" could never receive a value. A variadic argument must be declared last.`);if(Q.some((Y)=>Y.name===G))throw Error(`Command "${_}" declares the argument "${G}" twice.`);return Q.push({...V,name:G}),H},option(G,V){if(F.some((z)=>z.name===G))throw Error(`Command "${_}" declares the option "${G}" twice.`);let $="alias"in V?V.alias:void 0,Y=$===void 0?void 0:F.find((z)=>("alias"in z)&&z.alias===$);if(Y)throw Error(`Options "${Y.name}" and "${G}" of command "${_}" both use the alias "-${$}".`);return F.push({...V,name:G}),H},handle(G){let V=_,$=X,Y=class extends K{static commandName=V;static description=$;static args=[...Q];static options=[...F];run(z){return G(z)}};return delete H[M],Object.defineProperty(Y,"name",{value:V,configurable:!0}),Y}};return H}function T(_){return typeof _==="object"&&_!==null&&typeof _[M]==="string"}class S{name;cron;shouldRun(){return!0}callback(){}onTick(){}onComplete(){}static exp(_){return _}}function __(_){return _}function A(){return{jobs:[],jobsDir:"app/cron"}}function F_(_){return _}function W(){return{listeners:[],listenersDir:"app/listeners"}}class U{static name="unset";static event;queued=!1;maxAttempts=3;worker=!1}class L{static name="unset";worker=!1;maxAttempts=3;run(..._){}onFail(_,...Q){}onSuccess(_,...Q){}onDeadletter(_,...Q){}static dispatch(..._){if(this.name==="unset")throw Error("Cannot dispatch a job with no name");I(J).push(this,JSON.stringify(_))}}import{existsSync as R}from"fs";import{dirname as w,isAbsolute as v,join as j}from"path";function Z(_){return v(_)?_:j(x(),_)}function q(_,Q,F){if(R(_)||R(w(_)))return;console.warn(`No ${Q} were discovered: neither ${_} nor the directory above it exists, so this process cannot see the application's source. If this is a deploy that ships only the build output, list the classes explicitly in app/config/${F}.ts so they travel with it.`)}async function E_(_=P().jobsDir){let Q=Z(_);q(Q,"queue jobs","queue");let F=await O(Q,L);return u(F),F}function u(_){for(let Q of _){if(Object.getOwnPropertyDescriptor(Q,"name")?.writable)continue;console.warn(`Queued job ${Q.name} does not declare \`static name\`, so it is registered under its class name. A production build minifies the class that dispatches it and renames it, while discovery reads this `+"file from source and does not \u2014 so the dispatch would be dropped in "+`production and nowhere else. Add: static name = "${Q.name}";`)}}async function B_(_=A().jobsDir){let Q=Z(_);return q(Q,"cron jobs","schedule"),await O(Q,S)}async function C_(_=C().commandsDir){let Q=Z(_);q(Q,"commands","command");let F=[],X=await O(Q,K,[],(H,G)=>{if(T(H))F.push(G)});return f(F),X}function f(_){if(_.length===0)return;let Q=_.length===1?`${_[0]} exports a command builder that never called \`.handle()\``:`${_.length} files export a command builder that never called \`.handle()\`:
26
+ ${_.join(`
27
+ `)}`;throw new E(`${Q}, so there is no command to run. \`.handle()\` is what turns `+`the chain into a command \u2014 finish it:
28
+
29
+ `+` export default defineCommand("my-command")
30
+ .handle(async ({ line }) => { line("hello") })`)}async function T_(_=W().listenersDir){let Q=Z(_);q(Q,"event listeners","events");let F=await O(Q,U);return p(F),g(F),m(F),F}function p(_){let Q=_.filter((F)=>!F.event);if(Q.length===0)return;throw new E(`${Q.map((F)=>F.name).join(", ")} declare no \`static event\`, so there is no event name to register them under and their \`handle\` would never run. Every listener binds to exactly one event:
31
+
32
+ static event = UserRegistered;
33
+
34
+ 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 g(_){for(let Q of _){if(Object.getOwnPropertyDescriptor(Q,"name")?.writable)continue;console.warn(`Event listener ${Q.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 = "${Q.name}";`)}}function m(_){let Q=new Set;for(let{event:F}of _){if(Q.has(F))continue;if(Object.getOwnPropertyDescriptor(F,"name")?.writable)continue;Q.add(F),console.warn(`Event ${F.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 = "${F.name}";`)}}
35
+ export{b as tb,P as ub,J as vb,k as wb,K as xb,n as yb,C as zb,s as Ab,S as Bb,__ as Cb,A as Db,F_ as Eb,W as Fb,U as Gb,L as Hb,E_ as Ib,B_ as Jb,C_ as Kb,T_ as Lb};
36
+
37
+ //# debugId=78E39A3E305D66FA64756E2164756E21
@@ -0,0 +1,20 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../services/queue/config.ts", "../services/queue/QueueManager.ts", "../console/Command.ts", "../console/config.ts", "../console/builder.ts", "../services/cron/CronJob.ts", "../services/cron/config.ts", "../services/events/config.ts", "../services/events/Listener.ts", "../services/queue/Job.ts", "../services/discovery.ts"],
4
+ "sourcesContent": [
5
+ "import type { Job } from \"./Job\";\n\n// Config key: `queue`. Derived from `QueueServiceProvider`.\nexport interface QueueConfig {\n /**\n * The `Job` subclasses this application dispatches, or nothing.\n *\n * ### Why \"or nothing\" is the point\n *\n * A dispatch that names a job the `QueueManager` has never heard of does not\n * fail — `next()` looks the name up in this list, and what is not there is\n * dropped with a line on stderr and nothing else. `Job.dispatch` has already\n * returned by then, so nothing upstream can be told. The list is therefore a\n * second spelling of `app/jobs`, kept in step by hand, and the cost of the\n * two disagreeing is paid by whatever was supposed to happen after the\n * dispatch.\n *\n * Leaving this out spells it once: the jobs are the classes under `jobsDir`.\n *\n * ### The rule, exactly\n *\n * **Declared wins, and `[]` is declared.** A `jobs` that is present is used\n * verbatim and no directory is read — that is the escape hatch for an app\n * whose jobs live somewhere this cannot walk, for one that deliberately\n * registers a subset, and for a deploy that ships no source. An empty array\n * means an app with no jobs and says so; it does not mean \"find some\".\n *\n * **Absent or `undefined` discovers.** `undefined` counts as absent for the\n * same reason `withDefaults` treats it that way everywhere else: a key spread\n * in from an optional value is an omission, not an instruction.\n */\n jobs?: Array<new () => Job>;\n\n /**\n * Where to look when `jobs` was not declared. Relative to the project root,\n * or absolute.\n *\n * Every `.ts`/`.tsx` file underneath it is imported at boot and every exported\n * class extending `Job` is registered, so this wants to be a directory of job\n * declarations rather than a directory that merely contains some. Moving the\n * jobs is what this field is for; pointing it at `app/` is not.\n */\n jobsDir?: string;\n\n concurrency?: number;\n}\n\nexport function defineQueueConfig(config: QueueConfig): QueueConfig {\n return config;\n}\n\nexport function queueConfigDefaults(): Required<QueueConfig> {\n return {\n jobs: [],\n jobsDir: \"app/jobs\",\n concurrency: 1,\n };\n}\n",
6
+ "import { Job } from \"./Job\";\nimport { queueConfigDefaults, type QueueConfig } from \"./config\";\nimport { withDefaults } from \"../../support/withDefaults\";\n\n/**\n * The thread a `worker = true` job runs in.\n *\n * The `await` on `dispatchJob` is load-bearing and its absence was a hang.\n * `postMessage` structured-clones its argument and a Promise is not cloneable,\n * so an un-awaited `dispatchJob` posted the pending promise, threw\n * `DataCloneError` inside this handler, and posted nothing at all. `runInWorker`\n * then never settled: `run` below never returned, `activeRunningJobsCount` was\n * never decremented, and neither the retry path nor `onDeadletter` ever fired —\n * after `concurrency` such jobs the queue sits in `next()`'s one-second poll\n * forever, with no error anywhere. Any job whose `run` is `async` hit it, which\n * is every job that touches IO; a queued listener hits it unconditionally,\n * because the synthetic job's `run` awaits `handle`.\n *\n * The await earns two more things. A rejecting job now reaches the `catch` and\n * comes back as `{error}`, where the queue's ordinary retry-then-dead-letter\n * path can have it, instead of being lost with the promise. And `destroy()` now\n * runs after the job rather than under it, so the cloned kernel — its database\n * connections included — outlives the work it was cloned for.\n */\nfunction createWorker() {\n const APP_DIR = process.env.APP_DIR;\n const ROOT_DIR = process.env.ROOT_DIR;\n\n const appPath =\n process.env.NODE_ENV === \"production\"\n ? `${ROOT_DIR}/dist/server/bootstrap.mjs`\n : `${APP_DIR}/bootstrap.ts`;\n\n const file = new File(\n [\n `\n import { app } from \"${appPath}\"\n self.onmessage = async (event) => {\n const clone = app.clone()\n let result = null;\n let error = null;\n try {\n result = await clone.dispatchJob(event.data.jobName, event.data.args)\n } catch (err) {\n error = err\n }\n clone.destroy()\n if(error) {\n self.postMessage({error});\n } else {\n self.postMessage({result});\n }\n };\n `,\n ],\n \"worker.ts\",\n );\n const url = URL.createObjectURL(file);\n return new Worker(url);\n}\n\n// TODO: terminate worker after the job is done\nasync function runInWorker(jobName: string, args: string) {\n const worker = createWorker();\n worker.postMessage({ jobName, args });\n return await new Promise((resolve, reject) => {\n worker.onmessage = (e) => {\n const data = e.data;\n if (\"error\" in data) {\n reject(data.error);\n } else {\n resolve(data.result);\n }\n };\n });\n}\n\ntype JobDefinition = {\n class: string;\n args: string;\n createdAt: number;\n retries: number;\n};\n\nexport class QueueManager {\n static token = \"queue\";\n\n queue: Set<JobDefinition> = new Set();\n activeRunningJobsCount = 0;\n isRunning = false;\n jobs: Record<string, new () => Job> = {};\n\n readonly config: Required<QueueConfig>;\n\n constructor(config: QueueConfig = {}) {\n this.config = withDefaults(queueConfigDefaults(), config);\n this.useJobs(this.config.jobs);\n }\n\n /**\n * Replaces the registered set, for the provider to hand over what it found\n * under `app/jobs`.\n *\n * This exists because the two phases disagree about when the answer is\n * knowable. The manager is constructed in `register()`, which is synchronous\n * and must resolve nothing; reading a directory and importing what is in it is\n * neither. So the manager is built from whatever the config slice declared —\n * nothing, when the app left `jobs` out — and the discovered set arrives in\n * `boot()`.\n *\n * The consequence worth knowing: anything that constructs an application and\n * skips phase two sees an empty registry, and every dispatch against an empty\n * registry is dropped — loudly on stderr, but after `Job.dispatch` has already\n * returned, so no caller finds out. An app that lists its jobs explicitly is\n * unaffected, because that list is already in place by the end of `register()`.\n */\n useJobs(jobs: Array<new () => Job>) {\n this.config.jobs = jobs;\n\n // Built one at a time rather than by `Object.fromEntries`, which resolves a\n // repeated key by keeping the last and saying nothing.\n //\n // Two classes with one name is the worst failure in this subsystem, and it\n // is worse than the dropped dispatch the rest of this file is about: the\n // registry is keyed by class name, a dispatch carries a class name, so\n // `SendEmail.dispatch(...)` on the one under `app/jobs/auth` would run the\n // body of the one under `app/jobs/billing`. Nothing is dropped and nothing\n // errors — the wrong work happens and reports success.\n //\n // Discovery is what makes it ordinary. A hand-written list forces an import\n // alias in one visible file the moment two names clash; a directory walk\n // does not, and `auth/SendEmail.ts` beside `billing/SendEmail.ts` is a\n // perfectly natural thing to write. So the first claim wins and the second\n // is refused out loud — the same rule `Scheduler.start` applies to a cron\n // name, and the reverse of the silent last-wins this replaces.\n this.jobs = {};\n for (const job of jobs) {\n this.claim(job);\n }\n }\n\n /**\n * Registers one more job beside whatever `useJobs` already took.\n *\n * This exists for the queued-listener adapter, which registers a synthetic\n * job per queued listener from `EventServiceProvider.boot()` — after the\n * queue's own `boot()` has filled the registry. `useJobs` cannot serve that\n * caller: it *replaces* the registry, so a second call would discard every\n * job the app wrote and leave the queue holding listeners alone. Reading\n * `registeredJobs` back, concatenating and calling `useJobs` again avoids\n * that and is still the wrong shape — it re-runs the collision check over\n * jobs that already passed it, so a duplicate the author has already been\n * told about is reported a second time on every boot.\n *\n * Same rule as `useJobs`, deliberately: the first claim on a name wins and\n * the second is refused out loud. And recorded in `config.jobs` either way,\n * so `registeredJobs` keeps reporting everything the manager was handed\n * rather than what it accepted — a refused job is visible to a test there.\n *\n * A new array rather than a `push`, because `useJobs` keeps the caller's\n * array by reference and appending to it would edit the config slice or the\n * discovered list under whoever else is holding it.\n */\n registerJob(job: new () => Job) {\n this.config.jobs = [...this.config.jobs, job];\n this.claim(job);\n }\n\n /**\n * Puts one job in the registry, or refuses it because the name is taken.\n *\n * The rule and the reason are in `useJobs` above; this is only the shape both\n * entry points share, so that a job arriving one at a time cannot be admitted\n * on terms the batch would have refused.\n */\n private claim(job: new () => Job) {\n if (this.jobs[job.name]) {\n console.error(\n `Two queued jobs are named \"${job.name}\" — the first is registered ` +\n `and this one is not, so dispatching either would have run one of ` +\n `them. A class name is the queue's key, so only one job can hold ` +\n `it. Rename one.`,\n );\n return;\n }\n this.jobs[job.name] = job;\n }\n\n /**\n * What the manager was handed, discovered or declared.\n *\n * The registry is keyed by name, and a name is exactly what a dispatch\n * carries, so \"is this job registered?\" is a question with a silent wrong\n * answer — `next()` drops an unknown name long after the caller moved on.\n * This is where a test asks it out loud.\n *\n * It reports what came in, not what the registry accepted, so a name claimed\n * twice appears twice here — deliberately, the same way `Scheduler.jobs`\n * does. A test walking this should see the collision rather than have it\n * tidied away. A copy, so that walk cannot edit the registry underneath it.\n */\n get registeredJobs(): ReadonlyArray<new () => Job> {\n return [...this.config.jobs];\n }\n\n dispatchJob(jobName: string, args: string) {\n if (this.jobs[jobName]) {\n const job = new this.jobs[jobName]();\n return job.run(JSON.parse(args));\n }\n }\n\n async next() {\n if (!this.isRunning) {\n this.isRunning = true;\n }\n\n if (this.activeRunningJobsCount >= this.config.concurrency) {\n await new Promise((resolve) => setTimeout(resolve, 1000));\n return this.next();\n }\n\n const jobDefinition = this.queue.values().next().value as\n | JobDefinition\n | undefined;\n\n if (jobDefinition) {\n // Taken off the queue before anything decides what to do with it. The\n // delete used to live inside the `if` below, so a name the registry could\n // not resolve left the head in place, the `size === 0` check below was\n // never reached, and `next()` recursed on the same entry until the stack\n // gave out. An unregistered dispatch is meant to be a dropped job, not a\n // crash — and discovery makes an empty registry newly reachable (a deploy\n // that ships no source finds nothing to register), so the difference\n // stopped being theoretical.\n this.queue.delete(jobDefinition);\n\n if (this.jobs[jobDefinition.class]) {\n this.run(jobDefinition);\n } else {\n // The one place this is observable. A dispatch carries a name, the\n // registry is keyed by name, and a name nobody registered matches\n // nothing — which is exactly the silence #322 is about, except here it\n // has already happened and the work is gone. Saying so is all that is\n // left to do about it.\n console.error(\n `Dropped a queued job: nothing is registered under the name ` +\n `\"${jobDefinition.class}\". If the class exists, it was not ` +\n `discovered — check that it is under the queue slice's jobsDir ` +\n `(app/jobs by default), or list it in app/config/queue.ts.`,\n );\n }\n }\n\n if (this.queue.size === 0) {\n this.isRunning = false;\n return;\n }\n\n await this.next();\n }\n\n private async run(jobDefinition: JobDefinition) {\n const Job = this.jobs[jobDefinition.class];\n const jobInstance = new Job();\n const args: any[] = JSON.parse(jobDefinition.args);\n\n this.activeRunningJobsCount++;\n\n try {\n const result = await (jobInstance.worker\n ? runInWorker(jobDefinition.class, jobDefinition.args)\n : jobInstance.run(...args));\n\n jobInstance.onSuccess(result, ...args);\n } catch (err) {\n jobInstance.onFail(err, ...args);\n if (jobDefinition.retries >= jobInstance.maxAttempts - 1) {\n jobInstance.onDeadletter(err, ...args);\n } else {\n this.push(Job, jobDefinition.args, jobDefinition.retries + 1);\n }\n }\n\n this.activeRunningJobsCount--;\n }\n\n push(job: new () => Job, args: string, retries = 0) {\n this.queue.add({\n class: job.name,\n args,\n createdAt: Date.now(),\n retries,\n });\n if (!this.isRunning) {\n this.next();\n }\n }\n}\n",
7
+ "/**\n * A command an operator runs by hand: `gemi run backfill-avatars --dry-run`.\n *\n * This file is the *runtime* shape — the base class discovery walks the\n * prototype chain for, and the statics the runner reads. It is not the\n * authoring surface. Applications write commands with `defineCommand` in\n * `./builder`, which produces one of these; see that file for why the authoring\n * surface is a builder and not a class body.\n *\n * ### Why the schema is descriptors and not a signature string\n *\n * Laravel spells this `protected $signature = 'mail:send {user} {--queue}'`, and\n * the string is the whole schema. It reads beautifully and TypeScript cannot see\n * a word of it: a brace in the wrong place is a parse error the first time\n * somebody runs the command, months after it was written, and the parser is a\n * piece of framework surface with its own failure modes. The descriptors below\n * say the same thing in a shape the compiler checks — and, through the builder,\n * in a shape that types the handler's own body.\n *\n * ### Why the name is declared and never falls back to the class name\n *\n * `Job` keys off `static name`, which shadows `Function.name`. That is the right\n * trade there: a job's name *is* its class name, and the shadow is what makes it\n * a string literal that survives minification. Here it is the wrong one twice\n * over. A command's name is a CLI token (`backfill-avatars`, `db:seed`) with no\n * relationship to the class name, so an implicit fallback would only ever be\n * wrong; and shadowing `Function.name` costs the one error anybody will actually\n * hit — \"two commands claim `db:seed`\" — the ability to say *which two*.\n *\n * ### The minification hazard does not reach here\n *\n * `services/discovery.ts` warns about a job that never declared `static name`,\n * because two halves have to agree on one string across a bundler: the\n * dispatcher, minified into `dist/server/server.mjs`, and discovery, reading the\n * source. A command has one half — a human types the name and it is matched\n * against discovery-on-source. Nothing in the server bundle names a command, and\n * `gemi build` keeps `app/commands` out of the bundle anyway. So there is no\n * `warnIfNameWillNotSurviveTheBuild` equivalent below, and adding one by analogy\n * would be noise.\n *\n * If a `Command.call(\"db:seed\")` reachable from a controller is ever added, that\n * changes — and `commandName` being a declared string literal already covers it,\n * which is one more reason not to fall back to the class binding.\n */\n\n/** A positional argument. `variadic` collects the rest and must come last. */\nexport interface ArgSpec {\n description?: string;\n /**\n * Missing it is a usage error rather than an `undefined` in the handler.\n * Mutually exclusive with `default` — an argument that is supplied when absent\n * cannot also be absent, and declaring both is refused rather than silently\n * resolved in one direction.\n */\n required?: boolean;\n /** Collects every remaining positional. Only legal on the last argument. */\n variadic?: boolean;\n /** Supplied when the argument is absent, which makes it always present. */\n default?: string;\n}\n\n/**\n * A flag. The `type` decides both how the value is parsed and what the handler\n * sees, which is why it is required rather than defaulted to `string`: a\n * `--dry-run` declared without a type would arrive as the string `\"\"`, and every\n * `if (options.dryRun)` over it would be wrong in the one direction nobody\n * tests.\n */\nexport type OptionSpec =\n | {\n type: \"boolean\";\n description?: string;\n /** Single character, without the dash. */\n alias?: string;\n default?: boolean;\n }\n | {\n type: \"string\";\n description?: string;\n alias?: string;\n default?: string;\n required?: boolean;\n }\n | {\n type: \"number\";\n description?: string;\n alias?: string;\n default?: number;\n required?: boolean;\n };\n\n/** An argument as stored on the class: the spec, plus the name it was given. */\nexport type CommandArgument = ArgSpec & { name: string };\n\n/** An option as stored on the class: the spec, plus the name it was given. */\nexport type CommandOption = OptionSpec & { name: string };\n\n/** What a handler may return. `void` and `0` mean the same thing. */\nexport type CommandResult = Promise<number | void> | number | void;\n\n/**\n * A command that failed on purpose.\n *\n * The distinction `bin/check-models.ts` draws between `CheckModelsError` and\n * everything else, in the one place an application can reach it: this is a\n * sentence written for the terminal and is printed without a stack, while\n * anything else that escapes a handler is a bug and keeps its stack.\n */\nexport class CommandFailed extends Error {\n constructor(\n message: string,\n readonly code: number = 1,\n ) {\n super(message);\n this.name = \"CommandFailed\";\n }\n}\n\n/**\n * The base class. Discovery finds subclasses of this; the runner reads the\n * statics and calls `run`.\n *\n * Subclassing it by hand works and is what `defineCommand` does under the hood,\n * but it gives up the typing that is the whole point of the builder — `run`'s\n * parameter cannot be inferred from statics declared on the subclass, because\n * TypeScript does not contextually type an overriding method's parameters. Write\n * commands with `defineCommand`.\n */\nexport class Command {\n /**\n * The name typed on the command line. Mandatory: there is no sensible default\n * and the class name is not one.\n */\n static commandName = \"unset\";\n\n /** One line, printed by `gemi run` with no name and at the top of `--help`. */\n static description = \"\";\n\n /** Positional arguments, in order. A variadic one must be last. */\n static args: CommandArgument[] = [];\n\n /** Flags. Declared in camelCase; `dryRun` is spelled `--dry-run` on the CLI. */\n static options: CommandOption[] = [];\n\n /**\n * The body.\n *\n * Runs inside `kernel.run()`, so `app(MailManager)` and a model read resolve\n * exactly as they do in a request handler. Resolve services *here* rather than\n * at module load: a command file is imported by discovery before the container\n * has finished booting, and a service captured at the top of the file is\n * captured from a container that is not ready.\n */\n run(_ctx: any): CommandResult {}\n}\n\n/** The type of a class `defineCommand(...).handle(...)` produces. */\nexport type CommandClass = typeof Command;\n",
8
+ "import type { CommandClass } from \"./Command\";\n\n// Config key: `command`. Consumed by `gemi run`, and by nothing at boot.\n//\n// Named `command` rather than `console` on purpose. An app declares its slices\n// by importing them into `app/kernel/Kernel.ts`, and a file called\n// `app/config/console.ts` arrives there as `import console from\n// \"../config/console\"` — which shadows the global `console` for the rest of that\n// module. Every application would inherit that, silently. `command` also matches\n// the singular slice names already in use: `route`, `queue`, `schedule`, `log`.\nexport interface CommandConfig {\n /**\n * The `Command` classes this application can run, or nothing.\n *\n * ### The rule, exactly\n *\n * **Declared wins, and `[]` is declared.** A `commands` that is present is\n * used verbatim and no directory is read — the escape hatch for an app whose\n * commands live somewhere the walk cannot reach, and for a deploy that ships\n * no source. An empty array means an app with no commands and says so; it does\n * not mean \"find some\".\n *\n * **Absent or `undefined` discovers.** `undefined` counts as absent for the\n * same reason `withDefaults` treats it that way everywhere else: a key spread\n * in from an optional value is an omission, not an instruction.\n *\n * ### One way this differs from `queue` and `schedule`\n *\n * There, the cost of the list and the directory disagreeing is silence — a\n * dispatch dropped with a line on stderr nobody reads, a report that stops\n * arriving. Here it is a person typing `gemi run thing` and being told, in\n * those words, that there is no command called `thing`. The rule is kept for\n * consistency and for the source-less-deploy case, not because the stakes are\n * the same.\n */\n commands?: CommandClass[];\n\n /**\n * Where to look when `commands` was not declared. Relative to the project\n * root, or absolute.\n *\n * Every `.ts`/`.tsx` file underneath is imported when a command is run, so\n * this wants to be a directory of command declarations rather than a directory\n * that merely contains some.\n */\n commandsDir?: string;\n}\n\nexport function defineCommandConfig(config: CommandConfig): CommandConfig {\n return config;\n}\n\nexport function commandConfigDefaults(): Required<CommandConfig> {\n return {\n commands: [],\n commandsDir: \"app/commands\",\n };\n}\n",
9
+ "import {\n Command,\n type ArgSpec,\n type CommandArgument,\n type CommandClass,\n type CommandOption,\n type CommandResult,\n type OptionSpec,\n} from \"./Command\";\nimport type { CommandContext } from \"./context\";\n\n/**\n * Declaring a command, in the one shape that can type its own body.\n *\n * ### Why a builder and not a class\n *\n * The point of declaring arguments and options at all is that the handler then\n * knows what it has. A class body cannot deliver that, and the reason is a hard\n * TypeScript rule rather than a matter of arrangement: **TypeScript does not\n * contextually type a method's parameters from the base-class method it\n * overrides.** So both class-shaped designs fail in the same place:\n *\n * ```ts\n * class Backfill extends Command {\n * static args = [{ name: \"since\", required: true }];\n * async run(ctx) {} // implicit any\n * }\n *\n * class Backfill extends Command.define({ since: { required: true } }) {\n * async run(ctx) {} // still implicit any — the\n * } // configured base's signature does\n * // not flow into the override\n * ```\n *\n * The author's only way out is to restate the type by hand, which is the\n * ceremony the descriptors existed to remove — and which nothing enforces, so a\n * wrong restatement compiles.\n *\n * A **function expression passed as an argument is contextually typed**. That is\n * the entire mechanism here, and it is why this is a builder rather than sugar:\n * `.handle(fn)` carries the accumulated argument and option types into `fn`'s\n * parameter with nothing written by hand and nothing to keep in step.\n *\n * ### What it produces\n *\n * A `Command` subclass, so nothing downstream knows the difference: discovery\n * finds it by prototype chain, and the registry, parser and `--help` read the\n * same statics they would read off a hand-written class. The builder is an\n * authoring surface over one runtime shape, not a second mechanism.\n */\n\n/**\n * Marks a builder that was never finished. `discoverCommands` looks for this on\n * the exports it is about to discard — see the note on `handle` below.\n */\nexport const BUILDER_BRAND: unique symbol = Symbol.for(\"gemi.console.builder\");\n\n/** Flattens an accumulated intersection so editor hovers stay readable. */\ntype Simplify<T> = { [K in keyof T]: T[K] } & {};\n\n/**\n * What the handler sees for one argument.\n *\n * The order matters: `variadic` first because it wins over everything, then the\n * two ways an argument is guaranteed present. Anything else can be absent and\n * says so.\n */\nexport type ArgValue<S> = S extends { variadic: true }\n ? string[]\n : S extends { required: true }\n ? string\n : S extends { default: string }\n ? string\n : string | undefined;\n\n/** What the handler sees for one option. */\nexport type OptionValue<S> = S extends { type: \"boolean\" }\n ? boolean\n : S extends { type: \"number\" }\n ? S extends { default: number }\n ? number\n : S extends { required: true }\n ? number\n : number | undefined\n : S extends { default: string }\n ? string\n : S extends { required: true }\n ? string\n : string | undefined;\n\nexport interface CommandBuilder<\n A extends Record<string, unknown>,\n O extends Record<string, unknown>,\n> {\n /** One line, shown in the listing and at the top of `--help`. */\n describe(text: string): CommandBuilder<A, O>;\n\n /**\n * A positional argument. Declared in the order it is read from the command\n * line; a `variadic` one must be last.\n */\n arg<N extends string, const S extends ArgSpec = {}>(\n name: N,\n spec?: S,\n ): CommandBuilder<A & { [K in N]: ArgValue<S> }, O>;\n\n /**\n * A flag. Declared in camelCase and spelled in kebab-case on the command line,\n * so `.option(\"dryRun\", …)` is `--dry-run` for the operator and\n * `options.dryRun` in the handler — no string key nobody can autocomplete, and\n * no CLI flag with a capital letter in it.\n */\n option<N extends string, const S extends OptionSpec>(\n name: N,\n spec: S,\n ): CommandBuilder<A, O & { [K in N]: OptionValue<S> }>;\n\n /**\n * The body, and the terminal of the chain.\n *\n * A builder that never reaches here is not a class, so discovery would skip it\n * and the command would simply vanish from `gemi run` with nothing raised —\n * the silence #322 and #323 exist to remove, reintroduced by a new authoring\n * surface. `discoverCommands` therefore looks for `BUILDER_BRAND` among the\n * exports it discards and refuses the file by name.\n */\n handle(\n fn: (ctx: CommandContext<Simplify<A>, Simplify<O>>) => CommandResult,\n ): CommandClass;\n}\n\n/**\n * Refused early, where the author is looking.\n *\n * The whitespace and brace checks are aimed at one specific reader: somebody who\n * knows Laravel and reaches for `defineCommand(\"mail:send {user} {--queue}\")`.\n * Without this they get a command registered under a name containing a space,\n * which can never be typed and never runs, and no explanation.\n */\nfunction assertUsableName(name: string): void {\n if (name.trim() === \"\") {\n throw new Error(\"A command name cannot be empty.\");\n }\n\n if (/[{}]/.test(name) || /\\s/.test(name)) {\n throw new Error(\n `Invalid command name ${JSON.stringify(name)}. gemi does not parse a ` +\n `signature string; the name is the whole of it. Declare arguments ` +\n `with .arg() and flags with .option():\\n\\n` +\n ` defineCommand(\"mail:send\")\\n` +\n ` .arg(\"user\", { required: true })\\n` +\n ` .option(\"queue\", { type: \"boolean\" })\\n` +\n ` .handle(async ({ args, options }) => { ... })`,\n );\n }\n}\n\nexport function defineCommand(name: string): CommandBuilder<{}, {}> {\n assertUsableName(name);\n\n const args: CommandArgument[] = [];\n const options: CommandOption[] = [];\n let description = \"\";\n\n const builder = {\n [BUILDER_BRAND]: name,\n\n describe(text: string) {\n description = text;\n return builder;\n },\n\n arg(argName: string, spec: ArgSpec = {}) {\n // Checked here rather than at parse time because both of these are\n // mistakes in the declaration, and the declaration is what the author is\n // looking at right now. At parse time they would surface as a confusing\n // usage error in front of an operator who cannot fix them.\n if (spec.required && spec.default !== undefined) {\n throw new Error(\n `Argument \"${argName}\" of command \"${name}\" is both required and has ` +\n `a default. An argument that is supplied when absent cannot also be ` +\n `absent — drop one.`,\n );\n }\n\n // A variadic collects whatever is left, so there is no \"absent\" for a\n // default to fill — the empty list is the answer. Refused rather than\n // ignored, for the same reason as the pair above: a declaration the parser\n // silently drops reads, to whoever wrote it, exactly like one it honours.\n if (spec.variadic && spec.default !== undefined) {\n throw new Error(\n `Argument \"${argName}\" of command \"${name}\" is variadic and has a ` +\n `default. A variadic argument collects the remaining values and is ` +\n `an empty list when there are none, so the default could never ` +\n `apply — drop it, or drop \\`variadic\\`.`,\n );\n }\n\n const variadic = args.find((existing) => existing.variadic);\n if (variadic) {\n throw new Error(\n `Argument \"${argName}\" of command \"${name}\" is declared after the ` +\n `variadic argument \"${variadic.name}\", which collects everything ` +\n `that follows, so \"${argName}\" could never receive a value. A ` +\n `variadic argument must be declared last.`,\n );\n }\n\n if (args.some((existing) => existing.name === argName)) {\n throw new Error(\n `Command \"${name}\" declares the argument \"${argName}\" twice.`,\n );\n }\n\n args.push({ ...spec, name: argName });\n return builder;\n },\n\n option(optionName: string, spec: OptionSpec) {\n if (options.some((existing) => existing.name === optionName)) {\n throw new Error(\n `Command \"${name}\" declares the option \"${optionName}\" twice.`,\n );\n }\n\n const alias = \"alias\" in spec ? spec.alias : undefined;\n const clash =\n alias === undefined\n ? undefined\n : options.find(\n (existing) => \"alias\" in existing && existing.alias === alias,\n );\n if (clash) {\n throw new Error(\n `Options \"${clash.name}\" and \"${optionName}\" of command \"${name}\" ` +\n `both use the alias \"-${alias}\".`,\n );\n }\n\n options.push({ ...spec, name: optionName });\n return builder;\n },\n\n handle(fn: (ctx: any) => CommandResult) {\n const commandName = name;\n const commandDescription = description;\n\n const cls = class extends Command {\n static commandName = commandName;\n static description = commandDescription;\n // Copied, not aliased. The builder goes on owning `args`/`options` and\n // mutating them on every subsequent `.arg()`/`.option()`, so storing the\n // instances themselves let a chain reach back into a class it had\n // already produced — and `--help` and the parser both read these\n // statics, so the printed usage and the accepted arguments would change\n // under a command that was finished.\n static args = [...args];\n static options = [...options];\n\n run(ctx: any) {\n return fn(ctx);\n }\n };\n\n // This chain produced a command, so it is no longer unfinished. The brand\n // exists to catch a file that exports a builder and never calls `.handle()`\n // — see `refuseUnfinishedBuilders` in `services/discovery.ts`. Leaving it\n // set meant the natural way to share declarations,\n //\n // export const base = defineCommand(\"reindex\").option(\"verbose\", ...);\n // export default base.handle(async () => {});\n //\n // left a branded object among the file's exports and aborted the whole of\n // `gemi run` — every command in the project unrunnable, under a message\n // that was untrue for that file.\n delete (builder as Record<PropertyKey, unknown>)[BUILDER_BRAND];\n\n // An anonymous class expression reports `name === \"\"`, and the duplicate-\n // name error's whole job is to say *which two*. Give it the one name it\n // has.\n Object.defineProperty(cls, \"name\", {\n value: commandName,\n configurable: true,\n });\n\n return cls;\n },\n };\n\n return builder as unknown as CommandBuilder<{}, {}>;\n}\n\n/** True for a builder that never called `.handle()`. */\nexport function isUnfinishedBuilder(\n value: unknown,\n): value is { [BUILDER_BRAND]: string } {\n return (\n typeof value === \"object\" &&\n value !== null &&\n typeof (value as Record<PropertyKey, unknown>)[BUILDER_BRAND] === \"string\"\n );\n}\n",
10
+ "// A cron expression accepted by `Bun.cron`: a 5-field expression\n// (`minute hour day-of-month month day-of-week`, interpreted in UTC) or one of\n// the nicknames below. The `string & {}` member keeps arbitrary expressions\n// assignable while still surfacing the nicknames in editor autocomplete.\nexport type CronExpression =\n | \"@yearly\"\n | \"@annually\"\n | \"@monthly\"\n | \"@weekly\"\n | \"@daily\"\n | \"@midnight\"\n | \"@hourly\"\n | (string & {});\n\nexport class CronJob {\n name: string;\n cron: CronExpression;\n\n /**\n * Decides whether this tick happens at all. Evaluated once per tick, before\n * anything else; returning `false` skips `onTick`, `callback` and\n * `onComplete` alike.\n *\n * ### Why this is a member and not a line the job writes for itself\n *\n * A job that reports outward — mails a digest, opens a Sentry issue, pings a\n * channel — must not fire from a laptop, and the guard for that has to cover\n * the whole tick. There was nowhere to write it. gemi calls `onTick` and\n * `onComplete` *outside* `callback`, so a guard placed in a lifecycle hook\n * only stops the hook it lives in: an early `return` at the top of `callback`\n * leaves the job still announcing that it started and still announcing that\n * it finished, which for an outward-reporting job is most of the damage.\n *\n * The only construct that covered every hook was an abstract base class that\n * shadowed `callback` with the guard and renamed the real body to `run()` —\n * and that costs the app the framework's own vocabulary. A job then reads\n * `async run()` while every page of the documentation reads `async\n * callback()`, so the next person to follow the docs writes a `callback` the\n * base class never calls: no error, no output, a job that silently does\n * nothing. Forgetting *this* member fails the other way round — the job runs,\n * which is what it did before anyone asked for a gate.\n *\n * ### What it gates\n *\n * Work, not registration. A job whose gate returns `false` is still\n * scheduled, still holds its `Bun.cron` handle, and still appears in\n * `app(Scheduler).jobs` — \"is it scheduled\" and \"will it do anything\" are\n * different questions and the second one is answered per tick. That is also\n * why this is a method: a field would be read once, when the scheduler\n * constructs the job at boot, and would freeze whatever it saw then.\n *\n * A gate that throws is logged and treated as `false`. Cron work recurs, so\n * a skipped tick is recovered by the next one, while an email sent from the\n * wrong machine is not recovered at all.\n *\n * ### Composing with a base class\n *\n * Nothing here calls `super` for you. A subclass that overrides `shouldRun`\n * for its own reason silently replaces whatever its base was gating on, so\n * narrow rather than redefine:\n *\n * ```typescript\n * async shouldRun() {\n * return (await super.shouldRun()) && this.hasSubscribers();\n * }\n * ```\n *\n * A shared base should annotate its return type as written here rather than\n * let it be inferred: a base returning a plain `boolean` narrows the\n * signature its subclasses inherit, and the `await super` above then does not\n * typecheck against it.\n */\n shouldRun(): Promise<boolean> | boolean {\n return true;\n }\n\n callback(): Promise<void> | void {}\n onTick(): Promise<void> | void {}\n onComplete(): Promise<void> | void {}\n\n static exp(expression: CronExpression) {\n return expression;\n }\n}\n",
11
+ "import type { CronJob } from \"./CronJob\";\n\n// Config key: `schedule`. Consumed by `ScheduleServiceProvider`.\nexport interface ScheduleConfig {\n /**\n * The `CronJob` subclasses this application runs on a schedule, or nothing.\n *\n * ### Why \"or nothing\" is the point\n *\n * A cron job that is written and not listed here never fires, and unlike a\n * dropped dispatch there is no caller left waiting to notice: nothing is\n * downstream of a tick that did not happen. The report is simply not sent,\n * for as long as it takes somebody to ask why they stopped seeing it. That is\n * the whole failure — the file exists, the expression is right, and the class\n * was never in the module graph.\n *\n * Leaving this out spells the schedule once: the jobs are the classes under\n * `jobsDir`.\n *\n * ### The rule, exactly\n *\n * **Declared wins, and `[]` is declared.** A `jobs` that is present is used\n * verbatim and no directory is read — the escape hatch for an app whose jobs\n * live somewhere this cannot walk, for one that runs a deliberate subset, and\n * for a deploy that ships no source. An empty array means an app with nothing\n * scheduled and says so; it does not mean \"find some\".\n *\n * **Absent or `undefined` discovers.** `undefined` counts as absent for the\n * same reason `withDefaults` treats it that way everywhere else: a key spread\n * in from an optional value is an omission, not an instruction.\n *\n * Either way the set the scheduler ended up with is readable afterwards, as\n * `app(Scheduler).jobs` — an app that used to import this array to assert\n * something about its own schedule asks the scheduler instead.\n */\n jobs?: Array<new () => CronJob>;\n\n /**\n * Where to look when `jobs` was not declared. Relative to the project root,\n * or absolute.\n *\n * Every `.ts`/`.tsx` file underneath it is imported at boot and every exported\n * class extending `CronJob` is scheduled, so this wants to be a directory of\n * cron declarations rather than a directory that merely contains some. Moving\n * the jobs is what this field is for; pointing it at `app/` is not.\n */\n jobsDir?: string;\n}\n\nexport function defineScheduleConfig(config: ScheduleConfig): ScheduleConfig {\n return config;\n}\n\nexport function scheduleConfigDefaults(): Required<ScheduleConfig> {\n return {\n jobs: [],\n jobsDir: \"app/cron\",\n };\n}\n",
12
+ "import type { ListenerClass } from \"./Listener\";\n\n// Config key: `events`. Derived from `EventServiceProvider`.\nexport interface EventConfig {\n /**\n * The `Listener` subclasses this application registers, or nothing.\n *\n * ### Why \"or nothing\" is the point\n *\n * A dispatch fans out to whatever the `EventManager` holds for the event's\n * name, and an event nothing is registered for is not an error — it is the\n * ordinary state of an application that has not written that listener yet.\n * So this list is a second spelling of `app/listeners`, kept in step by hand,\n * and what the two disagreeing costs is a side effect that stops happening,\n * with a development-only warning as the only trace. Nothing fails, nothing\n * is dropped from a log: the welcome email simply is not sent.\n *\n * Leaving this out spells it once: the listeners are the classes under\n * `listenersDir`.\n *\n * ### The rule, exactly\n *\n * **Declared wins, and `[]` is declared.** A `listeners` that is present is\n * used verbatim and no directory is read — that is the escape hatch for an\n * app whose listeners live somewhere this cannot walk, for one that\n * deliberately registers a subset, and for a deploy that ships no source. An\n * empty array means an app with no listeners and says so; it does not mean\n * \"find some\".\n *\n * **Absent or `undefined` discovers.** `undefined` counts as absent for the\n * same reason `withDefaults` treats it that way everywhere else: a key spread\n * in from an optional value is an omission, not an instruction.\n */\n listeners?: ListenerClass[];\n\n /**\n * Where to look when `listeners` was not declared. Relative to the project\n * root, or absolute.\n *\n * Every `.ts`/`.tsx` file underneath it is imported at boot and every\n * exported class extending `Listener` is registered, so this wants to be a\n * directory of listener declarations rather than a directory that merely\n * contains some. That includes an abstract base a few listeners share: the\n * walk excludes the framework's `Listener` and nothing else, so a base\n * sitting here is registered alongside its subclasses and its `handle` runs\n * on every dispatch of whatever event it declares. Keep shared bases outside\n * this directory.\n *\n * There is no `eventsDir` to go with it. Event classes are never discovered\n * — each is imported by the listener that binds to it and by the code that\n * dispatches it, so nothing needs to walk them and a walk that imported them\n * anyway would only be a boot cost.\n */\n listenersDir?: string;\n}\n\nexport function defineEventConfig(config: EventConfig): EventConfig {\n return config;\n}\n\nexport function eventConfigDefaults(): Required<EventConfig> {\n return {\n listeners: [],\n listenersDir: \"app/listeners\",\n };\n}\n",
13
+ "import type { Event, EventClass } from \"./Event\";\n\n/**\n * One side effect of one event, in its own file.\n *\n * ```typescript\n * // app/listeners/SendWelcomeEmail.ts\n * export class SendWelcomeEmail extends Listener {\n * static name = \"SendWelcomeEmail\";\n * static event = UserRegistered;\n *\n * async handle(event: UserRegistered) {\n * await Mail.send(event.email, ...);\n * }\n * }\n * ```\n *\n * That is the whole of what the subsystem buys: adding a fourth side effect to\n * a registration is adding a file, rather than editing the controller that\n * already has three.\n *\n * ### Why the binding lives here and not on the event\n *\n * The listener is the thing with an opinion about what it cares about; an event\n * has no business knowing who is watching. An event listing its listeners would\n * also put the property back the way it was — adding a side effect would edit\n * an existing file.\n *\n * ### Why the binding is a value at all\n *\n * Laravel binds a listener to an event by reflecting on the type-hint of\n * `handle(UserRegistered $event)`. TypeScript erases types at runtime, so that\n * mechanism cannot exist here and the binding has to be carried as a value.\n * That constraint turns out to be a favourable one: it is also what makes the\n * payload types flow without a generated registry.\n *\n * ### The seam, written down rather than hidden\n *\n * **Nothing checks that `static event` and the annotation on `handle` agree.**\n * A static and an instance member cannot reference each other's types, so the\n * compiler sees `static event = UserRegistered` and `handle(event: OrderPaid)`\n * as two unrelated declarations. Copy a listener, change the static, forget the\n * annotation, and TypeScript is satisfied while the listener receives something\n * else.\n *\n * It is accepted because the failure is local and immediate — that one listener\n * reads a field that is not there, in its own stack — rather than the\n * misroute-shaped failures the rest of this subsystem is arranged against. The\n * `Listener.test-d.ts` beside this file pins the two halves the compiler *does*\n * enforce, so a later refactor reaching for convenience cannot widen them to\n * `any` unnoticed.\n */\nexport abstract class Listener {\n /**\n * The name this listener is reported and de-duplicated under. Required.\n *\n * Two listener classes claiming one name is refused at registration, and a\n * discovery walk makes that ordinary: `auth/NotifyAdmins.ts` beside\n * `billing/NotifyAdmins.ts` is a natural thing to write, and nothing forces\n * the import alias a hand-written list would have demanded.\n *\n * As on `Event`, the `\"unset\"` default is a floor and not the check — a class\n * declaration always shadows it with its own implicit binding, which is the\n * one a minifier renames. `discoverListeners` reads the property descriptor\n * to tell a declared name from an implicit one.\n *\n * For a **queued** listener it is more than a label: the queue is keyed by\n * name, the listener is registered under `listener:<name>`, and that string\n * is what a queued dispatch carries. So a queued listener whose name is the\n * implicit class binding is refused at registration rather than warned about\n * — the two ends of the queue can be two different module graphs, and a name\n * only one of them minified is a side effect that stops happening in\n * production and reports success.\n */\n static name = \"unset\";\n\n /**\n * The event class this listener handles. Exactly one, required.\n *\n * It holds the **class**, not its name. The name is read off it once, at\n * registration, inside `EventManager.useListeners` — and that read happens in\n * the module graph that declared the class, so the name it yields is the\n * source one. Nothing downstream keeps the class object, because a registry\n * keyed by class identity is wrong in production only.\n *\n * There is no `static events = [A, B]`, deliberately. A listener bound to two\n * events has to discriminate inside `handle`, and the natural way to write\n * that is `if (event instanceof UserRegistered)` — which is `true` in every\n * test and `false` in a production build, for the reason `Event`'s own doc\n * comment gives. Two events wanting the same side effect are two small\n * listeners calling one shared function.\n *\n * Declared as required, and still checked at runtime: every subclass inherits\n * this declaration whether or not it assigns to it, so the compiler cannot\n * see a listener that left it out. `EventManager` refuses one out loud.\n */\n static event: EventClass;\n\n /**\n * Where this listener runs. **A context boundary, not a performance dial.**\n *\n * Left `false`, the listener runs inline, inside the dispatcher's\n * `kernelContext` and `ormContext`: it has the request's `app()`, the\n * authenticated user through `currentActor()`, and it joins the ambient\n * transaction.\n *\n * **Unless the event declares `static afterCommit`.** That flag releases its\n * listeners after the commit and outside the transaction's scope, so a sync\n * listener bound to one runs with `currentTransaction()` undefined and\n * commits on its own. The listener kept sync *because* it writes a row that\n * has to roll back with the write it describes — an audit trail, a ledger\n * entry — starts committing separately the day someone sets that flag in the\n * event's file, and nothing on this side says so: no error, no warning, and\n * a `queued = false` that still reads as \"inside the transaction\".\n *\n * Set `true`, it is handed to the `QueueManager` instead and run from a\n * drain, on the queue's terms. What crosses is the event's name and its\n * constructor arguments as JSON, and nothing else — not the instance the sync\n * listeners share, and not a line of the request. With `worker = true` it is\n * a different thread with a cloned application.\n *\n * The part that catches people is that the context is not reliably *gone*\n * either: the queue is in-process, so a drain that happens to start from\n * `push` is still standing in the dispatcher's context and `app()` there\n * resolves the request's application. Nothing about that is promised. A\n * queued listener that reads the current actor, or writes expecting to join\n * the ambient transaction, works until the day the queue was already busy —\n * and then reads different rows, or commits separately, with no error either\n * way. So: a listener that needs the request's context has to stay sync, and\n * a listener that only needs the payload is free to queue.\n *\n * What it buys, in exchange, is the queue's whole retry path: `maxAttempts`,\n * `onFail`-style re-queueing and dead-lettering, none of which a sync\n * listener has. `dispatchAndWait` does **not** wait for it.\n */\n queued = false;\n\n /**\n * Attempts before the queue gives up, counting the first. `Job`'s field and\n * `Job`'s meaning, because it is forwarded to one.\n *\n * **Ignored unless `queued` is true.** A sync listener has no retry path at\n * all — its throw is logged and the next listener runs — so a `maxAttempts`\n * beside `queued = false` is a line that does nothing, which is why it is\n * said here rather than in a note somewhere else.\n */\n maxAttempts = 3;\n\n /**\n * Runs `handle` in a Worker thread with its own cloned application, for a\n * queued listener whose work is CPU-bound. `Job`'s field and `Job`'s\n * meaning, because it is forwarded to one.\n *\n * **Ignored unless `queued` is true.** A sync listener runs on the\n * dispatcher's stack by definition; there is no thread to move it to.\n */\n worker = false;\n\n /**\n * The side effect. Runs inside the dispatcher's context when `queued` is\n * false: a sync listener has the request's `app()`, its authenticated user,\n * and — unless the event declares `static afterCommit` — its ambient\n * transaction. A queued one can rely on none of them — see `queued`.\n *\n * Annotate the parameter with the event named in `static event` — narrowing\n * the base's `Event` here is legal because method parameters are bivariant,\n * which is what lets this class avoid a generic parameter. Nothing checks\n * that the two agree; see the note on the class.\n *\n * Abstract, so a listener that forgets it fails to compile rather than\n * silently handling nothing.\n *\n * A throw is caught, logged with both names, and the next listener still\n * runs. Listeners are independent side effects by construction, and their\n * order is a filesystem walk's — letting one cancel the rest would make that\n * order load-bearing, which is the exact coupling this subsystem exists to\n * remove.\n */\n abstract handle(event: Event): void | Promise<void>;\n}\n\n/**\n * A `Listener` subclass, as the registry and the `events` config slice hold\n * one.\n *\n * Zero-argument, because the manager constructs one per dispatch and has\n * nothing to pass it. The `event` member is typed as present even though\n * `EventManager` checks for it at runtime: an inherited declaration is\n * indistinguishable from an assignment to the type system, so this is the\n * shape, and the runtime check is what covers the difference.\n */\nexport type ListenerClass = (new () => Listener) & {\n name: string;\n event: EventClass;\n};\n",
14
+ "import { app } from \"../../foundation/app\";\nimport { QueueManager } from \"./QueueManager\";\n\nexport class Job {\n static name = \"unset\";\n worker = false;\n maxAttempts = 3;\n\n run(..._args: any[]): Promise<any> | any {}\n\n onFail(_error: Error, ..._args: any[]): void {}\n onSuccess(_result: any, ..._args: any[]): void {}\n onDeadletter(_error: Error, ..._args: any[]): void {}\n\n static dispatch<T extends Job>(\n this: new () => T,\n ...args: Parameters<T[\"run\"]>\n ): void {\n if (this.name === \"unset\") {\n throw new Error(\"Cannot dispatch a job with no name\");\n }\n\n app(QueueManager).push(this, JSON.stringify(args));\n }\n}\n",
15
+ "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"
16
+ ],
17
+ "mappings": ";uJA+CO,GAAS,LAAiB,CAAC,EAAkC,CAClE,OAAO,EAGF,SAAS,CAAmB,EAA0B,CAC3D,MAAO,CACL,KAAM,CAAC,EACP,QAAS,WACT,YAAa,CACf,EChCF,SAAS,CAAY,EAAG,CACtB,IAAM,EAAU,QAAQ,IAAI,QACtB,EAAW,QAAQ,IAAI,SAEvB,EACJ,mBAAyB,aACrB,GAAG,8BACH,GAAG,iBAEH,EAAO,IAAI,KACf,CACE;AAAA,6BACuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAkBzB,EACA,WACF,EACM,EAAM,IAAI,gBAAgB,CAAI,EACpC,OAAO,IAAI,OAAO,CAAG,EAIvB,eAAe,CAAW,CAAC,EAAiB,EAAc,CACxD,IAAM,EAAS,EAAa,EAE5B,OADA,EAAO,YAAY,CAAE,UAAS,MAAK,CAAC,EAC7B,MAAM,IAAI,QAAQ,CAAC,EAAS,IAAW,CAC5C,EAAO,UAAY,CAAC,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G,EAAM;AAAA,MACc,EAAM,KAAK;AAAA,KAAQ,IAEhD,MAAM,IAAI,EACR,GAAG,iEACD;AAAA;AAAA,EACA;AAAA,qDAEJ,EA4BF,eAAsB,EAAiB,CACrC,EAAc,EAAoB,EAAE,aACV,CAC1B,IAAM,EAAW,EAAW,CAAG,EAC/B,EAAsB,EAAU,kBAAmB,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",
18
+ "debugId": "78E39A3E305D66FA64756E2164756E21",
19
+ "names": []
20
+ }
@@ -2,6 +2,6 @@
2
2
  import{existsSync as $,readdirSync as B}from"fs";import{join as Y,relative as G}from"path";function J(K,Q=[]){let U=[],X=(H)=>{let z=G(K,H).split("\\").join("/");return Q.some((q)=>z===q||z.startsWith(`${q}/`))},V=(H)=>{for(let z of B(H,{withFileTypes:!0}).sort((q,Z)=>q.name<Z.name?-1:q.name>Z.name?1:0)){let q=Y(H,z.name);if(X(q))continue;if(z.isDirectory()){if(z.name.startsWith(".")||z.name==="node_modules")continue;if($(Y(q,"package.json")))continue;V(q);continue}if(!z.name.endsWith(".ts")&&!z.name.endsWith(".tsx"))continue;if(z.name.endsWith(".d.ts"))continue;if(/\.(test|test-d|spec|bench)\.tsx?$/.test(z.name))continue;U.push(q)}};if(!$(K))return U;return V(K),U}class A extends Error{constructor(K,Q){super(K,Q);this.name="DiscoveryError"}}async function W(K,Q,U=[],X){let V=new Set;for(let H of J(K,U)){let z;try{z=await import(H)}catch(q){throw new A(`${H} could not be imported, so the classes in it could not be discovered:
3
3
  ${q.message}
4
4
  List the classes explicitly in the config slice for this directory to skip the walk.`,{cause:q})}for(let q of Object.values(z)){if(typeof q==="function"&&q!==Q&&Object.prototype.isPrototypeOf.call(Q,q)){V.add(q);continue}X?.(q,H)}}return[...V]}function F(){return Y(process.cwd(),process.env.GEMI_PROJECT_DIR??"")}
5
- export{J as Gb,A as Hb,W as Ib,F as Jb};
5
+ export{J as Mb,A as Nb,W as Ob,F as Pb};
6
6
 
7
- //# debugId=756C346EC282AF3864756E2164756E21
7
+ //# debugId=F46015BDD31D1A1A64756E2164756E21
@@ -5,6 +5,6 @@
5
5
  "import { existsSync, readdirSync } from \"node:fs\";\nimport { join, relative } from \"node:path\";\n\n/**\n * Finding the classes an application declared and never imported — the walk\n * #322 and #323 both end at.\n *\n * ### Why it has to run the files\n *\n * A job that is written and not listed does not fail; it disappears.\n * `QueueManager.next` looks a dispatched name up in the map its config built and\n * skips what is not there, so the dispatch is simply lost. A cron drifts worse:\n * nothing is waiting on a tick, so a job that never fires reports nothing to\n * anyone. What both come down to is that `app/config/queue.ts` naming every\n * `Job` subclass is the *only* thing putting those classes in the module graph —\n * the list and the directory are two spellings of one set, kept in step by hand.\n *\n * The way out of that is to read the directory, and there is no static read that\n * will do: the class does not exist until its module has run. So **every file\n * walked here is imported**, and a file that *does something* when imported does\n * it here — at boot, in production, on every start. `gemi check models` makes\n * the same trade for the same reason and pays it once per CI run; a caller of\n * this pays it once per process.\n *\n * ### What that asks of a caller\n *\n * **Point it at a directory of class declarations, not at `app/`.** The skip\n * rules on `sourceFiles` drop what certainly is not one — tests, benchmarks,\n * `.d.ts`, vendored packages — and nothing else. Widening the guesses is how a\n * discovery pass ends up quietly covering less than the directory holds, which\n * is the same silence in a new place.\n *\n * **Let a broken file stop the boot.** `discoverClasses` rethrows an import\n * failure naming the file rather than dropping it and carrying on, for the same\n * reason: four classes found out of five looks exactly like five out of five.\n *\n * **Leave a way out.** Discovery is what should happen when an app said\n * nothing. An app that lists its classes explicitly must not reach this file at\n * all — that is the escape hatch for a directory holding something this cannot\n * import, and it is the sentence an error from here should point at.\n *\n * ### One more thing worth knowing\n *\n * This imports by absolute path, while the application imports the same files\n * through the `@/app/*` alias. Bun keys its module registry by the *resolved*\n * path, so those two specifiers land on one module: a job already reached from\n * a controller is not evaluated a second time here, and the class object is the\n * same one. `gemi build` leaves that true in production — `packages: \"external\"`\n * keeps the app's own code out of `dist/server/server.mjs` and resolves it from\n * source at runtime, exactly as `gemi dev` does.\n *\n * Nothing here depends on that holding, and deliberately: `QueueManager` and the\n * `Scheduler`'s cross-reload registry are both keyed by name rather than by\n * class identity, so a build that did inline the app's modules would produce a\n * duplicate class object and still register the right job. Worth knowing before\n * writing a registry keyed the other way.\n */\n\n/**\n * The files under `dir` that could declare a class.\n *\n * Everything underneath it, because apps do group classes into folders, minus\n * what cannot be one. Each of these is going to be *imported*, so the exclusions\n * are about what is certainly not source rather than about what is probably not:\n *\n * - **Declaration files.** `.d.ts` has no runtime module behind it.\n * - **Tests, type tests and benchmarks**, by the suffix a runner already\n * recognises.\n * - **Dot-directories and `node_modules`.**\n * - **Any directory holding a `package.json`.** That is a package that happens\n * to live here — a vendored client, a generated SDK — not this app's source,\n * and importing its entry point runs somebody else's module graph. The\n * template has two under `app/models`.\n *\n * `ignore` is the escape hatch for the rest: a path prefix, relative to `dir`,\n * naming a file or a directory of adjacent code that runs something on import.\n * Nothing is ignored by default.\n *\n * The order is the same on every run over the same tree, which matters because\n * the caller is going to import in it: entries are sorted per directory before\n * recursing, and `readdirSync` order is the filesystem's rather than\n * alphabetical — a tree written `A.ts` then `B.ts` reads back `B.ts` first on\n * the machines this was tested on. Sorting per directory rather than sorting the\n * finished list is deliberate: for a tree holding both `a.ts` and `a/b.ts`, this\n * emits `a/b.ts` first, because the directory sorts before the file.\n *\n * A directory that does not exist yields an empty list rather than throwing.\n * \"The app has no jobs yet\" is an ordinary state and not this function's to\n * complain about — but it is indistinguishable from \"the app's source did not\n * ship\", so a caller that boots on the answer owes the reader a word about which\n * one it got.\n */\nexport function sourceFiles(dir: string, ignore: string[] = []): string[] {\n const out: string[] = [];\n\n const ignored = (path: string) => {\n const rel = relative(dir, path).split(\"\\\\\").join(\"/\");\n return ignore.some(\n (pattern) => rel === pattern || rel.startsWith(`${pattern}/`),\n );\n };\n\n const walk = (current: string) => {\n for (const entry of readdirSync(current, { withFileTypes: true }).sort(\n (a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0),\n )) {\n const path = join(current, entry.name);\n if (ignored(path)) continue;\n\n if (entry.isDirectory()) {\n if (entry.name.startsWith(\".\") || entry.name === \"node_modules\")\n continue;\n if (existsSync(join(path, \"package.json\"))) continue;\n walk(path);\n continue;\n }\n\n if (!entry.name.endsWith(\".ts\") && !entry.name.endsWith(\".tsx\")) continue;\n if (entry.name.endsWith(\".d.ts\")) continue;\n if (/\\.(test|test-d|spec|bench)\\.tsx?$/.test(entry.name)) continue;\n\n out.push(path);\n }\n };\n\n if (!existsSync(dir)) return out;\n\n walk(dir);\n return out;\n}\n\n/**\n * A class, as much of one as this file can name. `abstract` so that a base an\n * app never instantiates directly is a legal argument.\n */\ntype ClassLike = abstract new (...args: never[]) => unknown;\n\n/**\n * A file that would not import, reported with the file that would not import.\n *\n * Separate from a bare rethrow because the stack of a failed dynamic import\n * names the module that failed to *resolve*, several frames deep, and says\n * nothing about the walk that asked for it — so the reader learns that some\n * `?raw` specifier is unresolvable without learning that discovery is what\n * imported it, or that listing the classes explicitly is how they get their boot\n * back.\n */\nexport class DiscoveryError extends Error {\n constructor(message: string, options?: { cause?: unknown }) {\n super(message, options);\n this.name = \"DiscoveryError\";\n }\n}\n\n/**\n * Every exported class under `dir` whose prototype chain reaches `base`.\n *\n * `base` is a parameter rather than an import so that this file names no\n * service and stays cheap to depend on — `bin/check-models.ts` uses the walker\n * above and is bundled into `dist/bin/gemi.js`, which is not somewhere gemi's\n * service layer should end up. It is also what lets a test hand in a base class\n * of its own instead of standing up a project that can resolve `gemi/services`.\n *\n * `base` itself is never returned. A directory whose files import their base\n * from a sibling — the shape an app reaches for when several jobs share a gate —\n * re-exports it as often as not, and a framework that scheduled the abstract\n * base along with its subclasses would be running a job nobody wrote.\n *\n * A class is returned once no matter how many exports name it. A barrel in the\n * directory re-exporting everything beside it is the ordinary case, and it makes\n * every class reachable twice.\n *\n * The order is the walk's, and within a file the module namespace's, which the\n * language sorts by name. So the answer is the same on every run — worth having\n * where the caller is a scheduler and the alternative is a boot order that\n * depends on the filesystem.\n *\n * `onSkipped` is handed every export that did *not* match, with the file it came\n * from. Discovery's characteristic failure is a thing the author wrote and this\n * walk cannot see, and by the time an export has been discarded here the\n * information about why is gone — the caller is left holding \"four classes\"\n * where the directory holds five. A caller that can recognise its own\n * near-misses, as `discoverCommands` recognises a builder chain that was never\n * finished, uses this to say so by name instead.\n *\n * @throws DiscoveryError if a walked file cannot be imported. Not a skip: a file\n * that will not load is a class the caller was going to be told about and now is\n * not, which is the failure discovery exists to remove.\n */\nexport async function discoverClasses<T extends ClassLike>(\n dir: string,\n base: T,\n ignore: string[] = [],\n onSkipped?: (value: unknown, file: string) => void,\n): Promise<T[]> {\n const found = new Set<T>();\n\n for (const path of sourceFiles(dir, ignore)) {\n let module: Record<string, unknown>;\n\n try {\n module = (await import(path)) as Record<string, unknown>;\n } catch (error) {\n throw new DiscoveryError(\n `${path} could not be imported, so the classes in it could not be ` +\n `discovered:\\n ${(error as Error).message}\\n` +\n `List the classes explicitly in the config slice for this directory ` +\n `to skip the walk.`,\n { cause: error },\n );\n }\n\n for (const value of Object.values(module)) {\n if (\n typeof value === \"function\" &&\n value !== base &&\n Object.prototype.isPrototypeOf.call(base, value)\n ) {\n found.add(value as unknown as T);\n continue;\n }\n\n onSkipped?.(value, path);\n }\n }\n\n return [...found];\n}\n\n/**\n * The directory an app's `app/` sits in, as the running process can know it.\n *\n * `ROOT_DIR` is the obvious answer and is not available: `Server.start` awaits\n * `waitForBoot()` — every provider's `register` and `boot` — and only then\n * imports the http layer that sets it. Anything resolving paths during boot is\n * earlier than the variable it would want.\n *\n * What it can use is the same rule `httpProd` computes `ROOT_DIR` with a moment\n * later, which is why that file now calls this instead of repeating it. `gemi\n * dev` and `gemi start` both spawn the server with no `cwd`, so the process\n * inherits the CLI's, and the CLI takes `process.cwd()` for the project root\n * itself — `bun/preload.ts` reads `gemi.config` from it on the same assumption.\n *\n * `httpDev` computes a bare `process.cwd()`, so it and `httpProd` already\n * disagree whenever `GEMI_PROJECT_DIR` is set. Nothing in this repo sets it and\n * `gemi start` ignores it when locating the built entry point, so the two rules\n * are the same rule for every configuration that runs today; the divergence is\n * older than this function and wants its own fix.\n */\nexport function projectRoot(): string {\n return join(process.cwd(), process.env.GEMI_PROJECT_DIR ?? \"\");\n}\n"
6
6
  ],
7
7
  "mappings": ";AAAA,qBAAS,iBAAY,WACrB,eAAS,cAAM,aA2FR,SAAS,CAAW,CAAC,EAAa,EAAmB,CAAC,EAAa,CACxE,IAAM,EAAgB,CAAC,EAEjB,EAAU,CAAC,IAAiB,CAChC,IAAM,EAAM,EAAS,EAAK,CAAI,EAAE,MAAM,IAAI,EAAE,KAAK,GAAG,EACpD,OAAO,EAAO,KACZ,CAAC,IAAY,IAAQ,GAAW,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A,EAAM,IAAI,CAAqB,EAC/B,SAGF,IAAY,EAAO,CAAI,GAI3B,MAAO,CAAC,GAAG,CAAK,EAuBX,SAAS,CAAW,EAAW,CACpC,OAAO,EAAK,QAAQ,IAAI,EAAG,QAAQ,IAAI,kBAAoB,EAAE",
8
- "debugId": "756C346EC282AF3864756E2164756E21",
8
+ "debugId": "F46015BDD31D1A1A64756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{ff as LC}from"./chunk-kgmr9qxx.js";var OC=LC((QC,A)=>{var P,h,j,I,b,y,g,k,f,m,u,x,l,D,z,_,d,c,E,v,n,p,i,s,a,o,t,r,w,e,CC,HC;(function(X){var R=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(G){X(q(R,q(G)))});else if(typeof A==="object"&&typeof QC==="object")X(q(R,q(QC)));else X(q(R));function q(G,S){if(G!==R)if(typeof Object.create==="function")Object.defineProperty(G,"__esModule",{value:!0});else G.__esModule=!0;return function(C,H){return G[C]=S?S(C,H):H}}})(function(X){var R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,H){C.__proto__=H}||function(C,H){for(var L in H)if(Object.prototype.hasOwnProperty.call(H,L))C[L]=H[L]};P=function(C,H){if(typeof H!=="function"&&H!==null)throw TypeError("Class extends value "+String(H)+" is not a constructor or null");R(C,H);function L(){this.constructor=C}C.prototype=H===null?Object.create(H):(L.prototype=H.prototype,new L)},h=Object.assign||function(C){for(var H,L=1,O=arguments.length;L<O;L++){H=arguments[L];for(var Q in H)if(Object.prototype.hasOwnProperty.call(H,Q))C[Q]=H[Q]}return C},j=function(C,H){var L={};for(var O in C)if(Object.prototype.hasOwnProperty.call(C,O)&&H.indexOf(O)<0)L[O]=C[O];if(C!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var Q=0,O=Object.getOwnPropertySymbols(C);Q<O.length;Q++)if(H.indexOf(O[Q])<0&&Object.prototype.propertyIsEnumerable.call(C,O[Q]))L[O[Q]]=C[O[Q]]}return L},I=function(C,H,L,O){var Q=arguments.length,T=Q<3?H:O===null?O=Object.getOwnPropertyDescriptor(H,L):O,U;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")T=Reflect.decorate(C,H,L,O);else for(var Y=C.length-1;Y>=0;Y--)if(U=C[Y])T=(Q<3?U(T):Q>3?U(H,L,T):U(H,L))||T;return Q>3&&T&&Object.defineProperty(H,L,T),T},b=function(C,H){return function(L,O){H(L,O,C)}},y=function(C,H,L,O,Q,T){function U(K){if(K!==void 0&&typeof K!=="function")throw TypeError("Function expected");return K}var Y=O.kind,J=Y==="getter"?"get":Y==="setter"?"set":"value",W=!H&&C?O.static?C:C.prototype:null,$=H||(W?Object.getOwnPropertyDescriptor(W,O.name):{}),M,F=!1;for(var Z=L.length-1;Z>=0;Z--){var N={};for(var B in O)N[B]=B==="access"?{}:O[B];for(var B in O.access)N.access[B]=O.access[B];N.addInitializer=function(K){if(F)throw TypeError("Cannot add initializers after decoration has completed");T.push(U(K||null))};var V=(0,L[Z])(Y==="accessor"?{get:$.get,set:$.set}:$[J],N);if(Y==="accessor"){if(V===void 0)continue;if(V===null||typeof V!=="object")throw TypeError("Object expected");if(M=U(V.get))$.get=M;if(M=U(V.set))$.set=M;if(M=U(V.init))Q.unshift(M)}else if(M=U(V))if(Y==="field")Q.unshift(M);else $[J]=M}if(W)Object.defineProperty(W,O.name,$);F=!0},g=function(C,H,L){var O=arguments.length>2;for(var Q=0;Q<H.length;Q++)L=O?H[Q].call(C,L):H[Q].call(C);return O?L:void 0},k=function(C){return typeof C==="symbol"?C:"".concat(C)},f=function(C,H,L){if(typeof H==="symbol")H=H.description?"[".concat(H.description,"]"):"";return Object.defineProperty(C,"name",{configurable:!0,value:L?"".concat(L," ",H):H})},m=function(C,H){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(C,H)},u=function(C,H,L,O){function Q(T){return T instanceof L?T:new L(function(U){U(T)})}return new(L||(L=Promise))(function(T,U){function Y($){try{W(O.next($))}catch(M){U(M)}}function J($){try{W(O.throw($))}catch(M){U(M)}}function W($){$.done?T($.value):Q($.value).then(Y,J)}W((O=O.apply(C,H||[])).next())})},x=function(C,H){var L={label:0,sent:function(){if(T[0]&1)throw T[1];return T[1]},trys:[],ops:[]},O,Q,T,U=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return U.next=Y(0),U.throw=Y(1),U.return=Y(2),typeof Symbol==="function"&&(U[Symbol.iterator]=function(){return this}),U;function Y(W){return function($){return J([W,$])}}function J(W){if(O)throw TypeError("Generator is already executing.");while(U&&(U=0,W[0]&&(L=0)),L)try{if(O=1,Q&&(T=W[0]&2?Q.return:W[0]?Q.throw||((T=Q.return)&&T.call(Q),0):Q.next)&&!(T=T.call(Q,W[1])).done)return T;if(Q=0,T)W=[W[0]&2,T.value];switch(W[0]){case 0:case 1:T=W;break;case 4:return L.label++,{value:W[1],done:!1};case 5:L.label++,Q=W[1],W=[0];continue;case 7:W=L.ops.pop(),L.trys.pop();continue;default:if((T=L.trys,!(T=T.length>0&&T[T.length-1]))&&(W[0]===6||W[0]===2)){L=0;continue}if(W[0]===3&&(!T||W[1]>T[0]&&W[1]<T[3])){L.label=W[1];break}if(W[0]===6&&L.label<T[1]){L.label=T[1],T=W;break}if(T&&L.label<T[2]){L.label=T[2],L.ops.push(W);break}if(T[2])L.ops.pop();L.trys.pop();continue}W=H.call(C,L)}catch($){W=[6,$],Q=0}finally{O=T=0}if(W[0]&5)throw W[1];return{value:W[0]?W[1]:void 0,done:!0}}},l=function(C,H){for(var L in C)if(L!=="default"&&!Object.prototype.hasOwnProperty.call(H,L))w(H,C,L)},w=Object.create?function(C,H,L,O){if(O===void 0)O=L;var Q=Object.getOwnPropertyDescriptor(H,L);if(!Q||("get"in Q?!H.__esModule:Q.writable||Q.configurable))Q={enumerable:!0,get:function(){return H[L]}};Object.defineProperty(C,O,Q)}:function(C,H,L,O){if(O===void 0)O=L;C[O]=H[L]},D=function(C){var H=typeof Symbol==="function"&&Symbol.iterator,L=H&&C[H],O=0;if(L)return L.call(C);if(C&&typeof C.length==="number")return{next:function(){if(C&&O>=C.length)C=void 0;return{value:C&&C[O++],done:!C}}};throw TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")},z=function(C,H){var L=typeof Symbol==="function"&&C[Symbol.iterator];if(!L)return C;var O=L.call(C),Q,T=[],U;try{while((H===void 0||H-- >0)&&!(Q=O.next()).done)T.push(Q.value)}catch(Y){U={error:Y}}finally{try{if(Q&&!Q.done&&(L=O.return))L.call(O)}finally{if(U)throw U.error}}return T},_=function(){for(var C=[],H=0;H<arguments.length;H++)C=C.concat(z(arguments[H]));return C},d=function(){for(var C=0,H=0,L=arguments.length;H<L;H++)C+=arguments[H].length;for(var O=Array(C),Q=0,H=0;H<L;H++)for(var T=arguments[H],U=0,Y=T.length;U<Y;U++,Q++)O[Q]=T[U];return O},c=function(C,H,L){if(L||arguments.length===2){for(var O=0,Q=H.length,T;O<Q;O++)if(T||!(O in H)){if(!T)T=Array.prototype.slice.call(H,0,O);T[O]=H[O]}}return C.concat(T||Array.prototype.slice.call(H))},E=function(C){return this instanceof E?(this.v=C,this):new E(C)},v=function(C,H,L){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var O=L.apply(C,H||[]),Q,T=[];return Q=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),Y("next"),Y("throw"),Y("return",U),Q[Symbol.asyncIterator]=function(){return this},Q;function U(Z){return function(N){return Promise.resolve(N).then(Z,M)}}function Y(Z,N){if(O[Z]){if(Q[Z]=function(B){return new Promise(function(V,K){T.push([Z,B,V,K])>1||J(Z,B)})},N)Q[Z]=N(Q[Z])}}function J(Z,N){try{W(O[Z](N))}catch(B){F(T[0][3],B)}}function W(Z){Z.value instanceof E?Promise.resolve(Z.value.v).then($,M):F(T[0][2],Z)}function $(Z){J("next",Z)}function M(Z){J("throw",Z)}function F(Z,N){if(Z(N),T.shift(),T.length)J(T[0][0],T[0][1])}},n=function(C){var H,L;return H={},O("next"),O("throw",function(Q){throw Q}),O("return"),H[Symbol.iterator]=function(){return this},H;function O(Q,T){H[Q]=C[Q]?function(U){return(L=!L)?{value:E(C[Q](U)),done:!1}:T?T(U):U}:T}},p=function(C){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var H=C[Symbol.asyncIterator],L;return H?H.call(C):(C=typeof D==="function"?D(C):C[Symbol.iterator](),L={},O("next"),O("throw"),O("return"),L[Symbol.asyncIterator]=function(){return this},L);function O(T){L[T]=C[T]&&function(U){return new Promise(function(Y,J){U=C[T](U),Q(Y,J,U.done,U.value)})}}function Q(T,U,Y,J){Promise.resolve(J).then(function(W){T({value:W,done:Y})},U)}},i=function(C,H){if(Object.defineProperty)Object.defineProperty(C,"raw",{value:H});else C.raw=H;return C};var q=Object.create?function(C,H){Object.defineProperty(C,"default",{enumerable:!0,value:H})}:function(C,H){C.default=H},G=function(C){return G=Object.getOwnPropertyNames||function(H){var L=[];for(var O in H)if(Object.prototype.hasOwnProperty.call(H,O))L[L.length]=O;return L},G(C)};s=function(C){if(C&&C.__esModule)return C;var H={};if(C!=null){for(var L=G(C),O=0;O<L.length;O++)if(L[O]!=="default")w(H,C,L[O])}return q(H,C),H},a=function(C){return C&&C.__esModule?C:{default:C}},o=function(C,H,L,O){if(L==="a"&&!O)throw TypeError("Private accessor was defined without a getter");if(typeof H==="function"?C!==H||!O:!H.has(C))throw TypeError("Cannot read private member from an object whose class did not declare it");return L==="m"?O:L==="a"?O.call(C):O?O.value:H.get(C)},t=function(C,H,L,O,Q){if(O==="m")throw TypeError("Private method is not writable");if(O==="a"&&!Q)throw TypeError("Private accessor was defined without a setter");if(typeof H==="function"?C!==H||!Q:!H.has(C))throw TypeError("Cannot write private member to an object whose class did not declare it");return O==="a"?Q.call(C,L):Q?Q.value=L:H.set(C,L),L},r=function(C,H){if(H===null||typeof H!=="object"&&typeof H!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof C==="function"?H===C:C.has(H)},e=function(C,H,L){if(H!==null&&H!==void 0){if(typeof H!=="object"&&typeof H!=="function")throw TypeError("Object expected.");var O,Q;if(L){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");O=H[Symbol.asyncDispose]}if(O===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(O=H[Symbol.dispose],L)Q=O}if(typeof O!=="function")throw TypeError("Object not disposable.");if(Q)O=function(){try{Q.call(this)}catch(T){return Promise.reject(T)}};C.stack.push({value:H,dispose:O,async:L})}else if(L)C.stack.push({async:!0});return H};var S=typeof SuppressedError==="function"?SuppressedError:function(C,H,L){var O=Error(L);return O.name="SuppressedError",O.error=C,O.suppressed=H,O};CC=function(C){function H(T){C.error=C.hasError?new S(T,C.error,"An error was suppressed during disposal."):T,C.hasError=!0}var L,O=0;function Q(){while(L=C.stack.pop())try{if(!L.async&&O===1)return O=0,C.stack.push(L),Promise.resolve().then(Q);if(L.dispose){var T=L.dispose.call(L.value);if(L.async)return O|=2,Promise.resolve(T).then(Q,function(U){return H(U),Q()})}else O|=1}catch(U){H(U)}if(O===1)return C.hasError?Promise.reject(C.error):Promise.resolve();if(C.hasError)throw C.error}return Q()},HC=function(C,H){if(typeof C==="string"&&/^\.\.?\//.test(C))return C.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(L,O,Q,T,U){return O?H?".jsx":".js":Q&&(!T||!U)?L:Q+T+"."+U.toLowerCase()+"js"});return C},X("__extends",P),X("__assign",h),X("__rest",j),X("__decorate",I),X("__param",b),X("__esDecorate",y),X("__runInitializers",g),X("__propKey",k),X("__setFunctionName",f),X("__metadata",m),X("__awaiter",u),X("__generator",x),X("__exportStar",l),X("__createBinding",w),X("__values",D),X("__read",z),X("__spread",_),X("__spreadArrays",d),X("__spreadArray",c),X("__await",E),X("__asyncGenerator",v),X("__asyncDelegator",n),X("__asyncValues",p),X("__makeTemplateObject",i),X("__importStar",s),X("__importDefault",a),X("__classPrivateFieldGet",o),X("__classPrivateFieldSet",t),X("__classPrivateFieldIn",r),X("__addDisposableResource",e),X("__disposeResources",CC),X("__rewriteRelativeImportExtension",HC)})});
2
+ import{mf as LC}from"./chunk-4f69ygc8.js";var OC=LC((QC,A)=>{var P,h,j,I,b,y,g,k,f,m,u,x,l,D,z,_,d,c,E,v,n,p,i,s,a,o,t,r,w,e,CC,HC;(function(X){var R=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(G){X(q(R,q(G)))});else if(typeof A==="object"&&typeof QC==="object")X(q(R,q(QC)));else X(q(R));function q(G,S){if(G!==R)if(typeof Object.create==="function")Object.defineProperty(G,"__esModule",{value:!0});else G.__esModule=!0;return function(C,H){return G[C]=S?S(C,H):H}}})(function(X){var R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,H){C.__proto__=H}||function(C,H){for(var L in H)if(Object.prototype.hasOwnProperty.call(H,L))C[L]=H[L]};P=function(C,H){if(typeof H!=="function"&&H!==null)throw TypeError("Class extends value "+String(H)+" is not a constructor or null");R(C,H);function L(){this.constructor=C}C.prototype=H===null?Object.create(H):(L.prototype=H.prototype,new L)},h=Object.assign||function(C){for(var H,L=1,O=arguments.length;L<O;L++){H=arguments[L];for(var Q in H)if(Object.prototype.hasOwnProperty.call(H,Q))C[Q]=H[Q]}return C},j=function(C,H){var L={};for(var O in C)if(Object.prototype.hasOwnProperty.call(C,O)&&H.indexOf(O)<0)L[O]=C[O];if(C!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var Q=0,O=Object.getOwnPropertySymbols(C);Q<O.length;Q++)if(H.indexOf(O[Q])<0&&Object.prototype.propertyIsEnumerable.call(C,O[Q]))L[O[Q]]=C[O[Q]]}return L},I=function(C,H,L,O){var Q=arguments.length,T=Q<3?H:O===null?O=Object.getOwnPropertyDescriptor(H,L):O,U;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")T=Reflect.decorate(C,H,L,O);else for(var Y=C.length-1;Y>=0;Y--)if(U=C[Y])T=(Q<3?U(T):Q>3?U(H,L,T):U(H,L))||T;return Q>3&&T&&Object.defineProperty(H,L,T),T},b=function(C,H){return function(L,O){H(L,O,C)}},y=function(C,H,L,O,Q,T){function U(K){if(K!==void 0&&typeof K!=="function")throw TypeError("Function expected");return K}var Y=O.kind,J=Y==="getter"?"get":Y==="setter"?"set":"value",W=!H&&C?O.static?C:C.prototype:null,$=H||(W?Object.getOwnPropertyDescriptor(W,O.name):{}),M,F=!1;for(var Z=L.length-1;Z>=0;Z--){var N={};for(var B in O)N[B]=B==="access"?{}:O[B];for(var B in O.access)N.access[B]=O.access[B];N.addInitializer=function(K){if(F)throw TypeError("Cannot add initializers after decoration has completed");T.push(U(K||null))};var V=(0,L[Z])(Y==="accessor"?{get:$.get,set:$.set}:$[J],N);if(Y==="accessor"){if(V===void 0)continue;if(V===null||typeof V!=="object")throw TypeError("Object expected");if(M=U(V.get))$.get=M;if(M=U(V.set))$.set=M;if(M=U(V.init))Q.unshift(M)}else if(M=U(V))if(Y==="field")Q.unshift(M);else $[J]=M}if(W)Object.defineProperty(W,O.name,$);F=!0},g=function(C,H,L){var O=arguments.length>2;for(var Q=0;Q<H.length;Q++)L=O?H[Q].call(C,L):H[Q].call(C);return O?L:void 0},k=function(C){return typeof C==="symbol"?C:"".concat(C)},f=function(C,H,L){if(typeof H==="symbol")H=H.description?"[".concat(H.description,"]"):"";return Object.defineProperty(C,"name",{configurable:!0,value:L?"".concat(L," ",H):H})},m=function(C,H){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(C,H)},u=function(C,H,L,O){function Q(T){return T instanceof L?T:new L(function(U){U(T)})}return new(L||(L=Promise))(function(T,U){function Y($){try{W(O.next($))}catch(M){U(M)}}function J($){try{W(O.throw($))}catch(M){U(M)}}function W($){$.done?T($.value):Q($.value).then(Y,J)}W((O=O.apply(C,H||[])).next())})},x=function(C,H){var L={label:0,sent:function(){if(T[0]&1)throw T[1];return T[1]},trys:[],ops:[]},O,Q,T,U=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return U.next=Y(0),U.throw=Y(1),U.return=Y(2),typeof Symbol==="function"&&(U[Symbol.iterator]=function(){return this}),U;function Y(W){return function($){return J([W,$])}}function J(W){if(O)throw TypeError("Generator is already executing.");while(U&&(U=0,W[0]&&(L=0)),L)try{if(O=1,Q&&(T=W[0]&2?Q.return:W[0]?Q.throw||((T=Q.return)&&T.call(Q),0):Q.next)&&!(T=T.call(Q,W[1])).done)return T;if(Q=0,T)W=[W[0]&2,T.value];switch(W[0]){case 0:case 1:T=W;break;case 4:return L.label++,{value:W[1],done:!1};case 5:L.label++,Q=W[1],W=[0];continue;case 7:W=L.ops.pop(),L.trys.pop();continue;default:if((T=L.trys,!(T=T.length>0&&T[T.length-1]))&&(W[0]===6||W[0]===2)){L=0;continue}if(W[0]===3&&(!T||W[1]>T[0]&&W[1]<T[3])){L.label=W[1];break}if(W[0]===6&&L.label<T[1]){L.label=T[1],T=W;break}if(T&&L.label<T[2]){L.label=T[2],L.ops.push(W);break}if(T[2])L.ops.pop();L.trys.pop();continue}W=H.call(C,L)}catch($){W=[6,$],Q=0}finally{O=T=0}if(W[0]&5)throw W[1];return{value:W[0]?W[1]:void 0,done:!0}}},l=function(C,H){for(var L in C)if(L!=="default"&&!Object.prototype.hasOwnProperty.call(H,L))w(H,C,L)},w=Object.create?function(C,H,L,O){if(O===void 0)O=L;var Q=Object.getOwnPropertyDescriptor(H,L);if(!Q||("get"in Q?!H.__esModule:Q.writable||Q.configurable))Q={enumerable:!0,get:function(){return H[L]}};Object.defineProperty(C,O,Q)}:function(C,H,L,O){if(O===void 0)O=L;C[O]=H[L]},D=function(C){var H=typeof Symbol==="function"&&Symbol.iterator,L=H&&C[H],O=0;if(L)return L.call(C);if(C&&typeof C.length==="number")return{next:function(){if(C&&O>=C.length)C=void 0;return{value:C&&C[O++],done:!C}}};throw TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")},z=function(C,H){var L=typeof Symbol==="function"&&C[Symbol.iterator];if(!L)return C;var O=L.call(C),Q,T=[],U;try{while((H===void 0||H-- >0)&&!(Q=O.next()).done)T.push(Q.value)}catch(Y){U={error:Y}}finally{try{if(Q&&!Q.done&&(L=O.return))L.call(O)}finally{if(U)throw U.error}}return T},_=function(){for(var C=[],H=0;H<arguments.length;H++)C=C.concat(z(arguments[H]));return C},d=function(){for(var C=0,H=0,L=arguments.length;H<L;H++)C+=arguments[H].length;for(var O=Array(C),Q=0,H=0;H<L;H++)for(var T=arguments[H],U=0,Y=T.length;U<Y;U++,Q++)O[Q]=T[U];return O},c=function(C,H,L){if(L||arguments.length===2){for(var O=0,Q=H.length,T;O<Q;O++)if(T||!(O in H)){if(!T)T=Array.prototype.slice.call(H,0,O);T[O]=H[O]}}return C.concat(T||Array.prototype.slice.call(H))},E=function(C){return this instanceof E?(this.v=C,this):new E(C)},v=function(C,H,L){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var O=L.apply(C,H||[]),Q,T=[];return Q=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),Y("next"),Y("throw"),Y("return",U),Q[Symbol.asyncIterator]=function(){return this},Q;function U(Z){return function(N){return Promise.resolve(N).then(Z,M)}}function Y(Z,N){if(O[Z]){if(Q[Z]=function(B){return new Promise(function(V,K){T.push([Z,B,V,K])>1||J(Z,B)})},N)Q[Z]=N(Q[Z])}}function J(Z,N){try{W(O[Z](N))}catch(B){F(T[0][3],B)}}function W(Z){Z.value instanceof E?Promise.resolve(Z.value.v).then($,M):F(T[0][2],Z)}function $(Z){J("next",Z)}function M(Z){J("throw",Z)}function F(Z,N){if(Z(N),T.shift(),T.length)J(T[0][0],T[0][1])}},n=function(C){var H,L;return H={},O("next"),O("throw",function(Q){throw Q}),O("return"),H[Symbol.iterator]=function(){return this},H;function O(Q,T){H[Q]=C[Q]?function(U){return(L=!L)?{value:E(C[Q](U)),done:!1}:T?T(U):U}:T}},p=function(C){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var H=C[Symbol.asyncIterator],L;return H?H.call(C):(C=typeof D==="function"?D(C):C[Symbol.iterator](),L={},O("next"),O("throw"),O("return"),L[Symbol.asyncIterator]=function(){return this},L);function O(T){L[T]=C[T]&&function(U){return new Promise(function(Y,J){U=C[T](U),Q(Y,J,U.done,U.value)})}}function Q(T,U,Y,J){Promise.resolve(J).then(function(W){T({value:W,done:Y})},U)}},i=function(C,H){if(Object.defineProperty)Object.defineProperty(C,"raw",{value:H});else C.raw=H;return C};var q=Object.create?function(C,H){Object.defineProperty(C,"default",{enumerable:!0,value:H})}:function(C,H){C.default=H},G=function(C){return G=Object.getOwnPropertyNames||function(H){var L=[];for(var O in H)if(Object.prototype.hasOwnProperty.call(H,O))L[L.length]=O;return L},G(C)};s=function(C){if(C&&C.__esModule)return C;var H={};if(C!=null){for(var L=G(C),O=0;O<L.length;O++)if(L[O]!=="default")w(H,C,L[O])}return q(H,C),H},a=function(C){return C&&C.__esModule?C:{default:C}},o=function(C,H,L,O){if(L==="a"&&!O)throw TypeError("Private accessor was defined without a getter");if(typeof H==="function"?C!==H||!O:!H.has(C))throw TypeError("Cannot read private member from an object whose class did not declare it");return L==="m"?O:L==="a"?O.call(C):O?O.value:H.get(C)},t=function(C,H,L,O,Q){if(O==="m")throw TypeError("Private method is not writable");if(O==="a"&&!Q)throw TypeError("Private accessor was defined without a setter");if(typeof H==="function"?C!==H||!Q:!H.has(C))throw TypeError("Cannot write private member to an object whose class did not declare it");return O==="a"?Q.call(C,L):Q?Q.value=L:H.set(C,L),L},r=function(C,H){if(H===null||typeof H!=="object"&&typeof H!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof C==="function"?H===C:C.has(H)},e=function(C,H,L){if(H!==null&&H!==void 0){if(typeof H!=="object"&&typeof H!=="function")throw TypeError("Object expected.");var O,Q;if(L){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");O=H[Symbol.asyncDispose]}if(O===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(O=H[Symbol.dispose],L)Q=O}if(typeof O!=="function")throw TypeError("Object not disposable.");if(Q)O=function(){try{Q.call(this)}catch(T){return Promise.reject(T)}};C.stack.push({value:H,dispose:O,async:L})}else if(L)C.stack.push({async:!0});return H};var S=typeof SuppressedError==="function"?SuppressedError:function(C,H,L){var O=Error(L);return O.name="SuppressedError",O.error=C,O.suppressed=H,O};CC=function(C){function H(T){C.error=C.hasError?new S(T,C.error,"An error was suppressed during disposal."):T,C.hasError=!0}var L,O=0;function Q(){while(L=C.stack.pop())try{if(!L.async&&O===1)return O=0,C.stack.push(L),Promise.resolve().then(Q);if(L.dispose){var T=L.dispose.call(L.value);if(L.async)return O|=2,Promise.resolve(T).then(Q,function(U){return H(U),Q()})}else O|=1}catch(U){H(U)}if(O===1)return C.hasError?Promise.reject(C.error):Promise.resolve();if(C.hasError)throw C.error}return Q()},HC=function(C,H){if(typeof C==="string"&&/^\.\.?\//.test(C))return C.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(L,O,Q,T,U){return O?H?".jsx":".js":Q&&(!T||!U)?L:Q+T+"."+U.toLowerCase()+"js"});return C},X("__extends",P),X("__assign",h),X("__rest",j),X("__decorate",I),X("__param",b),X("__esDecorate",y),X("__runInitializers",g),X("__propKey",k),X("__setFunctionName",f),X("__metadata",m),X("__awaiter",u),X("__generator",x),X("__exportStar",l),X("__createBinding",w),X("__values",D),X("__read",z),X("__spread",_),X("__spreadArrays",d),X("__spreadArray",c),X("__await",E),X("__asyncGenerator",v),X("__asyncDelegator",n),X("__asyncValues",p),X("__makeTemplateObject",i),X("__importStar",s),X("__importDefault",a),X("__classPrivateFieldGet",o),X("__classPrivateFieldSet",t),X("__classPrivateFieldIn",r),X("__addDisposableResource",e),X("__disposeResources",CC),X("__rewriteRelativeImportExtension",HC)})});
3
3
  export{OC as ha};
4
4
 
5
- //# debugId=C1E68359A9A0E04064756E2164756E21
5
+ //# debugId=404E6A04356674AA64756E2164756E21