gemi 0.4.32 → 0.4.34

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 (181) hide show
  1. package/dist/app/App.d.ts.map +1 -1
  2. package/dist/app/createFlatApiRoutes.d.ts.map +1 -1
  3. package/dist/app/index.js +21 -21
  4. package/dist/bin/index.js +2 -1
  5. package/dist/chunk-01e1579811beb424.js +2 -0
  6. package/dist/chunk-03227f4a68e038f4.js +2 -0
  7. package/dist/chunk-073f5b81e98d91fe.js +3 -0
  8. package/dist/chunk-0a6614fbd65524af.js +2 -0
  9. package/dist/chunk-0b46ec66d2c3d5f3.js +2 -0
  10. package/dist/chunk-0b5fb4e0c7de8316.js +2 -0
  11. package/dist/chunk-0b99ba34351bde91.js +3 -0
  12. package/dist/chunk-0e99fe5c976c8ea2.js +6 -0
  13. package/dist/chunk-0ffc38ed09847e35.js +2 -0
  14. package/dist/chunk-100b76ab0ca3e14d.js +1 -0
  15. package/dist/chunk-1109657ed53fbdc9.js +2 -0
  16. package/dist/chunk-11fb7f7f30378785.js +2 -0
  17. package/dist/chunk-12b4f44a2beae19b.js +2 -0
  18. package/dist/chunk-12ca7224eb6ccf72.js +9 -0
  19. package/dist/chunk-159f5b922269aef1.js +2 -0
  20. package/dist/chunk-16a63b2fee0ce9e2.js +2 -0
  21. package/dist/chunk-176e5ded5ed33d4d.js +2 -0
  22. package/dist/chunk-1875b98b6a064557.js +2 -0
  23. package/dist/chunk-1cc0d1072ee4a92b.js +2 -0
  24. package/dist/chunk-1efe790f8b4ad86d.js +2 -0
  25. package/dist/chunk-1fab30ab853c48cc.js +2 -0
  26. package/dist/chunk-223b0aac9e62386a.js +2 -0
  27. package/dist/chunk-23c287376e277e1d.js +6 -0
  28. package/dist/chunk-241584e48397dda8.js +2 -0
  29. package/dist/chunk-26d58ddc3a89234f.js +2 -0
  30. package/dist/chunk-2a0d1475ac05027d.js +2 -0
  31. package/dist/chunk-2cf271e24c26b0ee.js +2 -0
  32. package/dist/chunk-2ec287222364c6b6.js +2 -0
  33. package/dist/chunk-2f7091b9e4f728c7.js +2 -0
  34. package/dist/chunk-2f7aac67f16768a5.js +1 -0
  35. package/dist/chunk-328c98321c6ba3d6.js +2 -0
  36. package/dist/chunk-34786cd9bc9be20b.js +18 -0
  37. package/dist/chunk-35ab4be8ca6c67ee.js +2 -0
  38. package/dist/chunk-36b8e37ca93fcc67.js +2 -0
  39. package/dist/chunk-370389a68668658a.js +2 -0
  40. package/dist/chunk-3728fa21e6931333.js +2 -0
  41. package/dist/chunk-382a513747a9aa52.js +6 -0
  42. package/dist/chunk-3afa6cad1106f55a.js +2 -0
  43. package/dist/chunk-3bd48fb5397a155b.js +5 -0
  44. package/dist/chunk-3bf6f8c8e8589e3d.js +2 -0
  45. package/dist/chunk-4432f8d8567e682b.js +9 -0
  46. package/dist/chunk-46528bdbb2218772.js +2 -0
  47. package/dist/chunk-47c4cec992af0689.js +2 -0
  48. package/dist/chunk-4b201cccdf6d290f.js +2 -0
  49. package/dist/chunk-4d19e16340534ed0.js +2 -0
  50. package/dist/chunk-4e023976eb557258.js +2 -0
  51. package/dist/chunk-4ffecff075e73d43.js +2 -0
  52. package/dist/chunk-50b440397d41ab5a.js +2 -0
  53. package/dist/chunk-50ea27a13eb62b5e.js +2 -0
  54. package/dist/chunk-514f8554fb446139.js +9 -0
  55. package/dist/chunk-51c21d2a3c45fbe1.js +2 -0
  56. package/dist/chunk-5656abf3151c8fa2.js +2 -0
  57. package/dist/chunk-57a61e580c4adf80.js +2 -0
  58. package/dist/chunk-596024c880387c2f.js +2 -0
  59. package/dist/chunk-5a9fa677066f72ac.js +2 -0
  60. package/dist/chunk-5b836c769c5dad2a.js +2 -0
  61. package/dist/chunk-5cd0a98345a5d57a.js +2 -0
  62. package/dist/chunk-62144f9c5008bd47.js +1 -0
  63. package/dist/chunk-62b2777c629d5157.js +2 -0
  64. package/dist/chunk-62c0f9a87ad8a46b.js +2 -0
  65. package/dist/chunk-63ad0436d3d896b5.js +3 -0
  66. package/dist/chunk-640e4bdae1671873.js +1 -0
  67. package/dist/chunk-6605e290c4de1f0e.js +6 -0
  68. package/dist/chunk-6766e66417809e1a.js +2 -0
  69. package/dist/chunk-6821bb0ff6ed2452.js +18 -0
  70. package/dist/chunk-6921ba2fa2e1adea.js +2 -0
  71. package/dist/chunk-6afe097e13ebdf55.js +2 -0
  72. package/dist/chunk-70bb003c03f21dad.js +2 -0
  73. package/dist/chunk-711f86b9d50d45fe.js +18 -0
  74. package/dist/chunk-72821f055108528e.js +2 -0
  75. package/dist/chunk-73eed146ee78f681.js +1 -0
  76. package/dist/chunk-74db07ba7b97d1c1.js +2 -0
  77. package/dist/chunk-76db0552d2492ee7.js +3 -0
  78. package/dist/chunk-77d5bbc7a9117c21.js +2 -0
  79. package/dist/chunk-7975e27df461cbfb.js +6 -0
  80. package/dist/chunk-79b438007611560a.js +2 -0
  81. package/dist/chunk-79f7d7d90c4fb51a.js +2 -0
  82. package/dist/chunk-7a318e738fec6c2b.js +3 -0
  83. package/dist/chunk-7abc696047809312.js +6 -0
  84. package/dist/chunk-7c62e9d6edc4b418.js +2 -0
  85. package/dist/chunk-7c670baec90faacb.js +2 -0
  86. package/dist/chunk-8295e42bcfc910ff.js +16 -0
  87. package/dist/chunk-8401f0f53dc26633.js +1 -0
  88. package/dist/chunk-84b129a5185ac24d.js +2 -0
  89. package/dist/chunk-84c7f86a97d17f53.js +2 -0
  90. package/dist/chunk-84f1b068dc7fc8b7.js +2 -0
  91. package/dist/chunk-860f5fcef7074193.js +9 -0
  92. package/dist/chunk-880273a32da461fd.js +9 -0
  93. package/dist/chunk-89187bbdf6945131.js +2 -0
  94. package/dist/chunk-895d9b1ef7a65211.js +2 -0
  95. package/dist/chunk-8aa3e0e20e411d11.js +2 -0
  96. package/dist/chunk-8bb91c504b9ca45e.js +2 -0
  97. package/dist/chunk-8c3e0f5d4a0d6e53.js +2 -0
  98. package/dist/chunk-8f24cd33e07d02f3.js +2 -0
  99. package/dist/chunk-933845e73519b4c5.js +2 -0
  100. package/dist/chunk-94578320d28e33ad.js +2 -0
  101. package/dist/chunk-9938e9a4fe25dda5.js +2 -0
  102. package/dist/chunk-9bd00e182ac2f8a6.js +6 -0
  103. package/dist/chunk-9c4a4b4bd266869d.js +2 -0
  104. package/dist/chunk-9ee2118bd4eb34ae.js +9 -0
  105. package/dist/chunk-a095821ffc039b99.js +18 -0
  106. package/dist/chunk-a3526e321ac9d173.js +1 -0
  107. package/dist/chunk-a4862acc0c3fed7d.js +6 -0
  108. package/dist/chunk-a50b9cd348c3e882.js +9 -0
  109. package/dist/chunk-a57ecc74c0fb9045.js +2 -0
  110. package/dist/chunk-a5c18c07abe8fd9c.js +2 -0
  111. package/dist/chunk-a719a1f305964521.js +2 -0
  112. package/dist/chunk-a816613f5321b9db.js +1 -0
  113. package/dist/chunk-a8310ad9bad32329.js +2 -0
  114. package/dist/chunk-aaf5855c5199efe9.js +2 -0
  115. package/dist/chunk-ab0c3f72f95cb4f4.js +3 -0
  116. package/dist/chunk-abd0b68c299eebfc.js +2 -0
  117. package/dist/chunk-b05cb7ef4546980d.js +2 -0
  118. package/dist/chunk-b1918e88103a8501.js +2 -0
  119. package/dist/chunk-b80a86610158cbfd.js +1 -0
  120. package/dist/chunk-bbd36ce62b950ee5.js +2 -0
  121. package/dist/chunk-bbdd098f2a2cd820.js +18 -0
  122. package/dist/chunk-bcd70a6fc2fd359c.js +1 -0
  123. package/dist/chunk-beca91bf7cc216cd.js +2 -0
  124. package/dist/chunk-bee6075c5738d87a.js +2 -0
  125. package/dist/chunk-c29701ffef4ca07a.js +2 -0
  126. package/dist/chunk-c50ff3cf3c78af79.js +2 -0
  127. package/dist/chunk-c62b5c4cec67029c.js +1 -0
  128. package/dist/chunk-c675395110f371b1.js +6 -0
  129. package/dist/chunk-c675f193d459818e.js +2 -0
  130. package/dist/chunk-c8631aa6bbb62e13.js +2 -0
  131. package/dist/chunk-c864ab57913d658f.js +1 -0
  132. package/dist/chunk-c8b00b645df96ed5.js +2 -0
  133. package/dist/chunk-c9707ae8f1d346ff.js +3 -0
  134. package/dist/chunk-cb65fe402653c65e.js +2 -0
  135. package/dist/chunk-cb69e9621a60d310.js +1 -0
  136. package/dist/chunk-cfa9a65fae5ddaf4.js +2 -0
  137. package/dist/chunk-d0757747d9cc2e47.js +2 -0
  138. package/dist/chunk-d22136d39cf8465f.js +2 -0
  139. package/dist/chunk-d3765f96a689a0c1.js +2 -0
  140. package/dist/chunk-d9968563c6c84405.js +3 -0
  141. package/dist/chunk-d9a84b9122601b72.js +2 -0
  142. package/dist/chunk-db65c75cda396f98.js +2 -0
  143. package/dist/chunk-dd211856e049a67f.js +9 -0
  144. package/dist/chunk-de39fc86bbd37240.js +1 -0
  145. package/dist/chunk-e0e0f2ee626a6fb3.js +18 -0
  146. package/dist/chunk-e11c7f3abcf2269f.js +2 -0
  147. package/dist/chunk-e16b252158474b8c.js +1 -0
  148. package/dist/chunk-e9275fb341d2cdd9.js +2 -0
  149. package/dist/chunk-ea9b86cf2edd807b.js +18 -0
  150. package/dist/chunk-ec24a0767aa58f1f.js +18 -0
  151. package/dist/chunk-ee35048642cfe9d8.js +2 -0
  152. package/dist/chunk-ee4ff285d7f4ccdf.js +2 -0
  153. package/dist/chunk-ee604d0215ea07e6.js +1 -0
  154. package/dist/chunk-ee92e80230ce02ec.js +2 -0
  155. package/dist/chunk-f13fd46441a58606.js +2 -0
  156. package/dist/chunk-f2dca6305fcba70b.js +2 -0
  157. package/dist/chunk-f5b888aa9ac4e20f.js +2 -0
  158. package/dist/chunk-f8823a1ede83155e.js +2 -0
  159. package/dist/chunk-f95f5e3439539ca5.js +2 -0
  160. package/dist/chunk-f99bdfc336b2ac57.js +9 -0
  161. package/dist/chunk-faa8c62bfa11f9d5.js +2 -0
  162. package/dist/chunk-fec9f0b0b0319f3b.js +2 -0
  163. package/dist/client/QueryStore.d.ts +6 -1
  164. package/dist/client/QueryStore.d.ts.map +1 -1
  165. package/dist/client/index.js +1 -1
  166. package/dist/email/index.js +1 -1
  167. package/dist/facades/Auth.d.ts +2 -0
  168. package/dist/facades/Auth.d.ts.map +1 -1
  169. package/dist/facades/index.js +1 -1
  170. package/dist/http/ApiRouter.d.ts +28 -1
  171. package/dist/http/ApiRouter.d.ts.map +1 -1
  172. package/dist/http/index.js +1 -1
  173. package/dist/kernel/index.js +2 -2
  174. package/dist/server/index.js +4 -4
  175. package/dist/storage/File.d.ts +22 -0
  176. package/dist/storage/File.d.ts.map +1 -0
  177. package/dist/storage/index.d.ts +2 -0
  178. package/dist/storage/index.d.ts.map +1 -0
  179. package/dist/storage/index.js +2 -0
  180. package/dist/vite/index.js +1 -1
  181. package/package.json +5 -2
