appos 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +399 -0
- package/build/client/assets/IconMail-BZadZvAd.js +1 -0
- package/build/client/assets/_-CgPm6_fJ.js +1 -0
- package/build/client/assets/_index-BCLDp_mg.js +1 -0
- package/build/client/assets/_layout-CTmjtKOZ.js +1 -0
- package/build/client/assets/_layout-HsJ3Zu5t.js +1 -0
- package/build/client/assets/_layout-OcS85aOt.js +1 -0
- package/build/client/assets/app-sidebar-Bm6e4kn_.js +1 -0
- package/build/client/assets/app-sidebar-D2Nsi85j.js +1 -0
- package/build/client/assets/auth-provider-rkzBVtYX.js +1 -0
- package/build/client/assets/brand-CbTWw97e.js +1 -0
- package/build/client/assets/browser-ponyfill-D3yQFvRu.js +2 -0
- package/build/client/assets/button-DtZhoqpk.js +1 -0
- package/build/client/assets/check-D5D2EGI4.js +1 -0
- package/build/client/assets/checkbox-B35Nn166.js +1 -0
- package/build/client/assets/chunk-JG3XND5A-BetDbdG0.js +1 -0
- package/build/client/assets/chunk-UIGDSWPH-DeiamgQc.js +26 -0
- package/build/client/assets/chunk-vBKQ29Cd.js +1 -0
- package/build/client/assets/circle-alert-DB4JluX5.js +1 -0
- package/build/client/assets/compare-Br3z3FUS-BXkA2ojG.js +2 -0
- package/build/client/assets/compiler-runtime-Co9svCia.js +1 -0
- package/build/client/assets/config-ChcA_Pkv.js +1 -0
- package/build/client/assets/createReactComponent-C2TSpqC7.js +1 -0
- package/build/client/assets/dialog-CQrpvURm.js +1 -0
- package/build/client/assets/dist-B6TkSbxV.js +1 -0
- package/build/client/assets/dist-BNO39Rfs.js +1 -0
- package/build/client/assets/dist-BWnI-4xl.js +1 -0
- package/build/client/assets/dist-CA21wN5I.js +1 -0
- package/build/client/assets/dist-CBNvQRbZ.js +1 -0
- package/build/client/assets/dist-CYRPrwOb.js +1 -0
- package/build/client/assets/dist-DKtC0FSi.js +1 -0
- package/build/client/assets/dist-DhfcebhF.js +1 -0
- package/build/client/assets/dist-VqaKdvZu.js +1 -0
- package/build/client/assets/dist-Yn6lj8QC.js +5 -0
- package/build/client/assets/dropdown-menu-CbzduuDa.js +1 -0
- package/build/client/assets/empty-DQRarCKT.js +1 -0
- package/build/client/assets/entry.client-BN1GPjAL.js +10 -0
- package/build/client/assets/es2015-BJguufLZ.js +41 -0
- package/build/client/assets/eye-Ctrln70x.js +1 -0
- package/build/client/assets/file-preview-dialog-BRkWSRN4.js +14 -0
- package/build/client/assets/index-Del2yBnb.js +1 -0
- package/build/client/assets/initReactI18next-CyHiepAw.js +1 -0
- package/build/client/assets/input-V1lM1yoz.js +1 -0
- package/build/client/assets/jsx-runtime-SCjaiuzT.js +1 -0
- package/build/client/assets/lock-Bj7dxHab.js +1 -0
- package/build/client/assets/manifest-ca813980.js +1 -0
- package/build/client/assets/nav-user-BqPUBe9x.js +1 -0
- package/build/client/assets/nav-user-Yu7wt7b_.js +1 -0
- package/build/client/assets/org-switcher-BIuearbE.js +1 -0
- package/build/client/assets/password-input-bor7e4TM.js +1 -0
- package/build/client/assets/react-dom-Bhi-1tDD.js +1 -0
- package/build/client/assets/realtime-BmU1LPhx.js +1 -0
- package/build/client/assets/root-CS5YIV-V.js +3 -0
- package/build/client/assets/root-D0CFuQYc.css +2 -0
- package/build/client/assets/route-B9cwW-UK.js +1 -0
- package/build/client/assets/route-BD2nV1q2.js +1 -0
- package/build/client/assets/route-BEnDcljt.js +1 -0
- package/build/client/assets/route-BR4LdxHR.js +1 -0
- package/build/client/assets/route-BU5TYmVE.js +0 -0
- package/build/client/assets/route-BVmIPEvK.js +11 -0
- package/build/client/assets/route-BY244T48.js +1 -0
- package/build/client/assets/route-Bwd903CU.js +1 -0
- package/build/client/assets/route-CN9iChOk.js +1 -0
- package/build/client/assets/route-CQ3p9Qb1.js +1 -0
- package/build/client/assets/route-CVLnTONw.js +1 -0
- package/build/client/assets/route-CoMZag4T.js +1 -0
- package/build/client/assets/route-CsYSLbnx.js +1 -0
- package/build/client/assets/route-DWNrq2GE.js +1 -0
- package/build/client/assets/route-Dxfmap_u.js +1 -0
- package/build/client/assets/route-Gnx1fkRX.js +0 -0
- package/build/client/assets/route-NduA4SS_.js +1 -0
- package/build/client/assets/route-u2hskgE_.js +1 -0
- package/build/client/assets/route-v9Jwv-AW.js +1 -0
- package/build/client/assets/select-DATRE76_.js +1 -0
- package/build/client/assets/separator-Cla0V581.js +1 -0
- package/build/client/assets/shim-TRiHENXu.js +1 -0
- package/build/client/assets/sidebar-CqrdL512.js +1 -0
- package/build/client/assets/site-header-CZO3qBhf.js +1 -0
- package/build/client/assets/site-header-CwidwSv1.js +1 -0
- package/build/client/assets/social-providers-Bz7f1_yd.js +1 -0
- package/build/client/assets/test-WdoqKbLa.js +1 -0
- package/build/client/assets/tooltip-BeDraHQn.js +1 -0
- package/build/client/assets/trpc-C1CjVipH.js +6 -0
- package/build/client/assets/trust-indicator-D4tEs4Dr.js +20 -0
- package/build/client/assets/use-file-upload-CNPfWC6W.js +1 -0
- package/build/client/assets/useTranslation-Bz7VuQ7j.js +1 -0
- package/build/client/assets/utils-InBzhUf_.js +1 -0
- package/build/client/assets/x-4CC8aqOW.js +1 -0
- package/build/client/favicon.ico +0 -0
- package/build/client/locales/en/emails.json +11 -0
- package/build/client/locales/en/translation.json +411 -0
- package/build/client/locales/zh-CN/emails.json +11 -0
- package/build/client/locales/zh-CN/translation.json +1 -0
- package/build/client/locales/zh-TW/emails.json +11 -0
- package/build/client/locales/zh-TW/translation.json +1 -0
- package/build/client/logo-invert.png +0 -0
- package/build/client/logo.png +0 -0
- package/build/lib/adapter-factory-CLtf7vT5-CTKiMV2u.mjs +19675 -0
- package/build/lib/bun-sqlite-dialect-DN7EKoIB-0pWIoG0L.mjs +155 -0
- package/build/lib/chunk-BYI67GdN.mjs +1 -0
- package/build/lib/chunk-CkKlU7xI.mjs +44 -0
- package/build/lib/client-BtuhFgvy.mjs +65 -0
- package/build/lib/client.d.ts +2272 -0
- package/build/lib/client.js +24 -0
- package/build/lib/date.d.ts +1 -0
- package/build/lib/date.js +1 -0
- package/build/lib/dialect-BeMwdQoz-D41NdSow.mjs +72 -0
- package/build/lib/dist-cjs-B43A5HXv.mjs +169 -0
- package/build/lib/dist-cjs-B_wkbabY.mjs +214 -0
- package/build/lib/dist-cjs-BmbYbMhp.mjs +143 -0
- package/build/lib/dist-cjs-Cc337rwW.mjs +7 -0
- package/build/lib/dist-cjs-CgzfN8xY.mjs +4974 -0
- package/build/lib/dist-cjs-DBFcizQf.mjs +50 -0
- package/build/lib/dist-cjs-DC-UL-xx.mjs +97 -0
- package/build/lib/dist-cjs-DHlTgXUO.mjs +6975 -0
- package/build/lib/dist-cjs-DYAmJYzN.mjs +323 -0
- package/build/lib/dist-cjs-Ddm6Stp9.mjs +1294 -0
- package/build/lib/dist-cjs-GFGBhaZg.mjs +84 -0
- package/build/lib/dist-cjs-ieCOxrOi.mjs +181 -0
- package/build/lib/dist-cjs-nbOGa7i_.mjs +47 -0
- package/build/lib/dist-cjs-pN6ekzMW.mjs +66 -0
- package/build/lib/dist-cjs-yYlQ1OiO.mjs +102 -0
- package/build/lib/esm-DPet4lFW.mjs +15816 -0
- package/build/lib/event-streams-x9fP9BzF.mjs +185 -0
- package/build/lib/file-preview-dialog-Cugg8tEc.mjs +59 -0
- package/build/lib/kysely-adapter-BTWfu5rn.mjs +183 -0
- package/build/lib/magic-string.es-jZcifc5m.mjs +1013 -0
- package/build/lib/memory-adapter-DiU519m9.mjs +147 -0
- package/build/lib/node-ponyfill-Dmm1SWTU.mjs +38212 -0
- package/build/lib/node-sqlite-dialect-BqISUSC3-DYvTLBpY.mjs +155 -0
- package/build/lib/package-DfozRyK6.mjs +5 -0
- package/build/lib/react-dom-CPjM_WCt.mjs +42 -0
- package/build/lib/server.d.mts +76273 -0
- package/build/lib/server.mjs +325 -0
- package/build/lib/sso-oidc-Qom0PEDW.mjs +1036 -0
- package/build/lib/sts-CLRaHSW_.mjs +13 -0
- package/build/lib/sts-Dl7yZqX1.mjs +1405 -0
- package/build/lib/test.d.mts +8922 -0
- package/build/lib/test.mjs +175650 -0
- package/build/lib/ui/index.d.ts +1643 -0
- package/build/lib/ui/index.js +160 -0
- package/build/lib/utils.d.ts +21 -0
- package/build/lib/utils.js +1 -0
- package/build/lib/zod.d.ts +1 -0
- package/build/lib/zod.js +23 -0
- package/build/main.js +2383 -0
- package/build/server/assets/context-BoNg86Eh.js +35 -0
- package/build/server/assets/dialog-B8YbGNaz.js +54 -0
- package/build/server/assets/file-preview-dialog-qWSViOWQ.js +15 -0
- package/build/server/assets/react-CFQ4y0AA.js +13 -0
- package/build/server/assets/react-dom-Ca1YUVo2.js +5 -0
- package/build/server/assets/server-build-BMOfm0ad.js +118 -0
- package/build/server/assets/server.node-B2oksIp8.js +196 -0
- package/build/server/assets/server.node-VQzoub0A.js +1 -0
- package/build/server/index.js +123 -0
- package/package.json +224 -0
|
@@ -0,0 +1,1294 @@
|
|
|
1
|
+
import { a as __require, o as __toCommonJS, t as __commonJS } from "./chunk-CkKlU7xI.mjs";
|
|
2
|
+
import { F as require_dist_cjs$5, I as require_dist_cjs$7, L as require_dist_cjs$3, P as require_dist_cjs$6, T as schema_exports, t as require_dist_cjs$4, v as init_tslib_es6, w as init_schema, y as tslib_es6_exports } from "./dist-cjs-CgzfN8xY.mjs";
|
|
3
|
+
import { t as require_dist_cjs$8 } from "./dist-cjs-DC-UL-xx.mjs";
|
|
4
|
+
import { t as require_dist_cjs$9 } from "./dist-cjs-B_wkbabY.mjs";
|
|
5
|
+
import "./dist-cjs-GFGBhaZg.mjs";
|
|
6
|
+
import { n as require_dist_cjs$11, t as require_dist_cjs$10 } from "./dist-cjs-yYlQ1OiO.mjs";
|
|
7
|
+
import { M as dist_es_exports$1, N as init_dist_es$1, T as init_httpAuthSchemes, _ as init_dist_es, a as require_dist_cjs$14, c as require_dist_cjs$25, d as require_dist_cjs$12, f as require_dist_cjs$13, g as dist_es_exports, h as require_dist_cjs$21, i as require_dist_cjs$16, j as require_dist_cjs$26, l as require_dist_cjs$15, m as require_dist_cjs$22, n as require_dist_cjs$20, o as require_dist_cjs$17, p as require_dist_cjs$23, r as require_dist_cjs$18, s as require_dist_cjs$19, t as require_dist_cjs$27, u as require_dist_cjs$24, v as init_protocols, w as httpAuthSchemes_exports, y as protocols_exports } from "./dist-cjs-DHlTgXUO.mjs";
|
|
8
|
+
import { t as require_dist_cjs$28 } from "./dist-cjs-DBFcizQf.mjs";
|
|
9
|
+
import { n as init_client, t as client_exports } from "./client-BtuhFgvy.mjs";
|
|
10
|
+
|
|
11
|
+
//#region node_modules/@aws-sdk/token-providers/dist-cjs/index.js
|
|
12
|
+
var require_dist_cjs$2 = /* @__PURE__ */ __commonJS({ "node_modules/@aws-sdk/token-providers/dist-cjs/index.js": ((exports) => {
|
|
13
|
+
var client$1 = (init_client(), __toCommonJS(client_exports));
|
|
14
|
+
var httpAuthSchemes = (init_httpAuthSchemes(), __toCommonJS(httpAuthSchemes_exports));
|
|
15
|
+
var propertyProvider$1 = require_dist_cjs$8();
|
|
16
|
+
var sharedIniFileLoader$1 = require_dist_cjs$9();
|
|
17
|
+
var fs = __require("fs");
|
|
18
|
+
const fromEnvSigningName = ({ logger, signingName } = {}) => async () => {
|
|
19
|
+
logger?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
|
|
20
|
+
if (!signingName) throw new propertyProvider$1.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger });
|
|
21
|
+
const bearerTokenKey = httpAuthSchemes.getBearerTokenEnvKey(signingName);
|
|
22
|
+
if (!(bearerTokenKey in process.env)) throw new propertyProvider$1.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger });
|
|
23
|
+
const token = { token: process.env[bearerTokenKey] };
|
|
24
|
+
client$1.setTokenFeature(token, "BEARER_SERVICE_ENV_VARS", "3");
|
|
25
|
+
return token;
|
|
26
|
+
};
|
|
27
|
+
const EXPIRE_WINDOW_MS = 300 * 1e3;
|
|
28
|
+
const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
|
|
29
|
+
const getSsoOidcClient = async (ssoRegion, init = {}) => {
|
|
30
|
+
const { SSOOIDCClient } = await import("./sso-oidc-Qom0PEDW.mjs");
|
|
31
|
+
const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop];
|
|
32
|
+
return new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {
|
|
33
|
+
region: ssoRegion ?? init.clientConfig?.region,
|
|
34
|
+
logger: coalesce("logger"),
|
|
35
|
+
userAgentAppId: coalesce("userAgentAppId")
|
|
36
|
+
}));
|
|
37
|
+
};
|
|
38
|
+
const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}) => {
|
|
39
|
+
const { CreateTokenCommand } = await import("./sso-oidc-Qom0PEDW.mjs");
|
|
40
|
+
return (await getSsoOidcClient(ssoRegion, init)).send(new CreateTokenCommand({
|
|
41
|
+
clientId: ssoToken.clientId,
|
|
42
|
+
clientSecret: ssoToken.clientSecret,
|
|
43
|
+
refreshToken: ssoToken.refreshToken,
|
|
44
|
+
grantType: "refresh_token"
|
|
45
|
+
}));
|
|
46
|
+
};
|
|
47
|
+
const validateTokenExpiry = (token) => {
|
|
48
|
+
if (token.expiration && token.expiration.getTime() < Date.now()) throw new propertyProvider$1.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
|
|
49
|
+
};
|
|
50
|
+
const validateTokenKey = (key, value, forRefresh = false) => {
|
|
51
|
+
if (typeof value === "undefined") throw new propertyProvider$1.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
|
|
52
|
+
};
|
|
53
|
+
const { writeFile } = fs.promises;
|
|
54
|
+
const writeSSOTokenToFile = (id, ssoToken) => {
|
|
55
|
+
return writeFile(sharedIniFileLoader$1.getSSOTokenFilepath(id), JSON.stringify(ssoToken, null, 2));
|
|
56
|
+
};
|
|
57
|
+
const lastRefreshAttemptTime = /* @__PURE__ */ new Date(0);
|
|
58
|
+
const fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => {
|
|
59
|
+
const init = {
|
|
60
|
+
..._init,
|
|
61
|
+
parentClientConfig: {
|
|
62
|
+
...callerClientConfig,
|
|
63
|
+
..._init.parentClientConfig
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
init.logger?.debug("@aws-sdk/token-providers - fromSso");
|
|
67
|
+
const profiles = await sharedIniFileLoader$1.parseKnownFiles(init);
|
|
68
|
+
const profileName = sharedIniFileLoader$1.getProfileName({ profile: init.profile ?? callerClientConfig?.profile });
|
|
69
|
+
const profile = profiles[profileName];
|
|
70
|
+
if (!profile) throw new propertyProvider$1.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
|
|
71
|
+
else if (!profile["sso_session"]) throw new propertyProvider$1.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
|
|
72
|
+
const ssoSessionName = profile["sso_session"];
|
|
73
|
+
const ssoSession = (await sharedIniFileLoader$1.loadSsoSessionData(init))[ssoSessionName];
|
|
74
|
+
if (!ssoSession) throw new propertyProvider$1.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
|
|
75
|
+
for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) if (!ssoSession[ssoSessionRequiredKey]) throw new propertyProvider$1.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
|
|
76
|
+
ssoSession["sso_start_url"];
|
|
77
|
+
const ssoRegion = ssoSession["sso_region"];
|
|
78
|
+
let ssoToken;
|
|
79
|
+
try {
|
|
80
|
+
ssoToken = await sharedIniFileLoader$1.getSSOTokenFromFile(ssoSessionName);
|
|
81
|
+
} catch (e$1) {
|
|
82
|
+
throw new propertyProvider$1.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
|
|
83
|
+
}
|
|
84
|
+
validateTokenKey("accessToken", ssoToken.accessToken);
|
|
85
|
+
validateTokenKey("expiresAt", ssoToken.expiresAt);
|
|
86
|
+
const { accessToken, expiresAt } = ssoToken;
|
|
87
|
+
const existingToken = {
|
|
88
|
+
token: accessToken,
|
|
89
|
+
expiration: new Date(expiresAt)
|
|
90
|
+
};
|
|
91
|
+
if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) return existingToken;
|
|
92
|
+
if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) {
|
|
93
|
+
validateTokenExpiry(existingToken);
|
|
94
|
+
return existingToken;
|
|
95
|
+
}
|
|
96
|
+
validateTokenKey("clientId", ssoToken.clientId, true);
|
|
97
|
+
validateTokenKey("clientSecret", ssoToken.clientSecret, true);
|
|
98
|
+
validateTokenKey("refreshToken", ssoToken.refreshToken, true);
|
|
99
|
+
try {
|
|
100
|
+
lastRefreshAttemptTime.setTime(Date.now());
|
|
101
|
+
const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init);
|
|
102
|
+
validateTokenKey("accessToken", newSsoOidcToken.accessToken);
|
|
103
|
+
validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
|
|
104
|
+
const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3);
|
|
105
|
+
try {
|
|
106
|
+
await writeSSOTokenToFile(ssoSessionName, {
|
|
107
|
+
...ssoToken,
|
|
108
|
+
accessToken: newSsoOidcToken.accessToken,
|
|
109
|
+
expiresAt: newTokenExpiration.toISOString(),
|
|
110
|
+
refreshToken: newSsoOidcToken.refreshToken
|
|
111
|
+
});
|
|
112
|
+
} catch (error) {}
|
|
113
|
+
return {
|
|
114
|
+
token: newSsoOidcToken.accessToken,
|
|
115
|
+
expiration: newTokenExpiration
|
|
116
|
+
};
|
|
117
|
+
} catch (error) {
|
|
118
|
+
validateTokenExpiry(existingToken);
|
|
119
|
+
return existingToken;
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
const fromStatic = ({ token, logger }) => async () => {
|
|
123
|
+
logger?.debug("@aws-sdk/token-providers - fromStatic");
|
|
124
|
+
if (!token || !token.token) throw new propertyProvider$1.TokenProviderError(`Please pass a valid token to fromStatic`, false);
|
|
125
|
+
return token;
|
|
126
|
+
};
|
|
127
|
+
const nodeProvider = (init = {}) => propertyProvider$1.memoize(propertyProvider$1.chain(fromSso(init), async () => {
|
|
128
|
+
throw new propertyProvider$1.TokenProviderError("Could not load token from any providers", false);
|
|
129
|
+
}), (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5, (token) => token.expiration !== void 0);
|
|
130
|
+
exports.fromEnvSigningName = fromEnvSigningName;
|
|
131
|
+
exports.fromSso = fromSso;
|
|
132
|
+
exports.fromStatic = fromStatic;
|
|
133
|
+
exports.nodeProvider = nodeProvider;
|
|
134
|
+
}) });
|
|
135
|
+
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region node_modules/@aws-sdk/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js
|
|
138
|
+
var require_httpAuthSchemeProvider = /* @__PURE__ */ __commonJS({ "node_modules/@aws-sdk/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js": ((exports) => {
|
|
139
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
140
|
+
exports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = void 0;
|
|
141
|
+
const core_1$2 = (init_dist_es(), __toCommonJS(dist_es_exports));
|
|
142
|
+
const util_middleware_1 = require_dist_cjs$3();
|
|
143
|
+
const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
144
|
+
return {
|
|
145
|
+
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
|
|
146
|
+
region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
|
|
147
|
+
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
148
|
+
})()
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
exports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider;
|
|
152
|
+
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
153
|
+
return {
|
|
154
|
+
schemeId: "aws.auth#sigv4",
|
|
155
|
+
signingProperties: {
|
|
156
|
+
name: "awsssoportal",
|
|
157
|
+
region: authParameters.region
|
|
158
|
+
},
|
|
159
|
+
propertiesExtractor: (config, context) => ({ signingProperties: {
|
|
160
|
+
config,
|
|
161
|
+
context
|
|
162
|
+
} })
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
|
|
166
|
+
return { schemeId: "smithy.api#noAuth" };
|
|
167
|
+
}
|
|
168
|
+
const defaultSSOHttpAuthSchemeProvider = (authParameters) => {
|
|
169
|
+
const options = [];
|
|
170
|
+
switch (authParameters.operation) {
|
|
171
|
+
case "GetRoleCredentials":
|
|
172
|
+
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
|
173
|
+
break;
|
|
174
|
+
case "ListAccountRoles":
|
|
175
|
+
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
|
176
|
+
break;
|
|
177
|
+
case "ListAccounts":
|
|
178
|
+
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
|
179
|
+
break;
|
|
180
|
+
case "Logout":
|
|
181
|
+
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
|
182
|
+
break;
|
|
183
|
+
default: options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
184
|
+
}
|
|
185
|
+
return options;
|
|
186
|
+
};
|
|
187
|
+
exports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider;
|
|
188
|
+
const resolveHttpAuthSchemeConfig = (config) => {
|
|
189
|
+
const config_0 = (0, core_1$2.resolveAwsSdkSigV4Config)(config);
|
|
190
|
+
return Object.assign(config_0, { authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []) });
|
|
191
|
+
};
|
|
192
|
+
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
|
|
193
|
+
}) });
|
|
194
|
+
|
|
195
|
+
//#endregion
|
|
196
|
+
//#region node_modules/@aws-sdk/client-sso/package.json
|
|
197
|
+
var require_package = /* @__PURE__ */ __commonJS({ "node_modules/@aws-sdk/client-sso/package.json": ((exports, module) => {
|
|
198
|
+
module.exports = {
|
|
199
|
+
"name": "@aws-sdk/client-sso",
|
|
200
|
+
"description": "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
|
|
201
|
+
"version": "3.929.0",
|
|
202
|
+
"scripts": {
|
|
203
|
+
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
204
|
+
"build:cjs": "node ../../scripts/compilation/inline client-sso",
|
|
205
|
+
"build:es": "tsc -p tsconfig.es.json",
|
|
206
|
+
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
|
|
207
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
208
|
+
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
209
|
+
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
|
|
210
|
+
"extract:docs": "api-extractor run --local",
|
|
211
|
+
"generate:client": "node ../../scripts/generate-clients/single-service --solo sso"
|
|
212
|
+
},
|
|
213
|
+
"main": "./dist-cjs/index.js",
|
|
214
|
+
"types": "./dist-types/index.d.ts",
|
|
215
|
+
"module": "./dist-es/index.js",
|
|
216
|
+
"sideEffects": false,
|
|
217
|
+
"dependencies": {
|
|
218
|
+
"@aws-crypto/sha256-browser": "5.2.0",
|
|
219
|
+
"@aws-crypto/sha256-js": "5.2.0",
|
|
220
|
+
"@aws-sdk/core": "3.928.0",
|
|
221
|
+
"@aws-sdk/middleware-host-header": "3.922.0",
|
|
222
|
+
"@aws-sdk/middleware-logger": "3.922.0",
|
|
223
|
+
"@aws-sdk/middleware-recursion-detection": "3.922.0",
|
|
224
|
+
"@aws-sdk/middleware-user-agent": "3.928.0",
|
|
225
|
+
"@aws-sdk/region-config-resolver": "3.925.0",
|
|
226
|
+
"@aws-sdk/types": "3.922.0",
|
|
227
|
+
"@aws-sdk/util-endpoints": "3.922.0",
|
|
228
|
+
"@aws-sdk/util-user-agent-browser": "3.922.0",
|
|
229
|
+
"@aws-sdk/util-user-agent-node": "3.928.0",
|
|
230
|
+
"@smithy/config-resolver": "^4.4.2",
|
|
231
|
+
"@smithy/core": "^3.17.2",
|
|
232
|
+
"@smithy/fetch-http-handler": "^5.3.5",
|
|
233
|
+
"@smithy/hash-node": "^4.2.4",
|
|
234
|
+
"@smithy/invalid-dependency": "^4.2.4",
|
|
235
|
+
"@smithy/middleware-content-length": "^4.2.4",
|
|
236
|
+
"@smithy/middleware-endpoint": "^4.3.6",
|
|
237
|
+
"@smithy/middleware-retry": "^4.4.6",
|
|
238
|
+
"@smithy/middleware-serde": "^4.2.4",
|
|
239
|
+
"@smithy/middleware-stack": "^4.2.4",
|
|
240
|
+
"@smithy/node-config-provider": "^4.3.4",
|
|
241
|
+
"@smithy/node-http-handler": "^4.4.4",
|
|
242
|
+
"@smithy/protocol-http": "^5.3.4",
|
|
243
|
+
"@smithy/smithy-client": "^4.9.2",
|
|
244
|
+
"@smithy/types": "^4.8.1",
|
|
245
|
+
"@smithy/url-parser": "^4.2.4",
|
|
246
|
+
"@smithy/util-base64": "^4.3.0",
|
|
247
|
+
"@smithy/util-body-length-browser": "^4.2.0",
|
|
248
|
+
"@smithy/util-body-length-node": "^4.2.1",
|
|
249
|
+
"@smithy/util-defaults-mode-browser": "^4.3.5",
|
|
250
|
+
"@smithy/util-defaults-mode-node": "^4.2.8",
|
|
251
|
+
"@smithy/util-endpoints": "^3.2.4",
|
|
252
|
+
"@smithy/util-middleware": "^4.2.4",
|
|
253
|
+
"@smithy/util-retry": "^4.2.4",
|
|
254
|
+
"@smithy/util-utf8": "^4.2.0",
|
|
255
|
+
"tslib": "^2.6.2"
|
|
256
|
+
},
|
|
257
|
+
"devDependencies": {
|
|
258
|
+
"@tsconfig/node18": "18.2.4",
|
|
259
|
+
"@types/node": "^18.19.69",
|
|
260
|
+
"concurrently": "7.0.0",
|
|
261
|
+
"downlevel-dts": "0.10.1",
|
|
262
|
+
"rimraf": "3.0.2",
|
|
263
|
+
"typescript": "~5.8.3"
|
|
264
|
+
},
|
|
265
|
+
"engines": { "node": ">=18.0.0" },
|
|
266
|
+
"typesVersions": { "<4.0": { "dist-types/*": ["dist-types/ts3.4/*"] } },
|
|
267
|
+
"files": ["dist-*/**"],
|
|
268
|
+
"author": {
|
|
269
|
+
"name": "AWS SDK for JavaScript Team",
|
|
270
|
+
"url": "https://aws.amazon.com/javascript/"
|
|
271
|
+
},
|
|
272
|
+
"license": "Apache-2.0",
|
|
273
|
+
"browser": { "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" },
|
|
274
|
+
"react-native": { "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" },
|
|
275
|
+
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",
|
|
276
|
+
"repository": {
|
|
277
|
+
"type": "git",
|
|
278
|
+
"url": "https://github.com/aws/aws-sdk-js-v3.git",
|
|
279
|
+
"directory": "clients/client-sso"
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
}) });
|
|
283
|
+
|
|
284
|
+
//#endregion
|
|
285
|
+
//#region node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js
|
|
286
|
+
var require_ruleset = /* @__PURE__ */ __commonJS({ "node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js": ((exports) => {
|
|
287
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
288
|
+
exports.ruleSet = void 0;
|
|
289
|
+
const u = "required", v = "fn", w = "argv", x = "ref";
|
|
290
|
+
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = {
|
|
291
|
+
[u]: false,
|
|
292
|
+
"type": "string"
|
|
293
|
+
}, j = {
|
|
294
|
+
[u]: true,
|
|
295
|
+
"default": false,
|
|
296
|
+
"type": "boolean"
|
|
297
|
+
}, k = { [x]: "Endpoint" }, l = {
|
|
298
|
+
[v]: c,
|
|
299
|
+
[w]: [{ [x]: "UseFIPS" }, true]
|
|
300
|
+
}, m = {
|
|
301
|
+
[v]: c,
|
|
302
|
+
[w]: [{ [x]: "UseDualStack" }, true]
|
|
303
|
+
}, n = {}, o = {
|
|
304
|
+
[v]: h,
|
|
305
|
+
[w]: [{ [x]: g }, "supportsFIPS"]
|
|
306
|
+
}, p = { [x]: g }, q = {
|
|
307
|
+
[v]: c,
|
|
308
|
+
[w]: [true, {
|
|
309
|
+
[v]: h,
|
|
310
|
+
[w]: [p, "supportsDualStack"]
|
|
311
|
+
}]
|
|
312
|
+
}, r = [l], s = [m], t = [{ [x]: "Region" }];
|
|
313
|
+
const _data = {
|
|
314
|
+
version: "1.0",
|
|
315
|
+
parameters: {
|
|
316
|
+
Region: i,
|
|
317
|
+
UseDualStack: j,
|
|
318
|
+
UseFIPS: j,
|
|
319
|
+
Endpoint: i
|
|
320
|
+
},
|
|
321
|
+
rules: [
|
|
322
|
+
{
|
|
323
|
+
conditions: [{
|
|
324
|
+
[v]: b,
|
|
325
|
+
[w]: [k]
|
|
326
|
+
}],
|
|
327
|
+
rules: [
|
|
328
|
+
{
|
|
329
|
+
conditions: r,
|
|
330
|
+
error: "Invalid Configuration: FIPS and custom endpoint are not supported",
|
|
331
|
+
type: d
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
conditions: s,
|
|
335
|
+
error: "Invalid Configuration: Dualstack and custom endpoint are not supported",
|
|
336
|
+
type: d
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
endpoint: {
|
|
340
|
+
url: k,
|
|
341
|
+
properties: n,
|
|
342
|
+
headers: n
|
|
343
|
+
},
|
|
344
|
+
type: e
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
type: f
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
conditions: [{
|
|
351
|
+
[v]: b,
|
|
352
|
+
[w]: t
|
|
353
|
+
}],
|
|
354
|
+
rules: [{
|
|
355
|
+
conditions: [{
|
|
356
|
+
[v]: "aws.partition",
|
|
357
|
+
[w]: t,
|
|
358
|
+
assign: g
|
|
359
|
+
}],
|
|
360
|
+
rules: [
|
|
361
|
+
{
|
|
362
|
+
conditions: [l, m],
|
|
363
|
+
rules: [{
|
|
364
|
+
conditions: [{
|
|
365
|
+
[v]: c,
|
|
366
|
+
[w]: [a, o]
|
|
367
|
+
}, q],
|
|
368
|
+
rules: [{
|
|
369
|
+
endpoint: {
|
|
370
|
+
url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
|
|
371
|
+
properties: n,
|
|
372
|
+
headers: n
|
|
373
|
+
},
|
|
374
|
+
type: e
|
|
375
|
+
}],
|
|
376
|
+
type: f
|
|
377
|
+
}, {
|
|
378
|
+
error: "FIPS and DualStack are enabled, but this partition does not support one or both",
|
|
379
|
+
type: d
|
|
380
|
+
}],
|
|
381
|
+
type: f
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
conditions: r,
|
|
385
|
+
rules: [{
|
|
386
|
+
conditions: [{
|
|
387
|
+
[v]: c,
|
|
388
|
+
[w]: [o, a]
|
|
389
|
+
}],
|
|
390
|
+
rules: [{
|
|
391
|
+
conditions: [{
|
|
392
|
+
[v]: "stringEquals",
|
|
393
|
+
[w]: [{
|
|
394
|
+
[v]: h,
|
|
395
|
+
[w]: [p, "name"]
|
|
396
|
+
}, "aws-us-gov"]
|
|
397
|
+
}],
|
|
398
|
+
endpoint: {
|
|
399
|
+
url: "https://portal.sso.{Region}.amazonaws.com",
|
|
400
|
+
properties: n,
|
|
401
|
+
headers: n
|
|
402
|
+
},
|
|
403
|
+
type: e
|
|
404
|
+
}, {
|
|
405
|
+
endpoint: {
|
|
406
|
+
url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",
|
|
407
|
+
properties: n,
|
|
408
|
+
headers: n
|
|
409
|
+
},
|
|
410
|
+
type: e
|
|
411
|
+
}],
|
|
412
|
+
type: f
|
|
413
|
+
}, {
|
|
414
|
+
error: "FIPS is enabled but this partition does not support FIPS",
|
|
415
|
+
type: d
|
|
416
|
+
}],
|
|
417
|
+
type: f
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
conditions: s,
|
|
421
|
+
rules: [{
|
|
422
|
+
conditions: [q],
|
|
423
|
+
rules: [{
|
|
424
|
+
endpoint: {
|
|
425
|
+
url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",
|
|
426
|
+
properties: n,
|
|
427
|
+
headers: n
|
|
428
|
+
},
|
|
429
|
+
type: e
|
|
430
|
+
}],
|
|
431
|
+
type: f
|
|
432
|
+
}, {
|
|
433
|
+
error: "DualStack is enabled but this partition does not support DualStack",
|
|
434
|
+
type: d
|
|
435
|
+
}],
|
|
436
|
+
type: f
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
endpoint: {
|
|
440
|
+
url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",
|
|
441
|
+
properties: n,
|
|
442
|
+
headers: n
|
|
443
|
+
},
|
|
444
|
+
type: e
|
|
445
|
+
}
|
|
446
|
+
],
|
|
447
|
+
type: f
|
|
448
|
+
}],
|
|
449
|
+
type: f
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
error: "Invalid Configuration: Missing Region",
|
|
453
|
+
type: d
|
|
454
|
+
}
|
|
455
|
+
]
|
|
456
|
+
};
|
|
457
|
+
exports.ruleSet = _data;
|
|
458
|
+
}) });
|
|
459
|
+
|
|
460
|
+
//#endregion
|
|
461
|
+
//#region node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js
|
|
462
|
+
var require_endpointResolver = /* @__PURE__ */ __commonJS({ "node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js": ((exports) => {
|
|
463
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
464
|
+
exports.defaultEndpointResolver = void 0;
|
|
465
|
+
const util_endpoints_1 = require_dist_cjs$12();
|
|
466
|
+
const util_endpoints_2 = require_dist_cjs$13();
|
|
467
|
+
const ruleset_1 = require_ruleset();
|
|
468
|
+
const cache = new util_endpoints_2.EndpointCache({
|
|
469
|
+
size: 50,
|
|
470
|
+
params: [
|
|
471
|
+
"Endpoint",
|
|
472
|
+
"Region",
|
|
473
|
+
"UseDualStack",
|
|
474
|
+
"UseFIPS"
|
|
475
|
+
]
|
|
476
|
+
});
|
|
477
|
+
const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
478
|
+
return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
|
|
479
|
+
endpointParams,
|
|
480
|
+
logger: context.logger
|
|
481
|
+
}));
|
|
482
|
+
};
|
|
483
|
+
exports.defaultEndpointResolver = defaultEndpointResolver;
|
|
484
|
+
util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
|
|
485
|
+
}) });
|
|
486
|
+
|
|
487
|
+
//#endregion
|
|
488
|
+
//#region node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js
|
|
489
|
+
var require_runtimeConfig_shared = /* @__PURE__ */ __commonJS({ "node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js": ((exports) => {
|
|
490
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
491
|
+
exports.getRuntimeConfig = void 0;
|
|
492
|
+
const core_1$1 = (init_dist_es(), __toCommonJS(dist_es_exports));
|
|
493
|
+
const protocols_1 = (init_protocols(), __toCommonJS(protocols_exports));
|
|
494
|
+
const core_2 = (init_dist_es$1(), __toCommonJS(dist_es_exports$1));
|
|
495
|
+
const smithy_client_1$1 = require_dist_cjs$4();
|
|
496
|
+
const url_parser_1 = require_dist_cjs$10();
|
|
497
|
+
const util_base64_1 = require_dist_cjs$5();
|
|
498
|
+
const util_utf8_1 = require_dist_cjs$28();
|
|
499
|
+
const httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider();
|
|
500
|
+
const endpointResolver_1 = require_endpointResolver();
|
|
501
|
+
const getRuntimeConfig$1 = (config) => {
|
|
502
|
+
return {
|
|
503
|
+
apiVersion: "2019-06-10",
|
|
504
|
+
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
|
|
505
|
+
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
|
|
506
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
507
|
+
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
|
|
508
|
+
extensions: config?.extensions ?? [],
|
|
509
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider,
|
|
510
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [{
|
|
511
|
+
schemeId: "aws.auth#sigv4",
|
|
512
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
513
|
+
signer: new core_1$1.AwsSdkSigV4Signer()
|
|
514
|
+
}, {
|
|
515
|
+
schemeId: "smithy.api#noAuth",
|
|
516
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
517
|
+
signer: new core_2.NoAuthSigner()
|
|
518
|
+
}],
|
|
519
|
+
logger: config?.logger ?? new smithy_client_1$1.NoOpLogger(),
|
|
520
|
+
protocol: config?.protocol ?? new protocols_1.AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.sso" }),
|
|
521
|
+
serviceId: config?.serviceId ?? "SSO",
|
|
522
|
+
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
523
|
+
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
|
524
|
+
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8
|
|
525
|
+
};
|
|
526
|
+
};
|
|
527
|
+
exports.getRuntimeConfig = getRuntimeConfig$1;
|
|
528
|
+
}) });
|
|
529
|
+
|
|
530
|
+
//#endregion
|
|
531
|
+
//#region node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js
|
|
532
|
+
var require_runtimeConfig = /* @__PURE__ */ __commonJS({ "node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js": ((exports) => {
|
|
533
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
534
|
+
exports.getRuntimeConfig = void 0;
|
|
535
|
+
const package_json_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)).__importDefault(require_package());
|
|
536
|
+
const core_1 = (init_dist_es(), __toCommonJS(dist_es_exports));
|
|
537
|
+
const util_user_agent_node_1 = require_dist_cjs$14();
|
|
538
|
+
const config_resolver_1 = require_dist_cjs$15();
|
|
539
|
+
const hash_node_1 = require_dist_cjs$16();
|
|
540
|
+
const middleware_retry_1 = require_dist_cjs$17();
|
|
541
|
+
const node_config_provider_1 = require_dist_cjs$11();
|
|
542
|
+
const node_http_handler_1 = require_dist_cjs$6();
|
|
543
|
+
const util_body_length_node_1 = require_dist_cjs$18();
|
|
544
|
+
const util_retry_1 = require_dist_cjs$19();
|
|
545
|
+
const runtimeConfig_shared_1 = require_runtimeConfig_shared();
|
|
546
|
+
const smithy_client_1 = require_dist_cjs$4();
|
|
547
|
+
const util_defaults_mode_node_1 = require_dist_cjs$20();
|
|
548
|
+
const smithy_client_2 = require_dist_cjs$4();
|
|
549
|
+
const getRuntimeConfig = (config) => {
|
|
550
|
+
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
|
|
551
|
+
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
|
552
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
553
|
+
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
554
|
+
(0, core_1.emitWarningIfUnsupportedVersion)(process.version);
|
|
555
|
+
const loaderConfig = {
|
|
556
|
+
profile: config?.profile,
|
|
557
|
+
logger: clientSharedValues.logger
|
|
558
|
+
};
|
|
559
|
+
return {
|
|
560
|
+
...clientSharedValues,
|
|
561
|
+
...config,
|
|
562
|
+
runtime: "node",
|
|
563
|
+
defaultsMode,
|
|
564
|
+
authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
565
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
|
566
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({
|
|
567
|
+
serviceId: clientSharedValues.serviceId,
|
|
568
|
+
clientVersion: package_json_1.default.version
|
|
569
|
+
}),
|
|
570
|
+
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
571
|
+
region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, {
|
|
572
|
+
...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS,
|
|
573
|
+
...loaderConfig
|
|
574
|
+
}),
|
|
575
|
+
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
576
|
+
retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({
|
|
577
|
+
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
578
|
+
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE
|
|
579
|
+
}, config),
|
|
580
|
+
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
|
|
581
|
+
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
|
582
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
583
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
584
|
+
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
588
|
+
}) });
|
|
589
|
+
|
|
590
|
+
//#endregion
|
|
591
|
+
//#region node_modules/@aws-sdk/client-sso/dist-cjs/index.js
|
|
592
|
+
var require_dist_cjs$1 = /* @__PURE__ */ __commonJS({ "node_modules/@aws-sdk/client-sso/dist-cjs/index.js": ((exports) => {
|
|
593
|
+
var middlewareHostHeader = require_dist_cjs$21();
|
|
594
|
+
var middlewareLogger = require_dist_cjs$22();
|
|
595
|
+
var middlewareRecursionDetection = require_dist_cjs$23();
|
|
596
|
+
var middlewareUserAgent = require_dist_cjs$24();
|
|
597
|
+
var configResolver = require_dist_cjs$15();
|
|
598
|
+
var core = (init_dist_es$1(), __toCommonJS(dist_es_exports$1));
|
|
599
|
+
var schema = (init_schema(), __toCommonJS(schema_exports));
|
|
600
|
+
var middlewareContentLength = require_dist_cjs$25();
|
|
601
|
+
var middlewareEndpoint = require_dist_cjs$26();
|
|
602
|
+
var middlewareRetry = require_dist_cjs$17();
|
|
603
|
+
var smithyClient = require_dist_cjs$4();
|
|
604
|
+
var httpAuthSchemeProvider = require_httpAuthSchemeProvider();
|
|
605
|
+
var runtimeConfig = require_runtimeConfig();
|
|
606
|
+
var regionConfigResolver = require_dist_cjs$27();
|
|
607
|
+
var protocolHttp = require_dist_cjs$7();
|
|
608
|
+
const resolveClientEndpointParameters = (options) => {
|
|
609
|
+
return Object.assign(options, {
|
|
610
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
611
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
612
|
+
defaultSigningName: "awsssoportal"
|
|
613
|
+
});
|
|
614
|
+
};
|
|
615
|
+
const commonParams = {
|
|
616
|
+
UseFIPS: {
|
|
617
|
+
type: "builtInParams",
|
|
618
|
+
name: "useFipsEndpoint"
|
|
619
|
+
},
|
|
620
|
+
Endpoint: {
|
|
621
|
+
type: "builtInParams",
|
|
622
|
+
name: "endpoint"
|
|
623
|
+
},
|
|
624
|
+
Region: {
|
|
625
|
+
type: "builtInParams",
|
|
626
|
+
name: "region"
|
|
627
|
+
},
|
|
628
|
+
UseDualStack: {
|
|
629
|
+
type: "builtInParams",
|
|
630
|
+
name: "useDualstackEndpoint"
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
const getHttpAuthExtensionConfiguration = (runtimeConfig$1) => {
|
|
634
|
+
const _httpAuthSchemes = runtimeConfig$1.httpAuthSchemes;
|
|
635
|
+
let _httpAuthSchemeProvider = runtimeConfig$1.httpAuthSchemeProvider;
|
|
636
|
+
let _credentials = runtimeConfig$1.credentials;
|
|
637
|
+
return {
|
|
638
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
639
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
640
|
+
if (index === -1) _httpAuthSchemes.push(httpAuthScheme);
|
|
641
|
+
else _httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
642
|
+
},
|
|
643
|
+
httpAuthSchemes() {
|
|
644
|
+
return _httpAuthSchemes;
|
|
645
|
+
},
|
|
646
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider$1) {
|
|
647
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider$1;
|
|
648
|
+
},
|
|
649
|
+
httpAuthSchemeProvider() {
|
|
650
|
+
return _httpAuthSchemeProvider;
|
|
651
|
+
},
|
|
652
|
+
setCredentials(credentials) {
|
|
653
|
+
_credentials = credentials;
|
|
654
|
+
},
|
|
655
|
+
credentials() {
|
|
656
|
+
return _credentials;
|
|
657
|
+
}
|
|
658
|
+
};
|
|
659
|
+
};
|
|
660
|
+
const resolveHttpAuthRuntimeConfig = (config) => {
|
|
661
|
+
return {
|
|
662
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
663
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
664
|
+
credentials: config.credentials()
|
|
665
|
+
};
|
|
666
|
+
};
|
|
667
|
+
const resolveRuntimeExtensions = (runtimeConfig$1, extensions) => {
|
|
668
|
+
const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig$1), smithyClient.getDefaultExtensionConfiguration(runtimeConfig$1), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig$1), getHttpAuthExtensionConfiguration(runtimeConfig$1));
|
|
669
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
670
|
+
return Object.assign(runtimeConfig$1, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
671
|
+
};
|
|
672
|
+
var SSOClient = class extends smithyClient.Client {
|
|
673
|
+
config;
|
|
674
|
+
constructor(...[configuration]) {
|
|
675
|
+
const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
|
|
676
|
+
super(_config_0);
|
|
677
|
+
this.initConfig = _config_0;
|
|
678
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
679
|
+
const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
|
|
680
|
+
const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
|
|
681
|
+
const _config_4 = configResolver.resolveRegionConfig(_config_3);
|
|
682
|
+
const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
|
|
683
|
+
const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
|
|
684
|
+
this.config = resolveRuntimeExtensions(httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6), configuration?.extensions || []);
|
|
685
|
+
this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
|
|
686
|
+
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
687
|
+
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
|
|
688
|
+
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
|
|
689
|
+
this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
|
|
690
|
+
this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
|
|
691
|
+
this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
|
|
692
|
+
this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
693
|
+
httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider,
|
|
694
|
+
identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({ "aws.auth#sigv4": config.credentials })
|
|
695
|
+
}));
|
|
696
|
+
this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
|
|
697
|
+
}
|
|
698
|
+
destroy() {
|
|
699
|
+
super.destroy();
|
|
700
|
+
}
|
|
701
|
+
};
|
|
702
|
+
let SSOServiceException$1 = class SSOServiceException$2 extends smithyClient.ServiceException {
|
|
703
|
+
constructor(options) {
|
|
704
|
+
super(options);
|
|
705
|
+
Object.setPrototypeOf(this, SSOServiceException$2.prototype);
|
|
706
|
+
}
|
|
707
|
+
};
|
|
708
|
+
let InvalidRequestException$1 = class InvalidRequestException$2 extends SSOServiceException$1 {
|
|
709
|
+
name = "InvalidRequestException";
|
|
710
|
+
$fault = "client";
|
|
711
|
+
constructor(opts) {
|
|
712
|
+
super({
|
|
713
|
+
name: "InvalidRequestException",
|
|
714
|
+
$fault: "client",
|
|
715
|
+
...opts
|
|
716
|
+
});
|
|
717
|
+
Object.setPrototypeOf(this, InvalidRequestException$2.prototype);
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
let ResourceNotFoundException$1 = class ResourceNotFoundException$2 extends SSOServiceException$1 {
|
|
721
|
+
name = "ResourceNotFoundException";
|
|
722
|
+
$fault = "client";
|
|
723
|
+
constructor(opts) {
|
|
724
|
+
super({
|
|
725
|
+
name: "ResourceNotFoundException",
|
|
726
|
+
$fault: "client",
|
|
727
|
+
...opts
|
|
728
|
+
});
|
|
729
|
+
Object.setPrototypeOf(this, ResourceNotFoundException$2.prototype);
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
let TooManyRequestsException$1 = class TooManyRequestsException$2 extends SSOServiceException$1 {
|
|
733
|
+
name = "TooManyRequestsException";
|
|
734
|
+
$fault = "client";
|
|
735
|
+
constructor(opts) {
|
|
736
|
+
super({
|
|
737
|
+
name: "TooManyRequestsException",
|
|
738
|
+
$fault: "client",
|
|
739
|
+
...opts
|
|
740
|
+
});
|
|
741
|
+
Object.setPrototypeOf(this, TooManyRequestsException$2.prototype);
|
|
742
|
+
}
|
|
743
|
+
};
|
|
744
|
+
let UnauthorizedException$1 = class UnauthorizedException$2 extends SSOServiceException$1 {
|
|
745
|
+
name = "UnauthorizedException";
|
|
746
|
+
$fault = "client";
|
|
747
|
+
constructor(opts) {
|
|
748
|
+
super({
|
|
749
|
+
name: "UnauthorizedException",
|
|
750
|
+
$fault: "client",
|
|
751
|
+
...opts
|
|
752
|
+
});
|
|
753
|
+
Object.setPrototypeOf(this, UnauthorizedException$2.prototype);
|
|
754
|
+
}
|
|
755
|
+
};
|
|
756
|
+
const _AI = "AccountInfo";
|
|
757
|
+
const _ALT = "AccountListType";
|
|
758
|
+
const _ATT = "AccessTokenType";
|
|
759
|
+
const _GRC = "GetRoleCredentials";
|
|
760
|
+
const _GRCR = "GetRoleCredentialsRequest";
|
|
761
|
+
const _GRCRe = "GetRoleCredentialsResponse";
|
|
762
|
+
const _IRE = "InvalidRequestException";
|
|
763
|
+
const _L = "Logout";
|
|
764
|
+
const _LA = "ListAccounts";
|
|
765
|
+
const _LAR = "ListAccountsRequest";
|
|
766
|
+
const _LARR = "ListAccountRolesRequest";
|
|
767
|
+
const _LARRi = "ListAccountRolesResponse";
|
|
768
|
+
const _LARi = "ListAccountsResponse";
|
|
769
|
+
const _LARis = "ListAccountRoles";
|
|
770
|
+
const _LR = "LogoutRequest";
|
|
771
|
+
const _RC = "RoleCredentials";
|
|
772
|
+
const _RI = "RoleInfo";
|
|
773
|
+
const _RLT = "RoleListType";
|
|
774
|
+
const _RNFE = "ResourceNotFoundException";
|
|
775
|
+
const _SAKT = "SecretAccessKeyType";
|
|
776
|
+
const _STT = "SessionTokenType";
|
|
777
|
+
const _TMRE = "TooManyRequestsException";
|
|
778
|
+
const _UE = "UnauthorizedException";
|
|
779
|
+
const _aI = "accountId";
|
|
780
|
+
const _aKI = "accessKeyId";
|
|
781
|
+
const _aL = "accountList";
|
|
782
|
+
const _aN = "accountName";
|
|
783
|
+
const _aT = "accessToken";
|
|
784
|
+
const _ai = "account_id";
|
|
785
|
+
const _c = "client";
|
|
786
|
+
const _e = "error";
|
|
787
|
+
const _eA = "emailAddress";
|
|
788
|
+
const _ex = "expiration";
|
|
789
|
+
const _h = "http";
|
|
790
|
+
const _hE = "httpError";
|
|
791
|
+
const _hH = "httpHeader";
|
|
792
|
+
const _hQ = "httpQuery";
|
|
793
|
+
const _m = "message";
|
|
794
|
+
const _mR = "maxResults";
|
|
795
|
+
const _mr = "max_result";
|
|
796
|
+
const _nT = "nextToken";
|
|
797
|
+
const _nt = "next_token";
|
|
798
|
+
const _rC = "roleCredentials";
|
|
799
|
+
const _rL = "roleList";
|
|
800
|
+
const _rN = "roleName";
|
|
801
|
+
const _rn = "role_name";
|
|
802
|
+
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sso";
|
|
803
|
+
const _sAK = "secretAccessKey";
|
|
804
|
+
const _sT = "sessionToken";
|
|
805
|
+
const _xasbt = "x-amz-sso_bearer_token";
|
|
806
|
+
const n0 = "com.amazonaws.sso";
|
|
807
|
+
var AccessTokenType = [
|
|
808
|
+
0,
|
|
809
|
+
n0,
|
|
810
|
+
_ATT,
|
|
811
|
+
8,
|
|
812
|
+
0
|
|
813
|
+
];
|
|
814
|
+
var SecretAccessKeyType = [
|
|
815
|
+
0,
|
|
816
|
+
n0,
|
|
817
|
+
_SAKT,
|
|
818
|
+
8,
|
|
819
|
+
0
|
|
820
|
+
];
|
|
821
|
+
var SessionTokenType = [
|
|
822
|
+
0,
|
|
823
|
+
n0,
|
|
824
|
+
_STT,
|
|
825
|
+
8,
|
|
826
|
+
0
|
|
827
|
+
];
|
|
828
|
+
var AccountInfo = [
|
|
829
|
+
3,
|
|
830
|
+
n0,
|
|
831
|
+
_AI,
|
|
832
|
+
0,
|
|
833
|
+
[
|
|
834
|
+
_aI,
|
|
835
|
+
_aN,
|
|
836
|
+
_eA
|
|
837
|
+
],
|
|
838
|
+
[
|
|
839
|
+
0,
|
|
840
|
+
0,
|
|
841
|
+
0
|
|
842
|
+
]
|
|
843
|
+
];
|
|
844
|
+
var GetRoleCredentialsRequest = [
|
|
845
|
+
3,
|
|
846
|
+
n0,
|
|
847
|
+
_GRCR,
|
|
848
|
+
0,
|
|
849
|
+
[
|
|
850
|
+
_rN,
|
|
851
|
+
_aI,
|
|
852
|
+
_aT
|
|
853
|
+
],
|
|
854
|
+
[
|
|
855
|
+
[0, { [_hQ]: _rn }],
|
|
856
|
+
[0, { [_hQ]: _ai }],
|
|
857
|
+
[() => AccessTokenType, { [_hH]: _xasbt }]
|
|
858
|
+
]
|
|
859
|
+
];
|
|
860
|
+
var GetRoleCredentialsResponse = [
|
|
861
|
+
3,
|
|
862
|
+
n0,
|
|
863
|
+
_GRCRe,
|
|
864
|
+
0,
|
|
865
|
+
[_rC],
|
|
866
|
+
[[() => RoleCredentials, 0]]
|
|
867
|
+
];
|
|
868
|
+
var InvalidRequestException = [
|
|
869
|
+
-3,
|
|
870
|
+
n0,
|
|
871
|
+
_IRE,
|
|
872
|
+
{
|
|
873
|
+
[_e]: _c,
|
|
874
|
+
[_hE]: 400
|
|
875
|
+
},
|
|
876
|
+
[_m],
|
|
877
|
+
[0]
|
|
878
|
+
];
|
|
879
|
+
schema.TypeRegistry.for(n0).registerError(InvalidRequestException, InvalidRequestException$1);
|
|
880
|
+
var ListAccountRolesRequest = [
|
|
881
|
+
3,
|
|
882
|
+
n0,
|
|
883
|
+
_LARR,
|
|
884
|
+
0,
|
|
885
|
+
[
|
|
886
|
+
_nT,
|
|
887
|
+
_mR,
|
|
888
|
+
_aT,
|
|
889
|
+
_aI
|
|
890
|
+
],
|
|
891
|
+
[
|
|
892
|
+
[0, { [_hQ]: _nt }],
|
|
893
|
+
[1, { [_hQ]: _mr }],
|
|
894
|
+
[() => AccessTokenType, { [_hH]: _xasbt }],
|
|
895
|
+
[0, { [_hQ]: _ai }]
|
|
896
|
+
]
|
|
897
|
+
];
|
|
898
|
+
var ListAccountRolesResponse = [
|
|
899
|
+
3,
|
|
900
|
+
n0,
|
|
901
|
+
_LARRi,
|
|
902
|
+
0,
|
|
903
|
+
[_nT, _rL],
|
|
904
|
+
[0, () => RoleListType]
|
|
905
|
+
];
|
|
906
|
+
var ListAccountsRequest = [
|
|
907
|
+
3,
|
|
908
|
+
n0,
|
|
909
|
+
_LAR,
|
|
910
|
+
0,
|
|
911
|
+
[
|
|
912
|
+
_nT,
|
|
913
|
+
_mR,
|
|
914
|
+
_aT
|
|
915
|
+
],
|
|
916
|
+
[
|
|
917
|
+
[0, { [_hQ]: _nt }],
|
|
918
|
+
[1, { [_hQ]: _mr }],
|
|
919
|
+
[() => AccessTokenType, { [_hH]: _xasbt }]
|
|
920
|
+
]
|
|
921
|
+
];
|
|
922
|
+
var ListAccountsResponse = [
|
|
923
|
+
3,
|
|
924
|
+
n0,
|
|
925
|
+
_LARi,
|
|
926
|
+
0,
|
|
927
|
+
[_nT, _aL],
|
|
928
|
+
[0, () => AccountListType]
|
|
929
|
+
];
|
|
930
|
+
var LogoutRequest = [
|
|
931
|
+
3,
|
|
932
|
+
n0,
|
|
933
|
+
_LR,
|
|
934
|
+
0,
|
|
935
|
+
[_aT],
|
|
936
|
+
[[() => AccessTokenType, { [_hH]: _xasbt }]]
|
|
937
|
+
];
|
|
938
|
+
var ResourceNotFoundException = [
|
|
939
|
+
-3,
|
|
940
|
+
n0,
|
|
941
|
+
_RNFE,
|
|
942
|
+
{
|
|
943
|
+
[_e]: _c,
|
|
944
|
+
[_hE]: 404
|
|
945
|
+
},
|
|
946
|
+
[_m],
|
|
947
|
+
[0]
|
|
948
|
+
];
|
|
949
|
+
schema.TypeRegistry.for(n0).registerError(ResourceNotFoundException, ResourceNotFoundException$1);
|
|
950
|
+
var RoleCredentials = [
|
|
951
|
+
3,
|
|
952
|
+
n0,
|
|
953
|
+
_RC,
|
|
954
|
+
0,
|
|
955
|
+
[
|
|
956
|
+
_aKI,
|
|
957
|
+
_sAK,
|
|
958
|
+
_sT,
|
|
959
|
+
_ex
|
|
960
|
+
],
|
|
961
|
+
[
|
|
962
|
+
0,
|
|
963
|
+
[() => SecretAccessKeyType, 0],
|
|
964
|
+
[() => SessionTokenType, 0],
|
|
965
|
+
1
|
|
966
|
+
]
|
|
967
|
+
];
|
|
968
|
+
var RoleInfo = [
|
|
969
|
+
3,
|
|
970
|
+
n0,
|
|
971
|
+
_RI,
|
|
972
|
+
0,
|
|
973
|
+
[_rN, _aI],
|
|
974
|
+
[0, 0]
|
|
975
|
+
];
|
|
976
|
+
var TooManyRequestsException = [
|
|
977
|
+
-3,
|
|
978
|
+
n0,
|
|
979
|
+
_TMRE,
|
|
980
|
+
{
|
|
981
|
+
[_e]: _c,
|
|
982
|
+
[_hE]: 429
|
|
983
|
+
},
|
|
984
|
+
[_m],
|
|
985
|
+
[0]
|
|
986
|
+
];
|
|
987
|
+
schema.TypeRegistry.for(n0).registerError(TooManyRequestsException, TooManyRequestsException$1);
|
|
988
|
+
var UnauthorizedException = [
|
|
989
|
+
-3,
|
|
990
|
+
n0,
|
|
991
|
+
_UE,
|
|
992
|
+
{
|
|
993
|
+
[_e]: _c,
|
|
994
|
+
[_hE]: 401
|
|
995
|
+
},
|
|
996
|
+
[_m],
|
|
997
|
+
[0]
|
|
998
|
+
];
|
|
999
|
+
schema.TypeRegistry.for(n0).registerError(UnauthorizedException, UnauthorizedException$1);
|
|
1000
|
+
var __Unit = "unit";
|
|
1001
|
+
var SSOServiceException = [
|
|
1002
|
+
-3,
|
|
1003
|
+
_s,
|
|
1004
|
+
"SSOServiceException",
|
|
1005
|
+
0,
|
|
1006
|
+
[],
|
|
1007
|
+
[]
|
|
1008
|
+
];
|
|
1009
|
+
schema.TypeRegistry.for(_s).registerError(SSOServiceException, SSOServiceException$1);
|
|
1010
|
+
var AccountListType = [
|
|
1011
|
+
1,
|
|
1012
|
+
n0,
|
|
1013
|
+
_ALT,
|
|
1014
|
+
0,
|
|
1015
|
+
() => AccountInfo
|
|
1016
|
+
];
|
|
1017
|
+
var RoleListType = [
|
|
1018
|
+
1,
|
|
1019
|
+
n0,
|
|
1020
|
+
_RLT,
|
|
1021
|
+
0,
|
|
1022
|
+
() => RoleInfo
|
|
1023
|
+
];
|
|
1024
|
+
var GetRoleCredentials = [
|
|
1025
|
+
9,
|
|
1026
|
+
n0,
|
|
1027
|
+
_GRC,
|
|
1028
|
+
{ [_h]: [
|
|
1029
|
+
"GET",
|
|
1030
|
+
"/federation/credentials",
|
|
1031
|
+
200
|
|
1032
|
+
] },
|
|
1033
|
+
() => GetRoleCredentialsRequest,
|
|
1034
|
+
() => GetRoleCredentialsResponse
|
|
1035
|
+
];
|
|
1036
|
+
var ListAccountRoles = [
|
|
1037
|
+
9,
|
|
1038
|
+
n0,
|
|
1039
|
+
_LARis,
|
|
1040
|
+
{ [_h]: [
|
|
1041
|
+
"GET",
|
|
1042
|
+
"/assignment/roles",
|
|
1043
|
+
200
|
|
1044
|
+
] },
|
|
1045
|
+
() => ListAccountRolesRequest,
|
|
1046
|
+
() => ListAccountRolesResponse
|
|
1047
|
+
];
|
|
1048
|
+
var ListAccounts = [
|
|
1049
|
+
9,
|
|
1050
|
+
n0,
|
|
1051
|
+
_LA,
|
|
1052
|
+
{ [_h]: [
|
|
1053
|
+
"GET",
|
|
1054
|
+
"/assignment/accounts",
|
|
1055
|
+
200
|
|
1056
|
+
] },
|
|
1057
|
+
() => ListAccountsRequest,
|
|
1058
|
+
() => ListAccountsResponse
|
|
1059
|
+
];
|
|
1060
|
+
var Logout = [
|
|
1061
|
+
9,
|
|
1062
|
+
n0,
|
|
1063
|
+
_L,
|
|
1064
|
+
{ [_h]: [
|
|
1065
|
+
"POST",
|
|
1066
|
+
"/logout",
|
|
1067
|
+
200
|
|
1068
|
+
] },
|
|
1069
|
+
() => LogoutRequest,
|
|
1070
|
+
() => __Unit
|
|
1071
|
+
];
|
|
1072
|
+
var GetRoleCredentialsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o$1) {
|
|
1073
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
1074
|
+
}).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").sc(GetRoleCredentials).build() {};
|
|
1075
|
+
var ListAccountRolesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o$1) {
|
|
1076
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
1077
|
+
}).s("SWBPortalService", "ListAccountRoles", {}).n("SSOClient", "ListAccountRolesCommand").sc(ListAccountRoles).build() {};
|
|
1078
|
+
var ListAccountsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o$1) {
|
|
1079
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
1080
|
+
}).s("SWBPortalService", "ListAccounts", {}).n("SSOClient", "ListAccountsCommand").sc(ListAccounts).build() {};
|
|
1081
|
+
var LogoutCommand = class extends smithyClient.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o$1) {
|
|
1082
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
1083
|
+
}).s("SWBPortalService", "Logout", {}).n("SSOClient", "LogoutCommand").sc(Logout).build() {};
|
|
1084
|
+
const commands = {
|
|
1085
|
+
GetRoleCredentialsCommand,
|
|
1086
|
+
ListAccountRolesCommand,
|
|
1087
|
+
ListAccountsCommand,
|
|
1088
|
+
LogoutCommand
|
|
1089
|
+
};
|
|
1090
|
+
var SSO = class extends SSOClient {};
|
|
1091
|
+
smithyClient.createAggregatedClient(commands, SSO);
|
|
1092
|
+
const paginateListAccountRoles = core.createPaginator(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults");
|
|
1093
|
+
const paginateListAccounts = core.createPaginator(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults");
|
|
1094
|
+
Object.defineProperty(exports, "$Command", {
|
|
1095
|
+
enumerable: true,
|
|
1096
|
+
get: function() {
|
|
1097
|
+
return smithyClient.Command;
|
|
1098
|
+
}
|
|
1099
|
+
});
|
|
1100
|
+
Object.defineProperty(exports, "__Client", {
|
|
1101
|
+
enumerable: true,
|
|
1102
|
+
get: function() {
|
|
1103
|
+
return smithyClient.Client;
|
|
1104
|
+
}
|
|
1105
|
+
});
|
|
1106
|
+
exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;
|
|
1107
|
+
exports.InvalidRequestException = InvalidRequestException$1;
|
|
1108
|
+
exports.ListAccountRolesCommand = ListAccountRolesCommand;
|
|
1109
|
+
exports.ListAccountsCommand = ListAccountsCommand;
|
|
1110
|
+
exports.LogoutCommand = LogoutCommand;
|
|
1111
|
+
exports.ResourceNotFoundException = ResourceNotFoundException$1;
|
|
1112
|
+
exports.SSO = SSO;
|
|
1113
|
+
exports.SSOClient = SSOClient;
|
|
1114
|
+
exports.SSOServiceException = SSOServiceException$1;
|
|
1115
|
+
exports.TooManyRequestsException = TooManyRequestsException$1;
|
|
1116
|
+
exports.UnauthorizedException = UnauthorizedException$1;
|
|
1117
|
+
exports.paginateListAccountRoles = paginateListAccountRoles;
|
|
1118
|
+
exports.paginateListAccounts = paginateListAccounts;
|
|
1119
|
+
}) });
|
|
1120
|
+
|
|
1121
|
+
//#endregion
|
|
1122
|
+
//#region node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-CVy8iqsZ.js
|
|
1123
|
+
var require_loadSso_CVy8iqsZ = /* @__PURE__ */ __commonJS({ "node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-CVy8iqsZ.js": ((exports) => {
|
|
1124
|
+
var clientSso = require_dist_cjs$1();
|
|
1125
|
+
Object.defineProperty(exports, "GetRoleCredentialsCommand", {
|
|
1126
|
+
enumerable: true,
|
|
1127
|
+
get: function() {
|
|
1128
|
+
return clientSso.GetRoleCredentialsCommand;
|
|
1129
|
+
}
|
|
1130
|
+
});
|
|
1131
|
+
Object.defineProperty(exports, "SSOClient", {
|
|
1132
|
+
enumerable: true,
|
|
1133
|
+
get: function() {
|
|
1134
|
+
return clientSso.SSOClient;
|
|
1135
|
+
}
|
|
1136
|
+
});
|
|
1137
|
+
}) });
|
|
1138
|
+
|
|
1139
|
+
//#endregion
|
|
1140
|
+
//#region node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js
|
|
1141
|
+
var require_dist_cjs = /* @__PURE__ */ __commonJS({ "node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js": ((exports) => {
|
|
1142
|
+
var propertyProvider = require_dist_cjs$8();
|
|
1143
|
+
var sharedIniFileLoader = require_dist_cjs$9();
|
|
1144
|
+
var client = (init_client(), __toCommonJS(client_exports));
|
|
1145
|
+
var tokenProviders = require_dist_cjs$2();
|
|
1146
|
+
const isSsoProfile = (arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string");
|
|
1147
|
+
const SHOULD_FAIL_CREDENTIAL_CHAIN = false;
|
|
1148
|
+
const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, profile, filepath, configFilepath, ignoreCache, logger }) => {
|
|
1149
|
+
let token;
|
|
1150
|
+
const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
|
|
1151
|
+
if (ssoSession) try {
|
|
1152
|
+
const _token = await tokenProviders.fromSso({
|
|
1153
|
+
profile,
|
|
1154
|
+
filepath,
|
|
1155
|
+
configFilepath,
|
|
1156
|
+
ignoreCache
|
|
1157
|
+
})();
|
|
1158
|
+
token = {
|
|
1159
|
+
accessToken: _token.token,
|
|
1160
|
+
expiresAt: new Date(_token.expiration).toISOString()
|
|
1161
|
+
};
|
|
1162
|
+
} catch (e$1) {
|
|
1163
|
+
throw new propertyProvider.CredentialsProviderError(e$1.message, {
|
|
1164
|
+
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
|
|
1165
|
+
logger
|
|
1166
|
+
});
|
|
1167
|
+
}
|
|
1168
|
+
else try {
|
|
1169
|
+
token = await sharedIniFileLoader.getSSOTokenFromFile(ssoStartUrl);
|
|
1170
|
+
} catch (e$1) {
|
|
1171
|
+
throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
|
|
1172
|
+
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
|
|
1173
|
+
logger
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1176
|
+
if (new Date(token.expiresAt).getTime() - Date.now() <= 0) throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
|
|
1177
|
+
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
|
|
1178
|
+
logger
|
|
1179
|
+
});
|
|
1180
|
+
const { accessToken } = token;
|
|
1181
|
+
const { SSOClient: SSOClient$1, GetRoleCredentialsCommand: GetRoleCredentialsCommand$1 } = await Promise.resolve().then(function() {
|
|
1182
|
+
return require_loadSso_CVy8iqsZ();
|
|
1183
|
+
});
|
|
1184
|
+
const sso = ssoClient || new SSOClient$1(Object.assign({}, clientConfig ?? {}, {
|
|
1185
|
+
logger: clientConfig?.logger ?? parentClientConfig?.logger,
|
|
1186
|
+
region: clientConfig?.region ?? ssoRegion,
|
|
1187
|
+
userAgentAppId: clientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId
|
|
1188
|
+
}));
|
|
1189
|
+
let ssoResp;
|
|
1190
|
+
try {
|
|
1191
|
+
ssoResp = await sso.send(new GetRoleCredentialsCommand$1({
|
|
1192
|
+
accountId: ssoAccountId,
|
|
1193
|
+
roleName: ssoRoleName,
|
|
1194
|
+
accessToken
|
|
1195
|
+
}));
|
|
1196
|
+
} catch (e$1) {
|
|
1197
|
+
throw new propertyProvider.CredentialsProviderError(e$1, {
|
|
1198
|
+
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
|
|
1199
|
+
logger
|
|
1200
|
+
});
|
|
1201
|
+
}
|
|
1202
|
+
const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {} } = ssoResp;
|
|
1203
|
+
if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) throw new propertyProvider.CredentialsProviderError("SSO returns an invalid temporary credential.", {
|
|
1204
|
+
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
|
|
1205
|
+
logger
|
|
1206
|
+
});
|
|
1207
|
+
const credentials = {
|
|
1208
|
+
accessKeyId,
|
|
1209
|
+
secretAccessKey,
|
|
1210
|
+
sessionToken,
|
|
1211
|
+
expiration: new Date(expiration),
|
|
1212
|
+
...credentialScope && { credentialScope },
|
|
1213
|
+
...accountId && { accountId }
|
|
1214
|
+
};
|
|
1215
|
+
if (ssoSession) client.setCredentialFeature(credentials, "CREDENTIALS_SSO", "s");
|
|
1216
|
+
else client.setCredentialFeature(credentials, "CREDENTIALS_SSO_LEGACY", "u");
|
|
1217
|
+
return credentials;
|
|
1218
|
+
};
|
|
1219
|
+
const validateSsoProfile = (profile, logger) => {
|
|
1220
|
+
const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
|
|
1221
|
+
if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) throw new propertyProvider.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, {
|
|
1222
|
+
tryNextLink: false,
|
|
1223
|
+
logger
|
|
1224
|
+
});
|
|
1225
|
+
return profile;
|
|
1226
|
+
};
|
|
1227
|
+
const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
1228
|
+
init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");
|
|
1229
|
+
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
|
|
1230
|
+
const { ssoClient } = init;
|
|
1231
|
+
const profileName = sharedIniFileLoader.getProfileName({ profile: init.profile ?? callerClientConfig?.profile });
|
|
1232
|
+
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
|
|
1233
|
+
const profile = (await sharedIniFileLoader.parseKnownFiles(init))[profileName];
|
|
1234
|
+
if (!profile) throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
|
|
1235
|
+
if (!isSsoProfile(profile)) throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, { logger: init.logger });
|
|
1236
|
+
if (profile?.sso_session) {
|
|
1237
|
+
const session = (await sharedIniFileLoader.loadSsoSessionData(init))[profile.sso_session];
|
|
1238
|
+
const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;
|
|
1239
|
+
if (ssoRegion && ssoRegion !== session.sso_region) throw new propertyProvider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
|
|
1240
|
+
tryNextLink: false,
|
|
1241
|
+
logger: init.logger
|
|
1242
|
+
});
|
|
1243
|
+
if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) throw new propertyProvider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
|
|
1244
|
+
tryNextLink: false,
|
|
1245
|
+
logger: init.logger
|
|
1246
|
+
});
|
|
1247
|
+
profile.sso_region = session.sso_region;
|
|
1248
|
+
profile.sso_start_url = session.sso_start_url;
|
|
1249
|
+
}
|
|
1250
|
+
const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init.logger);
|
|
1251
|
+
return resolveSSOCredentials({
|
|
1252
|
+
ssoStartUrl: sso_start_url,
|
|
1253
|
+
ssoSession: sso_session,
|
|
1254
|
+
ssoAccountId: sso_account_id,
|
|
1255
|
+
ssoRegion: sso_region,
|
|
1256
|
+
ssoRoleName: sso_role_name,
|
|
1257
|
+
ssoClient,
|
|
1258
|
+
clientConfig: init.clientConfig,
|
|
1259
|
+
parentClientConfig: init.parentClientConfig,
|
|
1260
|
+
profile: profileName,
|
|
1261
|
+
filepath: init.filepath,
|
|
1262
|
+
configFilepath: init.configFilepath,
|
|
1263
|
+
ignoreCache: init.ignoreCache,
|
|
1264
|
+
logger: init.logger
|
|
1265
|
+
});
|
|
1266
|
+
} else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) throw new propertyProvider.CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include \"ssoStartUrl\", \"ssoAccountId\", \"ssoRegion\", \"ssoRoleName\"", {
|
|
1267
|
+
tryNextLink: false,
|
|
1268
|
+
logger: init.logger
|
|
1269
|
+
});
|
|
1270
|
+
else return resolveSSOCredentials({
|
|
1271
|
+
ssoStartUrl,
|
|
1272
|
+
ssoSession,
|
|
1273
|
+
ssoAccountId,
|
|
1274
|
+
ssoRegion,
|
|
1275
|
+
ssoRoleName,
|
|
1276
|
+
ssoClient,
|
|
1277
|
+
clientConfig: init.clientConfig,
|
|
1278
|
+
parentClientConfig: init.parentClientConfig,
|
|
1279
|
+
profile: profileName,
|
|
1280
|
+
filepath: init.filepath,
|
|
1281
|
+
configFilepath: init.configFilepath,
|
|
1282
|
+
ignoreCache: init.ignoreCache,
|
|
1283
|
+
logger: init.logger
|
|
1284
|
+
});
|
|
1285
|
+
};
|
|
1286
|
+
exports.fromSSO = fromSSO;
|
|
1287
|
+
exports.isSsoProfile = isSsoProfile;
|
|
1288
|
+
exports.validateSsoProfile = validateSsoProfile;
|
|
1289
|
+
}) });
|
|
1290
|
+
|
|
1291
|
+
//#endregion
|
|
1292
|
+
export default require_dist_cjs();
|
|
1293
|
+
|
|
1294
|
+
export { };
|