gemi 0.4.93 → 0.4.95
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 -11
- package/dist/app/App.d.ts.map +1 -1
- package/dist/app/index.js +3 -1
- package/dist/app/index.js.map +13 -0
- package/dist/auth/AuthenticationServiceContainer.d.ts +3 -1
- package/dist/auth/AuthenticationServiceContainer.d.ts.map +1 -1
- package/dist/auth/AuthenticationServiceProvider.d.ts +3 -5
- package/dist/auth/AuthenticationServiceProvider.d.ts.map +1 -1
- package/dist/bin/index.js +3 -0
- package/dist/broadcasting/index.js +3 -1
- package/dist/broadcasting/index.js.map +10 -0
- package/dist/{chunk-d09948245f5b426d.js → chunk-07f44e411ae4ea5e.js} +3 -1
- package/dist/chunk-07f44e411ae4ea5e.js.map +11 -0
- package/dist/{chunk-7ce930fe69575c87.js → chunk-0d97333b6af9fc45.js} +3 -1
- package/dist/chunk-0d97333b6af9fc45.js.map +9 -0
- package/dist/{chunk-e76c7e3bf2d698af.js → chunk-11de5b0adccef35c.js} +3 -1
- package/dist/chunk-11de5b0adccef35c.js.map +17 -0
- package/dist/{chunk-1770e9abf10029e0.js → chunk-18a59fffad60f059.js} +3 -1
- package/dist/chunk-18a59fffad60f059.js.map +12 -0
- package/dist/{chunk-8fec55214eb03a61.js → chunk-201c5005a90452fa.js} +4 -2
- package/dist/chunk-201c5005a90452fa.js.map +11 -0
- package/dist/{chunk-cfb8c5b12b0e5378.js → chunk-23d3df5f8342ecc6.js} +4 -2
- package/dist/chunk-23d3df5f8342ecc6.js.map +54 -0
- package/dist/chunk-278677330e53423b.js +4 -0
- package/dist/chunk-278677330e53423b.js.map +26 -0
- package/dist/{chunk-e1929f0f7003fbdf.js → chunk-28ec4c2b20e69deb.js} +4 -2
- package/dist/chunk-28ec4c2b20e69deb.js.map +10 -0
- package/dist/chunk-2f8cf8372320b622.js +4 -0
- package/dist/chunk-2f8cf8372320b622.js.map +11 -0
- package/dist/{chunk-ef791082443c0cbd.js → chunk-53b0fab00d83f47e.js} +3 -1
- package/dist/chunk-53b0fab00d83f47e.js.map +13 -0
- package/dist/chunk-57ba59dd008d6e0e.js +4 -0
- package/dist/chunk-57ba59dd008d6e0e.js.map +32 -0
- package/dist/chunk-642b04056dab5d64.js +4 -0
- package/dist/chunk-642b04056dab5d64.js.map +11 -0
- package/dist/{chunk-dfb863d471bf3b18.js → chunk-643529c2ad120db7.js} +4 -2
- package/dist/chunk-643529c2ad120db7.js.map +50 -0
- package/dist/{chunk-b6fb088270ea6584.js → chunk-683905a55f8da1ad.js} +4 -2
- package/dist/chunk-683905a55f8da1ad.js.map +64 -0
- package/dist/{chunk-035e233acf299392.js → chunk-90436b32a64fc784.js} +4 -2
- package/dist/chunk-90436b32a64fc784.js.map +53 -0
- package/dist/chunk-99c32e4d937131e0.js +4 -0
- package/dist/chunk-99c32e4d937131e0.js.map +10 -0
- package/dist/{chunk-d7525516b1305ba3.js → chunk-9be25fac5f76b2f7.js} +3 -1
- package/dist/chunk-9be25fac5f76b2f7.js.map +13 -0
- package/dist/{chunk-f10ba402aaacfc12.js → chunk-9f9e21f9fd0d6af1.js} +4 -2
- package/dist/chunk-9f9e21f9fd0d6af1.js.map +10 -0
- package/dist/chunk-9ff3d7096b6de8eb.js +4 -0
- package/dist/chunk-9ff3d7096b6de8eb.js.map +22 -0
- package/dist/{chunk-cfbe2cbcadcb1ac1.js → chunk-a7d87b5d6d789781.js} +3 -1
- package/dist/chunk-a7d87b5d6d789781.js.map +23 -0
- package/dist/chunk-b84d011a2972c7d1.js +4 -0
- package/dist/chunk-b84d011a2972c7d1.js.map +10 -0
- package/dist/{chunk-2f8839f406606d63.js → chunk-bace428bfab523c4.js} +3 -1
- package/dist/chunk-bace428bfab523c4.js.map +23 -0
- package/dist/{chunk-494de321e3423d54.js → chunk-bd708d3c982948aa.js} +4 -2
- package/dist/chunk-bd708d3c982948aa.js.map +16 -0
- package/dist/{chunk-496c32676431beab.js → chunk-c8c4a1285a266c51.js} +4 -2
- package/dist/chunk-c8c4a1285a266c51.js.map +169 -0
- package/dist/{chunk-eabfa03c809e14df.js → chunk-cd4bfdd46ec4cbb8.js} +4 -2
- package/dist/chunk-cd4bfdd46ec4cbb8.js.map +10 -0
- package/dist/{chunk-0f0add364d3ea615.js → chunk-cd9c5e8a6c80384f.js} +3 -1
- package/dist/chunk-cd9c5e8a6c80384f.js.map +20 -0
- package/dist/{chunk-04f04986e53516f0.js → chunk-d5b8023c223e3a60.js} +3 -1
- package/dist/chunk-d5b8023c223e3a60.js.map +10 -0
- package/dist/chunk-e4961d79807acd3d.js +4 -0
- package/dist/chunk-e4961d79807acd3d.js.map +33 -0
- package/dist/client/ClientRouterContext.d.ts.map +1 -1
- package/dist/client/HttpReload.d.ts.map +1 -1
- package/dist/email/index.js +3 -1
- package/dist/email/index.js.map +11 -0
- package/dist/facades/Auth.d.ts.map +1 -1
- package/dist/facades/Broadcast.d.ts.map +1 -1
- package/dist/facades/FileStorage.d.ts.map +1 -1
- package/dist/facades/I18n.d.ts.map +1 -1
- package/dist/facades/Prefetch.d.ts.map +1 -1
- package/dist/facades/index.js +3 -1
- package/dist/facades/index.js.map +28 -0
- package/dist/http/AuthenticationMiddlware.d.ts.map +1 -1
- package/dist/http/I18nServiceContainer.d.ts +6 -9
- package/dist/http/I18nServiceContainer.d.ts.map +1 -1
- package/dist/http/I18nServiceProvider.d.ts +3 -1
- package/dist/http/I18nServiceProvider.d.ts.map +1 -1
- package/dist/http/MiddlewareServiceProvider.d.ts +3 -1
- package/dist/http/MiddlewareServiceProvider.d.ts.map +1 -1
- package/dist/http/RateLimitMiddleware.d.ts.map +1 -1
- package/dist/http/index.js +3 -1
- package/dist/http/index.js.map +29 -0
- package/dist/kernel/Kernel.d.ts +4 -32
- package/dist/kernel/Kernel.d.ts.map +1 -1
- package/dist/kernel/KernelContext.d.ts +1 -1
- package/dist/kernel/KernelContext.d.ts.map +1 -1
- package/dist/kernel/context.d.ts +1 -21
- package/dist/kernel/context.d.ts.map +1 -1
- package/dist/kernel/index.js +3 -1
- package/dist/kernel/index.js.map +11 -0
- package/dist/server/index.js +6 -4
- package/dist/server/index.js.map +17 -0
- package/dist/services/ServiceContainer.d.ts +2 -2
- package/dist/services/ServiceContainer.d.ts.map +1 -1
- package/dist/services/email/EmailServiceContainer.d.ts +1 -1
- package/dist/services/email/EmailServiceContainer.d.ts.map +1 -1
- package/dist/services/file-storage/FileStorageServiceContainer.d.ts +3 -1
- package/dist/services/file-storage/FileStorageServiceContainer.d.ts.map +1 -1
- package/dist/services/file-storage/FileStorageServiceProvider.d.ts +3 -1
- package/dist/services/file-storage/FileStorageServiceProvider.d.ts.map +1 -1
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +12 -1
- package/dist/services/index.js.map +121 -0
- package/dist/services/middleware/MiddlewareServiceContainer.d.ts +3 -1
- package/dist/services/middleware/MiddlewareServiceContainer.d.ts.map +1 -1
- package/dist/services/rate-limiter/RateLimiterServiceContainer.d.ts +3 -1
- package/dist/services/rate-limiter/RateLimiterServiceContainer.d.ts.map +1 -1
- package/dist/services/rate-limiter/RateLimiterServiceProvider.d.ts +3 -1
- package/dist/services/rate-limiter/RateLimiterServiceProvider.d.ts.map +1 -1
- package/dist/services/router/ApiRouterServiceContainer.d.ts +5 -1
- package/dist/services/router/ApiRouterServiceContainer.d.ts.map +1 -1
- package/dist/services/router/ApiRouterServiceProvider.d.ts +3 -4
- package/dist/services/router/ApiRouterServiceProvider.d.ts.map +1 -1
- package/dist/services/router/ViewRouterServiceContainer.d.ts +11 -1
- package/dist/services/router/ViewRouterServiceContainer.d.ts.map +1 -1
- package/dist/services/router/ViewRouterServiceProvider.d.ts +4 -9
- package/dist/services/router/ViewRouterServiceProvider.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-0fd23409fff0376b.js +0 -2
- package/dist/chunk-2573b2361de4a370.js +0 -2
- package/dist/chunk-33abc8f4f7df6791.js +0 -2
- package/dist/chunk-6286081da32e2feb.js +0 -2
- package/dist/chunk-9a9d43e4b919c267.js +0 -2
- package/dist/chunk-c459f3e37965c22f.js +0 -2
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Middleware, MiddlewareServiceProvider } from "../../http";
|
|
2
2
|
import type { RouterMiddleware } from "../../http/Router";
|
|
3
|
-
|
|
3
|
+
import { ServiceContainer } from "../ServiceContainer";
|
|
4
|
+
export declare class MiddlewareServiceContainer extends ServiceContainer {
|
|
4
5
|
service: MiddlewareServiceProvider;
|
|
6
|
+
name: string;
|
|
5
7
|
constructor(service: MiddlewareServiceProvider);
|
|
6
8
|
runMiddleware(middleware: (string | RouterMiddleware | (new (routePath: string) => Middleware))[], routePath: string): any;
|
|
7
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MiddlewareServiceContainer.d.ts","sourceRoot":"","sources":["../../../services/middleware/MiddlewareServiceContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEhF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"MiddlewareServiceContainer.d.ts","sourceRoot":"","sources":["../../../services/middleware/MiddlewareServiceContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEhF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAqBvD,qBAAa,0BAA2B,SAAQ,gBAAgB;IAE3C,OAAO,EAAE,yBAAyB;IAD9C,IAAI,SAAgC;gBACxB,OAAO,EAAE,yBAAyB;IAI9C,aAAa,CAClB,UAAU,EAAE,CACR,MAAM,GACN,gBAAgB,GAChB,CAAC,KAAK,SAAS,EAAE,MAAM,KAAK,UAAU,CAAC,CAC1C,EAAE,EACH,SAAS,EAAE,MAAM;CAoCpB"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { ServiceContainer } from "../ServiceContainer";
|
|
1
2
|
import { RateLimiterServiceProvider } from "./RateLimiterServiceProvider";
|
|
2
|
-
export declare class RateLimiterServiceContainer {
|
|
3
|
+
export declare class RateLimiterServiceContainer extends ServiceContainer {
|
|
3
4
|
service: RateLimiterServiceProvider;
|
|
5
|
+
name: string;
|
|
4
6
|
constructor(service: RateLimiterServiceProvider);
|
|
5
7
|
}
|
|
6
8
|
//# sourceMappingURL=RateLimiterServiceContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RateLimiterServiceContainer.d.ts","sourceRoot":"","sources":["../../../services/rate-limiter/RateLimiterServiceContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,qBAAa,
|
|
1
|
+
{"version":3,"file":"RateLimiterServiceContainer.d.ts","sourceRoot":"","sources":["../../../services/rate-limiter/RateLimiterServiceContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,qBAAa,2BAA4B,SAAQ,gBAAgB;IAG5C,OAAO,EAAE,0BAA0B;IAFtD,IAAI,SAAiC;gBAElB,OAAO,EAAE,0BAA0B;CAGvD"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { ServiceProvider } from "../ServiceProvider";
|
|
1
2
|
import { RateLimiterDriver } from "./drivers/RateLimiterDriver";
|
|
2
|
-
export declare class RateLimiterServiceProvider {
|
|
3
|
+
export declare class RateLimiterServiceProvider extends ServiceProvider {
|
|
3
4
|
driver: RateLimiterDriver;
|
|
5
|
+
boot(): void;
|
|
4
6
|
}
|
|
5
7
|
//# sourceMappingURL=RateLimiterServiceProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RateLimiterServiceProvider.d.ts","sourceRoot":"","sources":["../../../services/rate-limiter/RateLimiterServiceProvider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RateLimiterServiceProvider.d.ts","sourceRoot":"","sources":["../../../services/rate-limiter/RateLimiterServiceProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,qBAAa,0BAA2B,SAAQ,eAAe;IAC7D,MAAM,EAAE,iBAAiB,CAA6B;IAEtD,IAAI;CACL"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { ServiceContainer } from "../ServiceContainer";
|
|
1
2
|
import { ApiRouterServiceProvider } from "./ApiRouterServiceProvider";
|
|
2
|
-
|
|
3
|
+
import { type FlatApiRoutes } from "./createFlatApiRoutes";
|
|
4
|
+
export declare class ApiRouterServiceContainer extends ServiceContainer {
|
|
3
5
|
service: ApiRouterServiceProvider;
|
|
6
|
+
name: string;
|
|
7
|
+
flatRoutes: FlatApiRoutes;
|
|
4
8
|
constructor(service: ApiRouterServiceProvider);
|
|
5
9
|
getRouteHandlerAndParams(req: Request): {
|
|
6
10
|
params: Record<string, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiRouterServiceContainer.d.ts","sourceRoot":"","sources":["../../../services/router/ApiRouterServiceContainer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiRouterServiceContainer.d.ts","sourceRoot":"","sources":["../../../services/router/ApiRouterServiceContainer.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEhF,qBAAa,yBAA0B,SAAQ,gBAAgB;IAI1C,OAAO,EAAE,wBAAwB;IAHpD,IAAI,SAA+B;IACnC,UAAU,EAAE,aAAa,CAAM;gBAEZ,OAAO,EAAE,wBAAwB;IAS7C,wBAAwB,CAAC,GAAG,EAAE,OAAO;;;;IAuBtC,kBAAkB,CAAC,IAAI,EAAE,MAAM;IAyB/B,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IA+BxC,gBAAgB,CAAC,GAAG,EAAE,OAAO;CAsDpC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { ApiRoutes } from "../../http/ApiRouter";
|
|
1
|
+
import type { ApiRouter } from "../../http/ApiRouter";
|
|
3
2
|
import { ServiceProvider } from "../ServiceProvider";
|
|
4
3
|
export declare class ApiRouterServiceProvider extends ServiceProvider {
|
|
5
|
-
|
|
6
|
-
boot(
|
|
4
|
+
rootRouter: new () => ApiRouter;
|
|
5
|
+
boot(): string;
|
|
7
6
|
}
|
|
8
7
|
//# sourceMappingURL=ApiRouterServiceProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiRouterServiceProvider.d.ts","sourceRoot":"","sources":["../../../services/router/ApiRouterServiceProvider.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ApiRouterServiceProvider.d.ts","sourceRoot":"","sources":["../../../services/router/ApiRouterServiceProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,wBAAyB,SAAQ,eAAe;IAC3D,UAAU,EAAE,UAAU,SAAS,CAAC;IAEhC,IAAI;CAGL"}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
import { FlatViewRoutes } from "./createFlatViewRoutes";
|
|
1
2
|
import { ViewRouterServiceProvider } from "./ViewRouterServiceProvider";
|
|
2
|
-
|
|
3
|
+
import { ServiceContainer } from "../ServiceContainer";
|
|
4
|
+
import type { ComponentTree } from "../../client/types";
|
|
5
|
+
export declare class ViewRouterServiceContainer extends ServiceContainer {
|
|
3
6
|
service: ViewRouterServiceProvider;
|
|
7
|
+
name: string;
|
|
8
|
+
flatViewRoutes: FlatViewRoutes;
|
|
9
|
+
routeManifest: Record<string, string[]>;
|
|
10
|
+
componentTree: ComponentTree;
|
|
11
|
+
flatComponentTree: string[];
|
|
12
|
+
RootLayout: any;
|
|
4
13
|
constructor(service: ViewRouterServiceProvider);
|
|
14
|
+
boot(): void;
|
|
5
15
|
handleViewRequest(req: Request): Promise<Response | ((params: {
|
|
6
16
|
styles: any[];
|
|
7
17
|
viewImportMap: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewRouterServiceContainer.d.ts","sourceRoot":"","sources":["../../../services/router/ViewRouterServiceContainer.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"ViewRouterServiceContainer.d.ts","sourceRoot":"","sources":["../../../services/router/ViewRouterServiceContainer.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAOxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAMvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAIxD,qBAAa,0BAA2B,SAAQ,gBAAgB;IAS3C,OAAO,EAAE,yBAAyB;IARrD,IAAI,SAAgC;IAEpC,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;gBAEJ,OAAO,EAAE,yBAAyB;IAarD,IAAI;IAEE,iBAAiB,CAAC,GAAG,EAAE,OAAO,gCAwLZ;QACpB,MAAM,EAAE,GAAG,EAAE,CAAC;QACd,aAAa,EAAE,GAAG,CAAC;QACnB,gBAAgB,EAAE,MAAM,EAAE,CAAC;QAC3B,OAAO,EAAE,MAAM,CAAC;KACjB;CAwBJ"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ViewRoutes } from "../../http/ViewRouter";
|
|
1
|
+
import type { ViewRouter } from "../../http/ViewRouter";
|
|
3
2
|
import { ServiceProvider } from "../ServiceProvider";
|
|
4
|
-
import { type FlatViewRoutes } from "./createFlatViewRoutes";
|
|
5
3
|
export declare class ViewRouterServiceProvider extends ServiceProvider {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
flatComponentTree: string[];
|
|
10
|
-
RootLayout: any;
|
|
11
|
-
boot(routes: ViewRoutes, RootLayout: any): void;
|
|
4
|
+
rootLayout: (props: any) => JSX.Element;
|
|
5
|
+
rootRouter: new () => ViewRouter;
|
|
6
|
+
boot(): void;
|
|
12
7
|
}
|
|
13
8
|
//# sourceMappingURL=ViewRouterServiceProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewRouterServiceProvider.d.ts","sourceRoot":"","sources":["../../../services/router/ViewRouterServiceProvider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ViewRouterServiceProvider.d.ts","sourceRoot":"","sources":["../../../services/router/ViewRouterServiceProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,yBAA0B,SAAQ,eAAe;IAC5D,UAAU,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC,OAAO,CAAC;IACxC,UAAU,EAAE,UAAU,UAAU,CAAC;IAEjC,IAAI;CACL"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gemi",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.95",
|
|
4
4
|
"devDependencies": {
|
|
5
5
|
"@babel/parser": "^7.25.4",
|
|
6
6
|
"@repo/eslint-config": "*",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"lint": "eslint . --max-warnings 0",
|
|
40
40
|
"build": "bun run build:core && bun run build:bin && bun run build:types && bun run build:client && bun run build:plugin && bun run build:client-types",
|
|
41
41
|
"build:core": "bun ./scripts/build.ts",
|
|
42
|
-
"build:bin": "bun build ./bin/gemi.ts --target bun --external vite --external react-dom --external react/jsx-runtime --external bun --outfile ./dist/bin/index.js && bun ./scripts/prepare-bin.ts",
|
|
42
|
+
"build:bin": "bun build ./bin/gemi.ts --target bun --external vite --external react-dom --external react/jsx-runtime --external bun --sourcemap --outfile ./dist/bin/index.js && bun ./scripts/prepare-bin.ts",
|
|
43
43
|
"build:client": "vite build",
|
|
44
44
|
"build:plugin": "vite build -c vite.plugin.config.mts",
|
|
45
45
|
"build:types": "tsc",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var tt=function(t,e){return(e?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(t)},M=function(t,e=!1){let s=[],r=0;for(;r<t.length;){let a=t[r],u=function(o){if(!e)throw new TypeError(o);s.push({type:"INVALID_CHAR",index:r,value:t[r++]})};if(a==="*"){s.push({type:"ASTERISK",index:r,value:t[r++]});continue}if(a==="+"||a==="?"){s.push({type:"OTHER_MODIFIER",index:r,value:t[r++]});continue}if(a==="\\"){s.push({type:"ESCAPED_CHAR",index:r++,value:t[r++]});continue}if(a==="{"){s.push({type:"OPEN",index:r,value:t[r++]});continue}if(a==="}"){s.push({type:"CLOSE",index:r,value:t[r++]});continue}if(a===":"){let o="",i=r+1;for(;i<t.length;){let h=t.substr(i,1);if(i===r+1&&Q.test(h)||i!==r+1&&Y.test(h)){o+=t[i++];continue}break}if(!o){u(`Missing parameter name at ${r}`);continue}s.push({type:"NAME",index:r,value:o}),r=i;continue}if(a==="("){let o=1,i="",h=r+1,n=!1;if(t[h]==="?"){u(`Pattern cannot start with "?" at ${h}`);continue}for(;h<t.length;){if(!tt(t[h],!1)){u(`Invalid character '${t[h]}' at ${h}.`),n=!0;break}if(t[h]==="\\"){i+=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}i+=t[h++]}if(n)continue;if(o){u(`Unbalanced pattern at ${r}`);continue}if(!i){u(`Missing pattern at ${r}`);continue}s.push({type:"REGEX",index:r,value:i}),r=h;continue}s.push({type:"CHAR",index:r,value:t[r++]})}return s.push({type:"END",index:r,value:""}),s},F=function(t,e={}){let s=M(t);e.delimiter??="/#?",e.prefixes??="./";let r=`[^${d(e.delimiter)}]+?`,a=[],u=0,o=0,i="",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},J=(p)=>p,P=e.encodePart||J,T="",U=(p)=>{T+=p},I=()=>{T.length&&(a.push(new O(3,"","",P(T),"",3)),T="")},_=(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){U(p);return}if(I(),!c&&!l){if(!p)return;a.push(new O(3,"","",P(p),"",g));return}let m;l?l==="*"?m=D:m=l:m=r;let C=2;m===r?(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 O(C,b,P(p),m,P(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&&(U(v),v=""),I();let g=f();_(v,c,l,"",g);continue}let R=p??n("ESCAPED_CHAR");if(R){U(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"},et=function(t,e,s){return W(F(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 r=s.start?"^":"";for(let i of t){if(i.type===3){i.modifier===3?r+=d(i.value):r+=`(?:${d(i.value)})${k(i.modifier)}`;continue}e&&e.push(i.name);let h=`[^${d(s.delimiter)}]+?`,n=i.value;if(i.type===1?n=h:i.type===0&&(n=D),!i.prefix.length&&!i.suffix.length){i.modifier===3||i.modifier===1?r+=`(${n})${k(i.modifier)}`:r+=`((?:${n})${k(i.modifier)})`;continue}if(i.modifier===3||i.modifier===1){r+=`(?:${d(i.prefix)}(${n})${d(i.suffix)})`,r+=k(i.modifier);continue}r+=`(?:${d(i.prefix)}`,r+=`((?:${n})(?:`,r+=d(i.suffix),r+=d(i.prefix),r+=`(?:${n}))*)${d(i.suffix)})`,i.modifier===0&&(r+="?")}let a=`[${d(s.endsWith)}]|\$`,u=`[${d(s.delimiter)}]`;if(s.end)return s.strict||(r+=`${u}?`),s.endsWith.length?r+=`(?=${a})`:r+="$",new RegExp(r,j(s));s.strict||(r+=`(?:${u}(?=${a}))?`);let o=!1;if(t.length){let i=t[t.length-1];i.type===3&&i.modifier===3&&(o=s.delimiter.indexOf(i)>-1)}return o||(r+=`(?=${u}|${a})`),new RegExp(r,j(s))},rt=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},nt=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},ot=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):""},ht=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):""},at=function(t,e){return e||t===""?t:K(t)?q(t):Z(t)},ut=function(t,e){if(e||t==="")return t;let s=new URL("https://example.com");return s.password=t,s.password},pt=function(t,e){if(e||t==="")return t;let s=new URL("https://example.com");return s.username=t,s.username},ct=function(t,e,s){if(s||t==="")return t;if(e&&!X.includes(e))return new URL(`${e}:${t}`).pathname;let r=t[0]=="/";return t=new URL(r?t:"/-"+t,"https://example.com").pathname,r||(t=t.substring(2,t.length)),t},ft=function(t,e,s){return z(e)===t&&(t=""),s||t===""?t:B(t)},lt=function(t,e){return t=nt(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}'.`)},mt=function(t){if(t==="")return t;let e=new URL("https://example.com");return e.username=t,e.username},dt=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}'.`)},gt=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},wt=function(t){return t===""?t:new URL(`data:${t}`).pathname},yt=function(t){if(t==="")return t;let e=new URL("https://example.com");return e.search=t,e.search.substring(1,e.search.length)},vt=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 r;if(typeof e.baseURL=="string")try{r=new URL(e.baseURL),e.protocol===void 0&&(t.protocol=y(r.protocol.substring(0,r.protocol.length-1),s)),!s&&e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.username===void 0&&(t.username=y(r.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(r.password,s)),e.protocol===void 0&&e.hostname===void 0&&(t.hostname=y(r.hostname,s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&(t.port=y(r.port,s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&(t.pathname=y(r.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(r.search.substring(1,r.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(r.hash.substring(1,r.hash.length),s))}catch{throw new TypeError(`invalid baseURL '${e.baseURL}'.`)}if(typeof e.protocol=="string"&&(t.protocol=lt(e.protocol,s)),typeof e.username=="string"&&(t.username=pt(e.username,s)),typeof e.password=="string"&&(t.password=ut(e.password,s)),typeof e.hostname=="string"&&(t.hostname=at(e.hostname,s)),typeof e.port=="string"&&(t.port=ft(e.port,t.protocol,s)),typeof e.pathname=="string"){if(t.pathname=e.pathname,r&&!rt(t.pathname,s)){let a=r.pathname.lastIndexOf("/");a>=0&&(t.pathname=y(r.pathname.substring(0,a+1),s)+t.pathname)}t.pathname=ct(t.pathname,t.protocol,s)}return typeof e.search=="string"&&(t.search=ht(e.search,s)),typeof e.hash=="string"&&(t.hash=ot(e.hash,s)),t},A=function(t){return t.replace(/([+*?:{}()\\])/g,"\\$1")},xt=function(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")},$t=function(t,e){e.delimiter??="/#?",e.prefixes??="./",e.sensitive??=!1,e.strict??=!1,e.end??=!0,e.start??=!0,e.endsWith="";let s=".*",r=`[^${xt(e.delimiter)}]+?`,a=/[$_\u200C\u200D\p{ID_Continue}]/u,u="";for(let o=0;o<t.length;++o){let i=t[o];if(i.type===3){if(i.modifier===3){u+=A(i.value);continue}u+=`{${A(i.value)}}${k(i.modifier)}`;continue}let h=i.hasCustomName(),n=!!i.suffix.length||!!i.prefix.length&&(i.prefix.length!==1||!e.prefixes.includes(i.prefix)),f=o>0?t[o-1]:null,w=o<t.length-1?t[o+1]:null;if(!n&&h&&i.type===1&&i.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&&!i.prefix.length&&f&&f.type===3){let E=f.value[f.value.length-1];n=e.prefixes.includes(E)}n&&(u+="{"),u+=A(i.prefix),h&&(u+=`:${i.name}`),i.type===2?u+=`(${i.value})`:i.type===1?h||(u+=`(${r})`):i.type===0&&(!h&&(!f||f.type===3||f.modifier!==3||n||i.prefix!=="")?u+="*":u+=`(${s})`),i.type===1&&h&&i.suffix.length&&a.test(i.suffix[0])&&(u+="\\"),u+=A(i.suffix),n&&(u+="}"),i.modifier!==3&&(u+=k(i.modifier))}return u},O=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(t,e,s,r,a,u){this.type=t,this.name=e,this.prefix=s,this.value=r,this.suffix=a,this.modifier=u}hasCustomName(){return this.name!==""&&typeof this.name!="number"}},Q=/[$_\p{ID_Start}]/u,Y=/[$_\u200C\u200D\p{ID_Continue}]/u,D=".*",$={delimiter:"",prefixes:"",sensitive:!0,strict:!0},st={delimiter:".",prefixes:"",sensitive:!0,strict:!0},it={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0},X=["ftp","file","http","https","ws","wss"],bt=class{#n;#i=[];#e={};#t=0;#r=1;#u=0;#h=0;#l=0;#m=0;#d=!1;constructor(t){this.#n=t}get result(){return this.#e}parse(){for(this.#i=M(this.#n,!0);this.#t<this.#i.length;this.#t+=this.#r){if(this.#r=1,this.#i[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.#O();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.#r=0}#v(){this.#t=this.#u,this.#r=0}#f(t){this.#v(),this.#h=t}#g(t){return t<0&&(t=this.#i.length-t),t<this.#i.length?this.#i[t]:this.#i[this.#i.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.#i[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.#i[this.#t].type=="OPEN"}#C(){return this.#i[this.#t].type=="CLOSE"}#L(){return this.#o(this.#t,"[")}#A(){return this.#o(this.#t,"]")}#a(){let t=this.#i[this.#t],e=this.#g(this.#u).index;return this.#n.substring(e,t.index)}#O(){let t={};Object.assign(t,$),t.encodePart=N;let e=et(this.#a(),void 0,t);this.#d=V(e)}},S=["protocol","username","password","hostname","port","pathname","search","hash"],x="*",Et=class{#n;#i={};#e={};#t={};#r={};#u=!1;constructor(t={},e,s){try{let r;if(typeof e=="string"?r=e:s=e,typeof t=="string"){let i=new bt(t);if(i.parse(),t=i.result,r===void 0&&typeof t.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");t.baseURL=r}else{if(!t||typeof t!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(r)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 i={},h=this.#n[o];switch(this.#e[o]=[],o){case"protocol":Object.assign(i,$),i.encodePart=N;break;case"username":Object.assign(i,$),i.encodePart=mt;break;case"password":Object.assign(i,$),i.encodePart=dt;break;case"hostname":Object.assign(i,st),K(h)?i.encodePart=q:i.encodePart=Z;break;case"port":Object.assign(i,$),i.encodePart=B;break;case"pathname":V(this.#i.protocol)?(Object.assign(i,it,a),i.encodePart=gt):(Object.assign(i,$,a),i.encodePart=wt);break;case"search":Object.assign(i,$,a),i.encodePart=yt;break;case"hash":Object.assign(i,$,a),i.encodePart=vt;break}try{this.#r[o]=F(h,i),this.#i[o]=W(this.#r[o],this.#e[o],i),this.#t[o]=$t(this.#r[o],i),this.#u=this.#u||this.#r[o].some((n)=>n.type===2)}catch{throw new TypeError(`invalid ${o} pattern '${this.#n[o]}'.`)}}}catch(r){throw new TypeError(`Failed to construct 'URLPattern': ${r.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 r;for(r of S)if(!this.#i[r].exec(s[r]))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 r={};e?r.inputs=[t,e]:r.inputs=[t];let a;for(a of S){let u=this.#i[a].exec(s[a]);if(!u)return null;let o={};for(let[i,h]of this.#e[a].entries())if(typeof h=="string"||typeof h=="number"){let n=u[i+1];o[h]=n}r[a]={input:s[a]??"",groups:o}}return r}static compareComponent(t,e,s){let r=(i,h)=>{for(let n of["type","modifier","prefix","value","suffix"]){if(i[n]<h[n])return-1;if(i[n]===h[n])continue;return 1}return 0},a=new O(3,"","","","",3),u=new O(0,"","","","",3),o=(i,h)=>{let n=0;for(;n<Math.min(i.length,h.length);++n){let f=r(i[n],h[n]);if(f)return f}return i.length===h.length?0:r(i[n]??a,h[n]??a)};return!e.#t[t]&&!s.#t[t]?0:e.#t[t]&&!s.#t[t]?o(e.#r[t],[u]):!e.#t[t]&&s.#t[t]?o([u],s.#r[t]):o(e.#r[t],s.#r[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}};
|
|
2
|
-
export{Et as K};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{y as i} from"./chunk-7ce930fe69575c87.js";import"./chunk-e1929f0f7003fbdf.js";import{$ as Xe,M as U,N as _,O as Le,P as Me,Q as We,R as Ae,V as B,W as Qe,X as V,Y as N,Z as f,_ as g,aa as he,ba as ue,ca as we,da as be,ea as Ye,fa as Ze,ha as as,ia as ns,ja as je,ka as xe,la as ve,ma as Te,na as ke,oa as He,pa as x,qa as Re,ra as Ee,sa as qe,ta as Se,ua as Je,va as Ie} from"./chunk-496c32676431beab.js";import{$a as h,Da as se,Fa as te,Ga as re,Ha as Ke,Ia as ae,Ja as ne,Ma as le,Na as pe,Ta as rs,Ua as k,Za as z,_a as Ne,gb as Oe,hb as u,ib as fe,jb as ye,kb as me,lb as $e,mb as Pe,ob as c,pb as y,rb as ge,wa as Ue,xa as _e} from"./chunk-b6fb088270ea6584.js";import"./chunk-f10ba402aaacfc12.js";import{tb as l,ub as de} from"./chunk-494de321e3423d54.js";import"./chunk-eabfa03c809e14df.js";import"./chunk-2f8839f406606d63.js";var p=i(B(),1);var $=i(x(),1);var is=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(s,t)=>({signingProperties:{config:s,context:t}})}},b=function(e){return{schemeId:"smithy.api#noAuth"}},P=async(e,s,t)=>{return{operation:U(s).operation,region:await _(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},J=(e)=>{const s=[];switch(e.operation){case"GetRoleCredentials":{s.push(b(e));break}case"ListAccountRoles":{s.push(b(e));break}case"ListAccounts":{s.push(b(e));break}case"Logout":{s.push(b(e));break}default:s.push(is(e))}return s},I=(e)=>{return{...$.resolveAwsSdkSigV4Config(e)}};var C=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},L={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var M={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso 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","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.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-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}};var ze=i(x(),1);var oe=i(x(),1),ce=i(B(),1);var W={["required"]:!1,type:"String"},A={["required"]:!0,default:!1,type:"Boolean"},K={["ref"]:"Endpoint"},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},H={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},d={},Q={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},O={["ref"]:"PartitionResult"},X={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[O,"supportsDualStack"]}]},Y=[T],Z=[H],j=[{["ref"]:"Region"}],ps={version:"1.0",parameters:{Region:W,UseDualStack:A,UseFIPS:A,Endpoint:W},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[K]}],rules:[{conditions:Y,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Z,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:K,properties:d,headers:d},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:j}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:j,assign:"PartitionResult"}],rules:[{conditions:[T,H],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Q]},X],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:Y,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Q,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[O,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:d,headers:d},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Z,rules:[{conditions:[X],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},G=ps;var ys=new V({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ee=(e,s={})=>{return ys.get(e,()=>f(G,{endpointParams:e,logger:s.logger}))};N.aws=g;var ie=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??ae,base64Encoder:e?.base64Encoder??ne,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ee,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??J,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new oe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ce.NoAuthSigner}],logger:e?.logger??new re,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??de,utf8Decoder:e?.utf8Decoder??se,utf8Encoder:e?.utf8Encoder??te}};var De=(e)=>{me(process.version);const s=Se(e),t=()=>s().then(ye),r=ie(e);return ze.emitWarningIfUnsupportedVersion(process.version),{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??qe,defaultUserAgentProvider:e?.defaultUserAgentProvider??Re({serviceId:r.serviceId,clientVersion:M.version}),maxAttempts:e?.maxAttempts??l(ve),region:e?.region??l(we,be),requestHandler:le.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...ke,default:async()=>(await t()).retryMode||xe}),sha256:e?.sha256??Ee.bind(null,"sha256"),streamCollector:e?.streamCollector??pe,useDualstackEndpoint:e?.useDualstackEndpoint??l(he),useFipsEndpoint:e?.useFipsEndpoint??l(ue)}};var Be=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){const n=s.findIndex((D)=>D.schemeId===a.schemeId);if(n===-1)s.push(a);else s.splice(n,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){t=a},httpAuthSchemeProvider(){return t},setCredentials(a){r=a},credentials(){return r}}},Fe=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var v=(e)=>e,Ce=(e,s)=>{const t={...v(Je(e)),...v($e(e)),...v(Ue(e)),...v(Be(e))};return s.forEach((r)=>r.configure(t)),{...e,...Ie(t),...Pe(t),..._e(t),...Fe(t)}};class ms extends Ke{constructor(...[e]){const s=De(e||{}),t=C(s),r=Qe(t),a=Te(r),n=Ye(a),D=Le(n),ds=je(D),os=I(ds),F=Ce(os,e?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(Xe(this.config)),this.middlewareStack.use(He(this.config)),this.middlewareStack.use(Ze(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(We(this.config)),this.middlewareStack.use(Ae(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:P,identityProviderConfigProvider:async(cs)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":cs.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class o extends Oe{constructor(e){super(e);Object.setPrototypeOf(this,o.prototype)}}class R extends o{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,R.prototype)}}class E extends o{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,E.prototype)}}class q extends o{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,q.prototype)}}class S extends o{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,S.prototype)}}var Ge=(e)=>({...e,...e.accessToken&&{accessToken:k}}),hs=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:k},...e.sessionToken&&{sessionToken:k}}),Ve=(e)=>({...e,...e.roleCredentials&&{roleCredentials:hs(e.roleCredentials)}});var m=i(x(),1),es=i(B(),1);var ss=async(e,s)=>{const t=es.requestBuilder(e,s),r=c({},Rs,{[Bs]:e[qs]});t.bp("/federation/credentials");const a=c({[Ds]:[,z(e[zs],"roleName")],[Ss]:[,z(e[Es],"accountId")]});let n;return t.m("GET").h(r).q(a).b(n),t.build()};var ts=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return us(e,s);const t=c({$metadata:w(e)}),r=z(Ne(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:ge});return Object.assign(t,a),t};var us=async(e,s)=>{const t={...e,body:await m.parseJsonErrorBody(e.body,s)},r=m.loadRestJsonErrorCode(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await bs(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await xs(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await vs(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await ks(t,s);default:const a=t.body;return ws({output:e,parsedBody:a,errorCode:r})}},ws=fe(o),bs=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new R({$metadata:w(e),...t});return u(n,e.body)},xs=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new E({$metadata:w(e),...t});return u(n,e.body)},vs=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new q({$metadata:w(e),...t});return u(n,e.body)},ks=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new S({$metadata:w(e),...t});return u(n,e.body)},w=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var Rs=(e)=>e!==void 0&&e!==null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),Es="accountId",qs="accessToken",Ss="account_id";var zs="roleName",Ds="role_name",Bs="x-amz-sso_bearer_token";class Fs extends rs.classBuilder().ep(L).m(function(e,s,t,r){return[as(t,this.serialize,this.deserialize),ns(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(Ge,Ve).ser(ss).de(ts).build(){}export{ms as SSOClient,Fs as GetRoleCredentialsCommand};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-04f04986e53516f0.js";import{y as $} from"./chunk-7ce930fe69575c87.js";import"./chunk-e1929f0f7003fbdf.js";import{$ as mr,M as ee,N as re,O as or,P as dr,Q as cr,R as yr,V as H,W as ar,X as Ie,Y as Re,Z as Pe,_ as Te,aa as Ke,ba as Me,ca as Be,da as Le,ea as wr,fa as kr,ha as E,ia as S,ja as vr,ka as Qe,la as Xe,ma as Er,na as Ye,oa as Sr,pa as U,qa as Ze,ra as He,sa as Ne,ta as _e,ua as lr,va as hr} from"./chunk-496c32676431beab.js";import{$a as h,Da as je,Fa as Fe,Ga as De,Ha as tr,Ia as Ue,Ja as qe,Ma as Ve,Na as We,Ta as v,Ua as t,Va as Wr,Xa as _,Ya as b,Za as j,_a as F,gb as $r,hb as a,ib as Fr,jb as fe,kb as Ae,lb as sr,mb as ir,ob as d,pb as o,rb as I,wa as er,xa as rr} from"./chunk-b6fb088270ea6584.js";import"./chunk-f10ba402aaacfc12.js";import{tb as R,ub as xe} from"./chunk-494de321e3423d54.js";import"./chunk-eabfa03c809e14df.js";import{wb as ge} from"./chunk-8fec55214eb03a61.js";import"./chunk-2f8839f406606d63.js";var P=$(H(),1);var se=$(U(),1);var Br=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}},Z=function(e){return{schemeId:"smithy.api#noAuth"}},ie=async(e,s,r)=>{return{operation:ee(s).operation,region:await re(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},le=(e)=>{const s=[];switch(e.operation){case"CreateToken":{s.push(Z(e));break}case"RegisterClient":{s.push(Z(e));break}case"StartDeviceAuthorization":{s.push(Z(e));break}default:s.push(Br(e))}return s},he=(e)=>{return{...se.resolveAwsSdkSigV4Config(e)}};var ne=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},k={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var oe={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 pe=$(U(),1);var ze=$(U(),1),Ge=$(H(),1);var de={["required"]:!1,type:"String"},ce={["required"]:!0,default:!1,type:"Boolean"},ye={["ref"]:"Endpoint"},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},Ee={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},te={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Se={["ref"]:"PartitionResult"},ae={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Se,"supportsDualStack"]}]},me=[ve],we=[Ee],ke=[{["ref"]:"Region"}],Qr={version:"1.0",parameters:{Region:de,UseDualStack:ce,UseFIPS:ce,Endpoint:de},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ye]}],rules:[{conditions:me,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:we,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ye,properties:m,headers:m},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ke}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ke,assign:"PartitionResult"}],rules:[{conditions:[ve,Ee],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,te]},ae],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:me,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[te,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Se,"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:we,rules:[{conditions:[ae],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"}]},$e=Qr;var Xr=new Ie({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),be=(e,s={})=>{return Xr.get(e,()=>Pe($e,{endpointParams:e,logger:s.logger}))};Re.aws=Te;var Je=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Ue,base64Encoder:e?.base64Encoder??qe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??be,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new ze.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ge.NoAuthSigner}],logger:e?.logger??new De,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??xe,utf8Decoder:e?.utf8Decoder??je,utf8Encoder:e?.utf8Encoder??Fe}};var Ce=(e)=>{Ae(process.version);const s=_e(e),r=()=>s().then(fe),i=Je(e);return pe.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Ne,credentialDefaultProvider:e?.credentialDefaultProvider??ge,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ze({serviceId:i.serviceId,clientVersion:oe.version}),maxAttempts:e?.maxAttempts??R(Xe),region:e?.region??R(Be,Le),requestHandler:Ve.create(e?.requestHandler??r),retryMode:e?.retryMode??R({...Ye,default:async()=>(await r()).retryMode||Qe}),sha256:e?.sha256??He.bind(null,"sha256"),streamCollector:e?.streamCollector??We,useDualstackEndpoint:e?.useDualstackEndpoint??R(Ke),useFipsEndpoint:e?.useFipsEndpoint??R(Me)}};var Oe=(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}}},ue=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var q=(e)=>e,nr=(e,s)=>{const r={...q(lr(e)),...q(sr(e)),...q(er(e)),...q(Oe(e))};return s.forEach((i)=>i.configure(r)),{...e,...hr(r),...ir(r),...rr(r),...ue(r)}};class N extends tr{constructor(...[e]){const s=Ce(e||{}),r=ne(s),i=ar(r),l=Er(i),n=wr(l),T=or(n),Ar=vr(T),Kr=he(Ar),u=nr(Kr,e?.extensions||[]);super(u);this.config=u,this.middlewareStack.use(mr(this.config)),this.middlewareStack.use(Sr(this.config)),this.middlewareStack.use(kr(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(cr(this.config)),this.middlewareStack.use(yr(this.config)),this.middlewareStack.use(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ie,identityProviderConfigProvider:async(Mr)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Mr.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class c extends $r{constructor(e){super(e);Object.setPrototypeOf(this,c.prototype)}}class x extends c{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,x.prototype),this.error=e.error,this.error_description=e.error_description}}class z extends c{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends c{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends c{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends c{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends c{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class f extends c{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",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:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",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:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",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:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",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:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",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:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class Q extends c{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",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:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}var Ir=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),Rr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Pr=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Tr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),br=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),jr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var w=$(U(),1),D=$(H(),1);var Dr=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()},Ur=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=d({[hs]:[,"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()},qr=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()},xr=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()},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:y(e)}),i=j(F(await w.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},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:_,clientSecret:h,clientSecretExpiresAt:_,tokenEndpoint:h});return Object.assign(r,l),r},Vr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:y(e)}),i=j(F(await w.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},Y=async(e,s)=>{const r={...e,body:await w.parseJsonErrorBody(e.body,s)},i=w.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Zr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Hr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Nr(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await _r(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await pr(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await gr(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await ur(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await rs(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await ss(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await is(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await ls(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await es(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await Cr(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await Or(r,s);default:const l=r.body;return Yr({output:e,parsedBody:l,errorCode:i})}},Yr=Fr(c),Zr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new x({$metadata:y(e),...r});return a(n,e.body)},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 z({$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 G({$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 J({$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 V({$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 Q({$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 W({$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 X({$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 f({$metadata:y(e),...r});return a(n,e.body)},es=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 L({$metadata:y(e),...r});return a(n,e.body)},rs=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)},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 K({$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 M({$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 B({$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 hs="aws_iam";class p extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(Ir,Rr).ser(Dr).de(zr).build(){}class C extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Pr,Tr).ser(Ur).de(Gr).build(){}class g extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,br).ser(qr).de(Jr).build(){}class O extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(jr,void 0).ser(xr).de(Vr).build(){}var ns={CreateTokenCommand:p,CreateTokenWithIAMCommand:C,RegisterClientCommand:g,StartDeviceAuthorizationCommand:O};class fr extends N{}Wr(ns,fr);export{tr as __Client,B as UnsupportedGrantTypeException,M as UnauthorizedClientException,jr as StartDeviceAuthorizationRequestFilterSensitiveLog,O as StartDeviceAuthorizationCommand,K as SlowDownException,c as SSOOIDCServiceException,N as SSOOIDCClient,fr as SSOOIDC,br as RegisterClientResponseFilterSensitiveLog,g as RegisterClientCommand,A as InvalidScopeException,L as InvalidRequestRegionException,f as InvalidRequestException,X as InvalidRedirectUriException,W as InvalidGrantException,Q as InvalidClientMetadataException,V as InvalidClientException,J as InternalServerException,G as ExpiredTokenException,Tr as CreateTokenWithIAMResponseFilterSensitiveLog,Pr as CreateTokenWithIAMRequestFilterSensitiveLog,C as CreateTokenWithIAMCommand,Rr as CreateTokenResponseFilterSensitiveLog,Ir as CreateTokenRequestFilterSensitiveLog,p as CreateTokenCommand,z as AuthorizationPendingException,x as AccessDeniedException,v as $Command};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-04f04986e53516f0.js";import{y as b} from"./chunk-7ce930fe69575c87.js";import"./chunk-e1929f0f7003fbdf.js";import{$ as X0,M as Gl,N as dl,O as K0,P as F0,Q as B0,R as U0,V as Qh,W as Q0,X as zl,Y as Ml,Z as Nl,_ as Wl,aa as xl,ba as il,ca as cl,da as el,ea as Y0,fa as Z0,ha as F,ia as B,ja as $0,ka as pl,la as nl,ma as V0,na as ol,oa as P0,pa as Gh,qa as ul,ra as tl,sa as h0,ta as l0,ua as D0,va as E0} from"./chunk-496c32676431beab.js";import{$a as H,Da as Al,Fa as Ll,Ga as Rl,Ha as y0,Ia as jl,Ja as al,Ma as fl,Na as Cl,Ta as K,Ua as Sh,Va as hw,Za as R0,bb as u,eb as j0,gb as v0,hb as T,ib as a0,jb as Ol,kb as gl,lb as m0,mb as J0,nb as eh,wa as S0,xa as H0,ya as L0} from"./chunk-b6fb088270ea6584.js";import"./chunk-f10ba402aaacfc12.js";import{tb as f,ub as sl} from"./chunk-494de321e3423d54.js";import"./chunk-eabfa03c809e14df.js";import{wb as Xh} from"./chunk-8fec55214eb03a61.js";import"./chunk-2f8839f406606d63.js";var C=b(Qh(),1);var Il=b(Gh(),1);var Ew=function(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(w,l)=>({signingProperties:{config:w,context:l}})}},wl=function(h){return{schemeId:"smithy.api#noAuth"}},Sl=async(h,w,l)=>{return{operation:Gl(w).operation,region:await dl(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Hl=(h)=>{const w=[];switch(h.operation){case"AssumeRoleWithSAML":{w.push(wl(h));break}case"AssumeRoleWithWebIdentity":{w.push(wl(h));break}default:w.push(Ew(h))}return w},kw=(h)=>({...h,stsClientCtor:A}),ml=(h)=>{const w=kw(h);return{...Il.resolveAwsSdkSigV4Config(w)}};var Jl=(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 Dl={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 dh=b(Gh(),1);var w0=b(Qh(),1);var rl=b(Gh(),1),_l=b(Qh(),1);var El={["required"]:!1,["type"]:"String"},yh={["required"]:!0,default:!1,["type"]:"Boolean"},Yl={["ref"]:"Endpoint"},kl={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},J={["ref"]:"Region"},Kl={["fn"]:"aws.partition",["argv"]:[J],assign:"PartitionResult"},Zl={["ref"]:"UseFIPS"},$l={["ref"]:"UseDualStack"},E={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},X={},Fl={conditions:[{["fn"]:"stringEquals",["argv"]:[J,"aws-global"]}],["endpoint"]:E,["type"]:"endpoint"},Vl={["fn"]:"booleanEquals",["argv"]:[Zl,!0]},Pl={["fn"]:"booleanEquals",["argv"]:[$l,!0]},Bl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},vl={["ref"]:"PartitionResult"},Ul={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[vl,"supportsDualStack"]}]},yl=[{["fn"]:"isSet",["argv"]:[Yl]}],Ql=[Vl],Xl=[Pl],Fw={version:"1.0",parameters:{Region:El,UseDualStack:yh,UseFIPS:yh,Endpoint:El,UseGlobalEndpoint:yh},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:yl},kl,Kl,{["fn"]:"booleanEquals",["argv"]:[Zl,!1]},{["fn"]:"booleanEquals",["argv"]:[$l,!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"},Fl,{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:yl,rules:[{conditions:Ql,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:Xl,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:Yl,properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[kl],rules:[{conditions:[Kl],rules:[{conditions:[Vl,Pl],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Bl]},Ul],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:Ql,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Bl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[vl,"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:Xl,rules:[{conditions:[Ul],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"},Fl,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},ql=Fw;var Bw=new zl({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Tl=(h,w={})=>{return Bw.get(h,()=>Nl(ql,{endpointParams:h,logger:w.logger}))};Ml.aws=Wl;var bl=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??jl,base64Encoder:h?.base64Encoder??al,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??Tl,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??Hl,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new rl.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new _l.NoAuthSigner}],logger:h?.logger??new Rl,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??sl,utf8Decoder:h?.utf8Decoder??Al,utf8Encoder:h?.utf8Encoder??Ll}};var G0=(h)=>{gl(process.version);const w=l0(h),l=()=>w().then(Ol),G=bl(h);return dh.emitWarningIfUnsupportedVersion(process.version),{...G,...h,runtime:"node",defaultsMode:w,bodyLengthChecker:h?.bodyLengthChecker??h0,credentialDefaultProvider:h?.credentialDefaultProvider??Xh,defaultUserAgentProvider:h?.defaultUserAgentProvider??ul({serviceId:G.serviceId,clientVersion:Dl.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(d)=>d.getIdentityProvider("aws.auth#sigv4")||(async(S)=>await Xh(S?.__config||{})()),signer:new dh.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(d)=>d.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new w0.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(nl),region:h?.region??f(cl,el),requestHandler:fl.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...ol,default:async()=>(await l()).retryMode||pl}),sha256:h?.sha256??tl.bind(null,"sha256"),streamCollector:h?.streamCollector??Cl,useDualstackEndpoint:h?.useDualstackEndpoint??f(xl),useFipsEndpoint:h?.useFipsEndpoint??f(il)}};var d0=(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}}},I0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var Ih=(h)=>h,k0=(h,w)=>{const l={...Ih(D0(h)),...Ih(m0(h)),...Ih(S0(h)),...Ih(d0(h))};return w.forEach((G)=>G.configure(l)),{...h,...E0(l),...J0(l),...H0(l),...I0(l)}};class A extends y0{constructor(...[h]){const w=G0(h||{}),l=Jl(w),G=Q0(l),d=V0(G),S=Y0(d),I=K0(S),Q=$0(I),z=ml(Q),v=k0(z,h?.extensions||[]);super(v);this.config=v,this.middlewareStack.use(X0(this.config)),this.middlewareStack.use(P0(this.config)),this.middlewareStack.use(Z0(this.config)),this.middlewareStack.use(F0(this.config)),this.middlewareStack.use(B0(this.config)),this.middlewareStack.use(U0(this.config)),this.middlewareStack.use(C.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Sl,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 Hh extends Y{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,Hh.prototype)}}class mh extends Y{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,mh.prototype)}}class Jh extends Y{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends Y{constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class Eh extends Y{constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,Eh.prototype)}}class kh extends Y{constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,kh.prototype)}}class Kh extends Y{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,Kh.prototype)}}class Fh extends Y{constructor(h){super({name:"InvalidAuthorizationMessageException",$fault:"client",...h});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,Fh.prototype)}}var o=(h)=>({...h,...h.SecretAccessKey&&{SecretAccessKey:Sh}}),q0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),z0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:Sh}}),M0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),N0=(h)=>({...h,...h.WebIdentityToken&&{WebIdentityToken:Sh}}),W0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),T0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),A0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}});var q=b(Gh(),1);var s0=async(h,w)=>{const l=j;let G;return G=_({...Pw(h,w),[s]:lG,[r]:a}),R(w,l,"/",void 0,G)},r0=async(h,w)=>{const l=j;let G;return G=_({...vw(h,w),[s]:wG,[r]:a}),R(w,l,"/",void 0,G)},_0=async(h,w)=>{const l=j;let G;return G=_({...qw(h,w),[s]:GG,[r]:a}),R(w,l,"/",void 0,G)},b0=async(h,w)=>{const l=j;let G;return G=_({...zw(h,w),[s]:dG,[r]:a}),R(w,l,"/",void 0,G)},f0=async(h,w)=>{const l=j;let G;return G=_({...Mw(h,w),[s]:IG,[r]:a}),R(w,l,"/",void 0,G)},C0=async(h,w)=>{const l=j;let G;return G=_({...Nw(h,w),[s]:SG,[r]:a}),R(w,l,"/",void 0,G)},O0=async(h,w)=>{const l=j;let G;return G=_({...Ww(h,w),[s]:HG,[r]:a}),R(w,l,"/",void 0,G)},g0=async(h,w)=>{const l=j;let G;return G=_({...Tw(h,w),[s]:mG,[r]:a}),R(w,l,"/",void 0,G)},x0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=sw(l.AssumeRoleResult,w),{$metadata:k(h),...G}},i0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=rw(l.AssumeRoleWithSAMLResult,w),{$metadata:k(h),...G}},c0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=_w(l.AssumeRoleWithWebIdentityResult,w),{$metadata:k(h),...G}},e0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=bw(l.DecodeAuthorizationMessageResult,w),{$metadata:k(h),...G}},p0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=Ow(l.GetAccessKeyInfoResult,w),{$metadata:k(h),...G}},n0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=gw(l.GetCallerIdentityResult,w),{$metadata:k(h),...G}},o0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=xw(l.GetFederationTokenResult,w),{$metadata:k(h),...G}},u0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=iw(l.GetSessionTokenResult,w),{$metadata:k(h),...G}},L=async(h,w)=>{const l={...h,body:await q.parseXmlErrorBody(h.body,w)},G=JG(h,l.body);switch(G){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Uw(l,w);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Zw(l,w);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await $w(l,w);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Vw(l,w);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Qw(l,w);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Yw(l,w);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await yw(l,w);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Xw(l,w);default:const d=l.body;return hG({output:h,parsedBody:d.Error,errorCode:G})}},Uw=async(h,w)=>{const l=h.body,G=fw(l.Error,w),d=new Hh({$metadata:k(h),...G});return T(d,l)},yw=async(h,w)=>{const l=h.body,G=cw(l.Error,w),d=new Kh({$metadata:k(h),...G});return T(d,l)},Qw=async(h,w)=>{const l=h.body,G=ew(l.Error,w),d=new Eh({$metadata:k(h),...G});return T(d,l)},Xw=async(h,w)=>{const l=h.body,G=pw(l.Error,w),d=new Fh({$metadata:k(h),...G});return T(d,l)},Yw=async(h,w)=>{const l=h.body,G=nw(l.Error,w),d=new kh({$metadata:k(h),...G});return T(d,l)},Zw=async(h,w)=>{const l=h.body,G=ow(l.Error,w),d=new mh({$metadata:k(h),...G});return T(d,l)},$w=async(h,w)=>{const l=h.body,G=uw(l.Error,w),d=new Jh({$metadata:k(h),...G});return T(d,l)},Vw=async(h,w)=>{const l=h.body,G=tw(l.Error,w),d=new Dh({$metadata:k(h),...G});return T(d,l)},Pw=(h,w)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[$]!=null){const G=Bh(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=t0(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[Oh]!=null){const G=aw(h[Oh],w);if(h[Oh]?.length===0)l.TransitiveTagKeys=[];Object.entries(G).forEach(([d,S])=>{const I=`TransitiveTagKeys.${d}`;l[I]=S})}if(h[Ph]!=null)l[Ph]=h[Ph];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[Rh]!=null){const G=Rw(h[Rh],w);if(h[Rh]?.length===0)l.ProvidedContexts=[];Object.entries(G).forEach(([d,S])=>{const I=`ProvidedContexts.${d}`;l[I]=S})}return l},vw=(h,w)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[Ah]!=null)l[Ah]=h[Ah];if(h[_h]!=null)l[_h]=h[_h];if(h[$]!=null){const G=Bh(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},qw=(h,w)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[ih]!=null)l[ih]=h[ih];if(h[jh]!=null)l[jh]=h[jh];if(h[$]!=null){const G=Bh(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[vh]!=null)l[vh]=h[vh];return l},Mw=(h,w)=>{const l={};if(h[O]!=null)l[O]=h[O];return l},Nw=(h,w)=>{return{}},Ww=(h,w)=>{const l={};if(h[Wh]!=null)l[Wh]=h[Wh];if(h[Z]!=null)l[Z]=h[Z];if(h[$]!=null){const G=Bh(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=t0(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},Tw=(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},Bh=(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},Aw=(h,w)=>{const l={};if(h[ch]!=null)l[ch]=h[ch];return l},Lw=(h,w)=>{const l={};if(h[Lh]!=null)l[Lh]=h[Lh];if(h[Zh]!=null)l[Zh]=h[Zh];return l},Rw=(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},jw=(h,w)=>{const l={};if(h[Nh]!=null)l[Nh]=h[Nh];if(h[xh]!=null)l[xh]=h[xh];return l},aw=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;l[`member.${G}`]=d,G++}return l},t0=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;const S=jw(d,w);Object.entries(S).forEach(([I,Q])=>{l[`member.${G}.${I}`]=Q}),G++}return l},ph=(h,w)=>{const l={};if(h[Yh]!=null)l[Yh]=H(h[Yh]);if(h[N]!=null)l[N]=H(h[N]);return l},sw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[M]!=null)l[M]=ph(h[M],w);if(h[V]!=null)l[V]=u(h[V]);if(h[P]!=null)l[P]=H(h[P]);return l},rw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[M]!=null)l[M]=ph(h[M],w);if(h[V]!=null)l[V]=u(h[V]);if(h[sh]!=null)l[sh]=H(h[sh]);if(h[fh]!=null)l[fh]=H(h[fh]);if(h[Mh]!=null)l[Mh]=H(h[Mh]);if(h[x]!=null)l[x]=H(h[x]);if(h[Th]!=null)l[Th]=H(h[Th]);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[bh]!=null)l[bh]=H(h[bh]);if(h[M]!=null)l[M]=ph(h[M],w);if(h[V]!=null)l[V]=u(h[V]);if(h[ah]!=null)l[ah]=H(h[ah]);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[rh]!=null)l[rh]=H(h[rh]);if(h[Ch]!=null)l[Ch]=H(h[Ch]);if(h[Vh]!=null)l[Vh]=R0(j0(h[Vh]));return l},bw=(h,w)=>{const l={};if(h[$h]!=null)l[$h]=H(h[$h]);return l},fw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},Cw=(h,w)=>{const l={};if(h[zh]!=null)l[zh]=H(h[zh]);if(h[N]!=null)l[N]=H(h[N]);return l},Ow=(h,w)=>{const l={};if(h[g]!=null)l[g]=H(h[g]);return l},gw=(h,w)=>{const l={};if(h[gh]!=null)l[gh]=H(h[gh]);if(h[g]!=null)l[g]=H(h[g]);if(h[N]!=null)l[N]=H(h[N]);return l},xw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[qh]!=null)l[qh]=Cw(h[qh],w);if(h[V]!=null)l[V]=u(h[V]);return l},iw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);return l},cw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);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},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 hG=a0(Y),R=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 L0(v)},j={"content-type":"application/x-www-form-urlencoded"},a="2011-06-15",s="Action",O="AccessKeyId",lG="AssumeRole",Yh="AssumedRoleId",M="AssumedRoleUser",wG="AssumeRoleWithSAML",GG="AssumeRoleWithWebIdentity",g="Account",N="Arn",x="Audience",U="Credentials",Zh="ContextAssertion",dG="DecodeAuthorizationMessage",$h="DecodedMessage",y="DurationSeconds",Vh="Expiration",Ph="ExternalId",vh="EncodedMessage",qh="FederatedUser",zh="FederatedUserId",IG="GetAccessKeyInfo",SG="GetCallerIdentity",HG="GetFederationToken",mG="GetSessionToken",Mh="Issuer",Nh="Key",Wh="Name",Th="NameQualifier",Z="Policy",$="PolicyArns",Ah="PrincipalArn",Lh="ProviderArn",Rh="ProvidedContexts",jh="ProviderId",V="PackedPolicySize",ah="Provider",W="RoleArn",i="RoleSessionName",sh="Subject",rh="SecretAccessKey",_h="SAMLAssertion",bh="SubjectFromWebIdentityToken",P="SourceIdentity",c="SerialNumber",fh="SubjectType",Ch="SessionToken",e="Tags",p="TokenCode",Oh="TransitiveTagKeys",gh="UserId",r="Version",xh="Value",ih="WebIdentityToken",ch="arn",m="message",_=(h)=>Object.entries(h).map(([w,l])=>eh(w)+"="+eh(l)).join("&"),JG=(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,q0).ser(s0).de(x0).build(){}class nh 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(z0,M0).ser(r0).de(i0).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(N0,W0).ser(_0).de(c0).build(){}class oh 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(b0).de(e0).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","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(f0).de(p0).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","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(C0).de(n0).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","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,T0).ser(O0).de(o0).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","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,A0).ser(g0).de(u0).build(){}var DG={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:nh,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:oh,GetAccessKeyInfoCommand:uh,GetCallerIdentityCommand:th,GetFederationTokenCommand:hl,GetSessionTokenCommand:ll};class lw extends A{}hw(DG,lw);var ww="us-east-1",Gw=(h)=>{if(typeof h?.Arn==="string"){const w=h.Arn.split(":");if(w.length>4&&w[4]!=="")return w[4]}return},dw=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)`,`${ww} (STS default)`),G??d??ww},Iw=(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:Uh}=h,Jw=await dw(n,h?.parentClientConfig?.region,Uh),Dw=!Hw(wh);l=new w({credentialDefaultProvider:()=>async()=>G,region:Jw,requestHandler:Dw?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=Gw(Q);return{accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...z&&{accountId:z}}}},Sw=(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 dw(z,h?.parentClientConfig?.region,n),Uh=!Hw(v);l=new w({region:wh,requestHandler:Uh?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=Gw(S);return{accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,sessionToken:d.SessionToken,expiration:d.Expiration,...d.CredentialScope&&{credentialScope:d.CredentialScope},...I&&{accountId:I}}}};var Hw=(h)=>{return h?.metadata?.handlerProtocol==="h2"};var mw=(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)}}},EG=(h={},w)=>Iw(h,mw(A,w)),kG=(h={},w)=>Sw(h,mw(A,w)),sI=(h)=>(w)=>h({roleAssumer:EG(w),roleAssumerWithWebIdentity:kG(w),...w});export{kG as getDefaultRoleAssumerWithWebIdentity,EG as getDefaultRoleAssumer,sI as decorateDefaultCredentialProvider,y0 as __Client,Y as STSServiceException,A as STSClient,lw as STS,Dh as RegionDisabledException,Jh as PackedPolicyTooLargeException,mh as MalformedPolicyDocumentException,kh as InvalidIdentityTokenException,Fh as InvalidAuthorizationMessageException,Eh as IDPRejectedClaimException,Kh as IDPCommunicationErrorException,A0 as GetSessionTokenResponseFilterSensitiveLog,ll as GetSessionTokenCommand,T0 as GetFederationTokenResponseFilterSensitiveLog,hl as GetFederationTokenCommand,th as GetCallerIdentityCommand,uh as GetAccessKeyInfoCommand,Hh as ExpiredTokenException,oh as DecodeAuthorizationMessageCommand,o as CredentialsFilterSensitiveLog,W0 as AssumeRoleWithWebIdentityResponseFilterSensitiveLog,N0 as AssumeRoleWithWebIdentityRequestFilterSensitiveLog,lh as AssumeRoleWithWebIdentityCommand,M0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,z0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,nh as AssumeRoleWithSAMLCommand,q0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,K as $Command};
|