@stacksjs/buddy 0.68.2 → 0.69.2

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 (188) hide show
  1. package/README.md +1 -1
  2. package/dist/chunk-0ara6h0a.js +2 -0
  3. package/dist/chunk-0pxb6cz2.js +3 -0
  4. package/dist/chunk-1v5v7cn7.js +2 -0
  5. package/dist/chunk-3v3zq8w4.js +2 -0
  6. package/dist/{chunk-jr4naxsv.js → chunk-3yp4xe8e.js} +1 -1
  7. package/dist/{chunk-3wpw5xgd.js → chunk-5d1pmfaj.js} +1 -1
  8. package/dist/chunk-7dhp3rzj.js +61 -0
  9. package/dist/chunk-8y9rns0z.js +2 -0
  10. package/dist/chunk-c0awzy8k.js +10 -0
  11. package/dist/chunk-c6ermrr1.js +3 -0
  12. package/dist/{chunk-8gx9at51.js → chunk-cdnqz7bt.js} +1 -1
  13. package/dist/{chunk-27ksm11g.js → chunk-f0ywgmn1.js} +2 -2
  14. package/dist/chunk-fzqy272g.js +2 -0
  15. package/dist/chunk-hmvbpz4z.js +25 -0
  16. package/dist/chunk-kqn7aa4r.js +5442 -0
  17. package/dist/chunk-n337bav6.js +5 -0
  18. package/dist/chunk-rez6aknn.js +29 -0
  19. package/dist/chunk-rvzykrtp.js +10 -0
  20. package/dist/{chunk-b3wr7cpk.js → chunk-tnqbven5.js} +2 -2
  21. package/dist/{chunk-25nxsybw.js → chunk-vs0pve8j.js} +2 -2
  22. package/dist/{chunk-hgrs6wcy.js → chunk-x4zbf5c8.js} +1 -1
  23. package/dist/{chunk-z1h35hsa.js → chunk-xqcyxfy4.js} +2 -1
  24. package/dist/{chunk-0q0jn0kk.js → chunk-yajm5bx9.js} +1 -1
  25. package/dist/chunk-ybkvyfqx.js +2 -0
  26. package/dist/{chunk-f0ksrase.js → chunk-zmz07e1t.js} +2 -2
  27. package/dist/chunk-zxexe5eh.js +2 -0
  28. package/dist/cli.js +1 -1
  29. package/dist/index.js +1 -1
  30. package/dist/ports.d.ts +0 -1
  31. package/dist/queue.d.ts +3 -0
  32. package/dist/schedule.d.ts +3 -0
  33. package/dist/search.d.ts +3 -0
  34. package/package.json +54 -55
  35. package/dist/chunk-06g79v9j.js +0 -2
  36. package/dist/chunk-08bm2xax.js +0 -2
  37. package/dist/chunk-0enrsn65.js +0 -978
  38. package/dist/chunk-0m218zhk.js +0 -2
  39. package/dist/chunk-0qvaepnz.js +0 -2
  40. package/dist/chunk-0yyhz107.js +0 -2
  41. package/dist/chunk-11vhe2za.js +0 -2
  42. package/dist/chunk-13143jmy.js +0 -3
  43. package/dist/chunk-1agj4qty.js +0 -2
  44. package/dist/chunk-1c4yywmn.js +0 -9
  45. package/dist/chunk-1e2f0z80.js +0 -2
  46. package/dist/chunk-1v13dkfw.js +0 -2
  47. package/dist/chunk-20e0mpcw.js +0 -9
  48. package/dist/chunk-2mhj5ght.js +0 -2
  49. package/dist/chunk-2wrs9p57.js +0 -1
  50. package/dist/chunk-2yj4j69j.js +0 -2
  51. package/dist/chunk-2ymn50ck.js +0 -2
  52. package/dist/chunk-3vjfkr7v.js +0 -978
  53. package/dist/chunk-3y0gapf6.js +0 -2
  54. package/dist/chunk-4rb5r88h.js +0 -978
  55. package/dist/chunk-4wb68jfr.js +0 -2
  56. package/dist/chunk-5ewcj9vd.js +0 -2
  57. package/dist/chunk-5fm9mfqs.js +0 -2
  58. package/dist/chunk-5jhkn5by.js +0 -2
  59. package/dist/chunk-5m9xts4v.js +0 -2
  60. package/dist/chunk-63pxna7y.js +0 -978
  61. package/dist/chunk-6sqy7049.js +0 -2
  62. package/dist/chunk-6yazdvb4.js +0 -2
  63. package/dist/chunk-746p83dw.js +0 -2
  64. package/dist/chunk-76g7tr80.js +0 -2
  65. package/dist/chunk-7fz1p8p3.js +0 -10
  66. package/dist/chunk-814adsn3.js +0 -2
  67. package/dist/chunk-831wk0b3.js +0 -2
  68. package/dist/chunk-833tanrb.js +0 -2
  69. package/dist/chunk-8cx90pvv.js +0 -2
  70. package/dist/chunk-8yky4bsd.js +0 -10
  71. package/dist/chunk-91pnyybg.js +0 -9
  72. package/dist/chunk-99syj1p0.js +0 -2
  73. package/dist/chunk-9bxh78vd.js +0 -5
  74. package/dist/chunk-9jaqey2q.js +0 -2
  75. package/dist/chunk-9tyaew40.js +0 -2
  76. package/dist/chunk-9zcyq5gh.js +0 -2
  77. package/dist/chunk-a4g1e1n0.js +0 -2
  78. package/dist/chunk-a6g2jk1y.js +0 -2
  79. package/dist/chunk-aaqd43t5.js +0 -2
  80. package/dist/chunk-adswb3gq.js +0 -2
  81. package/dist/chunk-akkmfscs.js +0 -978
  82. package/dist/chunk-atnw2cq3.js +0 -2
  83. package/dist/chunk-avdharmq.js +0 -2
  84. package/dist/chunk-b13gbfg3.js +0 -2
  85. package/dist/chunk-bngyck4v.js +0 -2
  86. package/dist/chunk-brb5zthb.js +0 -1
  87. package/dist/chunk-bx2vf8g7.js +0 -5
  88. package/dist/chunk-c343n0yt.js +0 -2
  89. package/dist/chunk-c4msw6hf.js +0 -2
  90. package/dist/chunk-cdwpqzrw.js +0 -2
  91. package/dist/chunk-cm7bwdk9.js +0 -2
  92. package/dist/chunk-cs5k02gt.js +0 -1
  93. package/dist/chunk-cv8f2v27.js +0 -2
  94. package/dist/chunk-d2dbhn2h.js +0 -2
  95. package/dist/chunk-d3awsfqm.js +0 -9
  96. package/dist/chunk-d9q17hb8.js +0 -2
  97. package/dist/chunk-dw62d69f.js +0 -2
  98. package/dist/chunk-e8p8v7ca.js +0 -978
  99. package/dist/chunk-ehhrhkwe.js +0 -9
  100. package/dist/chunk-enhf12a1.js +0 -2
  101. package/dist/chunk-f2d9w3nr.js +0 -2
  102. package/dist/chunk-f3y73e4b.js +0 -6
  103. package/dist/chunk-fe3xb8z9.js +0 -2
  104. package/dist/chunk-fg5gh4dn.js +0 -2
  105. package/dist/chunk-fh4rw8kr.js +0 -5
  106. package/dist/chunk-fxsv4p5c.js +0 -8
  107. package/dist/chunk-gezc36zy.js +0 -2
  108. package/dist/chunk-gg80s18j.js +0 -2
  109. package/dist/chunk-gjefq0nq.js +0 -2
  110. package/dist/chunk-h5saw32v.js +0 -2
  111. package/dist/chunk-ha75r57f.js +0 -8
  112. package/dist/chunk-hrsat16n.js +0 -8
  113. package/dist/chunk-hxy5t7tm.js +0 -10
  114. package/dist/chunk-hzfqtj82.js +0 -2
  115. package/dist/chunk-j2n86dsz.js +0 -2
  116. package/dist/chunk-jbpgmjzs.js +0 -2
  117. package/dist/chunk-jg68fsnk.js +0 -10
  118. package/dist/chunk-jhvjhf1j.js +0 -2
  119. package/dist/chunk-jms0s1vh.js +0 -6
  120. package/dist/chunk-js6y6fm1.js +0 -2
  121. package/dist/chunk-jtax0mpm.js +0 -2
  122. package/dist/chunk-k59kbbvm.js +0 -2
  123. package/dist/chunk-kanz993c.js +0 -2
  124. package/dist/chunk-kg9abatp.js +0 -2
  125. package/dist/chunk-kvghsjg7.js +0 -5
  126. package/dist/chunk-ky8p46ae.js +0 -5
  127. package/dist/chunk-kzm498bh.js +0 -2
  128. package/dist/chunk-m4gwjnfh.js +0 -6
  129. package/dist/chunk-m6regb6b.js +0 -2
  130. package/dist/chunk-mevackhg.js +0 -9
  131. package/dist/chunk-msv6dcc2.js +0 -2
  132. package/dist/chunk-mxdajhb4.js +0 -10
  133. package/dist/chunk-mxzjn2gs.js +0 -978
  134. package/dist/chunk-n1bqkqk7.js +0 -10
  135. package/dist/chunk-n2c2dcxa.js +0 -2
  136. package/dist/chunk-njtyervf.js +0 -1
  137. package/dist/chunk-nx1598yr.js +0 -2
  138. package/dist/chunk-p18kqenr.js +0 -1
  139. package/dist/chunk-p23aswbf.js +0 -2
  140. package/dist/chunk-p55ntqj0.js +0 -2
  141. package/dist/chunk-p5va3trj.js +0 -2
  142. package/dist/chunk-p88bsqtc.js +0 -10
  143. package/dist/chunk-p9z7f8c8.js +0 -2
  144. package/dist/chunk-ppkzf21q.js +0 -8
  145. package/dist/chunk-prqq5zw2.js +0 -2
  146. package/dist/chunk-pv6hp18q.js +0 -10
  147. package/dist/chunk-q9ycfthp.js +0 -2
  148. package/dist/chunk-qhcx6dmf.js +0 -2
  149. package/dist/chunk-qma4ysd8.js +0 -9
  150. package/dist/chunk-qpdxnnf8.js +0 -10
  151. package/dist/chunk-qq851psj.js +0 -6
  152. package/dist/chunk-qqp394c2.js +0 -2
  153. package/dist/chunk-qzxab3cn.js +0 -2
  154. package/dist/chunk-r6rhrt1p.js +0 -2
  155. package/dist/chunk-ra5sfgg4.js +0 -2
  156. package/dist/chunk-rfd43z7p.js +0 -5
  157. package/dist/chunk-rtfeef82.js +0 -2
  158. package/dist/chunk-ryjbc6dz.js +0 -5
  159. package/dist/chunk-s2n3hw0a.js +0 -2
  160. package/dist/chunk-scc3z70n.js +0 -2
  161. package/dist/chunk-sk3x55wm.js +0 -2
  162. package/dist/chunk-sm7vvfqf.js +0 -2
  163. package/dist/chunk-sqbdav33.js +0 -2
  164. package/dist/chunk-sy4d4hnx.js +0 -2
  165. package/dist/chunk-t0b356bb.js +0 -978
  166. package/dist/chunk-t9wdnzz4.js +0 -6
  167. package/dist/chunk-v25g7h01.js +0 -2
  168. package/dist/chunk-v7zy7xda.js +0 -1
  169. package/dist/chunk-v9kknk69.js +0 -2
  170. package/dist/chunk-vg4vfkzk.js +0 -6
  171. package/dist/chunk-vgcre8jy.js +0 -2
  172. package/dist/chunk-vqyngnj0.js +0 -9
  173. package/dist/chunk-w17d2rbd.js +0 -6
  174. package/dist/chunk-x22v9kvb.js +0 -2
  175. package/dist/chunk-xacjs4ar.js +0 -6
  176. package/dist/chunk-xmdbxa8w.js +0 -1
  177. package/dist/chunk-xy6hjazn.js +0 -978
  178. package/dist/chunk-y0m35t3m.js +0 -2
  179. package/dist/chunk-y1tre8v8.js +0 -8
  180. package/dist/chunk-y50mc7dt.js +0 -2
  181. package/dist/chunk-y5vqt054.js +0 -5
  182. package/dist/chunk-y93ke5m6.js +0 -2
  183. package/dist/chunk-yktee4wv.js +0 -1
  184. package/dist/chunk-yvmyw2r2.js +0 -2
  185. package/dist/chunk-z6xydw90.js +0 -2
  186. package/dist/chunk-zak32nab.js +0 -2
  187. package/dist/chunk-zanq4wm3.js +0 -9
  188. package/dist/stacks +0 -0
@@ -1,2 +1,3 @@
1
1
  // @bun
