gemi 0.4.92 → 0.4.93
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/app/App.d.ts +2 -24
- package/dist/app/App.d.ts.map +1 -1
- package/dist/app/index.js +1 -1
- package/dist/bin/index.js +73 -31
- package/dist/broadcasting/index.js +1 -1
- package/dist/{chunk-8ee09f1f74206a04.js → chunk-035e233acf299392.js} +2 -2
- package/dist/{chunk-2c5ecf8dc0a97aba.js → chunk-04f04986e53516f0.js} +1 -1
- package/dist/{chunk-6b58f7c76c2a738c.js → chunk-0f0add364d3ea615.js} +1 -1
- package/dist/chunk-0fd23409fff0376b.js +2 -0
- package/dist/{chunk-07ad6201a5864cd0.js → chunk-1770e9abf10029e0.js} +1 -1
- package/dist/chunk-2573b2361de4a370.js +2 -0
- package/dist/{chunk-b13ef9b23e30af91.js → chunk-2f8839f406606d63.js} +1 -1
- package/dist/{chunk-7d5fe4acabfee228.js → chunk-33abc8f4f7df6791.js} +2 -2
- package/dist/chunk-494de321e3423d54.js +2 -0
- package/dist/chunk-496c32676431beab.js +18 -0
- package/dist/chunk-6286081da32e2feb.js +2 -0
- package/dist/{chunk-24a86f8f5ddc0cbd.js → chunk-7ce930fe69575c87.js} +1 -1
- package/dist/{chunk-9dc5c9b7a885d0bc.js → chunk-8fec55214eb03a61.js} +2 -2
- package/dist/chunk-9a9d43e4b919c267.js +2 -0
- package/dist/chunk-b6fb088270ea6584.js +3 -0
- package/dist/chunk-c459f3e37965c22f.js +2 -0
- package/dist/{chunk-0ba2cc302113ab40.js → chunk-cfb8c5b12b0e5378.js} +2 -2
- package/dist/chunk-cfbe2cbcadcb1ac1.js +2 -0
- package/dist/{chunk-542b3c90f0ff4ded.js → chunk-d09948245f5b426d.js} +1 -1
- package/dist/chunk-d7525516b1305ba3.js +6 -0
- package/dist/{chunk-332553172e3ab961.js → chunk-dfb863d471bf3b18.js} +2 -2
- package/dist/{chunk-28694e5e949df0ff.js → chunk-e1929f0f7003fbdf.js} +2 -2
- package/dist/chunk-e76c7e3bf2d698af.js +2 -0
- package/dist/{chunk-880cfc21ce7cc2c6.js → chunk-eabfa03c809e14df.js} +2 -2
- package/dist/{chunk-43b1a27bc037bc09.js → chunk-ef791082443c0cbd.js} +1 -1
- package/dist/{chunk-6a2141dd4169ce0e.js → chunk-f10ba402aaacfc12.js} +2 -2
- package/dist/client/ClientRouterContext.d.ts.map +1 -1
- package/dist/client/index.js +3 -0
- package/dist/email/index.js +1 -1
- package/dist/facades/index.js +1 -1
- package/dist/http/I18nServiceContainer.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/kernel/Kernel.d.ts +5 -4
- package/dist/kernel/Kernel.d.ts.map +1 -1
- package/dist/kernel/context.d.ts +2 -2
- package/dist/kernel/context.d.ts.map +1 -1
- package/dist/kernel/index.js +1 -1
- package/dist/server/index.js +5 -5
- package/dist/services/ServiceProvider.d.ts +1 -1
- package/dist/services/ServiceProvider.d.ts.map +1 -1
- package/dist/services/index.js +1 -10
- package/dist/services/router/ViewRouterServiceContainer.d.ts +12 -0
- package/dist/services/router/ViewRouterServiceContainer.d.ts.map +1 -0
- package/dist/services/router/ViewRouterServiceProvider.d.ts +13 -0
- package/dist/services/router/ViewRouterServiceProvider.d.ts.map +1 -0
- package/dist/services/router/createComponentTree.d.ts +4 -0
- package/dist/services/router/createComponentTree.d.ts.map +1 -0
- package/dist/services/router/createComponentTree.test.d.ts +2 -0
- package/dist/services/router/createComponentTree.test.d.ts.map +1 -0
- package/dist/services/router/createFlatViewRoutes.d.ts +14 -0
- package/dist/services/router/createFlatViewRoutes.d.ts.map +1 -0
- package/dist/services/router/createFlatViewRoutes.test.d.ts +2 -0
- package/dist/services/router/createFlatViewRoutes.test.d.ts.map +1 -0
- package/dist/services/router/createRouteManifest.d.ts +3 -0
- package/dist/services/router/createRouteManifest.d.ts.map +1 -0
- package/dist/services/router/createRouteManifest.test.d.ts +2 -0
- package/dist/services/router/createRouteManifest.test.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/app/Plugin.d.ts +0 -10
- package/dist/app/Plugin.d.ts.map +0 -1
- package/dist/app/createComponentTree.d.ts +0 -4
- package/dist/app/createComponentTree.d.ts.map +0 -1
- package/dist/app/createFlatViewRoutes.d.ts +0 -10
- package/dist/app/createFlatViewRoutes.d.ts.map +0 -1
- package/dist/app/createRouteManifest.d.ts +0 -3
- package/dist/app/createRouteManifest.d.ts.map +0 -1
- package/dist/chunk-156c827bf8d5029c.js +0 -5
- package/dist/chunk-53b7d6267c9172bc.js +0 -2
- package/dist/chunk-63884944ac5ce0f0.js +0 -2
- package/dist/chunk-83938f41a5342f87.js +0 -2
- package/dist/chunk-9475c6ed18013dc8.js +0 -2
- package/dist/chunk-9d5c096c43928b37.js +0 -1
- package/dist/chunk-a1ef3b11adc01140.js +0 -6
- package/dist/chunk-ad396345e8e74292.js +0 -2
- package/dist/chunk-e1a4203ece554bc3.js +0 -2
- package/dist/chunk-e4a19367b5596f21.js +0 -2
- package/dist/chunk-fe8cfc6e6c3ce826.js +0 -16
- package/dist/server/generateEtag.d.ts +0 -2
- package/dist/server/generateEtag.d.ts.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ViewRouterServiceProvider } from "./ViewRouterServiceProvider";
|
|
2
|
+
export declare class ViewRouterServiceContainer {
|
|
3
|
+
service: ViewRouterServiceProvider;
|
|
4
|
+
constructor(service: ViewRouterServiceProvider);
|
|
5
|
+
handleViewRequest(req: Request): Promise<Response | ((params: {
|
|
6
|
+
styles: any[];
|
|
7
|
+
viewImportMap: any;
|
|
8
|
+
bootstrapModules: string[];
|
|
9
|
+
loaders: string;
|
|
10
|
+
}) => Promise<Response>)>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=ViewRouterServiceContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewRouterServiceContainer.d.ts","sourceRoot":"","sources":["../../../services/router/ViewRouterServiceContainer.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAQxE,qBAAa,0BAA0B;IAClB,OAAO,EAAE,yBAAyB;gBAAlC,OAAO,EAAE,yBAAyB;IAE/C,iBAAiB,CAAC,GAAG,EAAE,OAAO,gCA2LZ;QACpB,MAAM,EAAE,GAAG,EAAE,CAAC;QACd,aAAa,EAAE,GAAG,CAAC;QACnB,gBAAgB,EAAE,MAAM,EAAE,CAAC;QAC3B,OAAO,EAAE,MAAM,CAAC;KACjB;CAwBJ"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentTree } from "../../client/types";
|
|
2
|
+
import type { ViewRoutes } from "../../http/ViewRouter";
|
|
3
|
+
import { ServiceProvider } from "../ServiceProvider";
|
|
4
|
+
import { type FlatViewRoutes } from "./createFlatViewRoutes";
|
|
5
|
+
export declare class ViewRouterServiceProvider extends ServiceProvider {
|
|
6
|
+
flatViewRoutes: FlatViewRoutes;
|
|
7
|
+
routeManifest: Record<string, string[]>;
|
|
8
|
+
componentTree: ComponentTree;
|
|
9
|
+
flatComponentTree: string[];
|
|
10
|
+
RootLayout: any;
|
|
11
|
+
boot(routes: ViewRoutes, RootLayout: any): void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=ViewRouterServiceProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewRouterServiceProvider.d.ts","sourceRoot":"","sources":["../../../services/router/ViewRouterServiceProvider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAGhC,qBAAa,yBAA0B,SAAQ,eAAe;IAC5D,cAAc,EAAE,cAAc,CAAM;IACpC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAM;IAC7C,aAAa,EAAE,aAAa,CAAM;IAClC,iBAAiB,EAAE,MAAM,EAAE,CAAM;IACjC,UAAU,EAAE,GAAG,CAAQ;IACvB,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG;CAOzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createComponentTree.d.ts","sourceRoot":"","sources":["../../../services/router/createComponentTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,aAAa,CAqBrE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createComponentTree.test.d.ts","sourceRoot":"","sources":["../../../services/router/createComponentTree.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpRequest } from "../../http";
|
|
2
|
+
import type { ViewRoutes } from "../../http/ViewRouter";
|
|
3
|
+
export type ViewRouteExec = (req: HttpRequest<any, any>) => any;
|
|
4
|
+
export type FlatViewRoutes = Record<string, {
|
|
5
|
+
exec: ViewRouteExec[];
|
|
6
|
+
middleware: (string | any)[];
|
|
7
|
+
}>;
|
|
8
|
+
export declare function createFlatViewRoutes(routes: ViewRoutes): {
|
|
9
|
+
[k: string]: {
|
|
10
|
+
exec: ViewRouteExec[];
|
|
11
|
+
middleware: (string | any)[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=createFlatViewRoutes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFlatViewRoutes.d.ts","sourceRoot":"","sources":["../../../services/router/createFlatViewRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC;AAEhE,MAAM,MAAM,cAAc,GAAG,MAAM,CACjC,MAAM,EACN;IAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAAC,UAAU,EAAE,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE,CAAA;CAAE,CACxD,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU;;cAH7C,aAAa,EAAE;oBAAc,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE;;EAkDtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFlatViewRoutes.test.d.ts","sourceRoot":"","sources":["../../../services/router/createFlatViewRoutes.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRouteManifest.d.ts","sourceRoot":"","sources":["../../../services/router/createRouteManifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,4BAkCrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRouteManifest.test.d.ts","sourceRoot":"","sources":["../../../services/router/createRouteManifest.test.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
package/dist/app/Plugin.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ApiRouter } from "../http/ApiRouter";
|
|
2
|
-
import { ViewRouter } from "../http/ViewRouter";
|
|
3
|
-
export declare class Plugin {
|
|
4
|
-
name: symbol;
|
|
5
|
-
apiRouter: typeof ApiRouter;
|
|
6
|
-
viewRouter: typeof ViewRouter;
|
|
7
|
-
apiRoutesBasePath: string;
|
|
8
|
-
viewRoutesBasePath: string;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=Plugin.d.ts.map
|
package/dist/app/Plugin.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../app/Plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,qBAAa,MAAM;IACV,IAAI,SAAoB;IACxB,SAAS,mBAAa;IACtB,UAAU,oBAAc;IACxB,iBAAiB,SAAM;IACvB,kBAAkB,SAAM;CAChC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createComponentTree.d.ts","sourceRoot":"","sources":["../../app/createComponentTree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,aAAa,CAqBrE"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { HttpRequest } from "../http";
|
|
2
|
-
import { ViewRoutes } from "../http/ViewRouter";
|
|
3
|
-
export type ViewRouteExec = (req: HttpRequest<any, any>) => any;
|
|
4
|
-
export declare function createFlatViewRoutes(routes: ViewRoutes): {
|
|
5
|
-
[k: string]: {
|
|
6
|
-
exec: ViewRouteExec[];
|
|
7
|
-
middleware: (string | any)[];
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=createFlatViewRoutes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createFlatViewRoutes.d.ts","sourceRoot":"","sources":["../../app/createFlatViewRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC;AAChE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU;;cAG3C,aAAa,EAAE;oBAAc,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE;;EA+CxD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createRouteManifest.d.ts","sourceRoot":"","sources":["../../app/createRouteManifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,4BAkCrD"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{B as Q,C as N} from"./chunk-24a86f8f5ddc0cbd.js";import{ob as p} from"./chunk-6a2141dd4169ce0e.js";var xn=N((Sr,Hn)=>{var{defineProperty:O,getOwnPropertyDescriptor:Uf,getOwnPropertyNames:If}=Object,yf=Object.prototype.hasOwnProperty,z=(n,c)=>O(n,"name",{value:c,configurable:!0}),of=(n,c)=>{for(var t in c)O(n,t,{get:c[t],enumerable:!0})},Lf=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of If(c))if(!yf.call(n,h)&&h!==t)O(n,h,{get:()=>c[h],enumerable:!(f=Uf(c,h))||f.enumerable})}return n},Df=(n)=>Lf(O({},"__esModule",{value:!0}),n),jn={};of(jn,{constructStack:()=>$n});Hn.exports=Df(jn);var A=z((n,c)=>{const t=[];if(n)t.push(n);if(c)for(let f of c)t.push(f);return t},"getAllAliases"),K=z((n,c)=>{return`${n||"anonymous"}${c&&c.length>0?` (a.k.a. ${c.join(",")})`:""}`},"getMiddlewareNameWithAliases"),$n=z(()=>{let n=[],c=[],t=!1;const f=new Set,h=z((w)=>w.sort((d,T)=>Mn[T.step]-Mn[d.step]||Rn[T.priority||"normal"]-Rn[d.priority||"normal"]),"sort"),i=z((w)=>{let d=!1;const T=z((U)=>{const o=A(U.name,U.aliases);if(o.includes(w)){d=!0;for(let F of o)f.delete(F);return!1}return!0},"filterCb");return n=n.filter(T),c=c.filter(T),d},"removeByName"),r=z((w)=>{let d=!1;const T=z((U)=>{if(U.middleware===w){d=!0;for(let o of A(U.name,U.aliases))f.delete(o);return!1}return!0},"filterCb");return n=n.filter(T),c=c.filter(T),d},"removeByReference"),s=z((w)=>{var d;return n.forEach((T)=>{w.add(T.middleware,{...T})}),c.forEach((T)=>{w.addRelativeTo(T.middleware,{...T})}),(d=w.identifyOnResolve)==null||d.call(w,y.identifyOnResolve()),w},"cloneTo"),u=z((w)=>{const d=[];return w.before.forEach((T)=>{if(T.before.length===0&&T.after.length===0)d.push(T);else d.push(...u(T))}),d.push(w),w.after.reverse().forEach((T)=>{if(T.before.length===0&&T.after.length===0)d.push(T);else d.push(...u(T))}),d},"expandRelativeMiddlewareList"),x=z((w=!1)=>{const d=[],T=[],U={};return n.forEach((F)=>{const C={...F,before:[],after:[]};for(let $ of A(C.name,C.aliases))U[$]=C;d.push(C)}),c.forEach((F)=>{const C={...F,before:[],after:[]};for(let $ of A(C.name,C.aliases))U[$]=C;T.push(C)}),T.forEach((F)=>{if(F.toMiddleware){const C=U[F.toMiddleware];if(C===void 0){if(w)return;throw new Error(`${F.toMiddleware} is not found when adding ${K(F.name,F.aliases)} middleware ${F.relation} ${F.toMiddleware}`)}if(F.relation==="after")C.after.push(F);if(F.relation==="before")C.before.push(F)}}),h(d).map(u).reduce((F,C)=>{return F.push(...C),F},[])},"getMiddlewareList"),y={add:(w,d={})=>{const{name:T,override:U,aliases:o}=d,F={step:"initialize",priority:"normal",middleware:w,...d},C=A(T,o);if(C.length>0){if(C.some(($)=>f.has($))){if(!U)throw new Error(`Duplicate middleware name '${K(T,o)}'`);for(let $ of C){const E=n.findIndex((g)=>{var S;return g.name===$||((S=g.aliases)==null?void 0:S.some((J)=>J===$))});if(E===-1)continue;const I=n[E];if(I.step!==F.step||F.priority!==I.priority)throw new Error(`"${K(I.name,I.aliases)}" middleware with ${I.priority} priority in ${I.step} step cannot be overridden by "${K(T,o)}" middleware with ${F.priority} priority in ${F.step} step.`);n.splice(E,1)}}for(let $ of C)f.add($)}n.push(F)},addRelativeTo:(w,d)=>{const{name:T,override:U,aliases:o}=d,F={middleware:w,...d},C=A(T,o);if(C.length>0){if(C.some(($)=>f.has($))){if(!U)throw new Error(`Duplicate middleware name '${K(T,o)}'`);for(let $ of C){const E=c.findIndex((g)=>{var S;return g.name===$||((S=g.aliases)==null?void 0:S.some((J)=>J===$))});if(E===-1)continue;const I=c[E];if(I.toMiddleware!==F.toMiddleware||I.relation!==F.relation)throw new Error(`"${K(I.name,I.aliases)}" middleware ${I.relation} "${I.toMiddleware}" middleware cannot be overridden by "${K(T,o)}" middleware ${F.relation} "${F.toMiddleware}" middleware.`);c.splice(E,1)}}for(let $ of C)f.add($)}c.push(F)},clone:()=>s($n()),use:(w)=>{w.applyToStack(y)},remove:(w)=>{if(typeof w==="string")return i(w);else return r(w)},removeByTag:(w)=>{let d=!1;const T=z((U)=>{const{tags:o,name:F,aliases:C}=U;if(o&&o.includes(w)){const $=A(F,C);for(let E of $)f.delete(E);return d=!0,!1}return!0},"filterCb");return n=n.filter(T),c=c.filter(T),d},concat:(w)=>{var d;const T=s($n());return T.use(w),T.identifyOnResolve(t||T.identifyOnResolve()||(((d=w.identifyOnResolve)==null?void 0:d.call(w))??!1)),T},applyToStack:s,identify:()=>{return x(!0).map((w)=>{const d=w.step??w.relation+" "+w.toMiddleware;return K(w.name,w.aliases)+" - "+d})},identifyOnResolve(w){if(typeof w==="boolean")t=w;return t},resolve:(w,d)=>{for(let T of x().map((U)=>U.middleware).reverse())w=T(w,d);if(t)console.log(y.identify());return w}};return y},"constructStack"),Mn={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Rn={high:3,normal:2,low:1}});var mn=N((Ar,an)=>{var{defineProperty:v,getOwnPropertyDescriptor:Sf,getOwnPropertyNames:Yf}=Object,zf=Object.prototype.hasOwnProperty,Vf=(n,c)=>v(n,"name",{value:c,configurable:!0}),Zf=(n,c)=>{for(var t in c)v(n,t,{get:c[t],enumerable:!0})},Gf=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Yf(c))if(!zf.call(n,h)&&h!==t)v(n,h,{get:()=>c[h],enumerable:!(f=Sf(c,h))||f.enumerable})}return n},Kf=(n)=>Gf(v({},"__esModule",{value:!0}),n),qn={};Zf(qn,{isArrayBuffer:()=>Qf});an.exports=Kf(qn);var Qf=Vf((n)=>typeof ArrayBuffer==="function"&&n instanceof ArrayBuffer||Object.prototype.toString.call(n)==="[object ArrayBuffer]","isArrayBuffer")});var R=N((Wr,cc)=>{var{defineProperty:q,getOwnPropertyDescriptor:Xf,getOwnPropertyNames:Jf}=Object,Af=Object.prototype.hasOwnProperty,_n=(n,c)=>q(n,"name",{value:c,configurable:!0}),Wf=(n,c)=>{for(var t in c)q(n,t,{get:c[t],enumerable:!0})},bf=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Jf(c))if(!Af.call(n,h)&&h!==t)q(n,h,{get:()=>c[h],enumerable:!(f=Xf(c,h))||f.enumerable})}return n},Bf=(n)=>bf(q({},"__esModule",{value:!0}),n),nc={};Wf(nc,{fromArrayBuffer:()=>Rf,fromString:()=>jf});cc.exports=Bf(nc);var Mf=mn(),dn=import.meta.require("buffer"),Rf=_n((n,c=0,t=n.byteLength-c)=>{if(!Mf.isArrayBuffer(n))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof n} (${n})`);return dn.Buffer.from(n,c,t)},"fromArrayBuffer"),jf=_n((n,c)=>{if(typeof n!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof n} (${n})`);return c?dn.Buffer.from(n,c):dn.Buffer.from(n)},"fromString")});var hc=N((tc)=>{Object.defineProperty(tc,"__esModule",{value:!0});tc.fromBase64=void 0;var Hf=R(),Pf=/^[A-Za-z0-9+/]*={0,2}$/,ef=(n)=>{if(n.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Pf.exec(n))throw new TypeError("Invalid base64 string.");const c=Hf.fromString(n,"base64");return new Uint8Array(c.buffer,c.byteOffset,c.byteLength)};tc.fromBase64=ef});var m=N((Br,uc)=>{var{defineProperty:a,getOwnPropertyDescriptor:lf,getOwnPropertyNames:kf}=Object,Of=Object.prototype.hasOwnProperty,En=(n,c)=>a(n,"name",{value:c,configurable:!0}),pf=(n,c)=>{for(var t in c)a(n,t,{get:c[t],enumerable:!0})},vf=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of kf(c))if(!Of.call(n,h)&&h!==t)a(n,h,{get:()=>c[h],enumerable:!(f=lf(c,h))||f.enumerable})}return n},qf=(n)=>vf(a({},"__esModule",{value:!0}),n),ic={};pf(ic,{fromUtf8:()=>sc,toUint8Array:()=>af,toUtf8:()=>mf});uc.exports=qf(ic);var rc=R(),sc=En((n)=>{const c=rc.fromString(n,"utf8");return new Uint8Array(c.buffer,c.byteOffset,c.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),af=En((n)=>{if(typeof n==="string")return sc(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(n)},"toUint8Array"),mf=En((n)=>{if(typeof n==="string")return n;if(typeof n!=="object"||typeof n.byteOffset!=="number"||typeof n.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return rc.fromArrayBuffer(n.buffer,n.byteOffset,n.byteLength).toString("utf8")},"toUtf8")});var $c=N((wc)=>{Object.defineProperty(wc,"__esModule",{value:!0});wc.toBase64=void 0;var _f=R(),nh=m(),ch=(n)=>{let c;if(typeof n==="string")c=nh.fromUtf8(n);else c=n;if(typeof c!=="object"||typeof c.byteOffset!=="number"||typeof c.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return _f.fromArrayBuffer(c.buffer,c.byteOffset,c.byteLength).toString("base64")};wc.toBase64=ch});var nn=N((Rr,_)=>{var{defineProperty:xc,getOwnPropertyDescriptor:th,getOwnPropertyNames:fh}=Object,hh=Object.prototype.hasOwnProperty,Fn=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of fh(c))if(!hh.call(n,h)&&h!==t)xc(n,h,{get:()=>c[h],enumerable:!(f=th(c,h))||f.enumerable})}return n},dc=(n,c,t)=>(Fn(n,c,"default"),t&&Fn(t,c,"default")),ih=(n)=>Fn(xc({},"__esModule",{value:!0}),n),Cn={};_.exports=ih(Cn);dc(Cn,hc(),_.exports);dc(Cn,$c(),_.exports)});var Cc=N((Ec)=>{Object.defineProperty(Ec,"__esModule",{value:!0});Ec.getAwsChunkedEncodingStream=void 0;var rh=import.meta.require("stream"),sh=(n,c)=>{const{base64Encoder:t,bodyLengthChecker:f,checksumAlgorithmFn:h,checksumLocationName:i,streamHasher:r}=c,s=t!==void 0&&h!==void 0&&i!==void 0&&r!==void 0,u=s?r(h,n):void 0,x=new rh.Readable({read:()=>{}});return n.on("data",(y)=>{const w=f(y)||0;x.push(`${w.toString(16)}\r\n`),x.push(y),x.push("\r\n")}),n.on("end",async()=>{if(x.push("0\r\n"),s){const y=t(await u);x.push(`${i}:${y}\r\n`),x.push("\r\n")}x.push(null)}),x};Ec.getAwsChunkedEncodingStream=sh});var Un=N((Hr,Sc)=>{var Dc=function(n){return Object.keys(n).reduce((c,t)=>{const f=n[t];return{...c,[t]:Array.isArray(f)?[...f]:f}},{})},gc=function(n){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(n)},cn=Object.defineProperty,uh=Object.getOwnPropertyDescriptor,wh=Object.getOwnPropertyNames,Th=Object.prototype.hasOwnProperty,X=(n,c)=>cn(n,"name",{value:c,configurable:!0}),$h=(n,c)=>{for(var t in c)cn(n,t,{get:c[t],enumerable:!0})},xh=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of wh(c))if(!Th.call(n,h)&&h!==t)cn(n,h,{get:()=>c[h],enumerable:!(f=uh(c,h))||f.enumerable})}return n},dh=(n)=>xh(cn({},"__esModule",{value:!0}),n),Uc={};$h(Uc,{Field:()=>Ch,Fields:()=>Uh,HttpRequest:()=>Ih,HttpResponse:()=>yh,IHttpRequest:()=>Ic.HttpRequest,getHttpHandlerExtensionConfiguration:()=>Eh,isValidHostname:()=>gc,resolveHttpHandlerRuntimeConfig:()=>Fh});Sc.exports=dh(Uc);var Eh=X((n)=>{let c=n.httpHandler;return{setHttpHandler(t){c=t},httpHandler(){return c},updateHttpClientConfig(t,f){c.updateHttpClientConfig(t,f)},httpHandlerConfigs(){return c.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),Fh=X((n)=>{return{httpHandler:n.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),Ic=p(),yc=class n{constructor({name:c,kind:t=Ic.FieldPosition.HEADER,values:f=[]}){this.name=c,this.kind=t,this.values=f}add(c){this.values.push(c)}set(c){this.values=c}remove(c){this.values=this.values.filter((t)=>t!==c)}toString(){return this.values.map((c)=>c.includes(",")||c.includes(" ")?`"${c}"`:c).join(", ")}get(){return this.values}};X(yc,"Field");var Ch=yc,oc=class n{constructor({fields:c=[],encoding:t="utf-8"}){this.entries={},c.forEach(this.setField.bind(this)),this.encoding=t}setField(c){this.entries[c.name.toLowerCase()]=c}getField(c){return this.entries[c.toLowerCase()]}removeField(c){delete this.entries[c.toLowerCase()]}getByType(c){return Object.values(this.entries).filter((t)=>t.kind===c)}};X(oc,"Fields");var Uh=oc,Lc=class n{constructor(c){this.method=c.method||"GET",this.hostname=c.hostname||"localhost",this.port=c.port,this.query=c.query||{},this.headers=c.headers||{},this.body=c.body,this.protocol=c.protocol?c.protocol.slice(-1)!==":"?`${c.protocol}:`:c.protocol:"https:",this.path=c.path?c.path.charAt(0)!=="/"?`/${c.path}`:c.path:"/",this.username=c.username,this.password=c.password,this.fragment=c.fragment}static clone(c){const t=new n({...c,headers:{...c.headers}});if(t.query)t.query=Dc(t.query);return t}static isInstance(c){if(!c)return!1;const t=c;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query==="object"&&typeof t.headers==="object"}clone(){return n.clone(this)}};X(Lc,"HttpRequest");var Ih=Lc;X(Dc,"cloneQuery");var Nc=class n{constructor(c){this.statusCode=c.statusCode,this.reason=c.reason,this.headers=c.headers||{},this.body=c.body}static isInstance(c){if(!c)return!1;const t=c;return typeof t.statusCode==="number"&&typeof t.headers==="object"}};X(Nc,"HttpResponse");var yh=Nc;X(gc,"isValidHostname")});var Zc=N((Pr,Vc)=>{var{defineProperty:tn,getOwnPropertyDescriptor:oh,getOwnPropertyNames:Lh}=Object,Dh=Object.prototype.hasOwnProperty,In=(n,c)=>tn(n,"name",{value:c,configurable:!0}),Nh=(n,c)=>{for(var t in c)tn(n,t,{get:c[t],enumerable:!0})},gh=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Lh(c))if(!Dh.call(n,h)&&h!==t)tn(n,h,{get:()=>c[h],enumerable:!(f=oh(c,h))||f.enumerable})}return n},Sh=(n)=>gh(tn({},"__esModule",{value:!0}),n),Yc={};Nh(Yc,{escapeUri:()=>zc,escapeUriPath:()=>zh});Vc.exports=Sh(Yc);var zc=In((n)=>encodeURIComponent(n).replace(/[!'()*]/g,Yh),"escapeUri"),Yh=In((n)=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),zh=In((n)=>n.split("/").map(zc).join("/"),"escapeUriPath")});var j=N((er,Qc)=>{var Kc=function(n){const c=[];for(let t of Object.keys(n).sort()){const f=n[t];if(t=yn.escapeUri(t),Array.isArray(f))for(let h=0,i=f.length;h<i;h++)c.push(`${t}=${yn.escapeUri(f[h])}`);else{let h=t;if(f||typeof f==="string")h+=`=${yn.escapeUri(f)}`;c.push(h)}}return c.join("&")},fn=Object.defineProperty,Vh=Object.getOwnPropertyDescriptor,Zh=Object.getOwnPropertyNames,Gh=Object.prototype.hasOwnProperty,Kh=(n,c)=>fn(n,"name",{value:c,configurable:!0}),Qh=(n,c)=>{for(var t in c)fn(n,t,{get:c[t],enumerable:!0})},Xh=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Zh(c))if(!Gh.call(n,h)&&h!==t)fn(n,h,{get:()=>c[h],enumerable:!(f=Vh(c,h))||f.enumerable})}return n},Jh=(n)=>Xh(fn({},"__esModule",{value:!0}),n),Gc={};Qh(Gc,{buildQueryString:()=>Kc});Qc.exports=Jh(Gc);var yn=Zc();Kh(Kc,"buildQueryString")});var ac=N((lr,qc)=>{async function Dn(n,c,t=Ac){const f=c.headers??{},h=f.Expect||f.expect;let i=-1,r=!1;if(h==="100-continue")await Promise.race([new Promise((s)=>{i=Number(setTimeout(s,Math.max(Ac,t)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(i),s()}),n.on("error",()=>{r=!0,clearTimeout(i),s()})})]);if(!r)Pc(n,c.body)}var Pc=function(n,c){if(c instanceof Hc.Readable){c.pipe(n);return}if(c){if(Buffer.isBuffer(c)||typeof c==="string"){n.end(c);return}const t=c;if(typeof t==="object"&&t.buffer&&typeof t.byteOffset==="number"&&typeof t.byteLength==="number"){n.end(Buffer.from(t.buffer,t.byteOffset,t.byteLength));return}n.end(Buffer.from(c));return}n.end()};async function vc(n){const c=[],t=n.getReader();let f=!1,h=0;while(!f){const{done:s,value:u}=await t.read();if(u)c.push(u),h+=u.length;f=s}const i=new Uint8Array(h);let r=0;for(let s of c)i.set(s,r),r+=s.length;return i}var{create:Ah,defineProperty:H,getOwnPropertyDescriptor:Wh,getOwnPropertyNames:bh,getPrototypeOf:Bh}=Object,Mh=Object.prototype.hasOwnProperty,L=(n,c)=>H(n,"name",{value:c,configurable:!0}),Rh=(n,c)=>{for(var t in c)H(n,t,{get:c[t],enumerable:!0})},bc=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of bh(c))if(!Mh.call(n,h)&&h!==t)H(n,h,{get:()=>c[h],enumerable:!(f=Wh(c,h))||f.enumerable})}return n},jh=(n,c,t)=>(t=n!=null?Ah(Bh(n)):{},bc(c||!n||!n.__esModule?H(t,"default",{value:n,enumerable:!0}):t,n)),Hh=(n)=>bc(H({},"__esModule",{value:!0}),n),Bc={};Rh(Bc,{DEFAULT_REQUEST_TIMEOUT:()=>ph,NodeHttp2Handler:()=>_h,NodeHttpHandler:()=>vh,streamCollector:()=>ci});qc.exports=Hh(Bc);var Mc=Un(),Rc=j(),on=import.meta.require("http"),Ln=import.meta.require("https"),Ph=["ECONNRESET","EPIPE","ETIMEDOUT"],jc=L((n)=>{const c={};for(let t of Object.keys(n)){const f=n[t];c[t]=Array.isArray(f)?f.join(","):f}return c},"getTransformedHeaders"),Xc=1000,eh=L((n,c,t=0)=>{if(!t)return-1;const f=L((h)=>{const i=setTimeout(()=>{n.destroy(),c(Object.assign(new Error(`Socket timed out without establishing a connection within ${t} ms`),{name:"TimeoutError"}))},t-h),r=L((s)=>{if(s==null?void 0:s.connecting)s.on("connect",()=>{clearTimeout(i)});else clearTimeout(i)},"doWithSocket");if(n.socket)r(n.socket);else n.on("socket",r)},"registerTimeout");if(t<2000)return f(0),0;return setTimeout(f.bind(null,Xc),Xc)},"setConnectionTimeout"),lh=3000,kh=L((n,{keepAlive:c,keepAliveMsecs:t},f=lh)=>{if(c!==!0)return-1;const h=L(()=>{if(n.socket)n.socket.setKeepAlive(c,t||0);else n.on("socket",(i)=>{i.setKeepAlive(c,t||0)})},"registerListener");if(f===0)return h(),0;return setTimeout(h,f)},"setSocketKeepAlive"),Jc=3000,Oh=L((n,c,t=0)=>{const f=L((h)=>{n.setTimeout(t-h,()=>{n.destroy(),c(Object.assign(new Error(`Connection timed out after ${t} ms`),{name:"TimeoutError"}))})},"registerTimeout");if(0<t&&t<6000)return f(0),0;return setTimeout(f.bind(null,t===0?0:Jc),Jc)},"setSocketTimeout"),Hc=import.meta.require("stream"),Ac=1000;L(Dn,"writeRequestBody");L(Pc,"writeBody");var ph=0,ec=class n{constructor(c){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((t,f)=>{if(typeof c==="function")c().then((h)=>{t(this.resolveDefaultConfig(h))}).catch(f);else t(this.resolveDefaultConfig(c))})}static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}static checkSocketUsage(c,t,f=console){var h,i,r;const{sockets:s,requests:u,maxSockets:x}=c;if(typeof x!=="number"||x===Infinity)return t;const y=15000;if(Date.now()-y<t)return t;if(s&&u)for(let w in s){const d=((h=s[w])==null?void 0:h.length)??0,T=((i=u[w])==null?void 0:i.length)??0;if(d>=x&&T>=2*x)return(r=f==null?void 0:f.warn)==null||r.call(f,`@smithy/node-http-handler:WARN - socket usage at capacity=${d} and ${T} 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 t}resolveDefaultConfig(c){const{requestTimeout:t,connectionTimeout:f,socketTimeout:h,httpAgent:i,httpsAgent:r}=c||{};return{connectionTimeout:f,requestTimeout:t??h,httpAgent:(()=>{if(i instanceof on.Agent||typeof(i==null?void 0:i.destroy)==="function")return i;return new on.Agent({keepAlive:!0,maxSockets:50,...i})})(),httpsAgent:(()=>{if(r instanceof Ln.Agent||typeof(r==null?void 0:r.destroy)==="function")return r;return new Ln.Agent({keepAlive:!0,maxSockets:50,...r})})(),logger:console}}destroy(){var c,t,f,h;(t=(c=this.config)==null?void 0:c.httpAgent)==null||t.destroy(),(h=(f=this.config)==null?void 0:f.httpsAgent)==null||h.destroy()}async handle(c,{abortSignal:t}={}){if(!this.config)this.config=await this.configProvider;return new Promise((f,h)=>{let i=void 0;const r=[],s=L(async(E)=>{await i,r.forEach(clearTimeout),f(E)},"resolve"),u=L(async(E)=>{await i,r.forEach(clearTimeout),h(E)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(t==null?void 0:t.aborted){const E=new Error("Request aborted");E.name="AbortError",u(E);return}const x=c.protocol==="https:",y=x?this.config.httpsAgent:this.config.httpAgent;r.push(setTimeout(()=>{this.socketWarningTimestamp=n.checkSocketUsage(y,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const w=Rc.buildQueryString(c.query||{});let d=void 0;if(c.username!=null||c.password!=null){const E=c.username??"",I=c.password??"";d=`${E}:${I}`}let T=c.path;if(w)T+=`?${w}`;if(c.fragment)T+=`#${c.fragment}`;let U=c.hostname??"";if(U[0]==="["&&U.endsWith("]"))U=c.hostname.slice(1,-1);else U=c.hostname;const o={headers:c.headers,host:U,method:c.method,path:T,port:c.port,agent:y,auth:d},C=(x?Ln.request:on.request)(o,(E)=>{const I=new Mc.HttpResponse({statusCode:E.statusCode||-1,reason:E.statusMessage,headers:jc(E.headers),body:E});s({response:I})});if(C.on("error",(E)=>{if(Ph.includes(E.code))u(Object.assign(E,{name:"TimeoutError"}));else u(E)}),t){const E=L(()=>{C.destroy();const I=new Error("Request aborted");I.name="AbortError",u(I)},"onAbort");if(typeof t.addEventListener==="function"){const I=t;I.addEventListener("abort",E,{once:!0}),C.once("close",()=>I.removeEventListener("abort",E))}else t.onabort=E}r.push(eh(C,u,this.config.connectionTimeout)),r.push(Oh(C,u,this.config.requestTimeout));const $=o.agent;if(typeof $==="object"&&"keepAlive"in $)r.push(kh(C,{keepAlive:$.keepAlive,keepAliveMsecs:$.keepAliveMsecs}));i=Dn(C,c,this.config.requestTimeout).catch((E)=>{return r.forEach(clearTimeout),h(E)})})}updateHttpClientConfig(c,t){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return{...f,[c]:t}})}httpHandlerConfigs(){return this.config??{}}};L(ec,"NodeHttpHandler");var vh=ec,Wc=import.meta.require("http2"),qh=jh(import.meta.require("http2")),lc=class n{constructor(c){this.sessions=[],this.sessions=c??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(c){this.sessions.push(c)}contains(c){return this.sessions.includes(c)}remove(c){this.sessions=this.sessions.filter((t)=>t!==c)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(c){for(let t of this.sessions)if(t===c){if(!t.destroyed)t.destroy()}}};L(lc,"NodeHttp2ConnectionPool");var ah=lc,kc=class n{constructor(c){if(this.sessionCache=new Map,this.config=c,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(c,t){const f=this.getUrlString(c),h=this.sessionCache.get(f);if(h){const u=h.poll();if(u&&!this.config.disableConcurrency)return u}const i=qh.default.connect(f);if(this.config.maxConcurrency)i.settings({maxConcurrentStreams:this.config.maxConcurrency},(u)=>{if(u)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+c.destination.toString())});i.unref();const r=L(()=>{i.destroy(),this.deleteSession(f,i)},"destroySessionCb");if(i.on("goaway",r),i.on("error",r),i.on("frameError",r),i.on("close",()=>this.deleteSession(f,i)),t.requestTimeout)i.setTimeout(t.requestTimeout,r);const s=this.sessionCache.get(f)||new ah;return s.offerLast(i),this.sessionCache.set(f,s),i}deleteSession(c,t){const f=this.sessionCache.get(c);if(!f)return;if(!f.contains(t))return;f.remove(t),this.sessionCache.set(c,f)}release(c,t){var f;const h=this.getUrlString(c);(f=this.sessionCache.get(h))==null||f.offerLast(t)}destroy(){for(let[c,t]of this.sessionCache){for(let f of t){if(!f.destroyed)f.destroy();t.remove(f)}this.sessionCache.delete(c)}}setMaxConcurrentStreams(c){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=c}setDisableConcurrentStreams(c){this.config.disableConcurrency=c}getUrlString(c){return c.destination.toString()}};L(kc,"NodeHttp2ConnectionManager");var mh=kc,Oc=class n{constructor(c){this.metadata={handlerProtocol:"h2"},this.connectionManager=new mh({}),this.configProvider=new Promise((t,f)=>{if(typeof c==="function")c().then((h)=>{t(h||{})}).catch(f);else t(c||{})})}static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}destroy(){this.connectionManager.destroy()}async handle(c,{abortSignal:t}={}){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)}const{requestTimeout:f,disableConcurrentStreams:h}=this.config;return new Promise((i,r)=>{var s;let u=!1,x=void 0;const y=L(async(D)=>{await x,i(D)},"resolve"),w=L(async(D)=>{await x,r(D)},"reject");if(t==null?void 0:t.aborted){u=!0;const D=new Error("Request aborted");D.name="AbortError",w(D);return}const{hostname:d,method:T,port:U,protocol:o,query:F}=c;let C="";if(c.username!=null||c.password!=null){const D=c.username??"",V=c.password??"";C=`${D}:${V}@`}const $=`${o}//${C}${d}${U?`:${U}`:""}`,E={destination:new URL($)},I=this.connectionManager.lease(E,{requestTimeout:(s=this.config)==null?void 0:s.sessionTimeout,disableConcurrentStreams:h||!1}),g=L((D)=>{if(h)this.destroySession(I);u=!0,w(D)},"rejectWithDestroy"),S=Rc.buildQueryString(F||{});let J=c.path;if(S)J+=`?${S}`;if(c.fragment)J+=`#${c.fragment}`;const Y=I.request({...c.headers,[Wc.constants.HTTP2_HEADER_PATH]:J,[Wc.constants.HTTP2_HEADER_METHOD]:T});if(I.ref(),Y.on("response",(D)=>{const V=new Mc.HttpResponse({statusCode:D[":status"]||-1,headers:jc(D),body:Y});if(u=!0,y({response:V}),h)I.close(),this.connectionManager.deleteSession($,I)}),f)Y.setTimeout(f,()=>{Y.close();const D=new Error(`Stream timed out because of no activity for ${f} ms`);D.name="TimeoutError",g(D)});if(t){const D=L(()=>{Y.close();const V=new Error("Request aborted");V.name="AbortError",g(V)},"onAbort");if(typeof t.addEventListener==="function"){const V=t;V.addEventListener("abort",D,{once:!0}),Y.once("close",()=>V.removeEventListener("abort",D))}else t.onabort=D}Y.on("frameError",(D,V,Cf)=>{g(new Error(`Frame type id ${D} in stream id ${Cf} has failed with code ${V}.`))}),Y.on("error",g),Y.on("aborted",()=>{g(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${Y.rstCode}.`))}),Y.on("close",()=>{if(I.unref(),h)I.destroy();if(!u)g(new Error("Unexpected error: http2 request did not get a response"))}),x=Dn(Y,c,f)})}updateHttpClientConfig(c,t){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return{...f,[c]:t}})}httpHandlerConfigs(){return this.config??{}}destroySession(c){if(!c.destroyed)c.destroy()}};L(Oc,"NodeHttp2Handler");var _h=Oc,pc=class n extends Hc.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(c,t,f){this.bufferedBytes.push(c),f()}};L(pc,"Collector");var ni=pc,ci=L((n)=>{if(ti(n))return vc(n);return new Promise((c,t)=>{const f=new ni;n.pipe(f),n.on("error",(h)=>{f.end(),t(h)}),f.on("error",t),f.on("finish",function(){const h=new Uint8Array(Buffer.concat(this.bufferedBytes));c(h)})})},"streamCollector"),ti=L((n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream,"isReadableStreamInstance");L(vc,"collectReadableStream")});var rt=N((kr,it)=>{var nt=function(n=0){return new Promise((c,t)=>{if(n)setTimeout(()=>{const f=new Error(`Request did not complete within ${n} ms`);f.name="TimeoutError",t(f)},n)})};async function tt(n){const c=await ht(n),t=$i.fromBase64(c);return new Uint8Array(t)}async function ft(n){const c=[],t=n.getReader();let f=!1,h=0;while(!f){const{done:s,value:u}=await t.read();if(u)c.push(u),h+=u.length;f=s}const i=new Uint8Array(h);let r=0;for(let s of c)i.set(s,r),r+=s.length;return i}var ht=function(n){return new Promise((c,t)=>{const f=new FileReader;f.onloadend=()=>{if(f.readyState!==2)return t(new Error("Reader aborted too early"));const h=f.result??"",i=h.indexOf(","),r=i>-1?i+1:h.length;c(h.substring(r))},f.onabort=()=>t(new Error("Read aborted")),f.onerror=()=>t(f.error),f.readAsDataURL(n)})},rn=Object.defineProperty,fi=Object.getOwnPropertyDescriptor,hi=Object.getOwnPropertyNames,ii=Object.prototype.hasOwnProperty,G=(n,c)=>rn(n,"name",{value:c,configurable:!0}),ri=(n,c)=>{for(var t in c)rn(n,t,{get:c[t],enumerable:!0})},si=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of hi(c))if(!ii.call(n,h)&&h!==t)rn(n,h,{get:()=>c[h],enumerable:!(f=fi(c,h))||f.enumerable})}return n},ui=(n)=>si(rn({},"__esModule",{value:!0}),n),_c={};ri(_c,{FetchHttpHandler:()=>Ti,keepAliveSupport:()=>hn,streamCollector:()=>xi});it.exports=ui(_c);var mc=Un(),wi=j();G(nt,"requestTimeout");var hn={supported:void 0},ct=class n{static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}constructor(c){if(typeof c==="function")this.configProvider=c().then((t)=>t||{});else this.config=c??{},this.configProvider=Promise.resolve(this.config);if(hn.supported===void 0)hn.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(c,{abortSignal:t}={}){var f;if(!this.config)this.config=await this.configProvider;const h=this.config.requestTimeout,i=this.config.keepAlive===!0,r=this.config.credentials;if(t==null?void 0:t.aborted){const $=new Error("Request aborted");return $.name="AbortError",Promise.reject($)}let s=c.path;const u=wi.buildQueryString(c.query||{});if(u)s+=`?${u}`;if(c.fragment)s+=`#${c.fragment}`;let x="";if(c.username!=null||c.password!=null){const $=c.username??"",E=c.password??"";x=`${$}:${E}@`}const{port:y,method:w}=c,d=`${c.protocol}//${x}${c.hostname}${y?`:${y}`:""}${s}`,T=w==="GET"||w==="HEAD"?void 0:c.body,U={body:T,headers:new Headers(c.headers),method:w,credentials:r};if((f=this.config)==null?void 0:f.cache)U.cache=this.config.cache;if(T)U.duplex="half";if(typeof AbortController!=="undefined")U.signal=t;if(hn.supported)U.keepalive=i;if(typeof this.config.requestInit==="function")Object.assign(U,this.config.requestInit(c));let o=G(()=>{},"removeSignalEventListener");const F=new Request(d,U),C=[fetch(F).then(($)=>{const E=$.headers,I={};for(let S of E.entries())I[S[0]]=S[1];if($.body==null)return $.blob().then((S)=>({response:new mc.HttpResponse({headers:I,reason:$.statusText,statusCode:$.status,body:S})}));return{response:new mc.HttpResponse({headers:I,reason:$.statusText,statusCode:$.status,body:$.body})}}),nt(h)];if(t)C.push(new Promise(($,E)=>{const I=G(()=>{const g=new Error("Request aborted");g.name="AbortError",E(g)},"onAbort");if(typeof t.addEventListener==="function"){const g=t;g.addEventListener("abort",I,{once:!0}),o=G(()=>g.removeEventListener("abort",I),"removeSignalEventListener")}else t.onabort=I}));return Promise.race(C).finally(o)}updateHttpClientConfig(c,t){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return f[c]=t,f})}httpHandlerConfigs(){return this.config??{}}};G(ct,"FetchHttpHandler");var Ti=ct,$i=nn(),xi=G((n)=>{if(typeof Blob==="function"&&n instanceof Blob)return tt(n);return ft(n)},"streamCollector");G(tt,"collectBlob");G(ft,"collectStream");G(ht,"readToBase64")});var dt=N((Or,xt)=>{var Tt=function(n){if(n.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const c=new Uint8Array(n.length/2);for(let t=0;t<n.length;t+=2){const f=n.slice(t,t+2).toLowerCase();if(f in Nn)c[t/2]=Nn[f];else throw new Error(`Cannot decode unrecognized sequence ${f} as hexadecimal`)}return c},$t=function(n){let c="";for(let t=0;t<n.byteLength;t++)c+=wt[n[t]];return c},sn=Object.defineProperty,di=Object.getOwnPropertyDescriptor,Ei=Object.getOwnPropertyNames,Fi=Object.prototype.hasOwnProperty,st=(n,c)=>sn(n,"name",{value:c,configurable:!0}),Ci=(n,c)=>{for(var t in c)sn(n,t,{get:c[t],enumerable:!0})},Ui=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Ei(c))if(!Fi.call(n,h)&&h!==t)sn(n,h,{get:()=>c[h],enumerable:!(f=di(c,h))||f.enumerable})}return n},Ii=(n)=>Ui(sn({},"__esModule",{value:!0}),n),ut={};Ci(ut,{fromHex:()=>Tt,toHex:()=>$t});xt.exports=Ii(ut);var wt={},Nn={};for(let n=0;n<256;n++){let c=n.toString(16).toLowerCase();if(c.length===1)c=`0${c}`;wt[n]=c,Nn[c]=n}st(Tt,"fromHex");st($t,"toHex")});var P=N((Et)=>{Object.defineProperty(Et,"__esModule",{value:!0});Et.isReadableStream=void 0;var yi=(n)=>{var c;return typeof ReadableStream==="function"&&(((c=n===null||n===void 0?void 0:n.constructor)===null||c===void 0?void 0:c.name)===ReadableStream.name||n instanceof ReadableStream)};Et.isReadableStream=yi});var Lt=N((yt)=>{Object.defineProperty(yt,"__esModule",{value:!0});yt.sdkStreamMixin=void 0;var oi=rt(),Li=nn(),Di=dt(),Ni=m(),Ct=P(),Ut="The stream has already been transformed.",gi=(n)=>{var c,t;if(!It(n)&&!Ct.isReadableStream(n)){const r=((t=(c=n===null||n===void 0?void 0:n.__proto__)===null||c===void 0?void 0:c.constructor)===null||t===void 0?void 0:t.name)||n;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${r}`)}let f=!1;const h=async()=>{if(f)throw new Error(Ut);return f=!0,await oi.streamCollector(n)},i=(r)=>{if(typeof r.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 r.stream()};return Object.assign(n,{transformToByteArray:h,transformToString:async(r)=>{const s=await h();if(r==="base64")return Li.toBase64(s);else if(r==="hex")return Di.toHex(s);else if(r===void 0||r==="utf8"||r==="utf-8")return Ni.toUtf8(s);else if(typeof TextDecoder==="function")return new TextDecoder(r).decode(s);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(f)throw new Error(Ut);if(f=!0,It(n))return i(n);else if(Ct.isReadableStream(n))return n;else throw new Error(`Cannot transform payload to web stream, got ${n}`)}})};yt.sdkStreamMixin=gi;var It=(n)=>typeof Blob==="function"&&n instanceof Blob});var St=N((Nt)=>{Object.defineProperty(Nt,"__esModule",{value:!0});Nt.sdkStreamMixin=void 0;var Si=ac(),Yi=R(),gn=import.meta.require("stream"),zi=import.meta.require("util"),Vi=Lt(),Dt="The stream has already been transformed.",Zi=(n)=>{var c,t;if(!(n instanceof gn.Readable))try{return Vi.sdkStreamMixin(n)}catch(i){const r=((t=(c=n===null||n===void 0?void 0:n.__proto__)===null||c===void 0?void 0:c.constructor)===null||t===void 0?void 0:t.name)||n;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${r}`)}let f=!1;const h=async()=>{if(f)throw new Error(Dt);return f=!0,await Si.streamCollector(n)};return Object.assign(n,{transformToByteArray:h,transformToString:async(i)=>{const r=await h();if(i===void 0||Buffer.isEncoding(i))return Yi.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString(i);else return new zi.TextDecoder(i).decode(r)},transformToWebStream:()=>{if(f)throw new Error(Dt);if(n.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof gn.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 f=!0,gn.Readable.toWeb(n)}})};Nt.sdkStreamMixin=Zi});var Vt=N((Yt)=>{async function Gi(n){if(typeof n.stream==="function")n=n.stream();return n.tee()}Object.defineProperty(Yt,"__esModule",{value:!0});Yt.splitStream=void 0;Yt.splitStream=Gi});var Qt=N((Gt)=>{async function Xi(n){if(Qi.isReadableStream(n))return Ki.splitStream(n);const c=new Zt.PassThrough,t=new Zt.PassThrough;return n.pipe(c),n.pipe(t),[c,t]}Object.defineProperty(Gt,"__esModule",{value:!0});Gt.splitStream=void 0;var Zt=import.meta.require("stream"),Ki=Vt(),Qi=P();Gt.splitStream=Xi});var At=N((Xt)=>{async function Ji(n,c){var t;let f=0;const h=[],i=n.getReader();let r=!1;while(!r){const{done:x,value:y}=await i.read();if(y)h.push(y),f+=(t=y===null||y===void 0?void 0:y.byteLength)!==null&&t!==void 0?t:0;if(f>=c)break;r=x}i.releaseLock();const s=new Uint8Array(Math.min(c,f));let u=0;for(let x of h){if(x.byteLength>s.byteLength-u){s.set(x.subarray(0,s.byteLength-u),u);break}else s.set(x,u);u+=x.length}return s}Object.defineProperty(Xt,"__esModule",{value:!0});Xt.headStream=void 0;Xt.headStream=Ji});var Mt=N((bt)=>{Object.defineProperty(bt,"__esModule",{value:!0});bt.headStream=void 0;var Ai=import.meta.require("stream"),Wi=At(),bi=P(),Bi=(n,c)=>{if(bi.isReadableStream(n))return Wi.headStream(n,c);return new Promise((t,f)=>{const h=new Wt;h.limit=c,n.pipe(h),n.on("error",(i)=>{h.end(),f(i)}),h.on("error",f),h.on("finish",function(){const i=new Uint8Array(Buffer.concat(this.buffers));t(i)})})};bt.headStream=Bi;class Wt extends Ai.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write(n,c,t){var f;if(this.buffers.push(n),this.bytesBuffered+=(f=n.byteLength)!==null&&f!==void 0?f:0,this.bytesBuffered>=this.limit){const h=this.bytesBuffered-this.limit,i=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=i.subarray(0,i.byteLength-h),this.emit("finish")}t()}}});var lt=N((cs,b)=>{var Ht=function(n,c="utf-8"){if(c==="base64")return Rt.toBase64(n);return jt.toUtf8(n)},Pt=function(n,c){if(c==="base64")return Yn.mutate(Rt.fromBase64(n));return Yn.mutate(jt.fromUtf8(n))},un=Object.defineProperty,Mi=Object.getOwnPropertyDescriptor,Ri=Object.getOwnPropertyNames,ji=Object.prototype.hasOwnProperty,zn=(n,c)=>un(n,"name",{value:c,configurable:!0}),Hi=(n,c)=>{for(var t in c)un(n,t,{get:c[t],enumerable:!0})},Sn=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Ri(c))if(!ji.call(n,h)&&h!==t)un(n,h,{get:()=>c[h],enumerable:!(f=Mi(c,h))||f.enumerable})}return n},e=(n,c,t)=>(Sn(n,c,"default"),t&&Sn(t,c,"default")),Pi=(n)=>Sn(un({},"__esModule",{value:!0}),n),W={};Hi(W,{Uint8ArrayBlobAdapter:()=>Yn});b.exports=Pi(W);var Rt=nn(),jt=m();zn(Ht,"transformToString");zn(Pt,"transformFromString");var et=class n extends Uint8Array{static fromString(c,t="utf-8"){switch(typeof c){case"string":return Pt(c,t);default:throw new Error(`Unsupported conversion from ${typeof c} to Uint8ArrayBlobAdapter.`)}}static mutate(c){return Object.setPrototypeOf(c,n.prototype),c}transformToString(c="utf-8"){return Ht(this,c)}};zn(et,"Uint8ArrayBlobAdapter");var Yn=et;e(W,Cc(),b.exports);e(W,St(),b.exports);e(W,Qt(),b.exports);e(W,Mt(),b.exports);e(W,P(),b.exports)});var Pn=Q(xn(),1);class Nf{constructor(n){this.config=n,this.middlewareStack=Pn.constructStack()}send(n,c,t){const f=typeof c!=="function"?c:void 0,h=typeof c==="function"?c:t,i=f===void 0&&this.config.cacheMiddleware===!0;let r;if(i){if(!this.handlers)this.handlers=new WeakMap;const s=this.handlers;if(s.has(n.constructor))r=s.get(n.constructor);else r=n.resolveMiddleware(this.middlewareStack,this.config,f),s.set(n.constructor,r)}else delete this.handlers,r=n.resolveMiddleware(this.middlewareStack,this.config,f);if(h)r(n).then((s)=>h(null,s.output),(s)=>h(s)).catch(()=>{});else return r(n).then((s)=>s.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var en=Q(xn(),1),ln=Q(p(),1);class kn{constructor(){this.middlewareStack=en.constructStack()}static classBuilder(){return new On}resolveMiddlewareWithContext(n,c,t,{middlewareFn:f,clientName:h,commandName:i,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,smithyContext:u,additionalContext:x,CommandCtor:y}){for(let o of f.bind(this)(y,n,c,t))this.middlewareStack.use(o);const w=n.concat(this.middlewareStack),{logger:d}=c,T={logger:d,clientName:h,commandName:i,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,[ln.SMITHY_CONTEXT_KEY]:{commandInstance:this,...u},...x},{requestHandler:U}=c;return w.resolve((o)=>U.handle(o.request,t||{}),T)}}class On{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(n)=>n,this._outputFilterSensitiveLog=(n)=>n,this._serializer=null,this._deserializer=null}init(n){this._init=n}ep(n){return this._ep=n,this}m(n){return this._middlewareFn=n,this}s(n,c,t={}){return this._smithyContext={service:n,operation:c,...t},this}c(n={}){return this._additionalContext=n,this}n(n,c){return this._clientName=n,this._commandName=c,this}f(n=(t)=>t,c=(t)=>t){return this._inputFilterSensitiveLog=n,this._outputFilterSensitiveLog=c,this}ser(n){return this._serializer=n,this}de(n){return this._deserializer=n,this}build(){const n=this;let c;return c=class extends kn{static getEndpointParameterInstructions(){return n._ep}constructor(...[t]){super();this.serialize=n._serializer,this.deserialize=n._deserializer,this.input=t??{},n._init(this)}resolveMiddleware(t,f,h){return this.resolveMiddlewareWithContext(t,f,h,{CommandCtor:c,middlewareFn:n._middlewareFn,clientName:n._clientName,commandName:n._commandName,inputFilterSensitiveLog:n._inputFilterSensitiveLog,outputFilterSensitiveLog:n._outputFilterSensitiveLog,smithyContext:n._smithyContext,additionalContext:n._additionalContext})}}}}var Zr="***SensitiveInformation***";var Kr=(n,c)=>{for(let t of Object.keys(n)){const f=n[t],h=async function(r,s,u){const x=new f(r);if(typeof s==="function")this.send(x,s);else if(typeof u==="function"){if(typeof s!=="object")throw new Error(`Expected http options but got ${typeof s}`);this.send(x,s||{},u)}else return this.send(x,s)},i=(t[0].toLowerCase()+t.slice(1)).replace(/Command$/,"");c.prototype[i]=h}};class pn extends Error{constructor(n){super(n.message);Object.setPrototypeOf(this,pn.prototype),this.name=n.name,this.$fault=n.$fault,this.$metadata=n.$metadata}}var vn=(n,c={})=>{Object.entries(c).filter(([,f])=>f!==void 0).forEach(([f,h])=>{if(n[f]==null||n[f]==="")n[f]=h});const t=n.message||n.Message||"UnknownError";return n.message=t,delete n.Message,n};class gf{trace(){}debug(){}info(){}warn(){}error(){}}var wn=Q(lt(),1),ts=async(n=new Uint8Array,c)=>{if(n instanceof Uint8Array)return wn.Uint8ArrayBlobAdapter.mutate(n);if(!n)return wn.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const t=c.streamCollector(n);return wn.Uint8ArrayBlobAdapter.mutate(await t)};var hs=(n)=>{switch(n){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${n}"`)}};var ei=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string"){const c=parseFloat(n);if(!Number.isNaN(c)){if(String(c)!==String(n))_t.warn(mt(`Expected number but observed string: ${n}`));return c}}if(typeof n==="number")return n;throw new TypeError(`Expected number, got ${typeof n}: ${n}`)},li=Math.ceil(340282346638528860000000000000000000000),kt=(n)=>{const c=ei(n);if(c!==void 0&&!Number.isNaN(c)&&c!==Infinity&&c!==(-Infinity)){if(Math.abs(c)>li)throw new TypeError(`Expected 32-bit float, got ${n}`)}return c},Vn=(n)=>{if(n===null||n===void 0)return;if(Number.isInteger(n)&&!Number.isNaN(n))return n;throw new TypeError(`Expected integer, got ${typeof n}: ${n}`)};var Ot=(n)=>Zn(n,32),pt=(n)=>Zn(n,16),vt=(n)=>Zn(n,8),Zn=(n,c)=>{const t=Vn(n);if(t!==void 0&&ki(t,c)!==t)throw new TypeError(`Expected ${c}-bit integer, got ${n}`);return t},ki=(n,c)=>{switch(c){case 32:return Int32Array.of(n)[0];case 16:return Int16Array.of(n)[0];case 8:return Int8Array.of(n)[0]}},is=(n,c)=>{if(n===null||n===void 0){if(c)throw new TypeError(`Expected a non-null value for ${c}`);throw new TypeError("Expected a non-null value")}return n},rs=(n)=>{if(n===null||n===void 0)return;if(typeof n==="object"&&!Array.isArray(n))return n;const c=Array.isArray(n)?"array":typeof n;throw new TypeError(`Expected object, got ${c}: ${n}`)},ss=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string")return n;if(["boolean","number","bigint"].includes(typeof n))return _t.warn(mt(`Expected string, got ${typeof n}: ${n}`)),String(n);throw new TypeError(`Expected string, got ${typeof n}: ${n}`)};var qt=(n)=>{if(typeof n=="string")return kt(l(n));return kt(n)},Oi=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,l=(n)=>{const c=n.match(Oi);if(c===null||c[0].length!==n.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(n)};var us=(n)=>{if(typeof n==="string")return Vn(l(n));return Vn(n)};var ws=(n)=>{if(typeof n==="string")return Ot(l(n));return Ot(n)},B=(n)=>{if(typeof n==="string")return pt(l(n));return pt(n)},at=(n)=>{if(typeof n==="string")return vt(l(n));return vt(n)},mt=(n)=>{return String(new TypeError(n).stack||n).split("\n").slice(0,5).filter((c)=>!c.includes("stackTraceWarning")).join("\n")},_t={warn:console.warn};function ds(n){const c=n.getUTCFullYear(),t=n.getUTCMonth(),f=n.getUTCDay(),h=n.getUTCDate(),i=n.getUTCHours(),r=n.getUTCMinutes(),s=n.getUTCSeconds(),u=h<10?`0${h}`:`${h}`,x=i<10?`0${i}`:`${i}`,y=r<10?`0${r}`:`${r}`,w=s<10?`0${s}`:`${s}`;return`${pi[f]}, ${u} ${Kn[t]} ${c} ${x}:${y}:${w} GMT`}var pi=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Kn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],vi=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Es=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const c=vi.exec(n);if(!c)throw new TypeError("Invalid RFC-3339 date-time value");const[t,f,h,i,r,s,u,x]=c,y=B(M(f)),w=Z(h,"month",1,12),d=Z(i,"day",1,31);return k(y,w,d,{hours:r,minutes:s,seconds:u,fractionalMilliseconds:x})},qi=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Fs=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const c=qi.exec(n);if(!c)throw new TypeError("Invalid RFC-3339 date-time value");const[t,f,h,i,r,s,u,x,y]=c,w=B(M(f)),d=Z(h,"month",1,12),T=Z(i,"day",1,31),U=k(w,d,T,{hours:r,minutes:s,seconds:u,fractionalMilliseconds:x});if(y.toUpperCase()!="Z")U.setTime(U.getTime()-sr(y));return U},ai=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$/),mi=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$/),_i=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})$/),Cs=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let c=ai.exec(n);if(c){const[t,f,h,i,r,s,u,x]=c;return k(B(M(i)),Gn(h),Z(f,"day",1,31),{hours:r,minutes:s,seconds:u,fractionalMilliseconds:x})}if(c=mi.exec(n),c){const[t,f,h,i,r,s,u,x]=c;return tr(k(nr(i),Gn(h),Z(f,"day",1,31),{hours:r,minutes:s,seconds:u,fractionalMilliseconds:x}))}if(c=_i.exec(n),c){const[t,f,h,i,r,s,u,x]=c;return k(B(M(x)),Gn(f),Z(h.trimLeft(),"day",1,31),{hours:i,minutes:r,seconds:s,fractionalMilliseconds:u})}throw new TypeError("Invalid RFC-7231 date-time value")};var k=(n,c,t,f)=>{const h=c-1;return hr(n,h,t),new Date(Date.UTC(n,h,t,Z(f.hours,"hour",0,23),Z(f.minutes,"minute",0,59),Z(f.seconds,"seconds",0,60),rr(f.fractionalMilliseconds)))},nr=(n)=>{const c=(new Date()).getUTCFullYear(),t=Math.floor(c/100)*100+B(M(n));if(t<c)return t+100;return t},cr=1576800000000,tr=(n)=>{if(n.getTime()-(new Date()).getTime()>cr)return new Date(Date.UTC(n.getUTCFullYear()-100,n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds()));return n},Gn=(n)=>{const c=Kn.indexOf(n);if(c<0)throw new TypeError(`Invalid month: ${n}`);return c+1},fr=[31,28,31,30,31,30,31,31,30,31,30,31],hr=(n,c,t)=>{let f=fr[c];if(c===1&&ir(n))f=29;if(t>f)throw new TypeError(`Invalid day for ${Kn[c]} in ${n}: ${t}`)},ir=(n)=>{return n%4===0&&(n%100!==0||n%400===0)},Z=(n,c,t,f)=>{const h=at(M(n));if(h<t||h>f)throw new TypeError(`${c} must be between ${t} and ${f}, inclusive`);return h},rr=(n)=>{if(n===null||n===void 0)return 0;return qt("0."+n)*1000},sr=(n)=>{const c=n[0];let t=1;if(c=="+")t=1;else if(c=="-")t=-1;else throw new TypeError(`Offset direction, ${c}, must be "+" or "-"`);const f=Number(n.substring(1,3)),h=Number(n.substring(4,6));return t*(f*60+h)*60*1000},M=(n)=>{let c=0;while(c<n.length-1&&n.charAt(c)==="0")c++;if(c===0)return n;return n.slice(c)};var ur=({output:n,parsedBody:c,exceptionCtor:t,errorCode:f})=>{const h=wr(n),i=h.httpStatusCode?h.httpStatusCode+"":void 0,r=new t({name:c?.code||c?.Code||f||i||"UnknownError",$fault:"client",$metadata:h});throw vn(r,c)},ys=(n)=>{return({output:c,parsedBody:t,errorCode:f})=>{ur({output:c,parsedBody:t,exceptionCtor:n,errorCode:f})}},wr=(n)=>({httpStatusCode:n.statusCode,requestId:n.headers["x-amzn-requestid"]??n.headers["x-amzn-request-id"]??n.headers["x-amz-request-id"],extendedRequestId:n.headers["x-amz-id-2"],cfId:n.headers["x-amz-cf-id"]});var Ls=(n)=>{switch(n){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 nf=!1,Ns=(n)=>{if(n&&!nf&&parseInt(n.substring(1,n.indexOf(".")))<16)nf=!0};var Qn=Q(p(),1);var cf=(n)=>{const c=[];for(let t in Qn.AlgorithmId){const f=Qn.AlgorithmId[t];if(n[f]===void 0)continue;c.push({algorithmId:()=>f,checksumConstructor:()=>n[f]})}return{_checksumAlgorithms:c,addChecksumAlgorithm(t){this._checksumAlgorithms.push(t)},checksumAlgorithms(){return this._checksumAlgorithms}}},tf=(n)=>{const c={};return n.checksumAlgorithms().forEach((t)=>{c[t.algorithmId()]=t.checksumConstructor()}),c};var ff=(n)=>{let c=n.retryStrategy;return{setRetryStrategy(t){c=t},retryStrategy(){return c}}},hf=(n)=>{const c={};return c.retryStrategy=n.retryStrategy(),c};var Zs=(n)=>{return{...cf(n),...ff(n)}};var Gs=(n)=>{return{...tf(n),...hf(n)}};function Tr(n){return encodeURIComponent(n).replace(/[!'()*]/g,function(c){return"%"+c.charCodeAt(0).toString(16).toUpperCase()})}var Xn=function(){const n=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(t,n.prototype),t};Xn.prototype=Object.create(String.prototype,{constructor:{value:Xn,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(Xn,String);function $r(n,c,t){let f,h,i;if(typeof c==="undefined"&&typeof t==="undefined")f={},i=n;else if(f=n,typeof c==="function")return h=c,i=t,xr(f,h,i);else i=c;for(let r of Object.keys(i)){if(!Array.isArray(i[r])){f[r]=i[r];continue}rf(f,null,i,r)}return f}var Bs=(n,c)=>{const t={};for(let f in c)rf(t,n,c,f);return t},xr=(n,c,t)=>{return $r(n,Object.entries(t).reduce((f,[h,i])=>{if(Array.isArray(i))f[h]=i;else if(typeof i==="function")f[h]=[c,i()];else f[h]=[c,i];return f},{}))},rf=(n,c,t,f)=>{if(c!==null){let r=t[f];if(typeof r==="function")r=[,r];const[s=dr,u=Er,x=f]=r;if(typeof s==="function"&&s(c[x])||typeof s!=="function"&&!!s)n[f]=u(c[x]);return}let[h,i]=t[f];if(typeof i==="function"){let r;const s=h===void 0&&(r=i())!=null,u=typeof h==="function"&&!!h(void 0)||typeof h!=="function"&&!!h;if(s)n[f]=r;else if(u)n[f]=i()}else{const r=h===void 0&&i!=null,s=typeof h==="function"&&!!h(i)||typeof h!=="function"&&!!h;if(r||s)n[f]=i}},dr=(n)=>n!=null,Er=(n)=>n;var Hs=(n)=>n.toISOString().replace(".000Z","Z");var sf=(n)=>{if(n==null)return{};if(Array.isArray(n))return n.filter((c)=>c!=null).map(sf);if(typeof n==="object"){const c={};for(let t of Object.keys(n)){if(n[t]==null)continue;c[t]=sf(n[t])}return c}return n};var F0=(n)=>{let c=n.httpHandler;return{setHttpHandler(t){c=t},httpHandler(){return c},updateHttpClientConfig(t,f){c.updateHttpClientConfig(t,f)},httpHandlerConfigs(){return c.httpHandlerConfigs()}}},C0=(n)=>{return{httpHandler:n.httpHandler()}};var Fr=Q(p(),1);var Cr=function(n){return Object.keys(n).reduce((c,t)=>{const f=n[t];return{...c,[t]:Array.isArray(f)?[...f]:f}},{})};class Jn{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){const c=new Jn({...n,headers:{...n.headers}});if(c.query)c.query=Cr(c.query);return c}static isInstance(n){if(!n)return!1;const c=n;return"method"in c&&"protocol"in c&&"hostname"in c&&"path"in c&&typeof c.query==="object"&&typeof c.headers==="object"}clone(){return Jn.clone(this)}}class Tn{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;const c=n;return typeof c.statusCode==="number"&&typeof c.headers==="object"}}var Ff=Q(j(),1);import{Agent as df,request as yr} from"http";import{Agent as Ef,request as or} from"https";var uf=["ECONNRESET","EPIPE","ETIMEDOUT"];var An=(n)=>{const c={};for(let t of Object.keys(n)){const f=n[t];c[t]=Array.isArray(f)?f.join(","):f}return c};var wf=(n,c,t=0)=>{if(!t)return-1;const f=(h)=>{const i=setTimeout(()=>{n.destroy(),c(Object.assign(new Error(`Socket timed out without establishing a connection within ${t} ms`),{name:"TimeoutError"}))},t-h),r=(s)=>{if(s?.connecting)s.on("connect",()=>{clearTimeout(i)});else clearTimeout(i)};if(n.socket)r(n.socket);else n.on("socket",r)};if(t<2000)return f(0),0;return setTimeout(f.bind(null,1000),1000)};var Tf=(n,{keepAlive:c,keepAliveMsecs:t},f=3000)=>{if(c!==!0)return-1;const h=()=>{if(n.socket)n.socket.setKeepAlive(c,t||0);else n.on("socket",(i)=>{i.setKeepAlive(c,t||0)})};if(f===0)return h(),0;return setTimeout(h,f)};var $f=(n,c,t=0)=>{const f=(h)=>{n.setTimeout(t-h,()=>{n.destroy(),c(Object.assign(new Error(`Connection timed out after ${t} ms`),{name:"TimeoutError"}))})};if(0<t&&t<6000)return f(0),0;return setTimeout(f.bind(null,t===0?0:3000),3000)};import{Readable as Ur} from"stream";async function Wn(n,c,t=xf){const f=c.headers??{},h=f.Expect||f.expect;let i=-1,r=!1;if(h==="100-continue")await Promise.race([new Promise((s)=>{i=Number(setTimeout(s,Math.max(xf,t)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(i),s()}),n.on("error",()=>{r=!0,clearTimeout(i),s()})})]);if(!r)Ir(n,c.body)}var Ir=function(n,c){if(c instanceof Ur){c.pipe(n);return}if(c){if(Buffer.isBuffer(c)||typeof c==="string"){n.end(c);return}const t=c;if(typeof t==="object"&&t.buffer&&typeof t.byteOffset==="number"&&typeof t.byteLength==="number"){n.end(Buffer.from(t.buffer,t.byteOffset,t.byteLength));return}n.end(Buffer.from(c));return}n.end()},xf=1000;class bn{static create(n){if(typeof n?.handle==="function")return n;return new bn(n)}static checkSocketUsage(n,c,t=console){const{sockets:f,requests:h,maxSockets:i}=n;if(typeof i!=="number"||i===Infinity)return c;const r=15000;if(Date.now()-r<c)return c;if(f&&h)for(let s in f){const u=f[s]?.length??0,x=h[s]?.length??0;if(u>=i&&x>=2*i)return t?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${u} 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 c}constructor(n){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((c,t)=>{if(typeof n==="function")n().then((f)=>{c(this.resolveDefaultConfig(f))}).catch(t);else c(this.resolveDefaultConfig(n))})}resolveDefaultConfig(n){const{requestTimeout:c,connectionTimeout:t,socketTimeout:f,httpAgent:h,httpsAgent:i}=n||{};return{connectionTimeout:t,requestTimeout:c??f,httpAgent:(()=>{if(h instanceof df||typeof h?.destroy==="function")return h;return new df({keepAlive:!0,maxSockets:50,...h})})(),httpsAgent:(()=>{if(i instanceof Ef||typeof i?.destroy==="function")return i;return new Ef({keepAlive:!0,maxSockets:50,...i})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(n,{abortSignal:c}={}){if(!this.config)this.config=await this.configProvider;return new Promise((t,f)=>{let h=void 0;const i=[],r=async($)=>{await h,i.forEach(clearTimeout),t($)},s=async($)=>{await h,i.forEach(clearTimeout),f($)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(c?.aborted){const $=new Error("Request aborted");$.name="AbortError",s($);return}const u=n.protocol==="https:",x=u?this.config.httpsAgent:this.config.httpAgent;i.push(setTimeout(()=>{this.socketWarningTimestamp=bn.checkSocketUsage(x,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const y=Ff.buildQueryString(n.query||{});let w=void 0;if(n.username!=null||n.password!=null){const $=n.username??"",E=n.password??"";w=`${$}:${E}`}let d=n.path;if(y)d+=`?${y}`;if(n.fragment)d+=`#${n.fragment}`;let T=n.hostname??"";if(T[0]==="["&&T.endsWith("]"))T=n.hostname.slice(1,-1);else T=n.hostname;const U={headers:n.headers,host:T,method:n.method,path:d,port:n.port,agent:x,auth:w},F=(u?or:yr)(U,($)=>{const E=new Tn({statusCode:$.statusCode||-1,reason:$.statusMessage,headers:An($.headers),body:$});r({response:E})});if(F.on("error",($)=>{if(uf.includes($.code))s(Object.assign($,{name:"TimeoutError"}));else s($)}),c){const $=()=>{F.destroy();const E=new Error("Request aborted");E.name="AbortError",s(E)};if(typeof c.addEventListener==="function"){const E=c;E.addEventListener("abort",$,{once:!0}),F.once("close",()=>E.removeEventListener("abort",$))}else c.onabort=$}i.push(wf(F,s,this.config.connectionTimeout)),i.push($f(F,s,this.config.requestTimeout));const C=U.agent;if(typeof C==="object"&&"keepAlive"in C)i.push(Tf(F,{keepAlive:C.keepAlive,keepAliveMsecs:C.keepAliveMsecs}));h=Wn(F,n,this.config.requestTimeout).catch(($)=>{return i.forEach(clearTimeout),f($)})})}updateHttpClientConfig(n,c){this.config=void 0,this.configProvider=this.configProvider.then((t)=>{return{...t,[n]:c}})}httpHandlerConfigs(){return this.config??{}}}var Lr=Q(j(),1);import{Writable as Dr} from"stream";class Bn extends Dr{constructor(){super(...arguments);this.bufferedBytes=[]}_write(n,c,t){this.bufferedBytes.push(n),t()}}async function gr(n){const c=[],t=n.getReader();let f=!1,h=0;while(!f){const{done:s,value:u}=await t.read();if(u)c.push(u),h+=u.length;f=s}const i=new Uint8Array(h);let r=0;for(let s of c)i.set(s,r),r+=s.length;return i}var Tu=(n)=>{if(Nr(n))return gr(n);return new Promise((c,t)=>{const f=new Bn;n.pipe(f),n.on("error",(h)=>{f.end(),t(h)}),f.on("error",t),f.on("finish",function(){const h=new Uint8Array(Buffer.concat(this.bufferedBytes));c(h)})})},Nr=(n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream;export{F0 as xa,C0 as ya,Jn as za,Tn as Aa,mn as Ba,R as Ca,m as Da,gf as Ea,xn as Fa,Nf as Ga,nn as Ha,Un as Ia,Zc as Ja,dt as Ka,lt as La,ts as Ma,kn as Na,Zr as Oa,Kr as Pa,hs as Qa,Vn as Ra,Ot as Sa,is as Ta,rs as Ua,ss as Va,us as Wa,ws as Xa,ds as Ya,Es as Za,Fs as _a,Cs as $a,pn as ab,vn as bb,ys as cb,Ls as db,Ns as eb,Zs as fb,Gs as gb,Tr as hb,$r as ib,Bs as jb,Hs as kb,sf as lb,bn as mb,Tu as nb};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var et=function(t,e){return(e?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(t)},F=function(t,e=!1){let s=[],i=0;for(;i<t.length;){let a=t[i],u=function(o){if(!e)throw new TypeError(o);s.push({type:"INVALID_CHAR",index:i,value:t[i++]})};if(a==="*"){s.push({type:"ASTERISK",index:i,value:t[i++]});continue}if(a==="+"||a==="?"){s.push({type:"OTHER_MODIFIER",index:i,value:t[i++]});continue}if(a==="\\"){s.push({type:"ESCAPED_CHAR",index:i++,value:t[i++]});continue}if(a==="{"){s.push({type:"OPEN",index:i,value:t[i++]});continue}if(a==="}"){s.push({type:"CLOSE",index:i,value:t[i++]});continue}if(a===":"){let o="",r=i+1;for(;r<t.length;){let h=t.substr(r,1);if(r===i+1&&Y.test(h)||r!==i+1&&tt.test(h)){o+=t[r++];continue}break}if(!o){u(`Missing parameter name at ${i}`);continue}s.push({type:"NAME",index:i,value:o}),i=r;continue}if(a==="("){let o=1,r="",h=i+1,n=!1;if(t[h]==="?"){u(`Pattern cannot start with "?" at ${h}`);continue}for(;h<t.length;){if(!et(t[h],!1)){u(`Invalid character '${t[h]}' at ${h}.`),n=!0;break}if(t[h]==="\\"){r+=t[h++]+t[h++];continue}if(t[h]===")"){if(o--,o===0){h++;break}}else if(t[h]==="("&&(o++,t[h+1]!=="?")){u(`Capturing groups are not allowed at ${h}`),n=!0;break}r+=t[h++]}if(n)continue;if(o){u(`Unbalanced pattern at ${i}`);continue}if(!r){u(`Missing pattern at ${i}`);continue}s.push({type:"REGEX",index:i,value:r}),i=h;continue}s.push({type:"CHAR",index:i,value:t[i++]})}return s.push({type:"END",index:i,value:""}),s},M=function(t,e={}){let s=F(t);e.delimiter??="/#?",e.prefixes??="./";let i=`[^${d(e.delimiter)}]+?`,a=[],u=0,o=0,r="",h=new Set,n=(p)=>{if(o<s.length&&s[o].type===p)return s[o++].value},f=()=>n("OTHER_MODIFIER")??n("ASTERISK"),w=(p)=>{let c=n(p);if(c!==void 0)return c;let{type:l,index:R}=s[o];throw new TypeError(`Unexpected ${l} at ${R}, expected ${p}`)},E=()=>{let p="",c;for(;c=n("CHAR")??n("ESCAPED_CHAR");)p+=c;return p},Q=(p)=>p,T=e.encodePart||Q,U="",O=(p)=>{U+=p},I=()=>{U.length&&(a.push(new P(3,"","",T(U),"",3)),U="")},_=(p,c,l,R,v)=>{let g=3;switch(v){case"?":g=1;break;case"*":g=0;break;case"+":g=2;break}if(!c&&!l&&g===3){O(p);return}if(I(),!c&&!l){if(!p)return;a.push(new P(3,"","",T(p),"",g));return}let m;l?l==="*"?m=D:m=l:m=i;let C=2;m===i?(C=1,m=""):m===D&&(C=0,m="");let b;if(c?b=c:l&&(b=u++),h.has(b))throw new TypeError(`Duplicate name '${b}'.`);h.add(b),a.push(new P(C,b,T(p),m,T(R),g))};for(;o<s.length;){let p=n("CHAR"),c=n("NAME"),l=n("REGEX");if(!c&&!l&&(l=n("ASTERISK")),c||l){let v=p??"";e.prefixes.indexOf(v)===-1&&(O(v),v=""),I();let g=f();_(v,c,l,"",g);continue}let R=p??n("ESCAPED_CHAR");if(R){O(R);continue}if(n("OPEN")){let v=E(),g=n("NAME"),m=n("REGEX");!g&&!m&&(m=n("ASTERISK"));let C=E();w("CLOSE");let b=f();_(v,g,m,C,b);continue}I(),w("END")}return a},d=function(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")},j=function(t){return t&&t.ignoreCase?"ui":"u"},st=function(t,e,s){return W(M(t,s),e,s)},k=function(t){switch(t){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}},W=function(t,e,s={}){s.delimiter??="/#?",s.prefixes??="./",s.sensitive??=!1,s.strict??=!1,s.end??=!0,s.start??=!0,s.endsWith="";let i=s.start?"^":"";for(let r of t){if(r.type===3){r.modifier===3?i+=d(r.value):i+=`(?:${d(r.value)})${k(r.modifier)}`;continue}e&&e.push(r.name);let h=`[^${d(s.delimiter)}]+?`,n=r.value;if(r.type===1?n=h:r.type===0&&(n=D),!r.prefix.length&&!r.suffix.length){r.modifier===3||r.modifier===1?i+=`(${n})${k(r.modifier)}`:i+=`((?:${n})${k(r.modifier)})`;continue}if(r.modifier===3||r.modifier===1){i+=`(?:${d(r.prefix)}(${n})${d(r.suffix)})`,i+=k(r.modifier);continue}i+=`(?:${d(r.prefix)}`,i+=`((?:${n})(?:`,i+=d(r.suffix),i+=d(r.prefix),i+=`(?:${n}))*)${d(r.suffix)})`,r.modifier===0&&(i+="?")}let a=`[${d(s.endsWith)}]|\$`,u=`[${d(s.delimiter)}]`;if(s.end)return s.strict||(i+=`${u}?`),s.endsWith.length?i+=`(?=${a})`:i+="$",new RegExp(i,j(s));s.strict||(i+=`(?:${u}(?=${a}))?`);let o=!1;if(t.length){let r=t[t.length-1];r.type===3&&r.modifier===3&&(o=s.delimiter.indexOf(r)>-1)}return o||(i+=`(?=${u}|${a})`),new RegExp(i,j(s))},nt=function(t,e){return t.length?t[0]==="/"?!0:!e||t.length<2?!1:(t[0]=="\\"||t[0]=="{")&&t[1]=="/":!1},G=function(t,e){return t.startsWith(e)?t.substring(e.length,t.length):t},ot=function(t,e){return t.endsWith(e)?t.substr(0,t.length-e.length):t},K=function(t){return!t||t.length<2?!1:t[0]==="["||(t[0]==="\\"||t[0]==="{")&&t[1]==="["},V=function(t){if(!t)return!0;for(let e of X)if(t.test(e))return!0;return!1},ht=function(t,e){if(t=G(t,"#"),e||t==="")return t;let s=new URL("https://example.com");return s.hash=t,s.hash?s.hash.substring(1,s.hash.length):""},at=function(t,e){if(t=G(t,"?"),e||t==="")return t;let s=new URL("https://example.com");return s.search=t,s.search?s.search.substring(1,s.search.length):""},ut=function(t,e){return e||t===""?t:K(t)?q(t):Z(t)},pt=function(t,e){if(e||t==="")return t;let s=new URL("https://example.com");return s.password=t,s.password},ct=function(t,e){if(e||t==="")return t;let s=new URL("https://example.com");return s.username=t,s.username},ft=function(t,e,s){if(s||t==="")return t;if(e&&!X.includes(e))return new URL(`${e}:${t}`).pathname;let i=t[0]=="/";return t=new URL(i?t:"/-"+t,"https://example.com").pathname,i||(t=t.substring(2,t.length)),t},lt=function(t,e,s){return z(e)===t&&(t=""),s||t===""?t:B(t)},mt=function(t,e){return t=ot(t,":"),e||t===""?t:N(t)},z=function(t){switch(t){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}},N=function(t){if(t==="")return t;if(/^[-+.A-Za-z0-9]*$/.test(t))return t.toLowerCase();throw new TypeError(`Invalid protocol '${t}'.`)},dt=function(t){if(t==="")return t;let e=new URL("https://example.com");return e.username=t,e.username},gt=function(t){if(t==="")return t;let e=new URL("https://example.com");return e.password=t,e.password},Z=function(t){if(t==="")return t;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(t))throw new TypeError(`Invalid hostname '${t}'`);let e=new URL("https://example.com");return e.hostname=t,e.hostname},q=function(t){if(t==="")return t;if(/[^0-9a-fA-F[\]:]/g.test(t))throw new TypeError(`Invalid IPv6 hostname '${t}'`);return t.toLowerCase()},B=function(t){if(t===""||/^[0-9]*$/.test(t)&&parseInt(t)<=65535)return t;throw new TypeError(`Invalid port '${t}'.`)},wt=function(t){if(t==="")return t;let e=new URL("https://example.com");return e.pathname=t[0]!=="/"?"/-"+t:t,t[0]!=="/"?e.pathname.substring(2,e.pathname.length):e.pathname},yt=function(t){return t===""?t:new URL(`data:${t}`).pathname},vt=function(t){if(t==="")return t;let e=new URL("https://example.com");return e.search=t,e.search.substring(1,e.search.length)},bt=function(t){if(t==="")return t;let e=new URL("https://example.com");return e.hash=t,e.hash.substring(1,e.hash.length)},H=function(t,e){if(typeof t!="string")throw new TypeError("parameter 1 is not of type 'string'.");let s=new URL(t,e);return{protocol:s.protocol.substring(0,s.protocol.length-1),username:s.username,password:s.password,hostname:s.hostname,port:s.port,pathname:s.pathname,search:s.search!==""?s.search.substring(1,s.search.length):void 0,hash:s.hash!==""?s.hash.substring(1,s.hash.length):void 0}},y=function(t,e){return e?A(t):t},L=function(t,e,s){let i;if(typeof e.baseURL=="string")try{i=new URL(e.baseURL),e.protocol===void 0&&(t.protocol=y(i.protocol.substring(0,i.protocol.length-1),s)),!s&&e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.username===void 0&&(t.username=y(i.username,s)),!s&&e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.username===void 0&&e.password===void 0&&(t.password=y(i.password,s)),e.protocol===void 0&&e.hostname===void 0&&(t.hostname=y(i.hostname,s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&(t.port=y(i.port,s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&(t.pathname=y(i.pathname,s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&e.search===void 0&&(t.search=y(i.search.substring(1,i.search.length),s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&e.search===void 0&&e.hash===void 0&&(t.hash=y(i.hash.substring(1,i.hash.length),s))}catch{throw new TypeError(`invalid baseURL '${e.baseURL}'.`)}if(typeof e.protocol=="string"&&(t.protocol=mt(e.protocol,s)),typeof e.username=="string"&&(t.username=ct(e.username,s)),typeof e.password=="string"&&(t.password=pt(e.password,s)),typeof e.hostname=="string"&&(t.hostname=ut(e.hostname,s)),typeof e.port=="string"&&(t.port=lt(e.port,t.protocol,s)),typeof e.pathname=="string"){if(t.pathname=e.pathname,i&&!nt(t.pathname,s)){let a=i.pathname.lastIndexOf("/");a>=0&&(t.pathname=y(i.pathname.substring(0,a+1),s)+t.pathname)}t.pathname=ft(t.pathname,t.protocol,s)}return typeof e.search=="string"&&(t.search=at(e.search,s)),typeof e.hash=="string"&&(t.hash=ht(e.hash,s)),t},A=function(t){return t.replace(/([+*?:{}()\\])/g,"\\$1")},$t=function(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")},Et=function(t,e){e.delimiter??="/#?",e.prefixes??="./",e.sensitive??=!1,e.strict??=!1,e.end??=!0,e.start??=!0,e.endsWith="";let s=".*",i=`[^${$t(e.delimiter)}]+?`,a=/[$_\u200C\u200D\p{ID_Continue}]/u,u="";for(let o=0;o<t.length;++o){let r=t[o];if(r.type===3){if(r.modifier===3){u+=A(r.value);continue}u+=`{${A(r.value)}}${k(r.modifier)}`;continue}let h=r.hasCustomName(),n=!!r.suffix.length||!!r.prefix.length&&(r.prefix.length!==1||!e.prefixes.includes(r.prefix)),f=o>0?t[o-1]:null,w=o<t.length-1?t[o+1]:null;if(!n&&h&&r.type===1&&r.modifier===3&&w&&!w.prefix.length&&!w.suffix.length)if(w.type===3){let E=w.value.length>0?w.value[0]:"";n=a.test(E)}else n=!w.hasCustomName();if(!n&&!r.prefix.length&&f&&f.type===3){let E=f.value[f.value.length-1];n=e.prefixes.includes(E)}n&&(u+="{"),u+=A(r.prefix),h&&(u+=`:${r.name}`),r.type===2?u+=`(${r.value})`:r.type===1?h||(u+=`(${i})`):r.type===0&&(!h&&(!f||f.type===3||f.modifier!==3||n||r.prefix!=="")?u+="*":u+=`(${s})`),r.type===1&&h&&r.suffix.length&&a.test(r.suffix[0])&&(u+="\\"),u+=A(r.suffix),n&&(u+="}"),r.modifier!==3&&(u+=k(r.modifier))}return u},P=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(t,e,s,i,a,u){this.type=t,this.name=e,this.prefix=s,this.value=i,this.suffix=a,this.modifier=u}hasCustomName(){return this.name!==""&&typeof this.name!="number"}},Y=/[$_\p{ID_Start}]/u,tt=/[$_\u200C\u200D\p{ID_Continue}]/u,D=".*",$={delimiter:"",prefixes:"",sensitive:!0,strict:!0},rt={delimiter:".",prefixes:"",sensitive:!0,strict:!0},it={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0},X=["ftp","file","http","https","ws","wss"],xt=class{#n;#r=[];#e={};#t=0;#i=1;#u=0;#h=0;#l=0;#m=0;#d=!1;constructor(t){this.#n=t}get result(){return this.#e}parse(){for(this.#r=F(this.#n,!0);this.#t<this.#r.length;this.#t+=this.#i){if(this.#i=1,this.#r[this.#t].type==="END"){if(this.#h===0){this.#v(),this.#p()?this.#s(9,1):this.#c()?this.#s(8,1):this.#s(7,0);continue}else if(this.#h===2){this.#f(5);continue}this.#s(10,0);break}if(this.#l>0)if(this.#C())this.#l-=1;else continue;if(this.#k()){this.#l+=1;continue}switch(this.#h){case 0:this.#b()&&this.#f(1);break;case 1:if(this.#b()){this.#P();let t=7,e=1;this.#$()?(t=2,e=3):this.#d&&(t=2),this.#s(t,e)}break;case 2:this.#w()?this.#f(3):(this.#y()||this.#c()||this.#p())&&this.#f(5);break;case 3:this.#E()?this.#s(4,1):this.#w()&&this.#s(5,1);break;case 4:this.#w()&&this.#s(5,1);break;case 5:this.#L()?this.#m+=1:this.#A()&&(this.#m-=1),this.#R()&&!this.#m?this.#s(6,1):this.#y()?this.#s(7,0):this.#c()?this.#s(8,1):this.#p()&&this.#s(9,1);break;case 6:this.#y()?this.#s(7,0):this.#c()?this.#s(8,1):this.#p()&&this.#s(9,1);break;case 7:this.#c()?this.#s(8,1):this.#p()&&this.#s(9,1);break;case 8:this.#p()&&this.#s(9,1);break;case 9:break;case 10:break}}this.#e.hostname!==void 0&&this.#e.port===void 0&&(this.#e.port="")}#s(t,e){switch(this.#h){case 0:break;case 1:this.#e.protocol=this.#a();break;case 2:break;case 3:this.#e.username=this.#a();break;case 4:this.#e.password=this.#a();break;case 5:this.#e.hostname=this.#a();break;case 6:this.#e.port=this.#a();break;case 7:this.#e.pathname=this.#a();break;case 8:this.#e.search=this.#a();break;case 9:this.#e.hash=this.#a();break;case 10:break}this.#h!==0&&t!==10&&([1,2,3,4].includes(this.#h)&&[6,7,8,9].includes(t)&&(this.#e.hostname??=""),[1,2,3,4,5,6].includes(this.#h)&&[8,9].includes(t)&&(this.#e.pathname??=this.#d?"/":""),[1,2,3,4,5,6,7].includes(this.#h)&&t===9&&(this.#e.search??="")),this.#x(t,e)}#x(t,e){this.#h=t,this.#u=this.#t+e,this.#t+=e,this.#i=0}#v(){this.#t=this.#u,this.#i=0}#f(t){this.#v(),this.#h=t}#g(t){return t<0&&(t=this.#r.length-t),t<this.#r.length?this.#r[t]:this.#r[this.#r.length-1]}#o(t,e){let s=this.#g(t);return s.value===e&&(s.type==="CHAR"||s.type==="ESCAPED_CHAR"||s.type==="INVALID_CHAR")}#b(){return this.#o(this.#t,":")}#$(){return this.#o(this.#t+1,"/")&&this.#o(this.#t+2,"/")}#w(){return this.#o(this.#t,"@")}#E(){return this.#o(this.#t,":")}#R(){return this.#o(this.#t,":")}#y(){return this.#o(this.#t,"/")}#c(){if(this.#o(this.#t,"?"))return!0;if(this.#r[this.#t].value!=="?")return!1;let t=this.#g(this.#t-1);return t.type!=="NAME"&&t.type!=="REGEX"&&t.type!=="CLOSE"&&t.type!=="ASTERISK"}#p(){return this.#o(this.#t,"#")}#k(){return this.#r[this.#t].type=="OPEN"}#C(){return this.#r[this.#t].type=="CLOSE"}#L(){return this.#o(this.#t,"[")}#A(){return this.#o(this.#t,"]")}#a(){let t=this.#r[this.#t],e=this.#g(this.#u).index;return this.#n.substring(e,t.index)}#P(){let t={};Object.assign(t,$),t.encodePart=N;let e=st(this.#a(),void 0,t);this.#d=V(e)}},S=["protocol","username","password","hostname","port","pathname","search","hash"],x="*",J=class{#n;#r={};#e={};#t={};#i={};#u=!1;constructor(t={},e,s){try{let i;if(typeof e=="string"?i=e:s=e,typeof t=="string"){let r=new xt(t);if(r.parse(),t=r.result,i===void 0&&typeof t.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");t.baseURL=i}else{if(!t||typeof t!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(i)throw new TypeError("parameter 1 is not of type 'string'.")}typeof s>"u"&&(s={ignoreCase:!1});let a={ignoreCase:s.ignoreCase===!0},u={pathname:x,protocol:x,username:x,password:x,hostname:x,port:x,search:x,hash:x};this.#n=L(u,t,!0),z(this.#n.protocol)===this.#n.port&&(this.#n.port="");let o;for(o of S){if(!(o in this.#n))continue;let r={},h=this.#n[o];switch(this.#e[o]=[],o){case"protocol":Object.assign(r,$),r.encodePart=N;break;case"username":Object.assign(r,$),r.encodePart=dt;break;case"password":Object.assign(r,$),r.encodePart=gt;break;case"hostname":Object.assign(r,rt),K(h)?r.encodePart=q:r.encodePart=Z;break;case"port":Object.assign(r,$),r.encodePart=B;break;case"pathname":V(this.#r.protocol)?(Object.assign(r,it,a),r.encodePart=wt):(Object.assign(r,$,a),r.encodePart=yt);break;case"search":Object.assign(r,$,a),r.encodePart=vt;break;case"hash":Object.assign(r,$,a),r.encodePart=bt;break}try{this.#i[o]=M(h,r),this.#r[o]=W(this.#i[o],this.#e[o],r),this.#t[o]=Et(this.#i[o],r),this.#u=this.#u||this.#i[o].some((n)=>n.type===2)}catch{throw new TypeError(`invalid ${o} pattern '${this.#n[o]}'.`)}}}catch(i){throw new TypeError(`Failed to construct 'URLPattern': ${i.message}`)}}test(t={},e){let s={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return!1;try{typeof t=="object"?s=L(s,t,!1):s=L(s,H(t,e),!1)}catch{return!1}let i;for(i of S)if(!this.#r[i].exec(s[i]))return!1;return!0}exec(t={},e){let s={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return;try{typeof t=="object"?s=L(s,t,!1):s=L(s,H(t,e),!1)}catch{return null}let i={};e?i.inputs=[t,e]:i.inputs=[t];let a;for(a of S){let u=this.#r[a].exec(s[a]);if(!u)return null;let o={};for(let[r,h]of this.#e[a].entries())if(typeof h=="string"||typeof h=="number"){let n=u[r+1];o[h]=n}i[a]={input:s[a]??"",groups:o}}return i}static compareComponent(t,e,s){let i=(r,h)=>{for(let n of["type","modifier","prefix","value","suffix"]){if(r[n]<h[n])return-1;if(r[n]===h[n])continue;return 1}return 0},a=new P(3,"","","","",3),u=new P(0,"","","","",3),o=(r,h)=>{let n=0;for(;n<Math.min(r.length,h.length);++n){let f=i(r[n],h[n]);if(f)return f}return r.length===h.length?0:i(r[n]??a,h[n]??a)};return!e.#t[t]&&!s.#t[t]?0:e.#t[t]&&!s.#t[t]?o(e.#i[t],[u]):!e.#t[t]&&s.#t[t]?o([u],s.#i[t]):o(e.#i[t],s.#i[t])}get protocol(){return this.#t.protocol}get username(){return this.#t.username}get password(){return this.#t.password}get hostname(){return this.#t.hostname}get port(){return this.#t.port}get pathname(){return this.#t.pathname}get search(){return this.#t.search}get hash(){return this.#t.hash}get hasRegExpGroups(){return this.#u}};if(!globalThis.URLPattern)globalThis.URLPattern=J;function Tt(t){const e=t.toString(),s=new Bun.CryptoHasher("sha1");return s.update(e),s.digest("hex")}
|
|
2
|
-
export{J as x,Tt as y};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-2c5ecf8dc0a97aba.js";import{B as M} from"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-28694e5e949df0ff.js";import{$ as Al,O as Il,P as Sl,Q as E0,R as k0,S as K0,T as F0,W as Yh,X as U0,Y as Nl,Z as Wl,_ as Tl,aa as y0,ba as fl,ca as Cl,da as Ol,ea as gl,fa as Q0,ga as X0,ia as F,ja as B,ka as Y0,la as xl,ma as il,na as Z0,oa as cl,pa as $0,qa as Gh,ra as nl,sa as ol,ta as ul,ua as tl,va as m0,wa as J0} from"./chunk-fe8cfc6e6c3ce826.js";import{Da as Fw,Ea as Rl,Ga as B0,Ha as Bw,Na as K,Oa as mh,Pa as u0,Ta as A0,Va as H,Xa as u,_a as L0,ab as V0,bb as A,cb as R0,db as _l,eb as bl,fb as S0,gb as H0,hb as nh,mb as el,nb as pl,xa as d0,ya as I0,za as T0} from"./chunk-156c827bf8d5029c.js";import"./chunk-6a2141dd4169ce0e.js";import{pb as Uw,qb as f} from"./chunk-9d5c096c43928b37.js";import"./chunk-880cfc21ce7cc2c6.js";import{sb as Zh} from"./chunk-9dc5c9b7a885d0bc.js";import"./chunk-b13ef9b23e30af91.js";var C=M(Yh(),1);var Hl=M(Gh(),1);var Jw=function(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(w,l)=>({signingProperties:{config:w,context:l}})}},dl=function(h){return{schemeId:"smithy.api#noAuth"}},ml=async(h,w,l)=>{return{operation:Il(w).operation,region:await Sl(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Jl=(h)=>{const w=[];switch(h.operation){case"AssumeRoleWithSAML":{w.push(dl(h));break}case"AssumeRoleWithWebIdentity":{w.push(dl(h));break}default:w.push(Jw(h))}return w},Dw=(h)=>({...h,stsClientCtor:L}),Dl=(h)=>{const w=Dw(h);return{...Hl.resolveAwsSdkSigV4Config(w)}};var El=(h)=>{return{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"}},D={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var kl={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.654.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:"yarn test:unit","test:unit":"jest"},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.654.0","@aws-sdk/core":"3.654.0","@aws-sdk/credential-provider-node":"3.654.0","@aws-sdk/middleware-host-header":"3.654.0","@aws-sdk/middleware-logger":"3.654.0","@aws-sdk/middleware-recursion-detection":"3.654.0","@aws-sdk/middleware-user-agent":"3.654.0","@aws-sdk/region-config-resolver":"3.654.0","@aws-sdk/types":"3.654.0","@aws-sdk/util-endpoints":"3.654.0","@aws-sdk/util-user-agent-browser":"3.654.0","@aws-sdk/util-user-agent-node":"3.654.0","@smithy/config-resolver":"^3.0.8","@smithy/core":"^2.4.3","@smithy/fetch-http-handler":"^3.2.7","@smithy/hash-node":"^3.0.6","@smithy/invalid-dependency":"^3.0.6","@smithy/middleware-content-length":"^3.0.8","@smithy/middleware-endpoint":"^3.1.3","@smithy/middleware-retry":"^3.0.18","@smithy/middleware-serde":"^3.0.6","@smithy/middleware-stack":"^3.0.6","@smithy/node-config-provider":"^3.1.7","@smithy/node-http-handler":"^3.2.2","@smithy/protocol-http":"^4.1.3","@smithy/smithy-client":"^3.3.2","@smithy/types":"^3.4.2","@smithy/url-parser":"^3.0.6","@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.18","@smithy/util-defaults-mode-node":"^3.0.18","@smithy/util-endpoints":"^2.1.2","@smithy/util-middleware":"^3.0.6","@smithy/util-retry":"^3.0.6","@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 Sh=M(Gh(),1);var h0=M(Yh(),1);var jl=M(Gh(),1),al=M(Yh(),1);var sl=M(Uw(),1),dh=M(Bw(),1),Ih=M(Fw(),1);var Kl={["required"]:!1,["type"]:"String"},Xh={["required"]:!0,default:!1,["type"]:"Boolean"},$l={["ref"]:"Endpoint"},Fl={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},J={["ref"]:"Region"},Bl={["fn"]:"aws.partition",["argv"]:[J],assign:"PartitionResult"},Vl={["ref"]:"UseFIPS"},Pl={["ref"]:"UseDualStack"},E={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},X={},Ul={conditions:[{["fn"]:"stringEquals",["argv"]:[J,"aws-global"]}],["endpoint"]:E,["type"]:"endpoint"},vl={["fn"]:"booleanEquals",["argv"]:[Vl,!0]},ql={["fn"]:"booleanEquals",["argv"]:[Pl,!0]},yl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},zl={["ref"]:"PartitionResult"},Ql={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[zl,"supportsDualStack"]}]},Xl=[{["fn"]:"isSet",["argv"]:[$l]}],Yl=[vl],Zl=[ql],kw={version:"1.0",parameters:{Region:Kl,UseDualStack:Xh,UseFIPS:Xh,Endpoint:Kl,UseGlobalEndpoint:Xh},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:Xl},Fl,Bl,{["fn"]:"booleanEquals",["argv"]:[Vl,!1]},{["fn"]:"booleanEquals",["argv"]:[Pl,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-northeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-south-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-2"]}],endpoint:E,["type"]:"endpoint"},Ul,{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ca-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-north-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-3"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"sa-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-2"]}],endpoint:E,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:Xl,rules:[{conditions:Yl,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:Zl,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:$l,properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[Fl],rules:[{conditions:[Bl],rules:[{conditions:[vl,ql],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,yl]},Ql],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["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"]:[yl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[zl,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:X,headers:X},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:Zl,rules:[{conditions:[Ql],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},Ul,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},Ml=kw;var Kw=new Nl({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Ll=(h,w={})=>{return Kw.get(h,()=>Tl(Ml,{endpointParams:h,logger:w.logger}))};Wl.aws=Al;var rl=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??dh.fromBase64,base64Encoder:h?.base64Encoder??dh.toBase64,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??Ll,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??Jl,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new jl.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new al.NoAuthSigner}],logger:h?.logger??new Rl,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??sl.parseUrl,utf8Decoder:h?.utf8Decoder??Ih.fromUtf8,utf8Encoder:h?.utf8Encoder??Ih.toUtf8}};var l0=(h)=>{bl(process.version);const w=tl(h),l=()=>w().then(_l),G=rl(h);return Sh.emitWarningIfUnsupportedVersion(process.version),{...G,...h,runtime:"node",defaultsMode:w,bodyLengthChecker:h?.bodyLengthChecker??ul,credentialDefaultProvider:h?.credentialDefaultProvider??Zh,defaultUserAgentProvider:h?.defaultUserAgentProvider??nl({serviceId:G.serviceId,clientVersion:kl.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(d)=>d.getIdentityProvider("aws.auth#sigv4")||(async(S)=>await Zh(S?.__config||{})()),signer:new Sh.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(d)=>d.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new h0.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(il),region:h?.region??f(Ol,gl),requestHandler:el.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...cl,default:async()=>(await l()).retryMode||xl}),sha256:h?.sha256??ol.bind(null,"sha256"),streamCollector:h?.streamCollector??pl,useDualstackEndpoint:h?.useDualstackEndpoint??f(fl),useFipsEndpoint:h?.useFipsEndpoint??f(Cl)}};var w0=(h)=>{const w=h.httpAuthSchemes;let{httpAuthSchemeProvider:l,credentials:G}=h;return{setHttpAuthScheme(d){const S=w.findIndex((I)=>I.schemeId===d.schemeId);if(S===-1)w.push(d);else w.splice(S,1,d)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider(d){l=d},httpAuthSchemeProvider(){return l},setCredentials(d){G=d},credentials(){return G}}},G0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var Hh=(h)=>h,D0=(h,w)=>{const l={...Hh(m0(h)),...Hh(S0(h)),...Hh(d0(h)),...Hh(w0(h))};return w.forEach((G)=>G.configure(l)),{...h,...J0(l),...H0(l),...I0(l),...G0(l)}};class L extends B0{constructor(...[h]){const w=l0(h||{}),l=El(w),G=U0(l),d=Z0(G),S=Q0(d),I=E0(S),Q=Y0(I),z=Dl(Q),v=D0(z,h?.extensions||[]);super(v);this.config=v,this.middlewareStack.use(y0(this.config)),this.middlewareStack.use($0(this.config)),this.middlewareStack.use(X0(this.config)),this.middlewareStack.use(k0(this.config)),this.middlewareStack.use(K0(this.config)),this.middlewareStack.use(F0(this.config)),this.middlewareStack.use(C.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ml,identityProviderConfigProvider:async(n)=>new C.DefaultIdentityProviderConfig({"aws.auth#sigv4":n.credentials})})),this.middlewareStack.use(C.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class Y extends V0{constructor(h){super(h);Object.setPrototypeOf(this,Y.prototype)}}class Jh extends Y{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends Y{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class Eh extends Y{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,Eh.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 Fh extends Y{constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,Fh.prototype)}}class Bh extends Y{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,Bh.prototype)}}class Uh extends Y{constructor(h){super({name:"InvalidAuthorizationMessageException",$fault:"client",...h});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,Uh.prototype)}}var o=(h)=>({...h,...h.SecretAccessKey&&{SecretAccessKey:mh}}),P0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),v0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:mh}}),q0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),z0=(h)=>({...h,...h.WebIdentityToken&&{WebIdentityToken:mh}}),M0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),N0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),W0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}});var q=M(Gh(),1);var j0=async(h,w)=>{const l=a;let G;return G=b({...vw(h,w),[r]:wG,[_]:s}),j(w,l,"/",void 0,G)},a0=async(h,w)=>{const l=a;let G;return G=b({...qw(h,w),[r]:GG,[_]:s}),j(w,l,"/",void 0,G)},s0=async(h,w)=>{const l=a;let G;return G=b({...zw(h,w),[r]:dG,[_]:s}),j(w,l,"/",void 0,G)},r0=async(h,w)=>{const l=a;let G;return G=b({...Mw(h,w),[r]:IG,[_]:s}),j(w,l,"/",void 0,G)},_0=async(h,w)=>{const l=a;let G;return G=b({...Nw(h,w),[r]:SG,[_]:s}),j(w,l,"/",void 0,G)},b0=async(h,w)=>{const l=a;let G;return G=b({...Ww(h,w),[r]:HG,[_]:s}),j(w,l,"/",void 0,G)},f0=async(h,w)=>{const l=a;let G;return G=b({...Tw(h,w),[r]:mG,[_]:s}),j(w,l,"/",void 0,G)},C0=async(h,w)=>{const l=a;let G;return G=b({...Aw(h,w),[r]:JG,[_]:s}),j(w,l,"/",void 0,G)},O0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=rw(l.AssumeRoleResult,w),{$metadata:k(h),...G}},g0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=_w(l.AssumeRoleWithSAMLResult,w),{$metadata:k(h),...G}},x0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=bw(l.AssumeRoleWithWebIdentityResult,w),{$metadata:k(h),...G}},i0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=fw(l.DecodeAuthorizationMessageResult,w),{$metadata:k(h),...G}},c0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=gw(l.GetAccessKeyInfoResult,w),{$metadata:k(h),...G}},e0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=xw(l.GetCallerIdentityResult,w),{$metadata:k(h),...G}},p0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=iw(l.GetFederationTokenResult,w),{$metadata:k(h),...G}},n0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=cw(l.GetSessionTokenResult,w),{$metadata:k(h),...G}},R=async(h,w)=>{const l={...h,body:await q.parseXmlErrorBody(h.body,w)},G=DG(h,l.body);switch(G){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await yw(l,w);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await $w(l,w);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Vw(l,w);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Pw(l,w);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Xw(l,w);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Zw(l,w);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Qw(l,w);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Yw(l,w);default:const d=l.body;return lG({output:h,parsedBody:d.Error,errorCode:G})}},yw=async(h,w)=>{const l=h.body,G=Cw(l.Error,w),d=new Jh({$metadata:k(h),...G});return A(d,l)},Qw=async(h,w)=>{const l=h.body,G=ew(l.Error,w),d=new Bh({$metadata:k(h),...G});return A(d,l)},Xw=async(h,w)=>{const l=h.body,G=pw(l.Error,w),d=new Kh({$metadata:k(h),...G});return A(d,l)},Yw=async(h,w)=>{const l=h.body,G=nw(l.Error,w),d=new Uh({$metadata:k(h),...G});return A(d,l)},Zw=async(h,w)=>{const l=h.body,G=ow(l.Error,w),d=new Fh({$metadata:k(h),...G});return A(d,l)},$w=async(h,w)=>{const l=h.body,G=uw(l.Error,w),d=new Dh({$metadata:k(h),...G});return A(d,l)},Vw=async(h,w)=>{const l=h.body,G=tw(l.Error,w),d=new Eh({$metadata:k(h),...G});return A(d,l)},Pw=async(h,w)=>{const l=h.body,G=hG(l.Error,w),d=new kh({$metadata:k(h),...G});return A(d,l)},vw=(h,w)=>{const l={};if(h[T]!=null)l[T]=h[T];if(h[i]!=null)l[i]=h[i];if(h[$]!=null){const G=yh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([d,S])=>{const I=`PolicyArns.${d}`;l[I]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const G=o0(h[e],w);if(h[e]?.length===0)l.Tags=[];Object.entries(G).forEach(([d,S])=>{const I=`Tags.${d}`;l[I]=S})}if(h[xh]!=null){const G=sw(h[xh],w);if(h[xh]?.length===0)l.TransitiveTagKeys=[];Object.entries(G).forEach(([d,S])=>{const I=`TransitiveTagKeys.${d}`;l[I]=S})}if(h[qh]!=null)l[qh]=h[qh];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];if(h[P]!=null)l[P]=h[P];if(h[ah]!=null){const G=jw(h[ah],w);if(h[ah]?.length===0)l.ProvidedContexts=[];Object.entries(G).forEach(([d,S])=>{const I=`ProvidedContexts.${d}`;l[I]=S})}return l},qw=(h,w)=>{const l={};if(h[T]!=null)l[T]=h[T];if(h[Rh]!=null)l[Rh]=h[Rh];if(h[fh]!=null)l[fh]=h[fh];if(h[$]!=null){const G=yh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([d,S])=>{const I=`PolicyArns.${d}`;l[I]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},zw=(h,w)=>{const l={};if(h[T]!=null)l[T]=h[T];if(h[i]!=null)l[i]=h[i];if(h[eh]!=null)l[eh]=h[eh];if(h[sh]!=null)l[sh]=h[sh];if(h[$]!=null){const G=yh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([d,S])=>{const I=`PolicyArns.${d}`;l[I]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},Mw=(h,w)=>{const l={};if(h[zh]!=null)l[zh]=h[zh];return l},Nw=(h,w)=>{const l={};if(h[O]!=null)l[O]=h[O];return l},Ww=(h,w)=>{return{}},Tw=(h,w)=>{const l={};if(h[Ah]!=null)l[Ah]=h[Ah];if(h[Z]!=null)l[Z]=h[Z];if(h[$]!=null){const G=yh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([d,S])=>{const I=`PolicyArns.${d}`;l[I]=S})}if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const G=o0(h[e],w);if(h[e]?.length===0)l.Tags=[];Object.entries(G).forEach(([d,S])=>{const I=`Tags.${d}`;l[I]=S})}return l},Aw=(h,w)=>{const l={};if(h[y]!=null)l[y]=h[y];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];return l},yh=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;const S=Lw(d,w);Object.entries(S).forEach(([I,Q])=>{l[`member.${G}.${I}`]=Q}),G++}return l},Lw=(h,w)=>{const l={};if(h[ph]!=null)l[ph]=h[ph];return l},Rw=(h,w)=>{const l={};if(h[jh]!=null)l[jh]=h[jh];if(h[Vh]!=null)l[Vh]=h[Vh];return l},jw=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;const S=Rw(d,w);Object.entries(S).forEach(([I,Q])=>{l[`member.${G}.${I}`]=Q}),G++}return l},aw=(h,w)=>{const l={};if(h[Th]!=null)l[Th]=h[Th];if(h[ch]!=null)l[ch]=h[ch];return l},sw=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;l[`member.${G}`]=d,G++}return l},o0=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;const S=aw(d,w);Object.entries(S).forEach(([I,Q])=>{l[`member.${G}.${I}`]=Q}),G++}return l},oh=(h,w)=>{const l={};if(h[$h]!=null)l[$h]=H(h[$h]);if(h[W]!=null)l[W]=H(h[W]);return l},rw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[N]!=null)l[N]=oh(h[N],w);if(h[V]!=null)l[V]=u(h[V]);if(h[P]!=null)l[P]=H(h[P]);return l},_w=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[N]!=null)l[N]=oh(h[N],w);if(h[V]!=null)l[V]=u(h[V]);if(h[_h]!=null)l[_h]=H(h[_h]);if(h[Oh]!=null)l[Oh]=H(h[Oh]);if(h[Wh]!=null)l[Wh]=H(h[Wh]);if(h[x]!=null)l[x]=H(h[x]);if(h[Lh]!=null)l[Lh]=H(h[Lh]);if(h[P]!=null)l[P]=H(h[P]);return l},bw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[Ch]!=null)l[Ch]=H(h[Ch]);if(h[N]!=null)l[N]=oh(h[N],w);if(h[V]!=null)l[V]=u(h[V]);if(h[rh]!=null)l[rh]=H(h[rh]);if(h[x]!=null)l[x]=H(h[x]);if(h[P]!=null)l[P]=H(h[P]);return l},t=(h,w)=>{const l={};if(h[O]!=null)l[O]=H(h[O]);if(h[bh]!=null)l[bh]=H(h[bh]);if(h[gh]!=null)l[gh]=H(h[gh]);if(h[vh]!=null)l[vh]=A0(L0(h[vh]));return l},fw=(h,w)=>{const l={};if(h[Ph]!=null)l[Ph]=H(h[Ph]);return l},Cw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},Ow=(h,w)=>{const l={};if(h[Nh]!=null)l[Nh]=H(h[Nh]);if(h[W]!=null)l[W]=H(h[W]);return l},gw=(h,w)=>{const l={};if(h[g]!=null)l[g]=H(h[g]);return l},xw=(h,w)=>{const l={};if(h[ih]!=null)l[ih]=H(h[ih]);if(h[g]!=null)l[g]=H(h[g]);if(h[W]!=null)l[W]=H(h[W]);return l},iw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[Mh]!=null)l[Mh]=Ow(h[Mh],w);if(h[V]!=null)l[V]=u(h[V]);return l},cw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);return l},ew=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},pw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},nw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},ow=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},uw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},tw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},hG=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},k=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var lG=R0(Y),j=async(h,w,l,G,d)=>{const{hostname:S,protocol:I="https",port:Q,path:z}=await h.endpoint(),v={protocol:I,hostname:S,port:Q,method:"POST",path:z.endsWith("/")?z.slice(0,-1)+l:z+l,headers:w};if(G!==void 0)v.hostname=G;if(d!==void 0)v.body=d;return new T0(v)},a={"content-type":"application/x-www-form-urlencoded"},s="2011-06-15",r="Action",O="AccessKeyId",wG="AssumeRole",$h="AssumedRoleId",N="AssumedRoleUser",GG="AssumeRoleWithSAML",dG="AssumeRoleWithWebIdentity",g="Account",W="Arn",x="Audience",U="Credentials",Vh="ContextAssertion",IG="DecodeAuthorizationMessage",Ph="DecodedMessage",y="DurationSeconds",vh="Expiration",qh="ExternalId",zh="EncodedMessage",Mh="FederatedUser",Nh="FederatedUserId",SG="GetAccessKeyInfo",HG="GetCallerIdentity",mG="GetFederationToken",JG="GetSessionToken",Wh="Issuer",Th="Key",Ah="Name",Lh="NameQualifier",Z="Policy",$="PolicyArns",Rh="PrincipalArn",jh="ProviderArn",ah="ProvidedContexts",sh="ProviderId",V="PackedPolicySize",rh="Provider",T="RoleArn",i="RoleSessionName",_h="Subject",bh="SecretAccessKey",fh="SAMLAssertion",Ch="SubjectFromWebIdentityToken",P="SourceIdentity",c="SerialNumber",Oh="SubjectType",gh="SessionToken",e="Tags",p="TokenCode",xh="TransitiveTagKeys",ih="UserId",_="Version",ch="Value",eh="WebIdentityToken",ph="arn",m="message",b=(h)=>Object.entries(h).map(([w,l])=>nh(w)+"="+nh(l)).join("&"),DG=(h,w)=>{if(w.Error?.Code!==void 0)return w.Error.Code;if(h.statusCode==404)return"NotFound"};class hh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,P0).ser(j0).de(O0).build(){}class uh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(v0,q0).ser(a0).de(g0).build(){}class lh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(z0,M0).ser(s0).de(x0).build(){}class th extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(r0).de(i0).build(){}class hl extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(_0).de(c0).build(){}class ll extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(b0).de(e0).build(){}class wl extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,N0).ser(f0).de(p0).build(){}class Gl extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,W0).ser(C0).de(n0).build(){}var EG={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:uh,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:th,GetAccessKeyInfoCommand:hl,GetCallerIdentityCommand:ll,GetFederationTokenCommand:wl,GetSessionTokenCommand:Gl};class t0 extends L{}u0(EG,t0);var hw="us-east-1",lw=(h)=>{if(typeof h?.Arn==="string"){const w=h.Arn.split(":");if(w.length>4&&w[4]!=="")return w[4]}return},ww=async(h,w,l)=>{const G=typeof h==="function"?await h():h,d=typeof w==="function"?await w():w;return l?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${G} (provider)`,`${d} (parent client)`,`${hw} (STS default)`),G??d??hw},Gw=(h,w)=>{let l,G;return async(d,S)=>{if(G=d,!l){const{logger:v=h?.parentClientConfig?.logger,region:n,requestHandler:wh=h?.parentClientConfig?.requestHandler,credentialProviderLogger:Qh}=h,Hw=await ww(n,h?.parentClientConfig?.region,Qh),mw=!Iw(wh);l=new w({credentialDefaultProvider:()=>async()=>G,region:Hw,requestHandler:mw?wh:void 0,logger:v})}const{Credentials:I,AssumedRoleUser:Q}=await l.send(new hh(S));if(!I||!I.AccessKeyId||!I.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${S.RoleArn}`);const z=lw(Q);return{accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...z&&{accountId:z}}}},dw=(h,w)=>{let l;return async(G)=>{if(!l){const{logger:Q=h?.parentClientConfig?.logger,region:z,requestHandler:v=h?.parentClientConfig?.requestHandler,credentialProviderLogger:n}=h,wh=await ww(z,h?.parentClientConfig?.region,n),Qh=!Iw(v);l=new w({region:wh,requestHandler:Qh?v:void 0,logger:Q})}const{Credentials:d,AssumedRoleUser:S}=await l.send(new lh(G));if(!d||!d.AccessKeyId||!d.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${G.RoleArn}`);const I=lw(S);return{accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,sessionToken:d.SessionToken,expiration:d.Expiration,...d.CredentialScope&&{credentialScope:d.CredentialScope},...I&&{accountId:I}}}};var Iw=(h)=>{return h?.metadata?.handlerProtocol==="h2"};var Sw=(h,w)=>{if(!w)return h;else return class l extends h{constructor(G){super(G);for(let d of w)this.middlewareStack.use(d)}}},kG=(h={},w)=>Gw(h,Sw(L,w)),KG=(h={},w)=>dw(h,Sw(L,w)),jI=(h)=>(w)=>h({roleAssumer:kG(w),roleAssumerWithWebIdentity:KG(w),...w});export{KG as getDefaultRoleAssumerWithWebIdentity,kG as getDefaultRoleAssumer,jI as decorateDefaultCredentialProvider,B0 as __Client,Y as STSServiceException,L as STSClient,t0 as STS,kh as RegionDisabledException,Eh as PackedPolicyTooLargeException,Dh as MalformedPolicyDocumentException,Fh as InvalidIdentityTokenException,Uh as InvalidAuthorizationMessageException,Kh as IDPRejectedClaimException,Bh as IDPCommunicationErrorException,W0 as GetSessionTokenResponseFilterSensitiveLog,Gl as GetSessionTokenCommand,N0 as GetFederationTokenResponseFilterSensitiveLog,wl as GetFederationTokenCommand,ll as GetCallerIdentityCommand,hl as GetAccessKeyInfoCommand,Jh as ExpiredTokenException,th as DecodeAuthorizationMessageCommand,o as CredentialsFilterSensitiveLog,M0 as AssumeRoleWithWebIdentityResponseFilterSensitiveLog,z0 as AssumeRoleWithWebIdentityRequestFilterSensitiveLog,lh as AssumeRoleWithWebIdentityCommand,q0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,v0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,uh as AssumeRoleWithSAMLCommand,P0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,K as $Command};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-2c5ecf8dc0a97aba.js";import{B as w} from"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-28694e5e949df0ff.js";import{$ as je,O as se,P as ie,Q as hr,R as nr,S as or,T as dr,W as _,X as yr,Y as Pe,Z as Te,_ as be,aa as tr,ba as Ve,ca as We,da as fe,ea as Ae,fa as ar,ga as mr,ia as S,ja as $,ka as wr,la as Ke,ma as Me,na as kr,oa as Be,pa as vr,qa as U,ra as Xe,sa as Ye,ta as Ze,ua as He,va as sr,wa as ir} from"./chunk-fe8cfc6e6c3ce826.js";import{Da as Qr,Ea as De,Ga as cr,Ha as Xr,Na as E,Oa as t,Pa as Jr,Ra as C,Sa as b,Ta as j,Ua as F,Va as h,ab as Er,bb as a,cb as br,db as Ge,eb as Je,fb as er,gb as rr,ib as d,jb as o,lb as I,mb as Le,nb as Qe,xa as Oe,ya as ue} from"./chunk-156c827bf8d5029c.js";import"./chunk-6a2141dd4169ce0e.js";import{pb as Yr,qb as R} from"./chunk-9d5c096c43928b37.js";import"./chunk-880cfc21ce7cc2c6.js";import{sb as pe} from"./chunk-9dc5c9b7a885d0bc.js";import"./chunk-b13ef9b23e30af91.js";var P=w(_(),1);var le=w(U(),1);var Kr=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}},N=function(e){return{schemeId:"smithy.api#noAuth"}},he=async(e,s,r)=>{return{operation:se(s).operation,region:await ie(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},ne=(e)=>{const s=[];switch(e.operation){case"CreateToken":{s.push(N(e));break}case"RegisterClient":{s.push(N(e));break}case"StartDeviceAuthorization":{s.push(N(e));break}default:s.push(Kr(e))}return s},oe=(e)=>{return{...le.resolveAwsSdkSigV4Config(e)}};var de=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},v={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var ce={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.654.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.654.0","@aws-sdk/credential-provider-node":"3.654.0","@aws-sdk/middleware-host-header":"3.654.0","@aws-sdk/middleware-logger":"3.654.0","@aws-sdk/middleware-recursion-detection":"3.654.0","@aws-sdk/middleware-user-agent":"3.654.0","@aws-sdk/region-config-resolver":"3.654.0","@aws-sdk/types":"3.654.0","@aws-sdk/util-endpoints":"3.654.0","@aws-sdk/util-user-agent-browser":"3.654.0","@aws-sdk/util-user-agent-node":"3.654.0","@smithy/config-resolver":"^3.0.8","@smithy/core":"^2.4.3","@smithy/fetch-http-handler":"^3.2.7","@smithy/hash-node":"^3.0.6","@smithy/invalid-dependency":"^3.0.6","@smithy/middleware-content-length":"^3.0.8","@smithy/middleware-endpoint":"^3.1.3","@smithy/middleware-retry":"^3.0.18","@smithy/middleware-serde":"^3.0.6","@smithy/middleware-stack":"^3.0.6","@smithy/node-config-provider":"^3.1.7","@smithy/node-http-handler":"^3.2.2","@smithy/protocol-http":"^4.1.3","@smithy/smithy-client":"^3.3.2","@smithy/types":"^3.4.2","@smithy/url-parser":"^3.0.6","@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.18","@smithy/util-defaults-mode-node":"^3.0.18","@smithy/util-endpoints":"^2.1.2","@smithy/util-middleware":"^3.0.6","@smithy/util-retry":"^3.0.6","@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.654.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 Ne=w(U(),1);var Ue=w(U(),1),qe=w(_(),1);var xe=w(Yr(),1),q=w(Xr(),1),x=w(Qr(),1);var ye={["required"]:!1,type:"String"},te={["required"]:!0,default:!1,type:"Boolean"},ae={["ref"]:"Endpoint"},Se={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},$e={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},me={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Ie={["ref"]:"PartitionResult"},we={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Ie,"supportsDualStack"]}]},ke=[Se],ve=[$e],Ee=[{["ref"]:"Region"}],Br={version:"1.0",parameters:{Region:ye,UseDualStack:te,UseFIPS:te,Endpoint:ye},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ae]}],rules:[{conditions:ke,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:ve,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ae,properties:m,headers:m},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:Ee}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:Ee,assign:"PartitionResult"}],rules:[{conditions:[Se,$e],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,me]},we],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:ke,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[me,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Ie,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:m,headers:m},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:ve,rules:[{conditions:[we],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},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:m,headers:m},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},Re=Br;var Lr=new Pe({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Fe=(e,s={})=>{return Lr.get(e,()=>be(Re,{endpointParams:e,logger:s.logger}))};Te.aws=je;var ze=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??q.fromBase64,base64Encoder:e?.base64Encoder??q.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Fe,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ne,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new Ue.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new qe.NoAuthSigner}],logger:e?.logger??new De,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??xe.parseUrl,utf8Decoder:e?.utf8Decoder??x.fromUtf8,utf8Encoder:e?.utf8Encoder??x.toUtf8}};var _e=(e)=>{Je(process.version);const s=He(e),r=()=>s().then(Ge),i=ze(e);return Ne.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Ze,credentialDefaultProvider:e?.credentialDefaultProvider??pe,defaultUserAgentProvider:e?.defaultUserAgentProvider??Xe({serviceId:i.serviceId,clientVersion:ce.version}),maxAttempts:e?.maxAttempts??R(Me),region:e?.region??R(fe,Ae),requestHandler:Le.create(e?.requestHandler??r),retryMode:e?.retryMode??R({...Be,default:async()=>(await r()).retryMode||Ke}),sha256:e?.sha256??Ye.bind(null,"sha256"),streamCollector:e?.streamCollector??Qe,useDualstackEndpoint:e?.useDualstackEndpoint??R(Ve),useFipsEndpoint:e?.useFipsEndpoint??R(We)}};var Ce=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){const n=s.findIndex((T)=>T.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}}},ge=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var z=(e)=>e,lr=(e,s)=>{const r={...z(sr(e)),...z(er(e)),...z(Oe(e)),...z(Ce(e))};return s.forEach((i)=>i.configure(r)),{...e,...ir(r),...rr(r),...ue(r),...ge(r)}};class p extends cr{constructor(...[e]){const s=_e(e||{}),r=de(s),i=yr(r),l=kr(i),n=ar(l),T=hr(n),Wr=wr(T),fr=oe(Wr),re=lr(fr,e?.extensions||[]);super(re);this.config=re,this.middlewareStack.use(tr(this.config)),this.middlewareStack.use(vr(this.config)),this.middlewareStack.use(mr(this.config)),this.middlewareStack.use(nr(this.config)),this.middlewareStack.use(or(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:he,identityProviderConfigProvider:async(Ar)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Ar.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class c extends Er{constructor(e){super(e);Object.setPrototypeOf(this,c.prototype)}}class G extends c{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends c{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends c{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends c{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class f extends c{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,f.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends c{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends c{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends c{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends c{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}class L extends c{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description}}class Q extends c{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}class X extends c{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class Y extends c{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,Y.prototype),this.error=e.error,this.error_description=e.error_description}}class Z extends c{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,Z.prototype),this.error=e.error,this.error_description=e.error_description}}var Sr=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),$r=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Ir=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Rr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Pr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),Tr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var k=w(U(),1),D=w(_(),1);var jr=async(e,s)=>{const r=D.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()},Fr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=d({[ns]:[,"t"]});let n;return n=JSON.stringify(o(e,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(T)=>I(T),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(i).q(l).b(n),r.build()},Dr=async(e,s)=>{const r=D.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()},Ur=async(e,s)=>{const r=D.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()},qr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return H(e,s);const r=d({$metadata:y(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},xr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return H(e,s);const r=d({$metadata:y(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,issuedTokenType:h,refreshToken:h,scope:I,tokenType:h});return Object.assign(r,l),r},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return H(e,s);const r=d({$metadata:y(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:C,clientSecret:h,clientSecretExpiresAt:C,tokenEndpoint:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return H(e,s);const r=d({$metadata:y(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:b,interval:b,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},H=async(e,s)=>{const r={...e,body:await k.parseJsonErrorBody(e.body,s)},i=k.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Hr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Nr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await _r(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await pr(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await Cr(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await Or(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await es(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await ss(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await is(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await ls(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await hs(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await rs(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await gr(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await ur(r,s);default:const l=r.body;return Zr({output:e,parsedBody:l,errorCode:i})}},Zr=br(c),Hr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new G({$metadata:y(e),...r});return a(n,e.body)},Nr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new J({$metadata:y(e),...r});return a(n,e.body)},_r=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new V({$metadata:y(e),...r});return a(n,e.body)},pr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new W({$metadata:y(e),...r});return a(n,e.body)},Cr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new f({$metadata:y(e),...r});return a(n,e.body)},gr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new Y({$metadata:y(e),...r});return a(n,e.body)},Or=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new A({$metadata:y(e),...r});return a(n,e.body)},ur=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new Z({$metadata:y(e),...r});return a(n,e.body)},es=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new K({$metadata:y(e),...r});return a(n,e.body)},rs=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{endpoint:h,error:h,error_description:h,region:h});Object.assign(r,l);const n=new X({$metadata:y(e),...r});return a(n,e.body)},ss=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new M({$metadata:y(e),...r});return a(n,e.body)},is=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new B({$metadata:y(e),...r});return a(n,e.body)},ls=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new L({$metadata:y(e),...r});return a(n,e.body)},hs=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new Q({$metadata:y(e),...r});return a(n,e.body)},y=(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 ns="aws_iam";class g extends E.classBuilder().ep(v).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(Sr,$r).ser(jr).de(qr).build(){}class O extends E.classBuilder().ep(v).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Ir,Rr).ser(Fr).de(xr).build(){}class u extends E.classBuilder().ep(v).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,Pr).ser(Dr).de(zr).build(){}class ee extends E.classBuilder().ep(v).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(Tr,void 0).ser(Ur).de(Gr).build(){}var os={CreateTokenCommand:g,CreateTokenWithIAMCommand:O,RegisterClientCommand:u,StartDeviceAuthorizationCommand:ee};class Vr extends p{}Jr(os,Vr);export{cr as __Client,Q as UnsupportedGrantTypeException,L as UnauthorizedClientException,Tr as StartDeviceAuthorizationRequestFilterSensitiveLog,ee as StartDeviceAuthorizationCommand,B as SlowDownException,c as SSOOIDCServiceException,p as SSOOIDCClient,Vr as SSOOIDC,Pr as RegisterClientResponseFilterSensitiveLog,u as RegisterClientCommand,M as InvalidScopeException,X as InvalidRequestRegionException,K as InvalidRequestException,Z as InvalidRedirectUriException,A as InvalidGrantException,Y as InvalidClientMetadataException,f as InvalidClientException,W as InternalServerException,V as ExpiredTokenException,Rr as CreateTokenWithIAMResponseFilterSensitiveLog,Ir as CreateTokenWithIAMRequestFilterSensitiveLog,O as CreateTokenWithIAMCommand,$r as CreateTokenResponseFilterSensitiveLog,Sr as CreateTokenRequestFilterSensitiveLog,g as CreateTokenCommand,J as AuthorizationPendingException,G as AccessDeniedException,E as $Command};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as h,C as G} from"./chunk-24a86f8f5ddc0cbd.js";import{rb as I} from"./chunk-880cfc21ce7cc2c6.js";import{ub as H,yb as K} from"./chunk-b13ef9b23e30af91.js";var t=G((r,j)=>{var T=function(c){const i={};if(c=c.replace(/^\?/,""),c)for(let n of c.split("&")){let[F,f=null]=n.split("=");if(F=decodeURIComponent(F),f)f=decodeURIComponent(f);if(!(F in i))i[F]=f;else if(Array.isArray(i[F]))i[F].push(f);else i[F]=[i[F],f]}return i},o=Object.defineProperty,M=Object.getOwnPropertyDescriptor,Q=Object.getOwnPropertyNames,U=Object.prototype.hasOwnProperty,O=(c,i)=>o(c,"name",{value:i,configurable:!0}),d=(c,i)=>{for(var n in i)o(c,n,{get:i[n],enumerable:!0})},v=(c,i,n,F)=>{if(i&&typeof i==="object"||typeof i==="function"){for(let f of Q(i))if(!U.call(c,f)&&f!==n)o(c,f,{get:()=>i[f],enumerable:!(F=M(i,f))||F.enumerable})}return c},J=(c)=>v(o({},"__esModule",{value:!0}),c),S={};d(S,{parseQueryString:()=>T});j.exports=J(S);O(T,"parseQueryString")});var a=G((y,Z)=>{var{defineProperty:w,getOwnPropertyDescriptor:x,getOwnPropertyNames:P}=Object,s=Object.prototype.hasOwnProperty,l=(c,i)=>w(c,"name",{value:i,configurable:!0}),m=(c,i)=>{for(var n in i)w(c,n,{get:i[n],enumerable:!0})},k=(c,i,n,F)=>{if(i&&typeof i==="object"||typeof i==="function"){for(let f of P(i))if(!s.call(c,f)&&f!==n)w(c,f,{get:()=>i[f],enumerable:!(F=x(i,f))||F.enumerable})}return c},q=(c)=>k(w({},"__esModule",{value:!0}),c),z={};m(z,{parseUrl:()=>X});Z.exports=q(z);var p=t(),X=l((c)=>{if(typeof c==="string")return X(new URL(c));const{hostname:i,pathname:n,port:F,protocol:f,search:E}=c;let N;if(E)N=p.parseQueryString(E);return{hostname:i,port:F?parseInt(F):void 0,protocol:f,path:n,query:N}},"parseUrl")});var R=h(I(),1);var b=h(I(),1);function C(c){try{const i=new Set(Array.from(c.match(/([A-Z_]){3,}/g)??[]));return i.delete("CONFIG"),i.delete("CONFIG_PREFIX_SEPARATOR"),i.delete("ENV"),[...i].join(", ")}catch(i){return c}}var B=(c,i)=>async()=>{try{const n=c(process.env);if(n===void 0)throw new Error;return n}catch(n){throw new b.CredentialsProviderError(n.message||`Not found in ENV: ${C(c.toString())}`,{logger:i})}};var L=h(I(),1);var V=(c,{preferredFile:i="config",...n}={})=>async()=>{const F=H(n),{configFile:f,credentialsFile:E}=await K(n),N=E[F]||{},$=f[F]||{},D=i==="config"?{...N,...$}:{...$,...N};try{const A=c(D,i==="config"?f:E);if(A===void 0)throw new Error;return A}catch(g){throw new L.CredentialsProviderError(g.message||`Not found in config files w/ profile [${F}]: ${C(c.toString())}`,{logger:n.logger})}};var W=h(I(),1),u=(c)=>typeof c==="function",Y=(c)=>u(c)?async()=>await c():W.fromStatic(c);var wi=({environmentVariableSelector:c,configFileSelector:i,default:n},F={})=>R.memoize(R.chain(B(c),V(i,F),Y(n)));export{a as pb,wi as qb};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{B as m} from"./chunk-24a86f8f5ddc0cbd.js";import{La as A,Za as w,mb as P,za as g} from"./chunk-156c827bf8d5029c.js";import"./chunk-6a2141dd4169ce0e.js";import{rb as d} from"./chunk-880cfc21ce7cc2c6.js";var i=m(d(),1);import O from"fs/promises";var C=m(d(),1);var E="169.254.170.2",R="169.254.170.23",p="[fd00:ec2::23]",S=(e,c)=>{if(e.protocol==="https:")return;if(e.hostname===E||e.hostname===R||e.hostname===p)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;const a=e.hostname.split("."),r=(t)=>{const s=parseInt(t,10);return 0<=s&&s<=255};if(a[0]==="127"&&r(a[1])&&r(a[2])&&r(a[3])&&a.length===4)return}throw new C.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
3
|
-
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
4
|
-
- ECS container host 169.254.170.2
|
|
5
|
-
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:c})};var o=m(d(),1);var I=m(A(),1);function K(e){return new g({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((c,[a,r])=>{return c[a]=r,c},{}),fragment:e.hash})}async function T(e,c){const r=await I.sdkStreamMixin(e.body).transformToString();if(e.statusCode===200){const t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new o.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:c});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:w(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new o.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:c}),{Code:t.Code,Message:t.Message})}throw new o.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:c})}var x=(e,c,a)=>{return async()=>{for(let r=0;r<c;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,a))}return await e()}};var b="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",_="http://169.254.170.2",v="AWS_CONTAINER_CREDENTIALS_FULL_URI",B="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",D="AWS_CONTAINER_AUTHORIZATION_TOKEN",M=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let c;const a=e.awsContainerCredentialsRelativeUri??process.env[b],r=e.awsContainerCredentialsFullUri??process.env[v],t=e.awsContainerAuthorizationToken??process.env[D],s=e.awsContainerAuthorizationTokenFile??process.env[B],n=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console.warn:e.logger.warn;if(a&&r)n("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),n("awsContainerCredentialsFullUri will take precedence.");if(t&&s)n("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),n("awsContainerAuthorizationToken will take precedence.");if(r)c=r;else if(a)c=`${_}${a}`;else throw new i.CredentialsProviderError(`No HTTP credential provider host provided.
|
|
6
|
-
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});const y=new URL(c);S(y,e.logger);const u=new P({requestTimeout:e.timeout??1000,connectionTimeout:e.timeout??1000});return x(async()=>{const f=K(y);if(t)f.headers.Authorization=t;else if(s)f.headers.Authorization=(await O.readFile(s)).toString();try{const h=await u.handle(f);return T(h.response)}catch(h){throw new i.CredentialsProviderError(String(h),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000)};export{M as fromHttp};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{B} from"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-6a2141dd4169ce0e.js";import{rb as D} from"./chunk-880cfc21ce7cc2c6.js";import{Ab as E,ub as K} from"./chunk-b13ef9b23e30af91.js";var Z=B(D(),1);var $=B(D(),1);var C=B(D(),1),A=(y,c,_)=>{const b={EcsContainer:async(x)=>{const{fromHttp:w}=await import("./chunk-a1ef3b11adc01140.js"),{fromContainerMetadata:k}=await import("./chunk-e1a4203ece554bc3.js");return _?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),C.chain(w(x??{}),k(x))},Ec2InstanceMetadata:async(x)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:w}=await import("./chunk-e1a4203ece554bc3.js");return w(x)},Environment:async(x)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:w}=await import("./chunk-2c5ecf8dc0a97aba.js");return w(x)}};if(y in b)return b[y];else throw new C.CredentialsProviderError(`Unsupported credential source in profile ${c}. Got ${y}, `+"expected EcsContainer or Ec2InstanceMetadata or Environment.",{logger:_})};var J=(y,{profile:c="default",logger:_}={})=>{return Boolean(y)&&typeof y==="object"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1&&["undefined","string"].indexOf(typeof y.external_id)>-1&&["undefined","string"].indexOf(typeof y.mfa_serial)>-1&&(H(y,{profile:c,logger:_})||R(y,{profile:c,logger:_}))},H=(y,{profile:c,logger:_})=>{const b=typeof y.source_profile==="string"&&typeof y.credential_source==="undefined";if(b)_?.debug?.(` ${c} isAssumeRoleWithSourceProfile source_profile=${y.source_profile}`);return b},R=(y,{profile:c,logger:_})=>{const b=typeof y.credential_source==="string"&&typeof y.source_profile==="undefined";if(b)_?.debug?.(` ${c} isCredentialSourceProfile credential_source=${y.credential_source}`);return b},L=async(y,c,_,b={})=>{_.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const x=c[y];if(!_.roleAssumer){const{getDefaultRoleAssumer:I}=await import("./chunk-63884944ac5ce0f0.js");_.roleAssumer=I({..._.clientConfig,credentialProviderLogger:_.logger,parentClientConfig:_?.parentClientConfig},_.clientPlugins)}const{source_profile:w}=x;if(w&&w in b)throw new $.CredentialsProviderError("Detected a cycle attempting to resolve credentials for profile"+` ${K(_)}. Profiles visited: `+Object.keys(b).join(", "),{logger:_.logger});_.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${w?`source_profile=[${w}]`:`profile=[${y}]`}`);const k=w?j(w,c,_,{...b,[w]:!0},G(c[w]??{})):(await A(x.credential_source,y,_.logger)(_))();if(G(x))return k;else{const I={RoleArn:x.role_arn,RoleSessionName:x.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:x.external_id,DurationSeconds:parseInt(x.duration_seconds||"3600",10)},{mfa_serial:O}=x;if(O){if(!_.mfaCodeProvider)throw new $.CredentialsProviderError(`Profile ${y} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:_.logger,tryNextLink:!1});I.SerialNumber=O,I.TokenCode=await _.mfaCodeProvider(O)}const F=await k;return _.roleAssumer(F,I)}},G=(y)=>{return!y.role_arn&&!!y.credential_source};var Q=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.credential_process==="string",U=async(y,c)=>import("./chunk-07ad6201a5864cd0.js").then(({fromProcess:_})=>_({...y,profile:c})());var V=async(y,c={})=>{const{fromSSO:_}=await import("./chunk-6b58f7c76c2a738c.js");return _({profile:y,logger:c.logger})()},W=(y)=>y&&(typeof y.sso_start_url==="string"||typeof y.sso_account_id==="string"||typeof y.sso_session==="string"||typeof y.sso_region==="string"||typeof y.sso_role_name==="string");var q=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.aws_access_key_id==="string"&&typeof y.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof y.aws_session_token)>-1&&["undefined","string"].indexOf(typeof y.aws_account_id)>-1,z=(y,c)=>{return c?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:y.aws_access_key_id,secretAccessKey:y.aws_secret_access_key,sessionToken:y.aws_session_token,...y.aws_credential_scope&&{credentialScope:y.aws_credential_scope},...y.aws_account_id&&{accountId:y.aws_account_id}})};var X=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.web_identity_token_file==="string"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1,Y=async(y,c)=>import("./chunk-542b3c90f0ff4ded.js").then(({fromTokenFile:_})=>_({webIdentityTokenFile:y.web_identity_token_file,roleArn:y.role_arn,roleSessionName:y.role_session_name,roleAssumerWithWebIdentity:c.roleAssumerWithWebIdentity,logger:c.logger,parentClientConfig:c.parentClientConfig})());var j=async(y,c,_,b={},x=!1)=>{const w=c[y];if(Object.keys(b).length>0&&q(w))return z(w,_);if(x||J(w,{profile:y,logger:_.logger}))return L(y,c,_,b);if(q(w))return z(w,_);if(X(w))return Y(w,_);if(Q(w))return U(_,y);if(W(w))return await V(y,_);throw new Z.CredentialsProviderError(`Could not resolve credentials using profile: [${y}] in configuration/credentials file(s).`,{logger:_.logger})};var a=(y={})=>async()=>{y.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const c=await E(y);return j(K(y),c,y)};export{a as fromIni};
|