@@ -0,0 +1 @@
1
+ import{x} from"./chunk-a5c18c07abe8fd9c.js";import{fb as S} from"./chunk-bbd36ce62b950ee5.js";var q="AWS_PROFILE";var B=(o)=>o.profile||process.env["AWS_PROFILE"]||"default";import{join as b} from"path";import{homedir as N} from"os";import{sep as L} from"path";var d={},w=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},f=()=>{const{HOME:o,USERPROFILE:e,HOMEPATH:t,HOMEDRIVE:r=`C:${L}`}=process.env;if(o)return o;if(e)return e;if(t)return`${r}${t}`;const i=w();if(!d[i])d[i]=N();return d[i]};var v="AWS_CONFIG_FILE",g=()=>process.env[v]||b(f(),".aws","config");var D=x(S(),1);import{join as I} from"path";var h=x(S(),1);var O=(o)=>Object.entries(o).filter(([e])=>{const t=e.indexOf(c);if(t===-1)return!1;return Object.values(h.IniSectionType).includes(e.substring(0,t))}).reduce((e,[t,r])=>{const i=t.indexOf(c),s=t.substring(0,i)===h.IniSectionType.PROFILE?t.substring(i+1):t;return e[s]=r,e},{...o.default&&{default:o.default}});import{join as j} from"path";var y="AWS_SHARED_CREDENTIALS_FILE",_=()=>process.env[y]||j(f(),".aws","credentials");var C=x(S(),1);var $=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,G=["__proto__","profile __proto__"],a=(o)=>{const e={};let t,r;for(let i of o.split(/\r?\n/)){const s=i.split(/(^|\s)[;#]/)[0].trim();if(s[0]==="["&&s[s.length-1]==="]"){t=void 0,r=void 0;const n=s.substring(1,s.length-1),m=$.exec(n);if(m){const[,p,,F]=m;if(Object.values(C.IniSectionType).includes(p))t=[p,F].join(c)}else t=n;if(G.includes(n))throw new Error(`Found invalid profile name "${n}"`)}else if(t){const n=s.indexOf("=");if(![0,-1].includes(n)){const[m,p]=[s.substring(0,n).trim(),s.substring(n+1).trim()];if(p==="")r=m;else{if(r&&i.trimStart()===i)r=void 0;e[t]=e[t]||{};const F=r?[r,m].join(c):m;e[t][F]=p}}}}return e};import{promises as W} from"fs";var{readFile:K}=W,E={},l=(o,e)=>{if(!E[o]||e?.ignoreCache)E[o]=K(o,"utf8");return E[o]};var P=()=>({}),c=".",R=async(o={})=>{const{filepath:e=_(),configFilepath:t=g()}=o,r=f();let s=e;if(e.startsWith("~/"))s=I(r,e.slice(2));let u=t;if(t.startsWith("~/"))u=I(r,t.slice(2));const n=await Promise.all([l(u,{ignoreCache:o.ignoreCache}).then(a).then(O).catch(P),l(s,{ignoreCache:o.ignoreCache}).then(a).catch(P)]);return{configFile:n[0],credentialsFile:n[1]}};var T=(o)=>Object.entries(o).filter(([e])=>e.startsWith(D.IniSectionType.SSO_SESSION+c)).reduce((e,[t,r])=>({...e,[t.substring(t.indexOf(c)+1)]:r}),{});var V=()=>({}),Pe=async(o={})=>l(o.configFilepath??g()).then(a).then(T).catch(V);var A=(...o)=>{const e={};for(let t of o)for(let[r,i]of Object.entries(t))if(e[r]!==void 0)Object.assign(e[r],i);else e[r]=i;return e};var He=async(o)=>{const e=await R(o);return A(e.configFile,e.credentialsFile)};import{createHash as U} from"crypto";import{join as X} from"path";var H=(o)=>{const t=U("sha1").update(o).digest("hex");return X(f(),".aws","sso","cache",`${t}.json`)};import{promises as k} from"fs";var{readFile:M}=k,$e=async(o)=>{const e=H(o),t=await M(e,"utf8");return JSON.parse(t)};export{q as kb,B as lb,H as mb,$e as nb,c as ob,R as pb,Pe as qb,He as rb};
@@ -0,0 +1,2 @@
1
+ import{kb as s,mb as y,nb as u,ob as C} from"./chunk-2f7aac67f16768a5.js";import{rb as d,vb as g} from"./chunk-cb69e9621a60d310.js";function c(o){try{const r=new Set(Array.from(o.match(/([A-Z_]){3,}/g)??[]));return r.delete("CONFIG"),r.delete("CONFIG_PREFIX_SEPARATOR"),r.delete("ENV"),[...r].join(", ")}catch(r){return o}}var l=(o,r)=>async()=>{try{const t=o(process.env);if(t===void 0)throw new Error;return t}catch(t){throw new s(t.message||`Not found in ENV: ${c(o.toString())}`,{logger:r})}};var h=(o,{preferredFile:r="config",...t}={})=>async()=>{const e=d(t),{configFile:n,credentialsFile:i}=await g(t),f=i[e]||{},m=n[e]||{},S=r==="config"?{...f,...m}:{...m,...f};try{const p=o(S,r==="config"?n:i);if(p===void 0)throw new Error;return p}catch(a){throw new s(a.message||`Not found in config files w/ profile [${e}]: ${c(o.toString())}`,{logger:t.logger})}};var E=(o)=>typeof o==="function",w=(o)=>E(o)?async()=>await o():u(o);var k=({environmentVariableSelector:o,configFileSelector:r,default:t},e={})=>C(y(l(o),h(r,e),w(t)));function F(o){const r={};if(o=o.replace(/^\?/,""),o)for(let t of o.split("&")){let[e,n=null]=t.split("=");if(e=decodeURIComponent(e),n)n=decodeURIComponent(n);if(!(e in r))r[e]=n;else if(Array.isArray(r[e]))r[e].push(n);else r[e]=[r[e],n]}return r}var N=(o)=>{if(typeof o==="string")return N(new URL(o));const{hostname:r,pathname:t,port:e,protocol:n,search:i}=o;let f;if(i)f=F(i);return{hostname:r,port:e?parseInt(e):void 0,protocol:n,path:t,query:f}};
2
+ export{k as hb,N as ib};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{x as i} from"./chunk-a5c18c07abe8fd9c.js";import{A as _e,D as ee,E as Ae,I as se,J as te,L as re,M as ae,P as ie,Q as le,W as ts,X as k,aa as z,ba as Ve,ca as h,ja as He,ka as u,la as Ne,ma as pe,na as ye,oa as $e,pa as Pe,ra as c,sa as y,ua as fe,z as Fe} from"./chunk-7a318e738fec6c2b.js";import{$a as ke,Aa as $,Da as B,Ea as Ke,Fa as V,Ga as N,Ha as f,Ia as Qe,Ja as me,Ka as he,La as ue,Ma as we,Na as Xe,Oa as Ye,Qa as rs,Ra as as,Sa as Ze,Ta as be,Va as xe,Wa as je,Xa as ve,Ya as Te,_a as x,ab as Re,bb as qe,cb as Ee,db as Je,eb as Ue,va as Le,wa as Ce,xa as Me,ya as We,za as _} from"./chunk-ec24a0767aa58f1f.js";import"./chunk-bbd36ce62b950ee5.js";import{gb as l,hb as ne} from"./chunk-1efe790f8b4ad86d.js";import"./chunk-0ffc38ed09847e35.js";import"./chunk-a816613f5321b9db.js";var p=i(B(),1);var P=i(x(),1);var cs=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(s,t)=>({signingProperties:{config:s,context:t}})}},b=function(e){return{schemeId:"smithy.api#noAuth"}},J=async(e,s,t)=>{return{operation:_(s).operation,region:await $(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},U=(e)=>{const s=[];switch(e.operation){case"GetRoleCredentials":{s.push(b(e));break}case"ListAccountRoles":{s.push(b(e));break}case"ListAccounts":{s.push(b(e));break}case"Logout":{s.push(b(e));break}default:s.push(cs(e))}return s},I=(e)=>{return{...P.resolveAwsSdkSigV4Config(e)}};var L=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},C={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var M={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.629.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"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 sso"},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/core":"3.629.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.620.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.614.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.3.2","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.14","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.1.12","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@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.14","@smithy/util-defaults-mode-node":"^3.0.14","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@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-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}};var Se=i(x(),1);var de=i(x(),1),oe=i(B(),1);var W={["required"]:!1,type:"String"},A={["required"]:!0,default:!1,type:"Boolean"},K={["ref"]:"Endpoint"},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},H={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},d={},Q={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},O={["ref"]:"PartitionResult"},X={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[O,"supportsDualStack"]}]},Y=[T],Z=[H],j=[{["ref"]:"Region"}],ls={version:"1.0",parameters:{Region:W,UseDualStack:A,UseFIPS:A,Endpoint:W},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[K]}],rules:[{conditions:Y,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Z,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:K,properties:d,headers:d},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:j}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:j,assign:"PartitionResult"}],rules:[{conditions:[T,H],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Q]},X],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:Y,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Q,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[O,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:d,headers:d},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Z,rules:[{conditions:[X],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},G=ls;var g=(e,s={})=>{return N(G,{endpointParams:e,logger:s.logger})};V.aws=f;var ce=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??se,base64Encoder:e?.base64Encoder??ae,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??g,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??U,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new de.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new oe.NoAuthSigner}],logger:e?.logger??new ee,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??ne,utf8Decoder:e?.utf8Decoder??te,utf8Encoder:e?.utf8Encoder??re}};var ze=(e)=>{ye(process.version);const s=Ee(e),t=()=>s().then(pe),r=ce(e);return Se.emitWarningIfUnsupportedVersion(process.version),{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??qe,defaultUserAgentProvider:e?.defaultUserAgentProvider??ke({serviceId:r.serviceId,clientVersion:M.version}),maxAttempts:e?.maxAttempts??l(xe),region:e?.region??l(ue,we),requestHandler:ie.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...ve,default:async()=>(await t()).retryMode||be}),sha256:e?.sha256??Re.bind(null,"sha256"),streamCollector:e?.streamCollector??le,useDualstackEndpoint:e?.useDualstackEndpoint??l(me),useFipsEndpoint:e?.useFipsEndpoint??l(he)}};var De=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){const n=s.findIndex((D)=>D.schemeId===a.schemeId);if(n===-1)s.push(a);else s.splice(n,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){t=a},httpAuthSchemeProvider(){return t},setCredentials(a){r=a},credentials(){return r}}},Be=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var v=(e)=>e,Ie=(e,s)=>{const t={...v(Je(e)),...v($e(e)),...v(Fe(e)),...v(De(e))};return s.forEach((r)=>r.configure(t)),{...e,...Ue(t),...Pe(t),..._e(t),...Be(t)}};class ps extends Ae{constructor(...[e]){const s=ze(e||{}),t=L(s),r=Ke(t),a=je(r),n=Xe(a),D=Le(n),ns=Ze(D),ds=I(ns),F=Ie(ds,e?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(Qe(this.config)),this.middlewareStack.use(Te(this.config)),this.middlewareStack.use(Ye(this.config)),this.middlewareStack.use(Ce(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(We(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:J,identityProviderConfigProvider:async(os)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":os.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class o extends He{constructor(e){super(e);Object.setPrototypeOf(this,o.prototype)}}class R extends o{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,R.prototype)}}class q extends o{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,q.prototype)}}class E extends o{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,E.prototype)}}class S extends o{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,S.prototype)}}var Oe=(e)=>({...e,...e.accessToken&&{accessToken:k}}),ys=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:k},...e.sessionToken&&{sessionToken:k}}),Ge=(e)=>({...e,...e.roleCredentials&&{roleCredentials:ys(e.roleCredentials)}});var m=i(x(),1),ge=i(B(),1);var es=async(e,s)=>{const t=ge.requestBuilder(e,s),r=c({},vs,{[zs]:e[Rs]});t.bp("/federation/credentials");const a=c({[Ss]:[,z(e[Es],"roleName")],[qs]:[,z(e[ks],"accountId")]});let n;return t.m("GET").h(r).q(a).b(n),t.build()};var ss=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return ms(e,s);const t=c({$metadata:w(e)}),r=z(Ve(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:fe});return Object.assign(t,a),t};var ms=async(e,s)=>{const t={...e,body:await m.parseJsonErrorBody(e.body,s)},r=m.loadRestJsonErrorCode(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await us(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await ws(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await bs(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await xs(t,s);default:const a=t.body;return hs({output:e,parsedBody:a,errorCode:r})}},hs=Ne(o),us=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new R({$metadata:w(e),...t});return u(n,e.body)},ws=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new q({$metadata:w(e),...t});return u(n,e.body)},bs=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new E({$metadata:w(e),...t});return u(n,e.body)},xs=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new S({$metadata:w(e),...t});return u(n,e.body)},w=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var vs=(e)=>e!==void 0&&e!==null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),ks="accountId",Rs="accessToken",qs="account_id";var Es="roleName",Ss="role_name",zs="x-amz-sso_bearer_token";class Ds extends ts.classBuilder().ep({...C}).m(function(e,s,t,r){return[rs(t,this.serialize,this.deserialize),as(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(Oe,Ge).ser(es).de(ss).build(){}export{ps as SSOClient,Ds as GetRoleCredentialsCommand};
@@ -0,0 +1,3 @@
1
+ import{x as it,y as T} from"./chunk-a5c18c07abe8fd9c.js";import{pb as $t,qb as Nt} from"./chunk-62144f9c5008bd47.js";var st=T((Ti,Rt)=>{var{defineProperty:j,getOwnPropertyDescriptor:Mr,getOwnPropertyNames:Nr}=Object,Ur=Object.prototype.hasOwnProperty,nt=(t,e)=>j(t,"name",{value:e,configurable:!0}),Ir=(t,e)=>{for(var r in e)j(t,r,{get:e[r],enumerable:!0})},Fr=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let s of Nr(e))if(!Ur.call(t,s)&&s!==r)j(t,s,{get:()=>e[s],enumerable:!(n=Mr(e,s))||n.enumerable})}return t},Ar=(t)=>Fr(j({},"__esModule",{value:!0}),t),Ft={};Ir(Ft,{escapeUri:()=>At,escapeUriPath:()=>zr});Rt.exports=Ar(Ft);var At=nt((t)=>encodeURIComponent(t).replace(/[!'()*]/g,Rr),"escapeUri"),Rr=nt((t)=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),zr=nt((t)=>t.split("/").map(At).join("/"),"escapeUriPath")});var re=T((Qo,ee)=>{var{defineProperty:k,getOwnPropertyDescriptor:Gr,getOwnPropertyNames:Qr}=Object,Xr=Object.prototype.hasOwnProperty,G=(t,e)=>k(t,"name",{value:e,configurable:!0}),Jr=(t,e)=>{for(var r in e)k(t,r,{get:e[r],enumerable:!0})},Kr=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let s of Qr(e))if(!Xr.call(t,s)&&s!==r)k(t,s,{get:()=>e[s],enumerable:!(n=Gr(e,s))||n.enumerable})}return t},Hr=(t)=>Kr(k({},"__esModule",{value:!0}),t),Jt={};Jr(Jt,{AlgorithmId:()=>vt,EndpointURLScheme:()=>Pt,FieldPosition:()=>qt,HttpApiKeyAuthLocation:()=>Ht,HttpAuthLocation:()=>Kt,IniSectionType:()=>_t,RequestHandlerProtocol:()=>te,SMITHY_CONTEXT_KEY:()=>tn,getDefaultClientConfiguration:()=>qr,resolveDefaultRuntimeConfig:()=>_r});ee.exports=Hr(Jt);var Kt=((t)=>{return t.HEADER="header",t.QUERY="query",t})(Kt||{}),Ht=((t)=>{return t.HEADER="header",t.QUERY="query",t})(Ht||{}),Pt=((t)=>{return t.HTTP="http",t.HTTPS="https",t})(Pt||{}),vt=((t)=>{return t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256",t})(vt||{}),Pr=G((t)=>{const e=[];if(t.sha256!==void 0)e.push({algorithmId:()=>"sha256",checksumConstructor:()=>t.sha256});if(t.md5!=null)e.push({algorithmId:()=>"md5",checksumConstructor:()=>t.md5});return{_checksumAlgorithms:e,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),vr=G((t)=>{const e={};return t.checksumAlgorithms().forEach((r)=>{e[r.algorithmId()]=r.checksumConstructor()}),e},"resolveChecksumRuntimeConfig"),qr=G((t)=>{return{...Pr(t)}},"getDefaultClientConfiguration"),_r=G((t)=>{return{...vr(t)}},"resolveDefaultRuntimeConfig"),qt=((t)=>{return t[t.HEADER=0]="HEADER",t[t.TRAILER=1]="TRAILER",t})(qt||{}),tn="__smithy_context",_t=((t)=>{return t.PROFILE="profile",t.SSO_SESSION="sso-session",t.SERVICES="services",t})(_t||{}),te=((t)=>{return t.HTTP_0_9="http/0.9",t.HTTP_1_0="http/1.0",t.TDS_8_0="tds/8.0",t})(te||{})});var de=T((Xo,he)=>{var fe=function(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];return{...e,[r]:Array.isArray(n)?[...n]:n}},{})},ue=function(t){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(t)},Q=Object.defineProperty,en=Object.getOwnPropertyDescriptor,rn=Object.getOwnPropertyNames,nn=Object.prototype.hasOwnProperty,N=(t,e)=>Q(t,"name",{value:e,configurable:!0}),sn=(t,e)=>{for(var r in e)Q(t,r,{get:e[r],enumerable:!0})},on=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let s of rn(e))if(!nn.call(t,s)&&s!==r)Q(t,s,{get:()=>e[s],enumerable:!(n=en(e,s))||n.enumerable})}return t},cn=(t)=>on(Q({},"__esModule",{value:!0}),t),ne={};sn(ne,{Field:()=>un,Fields:()=>hn,HttpRequest:()=>dn,HttpResponse:()=>ln,IHttpRequest:()=>se.HttpRequest,getHttpHandlerExtensionConfiguration:()=>fn,isValidHostname:()=>ue,resolveHttpHandlerRuntimeConfig:()=>an});he.exports=cn(ne);var fn=N((t)=>{let e=t.httpHandler;return{setHttpHandler(r){e=r},httpHandler(){return e},updateHttpClientConfig(r,n){e.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return e.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),an=N((t)=>{return{httpHandler:t.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),se=re(),ie=class t{constructor({name:e,kind:r=se.FieldPosition.HEADER,values:n=[]}){this.name=e,this.kind=r,this.values=n}add(e){this.values.push(e)}set(e){this.values=e}remove(e){this.values=this.values.filter((r)=>r!==e)}toString(){return this.values.map((e)=>e.includes(",")||e.includes(" ")?`"${e}"`:e).join(", ")}get(){return this.values}};N(ie,"Field");var un=ie,oe=class t{constructor({fields:e=[],encoding:r="utf-8"}){this.entries={},e.forEach(this.setField.bind(this)),this.encoding=r}setField(e){this.entries[e.name.toLowerCase()]=e}getField(e){return this.entries[e.toLowerCase()]}removeField(e){delete this.entries[e.toLowerCase()]}getByType(e){return Object.values(this.entries).filter((r)=>r.kind===e)}};N(oe,"Fields");var hn=oe,ce=class t{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const r=new t({...e,headers:{...e.headers}});if(r.query)r.query=fe(r.query);return r}static isInstance(e){if(!e)return!1;const r=e;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query==="object"&&typeof r.headers==="object"}clone(){return t.clone(this)}};N(ce,"HttpRequest");var dn=ce;N(fe,"cloneQuery");var ae=class t{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const r=e;return typeof r.statusCode==="number"&&typeof r.headers==="object"}};N(ae,"HttpResponse");var ln=ae;N(ue,"isValidHostname")});var ge=T((Jo,we)=>{var ye=function(t){const e=[];for(let r of Object.keys(t).sort()){const n=t[r];if(r=dt.escapeUri(r),Array.isArray(n))for(let s=0,i=n.length;s<i;s++)e.push(`${r}=${dt.escapeUri(n[s])}`);else{let s=r;if(n||typeof n==="string")s+=`=${dt.escapeUri(n)}`;e.push(s)}}return e.join("&")},X=Object.defineProperty,yn=Object.getOwnPropertyDescriptor,wn=Object.getOwnPropertyNames,gn=Object.prototype.hasOwnProperty,pn=(t,e)=>X(t,"name",{value:e,configurable:!0}),xn=(t,e)=>{for(var r in e)X(t,r,{get:e[r],enumerable:!0})},bn=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let s of wn(e))if(!gn.call(t,s)&&s!==r)X(t,s,{get:()=>e[s],enumerable:!(n=yn(e,s))||n.enumerable})}return t},En=(t)=>bn(X({},"__esModule",{value:!0}),t),le={};xn(le,{buildQueryString:()=>ye});we.exports=En(le);var dt=st();pn(ye,"buildQueryString")});var be=T((Ko,xe)=>{var{defineProperty:J,getOwnPropertyDescriptor:Tn,getOwnPropertyNames:mn}=Object,$n=Object.prototype.hasOwnProperty,Cn=(t,e)=>J(t,"name",{value:e,configurable:!0}),Sn=(t,e)=>{for(var r in e)J(t,r,{get:e[r],enumerable:!0})},Mn=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let s of mn(e))if(!$n.call(t,s)&&s!==r)J(t,s,{get:()=>e[s],enumerable:!(n=Tn(e,s))||n.enumerable})}return t},Nn=(t)=>Mn(J({},"__esModule",{value:!0}),t),pe={};Sn(pe,{isArrayBuffer:()=>Un});xe.exports=Nn(pe);var Un=Cn((t)=>typeof ArrayBuffer==="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]","isArrayBuffer")});var H=T((Ho,me)=>{var{defineProperty:K,getOwnPropertyDescriptor:In,getOwnPropertyNames:Fn}=Object,An=Object.prototype.hasOwnProperty,Ee=(t,e)=>K(t,"name",{value:e,configurable:!0}),Rn=(t,e)=>{for(var r in e)K(t,r,{get:e[r],enumerable:!0})},zn=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let s of Fn(e))if(!An.call(t,s)&&s!==r)K(t,s,{get:()=>e[s],enumerable:!(n=In(e,s))||n.enumerable})}return t},Dn=(t)=>zn(K({},"__esModule",{value:!0}),t),Te={};Rn(Te,{fromArrayBuffer:()=>Bn,fromString:()=>Wn});me.exports=Dn(Te);var Ln=be(),lt=import.meta.require("buffer"),Bn=Ee((t,e=0,r=t.byteLength-e)=>{if(!Ln.isArrayBuffer(t))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof t} (${t})`);return lt.Buffer.from(t,e,r)},"fromArrayBuffer"),Wn=Ee((t,e)=>{if(typeof t!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof t} (${t})`);return e?lt.Buffer.from(t,e):lt.Buffer.from(t)},"fromString")});var Se=T(($e)=>{Object.defineProperty($e,"__esModule",{value:!0});$e.fromBase64=void 0;var jn=H(),Yn=/^[A-Za-z0-9+/]*={0,2}$/,On=(t)=>{if(t.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Yn.exec(t))throw new TypeError("Invalid base64 string.");const e=jn.fromString(t,"base64");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)};$e.fromBase64=On});var Fe=T((vo,Ie)=>{var{defineProperty:P,getOwnPropertyDescriptor:Vn,getOwnPropertyNames:Zn}=Object,kn=Object.prototype.hasOwnProperty,yt=(t,e)=>P(t,"name",{value:e,configurable:!0}),Gn=(t,e)=>{for(var r in e)P(t,r,{get:e[r],enumerable:!0})},Qn=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let s of Zn(e))if(!kn.call(t,s)&&s!==r)P(t,s,{get:()=>e[s],enumerable:!(n=Vn(e,s))||n.enumerable})}return t},Xn=(t)=>Qn(P({},"__esModule",{value:!0}),t),Me={};Gn(Me,{fromUtf8:()=>Ue,toUint8Array:()=>Jn,toUtf8:()=>Kn});Ie.exports=Xn(Me);var Ne=H(),Ue=yt((t)=>{const e=Ne.fromString(t,"utf8");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Jn=yt((t)=>{if(typeof t==="string")return Ue(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(t)},"toUint8Array"),Kn=yt((t)=>{if(typeof t==="string")return t;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return Ne.fromArrayBuffer(t.buffer,t.byteOffset,t.byteLength).toString("utf8")},"toUtf8")});var ze=T((Ae)=>{Object.defineProperty(Ae,"__esModule",{value:!0});Ae.toBase64=void 0;var Hn=H(),Pn=Fe(),vn=(t)=>{let e;if(typeof t==="string")e=Pn.fromUtf8(t);else e=t;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return Hn.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength).toString("base64")};Ae.toBase64=vn});var Be=T((_o,v)=>{var{defineProperty:De,getOwnPropertyDescriptor:qn,getOwnPropertyNames:_n}=Object,ts=Object.prototype.hasOwnProperty,wt=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let s of _n(e))if(!ts.call(t,s)&&s!==r)De(t,s,{get:()=>e[s],enumerable:!(n=qn(e,s))||n.enumerable})}return t},Le=(t,e,r)=>(wt(t,e,"default"),r&&wt(r,e,"default")),es=(t)=>wt(De({},"__esModule",{value:!0}),t),gt={};v.exports=es(gt);Le(gt,Se(),v.exports);Le(gt,ze(),v.exports)});var Qe=T((tc,Ge)=>{var Ye=function(t=0){return new Promise((e,r)=>{if(t)setTimeout(()=>{const n=new Error(`Request did not complete within ${t} ms`);n.name="TimeoutError",r(n)},t)})};async function Ve(t){const e=await ke(t),r=us.fromBase64(e);return new Uint8Array(r)}async function Ze(t){const e=[],r=t.getReader();let n=!1,s=0;while(!n){const{done:o,value:h}=await r.read();if(h)e.push(h),s+=h.length;n=o}const i=new Uint8Array(s);let c=0;for(let o of e)i.set(o,c),c+=o.length;return i}var ke=function(t){return new Promise((e,r)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));const s=n.result??"",i=s.indexOf(","),c=i>-1?i+1:s.length;e(s.substring(c))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(t)})},_=Object.defineProperty,rs=Object.getOwnPropertyDescriptor,ns=Object.getOwnPropertyNames,ss=Object.prototype.hasOwnProperty,S=(t,e)=>_(t,"name",{value:e,configurable:!0}),is=(t,e)=>{for(var r in e)_(t,r,{get:e[r],enumerable:!0})},os=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let s of ns(e))if(!ss.call(t,s)&&s!==r)_(t,s,{get:()=>e[s],enumerable:!(n=rs(e,s))||n.enumerable})}return t},cs=(t)=>os(_({},"__esModule",{value:!0}),t),je={};is(je,{FetchHttpHandler:()=>as,keepAliveSupport:()=>q,streamCollector:()=>hs});Ge.exports=cs(je);var We=de(),fs=ge();S(Ye,"requestTimeout");var q={supported:void 0},Oe=class t{static create(e){if(typeof(e==null?void 0:e.handle)==="function")return e;return new t(e)}constructor(e){if(typeof e==="function")this.configProvider=e().then((r)=>r||{});else this.config=e??{},this.configProvider=Promise.resolve(this.config);if(q.supported===void 0)q.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(e,{abortSignal:r}={}){if(!this.config)this.config=await this.configProvider;const n=this.config.requestTimeout,s=this.config.keepAlive===!0,i=this.config.credentials;if(r==null?void 0:r.aborted){const f=new Error("Request aborted");return f.name="AbortError",Promise.reject(f)}let c=e.path;const o=fs.buildQueryString(e.query||{});if(o)c+=`?${o}`;if(e.fragment)c+=`#${e.fragment}`;let h="";if(e.username!=null||e.password!=null){const f=e.username??"",w=e.password??"";h=`${f}:${w}@`}const{port:l,method:x}=e,a=`${e.protocol}//${h}${e.hostname}${l?`:${l}`:""}${c}`,u=x==="GET"||x==="HEAD"?void 0:e.body,d={body:u,headers:new Headers(e.headers),method:x,credentials:i};if(u)d.duplex="half";if(typeof AbortController!=="undefined")d.signal=r;if(q.supported)d.keepalive=s;let p=S(()=>{},"removeSignalEventListener");const g=new Request(a,d),y=[fetch(g).then((f)=>{const w=f.headers,E={};for(let m of w.entries())E[m[0]]=m[1];if(f.body==null)return f.blob().then((m)=>({response:new We.HttpResponse({headers:E,reason:f.statusText,statusCode:f.status,body:m})}));return{response:new We.HttpResponse({headers:E,reason:f.statusText,statusCode:f.status,body:f.body})}}),Ye(n)];if(r)y.push(new Promise((f,w)=>{const E=S(()=>{const b=new Error("Request aborted");b.name="AbortError",w(b)},"onAbort");if(typeof r.addEventListener==="function"){const b=r;b.addEventListener("abort",E,{once:!0}),p=S(()=>b.removeEventListener("abort",E),"removeSignalEventListener")}else r.onabort=E}));return Promise.race(y).finally(p)}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then((n)=>{return n[e]=r,n})}httpHandlerConfigs(){return this.config??{}}};S(Oe,"FetchHttpHandler");var as=Oe,us=Be(),hs=S((t)=>{if(typeof Blob==="function"&&t instanceof Blob)return Ve(t);return Ze(t)},"streamCollector");S(Ve,"collectBlob");S(Ze,"collectStream");S(ke,"readToBase64")});var qe=T((ec,ve)=>{var He=function(t){if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const e=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2){const n=t.slice(r,r+2).toLowerCase();if(n in pt)e[r/2]=pt[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return e},Pe=function(t){let e="";for(let r=0;r<t.byteLength;r++)e+=Ke[t[r]];return e},tt=Object.defineProperty,ds=Object.getOwnPropertyDescriptor,ls=Object.getOwnPropertyNames,ys=Object.prototype.hasOwnProperty,Xe=(t,e)=>tt(t,"name",{value:e,configurable:!0}),ws=(t,e)=>{for(var r in e)tt(t,r,{get:e[r],enumerable:!0})},gs=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let s of ls(e))if(!ys.call(t,s)&&s!==r)tt(t,s,{get:()=>e[s],enumerable:!(n=ds(e,s))||n.enumerable})}return t},ps=(t)=>gs(tt({},"__esModule",{value:!0}),t),Je={};ws(Je,{fromHex:()=>He,toHex:()=>Pe});ve.exports=ps(Je);var Ke={},pt={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();if(e.length===1)e=`0${e}`;Ke[t]=e,pt[e]=t}Xe(He,"fromHex");Xe(Pe,"toHex")});var U=(t,e)=>{const r=[];if(t)r.push(t);if(e)for(let n of e)r.push(n);return r},M=(t,e)=>{return`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`},F=()=>{let t=[],e=[],r=!1;const n=new Set,s=(a)=>a.sort((u,d)=>St[d.step]-St[u.step]||Mt[d.priority||"normal"]-Mt[u.priority||"normal"]),i=(a)=>{let u=!1;const d=(p)=>{const g=U(p.name,p.aliases);if(g.includes(a)){u=!0;for(let y of g)n.delete(y);return!1}return!0};return t=t.filter(d),e=e.filter(d),u},c=(a)=>{let u=!1;const d=(p)=>{if(p.middleware===a){u=!0;for(let g of U(p.name,p.aliases))n.delete(g);return!1}return!0};return t=t.filter(d),e=e.filter(d),u},o=(a)=>{return t.forEach((u)=>{a.add(u.middleware,{...u})}),e.forEach((u)=>{a.addRelativeTo(u.middleware,{...u})}),a.identifyOnResolve?.(x.identifyOnResolve()),a},h=(a)=>{const u=[];return a.before.forEach((d)=>{if(d.before.length===0&&d.after.length===0)u.push(d);else u.push(...h(d))}),u.push(a),a.after.reverse().forEach((d)=>{if(d.before.length===0&&d.after.length===0)u.push(d);else u.push(...h(d))}),u},l=(a=!1)=>{const u=[],d=[],p={};return t.forEach((y)=>{const f={...y,before:[],after:[]};for(let w of U(f.name,f.aliases))p[w]=f;u.push(f)}),e.forEach((y)=>{const f={...y,before:[],after:[]};for(let w of U(f.name,f.aliases))p[w]=f;d.push(f)}),d.forEach((y)=>{if(y.toMiddleware){const f=p[y.toMiddleware];if(f===void 0){if(a)return;throw new Error(`${y.toMiddleware} is not found when adding `+`${M(y.name,y.aliases)} `+`middleware ${y.relation} ${y.toMiddleware}`)}if(y.relation==="after")f.after.push(y);if(y.relation==="before")f.before.push(y)}}),s(u).map(h).reduce((y,f)=>{return y.push(...f),y},[])},x={add:(a,u={})=>{const{name:d,override:p,aliases:g}=u,y={step:"initialize",priority:"normal",middleware:a,...u},f=U(d,g);if(f.length>0){if(f.some((w)=>n.has(w))){if(!p)throw new Error(`Duplicate middleware name '${M(d,g)}'`);for(let w of f){const E=t.findIndex((m)=>m.name===w||m.aliases?.some((et)=>et===w));if(E===-1)continue;const b=t[E];if(b.step!==y.step||y.priority!==b.priority)throw new Error(`"${M(b.name,b.aliases)}" middleware with `+`${b.priority} priority in ${b.step} step cannot `+`be overridden by "${M(d,g)}" middleware with `+`${y.priority} priority in ${y.step} step.`);t.splice(E,1)}}for(let w of f)n.add(w)}t.push(y)},addRelativeTo:(a,u)=>{const{name:d,override:p,aliases:g}=u,y={middleware:a,...u},f=U(d,g);if(f.length>0){if(f.some((w)=>n.has(w))){if(!p)throw new Error(`Duplicate middleware name '${M(d,g)}'`);for(let w of f){const E=e.findIndex((m)=>m.name===w||m.aliases?.some((et)=>et===w));if(E===-1)continue;const b=e[E];if(b.toMiddleware!==y.toMiddleware||b.relation!==y.relation)throw new Error(`"${M(b.name,b.aliases)}" middleware `+`${b.relation} "${b.toMiddleware}" middleware cannot be overridden `+`by "${M(d,g)}" middleware ${y.relation} `+`"${y.toMiddleware}" middleware.`);e.splice(E,1)}}for(let w of f)n.add(w)}e.push(y)},clone:()=>o(F()),use:(a)=>{a.applyToStack(x)},remove:(a)=>{if(typeof a==="string")return i(a);else return c(a)},removeByTag:(a)=>{let u=!1;const d=(p)=>{const{tags:g,name:y,aliases:f}=p;if(g&&g.includes(a)){const w=U(y,f);for(let E of w)n.delete(E);return u=!0,!1}return!0};return t=t.filter(d),e=e.filter(d),u},concat:(a)=>{const u=o(F());return u.use(a),u.identifyOnResolve(r||u.identifyOnResolve()||(a.identifyOnResolve?.()??!1)),u},applyToStack:o,identify:()=>{return l(!0).map((a)=>{const u=a.step??a.relation+" "+a.toMiddleware;return M(a.name,a.aliases)+" - "+u})},identifyOnResolve(a){if(typeof a==="boolean")r=a;return r},resolve:(a,u)=>{for(let d of l().map((p)=>p.middleware).reverse())a=d(a,u);if(r)console.log(x.identify());return a}};return x},St={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Mt={high:3,normal:2,low:1};class Cr{constructor(t){this.middlewareStack=F(),this.config=t}send(t,e,r){const n=typeof e!=="function"?e:void 0,s=typeof e==="function"?e:r,i=t.resolveMiddleware(this.middlewareStack,this.config,n);if(s)i(t).then((c)=>s(null,c.output),(c)=>s(c)).catch(()=>{});else return i(t).then((c)=>c.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}}class Ut{constructor(){this.middlewareStack=F()}static classBuilder(){return new It}resolveMiddlewareWithContext(t,e,r,{middlewareFn:n,clientName:s,commandName:i,inputFilterSensitiveLog:c,outputFilterSensitiveLog:o,smithyContext:h,additionalContext:l,CommandCtor:x}){for(let g of n.bind(this)(x,t,e,r))this.middlewareStack.use(g);const a=t.concat(this.middlewareStack),{logger:u}=e,d={logger:u,clientName:s,commandName:i,inputFilterSensitiveLog:c,outputFilterSensitiveLog:o,[Nt]:{commandInstance:this,...h},...l},{requestHandler:p}=e;return a.resolve((g)=>p.handle(g.request,r||{}),d)}}class It{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(t)=>t,this._outputFilterSensitiveLog=(t)=>t,this._serializer=null,this._deserializer=null}init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,e,r={}){return this._smithyContext={service:t,operation:e,...r},this}c(t={}){return this._additionalContext=t,this}n(t,e){return this._clientName=t,this._commandName=e,this}f(t=(r)=>r,e=(r)=>r){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=e,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}build(){const t=this;let e;return e=class extends Ut{static getEndpointParameterInstructions(){return t._ep}constructor(...[r]){super();this.serialize=t._serializer,this.deserialize=t._deserializer,this.input=r??{},t._init(this)}resolveMiddleware(r,n,s){return this.resolveMiddlewareWithContext(r,n,s,{CommandCtor:e,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog,outputFilterSensitiveLog:t._outputFilterSensitiveLog,smithyContext:t._smithyContext,additionalContext:t._additionalContext})}}}}var ti=(t)=>{let e=t.httpHandler;return{setHttpHandler(r){e=r},httpHandler(){return e},updateHttpClientConfig(r,n){e.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return e.httpHandlerConfigs()}}},ei=(t)=>{return{httpHandler:t.httpHandler()}};var Sr=function(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];return{...e,[r]:Array.isArray(n)?[...n]:n}},{})};class rt{constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const e=new rt({...t,headers:{...t.headers}});if(e.query)e.query=Sr(e.query);return e}static isInstance(t){if(!t)return!1;const e=t;return"method"in e&&"protocol"in e&&"hostname"in e&&"path"in e&&typeof e.query==="object"&&typeof e.headers==="object"}clone(){return rt.clone(this)}}class W{constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const e=t;return typeof e.statusCode==="number"&&typeof e.headers==="object"}}var Y=it(st(),1);function ot(t){const e=[];for(let r of Object.keys(t).sort()){const n=t[r];if(r=Y.escapeUri(r),Array.isArray(n))for(let s=0,i=n.length;s<i;s++)e.push(`${r}=${Y.escapeUri(n[s])}`);else{let s=r;if(n||typeof n==="string")s+=`=${Y.escapeUri(n)}`;e.push(s)}}return e.join("&")}import{Agent as jt,request as Br} from"http";import{Agent as Yt,request as Wr} from"https";var zt=["ECONNRESET","EPIPE","ETIMEDOUT"];var ct=(t)=>{const e={};for(let r of Object.keys(t)){const n=t[r];e[r]=Array.isArray(n)?n.join(","):n}return e};var Dt=(t,e,r=0)=>{if(!r)return;const n=setTimeout(()=>{t.destroy(),e(Object.assign(new Error(`Socket timed out without establishing a connection within ${r} ms`),{name:"TimeoutError"}))},r);t.on("socket",(s)=>{if(s.connecting)s.on("connect",()=>{clearTimeout(n)});else clearTimeout(n)})};var Lt=(t,{keepAlive:e,keepAliveMsecs:r})=>{if(e!==!0)return;t.on("socket",(n)=>{n.setKeepAlive(e,r||0)})};var Bt=(t,e,r=0)=>{t.setTimeout(r,()=>{t.destroy(),e(Object.assign(new Error(`Connection timed out after ${r} ms`),{name:"TimeoutError"}))})};import{Readable as Dr} from"stream";async function ft(t,e,r=Wt){const n=e.headers??{},s=n.Expect||n.expect;let i=-1,c=!1;if(s==="100-continue")await Promise.race([new Promise((o)=>{i=Number(setTimeout(o,Math.max(Wt,r)))}),new Promise((o)=>{t.on("continue",()=>{clearTimeout(i),o()}),t.on("error",()=>{c=!0,clearTimeout(i),o()})})]);if(!c)Lr(t,e.body)}var Lr=function(t,e){if(e instanceof Dr){e.pipe(t);return}if(e){if(Buffer.isBuffer(e)||typeof e==="string"){t.end(e);return}const r=e;if(typeof r==="object"&&r.buffer&&typeof r.byteOffset==="number"&&typeof r.byteLength==="number"){t.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}t.end(Buffer.from(e));return}t.end()},Wt=1000;class at{static create(t){if(typeof t?.handle==="function")return t;return new at(t)}static checkSocketUsage(t,e,r=console){const{sockets:n,requests:s,maxSockets:i}=t;if(typeof i!=="number"||i===Infinity)return e;const c=15000;if(Date.now()-c<e)return e;if(n&&s)for(let o in n){const h=n[o]?.length??0,l=s[o]?.length??0;if(h>=i&&l>=2*i)return r?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${h} and ${l} additional requests are enqueued.
2
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return e}constructor(t){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((e,r)=>{if(typeof t==="function")t().then((n)=>{e(this.resolveDefaultConfig(n))}).catch(r);else e(this.resolveDefaultConfig(t))})}resolveDefaultConfig(t){const{requestTimeout:e,connectionTimeout:r,socketTimeout:n,httpAgent:s,httpsAgent:i}=t||{};return{connectionTimeout:r,requestTimeout:e??n,httpAgent:(()=>{if(s instanceof jt||typeof s?.destroy==="function")return s;return new jt({keepAlive:!0,maxSockets:50,...s})})(),httpsAgent:(()=>{if(i instanceof Yt||typeof i?.destroy==="function")return i;return new Yt({keepAlive:!0,maxSockets:50,...i})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(t,{abortSignal:e}={}){if(!this.config)this.config=await this.configProvider;let r;return new Promise((n,s)=>{let i=void 0;const c=async(f)=>{await i,clearTimeout(r),n(f)},o=async(f)=>{await i,clearTimeout(r),s(f)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(e?.aborted){const f=new Error("Request aborted");f.name="AbortError",o(f);return}const h=t.protocol==="https:",l=h?this.config.httpsAgent:this.config.httpAgent;r=setTimeout(()=>{this.socketWarningTimestamp=at.checkSocketUsage(l,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const x=ot(t.query||{});let a=void 0;if(t.username!=null||t.password!=null){const f=t.username??"",w=t.password??"";a=`${f}:${w}`}let u=t.path;if(x)u+=`?${x}`;if(t.fragment)u+=`#${t.fragment}`;const d={headers:t.headers,host:t.hostname,method:t.method,path:u,port:t.port,agent:l,auth:a},g=(h?Wr:Br)(d,(f)=>{const w=new W({statusCode:f.statusCode||-1,reason:f.statusMessage,headers:ct(f.headers),body:f});c({response:w})});if(g.on("error",(f)=>{if(zt.includes(f.code))o(Object.assign(f,{name:"TimeoutError"}));else o(f)}),Dt(g,o,this.config.connectionTimeout),Bt(g,o,this.config.requestTimeout),e){const f=()=>{g.destroy();const w=new Error("Request aborted");w.name="AbortError",o(w)};if(typeof e.addEventListener==="function"){const w=e;w.addEventListener("abort",f,{once:!0}),g.once("close",()=>w.removeEventListener("abort",f))}else e.onabort=f}const y=d.agent;if(typeof y==="object"&&"keepAlive"in y)Lt(g,{keepAlive:y.keepAlive,keepAliveMsecs:y.keepAliveMsecs});i=ft(g,t,this.config.requestTimeout).catch((f)=>{return clearTimeout(r),s(f)})})}updateHttpClientConfig(t,e){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return{...r,[t]:e}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as jr} from"stream";class ut extends jr{constructor(){super(...arguments);this.bufferedBytes=[]}_write(t,e,r){this.bufferedBytes.push(t),r()}}async function Or(t){const e=[],r=t.getReader();let n=!1,s=0;while(!n){const{done:o,value:h}=await r.read();if(h)e.push(h),s+=h.length;n=o}const i=new Uint8Array(s);let c=0;for(let o of e)i.set(o,c),c+=o.length;return i}var Ot=(t)=>{if(Yr(t))return Or(t);return new Promise((e,r)=>{const n=new ut;t.pipe(n),t.on("error",(s)=>{n.end(),r(s)}),n.on("error",r),n.on("finish",function(){const s=new Uint8Array(Buffer.concat(this.bufferedBytes));e(s)})})},Yr=(t)=>typeof ReadableStream==="function"&&t instanceof ReadableStream;var oo="***SensitiveInformation***";var fo=(t,e)=>{for(let r of Object.keys(t)){const n=t[r],s=async function(c,o,h){const l=new n(c);if(typeof o==="function")this.send(l,o);else if(typeof h==="function"){if(typeof o!=="object")throw new Error(`Expected http options but got ${typeof o}`);this.send(l,o||{},h)}else return this.send(l,o)},i=(r[0].toLowerCase()+r.slice(1)).replace(/Command$/,"");e.prototype[i]=s}};class Vt extends Error{constructor(t){super(t.message);Object.setPrototypeOf(this,Vt.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}}var Zt=(t,e={})=>{Object.entries(e).filter(([,n])=>n!==void 0).forEach(([n,s])=>{if(t[n]==null||t[n]==="")t[n]=s});const r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t};class Vr{trace(){}debug(){}info(){}warn(){}error(){}}var kt=(t)=>typeof ArrayBuffer==="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]";import{Buffer as ht} from"buffer";var A=(t,e=0,r=t.byteLength-e)=>{if(!kt(t))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof t} (${t})`);return ht.from(t,e,r)},O=(t,e)=>{if(typeof t!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof t} (${t})`);return e?ht.from(t,e):ht.from(t)};var Zr=/^[A-Za-z0-9+/]*={0,2}$/,Gt=(t)=>{if(t.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Zr.exec(t))throw new TypeError("Invalid base64 string.");const e=O(t,"base64");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)};var R=(t)=>{const e=O(t,"utf8");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var mo=(t)=>{if(typeof t==="string")return R(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(t)};var V=(t)=>{if(typeof t==="string")return t;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return A(t.buffer,t.byteOffset,t.byteLength).toString("utf8")};var Z=(t)=>{let e;if(typeof t==="string")e=R(t);else e=t;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return A(e.buffer,e.byteOffset,e.byteLength).toString("base64")};function Qt(t,e="utf-8"){if(e==="base64")return Z(t);return V(t)}function Xt(t,e){if(e==="base64")return C.mutate(Gt(t));return C.mutate(R(t))}class C extends Uint8Array{static fromString(t,e="utf-8"){switch(typeof t){case"string":return Xt(t,e);default:throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}}static mutate(t){return Object.setPrototypeOf(t,C.prototype),t}transformToString(t="utf-8"){return Qt(this,t)}}import{Readable as kr} from"stream";var ko=(t,e)=>{const{base64Encoder:r,bodyLengthChecker:n,checksumAlgorithmFn:s,checksumLocationName:i,streamHasher:c}=e,o=r!==void 0&&s!==void 0&&i!==void 0&&c!==void 0,h=o?c(s,t):void 0,l=new kr({read:()=>{}});return t.on("data",(x)=>{const a=n(x)||0;l.push(`${a.toString(16)}\r\n`),l.push(x),l.push("\r\n")}),t.on("end",async()=>{if(l.push("0\r\n"),o){const x=r(await h);l.push(`${i}:${x}\r\n`),l.push("\r\n")}l.push(null)}),l};import{Readable as xt} from"stream";import{TextDecoder as xs} from"util";var er=it(Qe(),1);var rr=it(qe(),1);var I=(t)=>typeof ReadableStream==="function"&&(t?.constructor?.name===ReadableStream.name||t instanceof ReadableStream);var _e="The stream has already been transformed.",nr=(t)=>{if(!tr(t)&&!I(t)){const s=t?.__proto__?.constructor?.name||t;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${s}`)}let e=!1;const r=async()=>{if(e)throw new Error(_e);return e=!0,await er.streamCollector(t)},n=(s)=>{if(typeof s.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return s.stream()};return Object.assign(t,{transformToByteArray:r,transformToString:async(s)=>{const i=await r();if(s==="base64")return Z(i);else if(s==="hex")return rr.toHex(i);else if(s===void 0||s==="utf8"||s==="utf-8")return V(i);else if(typeof TextDecoder==="function")return new TextDecoder(s).decode(i);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(e)throw new Error(_e);if(e=!0,tr(t))return n(t);else if(I(t))return t;else throw new Error(`Cannot transform payload to web stream, got ${t}`)}})},tr=(t)=>typeof Blob==="function"&&t instanceof Blob;var sr="The stream has already been transformed.",dc=(t)=>{if(!(t instanceof xt))try{return nr(t)}catch(n){const s=t?.__proto__?.constructor?.name||t;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${s}`)}let e=!1;const r=async()=>{if(e)throw new Error(sr);return e=!0,await Ot(t)};return Object.assign(t,{transformToByteArray:r,transformToString:async(n)=>{const s=await r();if(n===void 0||Buffer.isEncoding(n))return A(s.buffer,s.byteOffset,s.byteLength).toString(n);else return new xs(n).decode(s)},transformToWebStream:()=>{if(e)throw new Error(sr);if(t.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof xt.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return e=!0,xt.toWeb(t)}})};import{PassThrough as or} from"stream";async function ir(t){if(typeof t.stream==="function")t=t.stream();return t.tee()}async function xc(t){if(I(t))return ir(t);const e=new or,r=new or;return t.pipe(e),t.pipe(r),[e,r]}import{Writable as bs} from"stream";async function cr(t,e){let r=0;const n=[],s=t.getReader();let i=!1;while(!i){const{done:h,value:l}=await s.read();if(l)n.push(l),r+=l?.byteLength??0;if(r>=e)break;i=h}s.releaseLock();const c=new Uint8Array(Math.min(e,r));let o=0;for(let h of n){if(h.byteLength>c.byteLength-o){c.set(h.subarray(0,c.byteLength-o),o);break}else c.set(h,o);o+=h.length}return c}var Cc=(t,e)=>{if(I(t))return cr(t,e);return new Promise((r,n)=>{const s=new fr;s.limit=e,t.pipe(s),t.on("error",(i)=>{s.end(),n(i)}),s.on("error",n),s.on("finish",function(){const i=new Uint8Array(Buffer.concat(this.buffers));r(i)})})};class fr extends bs{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write(t,e,r){if(this.buffers.push(t),this.bytesBuffered+=t.byteLength??0,this.bytesBuffered>=this.limit){const n=this.bytesBuffered-this.limit,s=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=s.subarray(0,s.byteLength-n),this.emit("finish")}r()}}var Dc=async(t=new Uint8Array,e)=>{if(t instanceof Uint8Array)return C.mutate(t);if(!t)return C.mutate(new Uint8Array);const r=e.streamCollector(t);return C.mutate(await r)};var Bc=(t)=>{switch(t){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${t}"`)}};var Es=(t)=>{if(t===null||t===void 0)return;if(typeof t==="string"){const e=parseFloat(t);if(!Number.isNaN(e)){if(String(e)!==String(t))gr.warn(wr(`Expected number but observed string: ${t}`));return e}}if(typeof t==="number")return t;throw new TypeError(`Expected number, got ${typeof t}: ${t}`)},Ts=Math.ceil(340282346638528860000000000000000000000),ar=(t)=>{const e=Es(t);if(e!==void 0&&!Number.isNaN(e)&&e!==Infinity&&e!==(-Infinity)){if(Math.abs(e)>Ts)throw new TypeError(`Expected 32-bit float, got ${t}`)}return e},bt=(t)=>{if(t===null||t===void 0)return;if(Number.isInteger(t)&&!Number.isNaN(t))return t;throw new TypeError(`Expected integer, got ${typeof t}: ${t}`)};var ur=(t)=>Et(t,32),hr=(t)=>Et(t,16),dr=(t)=>Et(t,8),Et=(t,e)=>{const r=bt(t);if(r!==void 0&&ms(r,e)!==r)throw new TypeError(`Expected ${e}-bit integer, got ${t}`);return r},ms=(t,e)=>{switch(e){case 32:return Int32Array.of(t)[0];case 16:return Int16Array.of(t)[0];case 8:return Int8Array.of(t)[0]}},Wc=(t,e)=>{if(t===null||t===void 0){if(e)throw new TypeError(`Expected a non-null value for ${e}`);throw new TypeError("Expected a non-null value")}return t},jc=(t)=>{if(t===null||t===void 0)return;if(typeof t==="object"&&!Array.isArray(t))return t;const e=Array.isArray(t)?"array":typeof t;throw new TypeError(`Expected object, got ${e}: ${t}`)},Yc=(t)=>{if(t===null||t===void 0)return;if(typeof t==="string")return t;if(["boolean","number","bigint"].includes(typeof t))return gr.warn(wr(`Expected string, got ${typeof t}: ${t}`)),String(t);throw new TypeError(`Expected string, got ${typeof t}: ${t}`)};var lr=(t)=>{if(typeof t=="string")return ar(L(t));return ar(t)},$s=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,L=(t)=>{const e=t.match($s);if(e===null||e[0].length!==t.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(t)};var Oc=(t)=>{if(typeof t==="string")return bt(L(t));return bt(t)};var Vc=(t)=>{if(typeof t==="string")return ur(L(t));return ur(t)},z=(t)=>{if(typeof t==="string")return hr(L(t));return hr(t)},yr=(t)=>{if(typeof t==="string")return dr(L(t));return dr(t)},wr=(t)=>{return String(new TypeError(t).stack||t).split("\n").slice(0,5).filter((e)=>!e.includes("stackTraceWarning")).join("\n")},gr={warn:console.warn};function Qc(t){const e=t.getUTCFullYear(),r=t.getUTCMonth(),n=t.getUTCDay(),s=t.getUTCDate(),i=t.getUTCHours(),c=t.getUTCMinutes(),o=t.getUTCSeconds(),h=s<10?`0${s}`:`${s}`,l=i<10?`0${i}`:`${i}`,x=c<10?`0${c}`:`${c}`,a=o<10?`0${o}`:`${o}`;return`${Cs[n]}, ${h} ${mt[r]} ${e} ${l}:${x}:${a} GMT`}var Cs=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],mt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ss=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Xc=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const e=Ss.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,s,i,c,o,h,l]=e,x=z(D(n)),a=$(s,"month",1,12),u=$(i,"day",1,31);return B(x,a,u,{hours:c,minutes:o,seconds:h,fractionalMilliseconds:l})},Ms=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Jc=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const e=Ms.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,s,i,c,o,h,l,x]=e,a=z(D(n)),u=$(s,"month",1,12),d=$(i,"day",1,31),p=B(a,u,d,{hours:c,minutes:o,seconds:h,fractionalMilliseconds:l});if(x.toUpperCase()!="Z")p.setTime(p.getTime()-Ws(x));return p},Ns=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Us=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Is=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),Kc=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let e=Ns.exec(t);if(e){const[r,n,s,i,c,o,h,l]=e;return B(z(D(i)),Tt(s),$(n,"day",1,31),{hours:c,minutes:o,seconds:h,fractionalMilliseconds:l})}if(e=Us.exec(t),e){const[r,n,s,i,c,o,h,l]=e;return Rs(B(Fs(i),Tt(s),$(n,"day",1,31),{hours:c,minutes:o,seconds:h,fractionalMilliseconds:l}))}if(e=Is.exec(t),e){const[r,n,s,i,c,o,h,l]=e;return B(z(D(l)),Tt(n),$(s.trimLeft(),"day",1,31),{hours:i,minutes:c,seconds:o,fractionalMilliseconds:h})}throw new TypeError("Invalid RFC-7231 date-time value")};var B=(t,e,r,n)=>{const s=e-1;return Ds(t,s,r),new Date(Date.UTC(t,s,r,$(n.hours,"hour",0,23),$(n.minutes,"minute",0,59),$(n.seconds,"seconds",0,60),Bs(n.fractionalMilliseconds)))},Fs=(t)=>{const e=(new Date()).getUTCFullYear(),r=Math.floor(e/100)*100+z(D(t));if(r<e)return r+100;return r},As=1576800000000,Rs=(t)=>{if(t.getTime()-(new Date()).getTime()>As)return new Date(Date.UTC(t.getUTCFullYear()-100,t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()));return t},Tt=(t)=>{const e=mt.indexOf(t);if(e<0)throw new TypeError(`Invalid month: ${t}`);return e+1},zs=[31,28,31,30,31,30,31,31,30,31,30,31],Ds=(t,e,r)=>{let n=zs[e];if(e===1&&Ls(t))n=29;if(r>n)throw new TypeError(`Invalid day for ${mt[e]} in ${t}: ${r}`)},Ls=(t)=>{return t%4===0&&(t%100!==0||t%400===0)},$=(t,e,r,n)=>{const s=yr(D(t));if(s<r||s>n)throw new TypeError(`${e} must be between ${r} and ${n}, inclusive`);return s},Bs=(t)=>{if(t===null||t===void 0)return 0;return lr("0."+t)*1000},Ws=(t)=>{const e=t[0];let r=1;if(e=="+")r=1;else if(e=="-")r=-1;else throw new TypeError(`Offset direction, ${e}, must be "+" or "-"`);const n=Number(t.substring(1,3)),s=Number(t.substring(4,6));return r*(n*60+s)*60*1000},D=(t)=>{let e=0;while(e<t.length-1&&t.charAt(e)==="0")e++;if(e===0)return t;return t.slice(e)};var js=({output:t,parsedBody:e,exceptionCtor:r,errorCode:n})=>{const s=Ys(t),i=s.httpStatusCode?s.httpStatusCode+"":void 0,c=new r({name:e?.code||e?.Code||n||i||"UnknownError",$fault:"client",$metadata:s});throw Zt(c,e)},vc=(t)=>{return({output:e,parsedBody:r,errorCode:n})=>{js({output:e,parsedBody:r,exceptionCtor:t,errorCode:n})}},Ys=(t)=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]});var _c=(t)=>{switch(t){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var pr=!1,ef=(t)=>{if(t&&!pr&&parseInt(t.substring(1,t.indexOf(".")))<16)pr=!0};var xr=(t)=>{const e=[];for(let r in $t){const n=$t[r];if(t[n]===void 0)continue;e.push({algorithmId:()=>n,checksumConstructor:()=>t[n]})}return{_checksumAlgorithms:e,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},br=(t)=>{const e={};return t.checksumAlgorithms().forEach((r)=>{e[r.algorithmId()]=r.checksumConstructor()}),e};var Er=(t)=>{let e=t.retryStrategy;return{setRetryStrategy(r){e=r},retryStrategy(){return e}}},Tr=(t)=>{const e={};return e.retryStrategy=t.retryStrategy(),e};var af=(t)=>{return{...xr(t),...Er(t)}};var uf=(t)=>{return{...br(t),...Tr(t)}};function Os(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}var Ct=function(){const t=Object.getPrototypeOf(this).constructor,r=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(r,t.prototype),r};Ct.prototype=Object.create(String.prototype,{constructor:{value:Ct,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(Ct,String);function Vs(t,e,r){let n,s,i;if(typeof e==="undefined"&&typeof r==="undefined")n={},i=t;else if(n=t,typeof e==="function")return s=e,i=r,Zs(n,s,i);else i=e;for(let c of Object.keys(i)){if(!Array.isArray(i[c])){n[c]=i[c];continue}mr(n,null,i,c)}return n}var xf=(t,e)=>{const r={};for(let n in e)mr(r,t,e,n);return r},Zs=(t,e,r)=>{return Vs(t,Object.entries(r).reduce((n,[s,i])=>{if(Array.isArray(i))n[s]=i;else if(typeof i==="function")n[s]=[e,i()];else n[s]=[e,i];return n},{}))},mr=(t,e,r,n)=>{if(e!==null){let c=r[n];if(typeof c==="function")c=[,c];const[o=ks,h=Gs,l=n]=c;if(typeof o==="function"&&o(e[l])||typeof o!=="function"&&!!o)t[n]=h(e[l]);return}let[s,i]=r[n];if(typeof i==="function"){let c;const o=s===void 0&&(c=i())!=null,h=typeof s==="function"&&!!s(void 0)||typeof s!=="function"&&!!s;if(o)t[n]=c;else if(h)t[n]=i()}else{const c=s===void 0&&i!=null,o=typeof s==="function"&&!!s(i)||typeof s!=="function"&&!!s;if(c||o)t[n]=i}},ks=(t)=>t!=null,Gs=(t)=>t;var mf=(t)=>t.toISOString().replace(".000Z","Z");var $r=(t)=>{if(t==null)return{};if(Array.isArray(t))return t.filter((e)=>e!=null).map($r);if(typeof t==="object"){const e={};for(let r of Object.keys(t)){if(t[r]==null)continue;e[r]=$r(t[r])}return e}return t};export{ti as z,ei as A,rt as B,W as C,Vr as D,Cr as E,kt as F,A as G,O as H,Gt as I,R as J,mo as K,V as L,Z as M,ko as N,st as O,at as P,Ot as Q,re as R,de as S,ge as T,be as U,H as V,Fe as W,Be as X,Qe as Y,qe as Z,dc as _,xc as $,Cc as aa,Dc as ba,Ut as ca,oo as da,fo as ea,Bc as fa,bt as ga,ur as ha,Wc as ia,jc as ja,Yc as ka,Oc as la,Vc as ma,Qc as na,Xc as oa,Jc as pa,Kc as qa,Vt as ra,Zt as sa,vc as ta,_c as ua,ef as va,af as wa,uf as xa,Os as ya,Vs as za,xf as Aa,mf as Ba,$r as Ca};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-c675f193d459818e.js";import"./chunk-72821f055108528e.js";import{kb as o} from"./chunk-2f7aac67f16768a5.js";import{rb as K,xb as S} from"./chunk-cb69e9621a60d310.js";import{exec as _} from"child_process";import{promisify as y} from"util";var i=(c,n,s)=>{if(n.Version!==1)throw Error(`Profile ${c} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${c} credential_process returned invalid credentials.`);if(n.Expiration){const t=new Date;if(new Date(n.Expiration)<t)throw Error(`Profile ${c} credential_process returned expired credentials.`)}let e=n.AccountId;if(!e&&s?.[c]?.aws_account_id)e=s[c].aws_account_id;return{accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...e&&{accountId:e}}};var x=async(c,n,s)=>{const e=n[c];if(n[c]){const t=e.credential_process;if(t!==void 0){const u=y(_);try{const{stdout:r}=await u(t);let w;try{w=JSON.parse(r.trim())}catch{throw Error(`Profile ${c} credential_process returned invalid JSON.`)}return i(c,w,n)}catch(r){throw new o(r.message,{logger:s})}}else throw new o(`Profile ${c} did not contain credential_process.`,{logger:s})}else throw new o(`Profile ${c} could not be found in shared credentials file.`,{logger:s})};var $=(c={})=>async()=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const n=await S(c);return x(K(c),n,c.logger)};export{$ as fromProcess};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-a5c18c07abe8fd9c.js";import{vb as E} from"./chunk-73eed146ee78f681.js";var _="AWS_ACCESS_KEY_ID",S="AWS_SECRET_ACCESS_KEY",p="AWS_SESSION_TOKEN",A="AWS_CREDENTIAL_EXPIRATION",C="AWS_CREDENTIAL_SCOPE",N="AWS_ACCOUNT_ID",a=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const o=process.env[_],r=process.env[S],n=process.env[p],s=process.env[A],t=process.env[C],c=process.env[N];if(o&&r)return{accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...c&&{accountId:c}};throw new E("Unable to find environment variable credentials.",{logger:e?.logger})};export{a as fromEnv,p as ENV_SESSION,S as ENV_SECRET,_ as ENV_KEY,A as ENV_EXPIRATION,C as ENV_CREDENTIAL_SCOPE,N as ENV_ACCOUNT_ID};export{_ as s,S as t,a as u};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{s as o} from"./chunk-c675f193d459818e.js";import{B as Be,C as Fe,F as g,G as We,K as ee,L as se,N as te,O as re,Q as ce,R as ie,Y as ss,Z as R,ca as D,da as Ge,ea as h,la as Te,ma as u,na as Ve,oa as le,pa as pe,qa as _e,ra as $e,ta as i,ua as y,wa as Ne} from"./chunk-63ad0436d3d896b5.js";import{$a as x,Aa as Me,Ba as os,Fa as F,Ga as Ae,Ha as G,Ia as V,Ja as N,Ka as Ke,La as ye,Ma as me,Na as he,Oa as ue,Pa as Qe,Qa as Xe,Sa as ts,Ta as rs,Ua as Ye,Va as we,Wa as be,Xa as Ze,Ya as xe,Za as je,ab as ve,bb as ke,cb as Re,db as qe,eb as Pe,fb as Je,xa as Ie,ya as Le,za as Ce} from"./chunk-a095821ffc039b99.js";import"./chunk-72821f055108528e.js";import{hb as ps,ib as l} from"./chunk-640e4bdae1671873.js";import"./chunk-5656abf3151c8fa2.js";import"./chunk-8401f0f53dc26633.js";var p=o(F(),1);var $=o(x(),1),v=o(os(),1),cs=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(s,t)=>({signingProperties:{config:s,context:t}})}},b=function(e){return{schemeId:"smithy.api#noAuth"}},P=async(e,s,t)=>{return{operation:v.getSmithyContext(s).operation,region:await v.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},J=(e)=>{const s=[];switch(e.operation){case"GetRoleCredentials":{s.push(b(e));break}case"ListAccountRoles":{s.push(b(e));break}case"ListAccounts":{s.push(b(e));break}case"Logout":{s.push(b(e));break}default:s.push(cs(e))}return s},U=(e)=>{return{...$.resolveAwsSdkSigV4Config(e)}};var I=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},L={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var C={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.629.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"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 sso"},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/core":"3.629.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.620.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.614.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.3.2","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.14","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.1.12","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@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.14","@smithy/util-defaults-mode-node":"^3.0.14","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@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-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}};var Ee=o(x(),1);var ae=o(x(),1),ne=o(F(),1);var de=o(ps(),1);var M={["required"]:!1,type:"String"},W={["required"]:!0,default:!1,type:"Boolean"},A={["ref"]:"Endpoint"},j={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},d={},K={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},H={["ref"]:"PartitionResult"},Q={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[H,"supportsDualStack"]}]},X=[j],Y=[T],Z=[{["ref"]:"Region"}],ls={version:"1.0",parameters:{Region:M,UseDualStack:W,UseFIPS:W,Endpoint:M},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[A]}],rules:[{conditions:X,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Y,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:A,properties:d,headers:d},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:Z}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:Z,assign:"PartitionResult"}],rules:[{conditions:[j,T],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,K]},Q],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:X,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[K,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[H,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:d,headers:d},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Y,rules:[{conditions:[Q],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},O=ls;var f=(e,s={})=>{return V(O,{endpointParams:e,logger:s.logger})};G.aws=N;var oe=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??ee,base64Encoder:e?.base64Encoder??re,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??f,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??J,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new ae.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ne.NoAuthSigner}],logger:e?.logger??new g,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??de.parseUrl,utf8Decoder:e?.utf8Decoder??se,utf8Encoder:e?.utf8Encoder??te}};var Se=(e)=>{pe(process.version);const s=qe(e),t=()=>s().then(le),r=oe(e);return Ee.emitWarningIfUnsupportedVersion(process.version),{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Re,defaultUserAgentProvider:e?.defaultUserAgentProvider??ve({serviceId:r.serviceId,clientVersion:C.version}),maxAttempts:e?.maxAttempts??l(be),region:e?.region??l(he,ue),requestHandler:ce.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...xe,default:async()=>(await t()).retryMode||we}),sha256:e?.sha256??ke.bind(null,"sha256"),streamCollector:e?.streamCollector??ie,useDualstackEndpoint:e?.useDualstackEndpoint??l(ye),useFipsEndpoint:e?.useFipsEndpoint??l(me)}};var ze=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){const n=s.findIndex((B)=>B.schemeId===a.schemeId);if(n===-1)s.push(a);else s.splice(n,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){t=a},httpAuthSchemeProvider(){return t},setCredentials(a){r=a},credentials(){return r}}},De=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var k=(e)=>e,Ue=(e,s)=>{const t={...k(Pe(e)),...k(_e(e)),...k(Be(e)),...k(ze(e))};return s.forEach((r)=>r.configure(t)),{...e,...Je(t),...$e(t),...Fe(t),...De(t)}};class ys extends We{constructor(...[e]){const s=Se(e||{}),t=I(s),r=Ae(t),a=Ze(r),n=Qe(a),B=Ie(n),as=Ye(B),ns=U(as),_=Ue(ns,e?.extensions||[]);super(_);this.config=_,this.middlewareStack.use(Ke(this.config)),this.middlewareStack.use(je(this.config)),this.middlewareStack.use(Xe(this.config)),this.middlewareStack.use(Le(this.config)),this.middlewareStack.use(Ce(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:P,identityProviderConfigProvider:async(ds)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":ds.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class c extends Te{constructor(e){super(e);Object.setPrototypeOf(this,c.prototype)}}class q extends c{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,q.prototype)}}class E extends c{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,E.prototype)}}class S extends c{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,S.prototype)}}class z extends c{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,z.prototype)}}var He=(e)=>({...e,...e.accessToken&&{accessToken:R}}),ms=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:R},...e.sessionToken&&{sessionToken:R}}),Oe=(e)=>({...e,...e.roleCredentials&&{roleCredentials:ms(e.roleCredentials)}});var m=o(x(),1),fe=o(F(),1);var ge=async(e,s)=>{const t=fe.requestBuilder(e,s),r=i({},ks,{[Ds]:e[qs]});t.bp("/federation/credentials");const a=i({[zs]:[,D(e[Ss],"roleName")],[Es]:[,D(e[Rs],"accountId")]});let n;return t.m("GET").h(r).q(a).b(n),t.build()};var es=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return hs(e,s);const t=i({$metadata:w(e)}),r=D(Ge(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:Ne});return Object.assign(t,a),t};var hs=async(e,s)=>{const t={...e,body:await m.parseJsonErrorBody(e.body,s)},r=m.loadRestJsonErrorCode(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await ws(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await bs(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await xs(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await vs(t,s);default:const a=t.body;return us({output:e,parsedBody:a,errorCode:r})}},us=Ve(c),ws=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new q({$metadata:w(e),...t});return u(n,e.body)},bs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new E({$metadata:w(e),...t});return u(n,e.body)},xs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new S({$metadata:w(e),...t});return u(n,e.body)},vs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new z({$metadata:w(e),...t});return u(n,e.body)},w=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var ks=(e)=>e!==void 0&&e!==null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),Rs="accountId",qs="accessToken",Es="account_id";var Ss="roleName",zs="role_name",Ds="x-amz-sso_bearer_token";class Bs extends ss.classBuilder().ep({...L}).m(function(e,s,t,r){return[ts(t,this.serialize,this.deserialize),rs(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(He,Oe).ser(ge).de(es).build(){}export{ys as SSOClient,Bs as GetRoleCredentialsCommand};
@@ -0,0 +1 @@
1
+ class n extends Error{constructor(t,e=!0){let o,r=!0;if(typeof e==="boolean")o=void 0,r=e;else if(e!=null&&typeof e==="object")o=e.logger,r=e.tryNextLink??!0;super(t);this.name="ProviderError",this.tryNextLink=r,Object.setPrototypeOf(this,n.prototype),o?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${t}`)}static from(t,e=!0){return Object.assign(new this(t.message,e),t)}}class u extends n{constructor(t,e=!0){super(t,e);this.name="CredentialsProviderError",Object.setPrototypeOf(this,u.prototype)}}class l extends n{constructor(t,e=!0){super(t,e);this.name="TokenProviderError",Object.setPrototypeOf(this,l.prototype)}}var v=(...t)=>async()=>{if(t.length===0)throw new n("No providers in chain");let e;for(let o of t)try{return await o()}catch(r){if(e=r,r?.tryNextLink)continue;throw r}throw e};var w=(t)=>()=>Promise.resolve(t);var b=(t,e,o)=>{let r,i,s,f=!1;const a=async()=>{if(!i)i=t();try{r=await i,s=!0,f=!1}finally{i=void 0}return r};if(e===void 0)return async(c)=>{if(!s||c?.forceRefresh)r=await a();return r};return async(c)=>{if(!s||c?.forceRefresh)r=await a();if(f)return r;if(o&&!o(r))return f=!0,r;if(e(r))return await a(),r;return r}};export{n as ib,u as jb,l as kb,v as lb,w as mb,b as nb};
@@ -0,0 +1,2 @@
1
+ import{y as D} from"./chunk-a5c18c07abe8fd9c.js";var S=D((y,w)=>{var{defineProperty:G,getOwnPropertyDescriptor:v,getOwnPropertyNames:O}=Object,x=Object.prototype.hasOwnProperty,Q=(b,j)=>G(b,"name",{value:j,configurable:!0}),U=(b,j)=>{for(var z in j)G(b,z,{get:j[z],enumerable:!0})},K=(b,j,z,V)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let B of O(j))if(!x.call(b,B)&&B!==z)G(b,B,{get:()=>j[B],enumerable:!(V=v(j,B))||V.enumerable})}return b},q=(b)=>K(G({},"__esModule",{value:!0}),b),W={};U(W,{AlgorithmId:()=>J,EndpointURLScheme:()=>X,FieldPosition:()=>M,HttpApiKeyAuthLocation:()=>$,HttpAuthLocation:()=>Z,IniSectionType:()=>N,RequestHandlerProtocol:()=>Y,SMITHY_CONTEXT_KEY:()=>R,getDefaultClientConfiguration:()=>T,resolveDefaultRuntimeConfig:()=>k});w.exports=q(W);var Z=((b)=>{return b.HEADER="header",b.QUERY="query",b})(Z||{}),$=((b)=>{return b.HEADER="header",b.QUERY="query",b})($||{}),X=((b)=>{return b.HTTP="http",b.HTTPS="https",b})(X||{}),J=((b)=>{return b.MD5="md5",b.CRC32="crc32",b.CRC32C="crc32c",b.SHA1="sha1",b.SHA256="sha256",b})(J||{}),E=Q((b)=>{const j=[];if(b.sha256!==void 0)j.push({algorithmId:()=>"sha256",checksumConstructor:()=>b.sha256});if(b.md5!=null)j.push({algorithmId:()=>"md5",checksumConstructor:()=>b.md5});return{_checksumAlgorithms:j,addChecksumAlgorithm(z){this._checksumAlgorithms.push(z)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),F=Q((b)=>{const j={};return b.checksumAlgorithms().forEach((z)=>{j[z.algorithmId()]=z.checksumConstructor()}),j},"resolveChecksumRuntimeConfig"),T=Q((b)=>{return{...E(b)}},"getDefaultClientConfiguration"),k=Q((b)=>{return{...F(b)}},"resolveDefaultRuntimeConfig"),M=((b)=>{return b[b.HEADER=0]="HEADER",b[b.TRAILER=1]="TRAILER",b})(M||{}),R="__smithy_context",N=((b)=>{return b.PROFILE="profile",b.SSO_SESSION="sso-session",b.SERVICES="services",b})(N||{}),Y=((b)=>{return b.HTTP_0_9="http/0.9",b.HTTP_1_0="http/1.0",b.TDS_8_0="tds/8.0",b})(Y||{})});
2
+ export{S as fb};