gemi 0.207.2 → 0.208.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 (230) hide show
  1. package/dist/ai/Agent.d.ts +83 -1
  2. package/dist/ai/Agent.d.ts.map +1 -1
  3. package/dist/ai/AgentController.d.ts +7 -1
  4. package/dist/ai/AgentController.d.ts.map +1 -1
  5. package/dist/ai/AgentProvider.d.ts +20 -2
  6. package/dist/ai/AgentProvider.d.ts.map +1 -1
  7. package/dist/ai/FallbackProvider.d.ts.map +1 -1
  8. package/dist/ai/index.d.ts +4 -4
  9. package/dist/ai/index.d.ts.map +1 -1
  10. package/dist/ai/index.js +38 -38
  11. package/dist/ai/index.js.map +4 -4
  12. package/dist/ai/providers/call.d.ts +3 -1
  13. package/dist/ai/providers/call.d.ts.map +1 -1
  14. package/dist/ai/providers/capabilities.d.ts.map +1 -1
  15. package/dist/ai/providers/endpoints.d.ts +9 -0
  16. package/dist/ai/providers/endpoints.d.ts.map +1 -1
  17. package/dist/ai/providers/errors.d.ts +4 -2
  18. package/dist/ai/providers/errors.d.ts.map +1 -1
  19. package/dist/ai/providers/http.d.ts +33 -0
  20. package/dist/ai/providers/http.d.ts.map +1 -1
  21. package/dist/ai/providers/request.d.ts.map +1 -1
  22. package/dist/ai/store/stubAgentRun.d.ts +2 -1
  23. package/dist/ai/store/stubAgentRun.d.ts.map +1 -1
  24. package/dist/ai/testing/index.js +2 -2
  25. package/dist/ai/testing/index.js.map +1 -1
  26. package/dist/ai/types.d.ts +31 -2
  27. package/dist/ai/types.d.ts.map +1 -1
  28. package/dist/app/index.js +1 -1
  29. package/dist/bun/plugin.js +1 -1
  30. package/dist/bun/preload.js +1 -1
  31. package/dist/{chunk-24tj4dzx.js → chunk-094hbhc8.js} +2 -2
  32. package/dist/{chunk-24tj4dzx.js.map → chunk-094hbhc8.js.map} +1 -1
  33. package/dist/{chunk-1em8t2x1.js → chunk-101rvvje.js} +3 -3
  34. package/dist/{chunk-1em8t2x1.js.map → chunk-101rvvje.js.map} +1 -1
  35. package/dist/{chunk-qc0e278w.js → chunk-12gthjxx.js} +1 -1
  36. package/dist/{chunk-8ar7180x.js → chunk-1agwddws.js} +2 -2
  37. package/dist/{chunk-8ar7180x.js.map → chunk-1agwddws.js.map} +1 -1
  38. package/dist/{chunk-nfher0gz.js → chunk-1vnbw1d8.js} +2 -2
  39. package/dist/{chunk-nfher0gz.js.map → chunk-1vnbw1d8.js.map} +1 -1
  40. package/dist/{chunk-53fv4c39.js → chunk-24z18t5q.js} +4 -4
  41. package/dist/{chunk-53fv4c39.js.map → chunk-24z18t5q.js.map} +1 -1
  42. package/dist/{chunk-6ge27ygx.js → chunk-2jbdbvd8.js} +2 -2
  43. package/dist/{chunk-6ge27ygx.js.map → chunk-2jbdbvd8.js.map} +1 -1
  44. package/dist/{chunk-fhn92are.js → chunk-2k438dp6.js} +2 -2
  45. package/dist/{chunk-fhn92are.js.map → chunk-2k438dp6.js.map} +1 -1
  46. package/dist/{chunk-rjtge67x.js → chunk-3raywsbj.js} +2 -2
  47. package/dist/{chunk-rjtge67x.js.map → chunk-3raywsbj.js.map} +1 -1
  48. package/dist/{chunk-k8peybx0.js → chunk-3rgf7rsy.js} +3 -3
  49. package/dist/{chunk-k8peybx0.js.map → chunk-3rgf7rsy.js.map} +1 -1
  50. package/dist/{chunk-hthyn5pj.js → chunk-3wsmgdcr.js} +3 -3
  51. package/dist/{chunk-hthyn5pj.js.map → chunk-3wsmgdcr.js.map} +1 -1
  52. package/dist/{chunk-3830ee5d.js → chunk-5399t8zm.js} +2 -2
  53. package/dist/{chunk-3830ee5d.js.map → chunk-5399t8zm.js.map} +1 -1
  54. package/dist/{chunk-ndcqbwsj.js → chunk-641fns6j.js} +2 -2
  55. package/dist/{chunk-ndcqbwsj.js.map → chunk-641fns6j.js.map} +1 -1
  56. package/dist/{chunk-wrfz0jsw.js → chunk-6zcqa5fz.js} +2 -2
  57. package/dist/{chunk-wrfz0jsw.js.map → chunk-6zcqa5fz.js.map} +1 -1
  58. package/dist/{chunk-6zpf257t.js → chunk-716832vw.js} +2 -2
  59. package/dist/{chunk-6zpf257t.js.map → chunk-716832vw.js.map} +1 -1
  60. package/dist/{chunk-e0scxs81.js → chunk-8gyq2etb.js} +3 -3
  61. package/dist/{chunk-e0scxs81.js.map → chunk-8gyq2etb.js.map} +3 -3
  62. package/dist/{chunk-8q5kxzxn.js → chunk-8ty6yp6r.js} +3 -3
  63. package/dist/{chunk-8q5kxzxn.js.map → chunk-8ty6yp6r.js.map} +1 -1
  64. package/dist/{chunk-8ncqxja2.js → chunk-9d8tz60r.js} +1 -1
  65. package/dist/{chunk-xgc5tj8k.js → chunk-9qyedsvw.js} +3 -3
  66. package/dist/{chunk-xgc5tj8k.js.map → chunk-9qyedsvw.js.map} +1 -1
  67. package/dist/{chunk-zf1eqgzt.js → chunk-a76a7869.js} +2 -2
  68. package/dist/{chunk-72e857nw.js.map → chunk-a76a7869.js.map} +1 -1
  69. package/dist/{chunk-djnn8vvp.js → chunk-achvynaf.js} +2 -2
  70. package/dist/{chunk-djnn8vvp.js.map → chunk-achvynaf.js.map} +1 -1
  71. package/dist/{chunk-0eq7am78.js → chunk-ad0dx73f.js} +2 -2
  72. package/dist/{chunk-0eq7am78.js.map → chunk-ad0dx73f.js.map} +1 -1
  73. package/dist/{chunk-092magz7.js → chunk-ag5nhjcr.js} +2 -2
  74. package/dist/{chunk-092magz7.js.map → chunk-ag5nhjcr.js.map} +1 -1
  75. package/dist/{chunk-emt36pxm.js → chunk-agrr8f8y.js} +2 -2
  76. package/dist/{chunk-emt36pxm.js.map → chunk-agrr8f8y.js.map} +1 -1
  77. package/dist/{chunk-znw55n6g.js → chunk-arzp5dne.js} +2 -2
  78. package/dist/{chunk-znw55n6g.js.map → chunk-arzp5dne.js.map} +1 -1
  79. package/dist/{chunk-jn1h76sa.js → chunk-b1y54j6v.js} +2 -2
  80. package/dist/{chunk-jn1h76sa.js.map → chunk-b1y54j6v.js.map} +1 -1
  81. package/dist/{chunk-te4vz0rw.js → chunk-b51a77kv.js} +2 -2
  82. package/dist/{chunk-te4vz0rw.js.map → chunk-b51a77kv.js.map} +1 -1
  83. package/dist/{chunk-wfees83q.js → chunk-bdzj9znx.js} +3 -3
  84. package/dist/{chunk-wfees83q.js.map → chunk-bdzj9znx.js.map} +1 -1
  85. package/dist/{chunk-39dz1abf.js → chunk-bhc9vk13.js} +1 -1
  86. package/dist/{chunk-460c8k50.js → chunk-cfbhhfkv.js} +3 -3
  87. package/dist/{chunk-460c8k50.js.map → chunk-cfbhhfkv.js.map} +1 -1
  88. package/dist/{chunk-78g1cngk.js → chunk-dje6exhs.js} +2 -2
  89. package/dist/{chunk-78g1cngk.js.map → chunk-dje6exhs.js.map} +1 -1
  90. package/dist/{chunk-bpqkzpkt.js → chunk-dm6tkkwv.js} +2 -2
  91. package/dist/{chunk-bpqkzpkt.js.map → chunk-dm6tkkwv.js.map} +1 -1
  92. package/dist/{chunk-bxznwntw.js → chunk-enq03rgh.js} +2 -2
  93. package/dist/{chunk-bxznwntw.js.map → chunk-enq03rgh.js.map} +1 -1
  94. package/dist/{chunk-34vvev4a.js → chunk-ewhgsw1n.js} +2 -2
  95. package/dist/{chunk-34vvev4a.js.map → chunk-ewhgsw1n.js.map} +1 -1
  96. package/dist/{chunk-8gyanh1b.js → chunk-f0sfh1r2.js} +2 -2
  97. package/dist/{chunk-8gyanh1b.js.map → chunk-f0sfh1r2.js.map} +1 -1
  98. package/dist/{chunk-a7zqp5m7.js → chunk-fsae9dgb.js} +2 -2
  99. package/dist/{chunk-a7zqp5m7.js.map → chunk-fsae9dgb.js.map} +1 -1
  100. package/dist/{chunk-hqg4dfca.js → chunk-fv6ncgbc.js} +2 -2
  101. package/dist/{chunk-hqg4dfca.js.map → chunk-fv6ncgbc.js.map} +1 -1
  102. package/dist/{chunk-etcds9w3.js → chunk-h1f4f9wx.js} +2 -2
  103. package/dist/{chunk-etcds9w3.js.map → chunk-h1f4f9wx.js.map} +1 -1
  104. package/dist/{chunk-m3v661b3.js → chunk-h4byt0x3.js} +2 -2
  105. package/dist/{chunk-m3v661b3.js.map → chunk-h4byt0x3.js.map} +1 -1
  106. package/dist/{chunk-c8bvpkr2.js → chunk-hbdqv48k.js} +2 -2
  107. package/dist/{chunk-c8bvpkr2.js.map → chunk-hbdqv48k.js.map} +1 -1
  108. package/dist/{chunk-9m6mkaqb.js → chunk-hcysexst.js} +2 -2
  109. package/dist/{chunk-9m6mkaqb.js.map → chunk-hcysexst.js.map} +1 -1
  110. package/dist/{chunk-wpfempaj.js → chunk-hmccxtd3.js} +2 -2
  111. package/dist/{chunk-wpfempaj.js.map → chunk-hmccxtd3.js.map} +1 -1
  112. package/dist/{chunk-tx5zrdmb.js → chunk-jggtz103.js} +2 -2
  113. package/dist/{chunk-tx5zrdmb.js.map → chunk-jggtz103.js.map} +1 -1
  114. package/dist/{chunk-sjve1yvv.js → chunk-jr9y6k90.js} +1 -1
  115. package/dist/{chunk-6x2zbh1q.js → chunk-kax9ghny.js} +2 -2
  116. package/dist/{chunk-6x2zbh1q.js.map → chunk-kax9ghny.js.map} +1 -1
  117. package/dist/{chunk-q1t9gvm1.js → chunk-kbkyde5f.js} +2 -2
  118. package/dist/{chunk-q1t9gvm1.js.map → chunk-kbkyde5f.js.map} +1 -1
  119. package/dist/{chunk-77dt2tap.js → chunk-mtf5kzza.js} +2 -2
  120. package/dist/{chunk-77dt2tap.js.map → chunk-mtf5kzza.js.map} +1 -1
  121. package/dist/{chunk-3z8d8v8q.js → chunk-mxedsqbe.js} +3 -3
  122. package/dist/{chunk-3z8d8v8q.js.map → chunk-mxedsqbe.js.map} +1 -1
  123. package/dist/{chunk-jy61580r.js → chunk-n0sbg84n.js} +2 -2
  124. package/dist/{chunk-jy61580r.js.map → chunk-n0sbg84n.js.map} +1 -1
  125. package/dist/{chunk-06w8hhnk.js → chunk-n65hk6bq.js} +2 -2
  126. package/dist/{chunk-06w8hhnk.js.map → chunk-n65hk6bq.js.map} +1 -1
  127. package/dist/{chunk-4ksnhx8x.js → chunk-ntcj2sgv.js} +3 -3
  128. package/dist/{chunk-4ksnhx8x.js.map → chunk-ntcj2sgv.js.map} +1 -1
  129. package/dist/{chunk-scw0vknj.js → chunk-p27ft91c.js} +1 -1
  130. package/dist/{chunk-vyaedzr8.js → chunk-p608rrfc.js} +3 -3
  131. package/dist/{chunk-vyaedzr8.js.map → chunk-p608rrfc.js.map} +1 -1
  132. package/dist/chunk-pag82mxh.js +5 -0
  133. package/dist/{chunk-4q59y78y.js.map → chunk-pag82mxh.js.map} +1 -1
  134. package/dist/{chunk-yj1h4rzn.js → chunk-q634cwbc.js} +3 -3
  135. package/dist/{chunk-yj1h4rzn.js.map → chunk-q634cwbc.js.map} +1 -1
  136. package/dist/{chunk-09hzyf9g.js → chunk-q7x7ddw0.js} +3 -3
  137. package/dist/{chunk-09hzyf9g.js.map → chunk-q7x7ddw0.js.map} +1 -1
  138. package/dist/{chunk-65btke6p.js → chunk-qc7x8q1q.js} +2 -2
  139. package/dist/{chunk-65btke6p.js.map → chunk-qc7x8q1q.js.map} +1 -1
  140. package/dist/{chunk-wdrmzjtq.js → chunk-r5ggnywk.js} +2 -2
  141. package/dist/{chunk-wdrmzjtq.js.map → chunk-r5ggnywk.js.map} +1 -1
  142. package/dist/{chunk-72e857nw.js → chunk-raejxs3y.js} +2 -2
  143. package/dist/{chunk-zf1eqgzt.js.map → chunk-raejxs3y.js.map} +1 -1
  144. package/dist/{chunk-k8a41gkt.js → chunk-rffpqhn8.js} +2 -2
  145. package/dist/{chunk-k8a41gkt.js.map → chunk-rffpqhn8.js.map} +1 -1
  146. package/dist/{chunk-p9c5rc1z.js → chunk-rhyhxgxg.js} +3 -3
  147. package/dist/{chunk-p9c5rc1z.js.map → chunk-rhyhxgxg.js.map} +1 -1
  148. package/dist/{chunk-eeq9ty68.js → chunk-t0xfzpfa.js} +2 -2
  149. package/dist/{chunk-eeq9ty68.js.map → chunk-t0xfzpfa.js.map} +1 -1
  150. package/dist/chunk-t9gc6mhq.js +11 -0
  151. package/dist/{chunk-2e40rx0p.js.map → chunk-t9gc6mhq.js.map} +8 -8
  152. package/dist/{chunk-9qyet3nb.js → chunk-tj8wbxyz.js} +2 -2
  153. package/dist/{chunk-9qyet3nb.js.map → chunk-tj8wbxyz.js.map} +1 -1
  154. package/dist/{chunk-q751b0jx.js → chunk-tjfvkzq8.js} +1 -1
  155. package/dist/{chunk-njnng5ew.js → chunk-v10kckwp.js} +4 -4
  156. package/dist/{chunk-njnng5ew.js.map → chunk-v10kckwp.js.map} +1 -1
  157. package/dist/{chunk-ne51fxg2.js → chunk-vrpsgq3x.js} +2 -2
  158. package/dist/{chunk-ne51fxg2.js.map → chunk-vrpsgq3x.js.map} +1 -1
  159. package/dist/{chunk-jy26hy7z.js → chunk-w92n83g2.js} +2 -2
  160. package/dist/{chunk-jy26hy7z.js.map → chunk-w92n83g2.js.map} +1 -1
  161. package/dist/{chunk-dwya9z8p.js → chunk-wcpqn1pg.js} +2 -2
  162. package/dist/{chunk-dwya9z8p.js.map → chunk-wcpqn1pg.js.map} +1 -1
  163. package/dist/{chunk-zvk6dydb.js → chunk-wkh9xcdq.js} +2 -2
  164. package/dist/{chunk-zvk6dydb.js.map → chunk-wkh9xcdq.js.map} +1 -1
  165. package/dist/{chunk-7wzhdq1x.js → chunk-wy87gc0b.js} +3 -3
  166. package/dist/{chunk-7wzhdq1x.js.map → chunk-wy87gc0b.js.map} +1 -1
  167. package/dist/{chunk-aed0vv5g.js → chunk-xt90xbes.js} +2 -2
  168. package/dist/{chunk-aed0vv5g.js.map → chunk-xt90xbes.js.map} +1 -1
  169. package/dist/{chunk-6cx6kh04.js → chunk-y16vp7yf.js} +2 -2
  170. package/dist/{chunk-6cx6kh04.js.map → chunk-y16vp7yf.js.map} +1 -1
  171. package/dist/{chunk-e05rbjn2.js → chunk-ykh78bct.js} +2 -2
  172. package/dist/{chunk-e05rbjn2.js.map → chunk-ykh78bct.js.map} +1 -1
  173. package/dist/{chunk-cffx7wqp.js → chunk-yn3pf1fp.js} +2 -2
  174. package/dist/{chunk-cffx7wqp.js.map → chunk-yn3pf1fp.js.map} +1 -1
  175. package/dist/{chunk-s1fa5f8b.js → chunk-yzbj11dd.js} +2 -2
  176. package/dist/{chunk-s1fa5f8b.js.map → chunk-yzbj11dd.js.map} +1 -1
  177. package/dist/{chunk-vebstesm.js → chunk-zcx8n3mk.js} +3 -3
  178. package/dist/{chunk-vebstesm.js.map → chunk-zcx8n3mk.js.map} +1 -1
  179. package/dist/chunk-zrqzxc50.js +48 -0
  180. package/dist/chunk-zrqzxc50.js.map +27 -0
  181. package/dist/{chunk-8d2g78vc.js → chunk-zv6a6w1v.js} +2 -2
  182. package/dist/{chunk-8d2g78vc.js.map → chunk-zv6a6w1v.js.map} +1 -1
  183. package/dist/{chunk-1tc6j8bn.js → chunk-zzs96hc8.js} +2 -2
  184. package/dist/{chunk-1tc6j8bn.js.map → chunk-zzs96hc8.js.map} +1 -1
  185. package/dist/config/index.js +1 -1
  186. package/dist/console/run.js +2 -2
  187. package/dist/console/run.js.map +1 -1
  188. package/dist/container/index.js +2 -2
  189. package/dist/container/index.js.map +1 -1
  190. package/dist/database/index.js +2 -2
  191. package/dist/database/index.js.map +1 -1
  192. package/dist/email/index.js +2 -2
  193. package/dist/email/index.js.map +1 -1
  194. package/dist/facades/index.js +2 -2
  195. package/dist/facades/index.js.map +1 -1
  196. package/dist/foundation/index.js +2 -2
  197. package/dist/foundation/index.js.map +1 -1
  198. package/dist/http/index.js +2 -2
  199. package/dist/http/index.js.map +1 -1
  200. package/dist/i18n/dictionaryRuntime.js +2 -2
  201. package/dist/i18n/dictionaryRuntime.js.map +1 -1
  202. package/dist/i18n/index.js +2 -2
  203. package/dist/i18n/index.js.map +1 -1
  204. package/dist/kernel/index.js +2 -2
  205. package/dist/kernel/index.js.map +1 -1
  206. package/dist/orm/index.js +2 -2
  207. package/dist/orm/index.js.map +1 -1
  208. package/dist/probe/index.js +2 -2
  209. package/dist/probe/index.js.map +1 -1
  210. package/dist/server/index.js +2 -2
  211. package/dist/server/index.js.map +1 -1
  212. package/dist/services/index.js +2 -2
  213. package/dist/services/index.js.map +1 -1
  214. package/dist/services/queue/work.js +2 -2
  215. package/dist/services/queue/work.js.map +1 -1
  216. package/dist/stats/route-table.js +1 -1
  217. package/dist/support/index.js +2 -2
  218. package/dist/support/index.js.map +1 -1
  219. package/dist/vitest/index.js +1 -1
  220. package/package.json +1 -1
  221. package/dist/chunk-2e40rx0p.js +0 -11
  222. package/dist/chunk-4q59y78y.js +0 -5
  223. package/dist/chunk-v1d7xya8.js +0 -46
  224. package/dist/chunk-v1d7xya8.js.map +0 -27
  225. /package/dist/{chunk-qc0e278w.js.map → chunk-12gthjxx.js.map} +0 -0
  226. /package/dist/{chunk-8ncqxja2.js.map → chunk-9d8tz60r.js.map} +0 -0
  227. /package/dist/{chunk-39dz1abf.js.map → chunk-bhc9vk13.js.map} +0 -0
  228. /package/dist/{chunk-sjve1yvv.js.map → chunk-jr9y6k90.js.map} +0 -0
  229. /package/dist/{chunk-scw0vknj.js.map → chunk-p27ft91c.js.map} +0 -0
  230. /package/dist/{chunk-q751b0jx.js.map → chunk-tjfvkzq8.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{V as C}from"./chunk-hqg4dfca.js";import"./chunk-fhn92are.js";import{X as ne}from"./chunk-8d2g78vc.js";import{Y as _}from"./chunk-78g1cngk.js";import{Em as c,Im as F}from"./chunk-zf1eqgzt.js";var x=c(_(),1),T=c(C(),1);var q=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var D=c(ne(),1);var u=c(_(),1),m=c(C(),1);var W=300000,h="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var j=async(e,o={},r)=>{let{SSOOIDCClient:t}=await import("./chunk-s1fa5f8b.js").then((m)=>c(m.default,1)),n=(f)=>o.clientConfig?.[f]??o.parentClientConfig?.[f]??r?.[f];return new t(Object.assign({},o.clientConfig??{},{region:e??o.clientConfig?.region,logger:n("logger"),userAgentAppId:n("userAgentAppId")}))};var X=async(e,o,r={},t)=>{let{CreateTokenCommand:n}=await import("./chunk-s1fa5f8b.js").then((m)=>c(m.default,1));return(await j(o,r,t)).send(new n({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var z=c(_(),1);var P=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new z.TokenProviderError(`Token is expired. ${h}`,!1)};var J=c(_(),1);var g=(e,o,r=!1)=>{if(typeof o>"u")throw new J.TokenProviderError(`Value not present for '${e}' in SSO Token${r?". Cannot refresh":""}. ${h}`,!1)};var V=c(C(),1);import{promises as re}from"fs";var{writeFile:te}=re,Y=(e,o)=>{let r=V.getSSOTokenFilepath(e),t=JSON.stringify(o,null,2);return te(r,t)};var B=new Date(0),Q=(e={})=>async({callerClientConfig:o}={})=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");let r=await m.parseKnownFiles(e),t=m.getProfileName({profile:e.profile??o?.profile}),n=r[t];if(!n)throw new u.TokenProviderError(`Profile '${t}' could not be found in shared credentials file.`,!1);else if(!n.sso_session)throw new u.TokenProviderError(`Profile '${t}' is missing required property 'sso_session'.`);let a=n.sso_session,p=(await m.loadSsoSessionData(e))[a];if(!p)throw new u.TokenProviderError(`Sso session '${a}' could not be found in shared credentials file.`,!1);for(let i of["sso_start_url","sso_region"])if(!p[i])throw new u.TokenProviderError(`Sso session '${a}' is missing required property '${i}'.`,!1);let{sso_start_url:S,sso_region:I}=p,s;try{s=await m.getSSOTokenFromFile(a)}catch(i){throw new u.TokenProviderError(`The SSO session token associated with profile=${t} was not found or is invalid. ${h}`,!1)}g("accessToken",s.accessToken),g("expiresAt",s.expiresAt);let{accessToken:y,expiresAt:E}=s,l={token:y,expiration:new Date(E)};if(l.expiration.getTime()-Date.now()>W)return l;if(Date.now()-B.getTime()<30000)return P(l),l;g("clientId",s.clientId,!0),g("clientSecret",s.clientSecret,!0),g("refreshToken",s.refreshToken,!0);try{B.setTime(Date.now());let i=await X(s,I,e,o);g("accessToken",i.accessToken),g("expiresIn",i.expiresIn);let O=new Date(Date.now()+i.expiresIn*1000);try{await Y(a,{...s,accessToken:i.accessToken,expiresAt:O.toISOString(),refreshToken:i.refreshToken})}catch(R){}return{token:i.accessToken,expiration:O}}catch(i){return P(l),l}};var k=c(_(),1),Z=c(C(),1),A=!1,$=async({ssoStartUrl:e,ssoSession:o,ssoAccountId:r,ssoRegion:t,ssoRoleName:n,ssoClient:a,clientConfig:f,parentClientConfig:p,callerClientConfig:S,profile:I,filepath:s,configFilepath:y,ignoreCache:E,logger:l})=>{let i,O="To refresh this SSO session run aws sso login with the corresponding profile.";if(o)try{let w=await Q({profile:I,filepath:s,configFilepath:y,ignoreCache:E})();i={accessToken:w.token,expiresAt:new Date(w.expiration).toISOString()}}catch(w){throw new k.CredentialsProviderError(w.message,{tryNextLink:A,logger:l})}else try{i=await Z.getSSOTokenFromFile(e)}catch(w){throw new k.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:A,logger:l})}if(new Date(i.expiresAt).getTime()-Date.now()<=0)throw new k.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:A,logger:l});let{accessToken:R}=i,{SSOClient:d,GetRoleCredentialsCommand:N}=await import("./chunk-wrfz0jsw.js"),se=a||new d(Object.assign({},f??{},{logger:f?.logger??S?.logger??p?.logger,region:f?.region??t,userAgentAppId:f?.userAgentAppId??S?.userAgentAppId??p?.userAgentAppId})),L;try{L=await se.send(new N({accountId:r,roleName:n,accessToken:R}))}catch(w){throw new k.CredentialsProviderError(w,{tryNextLink:A,logger:l})}let{roleCredentials:{accessKeyId:M,secretAccessKey:G,sessionToken:K,expiration:b,credentialScope:H,accountId:U}={}}=L;if(!M||!G||!K||!b)throw new k.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:A,logger:l});let v={accessKeyId:M,secretAccessKey:G,sessionToken:K,expiration:new Date(b),...H&&{credentialScope:H},...U&&{accountId:U}};if(o)D.setCredentialFeature(v,"CREDENTIALS_SSO","s");else D.setCredentialFeature(v,"CREDENTIALS_SSO_LEGACY","u");return v};var ee=c(_(),1),oe=(e,o)=>{let{sso_start_url:r,sso_account_id:t,sso_region:n,sso_role_name:a}=e;if(!r||!t||!n||!a)throw new ee.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}
