@kyro-cms/core 0.13.5 → 0.13.7

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 (325) hide show
  1. package/dist/api-handler-graphql.cjs +1 -1
  2. package/dist/api-handler-graphql.js +2 -2
  3. package/dist/api-handler-trpc.cjs +1 -1
  4. package/dist/api-handler-trpc.js +2 -2
  5. package/dist/api-handler.cjs +1 -1
  6. package/dist/api-handler.js +1 -1
  7. package/dist/auth-session-4WJUKESW.js +1 -0
  8. package/dist/auth-session-VHUHDBCL.cjs +1 -0
  9. package/dist/bootstrap-JYAUQ52D.cjs +1 -0
  10. package/dist/bootstrap-TTMLNQM3.js +1 -0
  11. package/dist/chunk-23RSKVJP.cjs +1 -0
  12. package/dist/chunk-24W5I6SJ.cjs +2 -0
  13. package/dist/{chunk-CH4TZZI5.js → chunk-2I2AXTKY.cjs} +38 -39
  14. package/dist/chunk-34LCWI5X.cjs +1 -0
  15. package/dist/chunk-3A5UO6OQ.cjs +114 -0
  16. package/dist/chunk-3N34WXBS.js +2 -0
  17. package/dist/chunk-3RIGRHON.js +109 -0
  18. package/dist/chunk-5BUAWCU6.js +91 -0
  19. package/dist/{chunk-7NKNSRCB.cjs → chunk-5I3BM5TV.js} +33 -32
  20. package/dist/chunk-5RBGM5N5.js +3 -0
  21. package/dist/chunk-7EY3GXRA.js +2 -0
  22. package/dist/chunk-7KTPBTH5.cjs +1 -0
  23. package/dist/chunk-A7763NCF.cjs +19 -0
  24. package/dist/chunk-AQWTJGML.cjs +1 -0
  25. package/dist/chunk-DCFOVCJX.cjs +1 -0
  26. package/dist/chunk-DCKJT247.cjs +1 -0
  27. package/dist/chunk-EG4SRTYS.cjs +2 -0
  28. package/dist/chunk-FAG2645P.js +2 -0
  29. package/dist/chunk-FIVTKI25.cjs +3 -0
  30. package/dist/chunk-FU76HURF.cjs +1 -0
  31. package/dist/chunk-GS4CMYKS.cjs +1 -0
  32. package/dist/chunk-GTAKGVUY.js +2 -0
  33. package/dist/chunk-GWUHIIPO.cjs +132 -0
  34. package/dist/chunk-H2IJDTA2.cjs +1 -0
  35. package/dist/chunk-HCM2G674.cjs +20 -0
  36. package/dist/chunk-I22MSXGL.js +2 -0
  37. package/dist/chunk-IIPSXKNV.js +115 -0
  38. package/dist/{chunk-WNU76M2C.js → chunk-IIVBEZC2.js} +6 -6
  39. package/dist/chunk-JHFD3IAU.cjs +1 -0
  40. package/dist/chunk-JJY2F6NL.cjs +3 -0
  41. package/dist/chunk-JQ4V2MGJ.cjs +2 -0
  42. package/dist/chunk-JXJTFBHG.js +3 -0
  43. package/dist/chunk-KOSR7235.cjs +1 -0
  44. package/dist/chunk-KUY4QDAL.js +2 -0
  45. package/dist/chunk-LGUHXOEW.js +3 -0
  46. package/dist/chunk-LXTVMP5F.cjs +6 -0
  47. package/dist/chunk-MCK2QRAU.cjs +4 -0
  48. package/dist/chunk-N2BMGZIX.cjs +90 -0
  49. package/dist/chunk-N7CDHWQH.cjs +2 -0
  50. package/dist/chunk-NGNXOXI5.js +2 -0
  51. package/dist/chunk-O2SA56P2.cjs +108 -0
  52. package/dist/chunk-O4PPZOVI.cjs +1 -0
  53. package/dist/chunk-O4RKZQYQ.js +2 -0
  54. package/dist/chunk-O6I26T6A.js +3 -0
  55. package/dist/chunk-OJBL4CXK.cjs +2 -0
  56. package/dist/chunk-OPKZYQV7.js +3 -0
  57. package/dist/chunk-OXEJCIOA.cjs +1 -0
  58. package/dist/chunk-OXH6CANN.js +2 -0
  59. package/dist/chunk-PPGZHOYR.cjs +1 -0
  60. package/dist/{chunk-EQN3HDES.cjs → chunk-PW6Y5MQL.cjs} +5 -5
  61. package/dist/chunk-RLW6AQF2.js +2 -0
  62. package/dist/chunk-SBFVITY2.js +7 -0
  63. package/dist/chunk-SEJ7LMYY.js +4 -0
  64. package/dist/chunk-SYE3OS5T.js +5 -0
  65. package/dist/chunk-SZY25KAE.js +21 -0
  66. package/dist/chunk-TJ6N5ZPZ.js +133 -0
  67. package/dist/chunk-TVWHTVLI.js +2 -0
  68. package/dist/chunk-UE7DTBD7.cjs +1 -0
  69. package/dist/chunk-V2RMDMWN.js +2 -0
  70. package/dist/chunk-V4SR7DU5.js +3 -0
  71. package/dist/chunk-VLFM66BZ.js +4 -0
  72. package/dist/chunk-VPBGZW4P.cjs +1 -0
  73. package/dist/chunk-W5GDZG64.js +2 -0
  74. package/dist/chunk-WLSVS3NC.js +2 -0
  75. package/dist/chunk-XL64URKD.cjs +2 -0
  76. package/dist/chunk-YNBJGPIU.js +2 -0
  77. package/dist/chunk-YNSKDTFG.js +2 -0
  78. package/dist/chunk-YOJOVQIH.cjs +1 -0
  79. package/dist/chunk-ZE2X3FBU.js +20 -0
  80. package/dist/chunk-ZMH35QYG.js +2 -0
  81. package/dist/cli/index.cjs +53 -182
  82. package/dist/cli/index.js +54 -183
  83. package/dist/drizzle/index.cjs +1 -1
  84. package/dist/drizzle/index.js +1 -1
  85. package/dist/fields/index.cjs +1 -1
  86. package/dist/fields/index.js +1 -1
  87. package/dist/graphql/index.cjs +1 -1
  88. package/dist/graphql/index.js +1 -1
  89. package/dist/index-B_39z2jP.d.cts +217 -0
  90. package/dist/index-xqpVL2Zq.d.ts +217 -0
  91. package/dist/index.cjs +30 -30
  92. package/dist/index.d.cts +2 -31
  93. package/dist/index.d.ts +2 -31
  94. package/dist/index.js +31 -31
  95. package/dist/integration.cjs +1 -1
  96. package/dist/integration.js +1 -1
  97. package/dist/local-DKP43BWQ.cjs +1 -0
  98. package/dist/local-TF5ZMHWW.js +1 -0
  99. package/dist/media-M3EIZ4QS.cjs +1 -0
  100. package/dist/media-WYEILC6K.js +1 -0
  101. package/dist/mongo-auth-adapter-22MV3TI3.cjs +1 -0
  102. package/dist/mongo-auth-adapter-66PWVRZW.js +1 -0
  103. package/dist/mongodb/index.cjs +1 -1
  104. package/dist/mongodb/index.d.cts +3 -130
  105. package/dist/mongodb/index.d.ts +3 -130
  106. package/dist/mongodb/index.js +1 -1
  107. package/dist/nodemailer-transport-7F3VLLBW.js +1 -0
  108. package/dist/nodemailer-transport-WAPZD3SJ.cjs +1 -0
  109. package/dist/postgres-auth-adapter-7BCPXNBO.js +1 -0
  110. package/dist/postgres-auth-adapter-HMXFUM5W.cjs +1 -0
  111. package/dist/redis-adapter-2E5AWMMA.cjs +1 -0
  112. package/dist/redis-adapter-GFH74CF4.js +1 -0
  113. package/dist/rest/index.cjs +1 -1
  114. package/dist/rest/index.js +1 -1
  115. package/dist/schema-FNIDQKIJ.cjs +1 -0
  116. package/dist/schema-KD736QFN.js +1 -0
  117. package/dist/sqlite-adapter-HL53RLSN.cjs +1 -0
  118. package/dist/sqlite-adapter-TT6ZASDG.js +1 -0
  119. package/dist/templates/index.cjs +1 -1
  120. package/dist/templates/index.js +1 -1
  121. package/dist/trpc/index.cjs +1 -1
  122. package/dist/trpc/index.js +1 -1
  123. package/dist/ws/index.cjs +1 -1
  124. package/dist/ws/index.js +1 -1
  125. package/package.json +2 -10
  126. package/dist/WebhookService-CGxHtw7E.d.cts +0 -143
  127. package/dist/WebhookService-CNC1lYz7.d.ts +0 -143
  128. package/dist/auth-session-DHVGXHOH.cjs +0 -1
  129. package/dist/auth-session-O7IIH7EP.js +0 -1
  130. package/dist/base-A9AJPCG5.d.ts +0 -219
  131. package/dist/base-C6wyX2nC.d.cts +0 -219
  132. package/dist/bcryptjs-WIQSWJGK.cjs +0 -1
  133. package/dist/bcryptjs-ZEEHSMAG.js +0 -2
  134. package/dist/better-sqlite3-5IISPX34.cjs +0 -1
  135. package/dist/better-sqlite3-B34RIU4C.js +0 -2
  136. package/dist/bootstrap-PG2LGDLB.js +0 -1
  137. package/dist/bootstrap-YD3GLTWX.cjs +0 -1
  138. package/dist/bowser-SB3ZUPO4.js +0 -11
  139. package/dist/bowser-VX6B6ZSE.cjs +0 -10
  140. package/dist/chokidar-5RVQZVHP.cjs +0 -5
  141. package/dist/chokidar-BOYGRT4Q.js +0 -6
  142. package/dist/chunk-262YP5XA.cjs +0 -1
  143. package/dist/chunk-2HA6EKXX.js +0 -24
  144. package/dist/chunk-2SPWRQ5O.js +0 -122
  145. package/dist/chunk-2TYITUOC.js +0 -122
  146. package/dist/chunk-35PGCW3S.cjs +0 -1
  147. package/dist/chunk-3CIMGC2F.cjs +0 -56
  148. package/dist/chunk-3KZXF4US.js +0 -2
  149. package/dist/chunk-3NSZZCOJ.js +0 -2
  150. package/dist/chunk-3TAUNYEM.js +0 -8
  151. package/dist/chunk-3VXEK5ZW.cjs +0 -1
  152. package/dist/chunk-47CXBWMA.js +0 -2
  153. package/dist/chunk-4BMWWGJN.js +0 -384
  154. package/dist/chunk-4NTIK6DF.cjs +0 -2
  155. package/dist/chunk-6E44MQQ5.js +0 -115
  156. package/dist/chunk-6LWF5MPL.js +0 -20
  157. package/dist/chunk-6NBZDW53.js +0 -133
  158. package/dist/chunk-6TPICJ2L.js +0 -7
  159. package/dist/chunk-6YS6XLOD.cjs +0 -121
  160. package/dist/chunk-73D2PNHD.cjs +0 -7
  161. package/dist/chunk-7ACHOBWY.cjs +0 -13
  162. package/dist/chunk-7GGZA5YU.cjs +0 -2
  163. package/dist/chunk-7JWQ2PZP.cjs +0 -1
  164. package/dist/chunk-7KLEANTO.cjs +0 -1
  165. package/dist/chunk-7MNDQU6K.js +0 -8
  166. package/dist/chunk-7NH7H3WA.js +0 -10
  167. package/dist/chunk-7WMMKGEO.cjs +0 -1
  168. package/dist/chunk-ALTU3FDG.js +0 -2
  169. package/dist/chunk-BAVN7VDR.cjs +0 -1
  170. package/dist/chunk-BCEE4NBZ.cjs +0 -2
  171. package/dist/chunk-BUNLC3II.cjs +0 -1
  172. package/dist/chunk-C7QCZX7X.js +0 -2
  173. package/dist/chunk-D6SDGHY6.js +0 -2
  174. package/dist/chunk-DVWYO3KK.cjs +0 -1
  175. package/dist/chunk-EHWUALGH.cjs +0 -1
  176. package/dist/chunk-EML5FDUU.js +0 -2
  177. package/dist/chunk-EN65ZEK2.cjs +0 -2
  178. package/dist/chunk-EW424IBO.cjs +0 -1
  179. package/dist/chunk-EZIDQBXI.cjs +0 -1
  180. package/dist/chunk-F2O4QO5N.cjs +0 -383
  181. package/dist/chunk-F4ITQ6XQ.cjs +0 -3
  182. package/dist/chunk-FK2BG4HU.js +0 -3
  183. package/dist/chunk-FLMUMPDE.js +0 -2
  184. package/dist/chunk-GIS6X43A.cjs +0 -3
  185. package/dist/chunk-GNEVCEJU.cjs +0 -3
  186. package/dist/chunk-GNOSG3PK.cjs +0 -1
  187. package/dist/chunk-GQGFNTDZ.js +0 -2
  188. package/dist/chunk-GTR7JAKP.cjs +0 -3
  189. package/dist/chunk-HPIJI7TM.js +0 -3
  190. package/dist/chunk-HPYH7GTS.cjs +0 -1
  191. package/dist/chunk-HRAY65XH.js +0 -3
  192. package/dist/chunk-HTYVI2HK.cjs +0 -9
  193. package/dist/chunk-IKGVPXMK.js +0 -3
  194. package/dist/chunk-J6V573PE.cjs +0 -1
  195. package/dist/chunk-JA44K75G.js +0 -2
  196. package/dist/chunk-JRUQ5ABB.js +0 -4
  197. package/dist/chunk-JV4HJBXW.js +0 -14
  198. package/dist/chunk-KEITOXIP.js +0 -2
  199. package/dist/chunk-KMFLHGD5.cjs +0 -1
  200. package/dist/chunk-KZHXYXSH.cjs +0 -10
  201. package/dist/chunk-L3Q64RUX.js +0 -3
  202. package/dist/chunk-LEBM6ZSZ.cjs +0 -10
  203. package/dist/chunk-LKRI5X2V.cjs +0 -1
  204. package/dist/chunk-LQ3YZTPU.cjs +0 -15
  205. package/dist/chunk-LVBHOZZF.js +0 -4
  206. package/dist/chunk-LWM4WABU.js +0 -3
  207. package/dist/chunk-LY7N3UHH.cjs +0 -23
  208. package/dist/chunk-MCIZG4A3.cjs +0 -1
  209. package/dist/chunk-MDLJTZLV.cjs +0 -1
  210. package/dist/chunk-N4FXLQE3.cjs +0 -132
  211. package/dist/chunk-N5POANYV.js +0 -2
  212. package/dist/chunk-NGNJSUGL.cjs +0 -1
  213. package/dist/chunk-NRE6VKL6.cjs +0 -121
  214. package/dist/chunk-O4YE57OS.cjs +0 -6
  215. package/dist/chunk-OBYAIJVU.js +0 -11
  216. package/dist/chunk-OLRCZ6E3.js +0 -2
  217. package/dist/chunk-OOVNTOZC.cjs +0 -56
  218. package/dist/chunk-P6JITOFF.js +0 -4
  219. package/dist/chunk-PITMDQYN.cjs +0 -18
  220. package/dist/chunk-PYUWSKKP.js +0 -57
  221. package/dist/chunk-Q5TFO66G.cjs +0 -1
  222. package/dist/chunk-QO5ZWQA3.cjs +0 -74
  223. package/dist/chunk-QYN6C3FZ.cjs +0 -114
  224. package/dist/chunk-REQ622YC.js +0 -3
  225. package/dist/chunk-RPRGGGIW.js +0 -11
  226. package/dist/chunk-RVBSJ4UQ.cjs +0 -7
  227. package/dist/chunk-RYHOWZLK.js +0 -2
  228. package/dist/chunk-RYXLEFS5.js +0 -2
  229. package/dist/chunk-SBNMXQNO.cjs +0 -2
  230. package/dist/chunk-SLMIYECU.js +0 -2
  231. package/dist/chunk-SRIXRJHL.js +0 -4
  232. package/dist/chunk-TBHNE4VV.js +0 -2
  233. package/dist/chunk-TCFL3UWT.cjs +0 -2
  234. package/dist/chunk-TYQYKKWJ.js +0 -16
  235. package/dist/chunk-U6KFONKM.js +0 -2
  236. package/dist/chunk-UNYXWPLZ.cjs +0 -2
  237. package/dist/chunk-UWHWSWDE.js +0 -2
  238. package/dist/chunk-V4FAL7AG.js +0 -2
  239. package/dist/chunk-VQ53TFYA.cjs +0 -1
  240. package/dist/chunk-VRZC4TTF.cjs +0 -1
  241. package/dist/chunk-W45TLOOT.js +0 -2
  242. package/dist/chunk-WAVGRSE6.js +0 -2
  243. package/dist/chunk-WPM6LFCY.js +0 -2
  244. package/dist/chunk-WXT2XW7T.js +0 -13
  245. package/dist/chunk-X473JI7Z.js +0 -75
  246. package/dist/chunk-X6HUA6EF.cjs +0 -20
  247. package/dist/chunk-XDPLVJRO.js +0 -21
  248. package/dist/chunk-XDQVYCIR.cjs +0 -1
  249. package/dist/chunk-XFYSADHV.cjs +0 -2
  250. package/dist/chunk-XOR64WUQ.cjs +0 -19
  251. package/dist/chunk-Y2YAKDEQ.js +0 -2
  252. package/dist/chunk-YENNL5HG.js +0 -2
  253. package/dist/chunk-YGI5W4RS.js +0 -2
  254. package/dist/chunk-YIFKTA5N.js +0 -57
  255. package/dist/chunk-YUUXFD73.js +0 -19
  256. package/dist/chunk-ZAKYTBEN.js +0 -3
  257. package/dist/chunk-ZHA446FA.cjs +0 -1
  258. package/dist/chunk-ZTLGK6R4.cjs +0 -12
  259. package/dist/chunk-ZUBJ6RLQ.cjs +0 -1
  260. package/dist/client.d.cts +0 -1291
  261. package/dist/client.d.ts +0 -1291
  262. package/dist/d1-5ZQJOFDX.cjs +0 -1
  263. package/dist/d1-HPB6B253.js +0 -2
  264. package/dist/dist-es-3SSNUZST.cjs +0 -1
  265. package/dist/dist-es-64F22JL2.js +0 -2
  266. package/dist/dist-es-A5OF2STN.cjs +0 -2
  267. package/dist/dist-es-BOW5V247.cjs +0 -6
  268. package/dist/dist-es-CRIMATLL.cjs +0 -2
  269. package/dist/dist-es-DL3VLVP6.cjs +0 -1
  270. package/dist/dist-es-F2ZR55UK.js +0 -4
  271. package/dist/dist-es-IPSSZNFP.js +0 -1
  272. package/dist/dist-es-M2F7M27Y.js +0 -2
  273. package/dist/dist-es-M66JKZF5.js +0 -7
  274. package/dist/dist-es-OKLLRYI3.js +0 -2
  275. package/dist/dist-es-P25IKLBI.cjs +0 -1
  276. package/dist/dist-es-SRPWSAF4.cjs +0 -1
  277. package/dist/dist-es-SVHZDVUF.js +0 -3
  278. package/dist/dist-es-T2H2W5BX.cjs +0 -3
  279. package/dist/dist-es-WFI55HKT.js +0 -3
  280. package/dist/drizzle-orm-47ELDEM6.cjs +0 -1
  281. package/dist/drizzle-orm-XRTSOQJS.js +0 -1
  282. package/dist/event-streams-7NAWZW2I.js +0 -1
  283. package/dist/event-streams-JBMWCI2O.cjs +0 -1
  284. package/dist/fs-KWBRQ6T6.js +0 -1
  285. package/dist/fs-ZQYOJOIO.cjs +0 -1
  286. package/dist/index-NGnJpSgf.d.ts +0 -105
  287. package/dist/index-Zrg3sZ6R.d.cts +0 -105
  288. package/dist/jsonwebtoken-DFB6ZBZA.cjs +0 -8
  289. package/dist/jsonwebtoken-OD67R5JS.js +0 -9
  290. package/dist/lib-A2D63VXD.cjs +0 -1
  291. package/dist/lib-JQD2JAOO.js +0 -2
  292. package/dist/loadSso-JY4WDQPS.cjs +0 -2
  293. package/dist/loadSso-UQR6545M.js +0 -3
  294. package/dist/local-6UUGBZ4M.js +0 -1
  295. package/dist/local-ZYHV3J2K.cjs +0 -1
  296. package/dist/media-3Z6YW5J4.cjs +0 -1
  297. package/dist/media-E762GEHL.js +0 -1
  298. package/dist/mongo-auth-adapter-2H2AXDRH.cjs +0 -1
  299. package/dist/mongo-auth-adapter-YWMEOC42.js +0 -1
  300. package/dist/nodemailer-IDML4L6W.cjs +0 -53
  301. package/dist/nodemailer-NITB45SS.js +0 -54
  302. package/dist/nodemailer-transport-3VWVUBM5.cjs +0 -1
  303. package/dist/nodemailer-transport-7RHATUKL.js +0 -1
  304. package/dist/postgres-auth-adapter-QKBNXVPT.js +0 -1
  305. package/dist/postgres-auth-adapter-WMLM4UUC.cjs +0 -1
  306. package/dist/postgres-js-7YBZKGXG.cjs +0 -1
  307. package/dist/postgres-js-JLFIWOBH.js +0 -1
  308. package/dist/redis-adapter-EVK2SMKH.cjs +0 -1
  309. package/dist/redis-adapter-LY2NBSAG.js +0 -1
  310. package/dist/schema-RT6WSUYC.cjs +0 -1
  311. package/dist/schema-YFMSJK2P.js +0 -2
  312. package/dist/signin-N3T2KF5Q.js +0 -3
  313. package/dist/signin-VFBLX7EL.cjs +0 -2
  314. package/dist/sqlite-adapter-KPSISY6E.cjs +0 -1
  315. package/dist/sqlite-adapter-PI6SIY7O.js +0 -1
  316. package/dist/src-6LAUXXDM.cjs +0 -1
  317. package/dist/src-QBADSZV4.js +0 -1
  318. package/dist/sso-oidc-54BIRYR6.cjs +0 -2
  319. package/dist/sso-oidc-UB7G4END.js +0 -3
  320. package/dist/sts-WAA6I22C.js +0 -3
  321. package/dist/sts-YLXXIB3X.cjs +0 -2
  322. package/dist/types-BCOhfwHC.d.ts +0 -839
  323. package/dist/types-DxaK39ix.d.cts +0 -330
  324. package/dist/types-DxaK39ix.d.ts +0 -330
  325. package/dist/types-QglJ7PwT.d.cts +0 -839
