@stacksjs/buddy 0.69.3 → 0.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/{chunk-222ak4f8.js → chunk-0wzn5tma.js} +1 -1
  2. package/dist/{chunk-dvp2gh5p.js → chunk-15sp93dn.js} +2 -2
  3. package/dist/{chunk-wvgaj0sz.js → chunk-18byef1w.js} +1 -1
  4. package/dist/{chunk-fmfrcaxp.js → chunk-1j4se9g6.js} +1 -1
  5. package/dist/chunk-21ynv2kp.js +5 -0
  6. package/dist/{chunk-rkpdhpd4.js → chunk-2az51wff.js} +1 -1
  7. package/dist/{chunk-pafhfx4f.js → chunk-2hfepv08.js} +2 -2
  8. package/dist/chunk-2mzt8mks.js +2 -0
  9. package/dist/chunk-38x86x4z.js +10 -0
  10. package/dist/{chunk-7t0kjmd9.js → chunk-3n3ay1vc.js} +1 -1
  11. package/dist/chunk-6v3bs3nq.js +2 -0
  12. package/dist/{chunk-pm84yb18.js → chunk-6wnzdvc6.js} +1 -1
  13. package/dist/{chunk-2wv7ydnj.js → chunk-atc0z327.js} +2 -2
  14. package/dist/{chunk-n2rrwvk3.js → chunk-eknt1w59.js} +1 -1
  15. package/dist/chunk-enfggzq6.js +2 -0
  16. package/dist/{chunk-fcxvht52.js → chunk-fbbvmxn3.js} +2 -2
  17. package/dist/chunk-gt8zekyh.js +3 -0
  18. package/dist/chunk-h3wmrbf0.js +4699 -0
  19. package/dist/{chunk-7s1btaqf.js → chunk-hrr9f8tw.js} +13 -13
  20. package/dist/{chunk-vxnj0ya8.js → chunk-j3596ccv.js} +1 -1
  21. package/dist/{chunk-jp1cpn4c.js → chunk-jm49r4wr.js} +1 -1
  22. package/dist/chunk-jx6tpg9f.js +10 -0
  23. package/dist/chunk-mwdfdvqk.js +55 -0
  24. package/dist/{chunk-e0czw2m2.js → chunk-p4sjnjkt.js} +1 -1
  25. package/dist/chunk-rkh5r5e6.js +35 -0
  26. package/dist/chunk-rt83e4sa.js +2 -0
  27. package/dist/{chunk-m6akavpb.js → chunk-z1gkssny.js} +1 -1
  28. package/dist/cli.js +1 -1
  29. package/dist/env.d.ts +20 -0
  30. package/dist/index.js +1 -1
  31. package/package.json +45 -45
  32. package/dist/chunk-5ey9ff1q.js +0 -10
  33. package/dist/chunk-a5w3fxvg.js +0 -1
  34. package/dist/chunk-axq3gfga.js +0 -10
  35. package/dist/chunk-ca4ny9cp.js +0 -2
  36. package/dist/chunk-e9y3crm2.js +0 -3
  37. package/dist/chunk-fd0n61sj.js +0 -61
  38. package/dist/chunk-fjy5503c.js +0 -5
  39. package/dist/chunk-qrzctsb0.js +0 -2
  40. package/dist/chunk-rz9avrxs.js +0 -5442
  41. package/dist/chunk-y9tafk6h.js +0 -29