2
+ import{V as C}from"./chunk-fv6ncgbc.js";import"./chunk-2k438dp6.js";import{X as ne}from"./chunk-zv6a6w1v.js";import{Y as _}from"./chunk-dje6exhs.js";import{Fm as c,Jm as F}from"./chunk-a76a7869.js";var x=c(_(),1),T=c(C(),1);var q=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var D=c(ne(),1);var u=c(_(),1),m=c(C(),1);var W=300000,h="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var j=async(e,o={},r)=>{let{SSOOIDCClient:t}=await import("./chunk-yzbj11dd.js").then((m)=>c(m.default,1)),n=(f)=>o.clientConfig?.[f]??o.parentClientConfig?.[f]??r?.[f];return new t(Object.assign({},o.clientConfig??{},{region:e??o.clientConfig?.region,logger:n("logger"),userAgentAppId:n("userAgentAppId")}))};var X=async(e,o,r={},t)=>{let{CreateTokenCommand:n}=await import("./chunk-yzbj11dd.js").then((m)=>c(m.default,1));return(await j(o,r,t)).send(new n({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var z=c(_(),1);var P=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new z.TokenProviderError(`Token is expired. ${h}`,!1)};var J=c(_(),1);var g=(e,o,r=!1)=>{if(typeof o>"u")throw new J.TokenProviderError(`Value not present for '${e}' in SSO Token${r?". Cannot refresh":""}. ${h}`,!1)};var V=c(C(),1);import{promises as re}from"fs";var{writeFile:te}=re,Y=(e,o)=>{let r=V.getSSOTokenFilepath(e),t=JSON.stringify(o,null,2);return te(r,t)};var B=new Date(0),Q=(e={})=>async({callerClientConfig:o}={})=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");let r=await m.parseKnownFiles(e),t=m.getProfileName({profile:e.profile??o?.profile}),n=r[t];if(!n)throw new u.TokenProviderError(`Profile '${t}' could not be found in shared credentials file.`,!1);else if(!n.sso_session)throw new u.TokenProviderError(`Profile '${t}' is missing required property 'sso_session'.`);let a=n.sso_session,p=(await m.loadSsoSessionData(e))[a];if(!p)throw new u.TokenProviderError(`Sso session '${a}' could not be found in shared credentials file.`,!1);for(let i of["sso_start_url","sso_region"])if(!p[i])throw new u.TokenProviderError(`Sso session '${a}' is missing required property '${i}'.`,!1);let{sso_start_url:S,sso_region:I}=p,s;try{s=await m.getSSOTokenFromFile(a)}catch(i){throw new u.TokenProviderError(`The SSO session token associated with profile=${t} was not found or is invalid. ${h}`,!1)}g("accessToken",s.accessToken),g("expiresAt",s.expiresAt);let{accessToken:y,expiresAt:E}=s,l={token:y,expiration:new Date(E)};if(l.expiration.getTime()-Date.now()>W)return l;if(Date.now()-B.getTime()<30000)return P(l),l;g("clientId",s.clientId,!0),g("clientSecret",s.clientSecret,!0),g("refreshToken",s.refreshToken,!0);try{B.setTime(Date.now());let i=await X(s,I,e,o);g("accessToken",i.accessToken),g("expiresIn",i.expiresIn);let O=new Date(Date.now()+i.expiresIn*1000);try{await Y(a,{...s,accessToken:i.accessToken,expiresAt:O.toISOString(),refreshToken:i.refreshToken})}catch(R){}return{token:i.accessToken,expiration:O}}catch(i){return P(l),l}};var k=c(_(),1),Z=c(C(),1),A=!1,$=async({ssoStartUrl:e,ssoSession:o,ssoAccountId:r,ssoRegion:t,ssoRoleName:n,ssoClient:a,clientConfig:f,parentClientConfig:p,callerClientConfig:S,profile:I,filepath:s,configFilepath:y,ignoreCache:E,logger:l})=>{let i,O="To refresh this SSO session run aws sso login with the corresponding profile.";if(o)try{let w=await Q({profile:I,filepath:s,configFilepath:y,ignoreCache:E})();i={accessToken:w.token,expiresAt:new Date(w.expiration).toISOString()}}catch(w){throw new k.CredentialsProviderError(w.message,{tryNextLink:A,logger:l})}else try{i=await Z.getSSOTokenFromFile(e)}catch(w){throw new k.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:A,logger:l})}if(new Date(i.expiresAt).getTime()-Date.now()<=0)throw new k.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:A,logger:l});let{accessToken:R}=i,{SSOClient:d,GetRoleCredentialsCommand:N}=await import("./chunk-6zcqa5fz.js"),se=a||new d(Object.assign({},f??{},{logger:f?.logger??S?.logger??p?.logger,region:f?.region??t,userAgentAppId:f?.userAgentAppId??S?.userAgentAppId??p?.userAgentAppId})),L;try{L=await se.send(new N({accountId:r,roleName:n,accessToken:R}))}catch(w){throw new k.CredentialsProviderError(w,{tryNextLink:A,logger:l})}let{roleCredentials:{accessKeyId:M,secretAccessKey:G,sessionToken:K,expiration:b,credentialScope:H,accountId:U}={}}=L;if(!M||!G||!K||!b)throw new k.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:A,logger:l});let v={accessKeyId:M,secretAccessKey:G,sessionToken:K,expiration:new Date(b),...H&&{credentialScope:H},...U&&{accountId:U}};if(o)D.setCredentialFeature(v,"CREDENTIALS_SSO","s");else D.setCredentialFeature(v,"CREDENTIALS_SSO_LEGACY","u");return v};var ee=c(_(),1),oe=(e,o)=>{let{sso_start_url:r,sso_account_id:t,sso_region:n,sso_role_name:a}=e;if(!r||!t||!n||!a)throw new ee.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}
3
3
  Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:o});return e};var Ce=(e={})=>async({callerClientConfig:o}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:r,ssoAccountId:t,ssoRegion:n,ssoRoleName:a,ssoSession:f}=e,{ssoClient:p}=e,S=T.getProfileName({profile:e.profile??o?.profile});if(!r&&!t&&!n&&!a&&!f){let s=(await T.parseKnownFiles(e))[S];if(!s)throw new x.CredentialsProviderError(`Profile ${S} was not found.`,{logger:e.logger});if(!q(s))throw new x.CredentialsProviderError(`Profile ${S} is not configured with SSO credentials.`,{logger:e.logger});if(s?.sso_session){let d=(await T.loadSsoSessionData(e))[s.sso_session],N=` configurations in profile ${S} and sso-session ${s.sso_session}`;if(n&&n!==d.sso_region)throw new x.CredentialsProviderError("Conflicting SSO region"+N,{tryNextLink:!1,logger:e.logger});if(r&&r!==d.sso_start_url)throw new x.CredentialsProviderError("Conflicting SSO start_url"+N,{tryNextLink:!1,logger:e.logger});s.sso_region=d.sso_region,s.sso_start_url=d.sso_start_url}let{sso_start_url:y,sso_account_id:E,sso_region:l,sso_role_name:i,sso_session:O}=oe(s,e.logger);return $({ssoStartUrl:y,ssoSession:O,ssoAccountId:E,ssoRegion:l,ssoRoleName:i,ssoClient:p,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:S,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}else if(!r||!t||!n||!a)throw new x.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return $({ssoStartUrl:r,ssoSession:f,ssoAccountId:t,ssoRegion:n,ssoRoleName:a,ssoClient:p,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:S,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})};export{oe as validateSsoProfile,q as isSsoProfile,Ce as fromSSO};
4
4
 
5
- //# debugId=C211E4F3130C79C664756E2164756E21
5
+ //# debugId=9CAEE0B79A00F7A164756E2164756E21
@@ -15,6 +15,6 @@
15
15
  "import { CredentialsProviderError } from \"@smithy/property-provider\";\nexport const validateSsoProfile = (profile, logger) => {\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;\n if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {\n throw new CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters \"sso_account_id\", ` +\n `\"sso_region\", \"sso_role_name\", \"sso_start_url\". Got ${Object.keys(profile).join(\", \")}\\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });\n }\n return profile;\n};\n"
16
16
  ],