@@ -1 +0,0 @@
1
- 'use strict';var chunkDVWYO3KK_cjs=require('./chunk-DVWYO3KK.cjs'),chunk7ACHOBWY_cjs=require('./chunk-7ACHOBWY.cjs'),chunkGNOSG3PK_cjs=require('./chunk-GNOSG3PK.cjs'),chunkBCEE4NBZ_cjs=require('./chunk-BCEE4NBZ.cjs'),chunkVRZC4TTF_cjs=require('./chunk-VRZC4TTF.cjs'),chunkBUNLC3II_cjs=require('./chunk-BUNLC3II.cjs');chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var f=class extends chunkDVWYO3KK_cjs.c{constructor(t,s,r,e={}){super(s),this.client=t,this.schema=r,this.options=e,this.logger=e.logger??new chunkBCEE4NBZ_cjs.aa,this.cache=e.cache??new chunkGNOSG3PK_cjs.d;}static[chunkVRZC4TTF_cjs.a]="SQLiteD1Session";logger;cache;prepareQuery(t,s,r,e,o,a,i){let n=this.client.prepare(t.sql);return new b(n,t,this.logger,this.cache,a,i,s,r,e,o)}async batch(t){let s=[],r=[];for(let o of t){let a=o._prepare(),i=a.getQuery();if(s.push(a),i.params.length>0)r.push(a.stmt.bind(...i.params));else {let n=a.getQuery();r.push(this.client.prepare(n.sql).bind(...n.params));}}return (await this.client.batch(r)).map((o,a)=>s[a].mapResult(o,true))}extractRawAllValueFromBatchResult(t){return t.results}extractRawGetValueFromBatchResult(t){return t.results[0]}extractRawValuesValueFromBatchResult(t){return g(t.results)}async transaction(t,s){let r=new w("async",this.dialect,this,this.schema);await this.run(chunkVRZC4TTF_cjs.J.raw(`begin${s?.behavior?" "+s.behavior:""}`));try{let e=await t(r);return await this.run(chunkVRZC4TTF_cjs.J`commit`),e}catch(e){throw await this.run(chunkVRZC4TTF_cjs.J`rollback`),e}}},w=class c extends chunkDVWYO3KK_cjs.d{static[chunkVRZC4TTF_cjs.a]="D1Transaction";async transaction(t){let s=`sp${this.nestedIndex}`,r=new c("async",this.dialect,this.session,this.schema,this.nestedIndex+1);await this.session.run(chunkVRZC4TTF_cjs.J.raw(`savepoint ${s}`));try{let e=await t(r);return await this.session.run(chunkVRZC4TTF_cjs.J.raw(`release savepoint ${s}`)),e}catch(e){throw await this.session.run(chunkVRZC4TTF_cjs.J.raw(`rollback to savepoint ${s}`)),e}}};function g(c){let t=[];for(let s of c){let r=Object.keys(s).map(e=>s[e]);t.push(r);}return t}var b=class extends chunkDVWYO3KK_cjs.b{constructor(t,s,r,e,o,a,i,n,l,d){super("async",n,s,e,o,a),this.logger=r,this._isResponseInArrayMode=l,this.customResultMapper=d,this.fields=i,this.stmt=t;}static[chunkVRZC4TTF_cjs.a]="D1PreparedQuery";customResultMapper;fields;stmt;async run(t){let s=chunkVRZC4TTF_cjs.M(this.query.params,t??{});return this.logger.logQuery(this.query.sql,s),await this.queryWithCache(this.query.sql,s,async()=>this.stmt.bind(...s).run())}async all(t){let{fields:s,query:r,logger:e,stmt:o,customResultMapper:a}=this;if(!s&&!a){let n=chunkVRZC4TTF_cjs.M(r.params,t??{});return e.logQuery(r.sql,n),await this.queryWithCache(r.sql,n,async()=>o.bind(...n).all().then(({results:l})=>this.mapAllResult(l)))}let i=await this.values(t);return this.mapAllResult(i)}mapAllResult(t,s){return s&&(t=g(t.results)),!this.fields&&!this.customResultMapper?t:this.customResultMapper?this.customResultMapper(t):t.map(r=>chunkVRZC4TTF_cjs.Q(this.fields,r,this.joinsNotNullableMap))}async get(t){let{fields:s,joinsNotNullableMap:r,query:e,logger:o,stmt:a,customResultMapper:i}=this;if(!s&&!i){let l=chunkVRZC4TTF_cjs.M(e.params,t??{});return o.logQuery(e.sql,l),await this.queryWithCache(e.sql,l,async()=>a.bind(...l).all().then(({results:d})=>d[0]))}let n=await this.values(t);if(n[0])return i?i(n):chunkVRZC4TTF_cjs.Q(s,n[0],r)}mapGetResult(t,s){return s&&(t=g(t.results)[0]),!this.fields&&!this.customResultMapper?t:this.customResultMapper?this.customResultMapper([t]):chunkVRZC4TTF_cjs.Q(this.fields,t,this.joinsNotNullableMap)}async values(t){let s=chunkVRZC4TTF_cjs.M(this.query.params,t??{});return this.logger.logQuery(this.query.sql,s),await this.queryWithCache(this.query.sql,s,async()=>this.stmt.bind(...s).raw())}isResponseInArrayMode(){return this._isResponseInArrayMode}};var R=class extends chunkDVWYO3KK_cjs.a{static[chunkVRZC4TTF_cjs.a]="D1Database";async batch(t){return this.session.batch(t)}};function z(c,t={}){let s=new chunk7ACHOBWY_cjs.i({casing:t.casing}),r;t.logger===true?r=new chunkBCEE4NBZ_cjs.$:t.logger!==false&&(r=t.logger);let e;if(t.schema){let i=chunkBCEE4NBZ_cjs.T(t.schema,chunkBCEE4NBZ_cjs.Y);e={fullSchema:t.schema,schema:i.tables,tableNamesMap:i.tableNamesMap};}let o=new f(c,s,e,{logger:r,cache:t.cache}),a=new R("async",s,o,e);return a.$client=c,a.$cache=t.cache,a.$cache&&(a.$cache.invalidate=t.cache?.onMutate),a}exports.D1PreparedQuery=b;exports.D1Transaction=w;exports.DrizzleD1Database=R;exports.SQLiteD1Session=f;exports.drizzle=z;
@@ -1,2 +0,0 @@
1
- import {c,d as d$1,b as b$1,a as a$1}from'./chunk-UWHWSWDE.js';import {i}from'./chunk-JV4HJBXW.js';import {d}from'./chunk-N5POANYV.js';import {aa,$,T,Y}from'./chunk-HRAY65XH.js';import {a,J,M,Q}from'./chunk-3NSZZCOJ.js';import {g as g$1}from'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
2
- g$1();g$1();g$1();var f=class extends c{constructor(t,s,r,e={}){super(s),this.client=t,this.schema=r,this.options=e,this.logger=e.logger??new aa,this.cache=e.cache??new d;}static[a]="SQLiteD1Session";logger;cache;prepareQuery(t,s,r,e,o,a,i){let n=this.client.prepare(t.sql);return new b(n,t,this.logger,this.cache,a,i,s,r,e,o)}async batch(t){let s=[],r=[];for(let o of t){let a=o._prepare(),i=a.getQuery();if(s.push(a),i.params.length>0)r.push(a.stmt.bind(...i.params));else {let n=a.getQuery();r.push(this.client.prepare(n.sql).bind(...n.params));}}return (await this.client.batch(r)).map((o,a)=>s[a].mapResult(o,true))}extractRawAllValueFromBatchResult(t){return t.results}extractRawGetValueFromBatchResult(t){return t.results[0]}extractRawValuesValueFromBatchResult(t){return g(t.results)}async transaction(t,s){let r=new w("async",this.dialect,this,this.schema);await this.run(J.raw(`begin${s?.behavior?" "+s.behavior:""}`));try{let e=await t(r);return await this.run(J`commit`),e}catch(e){throw await this.run(J`rollback`),e}}},w=class c extends d$1{static[a]="D1Transaction";async transaction(t){let s=`sp${this.nestedIndex}`,r=new c("async",this.dialect,this.session,this.schema,this.nestedIndex+1);await this.session.run(J.raw(`savepoint ${s}`));try{let e=await t(r);return await this.session.run(J.raw(`release savepoint ${s}`)),e}catch(e){throw await this.session.run(J.raw(`rollback to savepoint ${s}`)),e}}};function g(c){let t=[];for(let s of c){let r=Object.keys(s).map(e=>s[e]);t.push(r);}return t}var b=class extends b$1{constructor(t,s,r,e,o,a,i,n,l,d){super("async",n,s,e,o,a),this.logger=r,this._isResponseInArrayMode=l,this.customResultMapper=d,this.fields=i,this.stmt=t;}static[a]="D1PreparedQuery";customResultMapper;fields;stmt;async run(t){let s=M(this.query.params,t??{});return this.logger.logQuery(this.query.sql,s),await this.queryWithCache(this.query.sql,s,async()=>this.stmt.bind(...s).run())}async all(t){let{fields:s,query:r,logger:e,stmt:o,customResultMapper:a}=this;if(!s&&!a){let n=M(r.params,t??{});return e.logQuery(r.sql,n),await this.queryWithCache(r.sql,n,async()=>o.bind(...n).all().then(({results:l})=>this.mapAllResult(l)))}let i=await this.values(t);return this.mapAllResult(i)}mapAllResult(t,s){return s&&(t=g(t.results)),!this.fields&&!this.customResultMapper?t:this.customResultMapper?this.customResultMapper(t):t.map(r=>Q(this.fields,r,this.joinsNotNullableMap))}async get(t){let{fields:s,joinsNotNullableMap:r,query:e,logger:o,stmt:a,customResultMapper:i}=this;if(!s&&!i){let l=M(e.params,t??{});return o.logQuery(e.sql,l),await this.queryWithCache(e.sql,l,async()=>a.bind(...l).all().then(({results:d})=>d[0]))}let n=await this.values(t);if(n[0])return i?i(n):Q(s,n[0],r)}mapGetResult(t,s){return s&&(t=g(t.results)[0]),!this.fields&&!this.customResultMapper?t:this.customResultMapper?this.customResultMapper([t]):Q(this.fields,t,this.joinsNotNullableMap)}async values(t){let s=M(this.query.params,t??{});return this.logger.logQuery(this.query.sql,s),await this.queryWithCache(this.query.sql,s,async()=>this.stmt.bind(...s).raw())}isResponseInArrayMode(){return this._isResponseInArrayMode}};var R=class extends a$1{static[a]="D1Database";async batch(t){return this.session.batch(t)}};function E(c,t={}){let s=new i({casing:t.casing}),r;t.logger===true?r=new $:t.logger!==false&&(r=t.logger);let e;if(t.schema){let i=T(t.schema,Y);e={fullSchema:t.schema,schema:i.tables,tableNamesMap:i.tableNamesMap};}let o=new f(c,s,e,{logger:r,cache:t.cache}),a=new R("async",s,o,e);return a.$client=c,a.$cache=t.cache,a.$cache&&(a.$cache.invalidate=t.cache?.onMutate),a}export{b as D1PreparedQuery,w as D1Transaction,R as DrizzleD1Database,f as SQLiteD1Session,E as drizzle};
@@ -1 +0,0 @@
1
- 'use strict';var chunkLEBM6ZSZ_cjs=require('./chunk-LEBM6ZSZ.cjs'),chunkGNEVCEJU_cjs=require('./chunk-GNEVCEJU.cjs');require('./chunk-LQ3YZTPU.cjs');var chunkBUNLC3II_cjs=require('./chunk-BUNLC3II.cjs'),child_process=require('child_process'),util=require('util');chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var P=(r,e,o)=>{if(e.Version!==1)throw Error(`Profile ${r} credential_process did not return Version 1.`);if(e.AccessKeyId===void 0||e.SecretAccessKey===void 0)throw Error(`Profile ${r} credential_process returned invalid credentials.`);if(e.Expiration){let d=new Date;if(new Date(e.Expiration)<d)throw Error(`Profile ${r} credential_process returned expired credentials.`)}let t=e.AccountId;!t&&o?.[r]?.aws_account_id&&(t=o[r].aws_account_id);let n={accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,...e.SessionToken&&{sessionToken:e.SessionToken},...e.Expiration&&{expiration:new Date(e.Expiration)},...e.CredentialScope&&{credentialScope:e.CredentialScope},...t&&{accountId:t}};return chunkLEBM6ZSZ_cjs.b(n,"CREDENTIALS_PROCESS","w"),n};var m=async(r,e,o)=>{let t=e[r];if(e[r]){let n=t.credential_process;if(n!==void 0){let d=util.promisify(chunkGNEVCEJU_cjs.B?.getTokenRecord?.().exec??child_process.exec);try{let{stdout:c}=await d(n),a;try{a=JSON.parse(c.trim());}catch{throw Error(`Profile ${r} credential_process returned invalid JSON.`)}return P(r,a,e)}catch(c){throw new chunkGNEVCEJU_cjs.p(c.message,{logger:o})}}else throw new chunkGNEVCEJU_cjs.p(`Profile ${r} did not contain credential_process.`,{logger:o})}else throw new chunkGNEVCEJU_cjs.p(`Profile ${r} could not be found in shared credentials file.`,{logger:o})};var S=(r={})=>async({callerClientConfig:e}={})=>{r.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let o=await chunkGNEVCEJU_cjs.A(r);return m(chunkGNEVCEJU_cjs.v({profile:r.profile??e?.profile}),o,r.logger)};exports.fromProcess=S;
@@ -1,2 +0,0 @@
1
- import {b as b$1}from'./chunk-OBYAIJVU.js';import {A as A$1,v as v$1,p,r}from'./chunk-JRUQ5ABB.js';import'./chunk-TYQYKKWJ.js';import {g as g$1}from'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
2
- g$1();g$1();g$1();g$1();g$1();var v=(e,t,r$1)=>{let o={EcsContainer:async i=>{let{fromHttp:c}=await import('./dist-es-M66JKZF5.js'),{fromContainerMetadata:n}=await import('./dist-es-WFI55HKT.js');return r$1?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>r(c(i??{}),n(i))().then(C)},Ec2InstanceMetadata:async i=>{r$1?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:c}=await import('./dist-es-WFI55HKT.js');return async()=>c(i)().then(C)},Environment:async i=>{r$1?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:c}=await import('./dist-es-IPSSZNFP.js');return async()=>c(i)().then(C)}};if(e in o)return o[e];throw new p(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:r$1})},C=e=>b$1(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var R=(e,{profile:t="default",logger:r}={})=>!!e&&typeof e=="object"&&typeof e.role_arn=="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(N(e,{profile:t,logger:r})||j(e,{profile:t,logger:r})),N=(e,{profile:t,logger:r})=>{let o=typeof e.source_profile=="string"&&typeof e.credential_source>"u";return o&&r?.debug?.(` ${t} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`),o},j=(e,{profile:t,logger:r})=>{let o=typeof e.credential_source=="string"&&typeof e.source_profile>"u";return o&&r?.debug?.(` ${t} isCredentialSourceProfile credential_source=${e.credential_source}`),o},A=async(e,t,r,o,i={},c)=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let n=t[e],{source_profile:f,region:T}=n;if(!r.roleAssumer){let{getDefaultRoleAssumer:u}=await import('./sts-WAA6I22C.js');r.roleAssumer=u({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:{...o,...r?.parentClientConfig,region:T??r?.parentClientConfig?.region??o?.region}},r.clientPlugins);}if(f&&f in i)throw new p(`Detected a cycle attempting to resolve credentials for profile ${v$1(r)}. Profiles visited: `+Object.keys(i).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${f?`source_profile=[${f}]`:`profile=[${e}]`}`);let E=f?c(f,t,r,o,{...i,[f]:true},I(t[f]??{})):(await v(n.credential_source,e,r.logger)(r))();if(I(n))return E.then(u=>b$1(u,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));{let u={RoleArn:n.role_arn,RoleSessionName:n.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:n.external_id,DurationSeconds:parseInt(n.duration_seconds||"3600",10)},{mfa_serial:p$1}=n;if(p$1){if(!r.mfaCodeProvider)throw new p(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:false});u.SerialNumber=p$1,u.TokenCode=await r.mfaCodeProvider(p$1);}let $=await E;return r.roleAssumer($,u).then(W=>b$1(W,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},I=e=>!e.role_arn&&!!e.credential_source;g$1();var L=e=>!!(e&&e.login_session),O=async(e,t,r)=>{let{fromLoginCredentials:o}=await import('./dist-es-SVHZDVUF.js'),i=await o({...t,profile:e})({callerClientConfig:r});return b$1(i,"CREDENTIALS_PROFILE_LOGIN","AC")};g$1();var b=e=>!!e&&typeof e=="object"&&typeof e.credential_process=="string",x=async(e,t)=>{let{fromProcess:r}=await import('./dist-es-M2F7M27Y.js'),o=await r({...e,profile:t})();return b$1(o,"CREDENTIALS_PROFILE_PROCESS","v")};g$1();var k=async(e,t,r={},o)=>{let{fromSSO:i}=await import('./dist-es-F2ZR55UK.js');return i({profile:e,logger:r.logger,parentClientConfig:r.parentClientConfig,clientConfig:r.clientConfig})({callerClientConfig:o}).then(c=>t.sso_session?b$1(c,"CREDENTIALS_PROFILE_SSO","r"):b$1(c,"CREDENTIALS_PROFILE_SSO_LEGACY","t"))},F=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");g$1();var y=e=>!!e&&typeof e=="object"&&typeof e.aws_access_key_id=="string"&&typeof e.aws_secret_access_key=="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,g=async(e,t)=>{t?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let r={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return b$1(r,"CREDENTIALS_PROFILE","n")};g$1();var h=e=>!!e&&typeof e=="object"&&typeof e.web_identity_token_file=="string"&&typeof e.role_arn=="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,D=async(e,t,r)=>{let{fromTokenFile:o}=await import('./dist-es-OKLLRYI3.js'),i=await o({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:t.roleAssumerWithWebIdentity,logger:t.logger,parentClientConfig:t.parentClientConfig})({callerClientConfig:r});return b$1(i,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")};var w=async(e,t,r,o,i={},c=false)=>{let n=t[e];if(Object.keys(i).length>0&&y(n))return g(n,r);if(c||R(n,{profile:e,logger:r.logger}))return A(e,t,r,o,i,w);if(y(n))return g(n,r);if(h(n))return D(n,r,o);if(b(n))return x(r,e);if(F(n))return await k(e,n,r,o);if(L(n))return O(e,r,o);throw new p(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var M=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let r=await A$1(e);return w(v$1({profile:e.profile??t?.profile}),r,e,t)};export{M as fromIni};
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkLEBM6ZSZ_cjs=require('./chunk-LEBM6ZSZ.cjs'),chunkGNEVCEJU_cjs=require('./chunk-GNEVCEJU.cjs');require('./chunk-LQ3YZTPU.cjs');var chunkBUNLC3II_cjs=require('./chunk-BUNLC3II.cjs'),crypto$1=require('crypto'),fs=require('fs'),os=require('os'),path=require('path');chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var k=class g{profileData;init;callerClientConfig;static REFRESH_THRESHOLD=300*1e3;constructor(r,e,o){this.profileData=r,this.init=e,this.callerClientConfig=o;}async loadCredentials(){let r=await this.loadToken();if(!r)throw new chunkGNEVCEJU_cjs.p(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`,{tryNextLink:false,logger:this.logger});let e=r.accessToken,o=Date.now();return new Date(e.expiresAt).getTime()-o<=g.REFRESH_THRESHOLD?this.refresh(r):{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,sessionToken:e.sessionToken,accountId:e.accountId,expiration:new Date(e.expiresAt)}}get logger(){return this.init?.logger}get loginSession(){return this.profileData.login_session}async refresh(r){let{SigninClient:e,CreateOAuth2TokenCommand:o}=await import('./signin-VFBLX7EL.cjs'),{logger:t,userAgentAppId:i}=this.callerClientConfig??{},l=(n=>n?.metadata?.handlerProtocol==="h2")(this.callerClientConfig?.requestHandler)?void 0:this.callerClientConfig?.requestHandler,p=this.profileData.region??await this.callerClientConfig?.region?.()??process.env.AWS_REGION,y=new e({credentials:{accessKeyId:"",secretAccessKey:""},region:p,requestHandler:l,logger:t,userAgentAppId:i,...this.init?.clientConfig});this.createDPoPInterceptor(y.middlewareStack);let T={tokenInput:{clientId:r.clientId,refreshToken:r.refreshToken,grantType:"refresh_token"}};try{let n=await y.send(new o(T)),{accessKeyId:d,secretAccessKey:a,sessionToken:u}=n.tokenOutput?.accessToken??{},{refreshToken:m,expiresIn:C}=n.tokenOutput??{};if(!d||!a||!u||!m)throw new chunkGNEVCEJU_cjs.p("Token refresh response missing required fields",{logger:this.logger,tryNextLink:!1});let I=(C??900)*1e3,f=new Date(Date.now()+I),E={...r,accessToken:{...r.accessToken,accessKeyId:d,secretAccessKey:a,sessionToken:u,expiresAt:f.toISOString()},refreshToken:m};await this.saveToken(E);let w=E.accessToken;return {accessKeyId:w.accessKeyId,secretAccessKey:w.secretAccessKey,sessionToken:w.sessionToken,accountId:w.accountId,expiration:f}}catch(n){if(n.name==="AccessDeniedException"){let d=n.error,a;switch(d){case "TOKEN_EXPIRED":a="Your session has expired. Please reauthenticate.";break;case "USER_CREDENTIALS_CHANGED":a="Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";break;case "INSUFFICIENT_PERMISSIONS":a="Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";break;default:a=`Failed to refresh token: ${String(n)}. Please re-authenticate using \`aws login\``;}throw new chunkGNEVCEJU_cjs.p(a,{logger:this.logger,tryNextLink:false})}throw new chunkGNEVCEJU_cjs.p(`Failed to refresh token: ${String(n)}. Please re-authenticate using aws login`,{logger:this.logger})}}async loadToken(){let r=this.getTokenFilePath();try{let e;try{e=await chunkGNEVCEJU_cjs.y(r,{ignoreCache:this.init?.ignoreCache});}catch{e=await fs.promises.readFile(r,"utf8");}let o=JSON.parse(e),t=["accessToken","clientId","refreshToken","dpopKey"].filter(i=>!o[i]);if(o.accessToken?.accountId||t.push("accountId"),t.length>0)throw new chunkGNEVCEJU_cjs.p(`Token validation failed, missing fields: ${t.join(", ")}`,{logger:this.logger,tryNextLink:!1});return o}catch(e){throw new chunkGNEVCEJU_cjs.p(`Failed to load token from ${r}: ${String(e)}`,{logger:this.logger,tryNextLink:false})}}async saveToken(r){let e=this.getTokenFilePath(),o=path.dirname(e);try{await fs.promises.mkdir(o,{recursive:!0});}catch{}await fs.promises.writeFile(e,JSON.stringify(r,null,2),"utf8");}getTokenFilePath(){let r=process.env.AWS_LOGIN_CACHE_DIRECTORY??path.join(os.homedir(),".aws","login","cache"),e=Buffer.from(this.loginSession,"utf8"),o=crypto$1.createHash("sha256").update(e).digest("hex");return path.join(r,`${o}.json`)}derToRawSignature(r){let e=2;if(r[e]!==2)throw new Error("Invalid DER signature");e++;let o=r[e++],t=r.subarray(e,e+o);if(e+=o,r[e]!==2)throw new Error("Invalid DER signature");e++;let i=r[e++],s=r.subarray(e,e+i);t=t[0]===0?t.subarray(1):t,s=s[0]===0?s.subarray(1):s;let l=Buffer.concat([Buffer.alloc(32-t.length),t]),p=Buffer.concat([Buffer.alloc(32-s.length),s]);return Buffer.concat([l,p])}createDPoPInterceptor(r){r.add(e=>async o=>{if(chunkGNEVCEJU_cjs.e.isInstance(o.request)){let t=o.request,i=`${t.protocol}//${t.hostname}${t.port?`:${t.port}`:""}${t.path}`,s=await this.generateDpop(t.method,i);t.headers={...t.headers,DPoP:s};}return e(o)},{step:"finalizeRequest",name:"dpopInterceptor",override:true});}async generateDpop(r="POST",e){let o=await this.loadToken();try{let t=crypto$1.createPrivateKey({key:o.dpopKey,format:"pem",type:"sec1"}),s=crypto$1.createPublicKey(t).export({format:"der",type:"spki"}),l=-1;for(let f=0;f<s.length;f++)if(s[f]===4){l=f;break}let p=s.slice(l+1,l+33),y=s.slice(l+33,l+65),T={alg:"ES256",typ:"dpop+jwt",jwk:{kty:"EC",crv:"P-256",x:p.toString("base64url"),y:y.toString("base64url")}},n={jti:crypto.randomUUID(),htm:r,htu:e,iat:Math.floor(Date.now()/1e3)},d=Buffer.from(JSON.stringify(T)).toString("base64url"),a=Buffer.from(JSON.stringify(n)).toString("base64url"),u=`${d}.${a}`,m=crypto$1.sign("sha256",Buffer.from(u),t),I=this.derToRawSignature(m).toString("base64url");return `${u}.${I}`}catch(t){throw new chunkGNEVCEJU_cjs.p(`Failed to generate Dpop proof: ${t instanceof Error?t.message:String(t)}`,{logger:this.logger,tryNextLink:false})}}};var H=g=>async({callerClientConfig:r}={})=>{g?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");let e=await chunkGNEVCEJU_cjs.A(g||{}),o=chunkGNEVCEJU_cjs.v({profile:g?.profile??r?.profile}),t=e[o];if(!t?.login_session)throw new chunkGNEVCEJU_cjs.p(`Profile ${o} does not contain login_session.`,{tryNextLink:true,logger:g?.logger});let s=await new k(t,g,r).loadCredentials();return chunkLEBM6ZSZ_cjs.b(s,"CREDENTIALS_LOGIN","AD")};
2
- exports.fromLoginCredentials=H;
@@ -1,6 +0,0 @@
1
- 'use strict';var chunkGIS6X43A_cjs=require('./chunk-GIS6X43A.cjs'),chunkLEBM6ZSZ_cjs=require('./chunk-LEBM6ZSZ.cjs'),chunkGNEVCEJU_cjs=require('./chunk-GNEVCEJU.cjs'),chunkLQ3YZTPU_cjs=require('./chunk-LQ3YZTPU.cjs'),chunkBUNLC3II_cjs=require('./chunk-BUNLC3II.cjs'),L=require('fs/promises');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var L__default=/*#__PURE__*/_interopDefault(L);chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var O="169.254.170.2",y="169.254.170.23",v="[fd00:ec2::23]",I=(e,o)=>{if(e.protocol!=="https:"&&!(e.hostname===O||e.hostname===y||e.hostname===v)){if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else {if(e.hostname==="localhost")return;let n=e.hostname.split("."),r=t=>{let i=parseInt(t,10);return 0<=i&&i<=255};if(n[0]==="127"&&r(n[1])&&r(n[2])&&r(n[3])&&n.length===4)return}throw new chunkGNEVCEJU_cjs.p(`URL not accepted. It must either be HTTPS or match one of the following:
2
- - loopback CIDR 127.0.0.0/8 or [::1/128]
3
- - ECS container host 169.254.170.2
4
- - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:o})}};chunkBUNLC3II_cjs.h();function u(e){return new chunkGNEVCEJU_cjs.e({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((o,[n,r])=>(o[n]=r,o),{}),fragment:e.hash})}async function E(e,o){let r=await chunkLQ3YZTPU_cjs.A(e.body).transformToString();if(e.statusCode===200){let t=JSON.parse(r);if(typeof t.AccessKeyId!="string"||typeof t.SecretAccessKey!="string"||typeof t.Token!="string"||typeof t.Expiration!="string")throw new chunkGNEVCEJU_cjs.p("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:o});return {accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:chunkLQ3YZTPU_cjs.g(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r);}catch{}throw Object.assign(new chunkGNEVCEJU_cjs.p(`Server responded with status: ${e.statusCode}`,{logger:o}),{Code:t.Code,Message:t.Message})}throw new chunkGNEVCEJU_cjs.p(`Server responded with status: ${e.statusCode}`,{logger:o})}chunkBUNLC3II_cjs.h();var N=(e,o,n)=>async()=>{for(let r=0;r<o;++r)try{return await e()}catch{await new Promise(i=>setTimeout(i,n));}return await e()};var U="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",k="http://169.254.170.2",H="AWS_CONTAINER_CREDENTIALS_FULL_URI",K="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",P="AWS_CONTAINER_AUTHORIZATION_TOKEN",F=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let o,n=e.awsContainerCredentialsRelativeUri??process.env[U],r=e.awsContainerCredentialsFullUri??process.env[H],t=e.awsContainerAuthorizationToken??process.env[P],i=e.awsContainerAuthorizationTokenFile??process.env[K],c=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?.warn?console.warn:e.logger.warn.bind(e.logger);if(n&&r&&(c("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),c("awsContainerCredentialsRelativeUri will take precedence.")),t&&i&&(c("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),c("awsContainerAuthorizationTokenFile will take precedence.")),n)o=`${k}${n}`;else if(r)o=r;else throw new chunkGNEVCEJU_cjs.p(`No HTTP credential provider host provided.
5
- Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let h=new URL(o);I(h,e.logger);let l=chunkGIS6X43A_cjs.a.create({connectionTimeout:e.timeout??1e3}),R=e.timeout??1e3,g=N(async()=>{let m=u(h);i?m.headers.Authorization=w((await L__default.default.readFile(i)).toString()):t&&(m.headers.Authorization=w(t));try{let T=await l.handle(m,{requestTimeout:R});return E(T.response).then(S=>chunkLEBM6ZSZ_cjs.b(S,"CREDENTIALS_HTTP","z"))}catch(T){throw new chunkGNEVCEJU_cjs.p(String(T),{logger:e.logger})}},e.maxRetries??3,e.timeout??1e3);return async()=>{try{return await g()}finally{l.destroy?.();}}},w=e=>{if(e.includes(`\r
6
- `))throw new chunkGNEVCEJU_cjs.p("Authorization token contains invalid \\r\\n sequence.");return e};exports.fromHttp=F;
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkGNEVCEJU_cjs=require('./chunk-GNEVCEJU.cjs');require('./chunk-LQ3YZTPU.cjs');var chunkBUNLC3II_cjs=require('./chunk-BUNLC3II.cjs'),L=require('http');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var L__default=/*#__PURE__*/_interopDefault(L);chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var g=e=>!!e&&typeof e=="object"&&typeof e.AccessKeyId=="string"&&typeof e.SecretAccessKey=="string"&&typeof e.Token=="string"&&typeof e.Expiration=="string",O=e=>({accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:new Date(e.Expiration),...e.AccountId&&{accountId:e.AccountId}});chunkBUNLC3II_cjs.h();var B=1e3,G=0,h=({maxRetries:e=0,timeout:t=1e3})=>({maxRetries:e,timeout:t});chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function E(e){return new Promise((t,a)=>{let r=L__default.default.request({method:"GET",...e,hostname:e.hostname?.replace(/^\[(.+)\]$/,"$1")});r.on("error",n=>{a(Object.assign(new chunkGNEVCEJU_cjs.o("Unable to connect to instance metadata service"),n)),r.destroy();}),r.on("timeout",()=>{a(new chunkGNEVCEJU_cjs.o("TimeoutError from instance metadata service")),r.destroy();}),r.on("response",n=>{let{statusCode:c=400}=n;(c<200||300<=c)&&(a(Object.assign(new chunkGNEVCEJU_cjs.o("Error response received from instance metadata service"),{statusCode:c})),r.destroy());let _=[];n.on("data",d=>{_.push(d);}),n.on("end",()=>{t(Buffer.concat(_)),r.destroy();});}),r.end();})}chunkBUNLC3II_cjs.h();var N=(e,t)=>{let a=e();for(let r=0;r<t;r++)a=a.catch(e);return a};var v="AWS_CONTAINER_CREDENTIALS_FULL_URI",D="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",M="AWS_CONTAINER_AUTHORIZATION_TOKEN",H=(e={})=>{let{timeout:t,maxRetries:a}=h(e);return ()=>N(async()=>{let r=await X({logger:e.logger}),n=JSON.parse(await q(t,r));if(!g(n))throw new chunkGNEVCEJU_cjs.p("Invalid response received from instance metadata service.",{logger:e.logger});return O(n)},a)},q=async(e,t)=>(process.env[M]&&(t.headers={...t.headers,Authorization:process.env[M]}),(await E({...t,timeout:e})).toString()),j="169.254.170.2",Y=new Set(["localhost","127.0.0.1"]),J=new Set(["http:","https:"]),X=async({logger:e})=>{if(process.env[D])return {hostname:j,path:process.env[D]};if(process.env[v]){let t;try{t=new URL(process.env[v]);}catch{throw new chunkGNEVCEJU_cjs.p(`${process.env[v]} is not a valid container metadata service URL`,{tryNextLink:false,logger:e})}if(!t.hostname||!Y.has(t.hostname))throw new chunkGNEVCEJU_cjs.p(`${t.hostname} is not a valid container metadata service hostname`,{tryNextLink:false,logger:e});if(!t.protocol||!J.has(t.protocol))throw new chunkGNEVCEJU_cjs.p(`${t.protocol} is not a valid container metadata service protocol`,{tryNextLink:false,logger:e});return {protocol:t.protocol,hostname:t.hostname,path:t.pathname+t.search,port:t.port?parseInt(t.port,10):void 0}}throw new chunkGNEVCEJU_cjs.p(`The container metadata credential provider cannot be used unless the ${D} or ${v} environment variable is set`,{tryNextLink:false,logger:e})};chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var w=class e extends chunkGNEVCEJU_cjs.p{tryNextLink;name="InstanceMetadataV1FallbackError";constructor(t,a=true){super(t,a),this.tryNextLink=a,Object.setPrototypeOf(this,e.prototype);}};chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();exports.Endpoint=void 0;(function(e){e.IPv4="http://169.254.169.254",e.IPv6="http://[fd00:ec2::254]";})(exports.Endpoint||(exports.Endpoint={}));chunkBUNLC3II_cjs.h();var z="AWS_EC2_METADATA_SERVICE_ENDPOINT",Z="ec2_metadata_service_endpoint",F={environmentVariableSelector:e=>e[z],configFileSelector:e=>e[Z],default:void 0};chunkBUNLC3II_cjs.h();var f;(function(e){e.IPv4="IPv4",e.IPv6="IPv6";})(f||(f={}));chunkBUNLC3II_cjs.h();var Q="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",ee="ec2_metadata_service_endpoint_mode",b={environmentVariableSelector:e=>e[Q],configFileSelector:e=>e[ee],default:f.IPv4};var x=async()=>chunkGNEVCEJU_cjs.i(await te()||await oe()),te=async()=>chunkGNEVCEJU_cjs.C(F)(),oe=async()=>{let e=await chunkGNEVCEJU_cjs.C(b)();switch(e){case f.IPv4:return exports.Endpoint.IPv4;case f.IPv6:return exports.Endpoint.IPv6;default:throw new Error(`Unsupported endpoint mode: ${e}. Select from ${Object.values(f)}`)}};chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var re="https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html",R=(e,t)=>{let a=300+Math.floor(Math.random()*300),r=new Date(Date.now()+a*1e3);t.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(r)}.
2
- For more information, please visit: `+re);let n=e.originalExpiration??e.expiration;return {...e,...n?{originalExpiration:n}:{},expiration:r}};var V=(e,t={})=>{let a=t?.logger||console,r;return async()=>{let n;try{n=await e(),n.expiration&&n.expiration.getTime()<Date.now()&&(n=R(n,a));}catch(c){if(r)a.warn("Credential renew failed: ",c),n=R(r,a);else throw c}return r=n,n}};var W="/latest/meta-data/iam/security-credentials/",ne="/latest/api/token",y="AWS_EC2_METADATA_V1_DISABLED",k="ec2_metadata_v1_disabled",U="x-aws-ec2-metadata-token",ae=(e={})=>V(se(e),{logger:e.logger}),se=(e={})=>{let t=false,{logger:a,profile:r}=e,{timeout:n,maxRetries:c}=h(e),_=async(d,I)=>{if(t||I.headers?.[U]==null){let l=false,p=false,$=await chunkGNEVCEJU_cjs.C({environmentVariableSelector:m=>{let T=m[y];if(p=!!T&&T!=="false",T===void 0)throw new chunkGNEVCEJU_cjs.p(`${y} not set in env, checking config file next.`,{logger:e.logger});return p},configFileSelector:m=>{let T=m[k];return l=!!T&&T!=="false",l},default:false},{profile:r})();if(e.ec2MetadataV1Disabled||$){let m=[];throw e.ec2MetadataV1Disabled&&m.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"),l&&m.push(`config file profile (${k})`),p&&m.push(`process environment variable (${y})`),new w(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${m.join(", ")}].`)}}let K=(await N(async()=>{let l;try{l=await ce(I);}catch(p){throw p.statusCode===401&&(t=false),p}return l},d)).trim();return N(async()=>{let l;try{l=await de(K,I,e);}catch(p){throw p.statusCode===401&&(t=false),p}return l},d)};return async()=>{let d=await x();if(t)return a?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),_(c,{...d,timeout:n});{let I;try{I=(await ie({...d,timeout:n})).toString();}catch(A){if(A?.statusCode===400)throw Object.assign(A,{message:"EC2 Metadata token request returned error"});return (A.message==="TimeoutError"||[403,404,405].includes(A.statusCode))&&(t=true),a?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),_(c,{...d,timeout:n})}return _(c,{...d,headers:{[U]:I},timeout:n})}}},ie=async e=>E({...e,path:ne,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),ce=async e=>(await E({...e,path:W})).toString(),de=async(e,t,a)=>{let r=JSON.parse((await E({...t,path:W+e})).toString());if(!g(r))throw new chunkGNEVCEJU_cjs.p("Invalid response received from instance metadata service.",{logger:a.logger});return O(r)};exports.DEFAULT_MAX_RETRIES=G;exports.DEFAULT_TIMEOUT=B;exports.ENV_CMDS_AUTH_TOKEN=M;exports.ENV_CMDS_FULL_URI=v;exports.ENV_CMDS_RELATIVE_URI=D;exports.fromContainerMetadata=H;exports.fromInstanceMetadata=ae;exports.getInstanceMetadataEndpoint=x;exports.httpRequest=E;exports.providerConfigFromInit=h;
@@ -1 +0,0 @@
1
- 'use strict';var chunkLEBM6ZSZ_cjs=require('./chunk-LEBM6ZSZ.cjs'),chunkGNEVCEJU_cjs=require('./chunk-GNEVCEJU.cjs');require('./chunk-LQ3YZTPU.cjs');var chunkBUNLC3II_cjs=require('./chunk-BUNLC3II.cjs'),fs=require('fs');chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var c=e=>async s=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:o,roleSessionName:n,webIdentityToken:i,providerId:t,policyArns:E,policy:p,durationSeconds:_}=e,{roleAssumerWithWebIdentity:l}=e;if(!l){let{getDefaultRoleAssumerWithWebIdentity:S}=await import('./sts-YLXXIB3X.cjs');l=S({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...s?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins);}return l({RoleArn:o,RoleSessionName:n??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:i,ProviderId:t,PolicyArns:E,Policy:p,DurationSeconds:_})};var g="AWS_WEB_IDENTITY_TOKEN_FILE",N="AWS_ROLE_ARN",I="AWS_ROLE_SESSION_NAME",y=(e={})=>async s=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let o=e?.webIdentityTokenFile??process.env[g],n=e?.roleArn??process.env[N],i=e?.roleSessionName??process.env[I];if(!o||!n)throw new chunkGNEVCEJU_cjs.p("Web identity configuration not specified",{logger:e.logger});let t=await c({...e,webIdentityToken:chunkGNEVCEJU_cjs.B?.getTokenRecord?.()[o]??fs.readFileSync(o,{encoding:"ascii"}),roleArn:n,roleSessionName:i})(s);return o===process.env[g]&&chunkLEBM6ZSZ_cjs.b(t,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h"),t};exports.fromTokenFile=y;exports.fromWebToken=c;
@@ -1,4 +0,0 @@
1
- import {b as b$1}from'./chunk-OBYAIJVU.js';import {p,v,A,z as z$1,x,q,w}from'./chunk-JRUQ5ABB.js';import'./chunk-TYQYKKWJ.js';import {g}from'./chunk-Y2YAKDEQ.js';import {promises}from'fs';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
2
- g();g();g();var F=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");g();g();g();g();var T="To refresh this SSO session run 'aws sso login' with the corresponding profile.";g();g();var z=async(e,s={},t)=>{let{SSOOIDCClient:n}=await import('./sso-oidc-UB7G4END.js'),i=p=>s.clientConfig?.[p]??s.parentClientConfig?.[p]??t?.[p];return new n(Object.assign({},s.clientConfig??{},{region:e??s.clientConfig?.region,logger:i("logger"),userAgentAppId:i("userAgentAppId")}))};var J=async(e,s,t={},n)=>{let{CreateTokenCommand:i}=await import('./sso-oidc-UB7G4END.js');return (await z(s,t,n)).send(new i({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};g();var $=e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new q(`Token is expired. ${T}`,false)};g();var h=(e,s,t=false)=>{if(typeof s>"u")throw new q(`Value not present for '${e}' in SSO Token${t?". Cannot refresh":""}. ${T}`,false)};g();var{writeFile:Z}=promises,V=(e,s)=>{let t=w(e),n=JSON.stringify(s,null,2);return Z(t,n)};var Y=new Date(0),L=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");let t=await A(e),n=v({profile:e.profile??s?.profile}),i=t[n];if(i){if(!i.sso_session)throw new q(`Profile '${n}' is missing required property 'sso_session'.`)}else throw new q(`Profile '${n}' could not be found in shared credentials file.`,false);let l=i.sso_session,d=(await z$1(e))[l];if(!d)throw new q(`Sso session '${l}' could not be found in shared credentials file.`,false);for(let a of ["sso_start_url","sso_region"])if(!d[a])throw new q(`Sso session '${l}' is missing required property '${a}'.`,false);d.sso_start_url;let y=d.sso_region,r;try{r=await x(l);}catch{throw new q(`The SSO session token associated with profile=${n} was not found or is invalid. ${T}`,false)}h("accessToken",r.accessToken),h("expiresAt",r.expiresAt);let{accessToken:x$1,expiresAt:C}=r,c={token:x$1,expiration:new Date(C)};if(c.expiration.getTime()-Date.now()>3e5)return c;if(Date.now()-Y.getTime()<30*1e3)return $(c),c;h("clientId",r.clientId,true),h("clientSecret",r.clientSecret,true),h("refreshToken",r.refreshToken,true);try{Y.setTime(Date.now());let a=await J(r,y,e,s);h("accessToken",a.accessToken),h("expiresIn",a.expiresIn);let u=new Date(Date.now()+a.expiresIn*1e3);try{await V(l,{...r,accessToken:a.accessToken,expiresAt:u.toISOString(),refreshToken:a.refreshToken});}catch{}return {token:a.accessToken,expiration:u}}catch{return $(c),c}};var O=false,M=async({ssoStartUrl:e,ssoSession:s,ssoAccountId:t,ssoRegion:n,ssoRoleName:i,ssoClient:l,clientConfig:p$1,parentClientConfig:d,callerClientConfig:m,profile:y,filepath:r,configFilepath:x$1,ignoreCache:C,logger:c})=>{let a,u="To refresh this SSO session run aws sso login with the corresponding profile.";if(s)try{let _=await L({profile:y,filepath:r,configFilepath:x$1,ignoreCache:C,clientConfig:p$1,parentClientConfig:d,logger:c})({callerClientConfig:m});a={accessToken:_.token,expiresAt:new Date(_.expiration).toISOString()};}catch(_){throw new p(_.message,{tryNextLink:O,logger:c})}else try{a=await x(e);}catch{throw new p(`The SSO session associated with this profile is invalid. ${u}`,{tryNextLink:O,logger:c})}if(new Date(a.expiresAt).getTime()-Date.now()<=0)throw new p(`The SSO session associated with this profile has expired. ${u}`,{tryNextLink:O,logger:c});let{accessToken:v}=a,{SSOClient:k,GetRoleCredentialsCommand:E}=await import('./loadSso-UQR6545M.js'),B=l||new k(Object.assign({},p$1??{},{logger:p$1?.logger??m?.logger??d?.logger,region:p$1?.region??n,userAgentAppId:p$1?.userAgentAppId??m?.userAgentAppId??d?.userAgentAppId})),G;try{G=await B.send(new E({accountId:t,roleName:i,accessToken:v}));}catch(_){throw new p(_,{tryNextLink:O,logger:c})}let{roleCredentials:{accessKeyId:K,secretAccessKey:H,sessionToken:U,expiration:j,credentialScope:q,accountId:W}={}}=G;if(!K||!H||!U||!j)throw new p("SSO returns an invalid temporary credential.",{tryNextLink:O,logger:c});let P={accessKeyId:K,secretAccessKey:H,sessionToken:U,expiration:new Date(j),...q&&{credentialScope:q},...W&&{accountId:W}};return s?b$1(P,"CREDENTIALS_SSO","s"):b$1(P,"CREDENTIALS_SSO_LEGACY","u"),P};g();var b=(e,s)=>{let{sso_start_url:t,sso_account_id:n,sso_region:i,sso_role_name:l}=e;if(!t||!n||!i||!l)throw new p(`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
- Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:false,logger:s});return e};var oe=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:t,ssoAccountId:n,ssoRegion:i,ssoRoleName:l,ssoSession:p$1}=e,{ssoClient:d}=e,m=v({profile:e.profile??s?.profile});if(!t&&!n&&!i&&!l&&!p$1){let r=(await A(e))[m];if(!r)throw new p(`Profile ${m} was not found.`,{logger:e.logger});if(!F(r))throw new p(`Profile ${m} is not configured with SSO credentials.`,{logger:e.logger});if(r?.sso_session){let k=(await z$1(e))[r.sso_session],E=` configurations in profile ${m} and sso-session ${r.sso_session}`;if(i&&i!==k.sso_region)throw new p("Conflicting SSO region"+E,{tryNextLink:false,logger:e.logger});if(t&&t!==k.sso_start_url)throw new p("Conflicting SSO start_url"+E,{tryNextLink:false,logger:e.logger});r.sso_region=k.sso_region,r.sso_start_url=k.sso_start_url;}let{sso_start_url:x,sso_account_id:C,sso_region:c,sso_role_name:a,sso_session:u}=b(r,e.logger);return M({ssoStartUrl:x,ssoSession:u,ssoAccountId:C,ssoRegion:c,ssoRoleName:a,ssoClient:d,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:m,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}else {if(!t||!n||!i||!l)throw new p('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:false,logger:e.logger});return M({ssoStartUrl:t,ssoSession:p$1,ssoAccountId:n,ssoRegion:i,ssoRoleName:l,ssoClient:d,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:m,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}};
4
- export{oe as fromSSO,F as isSsoProfile,b as validateSsoProfile};
@@ -1 +0,0 @@
1
- export{f as ENV_ACCOUNT_ID,e as ENV_CREDENTIAL_SCOPE,d as ENV_EXPIRATION,a as ENV_KEY,b as ENV_SECRET,c as ENV_SESSION,g as fromEnv}from'./chunk-W45TLOOT.js';import'./chunk-OBYAIJVU.js';import'./chunk-JRUQ5ABB.js';import'./chunk-TYQYKKWJ.js';import'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
@@ -1,2 +0,0 @@
1
- import {b}from'./chunk-OBYAIJVU.js';import {A,v,B,p}from'./chunk-JRUQ5ABB.js';import'./chunk-TYQYKKWJ.js';import {g}from'./chunk-Y2YAKDEQ.js';import {exec}from'child_process';import {promisify}from'util';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
2
- g();g();g();g();var m=(r,e,o)=>{if(e.Version!==1)throw Error(`Profile ${r} credential_process did not return Version 1.`);if(e.AccessKeyId===void 0||e.SecretAccessKey===void 0)throw Error(`Profile ${r} credential_process returned invalid credentials.`);if(e.Expiration){let d=new Date;if(new Date(e.Expiration)<d)throw Error(`Profile ${r} credential_process returned expired credentials.`)}let t=e.AccountId;!t&&o?.[r]?.aws_account_id&&(t=o[r].aws_account_id);let n={accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,...e.SessionToken&&{sessionToken:e.SessionToken},...e.Expiration&&{expiration:new Date(e.Expiration)},...e.CredentialScope&&{credentialScope:e.CredentialScope},...t&&{accountId:t}};return b(n,"CREDENTIALS_PROCESS","w"),n};var x=async(r,e,o)=>{let t=e[r];if(e[r]){let n=t.credential_process;if(n!==void 0){let d=promisify(B?.getTokenRecord?.().exec??exec);try{let{stdout:c}=await d(n),p;try{p=JSON.parse(c.trim());}catch{throw Error(`Profile ${r} credential_process returned invalid JSON.`)}return m(r,p,e)}catch(c){throw new p(c.message,{logger:o})}}else throw new p(`Profile ${r} did not contain credential_process.`,{logger:o})}else throw new p(`Profile ${r} could not be found in shared credentials file.`,{logger:o})};var y=(r={})=>async({callerClientConfig:e}={})=>{r.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let o=await A(r);return x(v({profile:r.profile??e?.profile}),o,r.logger)};export{y as fromProcess};
@@ -1,7 +0,0 @@
1
- import {a}from'./chunk-LVBHOZZF.js';import {b}from'./chunk-OBYAIJVU.js';import {p,e}from'./chunk-JRUQ5ABB.js';import {A,g as g$1}from'./chunk-TYQYKKWJ.js';import {g}from'./chunk-Y2YAKDEQ.js';import U from'fs/promises';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
2
- g();g();g();var y="169.254.170.2",v="169.254.170.23",L="[fd00:ec2::23]",u=(e,o)=>{if(e.protocol!=="https:"&&!(e.hostname===y||e.hostname===v||e.hostname===L)){if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else {if(e.hostname==="localhost")return;let n=e.hostname.split("."),r=t=>{let i=parseInt(t,10);return 0<=i&&i<=255};if(n[0]==="127"&&r(n[1])&&r(n[2])&&r(n[3])&&n.length===4)return}throw new p(`URL not accepted. It must either be HTTPS or match one of the following:
3
- - loopback CIDR 127.0.0.0/8 or [::1/128]
4
- - ECS container host 169.254.170.2
5
- - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:o})}};g();function E(e$1){return new e({protocol:e$1.protocol,hostname:e$1.hostname,port:Number(e$1.port),path:e$1.pathname,query:Array.from(e$1.searchParams.entries()).reduce((o,[n,r])=>(o[n]=r,o),{}),fragment:e$1.hash})}async function N(e,o){let r=await A(e.body).transformToString();if(e.statusCode===200){let t=JSON.parse(r);if(typeof t.AccessKeyId!="string"||typeof t.SecretAccessKey!="string"||typeof t.Token!="string"||typeof t.Expiration!="string")throw new p("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:o});return {accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:g$1(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r);}catch{}throw Object.assign(new p(`Server responded with status: ${e.statusCode}`,{logger:o}),{Code:t.Code,Message:t.Message})}throw new p(`Server responded with status: ${e.statusCode}`,{logger:o})}g();var w=(e,o,n)=>async()=>{for(let r=0;r<o;++r)try{return await e()}catch{await new Promise(i=>setTimeout(i,n));}return await e()};var k="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",H="http://169.254.170.2",K="AWS_CONTAINER_CREDENTIALS_FULL_URI",P="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",F="AWS_CONTAINER_AUTHORIZATION_TOKEN",x=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let o,n=e.awsContainerCredentialsRelativeUri??process.env[k],r=e.awsContainerCredentialsFullUri??process.env[K],t=e.awsContainerAuthorizationToken??process.env[F],i=e.awsContainerAuthorizationTokenFile??process.env[P],c=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?.warn?console.warn:e.logger.warn.bind(e.logger);if(n&&r&&(c("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),c("awsContainerCredentialsRelativeUri will take precedence.")),t&&i&&(c("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),c("awsContainerAuthorizationTokenFile will take precedence.")),n)o=`${H}${n}`;else if(r)o=r;else throw new p(`No HTTP credential provider host provided.
6
- Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let l=new URL(o);u(l,e.logger);let A=a.create({connectionTimeout:e.timeout??1e3}),g=e.timeout??1e3,S=w(async()=>{let T=E(l);i?T.headers.Authorization=R((await U.readFile(i)).toString()):t&&(T.headers.Authorization=R(t));try{let h=await A.handle(T,{requestTimeout:g});return N(h.response).then(O=>b(O,"CREDENTIALS_HTTP","z"))}catch(h){throw new p(String(h),{logger:e.logger})}},e.maxRetries??3,e.timeout??1e3);return async()=>{try{return await S()}finally{A.destroy?.();}}},R=e=>{if(e.includes(`\r
7
- `))throw new p("Authorization token contains invalid \\r\\n sequence.");return e};export{x as fromHttp};
@@ -1,2 +0,0 @@
1
- import {b}from'./chunk-OBYAIJVU.js';import {p,B}from'./chunk-JRUQ5ABB.js';import'./chunk-TYQYKKWJ.js';import {g}from'./chunk-Y2YAKDEQ.js';import {readFileSync}from'fs';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
2
- g();g();g();var c=e=>async s=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:o,roleSessionName:n,webIdentityToken:i,providerId:t,policyArns:p,policy:_,durationSeconds:S}=e,{roleAssumerWithWebIdentity:l}=e;if(!l){let{getDefaultRoleAssumerWithWebIdentity:T}=await import('./sts-WAA6I22C.js');l=T({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...s?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins);}return l({RoleArn:o,RoleSessionName:n??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:i,ProviderId:t,PolicyArns:p,Policy:_,DurationSeconds:S})};var E="AWS_WEB_IDENTITY_TOKEN_FILE",I="AWS_ROLE_ARN",y="AWS_ROLE_SESSION_NAME",A=(e={})=>async s=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let o=e?.webIdentityTokenFile??process.env[E],n=e?.roleArn??process.env[I],i=e?.roleSessionName??process.env[y];if(!o||!n)throw new p("Web identity configuration not specified",{logger:e.logger});let t=await c({...e,webIdentityToken:B?.getTokenRecord?.()[o]??readFileSync(o,{encoding:"ascii"}),roleArn:n,roleSessionName:i})(s);return o===process.env[E]&&b(t,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h"),t};export{A as fromTokenFile,c as fromWebToken};
@@ -1 +0,0 @@
1
- 'use strict';var chunk35PGCW3S_cjs=require('./chunk-35PGCW3S.cjs');require('./chunk-LEBM6ZSZ.cjs'),require('./chunk-GNEVCEJU.cjs'),require('./chunk-LQ3YZTPU.cjs'),require('./chunk-BUNLC3II.cjs');Object.defineProperty(exports,"ENV_ACCOUNT_ID",{enumerable:true,get:function(){return chunk35PGCW3S_cjs.f}});Object.defineProperty(exports,"ENV_CREDENTIAL_SCOPE",{enumerable:true,get:function(){return chunk35PGCW3S_cjs.e}});Object.defineProperty(exports,"ENV_EXPIRATION",{enumerable:true,get:function(){return chunk35PGCW3S_cjs.d}});Object.defineProperty(exports,"ENV_KEY",{enumerable:true,get:function(){return chunk35PGCW3S_cjs.a}});Object.defineProperty(exports,"ENV_SECRET",{enumerable:true,get:function(){return chunk35PGCW3S_cjs.b}});Object.defineProperty(exports,"ENV_SESSION",{enumerable:true,get:function(){return chunk35PGCW3S_cjs.c}});Object.defineProperty(exports,"fromEnv",{enumerable:true,get:function(){return chunk35PGCW3S_cjs.g}});
@@ -1 +0,0 @@
1
- 'use strict';var chunkLEBM6ZSZ_cjs=require('./chunk-LEBM6ZSZ.cjs'),chunkGNEVCEJU_cjs=require('./chunk-GNEVCEJU.cjs');require('./chunk-LQ3YZTPU.cjs');var chunkBUNLC3II_cjs=require('./chunk-BUNLC3II.cjs');chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var S=(e,t,r)=>{let o={EcsContainer:async i=>{let{fromHttp:c}=await import('./dist-es-BOW5V247.cjs'),{fromContainerMetadata:n}=await import('./dist-es-CRIMATLL.cjs');return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>chunkGNEVCEJU_cjs.r(c(i??{}),n(i))().then(p)},Ec2InstanceMetadata:async i=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:c}=await import('./dist-es-CRIMATLL.cjs');return async()=>c(i)().then(p)},Environment:async i=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:c}=await import('./dist-es-P25IKLBI.cjs');return async()=>c(i)().then(p)}};if(e in o)return o[e];throw new chunkGNEVCEJU_cjs.p(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:r})},p=e=>chunkLEBM6ZSZ_cjs.b(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var I=(e,{profile:t="default",logger:r}={})=>!!e&&typeof e=="object"&&typeof e.role_arn=="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(W(e,{profile:t,logger:r})||N(e,{profile:t,logger:r})),W=(e,{profile:t,logger:r})=>{let o=typeof e.source_profile=="string"&&typeof e.credential_source>"u";return o&&r?.debug?.(` ${t} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`),o},N=(e,{profile:t,logger:r})=>{let o=typeof e.credential_source=="string"&&typeof e.source_profile>"u";return o&&r?.debug?.(` ${t} isCredentialSourceProfile credential_source=${e.credential_source}`),o},R=async(e,t,r,o,i={},c)=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let n=t[e],{source_profile:d,region:D}=n;if(!r.roleAssumer){let{getDefaultRoleAssumer:f}=await import('./sts-YLXXIB3X.cjs');r.roleAssumer=f({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:{...o,...r?.parentClientConfig,region:D??r?.parentClientConfig?.region??o?.region}},r.clientPlugins);}if(d&&d in i)throw new chunkGNEVCEJU_cjs.p(`Detected a cycle attempting to resolve credentials for profile ${chunkGNEVCEJU_cjs.v(r)}. Profiles visited: `+Object.keys(i).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${d?`source_profile=[${d}]`:`profile=[${e}]`}`);let w=d?c(d,t,r,o,{...i,[d]:true},v(t[d]??{})):(await S(n.credential_source,e,r.logger)(r))();if(v(n))return w.then(f=>chunkLEBM6ZSZ_cjs.b(f,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));{let f={RoleArn:n.role_arn,RoleSessionName:n.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:n.external_id,DurationSeconds:parseInt(n.duration_seconds||"3600",10)},{mfa_serial:m}=n;if(m){if(!r.mfaCodeProvider)throw new chunkGNEVCEJU_cjs.p(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:false});f.SerialNumber=m,f.TokenCode=await r.mfaCodeProvider(m);}let T=await w;return r.roleAssumer(T,f).then($=>chunkLEBM6ZSZ_cjs.b($,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},v=e=>!e.role_arn&&!!e.credential_source;chunkBUNLC3II_cjs.h();var A=e=>!!(e&&e.login_session),L=async(e,t,r)=>{let{fromLoginCredentials:o}=await import('./dist-es-A5OF2STN.cjs'),i=await o({...t,profile:e})({callerClientConfig:r});return chunkLEBM6ZSZ_cjs.b(i,"CREDENTIALS_PROFILE_LOGIN","AC")};chunkBUNLC3II_cjs.h();var O=e=>!!e&&typeof e=="object"&&typeof e.credential_process=="string",b=async(e,t)=>{let{fromProcess:r}=await import('./dist-es-3SSNUZST.cjs'),o=await r({...e,profile:t})();return chunkLEBM6ZSZ_cjs.b(o,"CREDENTIALS_PROFILE_PROCESS","v")};chunkBUNLC3II_cjs.h();var x=async(e,t,r={},o)=>{let{fromSSO:i}=await import('./dist-es-T2H2W5BX.cjs');return i({profile:e,logger:r.logger,parentClientConfig:r.parentClientConfig,clientConfig:r.clientConfig})({callerClientConfig:o}).then(c=>t.sso_session?chunkLEBM6ZSZ_cjs.b(c,"CREDENTIALS_PROFILE_SSO","r"):chunkLEBM6ZSZ_cjs.b(c,"CREDENTIALS_PROFILE_SSO_LEGACY","t"))},k=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");chunkBUNLC3II_cjs.h();var C=e=>!!e&&typeof e=="object"&&typeof e.aws_access_key_id=="string"&&typeof e.aws_secret_access_key=="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,y=async(e,t)=>{t?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let r={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return chunkLEBM6ZSZ_cjs.b(r,"CREDENTIALS_PROFILE","n")};chunkBUNLC3II_cjs.h();var F=e=>!!e&&typeof e=="object"&&typeof e.web_identity_token_file=="string"&&typeof e.role_arn=="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,h=async(e,t,r)=>{let{fromTokenFile:o}=await import('./dist-es-DL3VLVP6.cjs'),i=await o({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:t.roleAssumerWithWebIdentity,logger:t.logger,parentClientConfig:t.parentClientConfig})({callerClientConfig:r});return chunkLEBM6ZSZ_cjs.b(i,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")};var g=async(e,t,r,o,i={},c=false)=>{let n=t[e];if(Object.keys(i).length>0&&C(n))return y(n,r);if(c||I(n,{profile:e,logger:r.logger}))return R(e,t,r,o,i,g);if(C(n))return y(n,r);if(F(n))return h(n,r,o);if(O(n))return b(r,e);if(k(n))return await x(e,n,r,o);if(A(n))return L(e,r,o);throw new chunkGNEVCEJU_cjs.p(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var j=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let r=await chunkGNEVCEJU_cjs.A(e);return g(chunkGNEVCEJU_cjs.v({profile:e.profile??t?.profile}),r,e,t)};exports.fromIni=j;
@@ -1,3 +0,0 @@
1
- import {b}from'./chunk-OBYAIJVU.js';import {A,v,p,y,e}from'./chunk-JRUQ5ABB.js';import'./chunk-TYQYKKWJ.js';import {g}from'./chunk-Y2YAKDEQ.js';import {createHash,createPrivateKey,createPublicKey,sign}from'crypto';import {promises}from'fs';import {homedir}from'os';import {dirname,join}from'path';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
2
- g();g();g();var k=class g{profileData;init;callerClientConfig;static REFRESH_THRESHOLD=300*1e3;constructor(r,e,o){this.profileData=r,this.init=e,this.callerClientConfig=o;}async loadCredentials(){let r=await this.loadToken();if(!r)throw new p(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`,{tryNextLink:false,logger:this.logger});let e=r.accessToken,o=Date.now();return new Date(e.expiresAt).getTime()-o<=g.REFRESH_THRESHOLD?this.refresh(r):{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,sessionToken:e.sessionToken,accountId:e.accountId,expiration:new Date(e.expiresAt)}}get logger(){return this.init?.logger}get loginSession(){return this.profileData.login_session}async refresh(r){let{SigninClient:e,CreateOAuth2TokenCommand:o}=await import('./signin-N3T2KF5Q.js'),{logger:t,userAgentAppId:i}=this.callerClientConfig??{},l=(n=>n?.metadata?.handlerProtocol==="h2")(this.callerClientConfig?.requestHandler)?void 0:this.callerClientConfig?.requestHandler,p$1=this.profileData.region??await this.callerClientConfig?.region?.()??process.env.AWS_REGION,y=new e({credentials:{accessKeyId:"",secretAccessKey:""},region:p$1,requestHandler:l,logger:t,userAgentAppId:i,...this.init?.clientConfig});this.createDPoPInterceptor(y.middlewareStack);let T={tokenInput:{clientId:r.clientId,refreshToken:r.refreshToken,grantType:"refresh_token"}};try{let n=await y.send(new o(T)),{accessKeyId:d,secretAccessKey:a,sessionToken:u}=n.tokenOutput?.accessToken??{},{refreshToken:m,expiresIn:C}=n.tokenOutput??{};if(!d||!a||!u||!m)throw new p("Token refresh response missing required fields",{logger:this.logger,tryNextLink:!1});let I=(C??900)*1e3,f=new Date(Date.now()+I),E={...r,accessToken:{...r.accessToken,accessKeyId:d,secretAccessKey:a,sessionToken:u,expiresAt:f.toISOString()},refreshToken:m};await this.saveToken(E);let w=E.accessToken;return {accessKeyId:w.accessKeyId,secretAccessKey:w.secretAccessKey,sessionToken:w.sessionToken,accountId:w.accountId,expiration:f}}catch(n){if(n.name==="AccessDeniedException"){let d=n.error,a;switch(d){case "TOKEN_EXPIRED":a="Your session has expired. Please reauthenticate.";break;case "USER_CREDENTIALS_CHANGED":a="Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";break;case "INSUFFICIENT_PERMISSIONS":a="Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";break;default:a=`Failed to refresh token: ${String(n)}. Please re-authenticate using \`aws login\``;}throw new p(a,{logger:this.logger,tryNextLink:false})}throw new p(`Failed to refresh token: ${String(n)}. Please re-authenticate using aws login`,{logger:this.logger})}}async loadToken(){let r=this.getTokenFilePath();try{let e;try{e=await y(r,{ignoreCache:this.init?.ignoreCache});}catch{e=await promises.readFile(r,"utf8");}let o=JSON.parse(e),t=["accessToken","clientId","refreshToken","dpopKey"].filter(i=>!o[i]);if(o.accessToken?.accountId||t.push("accountId"),t.length>0)throw new p(`Token validation failed, missing fields: ${t.join(", ")}`,{logger:this.logger,tryNextLink:!1});return o}catch(e){throw new p(`Failed to load token from ${r}: ${String(e)}`,{logger:this.logger,tryNextLink:false})}}async saveToken(r){let e=this.getTokenFilePath(),o=dirname(e);try{await promises.mkdir(o,{recursive:!0});}catch{}await promises.writeFile(e,JSON.stringify(r,null,2),"utf8");}getTokenFilePath(){let r=process.env.AWS_LOGIN_CACHE_DIRECTORY??join(homedir(),".aws","login","cache"),e=Buffer.from(this.loginSession,"utf8"),o=createHash("sha256").update(e).digest("hex");return join(r,`${o}.json`)}derToRawSignature(r){let e=2;if(r[e]!==2)throw new Error("Invalid DER signature");e++;let o=r[e++],t=r.subarray(e,e+o);if(e+=o,r[e]!==2)throw new Error("Invalid DER signature");e++;let i=r[e++],s=r.subarray(e,e+i);t=t[0]===0?t.subarray(1):t,s=s[0]===0?s.subarray(1):s;let l=Buffer.concat([Buffer.alloc(32-t.length),t]),p=Buffer.concat([Buffer.alloc(32-s.length),s]);return Buffer.concat([l,p])}createDPoPInterceptor(r){r.add(e$1=>async o=>{if(e.isInstance(o.request)){let t=o.request,i=`${t.protocol}//${t.hostname}${t.port?`:${t.port}`:""}${t.path}`,s=await this.generateDpop(t.method,i);t.headers={...t.headers,DPoP:s};}return e$1(o)},{step:"finalizeRequest",name:"dpopInterceptor",override:true});}async generateDpop(r="POST",e){let o=await this.loadToken();try{let t=createPrivateKey({key:o.dpopKey,format:"pem",type:"sec1"}),s=createPublicKey(t).export({format:"der",type:"spki"}),l=-1;for(let f=0;f<s.length;f++)if(s[f]===4){l=f;break}let p=s.slice(l+1,l+33),y=s.slice(l+33,l+65),T={alg:"ES256",typ:"dpop+jwt",jwk:{kty:"EC",crv:"P-256",x:p.toString("base64url"),y:y.toString("base64url")}},n={jti:crypto.randomUUID(),htm:r,htu:e,iat:Math.floor(Date.now()/1e3)},d=Buffer.from(JSON.stringify(T)).toString("base64url"),a=Buffer.from(JSON.stringify(n)).toString("base64url"),u=`${d}.${a}`,m=sign("sha256",Buffer.from(u),t),I=this.derToRawSignature(m).toString("base64url");return `${u}.${I}`}catch(t){throw new p(`Failed to generate Dpop proof: ${t instanceof Error?t.message:String(t)}`,{logger:this.logger,tryNextLink:false})}}};var _=g=>async({callerClientConfig:r}={})=>{g?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");let e=await A(g||{}),o=v({profile:g?.profile??r?.profile}),t=e[o];if(!t?.login_session)throw new p(`Profile ${o} does not contain login_session.`,{tryNextLink:true,logger:g?.logger});let s=await new k(t,g,r).loadCredentials();return b(s,"CREDENTIALS_LOGIN","AD")};
3
- export{_ as fromLoginCredentials};
@@ -1,3 +0,0 @@
1
- 'use strict';var chunkLEBM6ZSZ_cjs=require('./chunk-LEBM6ZSZ.cjs'),chunkGNEVCEJU_cjs=require('./chunk-GNEVCEJU.cjs');require('./chunk-LQ3YZTPU.cjs');var chunkBUNLC3II_cjs=require('./chunk-BUNLC3II.cjs'),fs=require('fs');chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var D=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");chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var k="To refresh this SSO session run 'aws sso login' with the corresponding profile.";chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var X=async(e,s={},t)=>{let{SSOOIDCClient:n}=await import('./sso-oidc-54BIRYR6.cjs'),i=p=>s.clientConfig?.[p]??s.parentClientConfig?.[p]??t?.[p];return new n(Object.assign({},s.clientConfig??{},{region:e??s.clientConfig?.region,logger:i("logger"),userAgentAppId:i("userAgentAppId")}))};var z=async(e,s,t={},n)=>{let{CreateTokenCommand:i}=await import('./sso-oidc-54BIRYR6.cjs');return (await X(s,t,n)).send(new i({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};chunkBUNLC3II_cjs.h();var F=e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new chunkGNEVCEJU_cjs.q(`Token is expired. ${k}`,false)};chunkBUNLC3II_cjs.h();var w=(e,s,t=false)=>{if(typeof s>"u")throw new chunkGNEVCEJU_cjs.q(`Value not present for '${e}' in SSO Token${t?". Cannot refresh":""}. ${k}`,false)};chunkBUNLC3II_cjs.h();var{writeFile:Q}=fs.promises,J=(e,s)=>{let t=chunkGNEVCEJU_cjs.w(e),n=JSON.stringify(s,null,2);return Q(t,n)};var V=new Date(0),$=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");let t=await chunkGNEVCEJU_cjs.A(e),n=chunkGNEVCEJU_cjs.v({profile:e.profile??s?.profile}),i=t[n];if(i){if(!i.sso_session)throw new chunkGNEVCEJU_cjs.q(`Profile '${n}' is missing required property 'sso_session'.`)}else throw new chunkGNEVCEJU_cjs.q(`Profile '${n}' could not be found in shared credentials file.`,false);let l=i.sso_session,S=(await chunkGNEVCEJU_cjs.z(e))[l];if(!S)throw new chunkGNEVCEJU_cjs.q(`Sso session '${l}' could not be found in shared credentials file.`,false);for(let a of ["sso_start_url","sso_region"])if(!S[a])throw new chunkGNEVCEJU_cjs.q(`Sso session '${l}' is missing required property '${a}'.`,false);S.sso_start_url;let O=S.sso_region,r;try{r=await chunkGNEVCEJU_cjs.x(l);}catch{throw new chunkGNEVCEJU_cjs.q(`The SSO session token associated with profile=${n} was not found or is invalid. ${k}`,false)}w("accessToken",r.accessToken),w("expiresAt",r.expiresAt);let{accessToken:T,expiresAt:x}=r,c={token:T,expiration:new Date(x)};if(c.expiration.getTime()-Date.now()>3e5)return c;if(Date.now()-V.getTime()<30*1e3)return F(c),c;w("clientId",r.clientId,true),w("clientSecret",r.clientSecret,true),w("refreshToken",r.refreshToken,true);try{V.setTime(Date.now());let a=await z(r,O,e,s);w("accessToken",a.accessToken),w("expiresIn",a.expiresIn);let h=new Date(Date.now()+a.expiresIn*1e3);try{await J(l,{...r,accessToken:a.accessToken,expiresAt:h.toISOString(),refreshToken:a.refreshToken});}catch{}return {token:a.accessToken,expiration:h}}catch{return F(c),c}};var C=false,L=async({ssoStartUrl:e,ssoSession:s,ssoAccountId:t,ssoRegion:n,ssoRoleName:i,ssoClient:l,clientConfig:p,parentClientConfig:S,callerClientConfig:d,profile:O,filepath:r,configFilepath:T,ignoreCache:x,logger:c})=>{let a,h="To refresh this SSO session run aws sso login with the corresponding profile.";if(s)try{let u=await $({profile:O,filepath:r,configFilepath:T,ignoreCache:x,clientConfig:p,parentClientConfig:S,logger:c})({callerClientConfig:d});a={accessToken:u.token,expiresAt:new Date(u.expiration).toISOString()};}catch(u){throw new chunkGNEVCEJU_cjs.p(u.message,{tryNextLink:C,logger:c})}else try{a=await chunkGNEVCEJU_cjs.x(e);}catch{throw new chunkGNEVCEJU_cjs.p(`The SSO session associated with this profile is invalid. ${h}`,{tryNextLink:C,logger:c})}if(new Date(a.expiresAt).getTime()-Date.now()<=0)throw new chunkGNEVCEJU_cjs.p(`The SSO session associated with this profile has expired. ${h}`,{tryNextLink:C,logger:c});let{accessToken:R}=a,{SSOClient:_,GetRoleCredentialsCommand:y}=await import('./loadSso-JY4WDQPS.cjs'),Y=l||new _(Object.assign({},p??{},{logger:p?.logger??d?.logger??S?.logger,region:p?.region??n,userAgentAppId:p?.userAgentAppId??d?.userAgentAppId??S?.userAgentAppId})),b;try{b=await Y.send(new y({accountId:t,roleName:i,accessToken:R}));}catch(u){throw new chunkGNEVCEJU_cjs.p(u,{tryNextLink:C,logger:c})}let{roleCredentials:{accessKeyId:G,secretAccessKey:K,sessionToken:H,expiration:U,credentialScope:j,accountId:q}={}}=b;if(!G||!K||!H||!U)throw new chunkGNEVCEJU_cjs.p("SSO returns an invalid temporary credential.",{tryNextLink:C,logger:c});let v={accessKeyId:G,secretAccessKey:K,sessionToken:H,expiration:new Date(U),...j&&{credentialScope:j},...q&&{accountId:q}};return s?chunkLEBM6ZSZ_cjs.b(v,"CREDENTIALS_SSO","s"):chunkLEBM6ZSZ_cjs.b(v,"CREDENTIALS_SSO_LEGACY","u"),v};chunkBUNLC3II_cjs.h();var M=(e,s)=>{let{sso_start_url:t,sso_account_id:n,sso_region:i,sso_role_name:l}=e;if(!t||!n||!i||!l)throw new chunkGNEVCEJU_cjs.p(`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
- Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:false,logger:s});return e};var ee=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:t,ssoAccountId:n,ssoRegion:i,ssoRoleName:l,ssoSession:p}=e,{ssoClient:S}=e,d=chunkGNEVCEJU_cjs.v({profile:e.profile??s?.profile});if(!t&&!n&&!i&&!l&&!p){let r=(await chunkGNEVCEJU_cjs.A(e))[d];if(!r)throw new chunkGNEVCEJU_cjs.p(`Profile ${d} was not found.`,{logger:e.logger});if(!D(r))throw new chunkGNEVCEJU_cjs.p(`Profile ${d} is not configured with SSO credentials.`,{logger:e.logger});if(r?.sso_session){let _=(await chunkGNEVCEJU_cjs.z(e))[r.sso_session],y=` configurations in profile ${d} and sso-session ${r.sso_session}`;if(i&&i!==_.sso_region)throw new chunkGNEVCEJU_cjs.p("Conflicting SSO region"+y,{tryNextLink:false,logger:e.logger});if(t&&t!==_.sso_start_url)throw new chunkGNEVCEJU_cjs.p("Conflicting SSO start_url"+y,{tryNextLink:false,logger:e.logger});r.sso_region=_.sso_region,r.sso_start_url=_.sso_start_url;}let{sso_start_url:T,sso_account_id:x,sso_region:c,sso_role_name:a,sso_session:h}=M(r,e.logger);return L({ssoStartUrl:T,ssoSession:h,ssoAccountId:x,ssoRegion:c,ssoRoleName:a,ssoClient:S,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:d,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}else {if(!t||!n||!i||!l)throw new chunkGNEVCEJU_cjs.p('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:false,logger:e.logger});return L({ssoStartUrl:t,ssoSession:p,ssoAccountId:n,ssoRegion:i,ssoRoleName:l,ssoClient:S,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:d,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}};
3
- exports.fromSSO=ee;exports.isSsoProfile=D;exports.validateSsoProfile=M;
@@ -1,3 +0,0 @@
1
- import {o,i,C as C$1,p}from'./chunk-JRUQ5ABB.js';import'./chunk-TYQYKKWJ.js';import {g}from'./chunk-Y2YAKDEQ.js';import F from'http';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
2
- g();g();g();var O=e=>!!e&&typeof e=="object"&&typeof e.AccessKeyId=="string"&&typeof e.SecretAccessKey=="string"&&typeof e.Token=="string"&&typeof e.Expiration=="string",D=e=>({accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:new Date(e.Expiration),...e.AccountId&&{accountId:e.AccountId}});g();var G=1e3,H=0,N=({maxRetries:e=0,timeout:t=1e3})=>({maxRetries:e,timeout:t});g();g();function _(e){return new Promise((t,a)=>{let r=F.request({method:"GET",...e,hostname:e.hostname?.replace(/^\[(.+)\]$/,"$1")});r.on("error",n=>{a(Object.assign(new o("Unable to connect to instance metadata service"),n)),r.destroy();}),r.on("timeout",()=>{a(new o("TimeoutError from instance metadata service")),r.destroy();}),r.on("response",n=>{let{statusCode:d=400}=n;(d<200||300<=d)&&(a(Object.assign(new o("Error response received from instance metadata service"),{statusCode:d})),r.destroy());let I=[];n.on("data",l=>{I.push(l);}),n.on("end",()=>{t(Buffer.concat(I)),r.destroy();});}),r.end();})}g();var v=(e,t)=>{let a=e();for(let r=0;r<t;r++)a=a.catch(e);return a};var C="AWS_CONTAINER_CREDENTIALS_FULL_URI",w="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",x="AWS_CONTAINER_AUTHORIZATION_TOKEN",q=(e={})=>{let{timeout:t,maxRetries:a}=N(e);return ()=>v(async()=>{let r=await z({logger:e.logger}),n=JSON.parse(await j(t,r));if(!O(n))throw new p("Invalid response received from instance metadata service.",{logger:e.logger});return D(n)},a)},j=async(e,t)=>(process.env[x]&&(t.headers={...t.headers,Authorization:process.env[x]}),(await _({...t,timeout:e})).toString()),Y="169.254.170.2",J=new Set(["localhost","127.0.0.1"]),X=new Set(["http:","https:"]),z=async({logger:e})=>{if(process.env[w])return {hostname:Y,path:process.env[w]};if(process.env[C]){let t;try{t=new URL(process.env[C]);}catch{throw new p(`${process.env[C]} is not a valid container metadata service URL`,{tryNextLink:false,logger:e})}if(!t.hostname||!J.has(t.hostname))throw new p(`${t.hostname} is not a valid container metadata service hostname`,{tryNextLink:false,logger:e});if(!t.protocol||!X.has(t.protocol))throw new p(`${t.protocol} is not a valid container metadata service protocol`,{tryNextLink:false,logger:e});return {protocol:t.protocol,hostname:t.hostname,path:t.pathname+t.search,port:t.port?parseInt(t.port,10):void 0}}throw new p(`The container metadata credential provider cannot be used unless the ${w} or ${C} environment variable is set`,{tryNextLink:false,logger:e})};g();g();var M=class e extends p{tryNextLink;name="InstanceMetadataV1FallbackError";constructor(t,a=true){super(t,a),this.tryNextLink=a,Object.setPrototypeOf(this,e.prototype);}};g();g();var A;(function(e){e.IPv4="http://169.254.169.254",e.IPv6="http://[fd00:ec2::254]";})(A||(A={}));g();var Z="AWS_EC2_METADATA_SERVICE_ENDPOINT",Q="ec2_metadata_service_endpoint",b={environmentVariableSelector:e=>e[Z],configFileSelector:e=>e[Q],default:void 0};g();var E;(function(e){e.IPv4="IPv4",e.IPv6="IPv6";})(E||(E={}));g();var ee="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",te="ec2_metadata_service_endpoint_mode",V={environmentVariableSelector:e=>e[ee],configFileSelector:e=>e[te],default:E.IPv4};var R=async()=>i(await oe()||await re()),oe=async()=>C$1(b)(),re=async()=>{let e=await C$1(V)();switch(e){case E.IPv4:return A.IPv4;case E.IPv6:return A.IPv6;default:throw new Error(`Unsupported endpoint mode: ${e}. Select from ${Object.values(E)}`)}};g();g();var ne="https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html",y=(e,t)=>{let a=300+Math.floor(Math.random()*300),r=new Date(Date.now()+a*1e3);t.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(r)}.
3
- For more information, please visit: `+ne);let n=e.originalExpiration??e.expiration;return {...e,...n?{originalExpiration:n}:{},expiration:r}};var k=(e,t={})=>{let a=t?.logger||console,r;return async()=>{let n;try{n=await e(),n.expiration&&n.expiration.getTime()<Date.now()&&(n=y(n,a));}catch(d){if(r)a.warn("Credential renew failed: ",d),n=y(r,a);else throw d}return r=n,n}};var K="/latest/meta-data/iam/security-credentials/",ae="/latest/api/token",P="AWS_EC2_METADATA_V1_DISABLED",U="ec2_metadata_v1_disabled",W="x-aws-ec2-metadata-token",se=(e={})=>k(ie(e),{logger:e.logger}),ie=(e={})=>{let t=false,{logger:a,profile:r}=e,{timeout:n,maxRetries:d}=N(e),I=async(l,T)=>{if(t||T.headers?.[W]==null){let p$1=false,m=false,B=await C$1({environmentVariableSelector:f=>{let u=f[P];if(m=!!u&&u!=="false",u===void 0)throw new p(`${P} not set in env, checking config file next.`,{logger:e.logger});return m},configFileSelector:f=>{let u=f[U];return p$1=!!u&&u!=="false",p$1},default:false},{profile:r})();if(e.ec2MetadataV1Disabled||B){let f=[];throw e.ec2MetadataV1Disabled&&f.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"),p$1&&f.push(`config file profile (${U})`),m&&f.push(`process environment variable (${P})`),new M(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${f.join(", ")}].`)}}let $=(await v(async()=>{let p;try{p=await de(T);}catch(m){throw m.statusCode===401&&(t=false),m}return p},l)).trim();return v(async()=>{let p;try{p=await le($,T,e);}catch(m){throw m.statusCode===401&&(t=false),m}return p},l)};return async()=>{let l=await R();if(t)return a?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),I(d,{...l,timeout:n});{let T;try{T=(await ce({...l,timeout:n})).toString();}catch(S){if(S?.statusCode===400)throw Object.assign(S,{message:"EC2 Metadata token request returned error"});return (S.message==="TimeoutError"||[403,404,405].includes(S.statusCode))&&(t=true),a?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),I(d,{...l,timeout:n})}return I(d,{...l,headers:{[W]:T},timeout:n})}}},ce=async e=>_({...e,path:ae,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),de=async e=>(await _({...e,path:K})).toString(),le=async(e,t,a)=>{let r=JSON.parse((await _({...t,path:K+e})).toString());if(!O(r))throw new p("Invalid response received from instance metadata service.",{logger:a.logger});return D(r)};export{H as DEFAULT_MAX_RETRIES,G as DEFAULT_TIMEOUT,x as ENV_CMDS_AUTH_TOKEN,C as ENV_CMDS_FULL_URI,w as ENV_CMDS_RELATIVE_URI,A as Endpoint,q as fromContainerMetadata,se as fromInstanceMetadata,R as getInstanceMetadataEndpoint,_ as httpRequest,N as providerConfigFromInit};
@@ -1 +0,0 @@
1
- 'use strict';var chunkNGNJSUGL_cjs=require('./chunk-NGNJSUGL.cjs'),chunkBCEE4NBZ_cjs=require('./chunk-BCEE4NBZ.cjs'),chunkVRZC4TTF_cjs=require('./chunk-VRZC4TTF.cjs');require('./chunk-BUNLC3II.cjs');Object.defineProperty(exports,"avg",{enumerable:true,get:function(){return chunkNGNJSUGL_cjs.c}});Object.defineProperty(exports,"avgDistinct",{enumerable:true,get:function(){return chunkNGNJSUGL_cjs.d}});Object.defineProperty(exports,"cosineDistance",{enumerable:true,get:function(){return chunkNGNJSUGL_cjs.l}});Object.defineProperty(exports,"count",{enumerable:true,get:function(){return chunkNGNJSUGL_cjs.a}});Object.defineProperty(exports,"countDistinct",{enumerable:true,get:function(){return chunkNGNJSUGL_cjs.b}});Object.defineProperty(exports,"hammingDistance",{enumerable:true,get:function(){return chunkNGNJSUGL_cjs.m}});Object.defineProperty(exports,"innerProduct",{enumerable:true,get:function(){return chunkNGNJSUGL_cjs.k}});Object.defineProperty(exports,"jaccardDistance",{enumerable:true,get:function(){return chunkNGNJSUGL_cjs.n}});Object.defineProperty(exports,"l1Distance",{enumerable:true,get:function(){return chunkNGNJSUGL_cjs.j}});Object.defineProperty(exports,"l2Distance",{enumerable:true,get:function(){return chunkNGNJSUGL_cjs.i}});Object.defineProperty(exports,"max",{enumerable:true,get:function(){return chunkNGNJSUGL_cjs.g}});Object.defineProperty(exports,"min",{enumerable:true,get:function(){return chunkNGNJSUGL_cjs.h}});Object.defineProperty(exports,"sum",{enumerable:true,get:function(){return chunkNGNJSUGL_cjs.e}});Object.defineProperty(exports,"sumDistinct",{enumerable:true,get:function(){return chunkNGNJSUGL_cjs.f}});Object.defineProperty(exports,"ColumnAliasProxyHandler",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.a}});Object.defineProperty(exports,"ConsoleLogWriter",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs._}});Object.defineProperty(exports,"DefaultLogger",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.$}});Object.defineProperty(exports,"DrizzleError",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.j}});Object.defineProperty(exports,"DrizzleQueryError",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.k}});Object.defineProperty(exports,"Many",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.Q}});Object.defineProperty(exports,"NoopLogger",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.aa}});Object.defineProperty(exports,"One",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.P}});Object.defineProperty(exports,"QueryPromise",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.i}});Object.defineProperty(exports,"Relation",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.N}});Object.defineProperty(exports,"RelationTableAliasProxyHandler",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.c}});Object.defineProperty(exports,"Relations",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.O}});Object.defineProperty(exports,"TableAliasProxyHandler",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.b}});Object.defineProperty(exports,"TransactionRollbackError",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.l}});Object.defineProperty(exports,"aliasedRelation",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.e}});Object.defineProperty(exports,"aliasedTable",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.d}});Object.defineProperty(exports,"aliasedTableColumn",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.f}});Object.defineProperty(exports,"and",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.p}});Object.defineProperty(exports,"arrayContained",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.J}});Object.defineProperty(exports,"arrayContains",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.I}});Object.defineProperty(exports,"arrayOverlaps",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.K}});Object.defineProperty(exports,"asc",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.L}});Object.defineProperty(exports,"between",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.C}});Object.defineProperty(exports,"bindIfParam",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.m}});Object.defineProperty(exports,"createMany",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.W}});Object.defineProperty(exports,"createOne",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.V}});Object.defineProperty(exports,"createTableRelationsHelpers",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.Y}});Object.defineProperty(exports,"desc",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.M}});Object.defineProperty(exports,"eq",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.n}});Object.defineProperty(exports,"exists",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.A}});Object.defineProperty(exports,"extractTablesRelationalConfig",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.T}});Object.defineProperty(exports,"getOperators",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.R}});Object.defineProperty(exports,"getOrderByOperators",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.S}});Object.defineProperty(exports,"gt",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.s}});Object.defineProperty(exports,"gte",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.t}});Object.defineProperty(exports,"ilike",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.G}});Object.defineProperty(exports,"inArray",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.w}});Object.defineProperty(exports,"isNotNull",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.z}});Object.defineProperty(exports,"isNull",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.y}});Object.defineProperty(exports,"like",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.E}});Object.defineProperty(exports,"lt",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.u}});Object.defineProperty(exports,"lte",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.v}});Object.defineProperty(exports,"mapColumnsInAliasedSQLToAlias",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.g}});Object.defineProperty(exports,"mapColumnsInSQLToAlias",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.h}});Object.defineProperty(exports,"mapRelationalRow",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.Z}});Object.defineProperty(exports,"ne",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.o}});Object.defineProperty(exports,"normalizeRelation",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.X}});Object.defineProperty(exports,"not",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.r}});Object.defineProperty(exports,"notBetween",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.D}});Object.defineProperty(exports,"notExists",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.B}});Object.defineProperty(exports,"notIlike",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.H}});Object.defineProperty(exports,"notInArray",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.x}});Object.defineProperty(exports,"notLike",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.F}});Object.defineProperty(exports,"or",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.q}});Object.defineProperty(exports,"relations",{enumerable:true,get:function(){return chunkBCEE4NBZ_cjs.U}});Object.defineProperty(exports,"BaseName",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.q}});Object.defineProperty(exports,"Column",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.d}});Object.defineProperty(exports,"ColumnBuilder",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.e}});Object.defineProperty(exports,"Columns",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.n}});Object.defineProperty(exports,"ExtraConfigBuilder",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.s}});Object.defineProperty(exports,"ExtraConfigColumns",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.o}});Object.defineProperty(exports,"FakePrimitiveParam",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.x}});Object.defineProperty(exports,"IsAlias",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.r}});Object.defineProperty(exports,"Name",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.B}});Object.defineProperty(exports,"OriginalName",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.p}});Object.defineProperty(exports,"Param",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.H}});Object.defineProperty(exports,"Placeholder",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.K}});Object.defineProperty(exports,"SQL",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.A}});Object.defineProperty(exports,"Schema",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.m}});Object.defineProperty(exports,"StringChunk",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.z}});Object.defineProperty(exports,"Subquery",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.i}});Object.defineProperty(exports,"Table",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.t}});Object.defineProperty(exports,"View",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.N}});Object.defineProperty(exports,"ViewBaseConfig",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.l}});Object.defineProperty(exports,"WithSubquery",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.j}});Object.defineProperty(exports,"applyMixins",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.U}});Object.defineProperty(exports,"entityKind",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.a}});Object.defineProperty(exports,"fillPlaceholders",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.M}});Object.defineProperty(exports,"getColumnNameAndConfig",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.Y}});Object.defineProperty(exports,"getTableColumns",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.V}});Object.defineProperty(exports,"getTableLikeName",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.X}});Object.defineProperty(exports,"getTableName",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.v}});Object.defineProperty(exports,"getTableUniqueName",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.w}});Object.defineProperty(exports,"getViewName",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.P}});Object.defineProperty(exports,"getViewSelectedFields",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.W}});Object.defineProperty(exports,"hasOwnEntityKind",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.b}});Object.defineProperty(exports,"haveSameKeys",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.S}});Object.defineProperty(exports,"is",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.c}});Object.defineProperty(exports,"isConfig",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.Z}});Object.defineProperty(exports,"isDriverValueEncoder",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.D}});Object.defineProperty(exports,"isSQLWrapper",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.y}});Object.defineProperty(exports,"isTable",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.u}});Object.defineProperty(exports,"isView",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.O}});Object.defineProperty(exports,"mapResultRow",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.Q}});Object.defineProperty(exports,"mapUpdateSet",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.T}});Object.defineProperty(exports,"name",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.C}});Object.defineProperty(exports,"noopDecoder",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.E}});Object.defineProperty(exports,"noopEncoder",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.F}});Object.defineProperty(exports,"noopMapper",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.G}});Object.defineProperty(exports,"orderSelectedFields",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.R}});Object.defineProperty(exports,"param",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.I}});Object.defineProperty(exports,"placeholder",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.L}});Object.defineProperty(exports,"sql",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs.J}});Object.defineProperty(exports,"textDecoder",{enumerable:true,get:function(){return chunkVRZC4TTF_cjs._}});
@@ -1 +0,0 @@
1
- export{c as avg,d as avgDistinct,l as cosineDistance,a as count,b as countDistinct,m as hammingDistance,k as innerProduct,n as jaccardDistance,j as l1Distance,i as l2Distance,g as max,h as min,e as sum,f as sumDistinct}from'./chunk-EML5FDUU.js';export{a as ColumnAliasProxyHandler,_ as ConsoleLogWriter,$ as DefaultLogger,j as DrizzleError,k as DrizzleQueryError,Q as Many,aa as NoopLogger,P as One,i as QueryPromise,N as Relation,c as RelationTableAliasProxyHandler,O as Relations,b as TableAliasProxyHandler,l as TransactionRollbackError,e as aliasedRelation,d as aliasedTable,f as aliasedTableColumn,p as and,J as arrayContained,I as arrayContains,K as arrayOverlaps,L as asc,C as between,m as bindIfParam,W as createMany,V as createOne,Y as createTableRelationsHelpers,M as desc,n as eq,A as exists,T as extractTablesRelationalConfig,R as getOperators,S as getOrderByOperators,s as gt,t as gte,G as ilike,w as inArray,z as isNotNull,y as isNull,E as like,u as lt,v as lte,g as mapColumnsInAliasedSQLToAlias,h as mapColumnsInSQLToAlias,Z as mapRelationalRow,o as ne,X as normalizeRelation,r as not,D as notBetween,B as notExists,H as notIlike,x as notInArray,F as notLike,q as or,U as relations}from'./chunk-HRAY65XH.js';export{q as BaseName,d as Column,e as ColumnBuilder,n as Columns,s as ExtraConfigBuilder,o as ExtraConfigColumns,x as FakePrimitiveParam,r as IsAlias,B as Name,p as OriginalName,H as Param,K as Placeholder,A as SQL,m as Schema,z as StringChunk,i as Subquery,t as Table,N as View,l as ViewBaseConfig,j as WithSubquery,U as applyMixins,a as entityKind,M as fillPlaceholders,Y as getColumnNameAndConfig,V as getTableColumns,X as getTableLikeName,v as getTableName,w as getTableUniqueName,P as getViewName,W as getViewSelectedFields,b as hasOwnEntityKind,S as haveSameKeys,c as is,Z as isConfig,D as isDriverValueEncoder,y as isSQLWrapper,u as isTable,O as isView,Q as mapResultRow,T as mapUpdateSet,C as name,E as noopDecoder,F as noopEncoder,G as noopMapper,R as orderSelectedFields,I as param,L as placeholder,J as sql,_ as textDecoder}from'./chunk-3NSZZCOJ.js';import'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
@@ -1 +0,0 @@
1
- export{c as EventStreamCodec,m as EventStreamMarshaller,r as EventStreamSerde,b as HeaderMarshaller,a as Int64,d as MessageDecoderStream,e as MessageEncoderStream,f as SmithyMessageDecoderStream,g as SmithyMessageEncoderStream,k as UniversalEventStreamMarshaller,n as eventStreamSerdeProvider,h as getChunkedStream,j as getMessageUnmarshaller,i as getUnmarshalledStream,p as iterableToReadableStream,o as readableStreamToIterable,q as resolveEventStreamSerdeConfig,l as universalEventStreamSerdeProvider}from'./chunk-WPM6LFCY.js';import'./chunk-U6KFONKM.js';import'./chunk-TYQYKKWJ.js';import'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
@@ -1 +0,0 @@
1
- 'use strict';var chunk3VXEK5ZW_cjs=require('./chunk-3VXEK5ZW.cjs');require('./chunk-EZIDQBXI.cjs'),require('./chunk-LQ3YZTPU.cjs'),require('./chunk-BUNLC3II.cjs');Object.defineProperty(exports,"EventStreamCodec",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.c}});Object.defineProperty(exports,"EventStreamMarshaller",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.m}});Object.defineProperty(exports,"EventStreamSerde",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.r}});Object.defineProperty(exports,"HeaderMarshaller",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.b}});Object.defineProperty(exports,"Int64",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.a}});Object.defineProperty(exports,"MessageDecoderStream",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.d}});Object.defineProperty(exports,"MessageEncoderStream",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.e}});Object.defineProperty(exports,"SmithyMessageDecoderStream",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.f}});Object.defineProperty(exports,"SmithyMessageEncoderStream",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.g}});Object.defineProperty(exports,"UniversalEventStreamMarshaller",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.k}});Object.defineProperty(exports,"eventStreamSerdeProvider",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.n}});Object.defineProperty(exports,"getChunkedStream",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.h}});Object.defineProperty(exports,"getMessageUnmarshaller",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.j}});Object.defineProperty(exports,"getUnmarshalledStream",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.i}});Object.defineProperty(exports,"iterableToReadableStream",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.p}});Object.defineProperty(exports,"readableStreamToIterable",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.o}});Object.defineProperty(exports,"resolveEventStreamSerdeConfig",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.q}});Object.defineProperty(exports,"universalEventStreamSerdeProvider",{enumerable:true,get:function(){return chunk3VXEK5ZW_cjs.l}});
@@ -1 +0,0 @@
1
- export{a as default}from'./chunk-RPRGGGIW.js';import'./chunk-YENNL5HG.js';import'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
@@ -1 +0,0 @@
1
- 'use strict';var chunkKZHXYXSH_cjs=require('./chunk-KZHXYXSH.cjs');require('./chunk-MCIZG4A3.cjs'),require('./chunk-BUNLC3II.cjs');module.exports=chunkKZHXYXSH_cjs.a;
@@ -1,105 +0,0 @@
1
- import { S as StorageConfig, a as StorageProvider, C as CollectionConfig, G as GlobalConfig, K as KyroPlugin } from './types-BCOhfwHC.js';
2
- import { F as Field } from './types-DxaK39ix.js';
3
- import { ZodTypeAny } from 'zod';
4
-
5
- interface StorageProviderRegistration {
6
- type: string;
7
- displayName: string;
8
- pluginName?: string;
9
- configFields: Field[];
10
- configKey?: string;
11
- extractConfig: (storageConfig: StorageConfig, configKey: string) => any;
12
- extractRawConfig: (config: any) => any;
13
- factory: (config: any) => StorageProvider;
14
- }
15
- declare class StorageProviderRegistry {
16
- private providers;
17
- private providerToPlugin;
18
- private disabledPlugins;
19
- constructor();
20
- private registerLocal;
21
- private registerImgix;
22
- private registerBunny;
23
- private registerCloudflareR2;
24
- private registerCloudflareS3;
25
- register(registration: StorageProviderRegistration): void;
26
- unregister(type: string): void;
27
- get(type: string): StorageProviderRegistration | undefined;
28
- getAll(): StorageProviderRegistration[];
29
- getAllAvailable(isPluginEnabled?: (name: string) => boolean): StorageProviderRegistration[];
30
- has(type: string): boolean;
31
- resolve(type: string, storageConfig: StorageConfig): Promise<StorageProvider>;
32
- resolveWithConfig(type: string, config: any): Promise<StorageProvider>;
33
- getProviderPluginName(type: string): string | undefined;
34
- getAllPluginNames(): string[];
35
- setPluginEnabled(name: string, enabled: boolean): void;
36
- isPluginEnabled(name: string): boolean;
37
- }
38
-
39
- declare class Registry {
40
- storageProviders: StorageProviderRegistry;
41
- private collections;
42
- private globals;
43
- private plugins;
44
- private schemaCache;
45
- private initialized;
46
- addCollection(config: CollectionConfig): void;
47
- addCollections(configs: CollectionConfig[]): void;
48
- getCollection(slug: string): CollectionConfig | undefined;
49
- getCollections(): CollectionConfig[];
50
- getCollectionSlugs(): string[];
51
- hasCollection(slug: string): boolean;
52
- removeCollection(slug: string): boolean;
53
- addGlobal(config: GlobalConfig): void;
54
- /**
55
- * Add a global after the registry is already initialized.
56
- * Only for internal use (e.g. storage settings form built at startup).
57
- */
58
- addGlobalPostInit(config: GlobalConfig): void;
59
- private _addGlobalUnsafe;
60
- addGlobals(configs: GlobalConfig[]): void;
61
- getGlobal(slug: string): GlobalConfig | undefined;
62
- getGlobals(): GlobalConfig[];
63
- getGlobalSlugs(): string[];
64
- hasGlobal(slug: string): boolean;
65
- removeGlobal(slug: string): boolean;
66
- addPlugin(plugin: KyroPlugin): void;
67
- getPlugins(): KyroPlugin[];
68
- getZodSchema(slug: string): ZodTypeAny;
69
- getCreateZodSchema(slug: string): ZodTypeAny;
70
- getUpdateZodSchema(slug: string): ZodTypeAny;
71
- getWhereZodSchema(slug: string): ZodTypeAny;
72
- getFieldZodSchema(field: Field): ZodTypeAny;
73
- private clearSchemaCache;
74
- private applyFieldDefaults;
75
- getFields(slug: string): Field[];
76
- getFieldMap(slug: string): Map<string, Field>;
77
- getVisibleFields(slug: string): Field[];
78
- validate(): void;
79
- init(kyroInstance?: any): Promise<void>;
80
- isInitialized(): boolean;
81
- getPaginationDefaults(slug: string): {
82
- defaultLimit: number;
83
- limits: number[];
84
- };
85
- getDefaultSort(slug: string): string;
86
- getDefaultColumns(slug: string): string[];
87
- getAdminTitle(slug: string): string;
88
- getAdminLabel(slug: string): string;
89
- getAdminGroup(slug: string): string | undefined;
90
- getStats(): {
91
- collections: number;
92
- globals: number;
93
- plugins: number;
94
- fields: number;
95
- };
96
- toJSON(): {
97
- collections: CollectionConfig[];
98
- globals: GlobalConfig[];
99
- };
100
- }
101
- declare function getRegistry(): Registry;
102
- declare function resetRegistry(): void;
103
- declare function createRegistry(): Registry;
104
-
105
- export { Registry as R, createRegistry as c, getRegistry as g, resetRegistry as r };
@@ -1,105 +0,0 @@
1
- import { S as StorageConfig, a as StorageProvider, C as CollectionConfig, G as GlobalConfig, K as KyroPlugin } from './types-QglJ7PwT.cjs';
2
- import { F as Field } from './types-DxaK39ix.cjs';
3
- import { ZodTypeAny } from 'zod';
4
-
5
- interface StorageProviderRegistration {
6
- type: string;
7
- displayName: string;
8
- pluginName?: string;
9
- configFields: Field[];
10
- configKey?: string;
11
- extractConfig: (storageConfig: StorageConfig, configKey: string) => any;
12
- extractRawConfig: (config: any) => any;
13
- factory: (config: any) => StorageProvider;
14
- }
15
- declare class StorageProviderRegistry {
16
- private providers;
17
- private providerToPlugin;
18
- private disabledPlugins;
19
- constructor();
20
- private registerLocal;
21
- private registerImgix;
22
- private registerBunny;
23
- private registerCloudflareR2;
24
- private registerCloudflareS3;
25
- register(registration: StorageProviderRegistration): void;
26
- unregister(type: string): void;
27
- get(type: string): StorageProviderRegistration | undefined;
28
- getAll(): StorageProviderRegistration[];
29
- getAllAvailable(isPluginEnabled?: (name: string) => boolean): StorageProviderRegistration[];
30
- has(type: string): boolean;
31
- resolve(type: string, storageConfig: StorageConfig): Promise<StorageProvider>;
32
- resolveWithConfig(type: string, config: any): Promise<StorageProvider>;
33
- getProviderPluginName(type: string): string | undefined;
34
- getAllPluginNames(): string[];
35
- setPluginEnabled(name: string, enabled: boolean): void;
36
- isPluginEnabled(name: string): boolean;
37
- }
38
-
39
- declare class Registry {
40
- storageProviders: StorageProviderRegistry;
41
- private collections;
42
- private globals;
43
- private plugins;
44
- private schemaCache;
45
- private initialized;
46
- addCollection(config: CollectionConfig): void;
47
- addCollections(configs: CollectionConfig[]): void;
48
- getCollection(slug: string): CollectionConfig | undefined;
49
- getCollections(): CollectionConfig[];
50
- getCollectionSlugs(): string[];
51
- hasCollection(slug: string): boolean;
52
- removeCollection(slug: string): boolean;
53
- addGlobal(config: GlobalConfig): void;
54
- /**
55
- * Add a global after the registry is already initialized.
56
- * Only for internal use (e.g. storage settings form built at startup).
57
- */
58
- addGlobalPostInit(config: GlobalConfig): void;
59
- private _addGlobalUnsafe;
60
- addGlobals(configs: GlobalConfig[]): void;
61
- getGlobal(slug: string): GlobalConfig | undefined;
62
- getGlobals(): GlobalConfig[];
63
- getGlobalSlugs(): string[];
64
- hasGlobal(slug: string): boolean;
65
- removeGlobal(slug: string): boolean;
66
- addPlugin(plugin: KyroPlugin): void;
67
- getPlugins(): KyroPlugin[];
68
- getZodSchema(slug: string): ZodTypeAny;
69
- getCreateZodSchema(slug: string): ZodTypeAny;
70
- getUpdateZodSchema(slug: string): ZodTypeAny;
71
- getWhereZodSchema(slug: string): ZodTypeAny;
72
- getFieldZodSchema(field: Field): ZodTypeAny;
73
- private clearSchemaCache;
74
- private applyFieldDefaults;
75
- getFields(slug: string): Field[];
76
- getFieldMap(slug: string): Map<string, Field>;
77
- getVisibleFields(slug: string): Field[];
78
- validate(): void;
79
- init(kyroInstance?: any): Promise<void>;
80
- isInitialized(): boolean;
81
- getPaginationDefaults(slug: string): {
82
- defaultLimit: number;
83
- limits: number[];
84
- };
85
- getDefaultSort(slug: string): string;
86
- getDefaultColumns(slug: string): string[];
87
- getAdminTitle(slug: string): string;
88
- getAdminLabel(slug: string): string;
89
- getAdminGroup(slug: string): string | undefined;
90
- getStats(): {
91
- collections: number;
92
- globals: number;
93
- plugins: number;
94
- fields: number;
95
- };
96
- toJSON(): {
97
- collections: CollectionConfig[];
98
- globals: GlobalConfig[];
99
- };
100
- }
101
- declare function getRegistry(): Registry;
102
- declare function resetRegistry(): void;
103
- declare function createRegistry(): Registry;
104
-
105
- export { Registry as R, createRegistry as c, getRegistry as g, resetRegistry as r };