@stacksjs/buddy 0.66.0 → 0.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/add.d.ts +4 -0
- package/dist/build.d.ts +4 -0
- package/dist/changelog.d.ts +3 -0
- package/dist/chunk-06g79v9j.js +2 -0
- package/dist/chunk-08bm2xax.js +2 -0
- package/dist/chunk-0enrsn65.js +978 -0
- package/dist/chunk-0m218zhk.js +2 -0
- package/dist/chunk-0q0jn0kk.js +6 -0
- package/dist/chunk-0yyhz107.js +2 -0
- package/dist/chunk-11vhe2za.js +2 -0
- package/dist/chunk-13143jmy.js +3 -0
- package/dist/chunk-1agj4qty.js +2 -0
- package/dist/chunk-1c4yywmn.js +9 -0
- package/dist/chunk-1e2f0z80.js +2 -0
- package/dist/chunk-1v13dkfw.js +2 -0
- package/dist/chunk-20e0mpcw.js +9 -0
- package/dist/chunk-25nxsybw.js +2 -0
- package/dist/chunk-27ksm11g.js +2 -0
- package/dist/chunk-2mhj5ght.js +2 -0
- package/dist/chunk-2wrs9p57.js +1 -0
- package/dist/chunk-2yj4j69j.js +2 -0
- package/dist/chunk-2ymn50ck.js +2 -0
- package/dist/chunk-3vjfkr7v.js +978 -0
- package/dist/{chunk-3zx3yk1m.js → chunk-3wpw5xgd.js} +1 -4
- package/dist/chunk-3y0gapf6.js +2 -0
- package/dist/chunk-4rb5r88h.js +978 -0
- package/dist/chunk-4wb68jfr.js +2 -0
- package/dist/chunk-5ewcj9vd.js +2 -0
- package/dist/chunk-5fm9mfqs.js +2 -0
- package/dist/chunk-5jhkn5by.js +2 -0
- package/dist/chunk-5m9xts4v.js +2 -0
- package/dist/chunk-6sqy7049.js +2 -0
- package/dist/chunk-6yazdvb4.js +2 -0
- package/dist/chunk-746p83dw.js +2 -0
- package/dist/chunk-76g7tr80.js +2 -0
- package/dist/chunk-7fz1p8p3.js +10 -0
- package/dist/chunk-814adsn3.js +2 -0
- package/dist/chunk-831wk0b3.js +2 -0
- package/dist/chunk-833tanrb.js +2 -0
- package/dist/chunk-8cx90pvv.js +2 -0
- package/dist/chunk-8gx9at51.js +1 -0
- package/dist/chunk-91pnyybg.js +9 -0
- package/dist/chunk-99syj1p0.js +2 -0
- package/dist/chunk-9bxh78vd.js +5 -0
- package/dist/chunk-9jaqey2q.js +2 -0
- package/dist/chunk-9tyaew40.js +2 -0
- package/dist/chunk-9zcyq5gh.js +2 -0
- package/dist/chunk-a4g1e1n0.js +2 -0
- package/dist/chunk-a6g2jk1y.js +2 -0
- package/dist/chunk-aaqd43t5.js +2 -0
- package/dist/chunk-adswb3gq.js +2 -0
- package/dist/chunk-atnw2cq3.js +2 -0
- package/dist/chunk-avdharmq.js +2 -0
- package/dist/chunk-b13gbfg3.js +2 -0
- package/dist/chunk-b3wr7cpk.js +2 -0
- package/dist/chunk-bngyck4v.js +2 -0
- package/dist/chunk-brb5zthb.js +1 -0
- package/dist/chunk-bx2vf8g7.js +5 -0
- package/dist/chunk-c343n0yt.js +2 -0
- package/dist/chunk-cdwpqzrw.js +2 -0
- package/dist/chunk-cm7bwdk9.js +2 -0
- package/dist/chunk-cs5k02gt.js +1 -0
- package/dist/chunk-cv8f2v27.js +2 -0
- package/dist/chunk-d2dbhn2h.js +2 -0
- package/dist/chunk-d3awsfqm.js +9 -0
- package/dist/chunk-d9q17hb8.js +2 -0
- package/dist/chunk-dw62d69f.js +2 -0
- package/dist/chunk-e8p8v7ca.js +978 -0
- package/dist/chunk-ehhrhkwe.js +9 -0
- package/dist/chunk-enhf12a1.js +2 -0
- package/dist/chunk-f0ksrase.js +8 -0
- package/dist/chunk-f2d9w3nr.js +2 -0
- package/dist/chunk-f3y73e4b.js +6 -0
- package/dist/chunk-fe3xb8z9.js +2 -0
- package/dist/chunk-fg5gh4dn.js +2 -0
- package/dist/chunk-fh4rw8kr.js +5 -0
- package/dist/chunk-fxsv4p5c.js +8 -0
- package/dist/chunk-gg80s18j.js +2 -0
- package/dist/chunk-h5saw32v.js +2 -0
- package/dist/chunk-ha75r57f.js +8 -0
- package/dist/chunk-hgrs6wcy.js +2 -0
- package/dist/chunk-hrsat16n.js +8 -0
- package/dist/chunk-hxy5t7tm.js +10 -0
- package/dist/chunk-hzfqtj82.js +2 -0
- package/dist/chunk-j2n86dsz.js +2 -0
- package/dist/chunk-jg68fsnk.js +10 -0
- package/dist/chunk-jhvjhf1j.js +2 -0
- package/dist/chunk-jr4naxsv.js +2 -0
- package/dist/chunk-jtax0mpm.js +2 -0
- package/dist/chunk-k59kbbvm.js +2 -0
- package/dist/chunk-kanz993c.js +2 -0
- package/dist/chunk-kg9abatp.js +2 -0
- package/dist/chunk-kvghsjg7.js +5 -0
- package/dist/chunk-ky8p46ae.js +5 -0
- package/dist/chunk-kzm498bh.js +2 -0
- package/dist/chunk-m4gwjnfh.js +6 -0
- package/dist/chunk-msv6dcc2.js +2 -0
- package/dist/chunk-mxdajhb4.js +10 -0
- package/dist/chunk-mxzjn2gs.js +978 -0
- package/dist/chunk-n1bqkqk7.js +10 -0
- package/dist/chunk-njtyervf.js +1 -0
- package/dist/chunk-nx1598yr.js +2 -0
- package/dist/chunk-p18kqenr.js +1 -0
- package/dist/chunk-p23aswbf.js +2 -0
- package/dist/chunk-p55ntqj0.js +2 -0
- package/dist/chunk-p5va3trj.js +2 -0
- package/dist/chunk-p88bsqtc.js +10 -0
- package/dist/chunk-p9z7f8c8.js +2 -0
- package/dist/chunk-ppkzf21q.js +8 -0
- package/dist/chunk-prqq5zw2.js +2 -0
- package/dist/chunk-pv6hp18q.js +10 -0
- package/dist/chunk-q9ycfthp.js +2 -0
- package/dist/chunk-qhcx6dmf.js +2 -0
- package/dist/chunk-qma4ysd8.js +9 -0
- package/dist/chunk-qqp394c2.js +2 -0
- package/dist/chunk-ra5sfgg4.js +2 -0
- package/dist/chunk-rfd43z7p.js +5 -0
- package/dist/chunk-s2n3hw0a.js +2 -0
- package/dist/chunk-sm7vvfqf.js +2 -0
- package/dist/chunk-sqbdav33.js +2 -0
- package/dist/chunk-sy4d4hnx.js +2 -0
- package/dist/chunk-t0b356bb.js +978 -0
- package/dist/chunk-t9wdnzz4.js +6 -0
- package/dist/chunk-v25g7h01.js +2 -0
- package/dist/chunk-v7zy7xda.js +1 -0
- package/dist/chunk-vg4vfkzk.js +6 -0
- package/dist/chunk-vgcre8jy.js +2 -0
- package/dist/chunk-vqyngnj0.js +9 -0
- package/dist/chunk-w17d2rbd.js +6 -0
- package/dist/chunk-x22v9kvb.js +2 -0
- package/dist/chunk-xacjs4ar.js +6 -0
- package/dist/chunk-xmdbxa8w.js +1 -0
- package/dist/chunk-xy6hjazn.js +978 -0
- package/dist/chunk-y0m35t3m.js +2 -0
- package/dist/chunk-y1tre8v8.js +8 -0
- package/dist/chunk-y50mc7dt.js +2 -0
- package/dist/chunk-y93ke5m6.js +2 -0
- package/dist/chunk-yktee4wv.js +1 -0
- package/dist/chunk-yvmyw2r2.js +2 -0
- package/dist/chunk-z1h35hsa.js +2 -0
- package/dist/chunk-z6xydw90.js +2 -0
- package/dist/chunk-zak32nab.js +2 -0
- package/dist/clean.d.ts +3 -0
- package/dist/cli.d.ts +4 -1
- package/dist/cli.js +1 -4
- package/dist/cloud.d.ts +3 -0
- package/dist/commit.d.ts +3 -0
- package/dist/configure.d.ts +4 -0
- package/dist/create.d.ts +8 -0
- package/dist/custom-cli.d.ts +1 -1
- package/dist/deploy.d.ts +7 -0
- package/dist/{commands/dev.d.ts → dev.d.ts} +3 -1
- package/dist/dns.d.ts +18 -0
- package/dist/domains.d.ts +3 -0
- package/dist/fresh.d.ts +3 -0
- package/dist/generate.d.ts +3 -0
- package/dist/http.d.ts +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -4
- package/dist/install.d.ts +3 -0
- package/dist/key.d.ts +3 -0
- package/dist/lint.d.ts +3 -0
- package/dist/list.d.ts +3 -0
- package/dist/make.d.ts +1 -0
- package/dist/migrate.d.ts +3 -0
- package/dist/outdated.d.ts +3 -0
- package/dist/ports.d.ts +7 -0
- package/dist/prepublish.d.ts +3 -0
- package/dist/projects.d.ts +3 -0
- package/dist/release.d.ts +9 -0
- package/dist/route.d.ts +3 -0
- package/dist/saas.d.ts +3 -0
- package/dist/seed.d.ts +3 -0
- package/dist/setup.d.ts +8 -0
- package/dist/stacks +0 -0
- package/dist/test.d.ts +3 -0
- package/dist/tinker.d.ts +3 -0
- package/dist/types.d.ts +3 -0
- package/dist/upgrade.d.ts +4 -0
- package/dist/version.d.ts +3 -0
- package/package.json +48 -49
- package/dist/chunk-3cfvbq6w.js +0 -5
- package/dist/chunk-3cfvbq6w.js.map +0 -32
- package/dist/chunk-3v3h2zkp.js +0 -5
- package/dist/chunk-3v3h2zkp.js.map +0 -46
- package/dist/chunk-3zx3yk1m.js.map +0 -15
- package/dist/chunk-8a487snn.js +0 -5
- package/dist/chunk-8a487snn.js.map +0 -9
- package/dist/chunk-9kkf5maz.js +0 -5
- package/dist/chunk-9kkf5maz.js.map +0 -23
- package/dist/chunk-9qba8jdt.js +0 -12
- package/dist/chunk-9qba8jdt.js.map +0 -11
- package/dist/chunk-cvpb67bs.js +0 -5
- package/dist/chunk-cvpb67bs.js.map +0 -10
- package/dist/chunk-eqwfdbyk.js +0 -5
- package/dist/chunk-eqwfdbyk.js.map +0 -17
- package/dist/chunk-f41k7dpa.js +0 -5
- package/dist/chunk-f41k7dpa.js.map +0 -11
- package/dist/chunk-fx1zxxxa.js +0 -9
- package/dist/chunk-fx1zxxxa.js.map +0 -13
- package/dist/chunk-get5gzkc.js +0 -11
- package/dist/chunk-get5gzkc.js.map +0 -10
- package/dist/chunk-m43npkjw.js +0 -5
- package/dist/chunk-m43npkjw.js.map +0 -12
- package/dist/chunk-mrrgcavv.js +0 -831
- package/dist/chunk-mrrgcavv.js.map +0 -240
- package/dist/chunk-n5y0mrsg.js +0 -15
- package/dist/chunk-n5y0mrsg.js.map +0 -173
- package/dist/chunk-qebxvzqz.js +0 -5
- package/dist/chunk-qebxvzqz.js.map +0 -26
- package/dist/chunk-qj2v5psd.js +0 -5
- package/dist/chunk-qj2v5psd.js.map +0 -20
- package/dist/chunk-rh4brnzh.js +0 -5
- package/dist/chunk-rh4brnzh.js.map +0 -16
- package/dist/chunk-w2vwjv6k.js +0 -6
- package/dist/chunk-w2vwjv6k.js.map +0 -57
- package/dist/chunk-w81rbh65.js +0 -5
- package/dist/chunk-w81rbh65.js.map +0 -10
- package/dist/chunk-wayp5kn2.js +0 -5
- package/dist/chunk-wayp5kn2.js.map +0 -22
- package/dist/chunk-x5c5ngpb.js +0 -4
- package/dist/chunk-x5c5ngpb.js.map +0 -23
- package/dist/cli.js.map +0 -10
- package/dist/commands/add.d.ts +0 -2
- package/dist/commands/build.d.ts +0 -2
- package/dist/commands/changelog.d.ts +0 -2
- package/dist/commands/clean.d.ts +0 -2
- package/dist/commands/cloud.d.ts +0 -2
- package/dist/commands/commit.d.ts +0 -2
- package/dist/commands/configure.d.ts +0 -2
- package/dist/commands/create.d.ts +0 -2
- package/dist/commands/deploy.d.ts +0 -2
- package/dist/commands/dns.d.ts +0 -2
- package/dist/commands/domains.d.ts +0 -2
- package/dist/commands/fresh.d.ts +0 -2
- package/dist/commands/generate.d.ts +0 -2
- package/dist/commands/http.d.ts +0 -2
- package/dist/commands/index.d.ts +0 -33
- package/dist/commands/install.d.ts +0 -2
- package/dist/commands/key.d.ts +0 -2
- package/dist/commands/lint.d.ts +0 -2
- package/dist/commands/list.d.ts +0 -2
- package/dist/commands/make.d.ts +0 -2
- package/dist/commands/migrate.d.ts +0 -2
- package/dist/commands/outdated.d.ts +0 -2
- package/dist/commands/ports.d.ts +0 -2
- package/dist/commands/prepublish.d.ts +0 -2
- package/dist/commands/projects.d.ts +0 -2
- package/dist/commands/release.d.ts +0 -2
- package/dist/commands/route.d.ts +0 -2
- package/dist/commands/seed.d.ts +0 -2
- package/dist/commands/setup.d.ts +0 -4
- package/dist/commands/test.d.ts +0 -2
- package/dist/commands/tinker.d.ts +0 -2
- package/dist/commands/types.d.ts +0 -2
- package/dist/commands/upgrade.d.ts +0 -2
- package/dist/commands/version.d.ts +0 -2
- package/dist/index.js.map +0 -9
- package/src/cli.ts +0 -105
- package/src/commands/add.ts +0 -71
- package/src/commands/build.ts +0 -299
- package/src/commands/changelog.ts +0 -52
- package/src/commands/clean.ts +0 -46
- package/src/commands/cloud.ts +0 -553
- package/src/commands/commit.ts +0 -26
- package/src/commands/configure.ts +0 -84
- package/src/commands/create.ts +0 -143
- package/src/commands/deploy.ts +0 -194
- package/src/commands/dev.ts +0 -292
- package/src/commands/dns.ts +0 -86
- package/src/commands/domains.ts +0 -255
- package/src/commands/fresh.ts +0 -48
- package/src/commands/generate.ts +0 -202
- package/src/commands/http.ts +0 -57
- package/src/commands/index.ts +0 -33
- package/src/commands/install.ts +0 -30
- package/src/commands/key.ts +0 -36
- package/src/commands/lint.ts +0 -54
- package/src/commands/list.ts +0 -42
- package/src/commands/make.ts +0 -352
- package/src/commands/migrate.ts +0 -105
- package/src/commands/outdated.ts +0 -31
- package/src/commands/ports.ts +0 -188
- package/src/commands/prepublish.ts +0 -28
- package/src/commands/projects.ts +0 -54
- package/src/commands/release.ts +0 -47
- package/src/commands/route.ts +0 -39
- package/src/commands/seed.ts +0 -47
- package/src/commands/setup.ts +0 -145
- package/src/commands/test.ts +0 -214
- package/src/commands/tinker.ts +0 -42
- package/src/commands/types.ts +0 -35
- package/src/commands/upgrade.ts +0 -200
- package/src/commands/version.ts +0 -29
- package/src/custom-cli.ts +0 -35
- package/src/index.ts +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{rb as J}from"./chunk-6yazdvb4.js";import{xb as A,zb as g}from"./chunk-d2dbhn2h.js";var Ht=g((rf,kt)=>{var{defineProperty:B,getOwnPropertyDescriptor:Li,getOwnPropertyNames:zi}=Object,Mi=Object.prototype.hasOwnProperty,bi=(t,n)=>B(t,"name",{value:n,configurable:!0}),Ri=(t,n)=>{for(var e in n)B(t,e,{get:n[e],enumerable:!0})},Ui=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of zi(n))if(!Mi.call(t,r)&&r!==e)B(t,r,{get:()=>n[r],enumerable:!(i=Li(n,r))||i.enumerable})}return t},Di=(t)=>Ui(B({},"__esModule",{value:!0}),t),pt={};Ri(pt,{isArrayBuffer:()=>Ai});kt.exports=Di(pt);var Ai=bi((t)=>typeof ArrayBuffer==="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]","isArrayBuffer")});var V=g((sf,Pt)=>{var{defineProperty:p,getOwnPropertyDescriptor:Yi,getOwnPropertyNames:Wi}=Object,Zi=Object.prototype.hasOwnProperty,Ot=(t,n)=>p(t,"name",{value:n,configurable:!0}),Qi=(t,n)=>{for(var e in n)p(t,e,{get:n[e],enumerable:!0})},Ki=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of Wi(n))if(!Zi.call(t,r)&&r!==e)p(t,r,{get:()=>n[r],enumerable:!(i=Yi(n,r))||i.enumerable})}return t},Vi=(t)=>Ki(p({},"__esModule",{value:!0}),t),vt={};Qi(vt,{fromArrayBuffer:()=>Gi,fromString:()=>ji});Pt.exports=Vi(vt);var Xi=Ht(),ft=import.meta.require("buffer"),Gi=Ot((t,n=0,e=t.byteLength-n)=>{if(!Xi.isArrayBuffer(t))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof t} (${t})`);return ft.Buffer.from(t,n,e)},"fromArrayBuffer"),ji=Ot((t,n)=>{if(typeof t!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof t} (${t})`);return n?ft.Buffer.from(t,n):ft.Buffer.from(t)},"fromString")});var _t=g((mt)=>{Object.defineProperty(mt,"__esModule",{value:!0});mt.fromBase64=void 0;var Ji=V(),Bi=/^[A-Za-z0-9+/]*={0,2}$/,pi=(t)=>{if(t.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Bi.exec(t))throw new TypeError("Invalid base64 string.");let n=Ji.fromString(t,"base64");return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)};mt.fromBase64=pi});var H=g((ff,rn)=>{var{defineProperty:k,getOwnPropertyDescriptor:ki,getOwnPropertyNames:Hi}=Object,Oi=Object.prototype.hasOwnProperty,ht=(t,n)=>k(t,"name",{value:n,configurable:!0}),vi=(t,n)=>{for(var e in n)k(t,e,{get:n[e],enumerable:!0})},Pi=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of Hi(n))if(!Oi.call(t,r)&&r!==e)k(t,r,{get:()=>n[r],enumerable:!(i=ki(n,r))||i.enumerable})}return t},mi=(t)=>Pi(k({},"__esModule",{value:!0}),t),tn={};vi(tn,{fromUtf8:()=>en,toUint8Array:()=>qi,toUtf8:()=>_i});rn.exports=mi(tn);var nn=V(),en=ht((t)=>{let n=nn.fromString(t,"utf8");return new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),qi=ht((t)=>{if(typeof t==="string")return en(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(t)},"toUint8Array"),_i=ht((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 nn.fromArrayBuffer(t.buffer,t.byteOffset,t.byteLength).toString("utf8")},"toUtf8")});var fn=g((sn)=>{Object.defineProperty(sn,"__esModule",{value:!0});sn.toBase64=void 0;var tr=V(),nr=H(),er=(t)=>{let n;if(typeof t==="string")n=nr.fromUtf8(t);else n=t;if(typeof n!=="object"||typeof n.byteOffset!=="number"||typeof n.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return tr.fromArrayBuffer(n.buffer,n.byteOffset,n.byteLength).toString("base64")};sn.toBase64=er});var X=g((of,O)=>{var{defineProperty:hn,getOwnPropertyDescriptor:ir,getOwnPropertyNames:rr}=Object,sr=Object.prototype.hasOwnProperty,ot=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of rr(n))if(!sr.call(t,r)&&r!==e)hn(t,r,{get:()=>n[r],enumerable:!(i=ir(n,r))||i.enumerable})}return t},on=(t,n,e)=>(ot(t,n,"default"),e&&ot(e,n,"default")),cr=(t)=>ot(hn({},"__esModule",{value:!0}),t),dt={};O.exports=cr(dt);on(dt,_t(),O.exports);on(dt,fn(),O.exports)});var ln=g((dn)=>{Object.defineProperty(dn,"__esModule",{value:!0});dn.getAwsChunkedEncodingStream=void 0;var fr=import.meta.require("stream"),hr=(t,n)=>{let{base64Encoder:e,bodyLengthChecker:i,checksumAlgorithmFn:r,checksumLocationName:s,streamHasher:c}=n,f=e!==void 0&&r!==void 0&&s!==void 0&&c!==void 0,o=f?c(r,t):void 0,a=new fr.Readable({read:()=>{}});return t.on("data",(x)=>{let h=i(x)||0;a.push(`${h.toString(16)}\r\n`),a.push(x),a.push("\r\n")}),t.on("end",async()=>{if(a.push("0\r\n"),f){let x=e(await o);a.push(`${s}:${x}\r\n`),a.push("\r\n")}a.push(null)}),a};dn.getAwsChunkedEncodingStream=hr});var P=g((uf,gn)=>{var{defineProperty:v,getOwnPropertyDescriptor:or,getOwnPropertyNames:dr}=Object,ur=Object.prototype.hasOwnProperty,U=(t,n)=>v(t,"name",{value:n,configurable:!0}),lr=(t,n)=>{for(var e in n)v(t,e,{get:n[e],enumerable:!0})},ar=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of dr(n))if(!ur.call(t,r)&&r!==e)v(t,r,{get:()=>n[r],enumerable:!(i=or(n,r))||i.enumerable})}return t},wr=(t)=>ar(v({},"__esModule",{value:!0}),t),an={};lr(an,{Field:()=>Er,Fields:()=>xr,HttpRequest:()=>Tr,HttpResponse:()=>Cr,IHttpRequest:()=>wn.HttpRequest,getHttpHandlerExtensionConfiguration:()=>yr,isValidHostname:()=>Cn,resolveHttpHandlerRuntimeConfig:()=>$r});gn.exports=wr(an);var yr=U((t)=>{let n=t.httpHandler;return{setHttpHandler(e){n=e},httpHandler(){return n},updateHttpClientConfig(e,i){n.updateHttpClientConfig(e,i)},httpHandlerConfigs(){return n.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),$r=U((t)=>{return{httpHandler:t.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),wn=J(),yn=class t{constructor({name:n,kind:e=wn.FieldPosition.HEADER,values:i=[]}){this.name=n,this.kind=e,this.values=i}add(n){this.values.push(n)}set(n){this.values=n}remove(n){this.values=this.values.filter((e)=>e!==n)}toString(){return this.values.map((n)=>n.includes(",")||n.includes(" ")?`"${n}"`:n).join(", ")}get(){return this.values}};U(yn,"Field");var Er=yn,$n=class t{constructor({fields:n=[],encoding:e="utf-8"}){this.entries={},n.forEach(this.setField.bind(this)),this.encoding=e}setField(n){this.entries[n.name.toLowerCase()]=n}getField(n){return this.entries[n.toLowerCase()]}removeField(n){delete this.entries[n.toLowerCase()]}getByType(n){return Object.values(this.entries).filter((e)=>e.kind===n)}};U($n,"Fields");var xr=$n,En=class t{constructor(n){this.method=n.method||"GET",this.hostname=n.hostname||"localhost",this.port=n.port,this.query=n.query||{},this.headers=n.headers||{},this.body=n.body,this.protocol=n.protocol?n.protocol.slice(-1)!==":"?`${n.protocol}:`:n.protocol:"https:",this.path=n.path?n.path.charAt(0)!=="/"?`/${n.path}`:n.path:"/",this.username=n.username,this.password=n.password,this.fragment=n.fragment}static clone(n){let e=new t({...n,headers:{...n.headers}});if(e.query)e.query=xn(e.query);return e}static isInstance(n){if(!n)return!1;let e=n;return"method"in e&&"protocol"in e&&"hostname"in e&&"path"in e&&typeof e.query==="object"&&typeof e.headers==="object"}clone(){return t.clone(this)}};U(En,"HttpRequest");var Tr=En;function xn(t){return Object.keys(t).reduce((n,e)=>{let i=t[e];return{...n,[e]:Array.isArray(i)?[...i]:i}},{})}U(xn,"cloneQuery");var Tn=class t{constructor(n){this.statusCode=n.statusCode,this.reason=n.reason,this.headers=n.headers||{},this.body=n.body}static isInstance(n){if(!n)return!1;let e=n;return typeof e.statusCode==="number"&&typeof e.headers==="object"}};U(Tn,"HttpResponse");var Cr=Tn;function Cn(t){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(t)}U(Cn,"isValidHostname")});var lt=g((lf,In)=>{var{defineProperty:m,getOwnPropertyDescriptor:gr,getOwnPropertyNames:Sr}=Object,Fr=Object.prototype.hasOwnProperty,ut=(t,n)=>m(t,"name",{value:n,configurable:!0}),Ir=(t,n)=>{for(var e in n)m(t,e,{get:n[e],enumerable:!0})},Nr=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of Sr(n))if(!Fr.call(t,r)&&r!==e)m(t,r,{get:()=>n[r],enumerable:!(i=gr(n,r))||i.enumerable})}return t},Lr=(t)=>Nr(m({},"__esModule",{value:!0}),t),Sn={};Ir(Sn,{escapeUri:()=>Fn,escapeUriPath:()=>Mr});In.exports=Lr(Sn);var Fn=ut((t)=>encodeURIComponent(t).replace(/[!'()*]/g,zr),"escapeUri"),zr=ut((t)=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),Mr=ut((t)=>t.split("/").map(Fn).join("/"),"escapeUriPath")});var wt=g((af,zn)=>{var{defineProperty:q,getOwnPropertyDescriptor:br,getOwnPropertyNames:Rr}=Object,Ur=Object.prototype.hasOwnProperty,Dr=(t,n)=>q(t,"name",{value:n,configurable:!0}),Ar=(t,n)=>{for(var e in n)q(t,e,{get:n[e],enumerable:!0})},Yr=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of Rr(n))if(!Ur.call(t,r)&&r!==e)q(t,r,{get:()=>n[r],enumerable:!(i=br(n,r))||i.enumerable})}return t},Wr=(t)=>Yr(q({},"__esModule",{value:!0}),t),Nn={};Ar(Nn,{buildQueryString:()=>Ln});zn.exports=Wr(Nn);var at=lt();function Ln(t){let n=[];for(let e of Object.keys(t).sort()){let i=t[e];if(e=at.escapeUri(e),Array.isArray(i))for(let r=0,s=i.length;r<s;r++)n.push(`${e}=${at.escapeUri(i[r])}`);else{let r=e;if(i||typeof i==="string")r+=`=${at.escapeUri(i)}`;n.push(r)}}return n.join("&")}Dr(Ln,"buildQueryString")});var kn=g((wf,pn)=>{var{create:Zr,defineProperty:G,getOwnPropertyDescriptor:Qr,getOwnPropertyNames:Kr,getPrototypeOf:Vr}=Object,Xr=Object.prototype.hasOwnProperty,S=(t,n)=>G(t,"name",{value:n,configurable:!0}),Gr=(t,n)=>{for(var e in n)G(t,e,{get:n[e],enumerable:!0})},Dn=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of Kr(n))if(!Xr.call(t,r)&&r!==e)G(t,r,{get:()=>n[r],enumerable:!(i=Qr(n,r))||i.enumerable})}return t},jr=(t,n,e)=>(e=t!=null?Zr(Vr(t)):{},Dn(n||!t||!t.__esModule?G(e,"default",{value:t,enumerable:!0}):e,t)),Jr=(t)=>Dn(G({},"__esModule",{value:!0}),t),An={};Gr(An,{DEFAULT_REQUEST_TIMEOUT:()=>vr,NodeHttp2Handler:()=>ts,NodeHttpHandler:()=>Pr,streamCollector:()=>es});pn.exports=Jr(An);var Yn=P(),Wn=wt(),yt=import.meta.require("http"),$t=import.meta.require("https"),Br=["ECONNRESET","EPIPE","ETIMEDOUT"],Zn=S((t)=>{let n={};for(let e of Object.keys(t)){let i=t[e];n[e]=Array.isArray(i)?i.join(","):i}return n},"getTransformedHeaders"),Mn=1000,pr=S((t,n,e=0)=>{if(!e)return-1;let i=S((r)=>{let s=setTimeout(()=>{t.destroy(),n(Object.assign(new Error(`Socket timed out without establishing a connection within ${e} ms`),{name:"TimeoutError"}))},e-r),c=S((f)=>{if(f==null?void 0:f.connecting)f.on("connect",()=>{clearTimeout(s)});else clearTimeout(s)},"doWithSocket");if(t.socket)c(t.socket);else t.on("socket",c)},"registerTimeout");if(e<2000)return i(0),0;return setTimeout(i.bind(null,Mn),Mn)},"setConnectionTimeout"),kr=3000,Hr=S((t,{keepAlive:n,keepAliveMsecs:e},i=kr)=>{if(n!==!0)return-1;let r=S(()=>{if(t.socket)t.socket.setKeepAlive(n,e||0);else t.on("socket",(s)=>{s.setKeepAlive(n,e||0)})},"registerListener");if(i===0)return r(),0;return setTimeout(r,i)},"setSocketKeepAlive"),bn=3000,Or=S((t,n,e=0)=>{let i=S((r)=>{t.setTimeout(e-r,()=>{t.destroy(),n(Object.assign(new Error(`Connection timed out after ${e} ms`),{name:"TimeoutError"}))})},"registerTimeout");if(0<e&&e<6000)return i(0),0;return setTimeout(i.bind(null,e===0?0:bn),bn)},"setSocketTimeout"),Qn=import.meta.require("stream"),Rn=1000;async function Et(t,n,e=Rn){let i=n.headers??{},r=i.Expect||i.expect,s=-1,c=!1;if(r==="100-continue")await Promise.race([new Promise((f)=>{s=Number(setTimeout(f,Math.max(Rn,e)))}),new Promise((f)=>{t.on("continue",()=>{clearTimeout(s),f()}),t.on("error",()=>{c=!0,clearTimeout(s),f()})})]);if(!c)Kn(t,n.body)}S(Et,"writeRequestBody");function Kn(t,n){if(n instanceof Qn.Readable){n.pipe(t);return}if(n){if(Buffer.isBuffer(n)||typeof n==="string"){t.end(n);return}let e=n;if(typeof e==="object"&&e.buffer&&typeof e.byteOffset==="number"&&typeof e.byteLength==="number"){t.end(Buffer.from(e.buffer,e.byteOffset,e.byteLength));return}t.end(Buffer.from(n));return}t.end()}S(Kn,"writeBody");var vr=0,Vn=class t{constructor(n){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((e,i)=>{if(typeof n==="function")n().then((r)=>{e(this.resolveDefaultConfig(r))}).catch(i);else e(this.resolveDefaultConfig(n))})}static create(n){if(typeof(n==null?void 0:n.handle)==="function")return n;return new t(n)}static checkSocketUsage(n,e,i=console){var r,s,c;let{sockets:f,requests:o,maxSockets:a}=n;if(typeof a!=="number"||a===1/0)return e;let x=15000;if(Date.now()-x<e)return e;if(f&&o)for(let h in f){let u=((r=f[h])==null?void 0:r.length)??0,l=((s=o[h])==null?void 0:s.length)??0;if(u>=a&&l>=2*a)return(c=i==null?void 0:i.warn)==null||c.call(i,`@smithy/node-http-handler:WARN - socket usage at capacity=${u} 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}resolveDefaultConfig(n){let{requestTimeout:e,connectionTimeout:i,socketTimeout:r,httpAgent:s,httpsAgent:c}=n||{},f=!0,o=50;return{connectionTimeout:i,requestTimeout:e??r,httpAgent:(()=>{if(s instanceof yt.Agent||typeof(s==null?void 0:s.destroy)==="function")return s;return new yt.Agent({keepAlive:!0,maxSockets:50,...s})})(),httpsAgent:(()=>{if(c instanceof $t.Agent||typeof(c==null?void 0:c.destroy)==="function")return c;return new $t.Agent({keepAlive:!0,maxSockets:50,...c})})(),logger:console}}destroy(){var n,e,i,r;(e=(n=this.config)==null?void 0:n.httpAgent)==null||e.destroy(),(r=(i=this.config)==null?void 0:i.httpsAgent)==null||r.destroy()}async handle(n,{abortSignal:e}={}){if(!this.config)this.config=await this.configProvider;return new Promise((i,r)=>{let s=void 0,c=[],f=S(async(w)=>{await s,c.forEach(clearTimeout),i(w)},"resolve"),o=S(async(w)=>{await s,c.forEach(clearTimeout),r(w)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(e==null?void 0:e.aborted){let w=new Error("Request aborted");w.name="AbortError",o(w);return}let a=n.protocol==="https:",x=a?this.config.httpsAgent:this.config.httpAgent;c.push(setTimeout(()=>{this.socketWarningTimestamp=t.checkSocketUsage(x,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let h=Wn.buildQueryString(n.query||{}),u=void 0;if(n.username!=null||n.password!=null){let w=n.username??"",T=n.password??"";u=`${w}:${T}`}let l=n.path;if(h)l+=`?${h}`;if(n.fragment)l+=`#${n.fragment}`;let E=n.hostname??"";if(E[0]==="["&&E.endsWith("]"))E=n.hostname.slice(1,-1);else E=n.hostname;let C={headers:n.headers,host:E,method:n.method,path:l,port:n.port,agent:x,auth:u},$=(a?$t.request:yt.request)(C,(w)=>{let T=new Yn.HttpResponse({statusCode:w.statusCode||-1,reason:w.statusMessage,headers:Zn(w.headers),body:w});f({response:T})});if($.on("error",(w)=>{if(Br.includes(w.code))o(Object.assign(w,{name:"TimeoutError"}));else o(w)}),e){let w=S(()=>{$.destroy();let T=new Error("Request aborted");T.name="AbortError",o(T)},"onAbort");if(typeof e.addEventListener==="function"){let T=e;T.addEventListener("abort",w,{once:!0}),$.once("close",()=>T.removeEventListener("abort",w))}else e.onabort=w}c.push(pr($,o,this.config.connectionTimeout)),c.push(Or($,o,this.config.requestTimeout));let d=C.agent;if(typeof d==="object"&&"keepAlive"in d)c.push(Hr($,{keepAlive:d.keepAlive,keepAliveMsecs:d.keepAliveMsecs}));s=Et($,n,this.config.requestTimeout).catch((w)=>{return c.forEach(clearTimeout),r(w)})})}updateHttpClientConfig(n,e){this.config=void 0,this.configProvider=this.configProvider.then((i)=>{return{...i,[n]:e}})}httpHandlerConfigs(){return this.config??{}}};S(Vn,"NodeHttpHandler");var Pr=Vn,Un=import.meta.require("http2"),mr=jr(import.meta.require("http2")),Xn=class t{constructor(n){this.sessions=[],this.sessions=n??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(n){this.sessions.push(n)}contains(n){return this.sessions.includes(n)}remove(n){this.sessions=this.sessions.filter((e)=>e!==n)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(n){for(let e of this.sessions)if(e===n){if(!e.destroyed)e.destroy()}}};S(Xn,"NodeHttp2ConnectionPool");var qr=Xn,Gn=class t{constructor(n){if(this.sessionCache=new Map,this.config=n,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(n,e){let i=this.getUrlString(n),r=this.sessionCache.get(i);if(r){let o=r.poll();if(o&&!this.config.disableConcurrency)return o}let s=mr.default.connect(i);if(this.config.maxConcurrency)s.settings({maxConcurrentStreams:this.config.maxConcurrency},(o)=>{if(o)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+n.destination.toString())});s.unref();let c=S(()=>{s.destroy(),this.deleteSession(i,s)},"destroySessionCb");if(s.on("goaway",c),s.on("error",c),s.on("frameError",c),s.on("close",()=>this.deleteSession(i,s)),e.requestTimeout)s.setTimeout(e.requestTimeout,c);let f=this.sessionCache.get(i)||new qr;return f.offerLast(s),this.sessionCache.set(i,f),s}deleteSession(n,e){let i=this.sessionCache.get(n);if(!i)return;if(!i.contains(e))return;i.remove(e),this.sessionCache.set(n,i)}release(n,e){var i;let r=this.getUrlString(n);(i=this.sessionCache.get(r))==null||i.offerLast(e)}destroy(){for(let[n,e]of this.sessionCache){for(let i of e){if(!i.destroyed)i.destroy();e.remove(i)}this.sessionCache.delete(n)}}setMaxConcurrentStreams(n){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=n}setDisableConcurrentStreams(n){this.config.disableConcurrency=n}getUrlString(n){return n.destination.toString()}};S(Gn,"NodeHttp2ConnectionManager");var _r=Gn,jn=class t{constructor(n){this.metadata={handlerProtocol:"h2"},this.connectionManager=new _r({}),this.configProvider=new Promise((e,i)=>{if(typeof n==="function")n().then((r)=>{e(r||{})}).catch(i);else e(n||{})})}static create(n){if(typeof(n==null?void 0:n.handle)==="function")return n;return new t(n)}destroy(){this.connectionManager.destroy()}async handle(n,{abortSignal:e}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}let{requestTimeout:i,disableConcurrentStreams:r}=this.config;return new Promise((s,c)=>{var f;let o=!1,a=void 0,x=S(async(F)=>{await a,s(F)},"resolve"),h=S(async(F)=>{await a,c(F)},"reject");if(e==null?void 0:e.aborted){o=!0;let F=new Error("Request aborted");F.name="AbortError",h(F);return}let{hostname:u,method:l,port:E,protocol:C,query:y}=n,$="";if(n.username!=null||n.password!=null){let F=n.username??"",z=n.password??"";$=`${F}:${z}@`}let d=`${C}//${$}${u}${E?`:${E}`:""}`,w={destination:new URL(d)},T=this.connectionManager.lease(w,{requestTimeout:(f=this.config)==null?void 0:f.sessionTimeout,disableConcurrentStreams:r||!1}),I=S((F)=>{if(r)this.destroySession(T);o=!0,h(F)},"rejectWithDestroy"),L=Wn.buildQueryString(y||{}),ct=n.path;if(L)ct+=`?${L}`;if(n.fragment)ct+=`#${n.fragment}`;let N=T.request({...n.headers,[Un.constants.HTTP2_HEADER_PATH]:ct,[Un.constants.HTTP2_HEADER_METHOD]:l});if(T.ref(),N.on("response",(F)=>{let z=new Yn.HttpResponse({statusCode:F[":status"]||-1,headers:Zn(F),body:N});if(o=!0,x({response:z}),r)T.close(),this.connectionManager.deleteSession(d,T)}),i)N.setTimeout(i,()=>{N.close();let F=new Error(`Stream timed out because of no activity for ${i} ms`);F.name="TimeoutError",I(F)});if(e){let F=S(()=>{N.close();let z=new Error("Request aborted");z.name="AbortError",I(z)},"onAbort");if(typeof e.addEventListener==="function"){let z=e;z.addEventListener("abort",F,{once:!0}),N.once("close",()=>z.removeEventListener("abort",F))}else e.onabort=F}N.on("frameError",(F,z,Ii)=>{I(new Error(`Frame type id ${F} in stream id ${Ii} has failed with code ${z}.`))}),N.on("error",I),N.on("aborted",()=>{I(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${N.rstCode}.`))}),N.on("close",()=>{if(T.unref(),r)T.destroy();if(!o)I(new Error("Unexpected error: http2 request did not get a response"))}),a=Et(N,n,i)})}updateHttpClientConfig(n,e){this.config=void 0,this.configProvider=this.configProvider.then((i)=>{return{...i,[n]:e}})}httpHandlerConfigs(){return this.config??{}}destroySession(n){if(!n.destroyed)n.destroy()}};S(jn,"NodeHttp2Handler");var ts=jn,Jn=class t extends Qn.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(n,e,i){this.bufferedBytes.push(n),i()}};S(Jn,"Collector");var ns=Jn,es=S((t)=>{if(is(t))return Bn(t);return new Promise((n,e)=>{let i=new ns;t.pipe(i),t.on("error",(r)=>{i.end(),e(r)}),i.on("error",e),i.on("finish",function(){let r=new Uint8Array(Buffer.concat(this.bufferedBytes));n(r)})})},"streamCollector"),is=S((t)=>typeof ReadableStream==="function"&&t instanceof ReadableStream,"isReadableStreamInstance");async function Bn(t){let n=[],e=t.getReader(),i=!1,r=0;while(!i){let{done:f,value:o}=await e.read();if(o)n.push(o),r+=o.length;i=f}let s=new Uint8Array(r),c=0;for(let f of n)s.set(f,c),c+=f.length;return s}S(Bn,"collectReadableStream")});var _n=g((yf,qn)=>{var{defineProperty:tt,getOwnPropertyDescriptor:rs,getOwnPropertyNames:ss}=Object,cs=Object.prototype.hasOwnProperty,Y=(t,n)=>tt(t,"name",{value:n,configurable:!0}),fs=(t,n)=>{for(var e in n)tt(t,e,{get:n[e],enumerable:!0})},hs=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of ss(n))if(!cs.call(t,r)&&r!==e)tt(t,r,{get:()=>n[r],enumerable:!(i=rs(n,r))||i.enumerable})}return t},os=(t)=>hs(tt({},"__esModule",{value:!0}),t),On={};fs(On,{FetchHttpHandler:()=>us,keepAliveSupport:()=>_,streamCollector:()=>ls});qn.exports=os(On);var Hn=P(),ds=wt();function vn(t=0){return new Promise((n,e)=>{if(t)setTimeout(()=>{let i=new Error(`Request did not complete within ${t} ms`);i.name="TimeoutError",e(i)},t)})}Y(vn,"requestTimeout");var _={supported:void 0},Pn=class t{static create(n){if(typeof(n==null?void 0:n.handle)==="function")return n;return new t(n)}constructor(n){if(typeof n==="function")this.configProvider=n().then((e)=>e||{});else this.config=n??{},this.configProvider=Promise.resolve(this.config);if(_.supported===void 0)_.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(n,{abortSignal:e}={}){var i;if(!this.config)this.config=await this.configProvider;let r=this.config.requestTimeout,s=this.config.keepAlive===!0,c=this.config.credentials;if(e==null?void 0:e.aborted){let d=new Error("Request aborted");return d.name="AbortError",Promise.reject(d)}let f=n.path,o=ds.buildQueryString(n.query||{});if(o)f+=`?${o}`;if(n.fragment)f+=`#${n.fragment}`;let a="";if(n.username!=null||n.password!=null){let d=n.username??"",w=n.password??"";a=`${d}:${w}@`}let{port:x,method:h}=n,u=`${n.protocol}//${a}${n.hostname}${x?`:${x}`:""}${f}`,l=h==="GET"||h==="HEAD"?void 0:n.body,E={body:l,headers:new Headers(n.headers),method:h,credentials:c};if((i=this.config)==null?void 0:i.cache)E.cache=this.config.cache;if(l)E.duplex="half";if(typeof AbortController!=="undefined")E.signal=e;if(_.supported)E.keepalive=s;if(typeof this.config.requestInit==="function")Object.assign(E,this.config.requestInit(n));let C=Y(()=>{},"removeSignalEventListener"),y=new Request(u,E),$=[fetch(y).then((d)=>{let w=d.headers,T={};for(let L of w.entries())T[L[0]]=L[1];if(d.body==null)return d.blob().then((L)=>({response:new Hn.HttpResponse({headers:T,reason:d.statusText,statusCode:d.status,body:L})}));return{response:new Hn.HttpResponse({headers:T,reason:d.statusText,statusCode:d.status,body:d.body})}}),vn(r)];if(e)$.push(new Promise((d,w)=>{let T=Y(()=>{let I=new Error("Request aborted");I.name="AbortError",w(I)},"onAbort");if(typeof e.addEventListener==="function"){let I=e;I.addEventListener("abort",T,{once:!0}),C=Y(()=>I.removeEventListener("abort",T),"removeSignalEventListener")}else e.onabort=T}));return Promise.race($).finally(C)}updateHttpClientConfig(n,e){this.config=void 0,this.configProvider=this.configProvider.then((i)=>{return i[n]=e,i})}httpHandlerConfigs(){return this.config??{}}};Y(Pn,"FetchHttpHandler");var us=Pn,ls=Y(async(t)=>{if(typeof Blob==="function"&&t instanceof Blob)return new Uint8Array(await t.arrayBuffer());return mn(t)},"streamCollector");async function mn(t){let n=[],e=t.getReader(),i=!1,r=0;while(!i){let{done:f,value:o}=await e.read();if(o)n.push(o),r+=o.length;i=f}let s=new Uint8Array(r),c=0;for(let f of n)s.set(f,c),c+=f.length;return s}Y(mn,"collectStream")});var ce=g(($f,se)=>{var{defineProperty:nt,getOwnPropertyDescriptor:as,getOwnPropertyNames:ws}=Object,ys=Object.prototype.hasOwnProperty,te=(t,n)=>nt(t,"name",{value:n,configurable:!0}),$s=(t,n)=>{for(var e in n)nt(t,e,{get:n[e],enumerable:!0})},Es=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of ws(n))if(!ys.call(t,r)&&r!==e)nt(t,r,{get:()=>n[r],enumerable:!(i=as(n,r))||i.enumerable})}return t},xs=(t)=>Es(nt({},"__esModule",{value:!0}),t),ne={};$s(ne,{fromHex:()=>ie,toHex:()=>re});se.exports=xs(ne);var ee={},xt={};for(let t=0;t<256;t++){let n=t.toString(16).toLowerCase();if(n.length===1)n=`0${n}`;ee[t]=n,xt[n]=t}function ie(t){if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2){let i=t.slice(e,e+2).toLowerCase();if(i in xt)n[e/2]=xt[i];else throw new Error(`Cannot decode unrecognized sequence ${i} as hexadecimal`)}return n}te(ie,"fromHex");function re(t){let n="";for(let e=0;e<t.byteLength;e++)n+=ee[t[e]];return n}te(re,"toHex")});var W=g((fe)=>{Object.defineProperty(fe,"__esModule",{value:!0});fe.isReadableStream=void 0;var Ts=(t)=>{var n;return typeof ReadableStream==="function"&&(((n=t===null||t===void 0?void 0:t.constructor)===null||n===void 0?void 0:n.name)===ReadableStream.name||t instanceof ReadableStream)};fe.isReadableStream=Ts});var we=g((le)=>{Object.defineProperty(le,"__esModule",{value:!0});le.sdkStreamMixin=void 0;var Cs=_n(),gs=X(),Ss=ce(),Fs=H(),oe=W(),de="The stream has already been transformed.",Is=(t)=>{var n,e;if(!ue(t)&&!oe.isReadableStream(t)){let c=((e=(n=t===null||t===void 0?void 0:t.__proto__)===null||n===void 0?void 0:n.constructor)===null||e===void 0?void 0:e.name)||t;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${c}`)}let i=!1,r=async()=>{if(i)throw new Error(de);return i=!0,await Cs.streamCollector(t)},s=(c)=>{if(typeof c.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 c.stream()};return Object.assign(t,{transformToByteArray:r,transformToString:async(c)=>{let f=await r();if(c==="base64")return gs.toBase64(f);else if(c==="hex")return Ss.toHex(f);else if(c===void 0||c==="utf8"||c==="utf-8")return Fs.toUtf8(f);else if(typeof TextDecoder==="function")return new TextDecoder(c).decode(f);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(i)throw new Error(de);if(i=!0,ue(t))return s(t);else if(oe.isReadableStream(t))return t;else throw new Error(`Cannot transform payload to web stream, got ${t}`)}})};le.sdkStreamMixin=Is;var ue=(t)=>typeof Blob==="function"&&t instanceof Blob});var xe=g(($e)=>{Object.defineProperty($e,"__esModule",{value:!0});$e.sdkStreamMixin=void 0;var Ns=kn(),Ls=V(),Tt=import.meta.require("stream"),zs=import.meta.require("util"),Ms=we(),ye="The stream has already been transformed.",bs=(t)=>{var n,e;if(!(t instanceof Tt.Readable))try{return Ms.sdkStreamMixin(t)}catch(s){let c=((e=(n=t===null||t===void 0?void 0:t.__proto__)===null||n===void 0?void 0:n.constructor)===null||e===void 0?void 0:e.name)||t;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${c}`)}let i=!1,r=async()=>{if(i)throw new Error(ye);return i=!0,await Ns.streamCollector(t)};return Object.assign(t,{transformToByteArray:r,transformToString:async(s)=>{let c=await r();if(s===void 0||Buffer.isEncoding(s))return Ls.fromArrayBuffer(c.buffer,c.byteOffset,c.byteLength).toString(s);else return new zs.TextDecoder(s).decode(c)},transformToWebStream:()=>{if(i)throw new Error(ye);if(t.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof Tt.Readable.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 i=!0,Tt.Readable.toWeb(t)}})};$e.sdkStreamMixin=bs});var ge=g((Te)=>{Object.defineProperty(Te,"__esModule",{value:!0});Te.splitStream=void 0;async function Rs(t){if(typeof t.stream==="function")t=t.stream();return t.tee()}Te.splitStream=Rs});var Ne=g((Fe)=>{Object.defineProperty(Fe,"__esModule",{value:!0});Fe.splitStream=void 0;var Se=import.meta.require("stream"),Us=ge(),Ds=W();async function As(t){if(Ds.isReadableStream(t))return Us.splitStream(t);let n=new Se.PassThrough,e=new Se.PassThrough;return t.pipe(n),t.pipe(e),[n,e]}Fe.splitStream=As});var Me=g((Le)=>{Object.defineProperty(Le,"__esModule",{value:!0});Le.headStream=void 0;async function Ys(t,n){var e;let i=0,r=[],s=t.getReader(),c=!1;while(!c){let{done:a,value:x}=await s.read();if(x)r.push(x),i+=(e=x===null||x===void 0?void 0:x.byteLength)!==null&&e!==void 0?e:0;if(i>=n)break;c=a}s.releaseLock();let f=new Uint8Array(Math.min(n,i)),o=0;for(let a of r){if(a.byteLength>f.byteLength-o){f.set(a.subarray(0,f.byteLength-o),o);break}else f.set(a,o);o+=a.length}return f}Le.headStream=Ys});var De=g((Re)=>{Object.defineProperty(Re,"__esModule",{value:!0});Re.headStream=void 0;var Ws=import.meta.require("stream"),Zs=Me(),Qs=W(),Ks=(t,n)=>{if(Qs.isReadableStream(t))return Zs.headStream(t,n);return new Promise((e,i)=>{let r=new be;r.limit=n,t.pipe(r),t.on("error",(s)=>{r.end(),i(s)}),r.on("error",i),r.on("finish",function(){let s=new Uint8Array(Buffer.concat(this.buffers));e(s)})})};Re.headStream=Ks;class be extends Ws.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(t,n,e){var i;if(this.buffers.push(t),this.bytesBuffered+=(i=t.byteLength)!==null&&i!==void 0?i:0,this.bytesBuffered>=this.limit){let r=this.bytesBuffered-this.limit,s=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=s.subarray(0,s.byteLength-r),this.emit("finish")}e()}}});var Ct=g((Ye)=>{Object.defineProperty(Ye,"__esModule",{value:!0});Ye.ChecksumStream=void 0;var Vs=X(),Xs=import.meta.require("stream");class Ae extends Xs.Duplex{constructor({expectedChecksum:t,checksum:n,source:e,checksumSourceLocation:i,base64Encoder:r}){var s,c;super();if(typeof e.pipe==="function")this.source=e;else throw new Error(`@smithy/util-stream: unsupported source type ${(c=(s=e===null||e===void 0?void 0:e.constructor)===null||s===void 0?void 0:s.name)!==null&&c!==void 0?c:e} in ChecksumStream.`);this.base64Encoder=r!==null&&r!==void 0?r:Vs.toBase64,this.expectedChecksum=t,this.checksum=n,this.checksumSourceLocation=i,this.source.pipe(this)}_read(t){}_write(t,n,e){try{this.checksum.update(t),this.push(t)}catch(i){return e(i)}return e()}async _final(t){try{let n=await this.checksum.digest(),e=this.base64Encoder(n);if(this.expectedChecksum!==e)return t(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${e}" in response header "${this.checksumSourceLocation}".`))}catch(n){return t(n)}return this.push(null),t()}}Ye.ChecksumStream=Ae});var Ve=g((Qe)=>{Object.defineProperty(Qe,"__esModule",{value:!0});Qe.ChecksumStream=void 0;var Gs=typeof ReadableStream==="function"?ReadableStream:function(){};class Ze extends Gs{}Qe.ChecksumStream=Ze});var je=g((Xe)=>{Object.defineProperty(Xe,"__esModule",{value:!0});Xe.createChecksumStream=void 0;var js=X(),Js=W(),Bs=Ve(),ps=({expectedChecksum:t,checksum:n,source:e,checksumSourceLocation:i,base64Encoder:r})=>{var s,c;if(!Js.isReadableStream(e))throw new Error(`@smithy/util-stream: unsupported source type ${(c=(s=e===null||e===void 0?void 0:e.constructor)===null||s===void 0?void 0:s.name)!==null&&c!==void 0?c:e} in ChecksumStream.`);let f=r!==null&&r!==void 0?r:js.toBase64;if(typeof TransformStream!=="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let o=new TransformStream({start(){},async transform(x,h){n.update(x),h.enqueue(x)},async flush(x){let h=await n.digest(),u=f(h);if(t!==u){let l=new Error(`Checksum mismatch: expected "${t}" but received "${u}" in response header "${i}".`);x.error(l)}else x.terminate()}});e.pipeThrough(o);let a=o.readable;return Object.setPrototypeOf(a,Bs.ChecksumStream.prototype),a};Xe.createChecksumStream=ps});var pe=g((Je)=>{Object.defineProperty(Je,"__esModule",{value:!0});Je.createChecksumStream=void 0;var ks=W(),Hs=Ct(),Os=je();function vs(t){if(typeof ReadableStream==="function"&&ks.isReadableStream(t.source))return Os.createChecksumStream(t);return new Hs.ChecksumStream(t)}Je.createChecksumStream=vs});var me=g((Mf,b)=>{var{defineProperty:et,getOwnPropertyDescriptor:Ps,getOwnPropertyNames:ms}=Object,qs=Object.prototype.hasOwnProperty,Ft=(t,n)=>et(t,"name",{value:n,configurable:!0}),_s=(t,n)=>{for(var e in n)et(t,e,{get:n[e],enumerable:!0})},gt=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of ms(n))if(!qs.call(t,r)&&r!==e)et(t,r,{get:()=>n[r],enumerable:!(i=Ps(n,r))||i.enumerable})}return t},Z=(t,n,e)=>(gt(t,n,"default"),e&>(e,n,"default")),tc=(t)=>gt(et({},"__esModule",{value:!0}),t),M={};_s(M,{Uint8ArrayBlobAdapter:()=>St});b.exports=tc(M);var ke=X(),He=H();function Oe(t,n="utf-8"){if(n==="base64")return ke.toBase64(t);return He.toUtf8(t)}Ft(Oe,"transformToString");function ve(t,n){if(n==="base64")return St.mutate(ke.fromBase64(t));return St.mutate(He.fromUtf8(t))}Ft(ve,"transformFromString");var Pe=class t extends Uint8Array{static fromString(n,e="utf-8"){switch(typeof n){case"string":return ve(n,e);default:throw new Error(`Unsupported conversion from ${typeof n} to Uint8ArrayBlobAdapter.`)}}static mutate(n){return Object.setPrototypeOf(n,t.prototype),n}transformToString(n="utf-8"){return Oe(this,n)}};Ft(Pe,"Uint8ArrayBlobAdapter");var St=Pe;Z(M,ln(),b.exports);Z(M,xe(),b.exports);Z(M,Ne(),b.exports);Z(M,De(),b.exports);Z(M,W(),b.exports);Z(M,pe(),b.exports);Z(M,Ct(),b.exports)});var j=g((bf,ti)=>{var{defineProperty:Lt,getOwnPropertyDescriptor:nc,getOwnPropertyNames:ec}=Object,ic=Object.prototype.hasOwnProperty,rc=(t,n)=>{for(var e in n)Lt(t,e,{get:n[e],enumerable:!0})},sc=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of ec(n))if(!ic.call(t,r)&&r!==e)Lt(t,r,{get:()=>n[r],enumerable:!(i=nc(n,r))||i.enumerable})}return t},cc=(t)=>sc(Lt({},"__esModule",{value:!0}),t),qe={};rc(qe,{RequestBuilder:()=>_e,collectBody:()=>fc,extendedEncodeURIComponent:()=>Nt,requestBuilder:()=>dc,resolvedPath:()=>uc});ti.exports=cc(qe);var It=me(),fc=async(t=new Uint8Array,n)=>{if(t instanceof Uint8Array)return It.Uint8ArrayBlobAdapter.mutate(t);if(!t)return It.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let e=n.streamCollector(t);return It.Uint8ArrayBlobAdapter.mutate(await e)};function Nt(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()})}var hc=j(),oc=P();function dc(t,n){return new _e(t,n)}var _e=class{constructor(t,n){this.input=t,this.context=n,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:t,protocol:n="https",port:e,path:i}=await this.context.endpoint();this.path=i;for(let r of this.resolvePathStack)r(this.path);return new oc.HttpRequest({protocol:n,hostname:this.hostname||t,port:e,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(t){return this.hostname=t,this}bp(t){return this.resolvePathStack.push((n)=>{this.path=`${(n==null?void 0:n.endsWith("/"))?n.slice(0,-1):n||""}`+t}),this}p(t,n,e,i){return this.resolvePathStack.push((r)=>{this.path=hc.resolvedPath(r,this.input,t,n,e,i)}),this}h(t){return this.headers=t,this}q(t){return this.query=t,this}b(t){return this.body=t,this}m(t){return this.method=t,this}},uc=(t,n,e,i,r,s)=>{if(n!=null&&n[e]!==void 0){let c=i();if(c.length<=0)throw new Error("Empty value provided for input HTTP label: "+e+".");t=t.replace(r,s?c.split("/").map((f)=>Nt(f)).join("/"):Nt(c))}else throw new Error("No value provided for input HTTP label: "+e+".");return t}});var D=(t,n)=>{let e=[];if(t)e.push(t);if(n)for(let i of n)e.push(i);return e},R=(t,n)=>{return`${t||"anonymous"}${n&&n.length>0?` (a.k.a. ${n.join(",")})`:""}`},K=()=>{let t=[],n=[],e=!1,i=new Set,r=(h)=>h.sort((u,l)=>Kt[l.step]-Kt[u.step]||Vt[l.priority||"normal"]-Vt[u.priority||"normal"]),s=(h)=>{let u=!1,l=(E)=>{let C=D(E.name,E.aliases);if(C.includes(h)){u=!0;for(let y of C)i.delete(y);return!1}return!0};return t=t.filter(l),n=n.filter(l),u},c=(h)=>{let u=!1,l=(E)=>{if(E.middleware===h){u=!0;for(let C of D(E.name,E.aliases))i.delete(C);return!1}return!0};return t=t.filter(l),n=n.filter(l),u},f=(h)=>{return t.forEach((u)=>{h.add(u.middleware,{...u})}),n.forEach((u)=>{h.addRelativeTo(u.middleware,{...u})}),h.identifyOnResolve?.(x.identifyOnResolve()),h},o=(h)=>{let u=[];return h.before.forEach((l)=>{if(l.before.length===0&&l.after.length===0)u.push(l);else u.push(...o(l))}),u.push(h),h.after.reverse().forEach((l)=>{if(l.before.length===0&&l.after.length===0)u.push(l);else u.push(...o(l))}),u},a=(h=!1)=>{let u=[],l=[],E={};return t.forEach((y)=>{let $={...y,before:[],after:[]};for(let d of D($.name,$.aliases))E[d]=$;u.push($)}),n.forEach((y)=>{let $={...y,before:[],after:[]};for(let d of D($.name,$.aliases))E[d]=$;l.push($)}),l.forEach((y)=>{if(y.toMiddleware){let $=E[y.toMiddleware];if($===void 0){if(h)return;throw new Error(`${y.toMiddleware} is not found when adding ${R(y.name,y.aliases)} middleware ${y.relation} ${y.toMiddleware}`)}if(y.relation==="after")$.after.push(y);if(y.relation==="before")$.before.push(y)}}),r(u).map(o).reduce((y,$)=>{return y.push(...$),y},[])},x={add:(h,u={})=>{let{name:l,override:E,aliases:C}=u,y={step:"initialize",priority:"normal",middleware:h,...u},$=D(l,C);if($.length>0){if($.some((d)=>i.has(d))){if(!E)throw new Error(`Duplicate middleware name '${R(l,C)}'`);for(let d of $){let w=t.findIndex((I)=>I.name===d||I.aliases?.some((L)=>L===d));if(w===-1)continue;let T=t[w];if(T.step!==y.step||y.priority!==T.priority)throw new Error(`"${R(T.name,T.aliases)}" middleware with ${T.priority} priority in ${T.step} step cannot be overridden by "${R(l,C)}" middleware with ${y.priority} priority in ${y.step} step.`);t.splice(w,1)}}for(let d of $)i.add(d)}t.push(y)},addRelativeTo:(h,u)=>{let{name:l,override:E,aliases:C}=u,y={middleware:h,...u},$=D(l,C);if($.length>0){if($.some((d)=>i.has(d))){if(!E)throw new Error(`Duplicate middleware name '${R(l,C)}'`);for(let d of $){let w=n.findIndex((I)=>I.name===d||I.aliases?.some((L)=>L===d));if(w===-1)continue;let T=n[w];if(T.toMiddleware!==y.toMiddleware||T.relation!==y.relation)throw new Error(`"${R(T.name,T.aliases)}" middleware ${T.relation} "${T.toMiddleware}" middleware cannot be overridden by "${R(l,C)}" middleware ${y.relation} "${y.toMiddleware}" middleware.`);n.splice(w,1)}}for(let d of $)i.add(d)}n.push(y)},clone:()=>f(K()),use:(h)=>{h.applyToStack(x)},remove:(h)=>{if(typeof h==="string")return s(h);else return c(h)},removeByTag:(h)=>{let u=!1,l=(E)=>{let{tags:C,name:y,aliases:$}=E;if(C&&C.includes(h)){let d=D(y,$);for(let w of d)i.delete(w);return u=!0,!1}return!0};return t=t.filter(l),n=n.filter(l),u},concat:(h)=>{let u=f(K());return u.use(h),u.identifyOnResolve(e||u.identifyOnResolve()||(h.identifyOnResolve?.()??!1)),u},applyToStack:f,identify:()=>{return a(!0).map((h)=>{let u=h.step??h.relation+" "+h.toMiddleware;return R(h.name,h.aliases)+" - "+u})},identifyOnResolve(h){if(typeof h==="boolean")e=h;return e},resolve:(h,u)=>{for(let l of a().map((E)=>E.middleware).reverse())h=l(h,u);if(e)console.log(x.identify());return h}};return x},Kt={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Vt={high:3,normal:2,low:1};class Ni{constructor(t){this.config=t,this.middlewareStack=K()}send(t,n,e){let i=typeof n!=="function"?n:void 0,r=typeof n==="function"?n:e,s=i===void 0&&this.config.cacheMiddleware===!0,c;if(s){if(!this.handlers)this.handlers=new WeakMap;let f=this.handlers;if(f.has(t.constructor))c=f.get(t.constructor);else c=t.resolveMiddleware(this.middlewareStack,this.config,i),f.set(t.constructor,c)}else delete this.handlers,c=t.resolveMiddleware(this.middlewareStack,this.config,i);if(r)c(t).then((f)=>r(null,f.output),(f)=>r(f)).catch(()=>{});else return c(t).then((f)=>f.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var Xt=A(J(),1);class Gt{constructor(){this.middlewareStack=K()}static classBuilder(){return new jt}resolveMiddlewareWithContext(t,n,e,{middlewareFn:i,clientName:r,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:f,smithyContext:o,additionalContext:a,CommandCtor:x}){for(let C of i.bind(this)(x,t,n,e))this.middlewareStack.use(C);let h=t.concat(this.middlewareStack),{logger:u}=n,l={logger:u,clientName:r,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:f,[Xt.SMITHY_CONTEXT_KEY]:{commandInstance:this,...o},...a},{requestHandler:E}=n;return h.resolve((C)=>E.handle(C.request,e||{}),l)}}class jt{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,n,e={}){return this._smithyContext={service:t,operation:n,...e},this}c(t={}){return this._additionalContext=t,this}n(t,n){return this._clientName=t,this._commandName=n,this}f(t=(e)=>e,n=(e)=>e){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=n,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}build(){let t=this,n;return n=class extends Gt{static getEndpointParameterInstructions(){return t._ep}constructor(...[e]){super();this.serialize=t._serializer,this.deserialize=t._deserializer,this.input=e??{},t._init(this)}resolveMiddleware(e,i,r){return this.resolveMiddlewareWithContext(e,i,r,{CommandCtor:n,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog,outputFilterSensitiveLog:t._outputFilterSensitiveLog,smithyContext:t._smithyContext,additionalContext:t._additionalContext})}}}}var qc="***SensitiveInformation***";var tf=(t,n)=>{for(let e of Object.keys(t)){let i=t[e],r=async function(c,f,o){let a=new i(c);if(typeof f==="function")this.send(a,f);else if(typeof o==="function"){if(typeof f!=="object")throw new Error(`Expected http options but got ${typeof f}`);this.send(a,f||{},o)}else return this.send(a,f)},s=(e[0].toLowerCase()+e.slice(1)).replace(/Command$/,"");n.prototype[s]=r}};class Jt extends Error{constructor(t){super(t.message);Object.setPrototypeOf(this,Jt.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}}var Bt=(t,n={})=>{Object.entries(n).filter(([,i])=>i!==void 0).forEach(([i,r])=>{if(t[i]==null||t[i]==="")t[i]=r});let e=t.message||t.Message||"UnknownError";return t.message=e,delete t.Message,t};var lc=A(j(),1);var ac=(t)=>{if(t===null||t===void 0)return;if(typeof t==="string"){let n=parseFloat(t);if(!Number.isNaN(n)){if(String(n)!==String(t))hi.warn(fi(`Expected number but observed string: ${t}`));return n}}if(typeof t==="number")return t;throw new TypeError(`Expected number, got ${typeof t}: ${t}`)},wc=Math.ceil(340282346638528860000000000000000000000),ni=(t)=>{let n=ac(t);if(n!==void 0&&!Number.isNaN(n)&&n!==1/0&&n!==-1/0){if(Math.abs(n)>wc)throw new TypeError(`Expected 32-bit float, got ${t}`)}return n},yc=(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 ei=(t)=>zt(t,32),ii=(t)=>zt(t,16),ri=(t)=>zt(t,8),zt=(t,n)=>{let e=yc(t);if(e!==void 0&&$c(e,n)!==e)throw new TypeError(`Expected ${n}-bit integer, got ${t}`);return e},$c=(t,n)=>{switch(n){case 32:return Int32Array.of(t)[0];case 16:return Int16Array.of(t)[0];case 8:return Int8Array.of(t)[0]}},Df=(t,n)=>{if(t===null||t===void 0){if(n)throw new TypeError(`Expected a non-null value for ${n}`);throw new TypeError("Expected a non-null value")}return t},Af=(t)=>{if(t===null||t===void 0)return;if(typeof t==="object"&&!Array.isArray(t))return t;let n=Array.isArray(t)?"array":typeof t;throw new TypeError(`Expected object, got ${n}: ${t}`)},Yf=(t)=>{if(t===null||t===void 0)return;if(typeof t==="string")return t;if(["boolean","number","bigint"].includes(typeof t))return hi.warn(fi(`Expected string, got ${typeof t}: ${t}`)),String(t);throw new TypeError(`Expected string, got ${typeof t}: ${t}`)};var si=(t)=>{if(typeof t=="string")return ni(it(t));return ni(t)},Ec=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,it=(t)=>{let n=t.match(Ec);if(n===null||n[0].length!==t.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(t)};var Wf=(t)=>{if(typeof t==="string")return ei(it(t));return ei(t)},Mt=(t)=>{if(typeof t==="string")return ii(it(t));return ii(t)},ci=(t)=>{if(typeof t==="string")return ri(it(t));return ri(t)},fi=(t)=>{return String(new TypeError(t).stack||t).split("\n").slice(0,5).filter((n)=>!n.includes("stackTraceWarning")).join("\n")},hi={warn:console.warn};var xc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var Tc=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Vf=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let n=Tc.exec(t);if(!n)throw new TypeError("Invalid RFC-3339 date-time value");let[e,i,r,s,c,f,o,a]=n,x=Mt(bt(i)),h=Q(r,"month",1,12),u=Q(s,"day",1,31);return oi(x,h,u,{hours:c,minutes:f,seconds:o,fractionalMilliseconds:a})},Cc=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Xf=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let n=Cc.exec(t);if(!n)throw new TypeError("Invalid RFC-3339 date-time value");let[e,i,r,s,c,f,o,a,x]=n,h=Mt(bt(i)),u=Q(r,"month",1,12),l=Q(s,"day",1,31),E=oi(h,u,l,{hours:c,minutes:f,seconds:o,fractionalMilliseconds:a});if(x.toUpperCase()!="Z")E.setTime(E.getTime()-Nc(x));return E},Gf=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$/),jf=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$/),Jf=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})$/);var oi=(t,n,e,i)=>{let r=n-1;return Sc(t,r,e),new Date(Date.UTC(t,r,e,Q(i.hours,"hour",0,23),Q(i.minutes,"minute",0,59),Q(i.seconds,"seconds",0,60),Ic(i.fractionalMilliseconds)))};var gc=[31,28,31,30,31,30,31,31,30,31,30,31],Sc=(t,n,e)=>{let i=gc[n];if(n===1&&Fc(t))i=29;if(e>i)throw new TypeError(`Invalid day for ${xc[n]} in ${t}: ${e}`)},Fc=(t)=>{return t%4===0&&(t%100!==0||t%400===0)},Q=(t,n,e,i)=>{let r=ci(bt(t));if(r<e||r>i)throw new TypeError(`${n} must be between ${e} and ${i}, inclusive`);return r},Ic=(t)=>{if(t===null||t===void 0)return 0;return si("0."+t)*1000},Nc=(t)=>{let n=t[0],e=1;if(n=="+")e=1;else if(n=="-")e=-1;else throw new TypeError(`Offset direction, ${n}, must be "+" or "-"`);let i=Number(t.substring(1,3)),r=Number(t.substring(4,6));return e*(i*60+r)*60*1000},bt=(t)=>{let n=0;while(n<t.length-1&&t.charAt(n)==="0")n++;if(n===0)return t;return t.slice(n)};var Lc=({output:t,parsedBody:n,exceptionCtor:e,errorCode:i})=>{let r=zc(t),s=r.httpStatusCode?r.httpStatusCode+"":void 0,c=new e({name:n?.code||n?.Code||i||s||"UnknownError",$fault:"client",$metadata:r});throw Bt(c,n)},kf=(t)=>{return({output:n,parsedBody:e,errorCode:i})=>{Lc({output:n,parsedBody:e,exceptionCtor:t,errorCode:i})}},zc=(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 Of=(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 di=!1,Pf=(t)=>{if(t&&!di&&parseInt(t.substring(1,t.indexOf(".")))<16)di=!0};var Mc=A(j(),1);var Rt=A(J(),1);var ui=(t)=>{let n=[];for(let e in Rt.AlgorithmId){let i=Rt.AlgorithmId[e];if(t[i]===void 0)continue;n.push({algorithmId:()=>i,checksumConstructor:()=>t[i]})}return{_checksumAlgorithms:n,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},li=(t)=>{let n={};return t.checksumAlgorithms().forEach((e)=>{n[e.algorithmId()]=e.checksumConstructor()}),n};var ai=(t)=>{let n=t.retryStrategy;return{setRetryStrategy(e){n=e},retryStrategy(){return n}}},wi=(t)=>{let n={};return n.retryStrategy=t.retryStrategy(),n};var ih=(t)=>{return{...ui(t),...ai(t)}};var rh=(t)=>{return{...li(t),...wi(t)}};var hh=(t)=>Array.isArray(t)?t:[t];var uh=(t)=>{return t!=null};var Ut=function(){let t=Object.getPrototypeOf(this).constructor,e=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(e,t.prototype),e};Ut.prototype=Object.create(String.prototype,{constructor:{value:Ut,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(Ut,String);class bc{trace(){}debug(){}info(){}warn(){}error(){}}function Rc(t,n,e){let i,r,s;if(typeof n==="undefined"&&typeof e==="undefined")i={},s=t;else if(i=t,typeof n==="function")return r=n,s=e,Uc(i,r,s);else s=n;for(let c of Object.keys(s)){if(!Array.isArray(s[c])){i[c]=s[c];continue}yi(i,null,s,c)}return i}var yh=(t,n)=>{let e={};for(let i in n)yi(e,t,n,i);return e},Uc=(t,n,e)=>{return Rc(t,Object.entries(e).reduce((i,[r,s])=>{if(Array.isArray(s))i[r]=s;else if(typeof s==="function")i[r]=[n,s()];else i[r]=[n,s];return i},{}))},yi=(t,n,e,i)=>{if(n!==null){let c=e[i];if(typeof c==="function")c=[,c];let[f=Dc,o=Ac,a=i]=c;if(typeof f==="function"&&f(n[a])||typeof f!=="function"&&!!f)t[i]=o(n[a]);return}let[r,s]=e[i];if(typeof s==="function"){let c,f=r===void 0&&(c=s())!=null,o=typeof r==="function"&&!!r(void 0)||typeof r!=="function"&&!!r;if(f)t[i]=c;else if(o)t[i]=s()}else{let c=r===void 0&&s!=null,f=typeof r==="function"&&!!r(s)||typeof r!=="function"&&!!r;if(c||f)t[i]=s}},Dc=(t)=>t!=null,Ac=(t)=>t;var Yc=A(j(),1);var $i=(t)=>{if(t==null)return{};if(Array.isArray(t))return t.filter((n)=>n!=null).map($i);if(typeof t==="object"){let n={};for(let e of Object.keys(t)){if(t[e]==null)continue;n[e]=$i(t[e])}return n}return t};var vh=(t)=>{let n=t.httpHandler;return{setHttpHandler(e){n=e},httpHandler(){return n},updateHttpClientConfig(e,i){n.updateHttpClientConfig(e,i)},httpHandlerConfigs(){return n.httpHandlerConfigs()}}},Ph=(t)=>{return{httpHandler:t.httpHandler()}};var Wc=A(J(),1);class Dt{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){let n=new Dt({...t,headers:{...t.headers}});if(n.query)n.query=Zc(n.query);return n}static isInstance(t){if(!t)return!1;let n=t;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query==="object"&&typeof n.headers==="object"}clone(){return Dt.clone(this)}}function Zc(t){return Object.keys(t).reduce((n,e)=>{let i=t[e];return{...n,[e]:Array.isArray(i)?[...i]:i}},{})}class rt{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;let n=t;return typeof n.statusCode==="number"&&typeof n.headers==="object"}}var st=A(lt(),1);function At(t){let n=[];for(let e of Object.keys(t).sort()){let i=t[e];if(e=st.escapeUri(e),Array.isArray(i))for(let r=0,s=i.length;r<s;r++)n.push(`${e}=${st.escapeUri(i[r])}`);else{let r=e;if(i||typeof i==="string")r+=`=${st.escapeUri(i)}`;n.push(r)}}return n.join("&")}import{Agent as Si,request as Vc}from"http";import{Agent as Fi,request as Xc}from"https";var Ei=["ECONNRESET","EPIPE","ETIMEDOUT"];var Yt=(t)=>{let n={};for(let e of Object.keys(t)){let i=t[e];n[e]=Array.isArray(i)?i.join(","):i}return n};var xi=(t,n,e=0)=>{if(!e)return-1;let i=(r)=>{let s=setTimeout(()=>{t.destroy(),n(Object.assign(new Error(`Socket timed out without establishing a connection within ${e} ms`),{name:"TimeoutError"}))},e-r),c=(f)=>{if(f?.connecting)f.on("connect",()=>{clearTimeout(s)});else clearTimeout(s)};if(t.socket)c(t.socket);else t.on("socket",c)};if(e<2000)return i(0),0;return setTimeout(i.bind(null,1000),1000)};var Ti=(t,{keepAlive:n,keepAliveMsecs:e},i=3000)=>{if(n!==!0)return-1;let r=()=>{if(t.socket)t.socket.setKeepAlive(n,e||0);else t.on("socket",(s)=>{s.setKeepAlive(n,e||0)})};if(i===0)return r(),0;return setTimeout(r,i)};var Ci=(t,n,e=0)=>{let i=(r)=>{t.setTimeout(e-r,()=>{t.destroy(),n(Object.assign(new Error(`Connection timed out after ${e} ms`),{name:"TimeoutError"}))})};if(0<e&&e<6000)return i(0),0;return setTimeout(i.bind(null,e===0?0:3000),3000)};import{Readable as Qc}from"stream";var gi=1000;async function Wt(t,n,e=gi){let i=n.headers??{},r=i.Expect||i.expect,s=-1,c=!1;if(r==="100-continue")await Promise.race([new Promise((f)=>{s=Number(setTimeout(f,Math.max(gi,e)))}),new Promise((f)=>{t.on("continue",()=>{clearTimeout(s),f()}),t.on("error",()=>{c=!0,clearTimeout(s),f()})})]);if(!c)Kc(t,n.body)}function Kc(t,n){if(n instanceof Qc){n.pipe(t);return}if(n){if(Buffer.isBuffer(n)||typeof n==="string"){t.end(n);return}let e=n;if(typeof e==="object"&&e.buffer&&typeof e.byteOffset==="number"&&typeof e.byteLength==="number"){t.end(Buffer.from(e.buffer,e.byteOffset,e.byteLength));return}t.end(Buffer.from(n));return}t.end()}class Zt{static create(t){if(typeof t?.handle==="function")return t;return new Zt(t)}static checkSocketUsage(t,n,e=console){let{sockets:i,requests:r,maxSockets:s}=t;if(typeof s!=="number"||s===1/0)return n;let c=15000;if(Date.now()-c<n)return n;if(i&&r)for(let f in i){let o=i[f]?.length??0,a=r[f]?.length??0;if(o>=s&&a>=2*s)return e?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${o} and ${a} additional requests are enqueued.
|
|
4
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
5
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return n}constructor(t){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((n,e)=>{if(typeof t==="function")t().then((i)=>{n(this.resolveDefaultConfig(i))}).catch(e);else n(this.resolveDefaultConfig(t))})}resolveDefaultConfig(t){let{requestTimeout:n,connectionTimeout:e,socketTimeout:i,httpAgent:r,httpsAgent:s}=t||{},c=!0,f=50;return{connectionTimeout:e,requestTimeout:n??i,httpAgent:(()=>{if(r instanceof Si||typeof r?.destroy==="function")return r;return new Si({keepAlive:!0,maxSockets:50,...r})})(),httpsAgent:(()=>{if(s instanceof Fi||typeof s?.destroy==="function")return s;return new Fi({keepAlive:!0,maxSockets:50,...s})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(t,{abortSignal:n}={}){if(!this.config)this.config=await this.configProvider;return new Promise((e,i)=>{let r=void 0,s=[],c=async(d)=>{await r,s.forEach(clearTimeout),e(d)},f=async(d)=>{await r,s.forEach(clearTimeout),i(d)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(n?.aborted){let d=new Error("Request aborted");d.name="AbortError",f(d);return}let o=t.protocol==="https:",a=o?this.config.httpsAgent:this.config.httpAgent;s.push(setTimeout(()=>{this.socketWarningTimestamp=Zt.checkSocketUsage(a,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let x=At(t.query||{}),h=void 0;if(t.username!=null||t.password!=null){let d=t.username??"",w=t.password??"";h=`${d}:${w}`}let u=t.path;if(x)u+=`?${x}`;if(t.fragment)u+=`#${t.fragment}`;let l=t.hostname??"";if(l[0]==="["&&l.endsWith("]"))l=t.hostname.slice(1,-1);else l=t.hostname;let E={headers:t.headers,host:l,method:t.method,path:u,port:t.port,agent:a,auth:h},y=(o?Xc:Vc)(E,(d)=>{let w=new rt({statusCode:d.statusCode||-1,reason:d.statusMessage,headers:Yt(d.headers),body:d});c({response:w})});if(y.on("error",(d)=>{if(Ei.includes(d.code))f(Object.assign(d,{name:"TimeoutError"}));else f(d)}),n){let d=()=>{y.destroy();let w=new Error("Request aborted");w.name="AbortError",f(w)};if(typeof n.addEventListener==="function"){let w=n;w.addEventListener("abort",d,{once:!0}),y.once("close",()=>w.removeEventListener("abort",d))}else n.onabort=d}s.push(xi(y,f,this.config.connectionTimeout)),s.push(Ci(y,f,this.config.requestTimeout));let $=E.agent;if(typeof $==="object"&&"keepAlive"in $)s.push(Ti(y,{keepAlive:$.keepAlive,keepAliveMsecs:$.keepAliveMsecs}));r=Wt(y,t,this.config.requestTimeout).catch((d)=>{return s.forEach(clearTimeout),i(d)})})}updateHttpClientConfig(t,n){this.config=void 0,this.configProvider=this.configProvider.then((e)=>{return{...e,[t]:n}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as Gc}from"stream";class Qt extends Gc{constructor(){super(...arguments);this.bufferedBytes=[]}_write(t,n,e){this.bufferedBytes.push(t),e()}}var Oo=(t)=>{if(jc(t))return Jc(t);return new Promise((n,e)=>{let i=new Qt;t.pipe(i),t.on("error",(r)=>{i.end(),e(r)}),i.on("error",e),i.on("finish",function(){let r=new Uint8Array(Buffer.concat(this.bufferedBytes));n(r)})})},jc=(t)=>typeof ReadableStream==="function"&&t instanceof ReadableStream;async function Jc(t){let n=[],e=t.getReader(),i=!1,r=0;while(!i){let{done:f,value:o}=await e.read();if(o)n.push(o),r+=o.length;i=f}let s=new Uint8Array(r),c=0;for(let f of n)s.set(f,c),c+=f.length;return s}export{vh as ya,Ph as za,Dt as Aa,rt as Ba,P as Ca,Ht as Da,H as Ea,lt as Fa,ce as Ga,me as Ha,j as Ia,Ni as Ja,Gt as Ka,qc as La,tf as Ma,yc as Na,ei as Oa,Df as Pa,Af as Qa,Yf as Ra,Wf as Sa,Vf as Ta,Xf as Ua,Jt as Va,Bt as Wa,kf as Xa,Of as Ya,Pf as Za,Mc as _a,ih as $a,rh as ab,hh as bb,uh as cb,bc as db,Rc as eb,yh as fb,$i as gb,Zt as hb,Oo as ib};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{ta as z,ua as P}from"./chunk-4wb68jfr.js";import"./chunk-p18kqenr.js";import"./chunk-25nxsybw.js";import{ub as D}from"./chunk-08bm2xax.js";import{vb as _}from"./chunk-qqp394c2.js";var m=_(D(),1);import{parse as o}from"url";var K=_(D(),1);import{Buffer as a}from"buffer";import{request as n}from"http";function u(c){return new Promise((I,x)=>{let T=n({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new K.ProviderError("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new K.ProviderError("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{let{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new K.ProviderError("Error response received from instance metadata service"),{statusCode:O})),T.destroy();let E=[];N.on("data",(y)=>{E.push(y)}),N.on("end",()=>{I(a.concat(E)),T.destroy()})}),T.end()})}var G=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",Q=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var uc=1000,Ec=0,X=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var f=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var v="AWS_CONTAINER_CREDENTIALS_FULL_URI",L="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",B="AWS_CONTAINER_AUTHORIZATION_TOKEN",Kc=(c={})=>{let{timeout:I,maxRetries:x}=X(c);return()=>f(async()=>{let T=await d({logger:c.logger}),N=JSON.parse(await s(I,T));if(!G(N))throw new m.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:c.logger});return Q(N)},x)},s=async(c,I)=>{if(process.env[B])I.headers={...I.headers,Authorization:process.env[B]};return(await u({...I,timeout:c})).toString()},g="169.254.170.2",l={localhost:!0,"127.0.0.1":!0},r={"http:":!0,"https:":!0},d=async({logger:c})=>{if(process.env[L])return{hostname:g,path:process.env[L]};if(process.env[v]){let I=o(process.env[v]);if(!I.hostname||!(I.hostname in l))throw new m.CredentialsProviderError(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in r))throw new m.CredentialsProviderError(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new m.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${L} or ${v} environment variable is set`,{tryNextLink:!1,logger:c})};var q=_(D(),1);var U=_(D(),1);class Z extends U.CredentialsProviderError{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,Z.prototype)}}var A;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(A||(A={}));var t={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0};var S;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(S||(S={}));var e="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",i="ec2_metadata_service_endpoint_mode",F={environmentVariableSelector:(c)=>c[e],configFileSelector:(c)=>c[i],default:S.IPv4};var W=async()=>P(await cc()||await Ic()),cc=async()=>z(t)(),Ic=async()=>{let c=await z(F)();switch(c){case S.IPv4:return A.IPv4;case S.IPv6:return A.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(S)}`)}};var b=(c,I)=>{let x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(T)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var V=(c,I={})=>{let x=I?.logger||console,T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=b(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=b(T,x);else throw O}return T=N,N}};var k="/latest/meta-data/iam/security-credentials/",Tc="/latest/api/token",H="AWS_EC2_METADATA_V1_DISABLED",R="ec2_metadata_v1_disabled",M="x-aws-ec2-metadata-token",oc=(c={})=>V(Nc(c),{logger:c.logger}),Nc=(c={})=>{let I=!1,{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=X(c),E=async(y,$)=>{if(I||$.headers?.[M]==null){let w=!1,h=!1,C=await z({environmentVariableSelector:(Y)=>{let j=Y[H];if(h=!!j&&j!=="false",j===void 0)throw new q.CredentialsProviderError(`${H} not set in env, checking config file next.`,{logger:c.logger});return h},configFileSelector:(Y)=>{let j=Y[R];return w=!!j&&j!=="false",w},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||C){let Y=[];if(c.ec2MetadataV1Disabled)Y.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(w)Y.push(`config file profile (${R})`);if(h)Y.push(`process environment variable (${H})`);throw new Z(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Y.join(", ")}].`)}}let p=(await f(async()=>{let w;try{w=await Oc($)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)).trim();return f(async()=>{let w;try{w=await yc(p,$,c)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)};return async()=>{let y=await W();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(O,{...y,timeout:N});else{let $;try{$=(await xc({...y,timeout:N})).toString()}catch(J){if(J?.statusCode===400)throw Object.assign(J,{message:"EC2 Metadata token request returned error"});else if(J.message==="TimeoutError"||[403,404,405].includes(J.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(O,{...y,timeout:N})}return E(O,{...y,headers:{[M]:$},timeout:N})}}},xc=async(c)=>u({...c,path:Tc,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Oc=async(c)=>(await u({...c,path:k})).toString(),yc=async(c,I,x)=>{let T=JSON.parse((await u({...I,path:k+c})).toString());if(!G(T))throw new q.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:x.logger});return Q(T)};export{X as providerConfigFromInit,u as httpRequest,W as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,Kc as fromContainerMetadata,A as Endpoint,L as ENV_CMDS_RELATIVE_URI,v as ENV_CMDS_FULL_URI,B as ENV_CMDS_AUTH_TOKEN,uc as DEFAULT_TIMEOUT,Ec as DEFAULT_MAX_RETRIES};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{L as ge}from"./chunk-91pnyybg.js";import{$ as Ve,M as or,N as dr,O as yr,P as cr,Q as Zr,R as f,S as N,T as tr,U as $e,V as Ie,W as Re,X as Pe,Y as D,Z as ar,_ as Je,aa as We,ba as Ae,ca as mr,da as vr,ea as E,fa as wr,ga as Ke,ha as Me,ia as kr,ja as Be,ka as Sr,la as Ze,ma as fe,na as Fe,oa as De,pa as He,qa as Ne,ra as Ue,sa as qe,ta as _e,ua as lr,va as hr}from"./chunk-jg68fsnk.js";import{wa as $,xa as be}from"./chunk-b13gbfg3.js";import{$a as sr,Ja as Er,Ka as S,La as t,Ma as Br,Na as p,Oa as T,Pa as b,Qa as j,Ra as h,Va as $r,Wa as a,Xa as Fr,Ya as Le,Za as Qe,ab as ir,db as je,eb as y,fb as o,gb as I,hb as Xe,ib as Ye,ya as er,za as rr}from"./chunk-rfd43z7p.js";import"./chunk-8gx9at51.js";import"./chunk-6yazdvb4.js";import"./chunk-cm7bwdk9.js";import"./chunk-ha75r57f.js";import"./chunk-gg80s18j.js";import{xb as m}from"./chunk-d2dbhn2h.js";var R=m(N(),1);var re=m(D(),1),U=m(Zr(),1),se=async(e,s,r)=>{return{operation:U.getSmithyContext(s).operation,region:await U.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function fr(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}}function H(e){return{schemeId:"smithy.api#noAuth"}}var ie=(e)=>{let s=[];switch(e.operation){case"CreateToken":{s.push(H(e));break}case"RegisterClient":{s.push(H(e));break}case"StartDeviceAuthorization":{s.push(H(e));break}default:s.push(fr(e))}return s},le=(e)=>{return{...re.resolveAwsSdkSigV4Config(e)}};var he=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},k={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var ne={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.679.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","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-oidc"},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.679.0","@aws-sdk/credential-provider-node":"3.679.0","@aws-sdk/middleware-host-header":"3.679.0","@aws-sdk/middleware-logger":"3.679.0","@aws-sdk/middleware-recursion-detection":"3.679.0","@aws-sdk/middleware-user-agent":"3.679.0","@aws-sdk/region-config-resolver":"3.679.0","@aws-sdk/types":"3.679.0","@aws-sdk/util-endpoints":"3.679.0","@aws-sdk/util-user-agent-browser":"3.679.0","@aws-sdk/util-user-agent-node":"3.679.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/client-sts":"^3.679.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-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}};var pe=m(D(),1);var xe=m(D(),1),ze=m(N(),1);var oe={["required"]:!1,type:"String"},de={["required"]:!0,default:!1,type:"Boolean"},ye={["ref"]:"Endpoint"},we={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},ke={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},v={},ce={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Ee={["ref"]:"PartitionResult"},te={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Ee,"supportsDualStack"]}]},ae=[we],me=[ke],ve=[{["ref"]:"Region"}],Nr={version:"1.0",parameters:{Region:oe,UseDualStack:de,UseFIPS:de,Endpoint:oe},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ye]}],rules:[{conditions:ae,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:me,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ye,properties:v,headers:v},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ve}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ve,assign:"PartitionResult"}],rules:[{conditions:[we,ke],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,ce]},te],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:v,headers:v},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:ae,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[ce,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Ee,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:v,headers:v},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:v,headers:v},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:me,rules:[{conditions:[te],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:v,headers:v},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:v,headers:v},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},Se=Nr;var _r=new $e({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Te=(e,s={})=>{return _r.get(e,()=>Re(Se,{endpointParams:e,logger:s.logger}))};Ie.aws=Pe;var Ge=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Ue,base64Encoder:e?.base64Encoder??qe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Te,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ie,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new xe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ze.NoAuthSigner}],logger:e?.logger??new je,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??be,utf8Decoder:e?.utf8Decoder??Fe,utf8Encoder:e?.utf8Encoder??De}};var Ce=(e)=>{Qe(process.version);let s=_e(e),r=()=>s().then(Le),i=Ge(e);return pe.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Ne,credentialDefaultProvider:e?.credentialDefaultProvider??ge,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ze({serviceId:i.serviceId,clientVersion:ne.version}),maxAttempts:e?.maxAttempts??$(Me),region:e?.region??$(We,Ae),requestHandler:Xe.create(e?.requestHandler??r),retryMode:e?.retryMode??$({...Be,default:async()=>(await r()).retryMode||Ke}),sha256:e?.sha256??He.bind(null,"sha256"),streamCollector:e?.streamCollector??Ye,useDualstackEndpoint:e?.useDualstackEndpoint??$(Je),useFipsEndpoint:e?.useFipsEndpoint??$(Ve),userAgentAppId:e?.userAgentAppId??$(fe)}};var Oe=(e)=>{let{httpAuthSchemes:s,httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){let n=s.findIndex((P)=>P.schemeId===l.schemeId);if(n===-1)s.push(l);else s.splice(n,1,l)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(l){r=l},httpAuthSchemeProvider(){return r},setCredentials(l){i=l},credentials(){return i}}},ue=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var q=(e)=>e,nr=(e,s)=>{let r={...q(lr(e)),...q(sr(e)),...q(er(e)),...q(Oe(e))};return s.forEach((i)=>i.configure(r)),{...e,...hr(r),...ir(r),...rr(r),...ue(r)}};class _ extends Er{constructor(...[e]){let s=Ce(e||{}),r=he(s),i=tr(r),l=kr(i),n=mr(l),P=or(n),Qr=wr(P),Xr=le(Qr),ee=nr(Xr,e?.extensions||[]);super(ee);this.config=ee,this.middlewareStack.use(ar(this.config)),this.middlewareStack.use(Sr(this.config)),this.middlewareStack.use(vr(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(yr(this.config)),this.middlewareStack.use(cr(this.config)),this.middlewareStack.use(R.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:se,identityProviderConfigProvider:async(Yr)=>new R.DefaultIdentityProviderConfig({"aws.auth#sigv4":Yr.credentials})})),this.middlewareStack.use(R.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var Wr=m(f(),1);class d extends $r{constructor(e){super(e);Object.setPrototypeOf(this,d.prototype)}}class x extends d{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,x.prototype),this.error=e.error,this.error_description=e.error_description}}class z extends d{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends d{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends d{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends d{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends d{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends d{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends d{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends d{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends d{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}class L extends d{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description}}class Q extends d{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class X extends d{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}class Y extends d{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,Y.prototype),this.error=e.error,this.error_description=e.error_description}}var Ir=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),Rr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Pr=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Tr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),br=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),jr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var w=m(D(),1),F=m(N(),1);var Dr=async(e,s)=>{let r=F.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},Ur=async(e,s)=>{let r=F.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");let l=y({[cs]:[,"t"]}),n;return n=JSON.stringify(o(e,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(P)=>I(P),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(i).q(l).b(n),r.build()},qr=async(e,s)=>{let r=F.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/client/register");let l;return l=JSON.stringify(o(e,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(n)=>I(n),issuerUrl:[],redirectUris:(n)=>I(n),scopes:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},xr=async(e,s)=>{let r=F.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/device_authorization");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],startUrl:[]})),r.m("POST").h(i).b(l),r.build()},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);let r=y({$metadata:c(e)}),i=b(j(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:T,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);let r=y({$metadata:c(e)}),i=b(j(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:T,idToken:h,issuedTokenType:h,refreshToken:h,scope:I,tokenType:h});return Object.assign(r,l),r},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);let r=y({$metadata:c(e)}),i=b(j(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:p,clientSecret:h,clientSecretExpiresAt:p,tokenEndpoint:h});return Object.assign(r,l),r},Vr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);let r=y({$metadata:c(e)}),i=b(j(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:T,interval:T,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},Z=async(e,s)=>{let r={...e,body:await w.parseJsonErrorBody(e.body,s)},i=w.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Cr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await gr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Or(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await ur(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await es(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await ss(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await ls(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await ns(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await os(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await ds(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await ys(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await hs(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await rs(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await is(r,s);default:let l=r.body;return pr({output:e,parsedBody:l,errorCode:i})}},pr=Fr(d),Cr=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new x({$metadata:c(e),...r});return a(n,e.body)},gr=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new z({$metadata:c(e),...r});return a(n,e.body)},Or=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new G({$metadata:c(e),...r});return a(n,e.body)},ur=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new J({$metadata:c(e),...r});return a(n,e.body)},es=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new V({$metadata:c(e),...r});return a(n,e.body)},rs=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new X({$metadata:c(e),...r});return a(n,e.body)},ss=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new W({$metadata:c(e),...r});return a(n,e.body)},is=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new Y({$metadata:c(e),...r});return a(n,e.body)},ls=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new A({$metadata:c(e),...r});return a(n,e.body)},hs=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{endpoint:h,error:h,error_description:h,region:h});Object.assign(r,l);let n=new Q({$metadata:c(e),...r});return a(n,e.body)},ns=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new K({$metadata:c(e),...r});return a(n,e.body)},os=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new M({$metadata:c(e),...r});return a(n,e.body)},ds=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new B({$metadata:c(e),...r});return a(n,e.body)},ys=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new L({$metadata:c(e),...r});return a(n,e.body)},c=(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 cs="aws_iam";class C extends S.classBuilder().ep(k).m(function(e,s,r,i){return[Wr.getSerdePlugin(r,this.serialize,this.deserialize),E(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(Ir,Rr).ser(Dr).de(zr).build(){}var Ar=m(f(),1);class g extends S.classBuilder().ep(k).m(function(e,s,r,i){return[Ar.getSerdePlugin(r,this.serialize,this.deserialize),E(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Pr,Tr).ser(Ur).de(Gr).build(){}var Kr=m(f(),1);class O extends S.classBuilder().ep(k).m(function(e,s,r,i){return[Kr.getSerdePlugin(r,this.serialize,this.deserialize),E(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,br).ser(qr).de(Jr).build(){}var Mr=m(f(),1);class u extends S.classBuilder().ep(k).m(function(e,s,r,i){return[Mr.getSerdePlugin(r,this.serialize,this.deserialize),E(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(jr,void 0).ser(xr).de(Vr).build(){}var ts={CreateTokenCommand:C,CreateTokenWithIAMCommand:g,RegisterClientCommand:O,StartDeviceAuthorizationCommand:u};class Lr extends _{}Br(ts,Lr);export{Er as __Client,L as UnsupportedGrantTypeException,B as UnauthorizedClientException,jr as StartDeviceAuthorizationRequestFilterSensitiveLog,u as StartDeviceAuthorizationCommand,M as SlowDownException,d as SSOOIDCServiceException,_ as SSOOIDCClient,Lr as SSOOIDC,br as RegisterClientResponseFilterSensitiveLog,O as RegisterClientCommand,K as InvalidScopeException,Q as InvalidRequestRegionException,A as InvalidRequestException,Y as InvalidRedirectUriException,W as InvalidGrantException,X as InvalidClientMetadataException,V as InvalidClientException,J as InternalServerException,G as ExpiredTokenException,Tr as CreateTokenWithIAMResponseFilterSensitiveLog,Pr as CreateTokenWithIAMRequestFilterSensitiveLog,g as CreateTokenWithIAMCommand,Rr as CreateTokenResponseFilterSensitiveLog,Ir as CreateTokenRequestFilterSensitiveLog,C as CreateTokenCommand,z as AuthorizationPendingException,x as AccessDeniedException,S as $Command};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{wb as a}from"./chunk-hrsat16n.js";import{yb as c}from"./chunk-yktee4wv.js";import{Db as E}from"./chunk-yvmyw2r2.js";var N=E(a(),1);import{readFileSync as p}from"fs";var i=(e)=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:o,roleSessionName:r,webIdentityToken:s,providerId:n,policyArns:S,policy:d,durationSeconds:l}=e,{roleAssumerWithWebIdentity:t}=e;if(!t){let{getDefaultRoleAssumerWithWebIdentity:m}=await import("./chunk-06g79v9j.js");t=m({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:e.parentClientConfig},e.clientPlugins)}return t({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:s,ProviderId:n,PolicyArns:S,Policy:d,DurationSeconds:l})};var _="AWS_WEB_IDENTITY_TOKEN_FILE",T="AWS_ROLE_ARN",f="AWS_ROLE_SESSION_NAME",w=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let o=e?.webIdentityTokenFile??process.env[_],r=e?.roleArn??process.env[T],s=e?.roleSessionName??process.env[f];if(!o||!r)throw new c("Web identity configuration not specified",{logger:e.logger});let n=await i({...e,webIdentityToken:p(o,{encoding:"ascii"}),roleArn:r,roleSessionName:s})();if(o===process.env[_])N.setCredentialFeature(n,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return n};export{i as fromWebToken,w as fromTokenFile};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{L as Vh}from"./chunk-91pnyybg.js";import{$ as Ol,M as Q0,N as X0,O as Y0,P as Z0,Q as $w,R as b,S as $h,T as y0,U as Ml,V as Wl,W as Nl,X as Tl,Y as Gh,Z as F0,_ as Cl,aa as gl,ba as xl,ca as $0,da as V0,ea as E,fa as v0,ga as il,ha as cl,ia as U0,ja as el,ka as q0,la as tl,ma as h0,na as Rl,oa as al,pa as l0,qa as w0,ra as sl,sa as rl,ta as G0,ua as K0,va as B0}from"./chunk-jg68fsnk.js";import{wa as f,xa as jl}from"./chunk-b13gbfg3.js";import{$a as D0,Aa as R0,Ja as P0,Ka as Q,La as Sh,Ma as Dw,Pa as a0,Ra as S,Sa as u,Ua as s0,Va as z0,Wa as T,Xa as r0,Ya as pl,Za as ol,_a as nh,ab as k0,db as Ll,hb as nl,ib as ul,ya as m0,za as J0}from"./chunk-rfd43z7p.js";import"./chunk-8gx9at51.js";import"./chunk-6yazdvb4.js";import"./chunk-cm7bwdk9.js";import{vb as VG}from"./chunk-ha75r57f.js";import"./chunk-gg80s18j.js";import{xb as J}from"./chunk-d2dbhn2h.js";var O=J($h(),1);var Hl=J(Gh(),1),Ih=J($w(),1);var Sl=async(h,w,l)=>{return{operation:Ih.getSmithyContext(w).operation,region:await Ih.normalizeProvider(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function Vw(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(w,l)=>({signingProperties:{config:w,context:l}})}}function dl(h){return{schemeId:"smithy.api#noAuth"}}var ml=(h)=>{let w=[];switch(h.operation){case"AssumeRoleWithSAML":{w.push(dl(h));break}case"AssumeRoleWithWebIdentity":{w.push(dl(h));break}default:w.push(Vw(h))}return w},vw=(h)=>({...h,stsClientCtor:A}),Jl=(h)=>{let w=vw(h);return{...Hl.resolveAwsSdkSigV4Config(w)}};var Dl=(h)=>{return{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"}},k={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var kl={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.679.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"vitest run","test:watch":"vitest watch"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.679.0","@aws-sdk/core":"3.679.0","@aws-sdk/credential-provider-node":"3.679.0","@aws-sdk/middleware-host-header":"3.679.0","@aws-sdk/middleware-logger":"3.679.0","@aws-sdk/middleware-recursion-detection":"3.679.0","@aws-sdk/middleware-user-agent":"3.679.0","@aws-sdk/region-config-resolver":"3.679.0","@aws-sdk/types":"3.679.0","@aws-sdk/util-endpoints":"3.679.0","@aws-sdk/util-user-agent-browser":"3.679.0","@aws-sdk/util-user-agent-node":"3.679.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}};var dh=J(Gh(),1);var I0=J($h(),1);var _l=J(Gh(),1),bl=J($h(),1);var Kl={["required"]:!1,["type"]:"String"},Fh={["required"]:!0,default:!1,["type"]:"Boolean"},$l={["ref"]:"Endpoint"},Bl={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},D={["ref"]:"Region"},El={["fn"]:"aws.partition",["argv"]:[D],assign:"PartitionResult"},Vl={["ref"]:"UseFIPS"},vl={["ref"]:"UseDualStack"},K={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},F={},Ql={conditions:[{["fn"]:"stringEquals",["argv"]:[D,"aws-global"]}],["endpoint"]:K,["type"]:"endpoint"},Ul={["fn"]:"booleanEquals",["argv"]:[Vl,!0]},Pl={["fn"]:"booleanEquals",["argv"]:[vl,!0]},Xl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},ql={["ref"]:"PartitionResult"},Yl={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[ql,"supportsDualStack"]}]},Zl=[{["fn"]:"isSet",["argv"]:[$l]}],yl=[Ul],Fl=[Pl],Pw={version:"1.0",parameters:{Region:Kl,UseDualStack:Fh,UseFIPS:Fh,Endpoint:Kl,UseGlobalEndpoint:Fh},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:Zl},Bl,El,{["fn"]:"booleanEquals",["argv"]:[Vl,!1]},{["fn"]:"booleanEquals",["argv"]:[vl,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ap-northeast-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ap-south-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ap-southeast-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ap-southeast-2"]}],endpoint:K,["type"]:"endpoint"},Ql,{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ca-central-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-central-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-north-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-west-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-west-2"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-west-3"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"sa-east-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"us-east-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"us-east-2"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"us-west-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"us-west-2"]}],endpoint:K,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:F},["type"]:"endpoint"}],["type"]:"tree"},{conditions:Zl,rules:[{conditions:yl,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:Fl,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:$l,properties:F,headers:F},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[Bl],rules:[{conditions:[El],rules:[{conditions:[Ul,Pl],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Xl]},Yl],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:F,headers:F},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:yl,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Xl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[ql,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:F,headers:F},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:F,headers:F},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:Fl,rules:[{conditions:[Yl],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:F,headers:F},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},Ql,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:F,headers:F},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},zl=Pw;var qw=new Ml({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Al=(h,w={})=>{return qw.get(h,()=>Nl(zl,{endpointParams:h,logger:w.logger}))};Wl.aws=Tl;var fl=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??sl,base64Encoder:h?.base64Encoder??rl,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??Al,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??ml,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new _l.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new bl.NoAuthSigner}],logger:h?.logger??new Ll,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??jl,utf8Decoder:h?.utf8Decoder??Rl,utf8Encoder:h?.utf8Encoder??al}};var d0=(h)=>{ol(process.version);let w=G0(h),l=()=>w().then(pl),G=fl(h);return dh.emitWarningIfUnsupportedVersion(process.version),{...G,...h,runtime:"node",defaultsMode:w,bodyLengthChecker:h?.bodyLengthChecker??w0,credentialDefaultProvider:h?.credentialDefaultProvider??Vh,defaultUserAgentProvider:h?.defaultUserAgentProvider??tl({serviceId:G.serviceId,clientVersion:kl.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(I)=>I.getIdentityProvider("aws.auth#sigv4")||(async(H)=>await Vh(H?.__config||{})()),signer:new dh.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(I)=>I.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new I0.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(cl),region:h?.region??f(gl,xl),requestHandler:nl.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...el,default:async()=>(await l()).retryMode||il}),sha256:h?.sha256??l0.bind(null,"sha256"),streamCollector:h?.streamCollector??ul,useDualstackEndpoint:h?.useDualstackEndpoint??f(Cl),useFipsEndpoint:h?.useFipsEndpoint??f(Ol),userAgentAppId:h?.userAgentAppId??f(h0)}};var H0=(h)=>{let{httpAuthSchemes:w,httpAuthSchemeProvider:l,credentials:G}=h;return{setHttpAuthScheme(I){let H=w.findIndex((d)=>d.schemeId===I.schemeId);if(H===-1)w.push(I);else w.splice(H,1,I)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider(I){l=I},httpAuthSchemeProvider(){return l},setCredentials(I){G=I},credentials(){return G}}},S0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var Hh=(h)=>h,E0=(h,w)=>{let l={...Hh(K0(h)),...Hh(D0(h)),...Hh(m0(h)),...Hh(H0(h))};return w.forEach((G)=>G.configure(l)),{...h,...B0(l),...k0(l),...J0(l),...S0(l)}};class A extends P0{constructor(...[h]){let w=d0(h||{}),l=Dl(w),G=y0(l),I=U0(G),H=$0(I),d=Q0(H),X=v0(d),z=Jl(X),P=E0(z,h?.extensions||[]);super(P);this.config=P,this.middlewareStack.use(F0(this.config)),this.middlewareStack.use(q0(this.config)),this.middlewareStack.use(V0(this.config)),this.middlewareStack.use(X0(this.config)),this.middlewareStack.use(Y0(this.config)),this.middlewareStack.use(Z0(this.config)),this.middlewareStack.use(O.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Sl,identityProviderConfigProvider:async(C)=>new O.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(O.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var ww=J(b(),1);class y extends z0{constructor(h){super(h);Object.setPrototypeOf(this,y.prototype)}}class mh extends y{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,mh.prototype)}}class Jh extends y{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends y{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class kh extends y{constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,kh.prototype)}}class Kh extends y{constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,Kh.prototype)}}class Bh extends y{constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,Bh.prototype)}}class Eh extends y{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,Eh.prototype)}}class Qh extends y{constructor(h){super({name:"InvalidAuthorizationMessageException",$fault:"client",...h});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,Qh.prototype)}}var n=(h)=>({...h,...h.SecretAccessKey&&{SecretAccessKey:Sh}}),M0=(h)=>({...h,...h.Credentials&&{Credentials:n(h.Credentials)}}),W0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:Sh}}),N0=(h)=>({...h,...h.Credentials&&{Credentials:n(h.Credentials)}}),T0=(h)=>({...h,...h.WebIdentityToken&&{WebIdentityToken:Sh}}),A0=(h)=>({...h,...h.Credentials&&{Credentials:n(h.Credentials)}}),j0=(h)=>({...h,...h.Credentials&&{Credentials:n(h.Credentials)}}),L0=(h)=>({...h,...h.Credentials&&{Credentials:n(h.Credentials)}});var q=J(Gh(),1);var _0=async(h,w)=>{let l=R,G;return G=_({...Rw(h,w),[s]:KG,[r]:a}),L(w,l,"/",void 0,G)},b0=async(h,w)=>{let l=R,G;return G=_({...aw(h,w),[s]:BG,[r]:a}),L(w,l,"/",void 0,G)},f0=async(h,w)=>{let l=R,G;return G=_({...sw(h,w),[s]:EG,[r]:a}),L(w,l,"/",void 0,G)},C0=async(h,w)=>{let l=R,G;return G=_({...rw(h,w),[s]:QG,[r]:a}),L(w,l,"/",void 0,G)},O0=async(h,w)=>{let l=R,G;return G=_({..._w(h,w),[s]:XG,[r]:a}),L(w,l,"/",void 0,G)},g0=async(h,w)=>{let l=R,G;return G=_({...bw(h,w),[s]:YG,[r]:a}),L(w,l,"/",void 0,G)},x0=async(h,w)=>{let l=R,G;return G=_({...fw(h,w),[s]:ZG,[r]:a}),L(w,l,"/",void 0,G)},i0=async(h,w)=>{let l=R,G;return G=_({...Cw(h,w),[s]:yG,[r]:a}),L(w,l,"/",void 0,G)},c0=async(h,w)=>{if(h.statusCode>=300)return j(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=ew(l.AssumeRoleResult,w),{$metadata:B(h),...G}},e0=async(h,w)=>{if(h.statusCode>=300)return j(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=pw(l.AssumeRoleWithSAMLResult,w),{$metadata:B(h),...G}},p0=async(h,w)=>{if(h.statusCode>=300)return j(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=ow(l.AssumeRoleWithWebIdentityResult,w),{$metadata:B(h),...G}},o0=async(h,w)=>{if(h.statusCode>=300)return j(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=nw(l.DecodeAuthorizationMessageResult,w),{$metadata:B(h),...G}},n0=async(h,w)=>{if(h.statusCode>=300)return j(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=hG(l.GetAccessKeyInfoResult,w),{$metadata:B(h),...G}},u0=async(h,w)=>{if(h.statusCode>=300)return j(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=lG(l.GetCallerIdentityResult,w),{$metadata:B(h),...G}},t0=async(h,w)=>{if(h.statusCode>=300)return j(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=wG(l.GetFederationTokenResult,w),{$metadata:B(h),...G}},hw=async(h,w)=>{if(h.statusCode>=300)return j(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=GG(l.GetSessionTokenResult,w),{$metadata:B(h),...G}},j=async(h,w)=>{let l={...h,body:await q.parseXmlErrorBody(h.body,w)},G=FG(h,l.body);switch(G){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await zw(l,w);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Aw(l,w);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await jw(l,w);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Lw(l,w);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Ww(l,w);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Tw(l,w);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Mw(l,w);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Nw(l,w);default:let I=l.body;return kG({output:h,parsedBody:I.Error,errorCode:G})}},zw=async(h,w)=>{let l=h.body,G=uw(l.Error,w),I=new mh({$metadata:B(h),...G});return T(I,l)},Mw=async(h,w)=>{let l=h.body,G=IG(l.Error,w),I=new Eh({$metadata:B(h),...G});return T(I,l)},Ww=async(h,w)=>{let l=h.body,G=dG(l.Error,w),I=new Kh({$metadata:B(h),...G});return T(I,l)},Nw=async(h,w)=>{let l=h.body,G=HG(l.Error,w),I=new Qh({$metadata:B(h),...G});return T(I,l)},Tw=async(h,w)=>{let l=h.body,G=SG(l.Error,w),I=new Bh({$metadata:B(h),...G});return T(I,l)},Aw=async(h,w)=>{let l=h.body,G=mG(l.Error,w),I=new Jh({$metadata:B(h),...G});return T(I,l)},jw=async(h,w)=>{let l=h.body,G=JG(l.Error,w),I=new Dh({$metadata:B(h),...G});return T(I,l)},Lw=async(h,w)=>{let l=h.body,G=DG(l.Error,w),I=new kh({$metadata:B(h),...G});return T(I,l)},Rw=(h,w)=>{let l={};if(h[N]!=null)l[N]=h[N];if(h[c]!=null)l[c]=h[c];if(h[V]!=null){let G=Xh(h[V],w);if(h[V]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,H])=>{let d=`PolicyArns.${I}`;l[d]=H})}if(h[$]!=null)l[$]=h[$];if(h[Z]!=null)l[Z]=h[Z];if(h[p]!=null){let G=lw(h[p],w);if(h[p]?.length===0)l.Tags=[];Object.entries(G).forEach(([I,H])=>{let d=`Tags.${I}`;l[d]=H})}if(h[ih]!=null){let G=cw(h[ih],w);if(h[ih]?.length===0)l.TransitiveTagKeys=[];Object.entries(G).forEach(([I,H])=>{let d=`TransitiveTagKeys.${I}`;l[d]=H})}if(h[zh]!=null)l[zh]=h[zh];if(h[e]!=null)l[e]=h[e];if(h[o]!=null)l[o]=h[o];if(h[U]!=null)l[U]=h[U];if(h[sh]!=null){let G=xw(h[sh],w);if(h[sh]?.length===0)l.ProvidedContexts=[];Object.entries(G).forEach(([I,H])=>{let d=`ProvidedContexts.${I}`;l[d]=H})}return l},aw=(h,w)=>{let l={};if(h[N]!=null)l[N]=h[N];if(h[Rh]!=null)l[Rh]=h[Rh];if(h[Ch]!=null)l[Ch]=h[Ch];if(h[V]!=null){let G=Xh(h[V],w);if(h[V]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,H])=>{let d=`PolicyArns.${I}`;l[d]=H})}if(h[$]!=null)l[$]=h[$];if(h[Z]!=null)l[Z]=h[Z];return l},sw=(h,w)=>{let l={};if(h[N]!=null)l[N]=h[N];if(h[c]!=null)l[c]=h[c];if(h[ph]!=null)l[ph]=h[ph];if(h[rh]!=null)l[rh]=h[rh];if(h[V]!=null){let G=Xh(h[V],w);if(h[V]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,H])=>{let d=`PolicyArns.${I}`;l[d]=H})}if(h[$]!=null)l[$]=h[$];if(h[Z]!=null)l[Z]=h[Z];return l},rw=(h,w)=>{let l={};if(h[Mh]!=null)l[Mh]=h[Mh];return l},_w=(h,w)=>{let l={};if(h[g]!=null)l[g]=h[g];return l},bw=(h,w)=>{return{}},fw=(h,w)=>{let l={};if(h[jh]!=null)l[jh]=h[jh];if(h[$]!=null)l[$]=h[$];if(h[V]!=null){let G=Xh(h[V],w);if(h[V]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,H])=>{let d=`PolicyArns.${I}`;l[d]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[p]!=null){let G=lw(h[p],w);if(h[p]?.length===0)l.Tags=[];Object.entries(G).forEach(([I,H])=>{let d=`Tags.${I}`;l[d]=H})}return l},Cw=(h,w)=>{let l={};if(h[Z]!=null)l[Z]=h[Z];if(h[e]!=null)l[e]=h[e];if(h[o]!=null)l[o]=h[o];return l},Xh=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;let H=Ow(I,w);Object.entries(H).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},Ow=(h,w)=>{let l={};if(h[oh]!=null)l[oh]=h[oh];return l},gw=(h,w)=>{let l={};if(h[ah]!=null)l[ah]=h[ah];if(h[Uh]!=null)l[Uh]=h[Uh];return l},xw=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;let H=gw(I,w);Object.entries(H).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},iw=(h,w)=>{let l={};if(h[Ah]!=null)l[Ah]=h[Ah];if(h[eh]!=null)l[eh]=h[eh];return l},cw=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;l[`member.${G}`]=I,G++}return l},lw=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;let H=iw(I,w);Object.entries(H).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},uh=(h,w)=>{let l={};if(h[vh]!=null)l[vh]=S(h[vh]);if(h[W]!=null)l[W]=S(h[W]);return l},ew=(h,w)=>{let l={};if(h[Y]!=null)l[Y]=t(h[Y],w);if(h[M]!=null)l[M]=uh(h[M],w);if(h[v]!=null)l[v]=u(h[v]);if(h[U]!=null)l[U]=S(h[U]);return l},pw=(h,w)=>{let l={};if(h[Y]!=null)l[Y]=t(h[Y],w);if(h[M]!=null)l[M]=uh(h[M],w);if(h[v]!=null)l[v]=u(h[v]);if(h[bh]!=null)l[bh]=S(h[bh]);if(h[gh]!=null)l[gh]=S(h[gh]);if(h[Th]!=null)l[Th]=S(h[Th]);if(h[i]!=null)l[i]=S(h[i]);if(h[Lh]!=null)l[Lh]=S(h[Lh]);if(h[U]!=null)l[U]=S(h[U]);return l},ow=(h,w)=>{let l={};if(h[Y]!=null)l[Y]=t(h[Y],w);if(h[Oh]!=null)l[Oh]=S(h[Oh]);if(h[M]!=null)l[M]=uh(h[M],w);if(h[v]!=null)l[v]=u(h[v]);if(h[_h]!=null)l[_h]=S(h[_h]);if(h[i]!=null)l[i]=S(h[i]);if(h[U]!=null)l[U]=S(h[U]);return l},t=(h,w)=>{let l={};if(h[g]!=null)l[g]=S(h[g]);if(h[fh]!=null)l[fh]=S(h[fh]);if(h[xh]!=null)l[xh]=S(h[xh]);if(h[qh]!=null)l[qh]=a0(s0(h[qh]));return l},nw=(h,w)=>{let l={};if(h[Ph]!=null)l[Ph]=S(h[Ph]);return l},uw=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},tw=(h,w)=>{let l={};if(h[Nh]!=null)l[Nh]=S(h[Nh]);if(h[W]!=null)l[W]=S(h[W]);return l},hG=(h,w)=>{let l={};if(h[x]!=null)l[x]=S(h[x]);return l},lG=(h,w)=>{let l={};if(h[ch]!=null)l[ch]=S(h[ch]);if(h[x]!=null)l[x]=S(h[x]);if(h[W]!=null)l[W]=S(h[W]);return l},wG=(h,w)=>{let l={};if(h[Y]!=null)l[Y]=t(h[Y],w);if(h[Wh]!=null)l[Wh]=tw(h[Wh],w);if(h[v]!=null)l[v]=u(h[v]);return l},GG=(h,w)=>{let l={};if(h[Y]!=null)l[Y]=t(h[Y],w);return l},IG=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},dG=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},HG=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},SG=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},mG=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},JG=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},DG=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},B=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var kG=r0(y),L=async(h,w,l,G,I)=>{let{hostname:H,protocol:d="https",port:X,path:z}=await h.endpoint(),P={protocol:d,hostname:H,port:X,method:"POST",path:z.endsWith("/")?z.slice(0,-1)+l:z+l,headers:w};if(G!==void 0)P.hostname=G;if(I!==void 0)P.body=I;return new R0(P)},R={"content-type":"application/x-www-form-urlencoded"},a="2011-06-15",s="Action",g="AccessKeyId",KG="AssumeRole",vh="AssumedRoleId",M="AssumedRoleUser",BG="AssumeRoleWithSAML",EG="AssumeRoleWithWebIdentity",x="Account",W="Arn",i="Audience",Y="Credentials",Uh="ContextAssertion",QG="DecodeAuthorizationMessage",Ph="DecodedMessage",Z="DurationSeconds",qh="Expiration",zh="ExternalId",Mh="EncodedMessage",Wh="FederatedUser",Nh="FederatedUserId",XG="GetAccessKeyInfo",YG="GetCallerIdentity",ZG="GetFederationToken",yG="GetSessionToken",Th="Issuer",Ah="Key",jh="Name",Lh="NameQualifier",$="Policy",V="PolicyArns",Rh="PrincipalArn",ah="ProviderArn",sh="ProvidedContexts",rh="ProviderId",v="PackedPolicySize",_h="Provider",N="RoleArn",c="RoleSessionName",bh="Subject",fh="SecretAccessKey",Ch="SAMLAssertion",Oh="SubjectFromWebIdentityToken",U="SourceIdentity",e="SerialNumber",gh="SubjectType",xh="SessionToken",p="Tags",o="TokenCode",ih="TransitiveTagKeys",ch="UserId",r="Version",eh="Value",ph="WebIdentityToken",oh="arn",m="message",_=(h)=>Object.entries(h).map(([w,l])=>nh.extendedEncodeURIComponent(w)+"="+nh.extendedEncodeURIComponent(l)).join("&"),FG=(h,w)=>{if(w.Error?.Code!==void 0)return w.Error.Code;if(h.statusCode==404)return"NotFound"};class hh extends Q.classBuilder().ep(k).m(function(h,w,l,G){return[ww.getSerdePlugin(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,M0).ser(_0).de(c0).build(){}var Gw=J(b(),1);class th extends Q.classBuilder().ep(k).m(function(h,w,l,G){return[Gw.getSerdePlugin(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(W0,N0).ser(b0).de(e0).build(){}var Iw=J(b(),1);class lh extends Q.classBuilder().ep(k).m(function(h,w,l,G){return[Iw.getSerdePlugin(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(T0,A0).ser(f0).de(p0).build(){}var dw=J(b(),1);class hl extends Q.classBuilder().ep(k).m(function(h,w,l,G){return[dw.getSerdePlugin(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(C0).de(o0).build(){}var Hw=J(b(),1);class ll extends Q.classBuilder().ep(k).m(function(h,w,l,G){return[Hw.getSerdePlugin(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(O0).de(n0).build(){}var Sw=J(b(),1);class wl extends Q.classBuilder().ep(k).m(function(h,w,l,G){return[Sw.getSerdePlugin(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(g0).de(u0).build(){}var mw=J(b(),1);class Gl extends Q.classBuilder().ep(k).m(function(h,w,l,G){return[mw.getSerdePlugin(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,j0).ser(x0).de(t0).build(){}var Jw=J(b(),1);class Il extends Q.classBuilder().ep(k).m(function(h,w,l,G){return[Jw.getSerdePlugin(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,L0).ser(i0).de(hw).build(){}var $G={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:th,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:hl,GetAccessKeyInfoCommand:ll,GetCallerIdentityCommand:wl,GetFederationTokenCommand:Gl,GetSessionTokenCommand:Il};class kw extends A{}Dw($G,kw);var Yh=J(VG(),1);var Kw="us-east-1",Bw=(h)=>{if(typeof h?.Arn==="string"){let w=h.Arn.split(":");if(w.length>4&&w[4]!=="")return w[4]}return},Ew=async(h,w,l)=>{let G=typeof h==="function"?await h():h,I=typeof w==="function"?await w():w;return l?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${G} (provider)`,`${I} (parent client)`,`${Kw} (STS default)`),G??I??Kw},Qw=(h,w)=>{let l,G;return async(I,H)=>{if(G=I,!l){let{logger:C=h?.parentClientConfig?.logger,region:Zh,requestHandler:wh=h?.parentClientConfig?.requestHandler,credentialProviderLogger:yh}=h,yw=await Ew(Zh,h?.parentClientConfig?.region,yh),Fw=!Yw(wh);l=new w({credentialDefaultProvider:()=>async()=>G,region:yw,requestHandler:Fw?wh:void 0,logger:C})}let{Credentials:d,AssumedRoleUser:X}=await l.send(new hh(H));if(!d||!d.AccessKeyId||!d.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${H.RoleArn}`);let z=Bw(X),P={accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,sessionToken:d.SessionToken,expiration:d.Expiration,...d.CredentialScope&&{credentialScope:d.CredentialScope},...z&&{accountId:z}};return Yh.setCredentialFeature(P,"CREDENTIALS_STS_ASSUME_ROLE","i"),P}},Xw=(h,w)=>{let l;return async(G)=>{if(!l){let{logger:z=h?.parentClientConfig?.logger,region:P,requestHandler:C=h?.parentClientConfig?.requestHandler,credentialProviderLogger:Zh}=h,wh=await Ew(P,h?.parentClientConfig?.region,Zh),yh=!Yw(C);l=new w({region:wh,requestHandler:yh?C:void 0,logger:z})}let{Credentials:I,AssumedRoleUser:H}=await l.send(new lh(G));if(!I||!I.AccessKeyId||!I.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${G.RoleArn}`);let d=Bw(H),X={accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...d&&{accountId:d}};if(d)Yh.setCredentialFeature(X,"RESOLVED_ACCOUNT_ID","T");return Yh.setCredentialFeature(X,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),X}};var Yw=(h)=>{return h?.metadata?.handlerProtocol==="h2"};var Zw=(h,w)=>{if(!w)return h;else return class l extends h{constructor(G){super(G);for(let I of w)this.middlewareStack.use(I)}}},vG=(h={},w)=>Qw(h,Zw(A,w)),UG=(h={},w)=>Xw(h,Zw(A,w)),b3=(h)=>(w)=>h({roleAssumer:vG(w),roleAssumerWithWebIdentity:UG(w),...w});export{UG as getDefaultRoleAssumerWithWebIdentity,vG as getDefaultRoleAssumer,b3 as decorateDefaultCredentialProvider,P0 as __Client,y as STSServiceException,A as STSClient,kw as STS,kh as RegionDisabledException,Dh as PackedPolicyTooLargeException,Jh as MalformedPolicyDocumentException,Bh as InvalidIdentityTokenException,Qh as InvalidAuthorizationMessageException,Kh as IDPRejectedClaimException,Eh as IDPCommunicationErrorException,L0 as GetSessionTokenResponseFilterSensitiveLog,Il as GetSessionTokenCommand,j0 as GetFederationTokenResponseFilterSensitiveLog,Gl as GetFederationTokenCommand,wl as GetCallerIdentityCommand,ll as GetAccessKeyInfoCommand,mh as ExpiredTokenException,hl as DecodeAuthorizationMessageCommand,n as CredentialsFilterSensitiveLog,A0 as AssumeRoleWithWebIdentityResponseFilterSensitiveLog,T0 as AssumeRoleWithWebIdentityRequestFilterSensitiveLog,lh as AssumeRoleWithWebIdentityCommand,N0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,W0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,th as AssumeRoleWithSAMLCommand,M0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,Q as $Command};
|