17
17
  "mappings": ";8NAAA,SACA,KCDO,FAAM,JAAe,CAAC,IAAQ,IAChC,OAAO,EAAI,gBAAkB,UAC1B,OAAO,EAAI,iBAAmB,UAC9B,OAAO,EAAI,cAAgB,UAC3B,OAAO,EAAI,aAAe,UAC1B,OAAO,EAAI,gBAAkB,UCLrC,gBCAA,eACA,WCDO,IAAM,EAAmB,OACnB,EAAkB,kFCDxB,IAAM,EAAmB,MAAO,EAAW,EAAO,CAAC,EAAG,IAAuB,CAChF,IAAQ,iBAAkB,KAAa,yDACjC,EAAW,CAAC,IAAS,EAAK,eAAe,IAAS,EAAK,qBAAqB,IAAS,IAAqB,GAMhH,OALsB,IAAI,EAAc,OAAO,OAAO,CAAC,EAAG,EAAK,cAAgB,CAAC,EAAG,CAC/E,OAAQ,GAAa,EAAK,cAAc,OACxC,OAAQ,EAAS,QAAQ,EACzB,eAAgB,EAAS,gBAAgB,CAC7C,CAAC,CAAC,GCNC,IAAM,EA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I,2BAAyB,yBAA2B,EAAa,CACvE,YAAa,GACb,OAAQ,EAAK,MACjB,CAAC,EAEL,GAAI,GAAe,IAAgB,EAAQ,cACvC,MAAM,IAAI,2BAAyB,4BAA8B,EAAa,CAC1E,YAAa,GACb,OAAQ,EAAK,MACjB,CAAC,EAEL,EAAQ,WAAa,EAAQ,WAC7B,EAAQ,cAAgB,EAAQ,cAEpC,IAAQ,gBAAe,iBAAgB,aAAY,gBAAe,eAAgB,GAAmB,EAAS,EAAK,MAAM,EACzH,OAAO,EAAsB,CACzB,YAAa,EACb,WAAY,EACZ,aAAc,EACd,UAAW,EACX,YAAa,EACb,UAAW,EACX,aAAc,EAAK,aACnB,mBAAoB,EAAK,mBACzB,mBAAoB,EAAK,mBACzB,QAAS,EACT,SAAU,EAAK,SACf,eAAgB,EAAK,eACrB,YAAa,EAAK,YAClB,OAAQ,EAAK,MACjB,CAAC,EAEA,QAAI,CAAC,GAAe,CAAC,GAAgB,CAAC,GAAa,CAAC,EACrD,MAAM,IAAI,2BAAyB,+HAC8B,CAAE,YAAa,GAAO,OAAQ,EAAK,MAAO,CAAC,EAG5G,YAAO,EAAsB,CACzB,cACA,aACA,eACA,YACA,cACA,YACA,aAAc,EAAK,aACnB,mBAAoB,EAAK,mBACzB,mBAAoB,EAAK,mBACzB,QAAS,EACT,SAAU,EAAK,SACf,eAAgB,EAAK,eACrB,YAAa,EAAK,YAClB,OAAQ,EAAK,MACjB,CAAC",