@@ -1,5 +0,0 @@
1
- import{mc as Ze,qc as O}from"./chunk-5ey9ff1q.js";import{zc as P}from"./chunk-fcxvht52.js";import{Fc as C}from"./chunk-pm84yb18.js";var b=(e,t)=>{let r=[];if(e)r.push(e);if(t)for(let n of t)r.push(n);return r},S=(e,t)=>{return`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`},M=()=>{let e=[],t=[],r=!1,n=new Set,o=(c)=>c.sort((a,d)=>q[d.step]-q[a.step]||V[d.priority||"normal"]-V[a.priority||"normal"]),s=(c)=>{let a=!1,d=(m)=>{let g=b(m.name,m.aliases);if(g.includes(c)){a=!0;for(let l of g)n.delete(l);return!1}return!0};return e=e.filter(d),t=t.filter(d),a},f=(c)=>{let a=!1,d=(m)=>{if(m.middleware===c){a=!0;for(let g of b(m.name,m.aliases))n.delete(g);return!1}return!0};return e=e.filter(d),t=t.filter(d),a},i=(c)=>{return e.forEach((a)=>{c.add(a.middleware,{...a})}),t.forEach((a)=>{c.addRelativeTo(a.middleware,{...a})}),c.identifyOnResolve?.(E.identifyOnResolve()),c},p=(c)=>{let a=[];return c.before.forEach((d)=>{if(d.before.length===0&&d.after.length===0)a.push(d);else a.push(...p(d))}),a.push(c),c.after.reverse().forEach((d)=>{if(d.before.length===0&&d.after.length===0)a.push(d);else a.push(...p(d))}),a},x=(c=!1)=>{let a=[],d=[],m={};return e.forEach((l)=>{let h={...l,before:[],after:[]};for(let u of b(h.name,h.aliases))m[u]=h;a.push(h)}),t.forEach((l)=>{let h={...l,before:[],after:[]};for(let u of b(h.name,h.aliases))m[u]=h;d.push(h)}),d.forEach((l)=>{if(l.toMiddleware){let h=m[l.toMiddleware];if(h===void 0){if(c)return;throw new Error(`${l.toMiddleware} is not found when adding ${S(l.name,l.aliases)} middleware ${l.relation} ${l.toMiddleware}`)}if(l.relation==="after")h.after.push(l);if(l.relation==="before")h.before.push(l)}}),o(a).map(p).reduce((l,h)=>{return l.push(...h),l},[])},E={add:(c,a={})=>{let{name:d,override:m,aliases:g}=a,l={step:"initialize",priority:"normal",middleware:c,...a},h=b(d,g);if(h.length>0){if(h.some((u)=>n.has(u))){if(!m)throw new Error(`Duplicate middleware name '${S(d,g)}'`);for(let u of h){let y=e.findIndex((I)=>I.name===u||I.aliases?.some((F)=>F===u));if(y===-1)continue;let T=e[y];if(T.step!==l.step||l.priority!==T.priority)throw new Error(`"${S(T.name,T.aliases)}" middleware with ${T.priority} priority in ${T.step} step cannot be overridden by "${S(d,g)}" middleware with ${l.priority} priority in ${l.step} step.`);e.splice(y,1)}}for(let u of h)n.add(u)}e.push(l)},addRelativeTo:(c,a)=>{let{name:d,override:m,aliases:g}=a,l={middleware:c,...a},h=b(d,g);if(h.length>0){if(h.some((u)=>n.has(u))){if(!m)throw new Error(`Duplicate middleware name '${S(d,g)}'`);for(let u of h){let y=t.findIndex((I)=>I.name===u||I.aliases?.some((F)=>F===u));if(y===-1)continue;let T=t[y];if(T.toMiddleware!==l.toMiddleware||T.relation!==l.relation)throw new Error(`"${S(T.name,T.aliases)}" middleware ${T.relation} "${T.toMiddleware}" middleware cannot be overridden by "${S(d,g)}" middleware ${l.relation} "${l.toMiddleware}" middleware.`);t.splice(y,1)}}for(let u of h)n.add(u)}t.push(l)},clone:()=>i(M()),use:(c)=>{c.applyToStack(E)},remove:(c)=>{if(typeof c==="string")return s(c);else return f(c)},removeByTag:(c)=>{let a=!1,d=(m)=>{let{tags:g,name:l,aliases:h}=m;if(g&&g.includes(c)){let u=b(l,h);for(let y of u)n.delete(y);return a=!0,!1}return!0};return e=e.filter(d),t=t.filter(d),a},concat:(c)=>{let a=i(M());return a.use(c),a.identifyOnResolve(r||a.identifyOnResolve()||(c.identifyOnResolve?.()??!1)),a},applyToStack:i,identify:()=>{return x(!0).map((c)=>{let a=c.step??c.relation+" "+c.toMiddleware;return S(c.name,c.aliases)+" - "+a})},identifyOnResolve(c){if(typeof c==="boolean")r=c;return r},resolve:(c,a)=>{for(let d of x().map((m)=>m.middleware).reverse())c=d(c,a);if(r)console.log(E.identify());return c}};return E},q={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},V={high:3,normal:2,low:1};class Ce{constructor(e){this.config=e,this.middlewareStack=M()}send(e,t,r){let n=typeof t!=="function"?t:void 0,o=typeof t==="function"?t:r,s=n===void 0&&this.config.cacheMiddleware===!0,f;if(s){if(!this.handlers)this.handlers=new WeakMap;let i=this.handlers;if(i.has(e.constructor))f=i.get(e.constructor);else f=e.resolveMiddleware(this.middlewareStack,this.config,n),i.set(e.constructor,f)}else delete this.handlers,f=e.resolveMiddleware(this.middlewareStack,this.config,n);if(o)f(e).then((i)=>o(null,i.output),(i)=>o(i)).catch(()=>{});else return f(e).then((i)=>i.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var Q=C(P(),1);class G{constructor(){this.middlewareStack=M()}static classBuilder(){return new Z}resolveMiddlewareWithContext(e,t,r,{middlewareFn:n,clientName:o,commandName:s,inputFilterSensitiveLog:f,outputFilterSensitiveLog:i,smithyContext:p,additionalContext:x,CommandCtor:E}){for(let g of n.bind(this)(E,e,t,r))this.middlewareStack.use(g);let c=e.concat(this.middlewareStack),{logger:a}=t,d={logger:a,clientName:o,commandName:s,inputFilterSensitiveLog:f,outputFilterSensitiveLog:i,[Q.SMITHY_CONTEXT_KEY]:{commandInstance:this,...p},...x},{requestHandler:m}=t;return c.resolve((g)=>m.handle(g.request,r||{}),d)}}class Z{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(e)=>e,this._outputFilterSensitiveLog=(e)=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,r={}){return this._smithyContext={service:e,operation:t,...r},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=(r)=>r,t=(r)=>r){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){let e=this,t;return t=class extends G{static getEndpointParameterInstructions(){return e._ep}constructor(...[r]){super();this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=r??{},e._init(this)}resolveMiddleware(r,n,o){return this.resolveMiddlewareWithContext(r,n,o,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}var $e=C(O(),1);var mt="***SensitiveInformation***";var Me=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string"){let t=parseFloat(e);if(!Number.isNaN(t)){if(String(t)!==String(e))oe.warn(ne(`Expected number but observed string: ${e}`));return t}}if(typeof e==="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)},Ae=Math.ceil(340282346638528860000000000000000000000),X=(e)=>{let t=Me(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0){if(Math.abs(t)>Ae)throw new TypeError(`Expected 32-bit float, got ${e}`)}return t},Ie=(e)=>{if(e===null||e===void 0)return;if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)};var K=(e)=>D(e,32),v=(e)=>D(e,16),ee=(e)=>D(e,8),D=(e,t)=>{let r=Ie(e);if(r!==void 0&&Ne(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},Ne=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},yt=(e,t)=>{if(e===null||e===void 0){if(t)throw new TypeError(`Expected a non-null value for ${t}`);throw new TypeError("Expected a non-null value")}return e},wt=(e)=>{if(e===null||e===void 0)return;if(typeof e==="object"&&!Array.isArray(e))return e;let t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)},xt=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string")return e;if(["boolean","number","bigint"].includes(typeof e))return oe.warn(ne(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)};var te=(e)=>{if(typeof e=="string")return X(_(e));return X(e)},_e=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,_=(e)=>{let t=e.match(_e);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)};var Et=(e)=>{if(typeof e==="string")return K(_(e));return K(e)},U=(e)=>{if(typeof e==="string")return v(_(e));return v(e)},re=(e)=>{if(typeof e==="string")return ee(_(e));return ee(e)},ne=(e)=>{return String(new TypeError(e).stack||e).split(`
2
- `).slice(0,5).filter((t)=>!t.includes("stackTraceWarning")).join(`
3
- `)},oe={warn:console.warn};var ke=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var Re=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Ct=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=Re.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,o,s,f,i,p,x]=t,E=U(L(n)),c=$(o,"month",1,12),a=$(s,"day",1,31);return se(E,c,a,{hours:f,minutes:i,seconds:p,fractionalMilliseconds:x})},Fe=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),$t=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=Fe.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,o,s,f,i,p,x,E]=t,c=U(L(n)),a=$(o,"month",1,12),d=$(s,"day",1,31),m=se(c,a,d,{hours:f,minutes:i,seconds:p,fractionalMilliseconds:x});if(E.toUpperCase()!="Z")m.setTime(m.getTime()-Le(E));return m},Mt=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$/),At=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$/),It=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 se=(e,t,r,n)=>{let o=t-1;return Oe(e,o,r),new Date(Date.UTC(e,o,r,$(n.hours,"hour",0,23),$(n.minutes,"minute",0,59),$(n.seconds,"seconds",0,60),Ue(n.fractionalMilliseconds)))};var Pe=[31,28,31,30,31,30,31,31,30,31,30,31],Oe=(e,t,r)=>{let n=Pe[t];if(t===1&&De(e))n=29;if(r>n)throw new TypeError(`Invalid day for ${ke[t]} in ${e}: ${r}`)},De=(e)=>{return e%4===0&&(e%100!==0||e%400===0)},$=(e,t,r,n)=>{let o=re(L(e));if(o<r||o>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return o},Ue=(e)=>{if(e===null||e===void 0)return 0;return te("0."+e)*1000},Le=(e)=>{let t=e[0],r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);let n=Number(e.substring(1,3)),o=Number(e.substring(4,6));return r*(n*60+o)*60*1000},L=(e)=>{let t=0;while(t<e.length-1&&e.charAt(t)==="0")t++;if(t===0)return e;return e.slice(t)};class N extends Error{constructor(e){super(e.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;let t=e;return N.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&(t.$fault==="client"||t.$fault==="server")}static[Symbol.hasInstance](e){if(!e)return!1;let t=e;if(this===N)return N.isInstance(e);if(N.isInstance(e)){if(t.name&&this.name)return this.prototype.isPrototypeOf(e)||t.name===this.name;return this.prototype.isPrototypeOf(e)}return!1}}var ie=(e,t={})=>{Object.entries(t).filter(([,n])=>n!==void 0).forEach(([n,o])=>{if(e[n]==null||e[n]==="")e[n]=o});let r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e};var ze=({output:e,parsedBody:t,exceptionCtor:r,errorCode:n})=>{let o=He(e),s=o.httpStatusCode?o.httpStatusCode+"":void 0,f=new r({name:t?.code||t?.Code||n||s||"UnknownError",$fault:"client",$metadata:o});throw ie(f,t)},Rt=(e)=>{return({output:t,parsedBody:r,errorCode:n})=>{ze({output:t,parsedBody:r,exceptionCtor:e,errorCode:n})}},He=(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 Pt=(e)=>{switch(e){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 ce=!1,Dt=(e)=>{if(e&&!ce&&parseInt(e.substring(1,e.indexOf(".")))<16)ce=!0};var Be=C(O(),1);var z=C(P(),1);var ae=(e)=>{let t=[];for(let r in z.AlgorithmId){let n=z.AlgorithmId[r];if(e[n]===void 0)continue;t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},fe=(e)=>{let t={};return e.checksumAlgorithms().forEach((r)=>{t[r.algorithmId()]=r.checksumConstructor()}),t};var de=(e)=>{let t=e.retryStrategy;return{setRetryStrategy(r){t=r},retryStrategy(){return t}}},ue=(e)=>{let t={};return t.retryStrategy=e.retryStrategy(),t};var Jt=(e)=>{return{...ae(e),...de(e)}};var jt=(e)=>{return{...fe(e),...ue(e)}};var Qt=(e)=>Array.isArray(e)?e:[e];var Xt=(e)=>{return e!=null};var A=function e(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};A.from=(e)=>{if(e&&typeof e==="object"&&(e instanceof A||("deserializeJSON"in e)))return e;else if(typeof e==="string"||Object.getPrototypeOf(e)===String.prototype)return A(String(e));return A(JSON.stringify(e))};A.fromObject=A.from;class We{trace(){}debug(){}info(){}warn(){}error(){}}function Je(e,t,r){let n,o,s;if(typeof t==="undefined"&&typeof r==="undefined")n={},s=e;else if(n=e,typeof t==="function")return o=t,s=r,je(n,o,s);else s=t;for(let f of Object.keys(s)){if(!Array.isArray(s[f])){n[f]=s[f];continue}le(n,null,s,f)}return n}var tr=(e,t)=>{let r={};for(let n in t)le(r,e,t,n);return r},je=(e,t,r)=>{return Je(e,Object.entries(r).reduce((n,[o,s])=>{if(Array.isArray(s))n[o]=s;else if(typeof s==="function")n[o]=[t,s()];else n[o]=[t,s];return n},{}))},le=(e,t,r,n)=>{if(t!==null){let f=r[n];if(typeof f==="function")f=[,f];let[i=Ye,p=qe,x=n]=f;if(typeof i==="function"&&i(t[x])||typeof i!=="function"&&!!i)e[n]=p(t[x]);return}let[o,s]=r[n];if(typeof s==="function"){let f,i=o===void 0&&(f=s())!=null,p=typeof o==="function"&&!!o(void 0)||typeof o!=="function"&&!!o;if(i)e[n]=f;else if(p)e[n]=s()}else{let f=o===void 0&&s!=null,i=typeof o==="function"&&!!o(s)||typeof o!=="function"&&!!o;if(f||i)e[n]=s}},Ye=(e)=>e!=null,qe=(e)=>e;var Ve=C(O(),1);var he=(e)=>{if(e==null)return{};if(Array.isArray(e))return e.filter((t)=>t!=null).map(he);if(typeof e==="object"){let t={};for(let r of Object.keys(e)){if(e[r]==null)continue;t[r]=he(e[r])}return t}return e};var Or=(e)=>{let t=e.httpHandler;return{setHttpHandler(r){t=r},httpHandler(){return t},updateHttpClientConfig(r,n){t.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return t.httpHandlerConfigs()}}},Dr=(e)=>{return{httpHandler:e.httpHandler()}};var Qe=C(P(),1);class H{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){let t=new H({...e,headers:{...e.headers}});if(t.query)t.query=Ge(t.query);return t}static isInstance(e){if(!e)return!1;let t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query==="object"&&typeof t.headers==="object"}clone(){return H.clone(this)}}function Ge(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}class k{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;let t=e;return typeof t.statusCode==="number"&&typeof t.headers==="object"}}var R=C(Ze(),1);function B(e){let t=[];for(let r of Object.keys(e).sort()){let n=e[r];if(r=R.escapeUri(r),Array.isArray(n))for(let o=0,s=n.length;o<s;o++)t.push(`${r}=${R.escapeUri(n[o])}`);else{let o=r;if(n||typeof n==="string")o+=`=${R.escapeUri(n)}`;t.push(o)}}return t.join("&")}import{Agent as Se,request as et}from"http";import{Agent as be,request as tt}from"https";var me=["ECONNRESET","EPIPE","ETIMEDOUT"];var W=(e)=>{let t={};for(let r of Object.keys(e)){let n=e[r];t[r]=Array.isArray(n)?n.join(","):n}return t};var w={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:(e)=>clearTimeout(e)};var pe=1000,ge=(e,t,r=0)=>{if(!r)return-1;let n=(o)=>{let s=w.setTimeout(()=>{e.destroy(),t(Object.assign(new Error(`Socket timed out without establishing a connection within ${r} ms`),{name:"TimeoutError"}))},r-o),f=(i)=>{if(i?.connecting)i.on("connect",()=>{w.clearTimeout(s)});else w.clearTimeout(s)};if(e.socket)f(e.socket);else e.on("socket",f)};if(r<2000)return n(0),0;return w.setTimeout(n.bind(null,pe),pe)};var Xe=3000,ye=(e,{keepAlive:t,keepAliveMsecs:r},n=Xe)=>{if(t!==!0)return-1;let o=()=>{if(e.socket)e.socket.setKeepAlive(t,r||0);else e.on("socket",(s)=>{s.setKeepAlive(t,r||0)})};if(n===0)return o(),0;return w.setTimeout(o,n)};var we=3000,xe=(e,t,r=Ee)=>{let n=(o)=>{let s=r-o,f=()=>{e.destroy(),t(Object.assign(new Error(`Connection timed out after ${r} ms`),{name:"TimeoutError"}))};if(e.socket)e.socket.setTimeout(s,f);else e.setTimeout(s,f)};if(0<r&&r<6000)return n(0),0;return w.setTimeout(n.bind(null,r===0?0:we),we)};import{Readable as Ke}from"stream";var Te=6000;async function J(e,t,r=Te){let n=t.headers??{},o=n.Expect||n.expect,s=-1,f=!0;if(o==="100-continue")f=await Promise.race([new Promise((i)=>{s=Number(w.setTimeout(()=>i(!0),Math.max(Te,r)))}),new Promise((i)=>{e.on("continue",()=>{w.clearTimeout(s),i(!0)}),e.on("response",()=>{w.clearTimeout(s),i(!1)}),e.on("error",()=>{w.clearTimeout(s),i(!1)})})]);if(f)ve(e,t.body)}function ve(e,t){if(t instanceof Ke){t.pipe(e);return}if(t){if(Buffer.isBuffer(t)||typeof t==="string"){e.end(t);return}let r=t;if(typeof r==="object"&&r.buffer&&typeof r.byteOffset==="number"&&typeof r.byteLength==="number"){e.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}e.end(Buffer.from(t));return}e.end()}var Ee=0;class j{static create(e){if(typeof e?.handle==="function")return e;return new j(e)}static checkSocketUsage(e,t,r=console){let{sockets:n,requests:o,maxSockets:s}=e;if(typeof s!=="number"||s===1/0)return t;let f=15000;if(Date.now()-f<t)return t;if(n&&o)for(let i in n){let p=n[i]?.length??0,x=o[i]?.length??0;if(p>=s&&x>=2*s)return r?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${p} and ${x} 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 t}constructor(e){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((t,r)=>{if(typeof e==="function")e().then((n)=>{t(this.resolveDefaultConfig(n))}).catch(r);else t(this.resolveDefaultConfig(e))})}resolveDefaultConfig(e){let{requestTimeout:t,connectionTimeout:r,socketTimeout:n,httpAgent:o,httpsAgent:s}=e||{},f=!0,i=50;return{connectionTimeout:r,requestTimeout:t??n,httpAgent:(()=>{if(o instanceof Se||typeof o?.destroy==="function")return o;return new Se({keepAlive:!0,maxSockets:50,...o})})(),httpsAgent:(()=>{if(s instanceof be||typeof s?.destroy==="function")return s;return new be({keepAlive:!0,maxSockets:50,...s})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t}={}){if(!this.config)this.config=await this.configProvider;return new Promise((r,n)=>{let o=void 0,s=[],f=async(u)=>{await o,s.forEach(w.clearTimeout),r(u)},i=async(u)=>{await o,s.forEach(w.clearTimeout),n(u)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(t?.aborted){let u=new Error("Request aborted");u.name="AbortError",i(u);return}let p=e.protocol==="https:",x=p?this.config.httpsAgent:this.config.httpAgent;s.push(w.setTimeout(()=>{this.socketWarningTimestamp=j.checkSocketUsage(x,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let E=B(e.query||{}),c=void 0;if(e.username!=null||e.password!=null){let u=e.username??"",y=e.password??"";c=`${u}:${y}`}let a=e.path;if(E)a+=`?${E}`;if(e.fragment)a+=`#${e.fragment}`;let d=e.hostname??"";if(d[0]==="["&&d.endsWith("]"))d=e.hostname.slice(1,-1);else d=e.hostname;let m={headers:e.headers,host:d,method:e.method,path:a,port:e.port,agent:x,auth:c},l=(p?tt:et)(m,(u)=>{let y=new k({statusCode:u.statusCode||-1,reason:u.statusMessage,headers:W(u.headers),body:u});f({response:y})});if(l.on("error",(u)=>{if(me.includes(u.code))i(Object.assign(u,{name:"TimeoutError"}));else i(u)}),t){let u=()=>{l.destroy();let y=new Error("Request aborted");y.name="AbortError",i(y)};if(typeof t.addEventListener==="function"){let y=t;y.addEventListener("abort",u,{once:!0}),l.once("close",()=>y.removeEventListener("abort",u))}else t.onabort=u}s.push(ge(l,i,this.config.connectionTimeout)),s.push(xe(l,i,this.config.requestTimeout));let h=m.agent;if(typeof h==="object"&&"keepAlive"in h)s.push(ye(l,{keepAlive:h.keepAlive,keepAliveMsecs:h.keepAliveMsecs}));o=J(l,e,this.config.requestTimeout).catch((u)=>{return s.forEach(w.clearTimeout),n(u)})})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return{...r,[e]:t}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as rt}from"stream";class Y extends rt{constructor(){super(...arguments);this.bufferedBytes=[]}_write(e,t,r){this.bufferedBytes.push(e),r()}}var Bn=(e)=>{if(nt(e))return ot(e);return new Promise((t,r)=>{let n=new Y;e.pipe(n),e.on("error",(o)=>{n.end(),r(o)}),n.on("error",r),n.on("finish",function(){let o=new Uint8Array(Buffer.concat(this.bufferedBytes));t(o)})})},nt=(e)=>typeof ReadableStream==="function"&&e instanceof ReadableStream;async function ot(e){let t=[],r=e.getReader(),n=!1,o=0;while(!n){let{done:i,value:p}=await r.read();if(p)t.push(p),o+=p.length;n=i}let s=new Uint8Array(o),f=0;for(let i of t)s.set(i,f),f+=i.length;return s}export{Or as Ab,Dr as Bb,H as Cb,k as Db,Ce as Eb,G as Fb,mt as Gb,yt as Hb,wt as Ib,xt as Jb,Et as Kb,Ct as Lb,$t as Mb,N as Nb,ie as Ob,Rt as Pb,Pt as Qb,Dt as Rb,Jt as Sb,jt as Tb,Qt as Ub,Xt as Vb,We as Wb,Je as Xb,tr as Yb,he as Zb,j as _b,Bn as $b};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ba as nr,Ca as jr,Da as ar,Ea as Ir,Fa as vr,Ga as fr,Ha as Re,Ia as mr,Ja as wr,Ka as Rr,La as Ae,Ma as Cr,Na as Ee,Oa as Ar,Pa as Gr,Qa as Hr,Ra as Lr,Sa as Vr,Ta as Or}from"./chunk-e9y3crm2.js";import{ac as xe,bc as hr,cc as W,dc as kr,ec as E,fc as w}from"./chunk-7s1btaqf.js";import{hc as gr,kc as Sr,lc as Nr,nc as Tr}from"./chunk-5ey9ff1q.js";import"./chunk-fcxvht52.js";import"./chunk-2wv7ydnj.js";import"./chunk-pafhfx4f.js";import{Hc as d}from"./chunk-pm84yb18.js";var L=d((J)=>{Object.defineProperty(J,"__esModule",{value:!0});J.resolveHttpAuthSchemeConfig=J.defaultSSOOIDCHttpAuthSchemeProvider=J.defaultSSOOIDCHttpAuthSchemeParametersProvider=void 0;var ce=w(),z=xe(),oe=async(e,r,l)=>{return{operation:z.getSmithyContext(r).operation,region:await z.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};J.defaultSSOOIDCHttpAuthSchemeParametersProvider=oe;function ue(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(r,l)=>({signingProperties:{config:r,context:l}})}}function pe(e){return{schemeId:"smithy.api#noAuth"}}var te=(e)=>{let r=[];switch(e.operation){case"CreateToken":{r.push(pe(e));break}default:r.push(ue(e))}return r};J.defaultSSOOIDCHttpAuthSchemeProvider=te;var er=(e)=>{return{...ce.resolveAwsSdkSigV4Config(e)}};J.resolveHttpAuthSchemeConfig=er});var ee=d((p)=>{Object.defineProperty(p,"__esModule",{value:!0});p.ruleSet=void 0;var x="required",S="fn",N="argv",U="ref",Z=!0,$="isSet",k="booleanEquals",F="error",_="endpoint",s="tree",V="PartitionResult",b="getAttr",h={[x]:!1,type:"String"},g={[x]:!0,default:!1,type:"Boolean"},n={[U]:"Endpoint"},c={[S]:k,[N]:[{[U]:"UseFIPS"},!0]},o={[S]:k,[N]:[{[U]:"UseDualStack"},!0]},P={},j={[S]:b,[N]:[{[U]:V},"supportsFIPS"]},u={[U]:V},a={[S]:k,[N]:[!0,{[S]:b,[N]:[u,"supportsDualStack"]}]},f=[c],m=[o],O=[{[U]:"Region"}],ir={version:"1.0",parameters:{Region:h,UseDualStack:g,UseFIPS:g,Endpoint:h},rules:[{conditions:[{[S]:$,[N]:[n]}],rules:[{conditions:f,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:F},{conditions:m,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:F},{endpoint:{url:n,properties:P,headers:P},type:_}],type:s},{conditions:[{[S]:$,[N]:O}],rules:[{conditions:[{[S]:"aws.partition",[N]:O,assign:V}],rules:[{conditions:[c,o],rules:[{conditions:[{[S]:k,[N]:[Z,j]},a],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:P,headers:P},type:_}],type:s},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:F}],type:s},{conditions:f,rules:[{conditions:[{[S]:k,[N]:[j,Z]}],rules:[{conditions:[{[S]:"stringEquals",[N]:[{[S]:b,[N]:[u,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:P,headers:P},type:_},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:P,headers:P},type:_}],type:s},{error:"FIPS is enabled but this partition does not support FIPS",type:F}],type:s},{conditions:m,rules:[{conditions:[a],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:P,headers:P},type:_}],type:s},{error:"DualStack is enabled but this partition does not support DualStack",type:F}],type:s},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:P,headers:P},type:_}],type:s}],type:s},{error:"Invalid Configuration: Missing Region",type:F}]};p.ruleSet=ir});var ie=d((re)=>{Object.defineProperty(re,"__esModule",{value:!0});re.defaultEndpointResolver=void 0;var Dr=vr(),B=Ir(),qr=ee(),yr=new B.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Pr=(e,r={})=>{return yr.get(e,()=>B.resolveEndpoint(qr.ruleSet,{endpointParams:e,logger:r.logger}))};re.defaultEndpointResolver=Pr;B.customEndpointFunctions.aws=Dr.awsEndpointFunctions});var ye=d((De)=>{Object.defineProperty(De,"__esModule",{value:!0});De.getRuntimeConfig=void 0;var Er=w(),sr=W(),dr=E(),Fr=Rr(),Ie=Nr(),ve=Sr(),_r=L(),Ur=ie(),Mr=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Ie.fromBase64,base64Encoder:e?.base64Encoder??Ie.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ur.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??_r.defaultSSOOIDCHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(r)=>r.getIdentityProvider("aws.auth#sigv4"),signer:new Er.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(r)=>r.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new sr.NoAuthSigner}],logger:e?.logger??new dr.NoOpLogger,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??Fr.parseUrl,utf8Decoder:e?.utf8Decoder??ve.fromUtf8,utf8Encoder:e?.utf8Encoder??ve.toUtf8}};De.getRuntimeConfig=Mr});var Fe=d((se)=>{Object.defineProperty(se,"__esModule",{value:!0});se.getRuntimeConfig=void 0;var br=kr(),Br=br.__importDefault(Ar()),Wr=w(),Pe=Gr(),C=Re(),Yr=Hr(),Se=Ee(),M=wr(),Ne=Tr(),Kr=Lr(),Xr=Cr(),zr=ye(),Jr=E(),Qr=Vr(),Zr=E(),$r=(e)=>{Zr.emitWarningIfUnsupportedVersion(process.version);let r=Qr.resolveDefaultsModeConfig(e),l=()=>r().then(Jr.loadConfigsForDefaultMode),v=zr.getRuntimeConfig(e);Wr.emitWarningIfUnsupportedVersion(process.version);let I={profile:e?.profile};return{...v,...e,runtime:"node",defaultsMode:r,bodyLengthChecker:e?.bodyLengthChecker??Kr.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??Pe.createDefaultUserAgentProvider({serviceId:v.serviceId,clientVersion:Br.default.version}),maxAttempts:e?.maxAttempts??M.loadConfig(Se.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??M.loadConfig(C.NODE_REGION_CONFIG_OPTIONS,{...C.NODE_REGION_CONFIG_FILE_OPTIONS,...I}),requestHandler:Ne.NodeHttpHandler.create(e?.requestHandler??l),retryMode:e?.retryMode??M.loadConfig({...Se.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await l()).retryMode||Xr.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Yr.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??Ne.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??M.loadConfig(C.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,I),useFipsEndpoint:e?.useFipsEndpoint??M.loadConfig(C.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,I),userAgentAppId:e?.userAgentAppId??M.loadConfig(Pe.NODE_APP_ID_CONFIG_OPTIONS,I)}};se.getRuntimeConfig=$r});var Yl=d((Zl,ae)=>{var{defineProperty:G,getOwnPropertyDescriptor:xr,getOwnPropertyNames:cr}=Object,or=Object.prototype.hasOwnProperty,D=(e,r)=>G(e,"name",{value:r,configurable:!0}),ur=(e,r)=>{for(var l in r)G(e,l,{get:r[l],enumerable:!0})},pr=(e,r,l,v)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let I of cr(r))if(!or.call(e,I)&&I!==l)G(e,I,{get:()=>r[I],enumerable:!(v=xr(r,I))||v.enumerable})}return e},tr=(e)=>pr(G({},"__esModule",{value:!0}),e),Ge={};ur(Ge,{$Command:()=>Ve.Command,AccessDeniedException:()=>be,AuthorizationPendingException:()=>Be,CreateTokenCommand:()=>ne,CreateTokenRequestFilterSensitiveLog:()=>We,CreateTokenResponseFilterSensitiveLog:()=>Ye,ExpiredTokenException:()=>Ke,InternalServerException:()=>Xe,InvalidClientException:()=>ze,InvalidGrantException:()=>Je,InvalidRequestException:()=>Qe,InvalidScopeException:()=>Ze,SSOOIDC:()=>je,SSOOIDCClient:()=>Le,SSOOIDCServiceException:()=>y,SlowDownException:()=>$e,UnauthorizedClientException:()=>he,UnsupportedGrantTypeException:()=>ge,__Client:()=>He.Client});ae.exports=tr(Ge);var _e=nr(),el=jr(),rl=ar(),Ue=fr(),ll=Re(),Y=W(),il=mr(),Il=Ae(),Me=Ee(),He=E(),Te=L(),vl=D((e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},"resolveClientEndpointParameters"),Dl={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},ql=Fe(),ke=Or(),we=gr(),Ce=E(),yl=D((e)=>{let{httpAuthSchemes:r,httpAuthSchemeProvider:l,credentials:v}=e;return{setHttpAuthScheme(I){let q=r.findIndex((H)=>H.schemeId===I.schemeId);if(q===-1)r.push(I);else r.splice(q,1,I)},httpAuthSchemes(){return r},setHttpAuthSchemeProvider(I){l=I},httpAuthSchemeProvider(){return l},setCredentials(I){v=I},credentials(){return v}}},"getHttpAuthExtensionConfiguration"),Pl=D((e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}},"resolveHttpAuthRuntimeConfig"),A=D((e)=>e,"asPartial"),Sl=D((e,r)=>{let l={...A(ke.getAwsRegionExtensionConfiguration(e)),...A(Ce.getDefaultExtensionConfiguration(e)),...A(we.getHttpHandlerExtensionConfiguration(e)),...A(yl(e))};return r.forEach((v)=>v.configure(l)),{...e,...ke.resolveAwsRegionExtensionConfiguration(l),...Ce.resolveDefaultRuntimeConfig(l),...we.resolveHttpHandlerRuntimeConfig(l),...Pl(l)}},"resolveRuntimeExtensions"),Le=class extends He.Client{static{D(this,"SSOOIDCClient")}config;constructor(...[e]){let r=ql.getRuntimeConfig(e||{}),l=vl(r),v=Ue.resolveUserAgentConfig(l),I=Me.resolveRetryConfig(v),q=ll.resolveRegionConfig(I),H=_e.resolveHostHeaderConfig(q),fe=Il.resolveEndpointConfig(H),me=Te.resolveHttpAuthSchemeConfig(fe),X=Sl(me,e?.extensions||[]);super(X);this.config=X,this.middlewareStack.use(Ue.getUserAgentPlugin(this.config)),this.middlewareStack.use(Me.getRetryPlugin(this.config)),this.middlewareStack.use(il.getContentLengthPlugin(this.config)),this.middlewareStack.use(_e.getHostHeaderPlugin(this.config)),this.middlewareStack.use(el.getLoggerPlugin(this.config)),this.middlewareStack.use(rl.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(Y.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Te.defaultSSOOIDCHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(Oe)=>new Y.DefaultIdentityProviderConfig({"aws.auth#sigv4":Oe.credentials})})),this.middlewareStack.use(Y.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},Nl=E(),Rl=Ae(),El=hr(),Ve=E(),T=E(),sl=E(),y=class e extends sl.ServiceException{static{D(this,"SSOOIDCServiceException")}constructor(r){super(r);Object.setPrototypeOf(this,e.prototype)}},be=class e extends y{static{D(this,"AccessDeniedException")}name="AccessDeniedException";$fault="client";error;error_description;constructor(r){super({name:"AccessDeniedException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Be=class e extends y{static{D(this,"AuthorizationPendingException")}name="AuthorizationPendingException";$fault="client";error;error_description;constructor(r){super({name:"AuthorizationPendingException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},We=D((e)=>({...e,...e.clientSecret&&{clientSecret:T.SENSITIVE_STRING},...e.refreshToken&&{refreshToken:T.SENSITIVE_STRING},...e.codeVerifier&&{codeVerifier:T.SENSITIVE_STRING}}),"CreateTokenRequestFilterSensitiveLog"),Ye=D((e)=>({...e,...e.accessToken&&{accessToken:T.SENSITIVE_STRING},...e.refreshToken&&{refreshToken:T.SENSITIVE_STRING},...e.idToken&&{idToken:T.SENSITIVE_STRING}}),"CreateTokenResponseFilterSensitiveLog"),Ke=class e extends y{static{D(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";error;error_description;constructor(r){super({name:"ExpiredTokenException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Xe=class e extends y{static{D(this,"InternalServerException")}name="InternalServerException";$fault="server";error;error_description;constructor(r){super({name:"InternalServerException",$fault:"server",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},ze=class e extends y{static{D(this,"InvalidClientException")}name="InvalidClientException";$fault="client";error;error_description;constructor(r){super({name:"InvalidClientException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Je=class e extends y{static{D(this,"InvalidGrantException")}name="InvalidGrantException";$fault="client";error;error_description;constructor(r){super({name:"InvalidGrantException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Qe=class e extends y{static{D(this,"InvalidRequestException")}name="InvalidRequestException";$fault="client";error;error_description;constructor(r){super({name:"InvalidRequestException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Ze=class e extends y{static{D(this,"InvalidScopeException")}name="InvalidScopeException";$fault="client";error;error_description;constructor(r){super({name:"InvalidScopeException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},$e=class e extends y{static{D(this,"SlowDownException")}name="SlowDownException";$fault="client";error;error_description;constructor(r){super({name:"SlowDownException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},he=class e extends y{static{D(this,"UnauthorizedClientException")}name="UnauthorizedClientException";$fault="client";error;error_description;constructor(r){super({name:"UnauthorizedClientException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},ge=class e extends y{static{D(this,"UnsupportedGrantTypeException")}name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(r){super({name:"UnsupportedGrantTypeException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},K=w(),dl=W(),i=E(),Fl=D(async(e,r)=>{let l=dl.requestBuilder(e,r),v={"content-type":"application/json"};l.bp("/token");let I;return I=JSON.stringify(i.take(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(q)=>i._json(q)})),l.m("POST").h(v).b(I),l.build()},"se_CreateTokenCommand"),_l=D(async(e,r)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ul(e,r);let l=i.map({$metadata:R(e)}),v=i.expectNonNull(i.expectObject(await K.parseJsonBody(e.body,r)),"body"),I=i.take(v,{accessToken:i.expectString,expiresIn:i.expectInt32,idToken:i.expectString,refreshToken:i.expectString,tokenType:i.expectString});return Object.assign(l,I),l},"de_CreateTokenCommand"),Ul=D(async(e,r)=>{let l={...e,body:await K.parseJsonErrorBody(e.body,r)},v=K.loadRestJsonErrorCode(e,l.body);switch(v){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Tl(l,r);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await kl(l,r);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await wl(l,r);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await Cl(l,r);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await Al(l,r);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await Gl(l,r);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await Hl(l,r);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await Ll(l,r);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await Vl(l,r);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await bl(l,r);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await Bl(l,r);default:let I=l.body;return Ml({output:e,parsedBody:I,errorCode:v})}},"de_CommandError"),Ml=i.withBaseException(y),Tl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new be({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_AccessDeniedExceptionRes"),kl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Be({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_AuthorizationPendingExceptionRes"),wl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Ke({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_ExpiredTokenExceptionRes"),Cl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Xe({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_InternalServerExceptionRes"),Al=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new ze({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_InvalidClientExceptionRes"),Gl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Je({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_InvalidGrantExceptionRes"),Hl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Qe({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_InvalidRequestExceptionRes"),Ll=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Ze({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_InvalidScopeExceptionRes"),Vl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new $e({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_SlowDownExceptionRes"),bl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new he({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_UnauthorizedClientExceptionRes"),Bl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new ge({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_UnsupportedGrantTypeExceptionRes"),R=D((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"]}),"deserializeMetadata"),ne=class extends Ve.Command.classBuilder().ep(Dl).m(function(e,r,l,v){return[El.getSerdePlugin(l,this.serialize,this.deserialize),Rl.getEndpointPlugin(l,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(We,Ye).ser(Fl).de(_l).build(){static{D(this,"CreateTokenCommand")}},Wl={CreateTokenCommand:ne},je=class extends Le{static{D(this,"SSOOIDC")}};Nl.createAggregatedClient(Wl,je)});export default Yl();