2
- import{wa as z,xa as B}from"./chunk-p55ntqj0.js";import"./chunk-njtyervf.js";import"./chunk-avdharmq.js";import{wb as K,xb as y}from"./chunk-v7zy7xda.js";import"./chunk-p9z7f8c8.js";import{parse as p}from"url";import{Buffer as M}from"buffer";import{request as k}from"http";function E(c){return new Promise((I,x)=>{let T=k({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new K("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new K("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{let{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new K("Error response received from instance metadata service"),{statusCode:O})),T.destroy();let $=[];N.on("data",(w)=>{$.push(w)}),N.on("end",()=>{I(M.concat($)),T.destroy()})}),T.end()})}var _=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",D=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var hc=1000,Yc=0,G=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var m=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var X="AWS_CONTAINER_CREDENTIALS_FULL_URI",Z="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",b="AWS_CONTAINER_AUTHORIZATION_TOKEN",mc=(c={})=>{let{timeout:I,maxRetries:x}=G(c);return()=>m(async()=>{let T=await s({logger:c.logger}),N=JSON.parse(await C(I,T));if(!_(N))throw new y("Invalid response received from instance metadata service.",{logger:c.logger});return D(N)},x)},C=async(c,I)=>{if(process.env[b])I.headers={...I.headers,Authorization:process.env[b]};return(await E({...I,timeout:c})).toString()},a="169.254.170.2",n={localhost:!0,"127.0.0.1":!0},o={"http:":!0,"https:":!0},s=async({logger:c})=>{if(process.env[Z])return{hostname:a,path:process.env[Z]};if(process.env[X]){let I=p(process.env[X]);if(!I.hostname||!(I.hostname in n))throw new y(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in o))throw new y(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new y(`The container metadata credential provider cannot be used unless the ${Z} or ${X} environment variable is set`,{tryNextLink:!1,logger:c})};class Q extends y{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,Q.prototype)}}var J;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(J||(J={}));var H={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0};var u;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(u||(u={}));var g="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",l="ec2_metadata_service_endpoint_mode",q={environmentVariableSelector:(c)=>c[g],configFileSelector:(c)=>c[l],default:u.IPv4};var v=async()=>B(await r()||await d()),r=async()=>z(H)(),d=async()=>{let c=await z(q)();switch(c){case u.IPv4:return J.IPv4;case u.IPv6:return J.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(u)}`)}};var L=(c,I)=>{let x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(T)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var U=(c,I={})=>{let x=I?.logger||console,T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=L(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=L(T,x);else throw O}return T=N,N}};var P="/latest/meta-data/iam/security-credentials/",e="/latest/api/token",W="AWS_EC2_METADATA_V1_DISABLED",t="ec2_metadata_v1_disabled",F="x-aws-ec2-metadata-token",oc=(c={})=>U(i(c),{logger:c.logger}),i=(c={})=>{let I=!1,{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=G(c),$=async(w,j)=>{if(I||j.headers?.[F]==null){let h=!1,Y=!1,R=await z({environmentVariableSelector:(S)=>{let A=S[W];if(Y=!!A&&A!=="false",A===void 0)throw new y(`${W} not set in env, checking config file next.`,{logger:c.logger});return Y},configFileSelector:(S)=>{let A=S[t];return h=!!A&&A!=="false",h},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||R){let S=[];if(c.ec2MetadataV1Disabled)S.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(h)S.push(`config file profile (${t})`);if(Y)S.push(`process environment variable (${W})`);throw new Q(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${S.join(", ")}].`)}}let V=(await m(async()=>{let h;try{h=await Ic(j)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)).trim();return m(async()=>{let h;try{h=await Tc(V,j,c)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)};return async()=>{let w=await v();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),$(O,{...w,timeout:N});else{let j;try{j=(await cc({...w,timeout:N})).toString()}catch(f){if(f?.statusCode===400)throw Object.assign(f,{message:"EC2 Metadata token request returned error"});else if(f.message==="TimeoutError"||[403,404,405].includes(f.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),$(O,{...w,timeout:N})}return $(O,{...w,headers:{[F]:j},timeout:N})}}},cc=async(c)=>E({...c,path:e,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Ic=async(c)=>(await E({...c,path:P})).toString(),Tc=async(c,I,x)=>{let T=JSON.parse((await E({...I,path:P+c})).toString());if(!_(T))throw new y("Invalid response received from instance metadata service.",{logger:x.logger});return D(T)};export{G as providerConfigFromInit,E as httpRequest,v as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,mc as fromContainerMetadata,J as Endpoint,Z as ENV_CMDS_RELATIVE_URI,X as ENV_CMDS_FULL_URI,b as ENV_CMDS_AUTH_TOKEN,hc as DEFAULT_TIMEOUT,Yc as DEFAULT_MAX_RETRIES};
2
+ import{Db as z,Eb as B}from"./chunk-tnqbven5.js";import"./chunk-cdnqz7bt.js";import"./chunk-vs0pve8j.js";import{Jc as K,Kc as y}from"./chunk-5d1pmfaj.js";import"./chunk-f0ywgmn1.js";import{parse as p}from"url";import{Buffer as M}from"buffer";import{request as k}from"http";function E(c){return new Promise((I,x)=>{let T=k({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new K("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new K("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{let{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new K("Error response received from instance metadata service"),{statusCode:O})),T.destroy();let $=[];N.on("data",(w)=>{$.push(w)}),N.on("end",()=>{I(M.concat($)),T.destroy()})}),T.end()})}var _=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",D=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var hc=1000,Yc=0,G=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var m=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var X="AWS_CONTAINER_CREDENTIALS_FULL_URI",Z="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",b="AWS_CONTAINER_AUTHORIZATION_TOKEN",mc=(c={})=>{let{timeout:I,maxRetries:x}=G(c);return()=>m(async()=>{let T=await s({logger:c.logger}),N=JSON.parse(await C(I,T));if(!_(N))throw new y("Invalid response received from instance metadata service.",{logger:c.logger});return D(N)},x)},C=async(c,I)=>{if(process.env[b])I.headers={...I.headers,Authorization:process.env[b]};return(await E({...I,timeout:c})).toString()},a="169.254.170.2",n={localhost:!0,"127.0.0.1":!0},o={"http:":!0,"https:":!0},s=async({logger:c})=>{if(process.env[Z])return{hostname:a,path:process.env[Z]};if(process.env[X]){let I=p(process.env[X]);if(!I.hostname||!(I.hostname in n))throw new y(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in o))throw new y(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new y(`The container metadata credential provider cannot be used unless the ${Z} or ${X} environment variable is set`,{tryNextLink:!1,logger:c})};class Q extends y{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,Q.prototype)}}var J;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(J||(J={}));var H={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0};var u;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(u||(u={}));var g="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",l="ec2_metadata_service_endpoint_mode",q={environmentVariableSelector:(c)=>c[g],configFileSelector:(c)=>c[l],default:u.IPv4};var v=async()=>B(await r()||await d()),r=async()=>z(H)(),d=async()=>{let c=await z(q)();switch(c){case u.IPv4:return J.IPv4;case u.IPv6:return J.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(u)}`)}};var L=(c,I)=>{let x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(T)}.
3
+ For more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var U=(c,I={})=>{let x=I?.logger||console,T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=L(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=L(T,x);else throw O}return T=N,N}};var P="/latest/meta-data/iam/security-credentials/",e="/latest/api/token",W="AWS_EC2_METADATA_V1_DISABLED",t="ec2_metadata_v1_disabled",F="x-aws-ec2-metadata-token",oc=(c={})=>U(i(c),{logger:c.logger}),i=(c={})=>{let I=!1,{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=G(c),$=async(w,j)=>{if(I||j.headers?.[F]==null){let h=!1,Y=!1,R=await z({environmentVariableSelector:(S)=>{let A=S[W];if(Y=!!A&&A!=="false",A===void 0)throw new y(`${W} not set in env, checking config file next.`,{logger:c.logger});return Y},configFileSelector:(S)=>{let A=S[t];return h=!!A&&A!=="false",h},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||R){let S=[];if(c.ec2MetadataV1Disabled)S.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(h)S.push(`config file profile (${t})`);if(Y)S.push(`process environment variable (${W})`);throw new Q(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${S.join(", ")}].`)}}let V=(await m(async()=>{let h;try{h=await Ic(j)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)).trim();return m(async()=>{let h;try{h=await Tc(V,j,c)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)};return async()=>{let w=await v();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),$(O,{...w,timeout:N});else{let j;try{j=(await cc({...w,timeout:N})).toString()}catch(f){if(f?.statusCode===400)throw Object.assign(f,{message:"EC2 Metadata token request returned error"});else if(f.message==="TimeoutError"||[403,404,405].includes(f.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),$(O,{...w,timeout:N})}return $(O,{...w,headers:{[F]:j},timeout:N})}}},cc=async(c)=>E({...c,path:e,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Ic=async(c)=>(await E({...c,path:P})).toString(),Tc=async(c,I,x)=>{let T=JSON.parse((await E({...I,path:P+c})).toString());if(!_(T))throw new y("Invalid response received from instance metadata service.",{logger:x.logger});return D(T)};export{G as providerConfigFromInit,E as httpRequest,v as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,mc as fromContainerMetadata,J as Endpoint,Z as ENV_CMDS_RELATIVE_URI,X as ENV_CMDS_FULL_URI,b as ENV_CMDS_AUTH_TOKEN,hc as DEFAULT_TIMEOUT,Yc as DEFAULT_MAX_RETRIES};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Aa as y,Ia as u,Ua as C,ib as P}from"./chunk-fh4rw8kr.js";import"./chunk-2wrs9p57.js";import{zb as A}from"./chunk-ppkzf21q.js";import{Bb as n}from"./chunk-3wpw5xgd.js";import{Gb as d}from"./chunk-0m218zhk.js";var K=d(A(),1);import O from"fs/promises";var E="169.254.170.2",R="169.254.170.23",p="[fd00:ec2::23]",i=(e,a)=>{if(e.protocol==="https:")return;if(e.hostname===E||e.hostname===R||e.hostname===p)return;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 c=e.hostname.split("."),r=(t)=>{let s=parseInt(t,10);return 0<=s&&s<=255};if(c[0]==="127"&&r(c[1])&&r(c[2])&&r(c[3])&&c.length===4)return}throw new n(`URL not accepted. It must either be HTTPS or match one of the following:
2
+ import{Hb as y,Qb as C,dc as P}from"./chunk-n337bav6.js";import{vc as u}from"./chunk-c0awzy8k.js";import"./chunk-vs0pve8j.js";import{Kc as n}from"./chunk-5d1pmfaj.js";import{Pc as A}from"./chunk-zmz07e1t.js";import{Qc as d}from"./chunk-f0ywgmn1.js";var K=d(A(),1);import O from"fs/promises";var E="169.254.170.2",R="169.254.170.23",p="[fd00:ec2::23]",i=(e,a)=>{if(e.protocol==="https:")return;if(e.hostname===E||e.hostname===R||e.hostname===p)return;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 c=e.hostname.split("."),r=(t)=>{let s=parseInt(t,10);return 0<=s&&s<=255};if(c[0]==="127"&&r(c[1])&&r(c[2])&&r(c[3])&&c.length===4)return}throw new n(`URL not accepted. It must either be HTTPS or match one of the following:
3
3
  - loopback CIDR 127.0.0.0/8 or [::1/128]
4
4
  - ECS container host 169.254.170.2
5
5
  - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:a})};var S=d(u(),1);function g(e){return new y({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((a,[c,r])=>{return a[c]=r,a},{}),fragment:e.hash})}async function w(e,a){let r=await S.sdkStreamMixin(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 n("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:a});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:C(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new n(`Server responded with status: ${e.statusCode}`,{logger:a}),{Code:t.Code,Message:t.Message})}throw new n(`Server responded with status: ${e.statusCode}`,{logger:a})}var I=(e,a,c)=>{return async()=>{for(let r=0;r<a;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,c))}return await e()}};var b="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",v="http://169.254.170.2",_="AWS_CONTAINER_CREDENTIALS_FULL_URI",B="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",D="AWS_CONTAINER_AUTHORIZATION_TOKEN",M=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let a,c=e.awsContainerCredentialsRelativeUri??process.env[b],r=e.awsContainerCredentialsFullUri??process.env[_],t=e.awsContainerAuthorizationToken??process.env[D],s=e.awsContainerAuthorizationTokenFile??process.env[B],m=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console.warn:e.logger.warn;if(c&&r)m("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),m("awsContainerCredentialsFullUri will take precedence.");if(t&&s)m("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),m("awsContainerAuthorizationToken will take precedence.");if(r)a=r;else if(c)a=`${v}${c}`;else throw new n(`No HTTP credential provider host provided.
@@ -0,0 +1,2 @@
1
+ import{Db as F,Eb as Ee}from"./chunk-tnqbven5.js";import{$b as It,Hb as m,Ib as Te}from"./chunk-n337bav6.js";import{hc as De,lc as sr,mc as Or}from"./chunk-hmvbpz4z.js";import{Bc as me}from"./chunk-cdnqz7bt.js";import{Fc as Le}from"./chunk-vs0pve8j.js";import{Oc as Ft}from"./chunk-5d1pmfaj.js";import{Qc as w,Vc as jr}from"./chunk-f0ywgmn1.js";function Kr(e){return e}var Bt=(e)=>(t)=>async(r)=>{if(!m.isInstance(r.request))return t(r);let{request:o}=r,{handlerProtocol:n=""}=e.requestHandler.metadata||{};if(n.indexOf("h2")>=0&&!o.headers[":authority"])delete o.headers.host,o.headers[":authority"]=o.hostname+(o.port?":"+o.port:"");else if(!o.headers.host){let s=o.hostname;if(o.port!=null)s+=`:${o.port}`;o.headers.host=s}return t(r)},Wt={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Qr=(e)=>({applyToStack:(t)=>{t.add(Bt(e),Wt)}});var Yt=()=>(e,t)=>async(r)=>{try{let o=await e(r),{clientName:n,commandName:s,logger:i,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:f}=a,u=c??t.inputFilterSensitiveLog,R=f??t.outputFilterSensitiveLog,{$metadata:l,...d}=o.output;return i?.info?.({clientName:n,commandName:s,input:u(r.input),output:R(d),metadata:l}),o}catch(o){let{clientName:n,commandName:s,logger:i,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c}=a,f=c??t.inputFilterSensitiveLog;throw i?.error?.({clientName:n,commandName:s,input:f(r.input),error:o,metadata:o.$metadata}),o}},zt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},to=(e)=>({applyToStack:(t)=>{t.add(Yt(),zt)}});var be="X-Amzn-Trace-Id",jt="AWS_LAMBDA_FUNCTION_NAME",Xt="_X_AMZN_TRACE_ID",Ht=(e)=>(t)=>async(r)=>{let{request:o}=r;if(!m.isInstance(o)||e.runtime!=="node"||o.headers.hasOwnProperty(be))return t(r);let n=process.env[jt],s=process.env[Xt],i=(a)=>typeof a==="string"&&a.length>0;if(i(n)&&i(s))o.headers[be]=s;return t({...r,request:o})},qt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},io=(e)=>({applyToStack:(t)=>{t.add(Ht(e),qt)}});var Ce=w(De(),1),ne=void 0;function Zt(e){if(e===void 0)return!0;return typeof e==="string"&&e.length<=50}function co(e){let t=Ce.normalizeProvider(e.userAgentAppId??ne);return{...e,customUserAgent:typeof e.customUserAgent==="string"?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{let r=await t();if(!Zt(r)){let o=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;if(typeof r!=="string")o?.warn("userAgentAppId must be a string or undefined.");else if(r.length>50)o?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}}}class Jt{constructor({size:e,params:t}){if(this.data=new Map,this.parameters=[],this.capacity=e??50,t)this.parameters=t}get(e,t){let r=this.hash(e);if(r===!1)return t();if(!this.data.has(r)){if(this.data.size>this.capacity+10){let o=this.data.keys(),n=0;while(!0){let{value:s,done:i}=o.next();if(this.data.delete(s),i||++n>10)break}}this.data.set(r,t())}return this.data.get(r)}size(){return this.data.size}hash(e){let t="",{parameters:r}=this;if(r.length===0)return!1;for(let o of r){let n=String(e[o]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}var Kt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),M=(e)=>Kt.test(e)||e.startsWith("[")&&e.endsWith("]");var Qt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),L=(e,t=!1)=>{if(!t)return Qt.test(e);let r=e.split(".");for(let o of r)if(!L(o))return!1;return!0};var $={};var h="endpoints";function E(e){if(typeof e!=="object"||e==null)return e;if("ref"in e)return`$${E(e.ref)}`;if("fn"in e)return`${e.fn}(${(e.argv||[]).map(E).join(", ")})`;return JSON.stringify(e,null,2)}class p extends Error{constructor(e){super(e);this.name="EndpointError"}}var Pe=(e,t)=>e===t;var Ue=(e)=>{let t=e.split("."),r=[];for(let o of t){let n=o.indexOf("[");if(n!==-1){if(o.indexOf("]")!==o.length-1)throw new p(`Path: '${e}' does not end with ']'`);let s=o.slice(n+1,-1);if(Number.isNaN(parseInt(s)))throw new p(`Invalid array index: '${s}' in path: '${e}'`);if(n!==0)r.push(o.slice(0,n));r.push(s)}else r.push(o)}return r};var B=(e,t)=>Ue(t).reduce((r,o)=>{if(typeof r!=="object")throw new p(`Index '${o}' in '${t}' not found in '${JSON.stringify(e)}'`);else if(Array.isArray(r))return r[parseInt(o)];return r[o]},e);var ve=(e)=>e!=null;var Me=(e)=>!e;var W=w(Le(),1);var se={[W.EndpointURLScheme.HTTP]:80,[W.EndpointURLScheme.HTTPS]:443},$e=(e)=>{let t=(()=>{try{if(e instanceof URL)return e;if(typeof e==="object"&&"hostname"in e){let{hostname:l,port:d,protocol:N="",path:V="",query:kt={}}=e,Ne=new URL(`${N}//${l}${d?`:${d}`:""}${V}`);return Ne.search=Object.entries(kt).map(([Gt,Vt])=>`${Gt}=${Vt}`).join("&"),Ne}return new URL(e)}catch(l){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;let r=t.href,{host:o,hostname:n,pathname:s,protocol:i,search:a}=t;if(a)return null;let c=i.slice(0,-1);if(!Object.values(W.EndpointURLScheme).includes(c))return null;let f=M(n),u=r.includes(`${o}:${se[c]}`)||typeof e==="string"&&e.includes(`${o}:${se[c]}`),R=`${o}${u?`:${se[c]}`:""}`;return{scheme:c,authority:R,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:f}};var Fe=(e,t)=>e===t;var ke=(e,t,r,o)=>{if(t>=r||e.length<r)return null;if(!o)return e.substring(t,r);return e.substring(e.length-r,e.length-t)};var Ge=(e)=>encodeURIComponent(e).replace(/[!*'()]/g,(t)=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`);var Ve={booleanEquals:Pe,getAttr:B,isSet:ve,isValidHostLabel:L,not:Me,parseURL:$e,stringEquals:Fe,substring:ke,uriEncode:Ge};var Y=(e,t)=>{let r=[],o={...t.endpointParams,...t.referenceRecord},n=0;while(n<e.length){let s=e.indexOf("{",n);if(s===-1){r.push(e.slice(n));break}r.push(e.slice(n,s));let i=e.indexOf("}",s);if(i===-1){r.push(e.slice(s));break}if(e[s+1]==="{"&&e[i+1]==="}")r.push(e.slice(s+1,i)),n=i+2;let a=e.substring(s+1,i);if(a.includes("#")){let[c,f]=a.split("#");r.push(B(o[c],f))}else r.push(o[a]);n=i+1}return r.join("")};var Be=({ref:e},t)=>{return{...t.endpointParams,...t.referenceRecord}[e]};var S=(e,t,r)=>{if(typeof e==="string")return Y(e,r);else if(e.fn)return z(e,r);else if(e.ref)return Be(e,r);throw new p(`'${t}': ${String(e)} is not a string, function or reference.`)};var z=({fn:e,argv:t},r)=>{let o=t.map((s)=>["boolean","number"].includes(typeof s)?s:S(s,"arg",r)),n=e.split(".");if(n[0]in $&&n[1]!=null)return $[n[0]][n[1]](...o);return Ve[e](...o)};var We=({assign:e,...t},r)=>{if(e&&e in r.referenceRecord)throw new p(`'${e}' is already defined in Reference Record.`);let o=z(t,r);return r.logger?.debug?.(`${h} evaluateCondition: ${E(t)} = ${E(o)}`),{result:o===""?!0:!!o,...e!=null&&{toAssign:{name:e,value:o}}}};var b=(e=[],t)=>{let r={};for(let o of e){let{result:n,toAssign:s}=We(o,{...t,referenceRecord:{...t.referenceRecord,...r}});if(!n)return{result:n};if(s)r[s.name]=s.value,t.logger?.debug?.(`${h} assign: ${s.name} := ${E(s.value)}`)}return{result:!0,referenceRecord:r}};var Ye=(e,t)=>Object.entries(e).reduce((r,[o,n])=>({...r,[o]:n.map((s)=>{let i=S(s,"Header value entry",t);if(typeof i!=="string")throw new p(`Header '${o}' value '${i}' is not a string`);return i})}),{});var ie=(e,t)=>{if(Array.isArray(e))return e.map((r)=>ie(r,t));switch(typeof e){case"string":return Y(e,t);case"object":if(e===null)throw new p(`Unexpected endpoint property: ${e}`);return j(e,t);case"boolean":return e;default:throw new p(`Unexpected endpoint property type: ${typeof e}`)}};var j=(e,t)=>Object.entries(e).reduce((r,[o,n])=>({...r,[o]:ie(n,t)}),{});var ze=(e,t)=>{let r=S(e,"Endpoint URL",t);if(typeof r==="string")try{return new URL(r)}catch(o){throw console.error(`Failed to construct URL with ${r}`,o),o}throw new p(`Endpoint URL must be a string, got ${typeof r}`)};var je=(e,t)=>{let{conditions:r,endpoint:o}=e,{result:n,referenceRecord:s}=b(r,t);if(!n)return;let i={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:f}=o;return t.logger?.debug?.(`${h} Resolving endpoint from template: ${E(o)}`),{...f!=null&&{headers:Ye(f,i)},...c!=null&&{properties:j(c,i)},url:ze(a,i)}};var Xe=(e,t)=>{let{conditions:r,error:o}=e,{result:n,referenceRecord:s}=b(r,t);if(!n)return;throw new p(S(o,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))};var He=(e,t)=>{let{conditions:r,rules:o}=e,{result:n,referenceRecord:s}=b(r,t);if(!n)return;return X(o,{...t,referenceRecord:{...t.referenceRecord,...s}})};var X=(e,t)=>{for(let r of e)if(r.type==="endpoint"){let o=je(r,t);if(o)return o}else if(r.type==="error")Xe(r,t);else if(r.type==="tree"){let o=He(r,t);if(o)return o}else throw new p(`Unknown endpoint rule: ${r}`);throw new p("Rules evaluation failed")};var er=(e,t)=>{let{endpointParams:r,logger:o}=t,{parameters:n,rules:s}=e;t.logger?.debug?.(`${h} Initial EndpointParams: ${E(r)}`);let i=Object.entries(n).filter(([,f])=>f.default!=null).map(([f,u])=>[f,u.default]);if(i.length>0)for(let[f,u]of i)r[f]=r[f]??u;let a=Object.entries(n).filter(([,f])=>f.required).map(([f])=>f);for(let f of a)if(r[f]==null)throw new p(`Missing required parameter: '${f}'`);let c=X(s,{endpointParams:r,logger:o,referenceRecord:{}});return t.logger?.debug?.(`${h} Resolved endpoint: ${E(c)}`),c};var ae=(e,t=!1)=>{if(t){for(let r of e.split("."))if(!ae(r))return!1;return!0}if(!L(e))return!1;if(e.length<3||e.length>63)return!1;if(e!==e.toLowerCase())return!1;if(M(e))return!1;return!0};var qe=(e)=>{let t=e.split(":");if(t.length<6)return null;let[r,o,n,s,i,...a]=t;if(r!=="arn"||o===""||n===""||a.join(":")==="")return null;let c=a.map((f)=>f.split("/")).flat();return{partition:o,service:n,region:s,accountId:i,resourceId:c}};var Ze={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],version:"1.1"};var rr=Ze,or="",Je=(e)=>{let{partitions:t}=rr;for(let o of t){let{regions:n,outputs:s}=o;for(let[i,a]of Object.entries(n))if(i===e)return{...s,...a}}for(let o of t){let{regionRegex:n,outputs:s}=o;if(new RegExp(n).test(e))return{...s}}let r=t.find((o)=>o.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}};var Ke=()=>or;var nr={isVirtualHostableS3Bucket:ae,parseArn:qe,partition:Je};$.aws=nr;var x=w(sr(),1),ir=/\d{12}\.ddb/;async function Qe(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")x.setFeature(e,"PROTOCOL_RPC_V2_CBOR","M");if(typeof t.retryStrategy==="function"){let s=await t.retryStrategy();if(typeof s.acquireInitialRetryToken==="function")if(s.constructor?.name?.includes("Adaptive"))x.setFeature(e,"RETRY_MODE_ADAPTIVE","F");else x.setFeature(e,"RETRY_MODE_STANDARD","E");else x.setFeature(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode==="function"){let s=e.endpointV2;if(String(s?.url?.hostname).match(ir))x.setFeature(e,"ACCOUNT_ID_ENDPOINT","O");switch(await t.accountIdEndpointMode?.()){case"disabled":x.setFeature(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":x.setFeature(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":x.setFeature(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let n=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){let s=n;if(s.accountId)x.setFeature(e,"RESOLVED_ACCOUNT_ID","T");for(let[i,a]of Object.entries(s.$source??{}))x.setFeature(e,i,a)}}var ce="user-agent",H="x-amz-user-agent",fe=" ",q="/",et=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,tt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,pe="-";function rt(e){let t="";for(let r in e){let o=e[r];if(t.length+o.length+1<=1024){if(t.length)t+=","+o;else t+=o;continue}break}return t}var ar=(e)=>(t,r)=>async(o)=>{let{request:n}=o;if(!m.isInstance(n))return t(o);let{headers:s}=n,i=r?.userAgent?.map(Z)||[],a=(await e.defaultUserAgentProvider()).map(Z);await Qe(r,e,o);let c=r;a.push(`m/${rt(Object.assign({},r.__smithy_context?.features,c.__aws_sdk_context?.features))}`);let f=e?.customUserAgent?.map(Z)||[],u=await e.userAgentAppId();if(u)a.push(Z([`app/${u}`]));let R=Ke(),l=(R?[R]:[]).concat([...a,...i,...f]).join(fe),d=[...a.filter((N)=>N.startsWith("aws-sdk-")),...f].join(fe);if(e.runtime!=="browser"){if(d)s[H]=s[H]?`${s[ce]} ${d}`:d;s[ce]=l}else s[H]=l;return t({...o,request:n})},Z=(e)=>{let t=e[0].split(q).map((i)=>i.replace(et,pe)).join(q),r=e[1]?.replace(tt,pe),o=t.indexOf(q),n=t.substring(0,o),s=t.substring(o+1);if(n==="api")s=s.toLowerCase();return[n,s,r].filter((i)=>i&&i.length>0).reduce((i,a,c)=>{switch(c){case 0:return a;case 1:return`${i}/${a}`;default:return`${i}#${a}`}},"")},cr={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},qs=(e)=>({applyToStack:(t)=>{t.add(ar(e),cr)}});var J=(e)=>typeof e==="string"&&(e.startsWith("fips-")||e.endsWith("-fips"));var ue=(e)=>J(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;var si=(e)=>{let{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if(typeof t==="string")return ue(t);let o=await t();return ue(o)},useFipsEndpoint:async()=>{let o=typeof t==="string"?t:await t();if(J(o))return!0;return typeof r!=="function"?Promise.resolve(!!r):r()}}};var D=(e,t,r)=>{if(!(t in e))return;if(e[t]==="true")return!0;if(e[t]==="false")return!1;throw new Error(`Cannot load ${r} "${t}". Expected "true" or "false", got ${e[t]}.`)};var T;(function(e){e.ENV="env",e.CONFIG="shared config entry"})(T||(T={}));var fr="AWS_USE_DUALSTACK_ENDPOINT",pr="use_dualstack_endpoint";var Ei={environmentVariableSelector:(e)=>D(e,fr,T.ENV),configFileSelector:(e)=>D(e,pr,T.CONFIG),default:!1};var ur="AWS_USE_FIPS_ENDPOINT",dr="use_fips_endpoint";var Ri={environmentVariableSelector:(e)=>D(e,ur,T.ENV),configFileSelector:(e)=>D(e,dr,T.CONFIG),default:!1};var de=w(Le(),1),ot=(e)=>e[de.SMITHY_CONTEXT_KEY]||(e[de.SMITHY_CONTEXT_KEY]={});var A=(e)=>{if(typeof e==="function")return e;let t=Promise.resolve(e);return()=>t};var nt={environmentVariableSelector:(e)=>e.AWS_REGION,configFileSelector:(e)=>e.region,default:()=>{throw new Error("Region is missing")}},$i={preferredFile:"credentials"};var st="content-length";function lr(e){return(t)=>async(r)=>{let o=r.request;if(m.isInstance(o)){let{body:n,headers:s}=o;if(n&&Object.keys(s).map((i)=>i.toLowerCase()).indexOf(st)===-1)try{let i=e(n);o.headers={...o.headers,[st]:String(i)}}catch(i){}}return t({...r,request:o})}}var mr={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},pa=(e)=>({applyToStack:(t)=>{t.add(lr(e.bodyLengthChecker),mr)}});var it=(e,t)=>(r,o)=>async(n)=>{let{response:s}=await r(n);try{let i=await t(s,e);return{response:s,output:i}}catch(i){if(Object.defineProperty(i,"$response",{value:s}),!("$metadata"in i)){try{i.message+=`
2
+ Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`}catch(c){if(!o.logger||o.logger?.constructor?.name==="NoOpLogger")console.warn("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.");else o.logger?.warn?.("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.")}if(typeof i.$responseBodyText!=="undefined"){if(i.$response)i.$response.body=i.$responseBodyText}}throw i}};var at=(e,t)=>(r,o)=>async(n)=>{let s=o.endpointV2?.url&&e.urlParser?async()=>e.urlParser(o.endpointV2.url):e.endpoint;if(!s)throw new Error("No valid endpoint provider available.");let i=await t(n.input,{...e,endpoint:s});return r({...n,request:i})};var Er={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},le={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function ga(e,t,r){return{applyToStack:(o)=>{o.add(it(e,r),Er),o.add(at(e,t),le)}}}var mt=w(De(),1);var ct=async(e)=>{let t=e?.Bucket||"";if(typeof e.Bucket==="string")e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(hr(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!_r(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)e.ForcePathStyle=!0;if(e.DisableMultiRegionAccessPoints)e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0;return e},gr=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,xr=/(\d+\.){3}\d+/,Rr=/\.\./;var _r=(e)=>gr.test(e)&&!xr.test(e)&&!Rr.test(e),hr=(e)=>{let[t,r,o,,,n]=e.split(":"),s=t==="arn"&&e.split(":").length>=6,i=Boolean(s&&r&&o&&n);if(s&&!i)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return i};var ft=(e,t,r)=>{let o=async()=>{let n=r[e]??r[t];if(typeof n==="function")return n();return n};if(e==="credentialScope"||t==="CredentialScope")return async()=>{let n=typeof r.credentials==="function"?await r.credentials():r.credentials;return n?.credentialScope??n?.CredentialScope};if(e==="accountId"||t==="AccountId")return async()=>{let n=typeof r.credentials==="function"?await r.credentials():r.credentials;return n?.accountId??n?.AccountId};if(e==="endpoint"||t==="endpoint")return async()=>{let n=await o();if(n&&typeof n==="object"){if("url"in n)return n.url.href;if("hostname"in n){let{protocol:s,hostname:i,port:a,path:c}=n;return`${s}//${i}${a?":"+a:""}${c}`}}return n};return o};var pt="AWS_ENDPOINT_URL",ut="endpoint_url",dt=(e)=>({environmentVariableSelector:(t)=>{let r=e.split(" ").map((s)=>s.toUpperCase()),o=t[[pt,...r].join("_")];if(o)return o;let n=t[pt];if(n)return n;return},configFileSelector:(t,r)=>{if(r&&t.services){let n=r[["services",t.services].join(me)];if(n){let s=e.split(" ").map((a)=>a.toLowerCase()),i=n[[s.join("_"),ut].join(me)];if(i)return i}}let o=t[ut];if(o)return o;return},default:void 0});var K=async(e)=>F(dt(e??""))();var Q=(e)=>{if(typeof e==="object"){if("url"in e)return Ee(e.url);return e}return Ee(e)};var lt=async(e,t,r,o)=>{if(!r.endpoint){let i;if(r.serviceConfiguredEndpoint)i=await r.serviceConfiguredEndpoint();else i=await K(r.serviceId);if(i)r.endpoint=()=>Promise.resolve(Q(i))}let n=await Ar(e,t,r);if(typeof r.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(n,o)},Ar=async(e,t,r)=>{let o={},n=t?.getEndpointParameterInstructions?.()||{};for(let[s,i]of Object.entries(n))switch(i.type){case"staticContextParams":o[s]=i.value;break;case"contextParams":o[s]=e[i.name];break;case"clientContextParams":case"builtInParams":o[s]=await ft(i.name,s,r)();break;case"operationContextParams":o[s]=i.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(i))}if(Object.keys(n).length===0)Object.assign(o,r);if(String(r.serviceId).toLowerCase()==="s3")await ct(o);return o};var Et=({config:e,instructions:t})=>{return(r,o)=>async(n)=>{if(e.endpoint)mt.setFeature(o,"ENDPOINT_OVERRIDE","N");let s=await lt(n.input,{getEndpointParameterInstructions(){return t}},{...e},o);o.endpointV2=s,o.authSchemes=s.properties?.authSchemes;let i=o.authSchemes?.[0];if(i){o.signing_region=i.signingRegion,o.signing_service=i.signingName;let c=ot(o)?.selectedHttpAuthScheme?.httpAuthOption;if(c)c.signingProperties=Object.assign(c.signingProperties||{},{signing_region:i.signingRegion,signingRegion:i.signingRegion,signing_service:i.signingName,signingName:i.signingName,signingRegionSet:i.signingRegionSet},i.properties)}return r({...n})}};var Sr={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:le.name},Wa=(e,t)=>({applyToStack:(r)=>{r.addRelativeTo(Et({config:e,instructions:t}),Sr)}});var Ha=(e)=>{let t=e.tls??!0,{endpoint:r}=e,o=r!=null?async()=>Q(await A(r)()):void 0,s={...e,endpoint:o,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:A(e.useDualstackEndpoint??!1),useFipsEndpoint:A(e.useFipsEndpoint??!1)},i=void 0;return s.serviceConfiguredEndpoint=async()=>{if(e.serviceId&&!i)i=K(e.serviceId);return i},s};var g;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(g||(g={}));var y=3,gt=g.STANDARD;var xt=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Rt=["TimeoutError","RequestTimeout","RequestTimeoutException"],_t=[500,502,503,504],ht=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var Tr=(e)=>e.$metadata?.clockSkewCorrected,C=(e)=>e.$metadata?.httpStatusCode===429||xt.includes(e.name)||e.$retryable?.throttling==!0,k=(e,t=0)=>Tr(e)||Rt.includes(e.name)||ht.includes(e?.code||"")||_t.includes(e.$metadata?.httpStatusCode||0)||e.cause!==void 0&&t<=10&&k(e.cause,t+1),At=(e)=>{if(e.$metadata?.httpStatusCode!==void 0){let t=e.$metadata.httpStatusCode;if(500<=t&&t<=599&&!k(e))return!0;return!1}return!1};class P{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??0.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??0.5,this.scaleConstant=e?.scaleConstant??0.4,this.smooth=e?.smooth??0.8;let t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(!this.enabled)return;if(this.refillTokenBucket(),e>this.currentCapacity){let t=(e-this.currentCapacity)/this.fillRate*1000;await new Promise((r)=>P.setTimeoutFn(r,t))}this.currentCapacity=this.currentCapacity-e}refillTokenBucket(){let e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}let t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),C(e)){let o=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=o,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(o),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());let r=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let e=this.getCurrentTimeInSeconds(),t=Math.floor(e*2)/2;if(this.requestCount++,t>this.lastTxRateBucket){let r=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(r*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}P.setTimeoutFn=setTimeout;var O=100,G=20000,ge=500,ee=500,xe=5,Re=10,_e=1,te="amz-sdk-invocation-id",re="amz-sdk-request";var St=()=>{let e=O;return{computeNextBackoffDelay:(o)=>{return Math.floor(Math.min(G,Math.random()*2**o*e))},setDelayBase:(o)=>{e=o}}};var he=({retryDelay:e,retryCount:t,retryCost:r})=>{return{getRetryCount:()=>t,getRetryDelay:()=>Math.min(G,e),getRetryCost:()=>r}};class U{constructor(e){this.maxAttempts=e,this.mode=g.STANDARD,this.capacity=ee,this.retryBackoffStrategy=St(),this.maxAttemptsProvider=typeof e==="function"?e:async()=>e}async acquireInitialRetryToken(e){return he({retryDelay:O,retryCount:0})}async refreshRetryTokenForRetry(e,t){let r=await this.getMaxAttempts();if(this.shouldRetry(e,t,r)){let o=t.errorType;this.retryBackoffStrategy.setDelayBase(o==="THROTTLING"?ge:O);let n=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),s=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,n):n,i=this.getCapacityCost(o);return this.capacity-=i,he({retryDelay:s,retryCount:e.getRetryCount()+1,retryCost:i})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(ee,this.capacity+(e.getRetryCost()??_e))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn(`Max attempts provider could not resolve. Using default of ${y}`),y}}shouldRetry(e,t,r){return e.getRetryCount()+1<r&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return e==="TRANSIENT"?Re:xe}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class Ae{constructor(e,t){this.maxAttemptsProvider=e,this.mode=g.ADAPTIVE;let{rateLimiter:r}=t??{};this.rateLimiter=r??new P,this.standardRetryStrategy=new U(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}var Tt="AWS_MAX_ATTEMPTS",wt="max_attempts",kc={environmentVariableSelector:(e)=>{let t=e[Tt];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Environment variable ${Tt} mast be a number, got "${t}"`);return r},configFileSelector:(e)=>{let t=e[wt];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Shared config file entry ${wt} mast be a number, got "${t}"`);return r},default:y},Gc=(e)=>{let{retryStrategy:t}=e,r=A(e.maxAttempts??y);return{...e,maxAttempts:r,retryStrategy:async()=>{if(t)return t;if(await A(e.retryMode)()===g.ADAPTIVE)return new Ae(r);return new U(r)}}},wr="AWS_RETRY_MODE",yr="retry_mode",Vc={environmentVariableSelector:(e)=>e[wr],configFileSelector:(e)=>e[yr],default:gt};var _=w(Or(),1),Wc=_.default.v1,Yc=_.default.v3,yt=_.default.v4,zc=_.default.v5,jc=_.default.NIL,Xc=_.default.version,Hc=_.default.validate,qc=_.default.stringify,Zc=_.default.parse;import{Readable as Ir}from"stream";var Ot=(e)=>e?.body instanceof Ir||typeof ReadableStream!=="undefined"&&e?.body instanceof ReadableStream;var Se=(e)=>{if(e instanceof Error)return e;if(e instanceof Object)return Object.assign(new Error,e);if(typeof e==="string")return new Error(e);return new Error(`AWS SDK error wrapper for ${e}`)};var Nr=(e)=>(t,r)=>async(o)=>{let n=await e.retryStrategy(),s=await e.maxAttempts();if(br(n)){n=n;let i=await n.acquireInitialRetryToken(r.partition_id),a=new Error,c=0,f=0,{request:u}=o,R=m.isInstance(u);if(R)u.headers[te]=yt();while(!0)try{if(R)u.headers[re]=`attempt=${c+1}; max=${s}`;let{response:l,output:d}=await t(o);return n.recordSuccess(i),d.$metadata.attempts=c+1,d.$metadata.totalRetryDelay=f,{response:l,output:d}}catch(l){let d=Dr(l);if(a=Se(l),R&&Ot(u))throw(r.logger instanceof It?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),a;try{i=await n.refreshRetryTokenForRetry(i,d)}catch(V){if(!a.$metadata)a.$metadata={};throw a.$metadata.attempts=c+1,a.$metadata.totalRetryDelay=f,a}c=i.getRetryCount();let N=i.getRetryDelay();f+=N,await new Promise((V)=>setTimeout(V,N))}}else{if(n=n,n?.mode)r.userAgent=[...r.userAgent||[],["cfg/retry-mode",n.mode]];return n.retry(t,o)}},br=(e)=>typeof e.acquireInitialRetryToken!=="undefined"&&typeof e.refreshRetryTokenForRetry!=="undefined"&&typeof e.recordSuccess!=="undefined",Dr=(e)=>{let t={error:e,errorType:Cr(e)},r=Ur(e.$response);if(r)t.retryAfterHint=r;return t},Cr=(e)=>{if(C(e))return"THROTTLING";if(k(e))return"TRANSIENT";if(At(e))return"SERVER_ERROR";return"CLIENT_ERROR"},Pr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ff=(e)=>({applyToStack:(t)=>{t.add(Nr(e),Pr)}}),Ur=(e)=>{if(!Te.isInstance(e))return;let t=Object.keys(e.headers).find((s)=>s.toLowerCase()==="retry-after");if(!t)return;let r=e.headers[t],o=Number(r);if(!Number.isNaN(o))return new Date(o*1000);return new Date(r)};import{platform as vr,release as Mr}from"os";import{env as bt,versions as Lr}from"process";var we={isCrtAvailable:!1};var Nt=()=>{if(we.isCrtAvailable)return["md/crt-avail"];return null};var Jf=({serviceId:e,clientVersion:t})=>{return async(r)=>{let o=[["aws-sdk-js",t],["ua","2.1"],[`os/${vr()}`,Mr()],["lang/js"],["md/nodejs",`${Lr.node}`]],n=Nt();if(n)o.push(n);if(e)o.push([`api/${e}`,t]);if(bt.AWS_EXECUTION_ENV)o.push([`exec-env/${bt.AWS_EXECUTION_ENV}`]);let s=await r?.userAgentAppId?.();return s?[...o,[`app/${s}`]]:[...o]}};var $r="AWS_SDK_UA_APP_ID",Fr="sdk_ua_app_id",kr="sdk-ua-app-id",tp={environmentVariableSelector:(e)=>e[$r],configFileSelector:(e)=>e[Fr]??e[kr],default:ne};var Dt=(e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";import{Buffer as ye}from"buffer";var I=(e,t=0,r=e.byteLength-t)=>{if(!Dt(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return ye.from(e,t,r)},v=(e,t)=>{if(typeof e!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?ye.from(e,t):ye.from(e)};var oe=(e)=>{let t=v(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var Ct=(e)=>{if(typeof e==="string")return oe(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)};var Ep=(e)=>{if(typeof e==="string")return e;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return I(e.buffer,e.byteOffset,e.byteLength).toString("utf8")};import{Buffer as Gr}from"buffer";import{createHash as Vr,createHmac as Br}from"crypto";class Wr{constructor(e,t){this.algorithmIdentifier=e,this.secret=t,this.reset()}update(e,t){this.hash.update(Ct(Pt(e,t)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?Br(this.algorithmIdentifier,Pt(this.secret)):Vr(this.algorithmIdentifier)}}function Pt(e,t){if(Gr.isBuffer(e))return e;if(typeof e==="string")return v(e,t);if(ArrayBuffer.isView(e))return I(e.buffer,e.byteOffset,e.byteLength);return I(e)}import{fstatSync as Yr,lstatSync as zr}from"fs";var Ip=(e)=>{if(!e)return 0;if(typeof e==="string")return Buffer.byteLength(e);else if(typeof e.byteLength==="number")return e.byteLength;else if(typeof e.size==="number")return e.size;else if(typeof e.start==="number"&&typeof e.end==="number")return e.end+1-e.start;else if(typeof e.path==="string"||Buffer.isBuffer(e.path))return zr(e.path).size;else if(typeof e.fd==="number")return Yr(e.fd).size;throw new Error(`Body Length computation failed for ${e}`)};var Ut="AWS_EXECUTION_ENV",Oe="AWS_REGION",Ie="AWS_DEFAULT_REGION",vt="AWS_EC2_METADATA_DISABLED",Mt=["in-region","cross-region","mobile","standard","legacy"],Lt="/latest/meta-data/placement/region";var $t={environmentVariableSelector:(e)=>{return e.AWS_DEFAULTS_MODE},configFileSelector:(e)=>{return e.defaults_mode},default:"legacy"};var Fp=({region:e=F(nt),defaultsMode:t=F($t)}={})=>Ft(async()=>{let r=typeof t==="function"?await t():t;switch(r?.toLowerCase()){case"auto":return Xr(e);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(r?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Mt.join(", ")}, got ${r}`)}}),Xr=async(e)=>{if(e){let t=typeof e==="function"?await e():e,r=await Hr();if(!r)return"standard";if(t===r)return"in-region";else return"cross-region"}return"standard"},Hr=async()=>{if(process.env[Ut]&&(process.env[Oe]||process.env[Ie]))return process.env[Oe]??process.env[Ie];if(!process.env[vt])try{let{getInstanceMetadataEndpoint:e,httpRequest:t}=await import("./chunk-xqcyxfy4.js"),r=await e();return(await t({...r,path:Lt})).toString()}catch(e){}};var Bp=(e)=>{let t=async()=>{if(e.region===void 0)throw new Error("Region is missing from runtimeConfig");let r=e.region;if(typeof r==="string")return r;return r()};return{setRegion(r){t=r},region(){return t}}},Wp=(e)=>{return{region:e.region()}};var Zr=/^[A-Za-z0-9+/]*={0,2}$/,iu=(e)=>{if(e.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Zr.exec(e))throw new TypeError("Invalid base64 string.");let t=v(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};var pu=(e)=>{let t;if(typeof e==="string")t=oe(e);else t=e;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return I(t.buffer,t.byteOffset,t.byteLength).toString("base64")};export{Kr as Ua,Qr as Va,to as Wa,io as Xa,co as Ya,Jt as Za,$ as _a,er as $a,nr as ab,qs as bb,Ei as cb,Ri as db,ot as eb,A as fb,nt as gb,$i as hb,si as ib,pa as jb,ga as kb,Wa as lb,Ha as mb,gt as nb,kc as ob,Gc as pb,Vc as qb,ff as rb,Jf as sb,tp as tb,oe as ub,Ep as vb,Wr as wb,Ip as xb,iu as yb,pu as zb,Fp as Ab,Bp as Bb,Wp as Cb};
@@ -1,8 +1,8 @@
1
- import{xb as X}from"./chunk-qqp394c2.js";var M=X((N,T)=>{var{defineProperty:B,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Z}=Object,$=Object.prototype.hasOwnProperty,H=(b,j)=>B(b,"name",{value:j,configurable:!0}),A=(b,j)=>{for(var q in j)B(b,q,{get:j[q],enumerable:!0})},D=(b,j,q,K)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let z of Z(j))if(!$.call(b,z)&&z!==q)B(b,z,{get:()=>j[z],enumerable:!(K=Y(j,z))||K.enumerable})}return b},E=(b)=>D(B({},"__esModule",{value:!0}),b),L={};A(L,{emitWarningIfUnsupportedVersion:()=>I,setCredentialFeature:()=>Q,setFeature:()=>R,state:()=>G});T.exports=E(L);var G={warningEmitted:!1},I=H((b)=>{if(b&&!G.warningEmitted&&parseInt(b.substring(1,b.indexOf(".")))<18)G.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
1
+ import{Sc as X}from"./chunk-f0ywgmn1.js";var M=X((N,T)=>{var{defineProperty:B,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Z}=Object,$=Object.prototype.hasOwnProperty,H=(b,j)=>B(b,"name",{value:j,configurable:!0}),A=(b,j)=>{for(var q in j)B(b,q,{get:j[q],enumerable:!0})},D=(b,j,q,K)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let z of Z(j))if(!$.call(b,z)&&z!==q)B(b,z,{get:()=>j[z],enumerable:!(K=Y(j,z))||K.enumerable})}return b},E=(b)=>D(B({},"__esModule",{value:!0}),b),L={};A(L,{emitWarningIfUnsupportedVersion:()=>I,setCredentialFeature:()=>Q,setFeature:()=>R,state:()=>G});T.exports=E(L);var G={warningEmitted:!1},I=H((b)=>{if(b&&!G.warningEmitted&&parseInt(b.substring(1,b.indexOf(".")))<18)G.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
2
2
  no longer support Node.js 16.x on January 6, 2025.
3
3
 
4
4
  To continue receiving updates to AWS services, bug fixes, and security
5
5
  updates please upgrade to a supported Node.js LTS version.
6
6
 
7
7
  More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion");function Q(b,j,q){if(!b.$source)b.$source={};return b.$source[j]=q,b}H(Q,"setCredentialFeature");function R(b,j,q){if(!b.__aws_sdk_context)b.__aws_sdk_context={features:{}};else if(!b.__aws_sdk_context.features)b.__aws_sdk_context.features={};b.__aws_sdk_context.features[j]=q}H(R,"setFeature")});
8
- export{M as tb};
8
+ export{M as Pc};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{G as D,h as C}from"./chunk-7dhp3rzj.js";import"./chunk-f0ywgmn1.js";class E{constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:(c)=>this.replacement=c}}replace(c,r,f,s){if(c&&r)if(f!=null)c[r][f]=s;else c[r]=s}remove(c,r,f){if(c&&r)if(f!==null&&f!==void 0)c[r].splice(f,1);else delete c[r]}}class w extends E{constructor(c,r){super();this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:(f)=>this.replacement=f},this.enter=c,this.leave=r}visit(c,r,f,s){if(c){if(this.enter){let i=this.should_skip,I=this.should_remove,l=this.replacement;if(this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,c,r,f,s),this.replacement)c=this.replacement,this.replace(r,f,s,c);if(this.should_remove)this.remove(r,f,s);let t=this.should_skip,m=this.should_remove;if(this.should_skip=i,this.should_remove=I,this.replacement=l,t)return c;if(m)return null}let a;for(a in c){let i=c[a];if(i&&typeof i==="object"){if(Array.isArray(i)){let I=i;for(let l=0;l<I.length;l+=1){let t=I[l];if(e(t)){if(!this.visit(t,c,a,l))l--}}}else if(e(i))this.visit(i,c,a,null)}}if(this.leave){let i=this.replacement,I=this.should_remove;if(this.replacement=null,this.should_remove=!1,this.leave.call(this.context,c,r,f,s),this.replacement)c=this.replacement,this.replace(r,f,s,c);if(this.should_remove)this.remove(r,f,s);let l=this.should_remove;if(this.replacement=i,this.should_remove=I,l)return null}}return c}}function e(c){return c!==null&&typeof c==="object"&&"type"in c&&typeof c.type==="string"}function b(c,{enter:r,leave:f}){return new w(r,f).visit(c,null)}async function G(c,r,f){let s=D(c),a=await r.getImportMap(),i=[],I=f?.autoImport!==!1,l=f?.transformVirtualImports!==!1&&r.options.virtualImports?.length;if(I||l){let t=C(s.original,{sourceType:"module",ecmaVersion:"latest",locations:!0}),m=y(a,r.options.virtualImports),u=V(t,l?m.walk:{});if(I){let S=u.unmatched;i.push(...Array.from(S).map((g)=>{let h=a.get(g);if(h&&!h.disabled)return h;return null}).filter(Boolean));for(let g of r.addons)i=await g.matchImports?.call(r,S,i)||i}m.ranges.forEach(([S,g])=>{s.remove(S,g)}),i.push(...m.imports)}return{s,strippedCode:c.toString(),matchedImports:i,isCJSContext:!1,firstOccurrence:0}}function V(c,r){let f=[],s=void 0,a=[];function i(t){s={node:t,parent:s,declarations:new Set,references:new Set},f.push(s),a.push(s)}function I(t){if(a.pop()?.node!==t)throw new Error("Scope mismatch");s=a[a.length-1]}i(void 0),b(c,{enter(t,m,u,S){switch(r?.enter?.call(this,t,m,u,S),t.type){case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":s.declarations.add(t.local.name);return;case"FunctionDeclaration":case"ClassDeclaration":if(t.id)s.declarations.add(t.id.name);return;case"VariableDeclarator":if(t.id.type==="Identifier")s.declarations.add(t.id.name);else b(t.id,{enter(g){if(g.type==="ObjectPattern")g.properties.forEach((h)=>{if(h.type==="Property"&&h.value.type==="Identifier")s.declarations.add(h.value.name);else if(h.type==="RestElement"&&h.argument.type==="Identifier")s.declarations.add(h.argument.name)});else if(g.type==="ArrayPattern")g.elements.forEach((h)=>{if(h?.type==="Identifier")s.declarations.add(h.name);if(h?.type==="RestElement"&&h.argument.type==="Identifier")s.declarations.add(h.argument.name)})}});return;case"BlockStatement":i(t);return;case"Identifier":switch(m?.type){case"CallExpression":if(m.callee===t||m.arguments.includes(t))s.references.add(t.name);return;case"MemberExpression":if(m.object===t)s.references.add(t.name);return;case"VariableDeclarator":if(m.init===t)s.references.add(t.name);return;case"SpreadElement":if(m.argument===t)s.references.add(t.name);return;case"ClassDeclaration":if(m.superClass===t)s.references.add(t.name);return;case"Property":if(m.value===t)s.references.add(t.name);return;case"TemplateLiteral":if(m.expressions.includes(t))s.references.add(t.name);return;case"AssignmentExpression":if(m.right===t)s.references.add(t.name);return;case"IfStatement":case"WhileStatement":case"DoWhileStatement":if(m.test===t)s.references.add(t.name);return;case"SwitchStatement":if(m.discriminant===t)s.references.add(t.name);return}if(m?.type.includes("Expression"))s.references.add(t.name)}},leave(t,m,u,S){switch(r?.leave?.call(this,t,m,u,S),t.type){case"BlockStatement":I(t)}}});let l=new Set;for(let t of f)for(let m of t.references){let u=!1,S=t;while(S){if(S.declarations.has(m)){u=!0;break}S=S?.parent}if(!u)l.add(m)}return{unmatched:l,scopes:f}}function y(c,r=[]){let f=[],s=[];return{imports:f,ranges:s,walk:{enter(a){if(a.type==="ImportDeclaration"){if(r.includes(a.source.value))s.push([a.start,a.end]),a.specifiers.forEach((i)=>{if(i.type==="ImportSpecifier"&&i.imported.type==="Identifier"){let I=c.get(i.imported.name);if(!I)throw new Error(`[unimport] failed to find "${i.imported.name}" imported from "${a.source.value}"`);f.push({from:I.from,name:I.name,as:i.local.name})}})}}}}}export{V as traveseScopes,G as detectImportsAcorn,y as createVirtualImportsAcronWalker};
package/dist/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{A as f,B as j,C as I,D as J,G as g,H as p,J as a,K as m,a as M,b as N,c as O,d as Q,e as R,f as S,h as T,i as U,k as V,l as W,m as X,n as Y,o as Z,p as _,q as $,r as x,s as z,t as C,u as F,v as P,w as h,x as A,y as D,z as k}from"./chunk-akkmfscs.js";import"./chunk-zanq4wm3.js";import"./chunk-qpdxnnf8.js";import"./chunk-a4g1e1n0.js";import"./chunk-y5vqt054.js";import"./chunk-8gx9at51.js";import"./chunk-6yazdvb4.js";import"./chunk-cm7bwdk9.js";import"./chunk-ha75r57f.js";import"./chunk-gg80s18j.js";import"./chunk-d2dbhn2h.js";import w from"process";import{runAction as n}from"@stacksjs/actions";import{cli as l,log as v}from"@stacksjs/cli";import{Action as i}from"@stacksjs/enums";import{path as L}from"@stacksjs/path";import{fs as c}from"@stacksjs/storage";import{ensureProjectIsInitialized as t}from"@stacksjs/utils";w.on("uncaughtException",(q)=>{v.debug("Buddy uncaughtException"),v.error(q),w.exit(1)});w.on("unhandledRejection",(q)=>{v.debug("Buddy unhandledRejection"),v.error(q),w.exit(1)});async function e(){let q=l("buddy");if(J(q),$(q),await t())v.debug("Project is initialized");else{v.info("Your `APP_KEY` is not yet set"),v.info("Generating application key...");let B=await n(i.KeyGenerate);if(B.isErr())v.error("Failed to set random application key.",B.error),w.exit()}M(q),N(q),O(q),Q(q),R(q),S(q),U(q),W(q),T(q),V(q),h(q),D(q),X(q),Y(q),Z(q),_(q),x(q),z(q),C(q),F(q),P(q),k(q),f(q),j(q),I(q),J(q),g(q),p(q),m(q),A(q),a(q),await o(q),q.help(),q.parse()}await e();async function o(q){let G=L.appPath("Commands"),B=c.readdirSync(G).filter((E)=>E.endsWith(".ts"));for(let E of B){let H=await import(`${G}/${E}`);if(typeof H.default==="function")H.default(q);else console.error(`Expected a default export function in ${E}, but got:`,H.default)}let K=await import(L.listenersPath("Console.ts"));if(typeof K.default==="function")K.default(q)}
2
+ import{$ as X,Aa as i,P as M,Q as N,R as O,S as Q,T as R,U as S,W as T,X as U,Z as V,_ as W,aa as Y,ba as Z,ca as _,da as $,ea as x,fa as z,ga as C,ha as F,ia as P,ja as h,ka as A,la as D,ma as k,na as f,oa as j,pa as I,qa as g,ra as p,sa as a,ta as J,wa as m,xa as n,za as l}from"./chunk-kqn7aa4r.js";import"./chunk-rvzykrtp.js";import"./chunk-ybkvyfqx.js";import"./chunk-tnqbven5.js";import"./chunk-n337bav6.js";import"./chunk-hmvbpz4z.js";import"./chunk-c0awzy8k.js";import"./chunk-cdnqz7bt.js";import"./chunk-vs0pve8j.js";import"./chunk-3yp4xe8e.js";import"./chunk-5d1pmfaj.js";import"./chunk-zmz07e1t.js";import"./chunk-f0ywgmn1.js";import w from"process";import{runAction as c}from"@stacksjs/actions";import{cli as t,log as v}from"@stacksjs/cli";import{Action as e}from"@stacksjs/enums";import{path as L}from"@stacksjs/path";import{fs as o}from"@stacksjs/storage";import{ensureProjectIsInitialized as r}from"@stacksjs/utils";w.on("uncaughtException",(q)=>{v.debug("Buddy uncaughtException"),v.error(q),w.exit(1)});w.on("unhandledRejection",(q)=>{v.debug("Buddy unhandledRejection"),v.error(q),w.exit(1)});async function b(){let q=t("buddy");if(J(q),$(q),await r())v.debug("Project is initialized");else{v.info("Your `APP_KEY` is not yet set"),v.info("Generating application key...");let B=await c(e.KeyGenerate);if(B.isErr())v.error("Failed to set random application key.",B.error),w.exit()}M(q),N(q),O(q),Q(q),R(q),S(q),U(q),W(q),T(q),V(q),h(q),D(q),X(q),Y(q),Z(q),_(q),x(q),z(q),C(q),F(q),P(q),k(q),f(q),j(q),I(q),p(q),a(q),J(q),g(q),m(q),n(q),i(q),A(q),l(q),await s(q),q.help(),q.parse()}await b();async function s(q){let G=L.appPath("Commands"),B=o.readdirSync(G).filter((E)=>E.endsWith(".ts"));for(let E of B){let H=await import(`${G}/${E}`);if(typeof H.default==="function")H.default(q);else console.error(`Expected a default export function in ${E}, but got:`,H.default)}let K=await import(L.listenersPath("Console.ts"));if(typeof K.default==="function")K.default(q)}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{A as C,B as D,C as E,D as F,E as G,F as H,G as I,H as J,I as K,J as L,K as M,a as e,b as f,c as m,d as p,e as t,f as x,g as a,h as b,i as c,j as d,k as g,l as h,m as i,n as j,o as k,p as l,q as n,r as q,s,t as u,u as v,v as w,w as y,x as z,y as A,z as B}from"./chunk-akkmfscs.js";import"./chunk-zanq4wm3.js";import"./chunk-qpdxnnf8.js";import"./chunk-a4g1e1n0.js";import"./chunk-y5vqt054.js";import"./chunk-8gx9at51.js";import"./chunk-6yazdvb4.js";import"./chunk-cm7bwdk9.js";import"./chunk-ha75r57f.js";import"./chunk-gg80s18j.js";import"./chunk-d2dbhn2h.js";export{M as version,L as upgrade,K as types,J as tinker,I as test,d as startDevelopmentServer,F as setup,E as seed,D as saas,C as route,B as release,A as projects,z as prepublish,y as ports,w as outdated,G as optimizePkgxDeps,v as migrate,u as make,s as list,q as lint,n as key,l as install,k as http,j as generate,i as fresh,H as ensureEnvIsSet,h as domains,g as dns,c as dev,b as deploy,a as create,x as configure,t as commit,p as cloud,m as clean,f as changelog,e as build};
2
+ import{$ as i,Aa as P,P as e,Q as f,R as m,S as p,T as t,U as x,V as a,W as b,X as c,Y as d,Z as g,_ as h,aa as j,ba as k,ca as l,da as n,ea as q,fa as s,ga as u,ha as v,ia as w,ja as y,ka as z,la as A,ma as B,na as C,oa as D,pa as E,qa as F,ra as G,sa as H,ta as I,ua as J,va as K,wa as L,xa as M,ya as N,za as O}from"./chunk-kqn7aa4r.js";import"./chunk-rvzykrtp.js";import"./chunk-ybkvyfqx.js";import"./chunk-tnqbven5.js";import"./chunk-n337bav6.js";import"./chunk-hmvbpz4z.js";import"./chunk-c0awzy8k.js";import"./chunk-cdnqz7bt.js";import"./chunk-vs0pve8j.js";import"./chunk-3yp4xe8e.js";import"./chunk-5d1pmfaj.js";import"./chunk-zmz07e1t.js";import"./chunk-f0ywgmn1.js";export{P as version,O as upgrade,N as types,M as tinker,L as test,d as startDevelopmentServer,I as setup,H as seed,G as search,F as schedule,E as saas,D as route,C as release,B as queue,A as projects,z as prepublish,y as ports,w as outdated,J as optimizePkgxDeps,v as migrate,u as make,s as list,q as lint,n as key,l as install,k as http,j as generate,i as fresh,K as ensureEnvIsSet,h as domains,g as dns,c as dev,b as deploy,a as create,x as configure,t as commit,p as cloud,m as clean,f as changelog,e as build};
package/dist/ports.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import type { CLI, Ports, PortsOptions } from '@stacksjs/types';
2
- import { ports as projectPorts } from '@stacksjs/config';
3
2
 
4
3
  export declare function ports(buddy: CLI): void;
5
4
  declare function getPortsForProjectPath(path: string, options: PortsOptions): void;
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function queue(buddy: CLI): void;
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function schedule(buddy: CLI): void;
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function search(buddy: CLI): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/buddy",
3
3
  "type": "module",
4
- "version": "0.68.2",
4
+ "version": "0.69.2",
5
5
  "description": "Meet Buddy. The Stacks runtime.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": ["Chris Breuer <chris@stacksjs.org>"],
@@ -59,65 +59,64 @@
59
59
  "files": ["README.md", "dist"],
60
60
  "scripts": {
61
61
  "buddy": "bunx --bun ./src/cli.ts",
62
- "build": "bun build.ts && bun run compile",
63
- "compile": "bun build ./bin/cli.ts --compile --minify --sourcemap --outfile dist/stacks",
64
- "compile:linux:x64-modern": "bun build ./bin/cli.ts --compile --target=bun-linux-x64-modern --minify --sourcemap --outfile dist/stacks",
65
- "compile:linux:x64-baseline": "bun build ./bin/cli.ts --compile --target=bun-linux-x64-baseline --minify --sourcemap --outfile dist/stacks",
66
- "compile:linux:arm64": "bun build ./bin/cli.ts --compile --target=bun-linux-arm64 --minify --sourcemap --outfile dist/stacks",
67
- "compile:windows:x64-modern": "bun build ./bin/cli.ts --compile --target=bun-windows-x64-modern --minify --sourcemap --outfile dist/stacks",
68
- "compile:windows:x64-baseline": "bun build ./bin/cli.ts --compile --target=bun-windows-x64-baseline --minify --sourcemap --outfile dist/stacks",
69
- "compile:mac:arm64": "bun build ./bin/cli.ts --compile --target=bun-darwin-arm64 --minify --sourcemap --outfile dist/stacks",
70
- "compile:mac:x64": "bun build ./bin/cli.ts --compile --target=bun-darwin-x64 --minify --sourcemap --outfile dist/stacks",
62
+ "build": "bun build.ts",
63
+ "compile": "bun build ./bin/cli.ts --compile --minify --sourcemap --outfile dist/buddy",
64
+ "compile:all": "bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:windows-x64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64",
65
+ "compile:linux-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/buddy-linux-x64",
66
+ "compile:linux-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/buddy-linux-arm64",
67
+ "compile:windows-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/buddy-windows-x64.exe",
68
+ "compile:darwin-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/buddy-darwin-x64",
69
+ "compile:darwin-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/buddy-darwin-arm64",
71
70
  "typecheck": "bun tsc --noEmit",
72
- "prepublishOnly": "bun run build"
71
+ "prepublishOnly": "bun run build && bun run compile:all"
73
72
  },
74
73
  "dependencies": {
75
- "@stacksjs/actions": "0.68.1",
76
- "@stacksjs/ai": "0.68.1",
77
- "@stacksjs/alias": "0.68.1",
78
- "@stacksjs/arrays": "0.68.1",
79
- "@stacksjs/auth": "0.68.1",
80
- "@stacksjs/build": "0.68.1",
81
- "@stacksjs/cache": "0.68.1",
82
- "@stacksjs/cli": "0.68.1",
83
- "@stacksjs/cloud": "0.68.1",
84
- "@stacksjs/collections": "0.68.1",
85
- "@stacksjs/config": "0.68.1",
86
- "@stacksjs/database": "0.68.1",
87
- "@stacksjs/desktop": "0.68.1",
88
- "@stacksjs/development": "0.68.1",
89
- "@stacksjs/dns": "0.68.1",
90
- "@stacksjs/docs": "0.68.1",
91
- "@stacksjs/email": "0.68.1",
92
- "@stacksjs/enums": "0.68.1",
93
- "@stacksjs/error-handling": "0.68.1",
94
- "@stacksjs/events": "0.68.1",
95
- "@stacksjs/faker": "0.68.1",
96
- "@stacksjs/git": "0.68.1",
97
- "@stacksjs/health": "0.68.1",
98
- "@stacksjs/lint": "0.68.1",
99
- "@stacksjs/logging": "0.68.1",
100
- "@stacksjs/notifications": "0.68.1",
101
- "@stacksjs/objects": "0.68.1",
102
- "@stacksjs/orm": "0.68.1",
103
- "@stacksjs/path": "0.68.1",
104
- "@stacksjs/payments": "0.68.1",
105
- "@stacksjs/realtime": "0.68.1",
106
- "@stacksjs/router": "0.68.1",
107
- "@stacksjs/search-engine": "0.68.1",
108
- "@stacksjs/security": "0.68.1",
109
- "@stacksjs/server": "0.68.1",
110
- "@stacksjs/storage": "0.68.1",
111
- "@stacksjs/strings": "0.68.1",
112
- "@stacksjs/testing": "0.68.1",
113
- "@stacksjs/tunnel": "0.68.1",
114
- "@stacksjs/types": "0.68.1",
115
- "@stacksjs/ui": "0.68.1",
116
- "@stacksjs/utils": "0.68.1",
117
- "@stacksjs/validation": "0.68.1"
74
+ "@stacksjs/actions": "0.69.2",
75
+ "@stacksjs/ai": "0.69.2",
76
+ "@stacksjs/alias": "0.69.2",
77
+ "@stacksjs/arrays": "0.69.2",
78
+ "@stacksjs/auth": "0.69.2",
79
+ "@stacksjs/build": "0.69.2",
80
+ "@stacksjs/cache": "0.69.2",
81
+ "@stacksjs/cli": "0.69.2",
82
+ "@stacksjs/cloud": "0.69.2",
83
+ "@stacksjs/collections": "0.69.2",
84
+ "@stacksjs/config": "0.69.2",
85
+ "@stacksjs/database": "0.69.2",
86
+ "@stacksjs/desktop": "0.69.2",
87
+ "@stacksjs/development": "0.69.2",
88
+ "@stacksjs/dns": "0.69.2",
89
+ "@stacksjs/docs": "0.69.2",
90
+ "@stacksjs/email": "0.69.2",
91
+ "@stacksjs/enums": "0.69.2",
92
+ "@stacksjs/error-handling": "0.69.2",
93
+ "@stacksjs/events": "0.69.2",
94
+ "@stacksjs/faker": "0.69.2",
95
+ "@stacksjs/git": "0.69.2",
96
+ "@stacksjs/health": "0.69.2",
97
+ "@stacksjs/lint": "0.69.2",
98
+ "@stacksjs/logging": "0.69.2",
99
+ "@stacksjs/notifications": "0.69.2",
100
+ "@stacksjs/objects": "0.69.2",
101
+ "@stacksjs/orm": "0.69.2",
102
+ "@stacksjs/path": "0.69.2",
103
+ "@stacksjs/payments": "0.69.2",
104
+ "@stacksjs/realtime": "0.69.2",
105
+ "@stacksjs/router": "0.69.2",
106
+ "@stacksjs/search-engine": "0.69.2",
107
+ "@stacksjs/security": "0.69.2",
108
+ "@stacksjs/server": "0.69.2",
109
+ "@stacksjs/storage": "0.69.2",
110
+ "@stacksjs/strings": "0.69.2",
111
+ "@stacksjs/testing": "0.69.2",
112
+ "@stacksjs/tunnel": "0.69.2",
113
+ "@stacksjs/types": "0.69.2",
114
+ "@stacksjs/ui": "0.69.2",
115
+ "@stacksjs/utils": "0.69.2",
116
+ "@stacksjs/validation": "0.69.2"
118
117
  },
119
118
  "devDependencies": {
120
- "@stacksjs/development": "0.68.1"
119
+ "@stacksjs/development": "0.69.2"
121
120
  },
122
121
  "config": {
123
122
  "commitizen": {
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{L as $h}from"./chunk-d3awsfqm.js";import{$ as Hl,M as X0,N as Y0,O as Z0,P as y0,Q as Fh,R as F0,S as Wl,T as Nl,U as Tl,V as Al,W as Gh,X as $0,Y as Ol,Z as gl,_ as dl,aa as xl,ba as il,ca as V0,da as v0,ea as B,fa as E,ga as U0,ha as cl,ia as el,ja as P0,ka as pl,la as z0,ma as h0,na as l0,oa as al,pa as sl,qa as w0,ra as G0,sa as rl,ta as _l,ua as I0,va as B0,wa as E0}from"./chunk-pv6hp18q.js";import{xa as f,ya as Ll}from"./chunk-b3wr7cpk.js";import{$a as oh,Aa as D0,Ba as a0,Ka as q0,La as Q,Ma as Hh,Na as Gw,Qa as s0,Sa as S,Ta as u,Va as r0,Wa as M0,Xa as T,Ya as _0,Za as ol,_a as nl,ab as k0,bb as K0,eb as Rl,ib as ul,jb as tl,za as J0}from"./chunk-9bxh78vd.js";import"./chunk-xmdbxa8w.js";import"./chunk-ra5sfgg4.js";import"./chunk-jr4naxsv.js";import{wb as EG}from"./chunk-hrsat16n.js";import"./chunk-yktee4wv.js";import{Db as A}from"./chunk-yvmyw2r2.js";var O=A(Fh(),1);var Sl=A(Gh(),1);var ml=async(h,w,l)=>{return{operation:dl(w).operation,region:await Hl(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function Ew(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(w,l)=>({signingProperties:{config:w,context:l}})}}function Il(h){return{schemeId:"smithy.api#noAuth"}}var Jl=(h)=>{let w=[];switch(h.operation){case"AssumeRoleWithSAML":{w.push(Il(h));break}case"AssumeRoleWithWebIdentity":{w.push(Il(h));break}default:w.push(Ew(h))}return w},Qw=(h)=>({...h,stsClientCtor:j}),Dl=(h)=>{let w=Qw(h);return{...Sl.resolveAwsSdkSigV4Config(w)}};var kl=(h)=>{return{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"}},D={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Kl={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.679.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"vitest run","test:watch":"vitest watch"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.679.0","@aws-sdk/core":"3.679.0","@aws-sdk/credential-provider-node":"3.679.0","@aws-sdk/middleware-host-header":"3.679.0","@aws-sdk/middleware-logger":"3.679.0","@aws-sdk/middleware-recursion-detection":"3.679.0","@aws-sdk/middleware-user-agent":"3.679.0","@aws-sdk/region-config-resolver":"3.679.0","@aws-sdk/types":"3.679.0","@aws-sdk/util-endpoints":"3.679.0","@aws-sdk/util-user-agent-browser":"3.679.0","@aws-sdk/util-user-agent-node":"3.679.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}};var Ih=A(Gh(),1);var d0=A(Fh(),1);var bl=A(Gh(),1),fl=A(Fh(),1);var Bl={["required"]:!1,["type"]:"String"},yh={["required"]:!0,default:!1,["type"]:"Boolean"},Vl={["ref"]:"Endpoint"},El={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},J={["ref"]:"Region"},Ql={["fn"]:"aws.partition",["argv"]:[J],assign:"PartitionResult"},vl={["ref"]:"UseFIPS"},Ul={["ref"]:"UseDualStack"},k={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},F={},Xl={conditions:[{["fn"]:"stringEquals",["argv"]:[J,"aws-global"]}],["endpoint"]:k,["type"]:"endpoint"},Pl={["fn"]:"booleanEquals",["argv"]:[vl,!0]},ql={["fn"]:"booleanEquals",["argv"]:[Ul,!0]},Yl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},zl={["ref"]:"PartitionResult"},Zl={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[zl,"supportsDualStack"]}]},yl=[{["fn"]:"isSet",["argv"]:[Vl]}],Fl=[Pl],$l=[ql],Yw={version:"1.0",parameters:{Region:Bl,UseDualStack:yh,UseFIPS:yh,Endpoint:Bl,UseGlobalEndpoint:yh},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:yl},El,Ql,{["fn"]:"booleanEquals",["argv"]:[vl,!1]},{["fn"]:"booleanEquals",["argv"]:[Ul,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-northeast-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-south-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-2"]}],endpoint:k,["type"]:"endpoint"},Xl,{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ca-central-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-central-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-north-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-2"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-3"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"sa-east-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-2"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-2"]}],endpoint:k,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:F},["type"]:"endpoint"}],["type"]:"tree"},{conditions:yl,rules:[{conditions:Fl,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:$l,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:Vl,properties:F,headers:F},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[El],rules:[{conditions:[Ql],rules:[{conditions:[Pl,ql],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Yl]},Zl],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:F,headers:F},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:Fl,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Yl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[zl,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:F,headers:F},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:F,headers:F},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:$l,rules:[{conditions:[Zl],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:F,headers:F},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},Xl,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:F,headers:F},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},Ml=Yw;var Zw=new Wl({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),jl=(h,w={})=>{return Zw.get(h,()=>Tl(Ml,{endpointParams:h,logger:w.logger}))};Nl.aws=Al;var Cl=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??rl,base64Encoder:h?.base64Encoder??_l,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??jl,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??Jl,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new bl.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new fl.NoAuthSigner}],logger:h?.logger??new Rl,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??Ll,utf8Decoder:h?.utf8Decoder??al,utf8Encoder:h?.utf8Encoder??sl}};var H0=(h)=>{nl(process.version);let w=I0(h),l=()=>w().then(ol),G=Cl(h);return Ih.emitWarningIfUnsupportedVersion(process.version),{...G,...h,runtime:"node",defaultsMode:w,bodyLengthChecker:h?.bodyLengthChecker??G0,credentialDefaultProvider:h?.credentialDefaultProvider??$h,defaultUserAgentProvider:h?.defaultUserAgentProvider??h0({serviceId:G.serviceId,clientVersion:Kl.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(I)=>I.getIdentityProvider("aws.auth#sigv4")||(async(H)=>await $h(H?.__config||{})()),signer:new Ih.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(I)=>I.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new d0.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(el),region:h?.region??f(xl,il),requestHandler:ul.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...pl,default:async()=>(await l()).retryMode||cl}),sha256:h?.sha256??w0.bind(null,"sha256"),streamCollector:h?.streamCollector??tl,useDualstackEndpoint:h?.useDualstackEndpoint??f(Ol),useFipsEndpoint:h?.useFipsEndpoint??f(gl),userAgentAppId:h?.userAgentAppId??f(l0)}};var S0=(h)=>{let{httpAuthSchemes:w,httpAuthSchemeProvider:l,credentials:G}=h;return{setHttpAuthScheme(I){let H=w.findIndex((d)=>d.schemeId===I.schemeId);if(H===-1)w.push(I);else w.splice(H,1,I)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider(I){l=I},httpAuthSchemeProvider(){return l},setCredentials(I){G=I},credentials(){return G}}},m0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var dh=(h)=>h,Q0=(h,w)=>{let l={...dh(B0(h)),...dh(k0(h)),...dh(J0(h)),...dh(S0(h))};return w.forEach((G)=>G.configure(l)),{...h,...E0(l),...K0(l),...D0(l),...m0(l)}};class j extends q0{constructor(...[h]){let w=H0(h||{}),l=kl(w),G=F0(l),I=P0(G),H=V0(I),d=X0(H),X=U0(d),z=Dl(X),P=Q0(z,h?.extensions||[]);super(P);this.config=P,this.middlewareStack.use($0(this.config)),this.middlewareStack.use(z0(this.config)),this.middlewareStack.use(v0(this.config)),this.middlewareStack.use(Y0(this.config)),this.middlewareStack.use(Z0(this.config)),this.middlewareStack.use(y0(this.config)),this.middlewareStack.use(O.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ml,identityProviderConfigProvider:async(C)=>new O.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(O.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class y extends M0{constructor(h){super(h);Object.setPrototypeOf(this,y.prototype)}}class Sh extends y{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,Sh.prototype)}}class mh extends y{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,mh.prototype)}}class Jh extends y{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends y{constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class kh extends y{constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,kh.prototype)}}class Kh extends y{constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,Kh.prototype)}}class Bh extends y{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,Bh.prototype)}}class Eh extends y{constructor(h){super({name:"InvalidAuthorizationMessageException",$fault:"client",...h});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,Eh.prototype)}}var n=(h)=>({...h,...h.SecretAccessKey&&{SecretAccessKey:Hh}}),W0=(h)=>({...h,...h.Credentials&&{Credentials:n(h.Credentials)}}),N0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:Hh}}),T0=(h)=>({...h,...h.Credentials&&{Credentials:n(h.Credentials)}}),A0=(h)=>({...h,...h.WebIdentityToken&&{WebIdentityToken:Hh}}),j0=(h)=>({...h,...h.Credentials&&{Credentials:n(h.Credentials)}}),L0=(h)=>({...h,...h.Credentials&&{Credentials:n(h.Credentials)}}),R0=(h)=>({...h,...h.Credentials&&{Credentials:n(h.Credentials)}});var q=A(Gh(),1);var b0=async(h,w)=>{let l=a,G;return G=b({...zw(h,w),[r]:IG,[_]:s}),R(w,l,"/",void 0,G)},f0=async(h,w)=>{let l=a,G;return G=b({...Mw(h,w),[r]:dG,[_]:s}),R(w,l,"/",void 0,G)},C0=async(h,w)=>{let l=a,G;return G=b({...Ww(h,w),[r]:HG,[_]:s}),R(w,l,"/",void 0,G)},O0=async(h,w)=>{let l=a,G;return G=b({...Nw(h,w),[r]:SG,[_]:s}),R(w,l,"/",void 0,G)},g0=async(h,w)=>{let l=a,G;return G=b({...Tw(h,w),[r]:mG,[_]:s}),R(w,l,"/",void 0,G)},x0=async(h,w)=>{let l=a,G;return G=b({...Aw(h,w),[r]:JG,[_]:s}),R(w,l,"/",void 0,G)},i0=async(h,w)=>{let l=a,G;return G=b({...jw(h,w),[r]:DG,[_]:s}),R(w,l,"/",void 0,G)},c0=async(h,w)=>{let l=a,G;return G=b({...Lw(h,w),[r]:kG,[_]:s}),R(w,l,"/",void 0,G)},e0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=bw(l.AssumeRoleResult,w),{$metadata:K(h),...G}},p0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=fw(l.AssumeRoleWithSAMLResult,w),{$metadata:K(h),...G}},o0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=Cw(l.AssumeRoleWithWebIdentityResult,w),{$metadata:K(h),...G}},n0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=Ow(l.DecodeAuthorizationMessageResult,w),{$metadata:K(h),...G}},u0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=iw(l.GetAccessKeyInfoResult,w),{$metadata:K(h),...G}},t0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=cw(l.GetCallerIdentityResult,w),{$metadata:K(h),...G}},hw=async(h,w)=>{if(h.statusCode>=300)return L(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=ew(l.GetFederationTokenResult,w),{$metadata:K(h),...G}},lw=async(h,w)=>{if(h.statusCode>=300)return L(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=pw(l.GetSessionTokenResult,w),{$metadata:K(h),...G}},L=async(h,w)=>{let l={...h,body:await q.parseXmlErrorBody(h.body,w)},G=KG(h,l.body);switch(G){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await yw(l,w);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Uw(l,w);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Pw(l,w);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await qw(l,w);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await $w(l,w);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await vw(l,w);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Fw(l,w);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Vw(l,w);default:let I=l.body;return GG({output:h,parsedBody:I.Error,errorCode:G})}},yw=async(h,w)=>{let l=h.body,G=gw(l.Error,w),I=new Sh({$metadata:K(h),...G});return T(I,l)},Fw=async(h,w)=>{let l=h.body,G=ow(l.Error,w),I=new Bh({$metadata:K(h),...G});return T(I,l)},$w=async(h,w)=>{let l=h.body,G=nw(l.Error,w),I=new kh({$metadata:K(h),...G});return T(I,l)},Vw=async(h,w)=>{let l=h.body,G=uw(l.Error,w),I=new Eh({$metadata:K(h),...G});return T(I,l)},vw=async(h,w)=>{let l=h.body,G=tw(l.Error,w),I=new Kh({$metadata:K(h),...G});return T(I,l)},Uw=async(h,w)=>{let l=h.body,G=hG(l.Error,w),I=new mh({$metadata:K(h),...G});return T(I,l)},Pw=async(h,w)=>{let l=h.body,G=lG(l.Error,w),I=new Jh({$metadata:K(h),...G});return T(I,l)},qw=async(h,w)=>{let l=h.body,G=wG(l.Error,w),I=new Dh({$metadata:K(h),...G});return T(I,l)},zw=(h,w)=>{let l={};if(h[N]!=null)l[N]=h[N];if(h[c]!=null)l[c]=h[c];if(h[V]!=null){let G=Qh(h[V],w);if(h[V]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,H])=>{let d=`PolicyArns.${I}`;l[d]=H})}if(h[$]!=null)l[$]=h[$];if(h[Z]!=null)l[Z]=h[Z];if(h[p]!=null){let G=ww(h[p],w);if(h[p]?.length===0)l.Tags=[];Object.entries(G).forEach(([I,H])=>{let d=`Tags.${I}`;l[d]=H})}if(h[xh]!=null){let G=_w(h[xh],w);if(h[xh]?.length===0)l.TransitiveTagKeys=[];Object.entries(G).forEach(([I,H])=>{let d=`TransitiveTagKeys.${I}`;l[d]=H})}if(h[qh]!=null)l[qh]=h[qh];if(h[e]!=null)l[e]=h[e];if(h[o]!=null)l[o]=h[o];if(h[U]!=null)l[U]=h[U];if(h[ah]!=null){let G=sw(h[ah],w);if(h[ah]?.length===0)l.ProvidedContexts=[];Object.entries(G).forEach(([I,H])=>{let d=`ProvidedContexts.${I}`;l[d]=H})}return l},Mw=(h,w)=>{let l={};if(h[N]!=null)l[N]=h[N];if(h[Lh]!=null)l[Lh]=h[Lh];if(h[fh]!=null)l[fh]=h[fh];if(h[V]!=null){let G=Qh(h[V],w);if(h[V]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,H])=>{let d=`PolicyArns.${I}`;l[d]=H})}if(h[$]!=null)l[$]=h[$];if(h[Z]!=null)l[Z]=h[Z];return l},Ww=(h,w)=>{let l={};if(h[N]!=null)l[N]=h[N];if(h[c]!=null)l[c]=h[c];if(h[eh]!=null)l[eh]=h[eh];if(h[sh]!=null)l[sh]=h[sh];if(h[V]!=null){let G=Qh(h[V],w);if(h[V]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,H])=>{let d=`PolicyArns.${I}`;l[d]=H})}if(h[$]!=null)l[$]=h[$];if(h[Z]!=null)l[Z]=h[Z];return l},Nw=(h,w)=>{let l={};if(h[zh]!=null)l[zh]=h[zh];return l},Tw=(h,w)=>{let l={};if(h[g]!=null)l[g]=h[g];return l},Aw=(h,w)=>{return{}},jw=(h,w)=>{let l={};if(h[Ah]!=null)l[Ah]=h[Ah];if(h[$]!=null)l[$]=h[$];if(h[V]!=null){let G=Qh(h[V],w);if(h[V]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,H])=>{let d=`PolicyArns.${I}`;l[d]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[p]!=null){let G=ww(h[p],w);if(h[p]?.length===0)l.Tags=[];Object.entries(G).forEach(([I,H])=>{let d=`Tags.${I}`;l[d]=H})}return l},Lw=(h,w)=>{let l={};if(h[Z]!=null)l[Z]=h[Z];if(h[e]!=null)l[e]=h[e];if(h[o]!=null)l[o]=h[o];return l},Qh=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;let H=Rw(I,w);Object.entries(H).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},Rw=(h,w)=>{let l={};if(h[ph]!=null)l[ph]=h[ph];return l},aw=(h,w)=>{let l={};if(h[Rh]!=null)l[Rh]=h[Rh];if(h[vh]!=null)l[vh]=h[vh];return l},sw=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;let H=aw(I,w);Object.entries(H).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},rw=(h,w)=>{let l={};if(h[Th]!=null)l[Th]=h[Th];if(h[ch]!=null)l[ch]=h[ch];return l},_w=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;l[`member.${G}`]=I,G++}return l},ww=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;let H=rw(I,w);Object.entries(H).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},nh=(h,w)=>{let l={};if(h[Vh]!=null)l[Vh]=S(h[Vh]);if(h[W]!=null)l[W]=S(h[W]);return l},bw=(h,w)=>{let l={};if(h[Y]!=null)l[Y]=t(h[Y],w);if(h[M]!=null)l[M]=nh(h[M],w);if(h[v]!=null)l[v]=u(h[v]);if(h[U]!=null)l[U]=S(h[U]);return l},fw=(h,w)=>{let l={};if(h[Y]!=null)l[Y]=t(h[Y],w);if(h[M]!=null)l[M]=nh(h[M],w);if(h[v]!=null)l[v]=u(h[v]);if(h[_h]!=null)l[_h]=S(h[_h]);if(h[Oh]!=null)l[Oh]=S(h[Oh]);if(h[Nh]!=null)l[Nh]=S(h[Nh]);if(h[i]!=null)l[i]=S(h[i]);if(h[jh]!=null)l[jh]=S(h[jh]);if(h[U]!=null)l[U]=S(h[U]);return l},Cw=(h,w)=>{let l={};if(h[Y]!=null)l[Y]=t(h[Y],w);if(h[Ch]!=null)l[Ch]=S(h[Ch]);if(h[M]!=null)l[M]=nh(h[M],w);if(h[v]!=null)l[v]=u(h[v]);if(h[rh]!=null)l[rh]=S(h[rh]);if(h[i]!=null)l[i]=S(h[i]);if(h[U]!=null)l[U]=S(h[U]);return l},t=(h,w)=>{let l={};if(h[g]!=null)l[g]=S(h[g]);if(h[bh]!=null)l[bh]=S(h[bh]);if(h[gh]!=null)l[gh]=S(h[gh]);if(h[Ph]!=null)l[Ph]=s0(r0(h[Ph]));return l},Ow=(h,w)=>{let l={};if(h[Uh]!=null)l[Uh]=S(h[Uh]);return l},gw=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},xw=(h,w)=>{let l={};if(h[Wh]!=null)l[Wh]=S(h[Wh]);if(h[W]!=null)l[W]=S(h[W]);return l},iw=(h,w)=>{let l={};if(h[x]!=null)l[x]=S(h[x]);return l},cw=(h,w)=>{let l={};if(h[ih]!=null)l[ih]=S(h[ih]);if(h[x]!=null)l[x]=S(h[x]);if(h[W]!=null)l[W]=S(h[W]);return l},ew=(h,w)=>{let l={};if(h[Y]!=null)l[Y]=t(h[Y],w);if(h[Mh]!=null)l[Mh]=xw(h[Mh],w);if(h[v]!=null)l[v]=u(h[v]);return l},pw=(h,w)=>{let l={};if(h[Y]!=null)l[Y]=t(h[Y],w);return l},ow=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},nw=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},uw=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},tw=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},hG=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},lG=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},wG=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},K=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var GG=_0(y),R=async(h,w,l,G,I)=>{let{hostname:H,protocol:d="https",port:X,path:z}=await h.endpoint(),P={protocol:d,hostname:H,port:X,method:"POST",path:z.endsWith("/")?z.slice(0,-1)+l:z+l,headers:w};if(G!==void 0)P.hostname=G;if(I!==void 0)P.body=I;return new a0(P)},a={"content-type":"application/x-www-form-urlencoded"},s="2011-06-15",r="Action",g="AccessKeyId",IG="AssumeRole",Vh="AssumedRoleId",M="AssumedRoleUser",dG="AssumeRoleWithSAML",HG="AssumeRoleWithWebIdentity",x="Account",W="Arn",i="Audience",Y="Credentials",vh="ContextAssertion",SG="DecodeAuthorizationMessage",Uh="DecodedMessage",Z="DurationSeconds",Ph="Expiration",qh="ExternalId",zh="EncodedMessage",Mh="FederatedUser",Wh="FederatedUserId",mG="GetAccessKeyInfo",JG="GetCallerIdentity",DG="GetFederationToken",kG="GetSessionToken",Nh="Issuer",Th="Key",Ah="Name",jh="NameQualifier",$="Policy",V="PolicyArns",Lh="PrincipalArn",Rh="ProviderArn",ah="ProvidedContexts",sh="ProviderId",v="PackedPolicySize",rh="Provider",N="RoleArn",c="RoleSessionName",_h="Subject",bh="SecretAccessKey",fh="SAMLAssertion",Ch="SubjectFromWebIdentityToken",U="SourceIdentity",e="SerialNumber",Oh="SubjectType",gh="SessionToken",p="Tags",o="TokenCode",xh="TransitiveTagKeys",ih="UserId",_="Version",ch="Value",eh="WebIdentityToken",ph="arn",m="message",b=(h)=>Object.entries(h).map(([w,l])=>oh.extendedEncodeURIComponent(w)+"="+oh.extendedEncodeURIComponent(l)).join("&"),KG=(h,w)=>{if(w.Error?.Code!==void 0)return w.Error.Code;if(h.statusCode==404)return"NotFound"};class hh extends Q.classBuilder().ep(D).m(function(h,w,l,G){return[B(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,W0).ser(b0).de(e0).build(){}class uh extends Q.classBuilder().ep(D).m(function(h,w,l,G){return[B(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(N0,T0).ser(f0).de(p0).build(){}class lh extends Q.classBuilder().ep(D).m(function(h,w,l,G){return[B(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(A0,j0).ser(C0).de(o0).build(){}class th extends Q.classBuilder().ep(D).m(function(h,w,l,G){return[B(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(O0).de(n0).build(){}class hl extends Q.classBuilder().ep(D).m(function(h,w,l,G){return[B(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(g0).de(u0).build(){}class ll extends Q.classBuilder().ep(D).m(function(h,w,l,G){return[B(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(x0).de(t0).build(){}class wl extends Q.classBuilder().ep(D).m(function(h,w,l,G){return[B(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,L0).ser(i0).de(hw).build(){}class Gl extends Q.classBuilder().ep(D).m(function(h,w,l,G){return[B(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,R0).ser(c0).de(lw).build(){}var BG={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:uh,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:th,GetAccessKeyInfoCommand:hl,GetCallerIdentityCommand:ll,GetFederationTokenCommand:wl,GetSessionTokenCommand:Gl};class Iw extends j{}Gw(BG,Iw);var Xh=A(EG(),1);var dw="us-east-1",Hw=(h)=>{if(typeof h?.Arn==="string"){let w=h.Arn.split(":");if(w.length>4&&w[4]!=="")return w[4]}return},Sw=async(h,w,l)=>{let G=typeof h==="function"?await h():h,I=typeof w==="function"?await w():w;return l?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${G} (provider)`,`${I} (parent client)`,`${dw} (STS default)`),G??I??dw},mw=(h,w)=>{let l,G;return async(I,H)=>{if(G=I,!l){let{logger:C=h?.parentClientConfig?.logger,region:Yh,requestHandler:wh=h?.parentClientConfig?.requestHandler,credentialProviderLogger:Zh}=h,Kw=await Sw(Yh,h?.parentClientConfig?.region,Zh),Bw=!Dw(wh);l=new w({credentialDefaultProvider:()=>async()=>G,region:Kw,requestHandler:Bw?wh:void 0,logger:C})}let{Credentials:d,AssumedRoleUser:X}=await l.send(new hh(H));if(!d||!d.AccessKeyId||!d.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${H.RoleArn}`);let z=Hw(X),P={accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,sessionToken:d.SessionToken,expiration:d.Expiration,...d.CredentialScope&&{credentialScope:d.CredentialScope},...z&&{accountId:z}};return Xh.setCredentialFeature(P,"CREDENTIALS_STS_ASSUME_ROLE","i"),P}},Jw=(h,w)=>{let l;return async(G)=>{if(!l){let{logger:z=h?.parentClientConfig?.logger,region:P,requestHandler:C=h?.parentClientConfig?.requestHandler,credentialProviderLogger:Yh}=h,wh=await Sw(P,h?.parentClientConfig?.region,Yh),Zh=!Dw(C);l=new w({region:wh,requestHandler:Zh?C:void 0,logger:z})}let{Credentials:I,AssumedRoleUser:H}=await l.send(new lh(G));if(!I||!I.AccessKeyId||!I.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${G.RoleArn}`);let d=Hw(H),X={accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...d&&{accountId:d}};if(d)Xh.setCredentialFeature(X,"RESOLVED_ACCOUNT_ID","T");return Xh.setCredentialFeature(X,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),X}};var Dw=(h)=>{return h?.metadata?.handlerProtocol==="h2"};var kw=(h,w)=>{if(!w)return h;else return class l extends h{constructor(G){super(G);for(let I of w)this.middlewareStack.use(I)}}},QG=(h={},w)=>mw(h,kw(j,w)),XG=(h={},w)=>Jw(h,kw(j,w)),f3=(h)=>(w)=>h({roleAssumer:QG(w),roleAssumerWithWebIdentity:XG(w),...w});export{XG as getDefaultRoleAssumerWithWebIdentity,QG as getDefaultRoleAssumer,f3 as decorateDefaultCredentialProvider,q0 as __Client,y as STSServiceException,j as STSClient,Iw as STS,Dh as RegionDisabledException,Jh as PackedPolicyTooLargeException,mh as MalformedPolicyDocumentException,Kh as InvalidIdentityTokenException,Eh as InvalidAuthorizationMessageException,kh as IDPRejectedClaimException,Bh as IDPCommunicationErrorException,R0 as GetSessionTokenResponseFilterSensitiveLog,Gl as GetSessionTokenCommand,L0 as GetFederationTokenResponseFilterSensitiveLog,wl as GetFederationTokenCommand,ll as GetCallerIdentityCommand,hl as GetAccessKeyInfoCommand,Sh as ExpiredTokenException,th as DecodeAuthorizationMessageCommand,n as CredentialsFilterSensitiveLog,j0 as AssumeRoleWithWebIdentityResponseFilterSensitiveLog,A0 as AssumeRoleWithWebIdentityRequestFilterSensitiveLog,lh as AssumeRoleWithWebIdentityCommand,T0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,N0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,uh as AssumeRoleWithSAMLCommand,W0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,Q as $Command};
@@ -1,2 +0,0 @@
1
- import{xb as D}from"./chunk-qqp394c2.js";var C=D((h,A)=>{var{defineProperty:Q,getOwnPropertyDescriptor:M,getOwnPropertyNames:J}=Object,V=Object.prototype.hasOwnProperty,I=(j,b)=>Q(j,"name",{value:b,configurable:!0}),w=(j,b)=>{for(var F in b)Q(j,F,{get:b[F],enumerable:!0})},O=(j,b,F,B)=>{if(b&&typeof b==="object"||typeof b==="function"){for(let G of J(b))if(!V.call(j,G)&&G!==F)Q(j,G,{get:()=>b[G],enumerable:!(B=M(b,G))||B.enumerable})}return j},q=(j)=>O(Q({},"__esModule",{value:!0}),j),Y={};w(Y,{CredentialsProviderError:()=>L,ProviderError:()=>U,TokenProviderError:()=>S,chain:()=>T,fromStatic:()=>N,memoize:()=>R});A.exports=q(Y);var Z=class j extends Error{constructor(b,F=!0){var B;let G,H=!0;if(typeof F==="boolean")G=void 0,H=F;else if(F!=null&&typeof F==="object")G=F.logger,H=F.tryNextLink??!0;super(b);this.name="ProviderError",this.tryNextLink=H,Object.setPrototypeOf(this,j.prototype),(B=G==null?void 0:G.debug)==null||B.call(G,`@smithy/property-provider ${H?"->":"(!)"} ${b}`)}static from(b,F=!0){return Object.assign(new this(b.message,F),b)}};I(Z,"ProviderError");var U=Z,$=class j extends U{constructor(b,F=!0){super(b,F);this.name="CredentialsProviderError",Object.setPrototypeOf(this,j.prototype)}};I($,"CredentialsProviderError");var L=$,z=class j extends U{constructor(b,F=!0){super(b,F);this.name="TokenProviderError",Object.setPrototypeOf(this,j.prototype)}};I(z,"TokenProviderError");var S=z,T=I((...j)=>async()=>{if(j.length===0)throw new U("No providers in chain");let b;for(let F of j)try{return await F()}catch(B){if(b=B,B==null?void 0:B.tryNextLink)continue;throw B}throw b},"chain"),N=I((j)=>()=>Promise.resolve(j),"fromStatic"),R=I((j,b,F)=>{let B,G,H,W=!1,X=I(async()=>{if(!G)G=j();try{B=await G,H=!0,W=!1}finally{G=void 0}return B},"coalesceProvider");if(b===void 0)return async(K)=>{if(!H||(K==null?void 0:K.forceRefresh))B=await X();return B};return async(K)=>{if(!H||(K==null?void 0:K.forceRefresh))B=await X();if(W)return B;if(F&&!F(B))return W=!0,B;if(b(B))return await X(),B;return B}},"memoize")});
2
- export{C as ub};