18
- "debugId": "C211E4F3130C79C664756E2164756E21",
18
+ "debugId": "9CAEE0B79A00F7A164756E2164756E21",
19
19
  "names": []
20
20
  }
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Da as w,Ea as P,Fa as R,Ga as b}from"./chunk-v2fd69at.js";import{Ja as K,Ka as _,La as L,Ma as A}from"./chunk-hke4hzfm.js";import{Na as I}from"./chunk-0cckwd91.js";import{Oa as T,Pa as E}from"./chunk-1tc6j8bn.js";var i=["gemi","gemi/client","gemi/http","gemi/app","gemi/facades","gemi/email","gemi/kernel","gemi/services","gemi/i18n","gemi/dictionary"];function O(q){return q==="gemi"||q.startsWith("gemi/")}import{parseAstAsync as h}from"vite";var V="virtual:gemi-dict/",x="\x00virtual:gemi-dict/",f=new Set(["gemi/dictionary","gemi/client","gemi/i18n"]),y="gemi/dictionary";function B(){let q=new Map;return{name:"gemi-plugin-dictionary",enforce:"post",resolveId(H){if(H.startsWith(V))return`\x00${H}`;return null},async load(H){if(!H.startsWith(x))return null;let Q=H.slice(x.length),W=Q.lastIndexOf("/"),J=Q.slice(0,W),Y=Q.slice(W+1),$=q.get(J);if(!$){let M=g(J);if(M){try{await this.load({id:M})}catch{}$=q.get(J)}}if(!$)return this.error(`No dictionary registered for "${J}". If this persists, restart the dev server.`),null;let G=_($.translations,Y,$.locales);return`export default ${JSON.stringify(G)};
2
+ import{Da as w,Ea as P,Fa as R,Ga as b}from"./chunk-v2fd69at.js";import{Ja as K,Ka as _,La as L,Ma as A}from"./chunk-hke4hzfm.js";import{Na as I}from"./chunk-0cckwd91.js";import{Oa as T,Pa as E}from"./chunk-zzs96hc8.js";var i=["gemi","gemi/client","gemi/http","gemi/app","gemi/facades","gemi/email","gemi/kernel","gemi/services","gemi/i18n","gemi/dictionary"];function O(q){return q==="gemi"||q.startsWith("gemi/")}import{parseAstAsync as h}from"vite";var V="virtual:gemi-dict/",x="\x00virtual:gemi-dict/",f=new Set(["gemi/dictionary","gemi/client","gemi/i18n"]),y="gemi/dictionary";function B(){let q=new Map;return{name:"gemi-plugin-dictionary",enforce:"post",resolveId(H){if(H.startsWith(V))return`\x00${H}`;return null},async load(H){if(!H.startsWith(x))return null;let Q=H.slice(x.length),W=Q.lastIndexOf("/"),J=Q.slice(0,W),Y=Q.slice(W+1),$=q.get(J);if(!$){let M=g(J);if(M){try{await this.load({id:M})}catch{}$=q.get(J)}}if(!$)return this.error(`No dictionary registered for "${J}". If this persists, restart the dev server.`),null;let G=_($.translations,Y,$.locales);return`export default ${JSON.stringify(G)};
3
3
  `},async transform(H,Q){if(!H.includes("defineDictionary"))return null;if(Q.startsWith("\x00")||Q.includes("/node_modules/"))return null;let W=await h(H),J=new Set;for(let Z of W.body){if(Z.type!=="ImportDeclaration")continue;if(!f.has(Z.source?.value))continue;for(let z of Z.specifiers??[])if(z.type==="ImportSpecifier"&&z.imported?.name==="defineDictionary")J.add(z.local.name)}let Y=[],$=0;if(X(W,(Z)=>{if(Z.type!=="CallExpression")return;let z=Z.callee;if(z?.type==="Identifier"&&J.has(z.name)){Y.push(Z);return}if((z?.type==="Identifier"?z.name:z?.type==="MemberExpression"&&!z.computed?z.property?.name:void 0)==="defineDictionary")$++}),$>0&&p(W,"defineDictionary"))$=0;if($>0)this.warn(`${Q}: ${$} defineDictionary() call(s) could not be traced to an import of "gemi/dictionary", "gemi/client" or "gemi/i18n", so their locales were left inline and will all ship to the browser. Import defineDictionary directly by name rather than through a namespace import or a local re-export.`);if(Y.length===0)return null;let G=new T(H),M=!1;for(let Z of Y){if(Z.arguments?.length<1||Z.arguments?.length>2)this.error({message:"defineDictionary() takes an object literal and an optional options object.",pos:Z.start});let z=m(Z.arguments[0],(j)=>this.error({message:j,pos:Z.arguments[0]?.start??Z.start})),F=v(Z.arguments[1],(j)=>this.error({message:j,pos:Z.arguments[1]?.start??Z.start})),D=A(z),C=`${Buffer.from(Q).toString("base64url")}/${D}`,N=K(z,F);if(N.length===0)this.error({message:'defineDictionary() declares no locales \u2014 every key needs at least one "<locale>": "<string>" entry.',pos:Z.start});if(!F){let j=L(z);if(j)this.error({message:`defineDictionary() cannot infer a source language. Key "${j.againstKey}" lists "${j.againstFirst}" first but "${j.key}" lists "${j.first}" first, so the locale every key falls back to depends on the order `+"they are written in \u2014 moving one key would change what language a reader sees. "+'Pass { sourceLocale: "<locale>" } as the second argument to pin it.',pos:Z.start})}q.set(C,{id:D,locales:N,translations:z});let S=N.map((j)=>`${JSON.stringify(j)}:()=>import(${JSON.stringify(`${V}${C}/${j}`)})`).join(",");G.overwrite(Z.start,Z.end,`__gemi_dict__(${JSON.stringify(D)},{${S}})`),M=!0}if(!M)return null;return G.append(`
4
4
  import { __gemi_dict__ } from ${JSON.stringify(y)};
5
5
  `),{code:G.toString(),map:G.generateMap({hires:!0})}}}}function g(q){let H=q.indexOf("/");if(H===-1)return null;try{return Buffer.from(q.slice(0,H),"base64url").toString("utf8")}catch{return null}}function m(q,H){if(q?.type!=="ObjectExpression")H("defineDictionary() needs an inline object literal \u2014 it is read at build time, so a variable or spread cannot be resolved.");let Q={};for(let W of q.properties){let J=U(W);if(J===null)H("defineDictionary() keys must be plain string keys \u2014 computed keys and spreads cannot be read at build time.");if(W.value?.type!=="ObjectExpression")H(`defineDictionary() entry "${J}" must be an object of "<locale>": "<string>" pairs.`);let Y={};for(let $ of W.value.properties){let G=U($);if(G===null)H(`defineDictionary() entry "${J}" has a locale key that cannot be read at build time.`);let M=$.value;if(M?.type!=="Literal"||typeof M.value!=="string")H(`defineDictionary() entry "${J}" locale "${G}" must be a string literal. Use {{param}} interpolation instead of a template literal or a function.`);Y[G]=M.value}Q[J]=Y}return Q}function v(q,H){if(q===void 0)return;if(q.type!=="ObjectExpression")H("defineDictionary() options must be an inline object literal \u2014 it is read at build time.");for(let Q of q.properties){if(U(Q)!=="sourceLocale")continue;let W=Q.value;if(W?.type!=="Literal"||typeof W.value!=="string")H("defineDictionary() sourceLocale must be a string literal.");return W.value}return}function p(q,H){let Q=!1;return X(q,(W)=>{if(Q)return;if(W.type==="FunctionDeclaration"&&W.id?.name===H)Q=!0;if(W.type==="VariableDeclarator"&&W.id?.name===H)Q=!0}),Q}function U(q){if(q?.type!=="Property"||q.computed)return null;if(q.key?.type==="Identifier")return q.key.name;if(q.key?.type==="Literal"&&typeof q.key.value==="string")return q.key.value;return null}function X(q,H){if(q===null||typeof q!=="object")return;if(Array.isArray(q)){for(let Q of q)X(Q,H);return}if(typeof q.type==="string")H(q);for(let Q of Object.keys(q)){if(Q==="parent")continue;let W=q[Q];if(W&&typeof W==="object")X(W,H)}}import{mkdir as u,writeFile as c}from"fs/promises";import{dirname as r,join as t}from"path";function k(q){let H;return{name:"gemi-plugin-asset-base",config:(Q,W)=>W.command==="build"&&q?{base:q}:void 0,configResolved(Q){H=Q},async writeBundle(Q){if(!H||H.command!=="build"||H.build.ssr||!Q.dir)return;let W=t(Q.dir,P);await u(r(W),{recursive:!0}),await c(W,`${JSON.stringify({assetBase:d(H.base)})}