@kky42/pievo-server 2.4.14 → 4.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/.output/nitro.json +1 -1
- package/.output/public/assets/MarkdownView-BuFKr9Jg.js +66 -0
- package/.output/public/assets/{actionUi-5PtES4q0.js → actionUi-BZrLpgHT.js} +1 -1
- package/.output/public/assets/app-x1CeeY7N.css +2 -0
- package/.output/public/assets/index-D0FIKiiW.js +10 -0
- package/.output/public/assets/loops._loopId-DTkIz4C0.js +2 -0
- package/.output/public/assets/loops._loopId_.runs._runId-CsV2Ih4Z.js +3 -0
- package/.output/public/assets/preload-helper-BSxGu4d0.js +3 -0
- package/.output/public/assets/{routes-Dm_3J2aV.js → routes-BIOJZsig.js} +1 -1
- package/.output/public/assets/routes-m4Z90DTR.js +1 -0
- package/.output/server/_chunks/ssr-renderer.mjs +1 -1
- package/.output/server/_libs/{drizzle-orm+postgres.mjs → drizzle-orm.mjs} +93 -2218
- package/.output/server/_ssr/{MachinesModal-BaEtzycr.mjs → MachinesModal-CLBZxZkq.mjs} +47 -47
- package/.output/server/_ssr/MarkdownView-D1J7ImYF.mjs +70 -0
- package/.output/server/_ssr/{actionUi-5HOCZnom.mjs → actionUi-DE-Pb2tv.mjs} +1 -2
- package/.output/server/_ssr/artifactFiles-B0NPRDOR.mjs +52 -0
- package/.output/server/_ssr/{artifactKind-DwDr8IYc.mjs → artifactKind-a2oxT2wQ.mjs} +4 -10
- package/.output/server/_ssr/{boot-C472kLwY.mjs → boot-DmpKtb0A.mjs} +2659 -890
- package/.output/server/_ssr/lifecycleUi-DEjM8Etm.mjs +106 -0
- package/.output/server/_ssr/{loopApi-DT751TJA.mjs → loopApi-DK1lQPrx.mjs} +53 -69
- package/.output/server/_ssr/{loopProjection-qaD2I48a.mjs → loopProjection-DdFivf7-.mjs} +6 -24
- package/.output/server/_ssr/{loops._loopId-CXgw2Rz1.mjs → loops._loopId-DVCvGSEc.mjs} +36 -116
- package/.output/server/_ssr/{loops._loopId_.runs._runId-SASSqOfy.mjs → loops._loopId_.runs._runId-BXbTfLlC.mjs} +35 -39
- package/.output/server/_ssr/{loops._loopId_.runs._runId-Dk94Z0Jq.mjs → loops._loopId_.runs._runId-Dr6E-FA5.mjs} +3 -8
- package/.output/server/_ssr/{machineFns-BSrIgn3f.mjs → machineFns-DLRHgDdS.mjs} +13 -50
- package/.output/server/_ssr/networkAccess-CIlK3ION.mjs +30 -0
- package/.output/server/_ssr/router-BhHsTGqu.mjs +355 -0
- package/.output/server/_ssr/routes-CCallyCT.mjs +12 -0
- package/.output/server/_ssr/{routes-Cr-9yDEH.mjs → routes-CL2Kef-Q.mjs} +91 -50
- package/.output/server/_ssr/{routes-DRBS4Zi4.mjs → routes-ngpX7h8D.mjs} +2 -4
- package/.output/server/_ssr/ssr.mjs +25 -34
- package/.output/server/_ssr/start-B5_9Z5W-.mjs +35 -0
- package/.output/server/{_tanstack-start-manifest_v-DxLIQ0cc.mjs → _tanstack-start-manifest_v-BPiJ4yWT.mjs} +9 -15
- package/.output/server/drizzle/0000_baseline.sql +6 -97
- package/.output/server/drizzle/0001_loop_files.sql +9 -0
- package/.output/server/drizzle/meta/_journal.json +3 -17
- package/.output/server/index.mjs +50 -50
- package/drizzle/0000_baseline.sql +6 -97
- package/drizzle/0001_loop_files.sql +9 -0
- package/drizzle/meta/_journal.json +3 -17
- package/package.json +4 -8
- package/scripts/pievo-server.mjs +49 -47
- package/scripts/server-cli-lib.mjs +21 -12
- package/scripts/server-network.mjs +139 -0
- package/.output/public/assets/SignIn-CIFwnZtF.js +0 -1
- package/.output/public/assets/app-DvHMhs7S.css +0 -2
- package/.output/public/assets/index-CRX2pu0W.js +0 -10
- package/.output/public/assets/loops._loopId-BsuV-Rmf.js +0 -67
- package/.output/public/assets/loops._loopId_.runs._runId-DpK_fzmZ.js +0 -3
- package/.output/public/assets/preload-helper-sAZOZb3G.js +0 -5
- package/.output/public/assets/routes-DxF_s3cD.js +0 -1
- package/.output/server/_libs/@aws-crypto/crc32+[...].mjs +0 -419
- package/.output/server/_libs/@aws-sdk/checksums+[...].mjs +0 -10732
- package/.output/server/_libs/@aws-sdk/client-s3+[...].mjs +0 -9475
- package/.output/server/_libs/@aws-sdk/credential-provider-http+[...].mjs +0 -137
- package/.output/server/_libs/@aws-sdk/credential-provider-ini+[...].mjs +0 -440
- package/.output/server/_libs/@aws-sdk/credential-provider-process+[...].mjs +0 -62
- package/.output/server/_libs/@aws-sdk/credential-provider-sso+[...].mjs +0 -818
- package/.output/server/_libs/@aws-sdk/credential-provider-web-identity+[...].mjs +0 -59
- package/.output/server/_libs/@smithy/credential-provider-imds+[...].mjs +0 -342
- package/.output/server/_libs/aws-crypto__crc32c.mjs +0 -314
- package/.output/server/_libs/aws-sdk__nested-clients.mjs +0 -2671
- package/.output/server/_ssr/SignIn-sHQaBQJC.mjs +0 -53
- package/.output/server/_ssr/artifactFiles-DO43wwXA.mjs +0 -60
- package/.output/server/_ssr/artifacts-Cd7Qx3Qp.mjs +0 -2
- package/.output/server/_ssr/auth-0AamrwHo.mjs +0 -38355
- package/.output/server/_ssr/auth-client-lSMb_Idt.mjs +0 -1070
- package/.output/server/_ssr/bun-sqlite-dialect-BW9W1_Ps-DLIXocA0.mjs +0 -162
- package/.output/server/_ssr/core-RrmWoKne.mjs +0 -5
- package/.output/server/_ssr/d1-sqlite-dialect-BLC8LXE6-BoFMIPr_.mjs +0 -112
- package/.output/server/_ssr/db-BzvMQ2kx.mjs +0 -2
- package/.output/server/_ssr/dist-ClzqkwxD.mjs +0 -342
- package/.output/server/_ssr/factory-ixUjZqJn.mjs +0 -6903
- package/.output/server/_ssr/kysely-adapter-DkZbmKgV.mjs +0 -2
- package/.output/server/_ssr/kysely-migration-tables-JkVUjPF_-bPAX9LR_.mjs +0 -19
- package/.output/server/_ssr/logger-DDjsYB2X.mjs +0 -2
- package/.output/server/_ssr/loopTags-CXx5UdGf.mjs +0 -3356
- package/.output/server/_ssr/node-sqlite-dialect-BbUqnnYv.mjs +0 -162
- package/.output/server/_ssr/router-BlLlhfJe.mjs +0 -543
- package/.output/server/_ssr/routes-DTBltabU.mjs +0 -27
- package/.output/server/_ssr/start-4ifArtKx.mjs +0 -4
- package/.output/server/_ssr/store-vDZ9INSa.mjs +0 -2
- package/.output/server/_ssr/tokens-BHiCElYD.mjs +0 -2
- package/.output/server/drizzle/0001_add_pi_agent.sql +0 -9
- package/.output/server/drizzle/0002_remove_teams.sql +0 -15
- package/.output/server/drizzle/0003_add_loop_tags.sql +0 -5
- package/.output/server/node_modules/tslib/modules/index.js +0 -70
- package/.output/server/node_modules/tslib/modules/package.json +0 -3
- package/.output/server/node_modules/tslib/package.json +0 -47
- package/.output/server/node_modules/tslib/tslib.js +0 -484
- package/.output/server/package.json +0 -9
- package/drizzle/0001_add_pi_agent.sql +0 -9
- package/drizzle/0002_remove_teams.sql +0 -15
- package/drizzle/0003_add_loop_tags.sql +0 -5
- package/scripts/prestart.mjs +0 -66
|
@@ -1,818 +0,0 @@
|
|
|
1
|
-
import { a as __toCommonJS, o as __toESM, r as __exportAll, t as __commonJSMin } from "../../_runtime.mjs";
|
|
2
|
-
import { a as require_client, c as require_protocols, d as require_endpoints, f as require_config, m as require_schema, o as require_dist_cjs, p as require_client$1, s as require_retry, u as require_serde } from "./checksums+[...].mjs";
|
|
3
|
-
import { c as require_protocols$1, n as dist_es_exports$1, r as init_dist_es, s as require_httpAuthSchemes } from "./client-s3+[...].mjs";
|
|
4
|
-
import { promises } from "node:fs";
|
|
5
|
-
//#region ../../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.972.55/node_modules/@aws-sdk/credential-provider-sso/dist-es/isSsoProfile.js
|
|
6
|
-
var import_config = require_config();
|
|
7
|
-
var 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");
|
|
8
|
-
var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
|
|
9
|
-
//#endregion
|
|
10
|
-
//#region ../../node_modules/.pnpm/@aws-sdk+token-providers@3.1074.0/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js
|
|
11
|
-
var getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
|
|
12
|
-
const { SSOOIDCClient } = await import("../aws-sdk__nested-clients.mjs").then((n) => /* @__PURE__ */ __toESM(n.n()));
|
|
13
|
-
const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];
|
|
14
|
-
return new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {
|
|
15
|
-
region: ssoRegion ?? init.clientConfig?.region,
|
|
16
|
-
logger: coalesce("logger"),
|
|
17
|
-
userAgentAppId: coalesce("userAgentAppId")
|
|
18
|
-
}));
|
|
19
|
-
};
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region ../../node_modules/.pnpm/@aws-sdk+token-providers@3.1074.0/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js
|
|
22
|
-
var getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {
|
|
23
|
-
const { CreateTokenCommand } = await import("../aws-sdk__nested-clients.mjs").then((n) => /* @__PURE__ */ __toESM(n.n()));
|
|
24
|
-
return (await getSsoOidcClient(ssoRegion, init, callerClientConfig)).send(new CreateTokenCommand({
|
|
25
|
-
clientId: ssoToken.clientId,
|
|
26
|
-
clientSecret: ssoToken.clientSecret,
|
|
27
|
-
refreshToken: ssoToken.refreshToken,
|
|
28
|
-
grantType: "refresh_token"
|
|
29
|
-
}));
|
|
30
|
-
};
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region ../../node_modules/.pnpm/@aws-sdk+token-providers@3.1074.0/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js
|
|
33
|
-
var validateTokenExpiry = (token) => {
|
|
34
|
-
if (token.expiration && token.expiration.getTime() < Date.now()) throw new import_config.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
|
|
35
|
-
};
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region ../../node_modules/.pnpm/@aws-sdk+token-providers@3.1074.0/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js
|
|
38
|
-
var validateTokenKey = (key, value, forRefresh = false) => {
|
|
39
|
-
if (typeof value === "undefined") throw new import_config.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
|
|
40
|
-
};
|
|
41
|
-
//#endregion
|
|
42
|
-
//#region ../../node_modules/.pnpm/@aws-sdk+token-providers@3.1074.0/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js
|
|
43
|
-
var { writeFile } = promises;
|
|
44
|
-
var writeSSOTokenToFile = (id, ssoToken) => {
|
|
45
|
-
return writeFile((0, import_config.getSSOTokenFilepath)(id), JSON.stringify(ssoToken, null, 2));
|
|
46
|
-
};
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region ../../node_modules/.pnpm/@aws-sdk+token-providers@3.1074.0/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js
|
|
49
|
-
var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0);
|
|
50
|
-
var fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
51
|
-
init.logger?.debug("@aws-sdk/token-providers - fromSso");
|
|
52
|
-
const profiles = await (0, import_config.parseKnownFiles)(init);
|
|
53
|
-
const profileName = (0, import_config.getProfileName)({ profile: init.profile ?? callerClientConfig?.profile });
|
|
54
|
-
const profile = profiles[profileName];
|
|
55
|
-
if (!profile) throw new import_config.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
|
|
56
|
-
else if (!profile["sso_session"]) throw new import_config.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
|
|
57
|
-
const ssoSessionName = profile["sso_session"];
|
|
58
|
-
const ssoSession = (await (0, import_config.loadSsoSessionData)(init))[ssoSessionName];
|
|
59
|
-
if (!ssoSession) throw new import_config.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
|
|
60
|
-
for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) if (!ssoSession[ssoSessionRequiredKey]) throw new import_config.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
|
|
61
|
-
ssoSession["sso_start_url"];
|
|
62
|
-
const ssoRegion = ssoSession["sso_region"];
|
|
63
|
-
let ssoToken;
|
|
64
|
-
try {
|
|
65
|
-
ssoToken = await (0, import_config.getSSOTokenFromFile)(ssoSessionName);
|
|
66
|
-
} catch (e) {
|
|
67
|
-
throw new import_config.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
|
|
68
|
-
}
|
|
69
|
-
validateTokenKey("accessToken", ssoToken.accessToken);
|
|
70
|
-
validateTokenKey("expiresAt", ssoToken.expiresAt);
|
|
71
|
-
const { accessToken, expiresAt } = ssoToken;
|
|
72
|
-
const existingToken = {
|
|
73
|
-
token: accessToken,
|
|
74
|
-
expiration: new Date(expiresAt)
|
|
75
|
-
};
|
|
76
|
-
if (existingToken.expiration.getTime() - Date.now() > 3e5) return existingToken;
|
|
77
|
-
if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) {
|
|
78
|
-
validateTokenExpiry(existingToken);
|
|
79
|
-
return existingToken;
|
|
80
|
-
}
|
|
81
|
-
validateTokenKey("clientId", ssoToken.clientId, true);
|
|
82
|
-
validateTokenKey("clientSecret", ssoToken.clientSecret, true);
|
|
83
|
-
validateTokenKey("refreshToken", ssoToken.refreshToken, true);
|
|
84
|
-
try {
|
|
85
|
-
lastRefreshAttemptTime.setTime(Date.now());
|
|
86
|
-
const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
|
|
87
|
-
validateTokenKey("accessToken", newSsoOidcToken.accessToken);
|
|
88
|
-
validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
|
|
89
|
-
const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3);
|
|
90
|
-
try {
|
|
91
|
-
await writeSSOTokenToFile(ssoSessionName, {
|
|
92
|
-
...ssoToken,
|
|
93
|
-
accessToken: newSsoOidcToken.accessToken,
|
|
94
|
-
expiresAt: newTokenExpiration.toISOString(),
|
|
95
|
-
refreshToken: newSsoOidcToken.refreshToken
|
|
96
|
-
});
|
|
97
|
-
} catch (error) {}
|
|
98
|
-
return {
|
|
99
|
-
token: newSsoOidcToken.accessToken,
|
|
100
|
-
expiration: newTokenExpiration
|
|
101
|
-
};
|
|
102
|
-
} catch (error) {
|
|
103
|
-
validateTokenExpiry(existingToken);
|
|
104
|
-
return existingToken;
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
//#endregion
|
|
108
|
-
//#region ../../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.972.55/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js
|
|
109
|
-
var import_client = require_client();
|
|
110
|
-
var SHOULD_FAIL_CREDENTIAL_CHAIN = false;
|
|
111
|
-
var resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger }) => {
|
|
112
|
-
let token;
|
|
113
|
-
const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
|
|
114
|
-
if (ssoSession) try {
|
|
115
|
-
const _token = await fromSso({
|
|
116
|
-
profile,
|
|
117
|
-
filepath,
|
|
118
|
-
configFilepath,
|
|
119
|
-
ignoreCache,
|
|
120
|
-
clientConfig,
|
|
121
|
-
parentClientConfig,
|
|
122
|
-
logger
|
|
123
|
-
})({ callerClientConfig });
|
|
124
|
-
token = {
|
|
125
|
-
accessToken: _token.token,
|
|
126
|
-
expiresAt: new Date(_token.expiration).toISOString()
|
|
127
|
-
};
|
|
128
|
-
} catch (e) {
|
|
129
|
-
throw new import_config.CredentialsProviderError(e.message, {
|
|
130
|
-
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
|
|
131
|
-
logger
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
else try {
|
|
135
|
-
token = await (0, import_config.getSSOTokenFromFile)(ssoStartUrl);
|
|
136
|
-
} catch (e) {
|
|
137
|
-
throw new import_config.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
|
|
138
|
-
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
|
|
139
|
-
logger
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
if (new Date(token.expiresAt).getTime() - Date.now() <= 0) throw new import_config.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
|
|
143
|
-
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
|
|
144
|
-
logger
|
|
145
|
-
});
|
|
146
|
-
const { accessToken } = token;
|
|
147
|
-
const { SSOClient, GetRoleCredentialsCommand } = await Promise.resolve().then(() => loadSso_exports);
|
|
148
|
-
const sso = ssoClient || new SSOClient(Object.assign({}, clientConfig ?? {}, {
|
|
149
|
-
logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,
|
|
150
|
-
region: clientConfig?.region ?? ssoRegion,
|
|
151
|
-
userAgentAppId: clientConfig?.userAgentAppId ?? callerClientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId
|
|
152
|
-
}));
|
|
153
|
-
let ssoResp;
|
|
154
|
-
try {
|
|
155
|
-
ssoResp = await sso.send(new GetRoleCredentialsCommand({
|
|
156
|
-
accountId: ssoAccountId,
|
|
157
|
-
roleName: ssoRoleName,
|
|
158
|
-
accessToken
|
|
159
|
-
}));
|
|
160
|
-
} catch (e) {
|
|
161
|
-
throw new import_config.CredentialsProviderError(e, {
|
|
162
|
-
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
|
|
163
|
-
logger
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {} } = ssoResp;
|
|
167
|
-
if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) throw new import_config.CredentialsProviderError("SSO returns an invalid temporary credential.", {
|
|
168
|
-
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
|
|
169
|
-
logger
|
|
170
|
-
});
|
|
171
|
-
const credentials = {
|
|
172
|
-
accessKeyId,
|
|
173
|
-
secretAccessKey,
|
|
174
|
-
sessionToken,
|
|
175
|
-
expiration: new Date(expiration),
|
|
176
|
-
...credentialScope && { credentialScope },
|
|
177
|
-
...accountId && { accountId }
|
|
178
|
-
};
|
|
179
|
-
if (ssoSession) (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_SSO", "s");
|
|
180
|
-
else (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_SSO_LEGACY", "u");
|
|
181
|
-
return credentials;
|
|
182
|
-
};
|
|
183
|
-
//#endregion
|
|
184
|
-
//#region ../../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.972.55/node_modules/@aws-sdk/credential-provider-sso/dist-es/validateSsoProfile.js
|
|
185
|
-
var validateSsoProfile = (profile, logger) => {
|
|
186
|
-
const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
|
|
187
|
-
if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) throw new import_config.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`, {
|
|
188
|
-
tryNextLink: false,
|
|
189
|
-
logger
|
|
190
|
-
});
|
|
191
|
-
return profile;
|
|
192
|
-
};
|
|
193
|
-
//#endregion
|
|
194
|
-
//#region ../../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.972.55/node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js
|
|
195
|
-
var fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
196
|
-
init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");
|
|
197
|
-
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
|
|
198
|
-
const { ssoClient } = init;
|
|
199
|
-
const profileName = (0, import_config.getProfileName)({ profile: init.profile ?? callerClientConfig?.profile });
|
|
200
|
-
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
|
|
201
|
-
const profile = (await (0, import_config.parseKnownFiles)(init))[profileName];
|
|
202
|
-
if (!profile) throw new import_config.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
|
|
203
|
-
if (!isSsoProfile(profile)) throw new import_config.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, { logger: init.logger });
|
|
204
|
-
if (profile?.sso_session) {
|
|
205
|
-
const session = (await (0, import_config.loadSsoSessionData)(init))[profile.sso_session];
|
|
206
|
-
const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;
|
|
207
|
-
if (ssoRegion && ssoRegion !== session.sso_region) throw new import_config.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
|
|
208
|
-
tryNextLink: false,
|
|
209
|
-
logger: init.logger
|
|
210
|
-
});
|
|
211
|
-
if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) throw new import_config.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
|
|
212
|
-
tryNextLink: false,
|
|
213
|
-
logger: init.logger
|
|
214
|
-
});
|
|
215
|
-
profile.sso_region = session.sso_region;
|
|
216
|
-
profile.sso_start_url = session.sso_start_url;
|
|
217
|
-
}
|
|
218
|
-
const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init.logger);
|
|
219
|
-
return resolveSSOCredentials({
|
|
220
|
-
ssoStartUrl: sso_start_url,
|
|
221
|
-
ssoSession: sso_session,
|
|
222
|
-
ssoAccountId: sso_account_id,
|
|
223
|
-
ssoRegion: sso_region,
|
|
224
|
-
ssoRoleName: sso_role_name,
|
|
225
|
-
ssoClient,
|
|
226
|
-
clientConfig: init.clientConfig,
|
|
227
|
-
parentClientConfig: init.parentClientConfig,
|
|
228
|
-
callerClientConfig: init.callerClientConfig,
|
|
229
|
-
profile: profileName,
|
|
230
|
-
filepath: init.filepath,
|
|
231
|
-
configFilepath: init.configFilepath,
|
|
232
|
-
ignoreCache: init.ignoreCache,
|
|
233
|
-
logger: init.logger
|
|
234
|
-
});
|
|
235
|
-
} else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) throw new import_config.CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include \"ssoStartUrl\", \"ssoAccountId\", \"ssoRegion\", \"ssoRoleName\"", {
|
|
236
|
-
tryNextLink: false,
|
|
237
|
-
logger: init.logger
|
|
238
|
-
});
|
|
239
|
-
else return resolveSSOCredentials({
|
|
240
|
-
ssoStartUrl,
|
|
241
|
-
ssoSession,
|
|
242
|
-
ssoAccountId,
|
|
243
|
-
ssoRegion,
|
|
244
|
-
ssoRoleName,
|
|
245
|
-
ssoClient,
|
|
246
|
-
clientConfig: init.clientConfig,
|
|
247
|
-
parentClientConfig: init.parentClientConfig,
|
|
248
|
-
callerClientConfig: init.callerClientConfig,
|
|
249
|
-
profile: profileName,
|
|
250
|
-
filepath: init.filepath,
|
|
251
|
-
configFilepath: init.configFilepath,
|
|
252
|
-
ignoreCache: init.ignoreCache,
|
|
253
|
-
logger: init.logger
|
|
254
|
-
});
|
|
255
|
-
};
|
|
256
|
-
//#endregion
|
|
257
|
-
//#region ../../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.972.55/node_modules/@aws-sdk/credential-provider-sso/dist-es/index.js
|
|
258
|
-
var dist_es_exports = /* @__PURE__ */ __exportAll({
|
|
259
|
-
fromSSO: () => fromSSO,
|
|
260
|
-
isSsoProfile: () => isSsoProfile,
|
|
261
|
-
validateSsoProfile: () => validateSsoProfile
|
|
262
|
-
});
|
|
263
|
-
//#endregion
|
|
264
|
-
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.23/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js
|
|
265
|
-
var require_sso = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
266
|
-
var { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client();
|
|
267
|
-
var { NoAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require_dist_cjs();
|
|
268
|
-
var { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, Command, createAggregatedClient } = require_client$1();
|
|
269
|
-
var { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require_config();
|
|
270
|
-
var { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require_endpoints();
|
|
271
|
-
var { parseUrl, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols();
|
|
272
|
-
var { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require_retry();
|
|
273
|
-
var { TypeRegistry, getSchemaSerdePlugin } = require_schema();
|
|
274
|
-
var { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes();
|
|
275
|
-
var { toUtf8, fromUtf8, toBase64, fromBase64, Hash, calculateBodyLength } = require_serde();
|
|
276
|
-
var { streamCollector, NodeHttpHandler } = (init_dist_es(), __toCommonJS(dist_es_exports$1));
|
|
277
|
-
var { AwsRestJsonProtocol } = require_protocols$1();
|
|
278
|
-
var defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
279
|
-
return {
|
|
280
|
-
operation: getSmithyContext(context).operation,
|
|
281
|
-
region: await normalizeProvider(config.region)() || (() => {
|
|
282
|
-
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
283
|
-
})()
|
|
284
|
-
};
|
|
285
|
-
};
|
|
286
|
-
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
287
|
-
return {
|
|
288
|
-
schemeId: "aws.auth#sigv4",
|
|
289
|
-
signingProperties: {
|
|
290
|
-
name: "awsssoportal",
|
|
291
|
-
region: authParameters.region
|
|
292
|
-
},
|
|
293
|
-
propertiesExtractor: (config, context) => ({ signingProperties: {
|
|
294
|
-
config,
|
|
295
|
-
context
|
|
296
|
-
} })
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
|
|
300
|
-
return { schemeId: "smithy.api#noAuth" };
|
|
301
|
-
}
|
|
302
|
-
var defaultSSOHttpAuthSchemeProvider = (authParameters) => {
|
|
303
|
-
const options = [];
|
|
304
|
-
switch (authParameters.operation) {
|
|
305
|
-
case "GetRoleCredentials":
|
|
306
|
-
options.push(createSmithyApiNoAuthHttpAuthOption());
|
|
307
|
-
break;
|
|
308
|
-
default: options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
309
|
-
}
|
|
310
|
-
return options;
|
|
311
|
-
};
|
|
312
|
-
var resolveHttpAuthSchemeConfig = (config) => {
|
|
313
|
-
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
314
|
-
return Object.assign(config_0, { authSchemePreference: normalizeProvider(config.authSchemePreference ?? []) });
|
|
315
|
-
};
|
|
316
|
-
var resolveClientEndpointParameters = (options) => {
|
|
317
|
-
return Object.assign(options, {
|
|
318
|
-
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
319
|
-
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
320
|
-
defaultSigningName: "awsssoportal"
|
|
321
|
-
});
|
|
322
|
-
};
|
|
323
|
-
var commonParams = {
|
|
324
|
-
UseFIPS: {
|
|
325
|
-
type: "builtInParams",
|
|
326
|
-
name: "useFipsEndpoint"
|
|
327
|
-
},
|
|
328
|
-
Endpoint: {
|
|
329
|
-
type: "builtInParams",
|
|
330
|
-
name: "endpoint"
|
|
331
|
-
},
|
|
332
|
-
Region: {
|
|
333
|
-
type: "builtInParams",
|
|
334
|
-
name: "region"
|
|
335
|
-
},
|
|
336
|
-
UseDualStack: {
|
|
337
|
-
type: "builtInParams",
|
|
338
|
-
name: "useDualstackEndpoint"
|
|
339
|
-
}
|
|
340
|
-
};
|
|
341
|
-
var packageInfo = { version: "3.997.22" };
|
|
342
|
-
var k = "ref";
|
|
343
|
-
var a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [k]: "Endpoint" }, h = { [k]: d }, i = {}, j = [{ [k]: "Region" }];
|
|
344
|
-
var _data = {
|
|
345
|
-
conditions: [
|
|
346
|
-
[c, [g]],
|
|
347
|
-
[c, j],
|
|
348
|
-
[
|
|
349
|
-
"aws.partition",
|
|
350
|
-
j,
|
|
351
|
-
d
|
|
352
|
-
],
|
|
353
|
-
[e, [{ [k]: "UseFIPS" }, b]],
|
|
354
|
-
[e, [{ [k]: "UseDualStack" }, b]],
|
|
355
|
-
[e, [{
|
|
356
|
-
fn: f,
|
|
357
|
-
argv: [h, "supportsDualStack"]
|
|
358
|
-
}, b]],
|
|
359
|
-
[e, [{
|
|
360
|
-
fn: f,
|
|
361
|
-
argv: [h, "supportsFIPS"]
|
|
362
|
-
}, b]],
|
|
363
|
-
["stringEquals", [{
|
|
364
|
-
fn: f,
|
|
365
|
-
argv: [h, "name"]
|
|
366
|
-
}, "aws-us-gov"]]
|
|
367
|
-
],
|
|
368
|
-
results: [
|
|
369
|
-
[a],
|
|
370
|
-
[a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
371
|
-
[a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
|
|
372
|
-
[g, i],
|
|
373
|
-
["https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
|
|
374
|
-
[a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
|
|
375
|
-
["https://portal.sso.{Region}.amazonaws.com", i],
|
|
376
|
-
["https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", i],
|
|
377
|
-
[a, "FIPS is enabled but this partition does not support FIPS"],
|
|
378
|
-
["https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
|
|
379
|
-
[a, "DualStack is enabled but this partition does not support DualStack"],
|
|
380
|
-
["https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", i],
|
|
381
|
-
[a, "Invalid Configuration: Missing Region"]
|
|
382
|
-
]
|
|
383
|
-
};
|
|
384
|
-
var root = 2;
|
|
385
|
-
var nodes = new Int32Array([
|
|
386
|
-
-1,
|
|
387
|
-
1,
|
|
388
|
-
-1,
|
|
389
|
-
0,
|
|
390
|
-
13,
|
|
391
|
-
3,
|
|
392
|
-
1,
|
|
393
|
-
4,
|
|
394
|
-
100000012,
|
|
395
|
-
2,
|
|
396
|
-
5,
|
|
397
|
-
100000012,
|
|
398
|
-
3,
|
|
399
|
-
8,
|
|
400
|
-
6,
|
|
401
|
-
4,
|
|
402
|
-
7,
|
|
403
|
-
100000011,
|
|
404
|
-
5,
|
|
405
|
-
100000009,
|
|
406
|
-
100000010,
|
|
407
|
-
4,
|
|
408
|
-
11,
|
|
409
|
-
9,
|
|
410
|
-
6,
|
|
411
|
-
10,
|
|
412
|
-
100000008,
|
|
413
|
-
7,
|
|
414
|
-
100000006,
|
|
415
|
-
100000007,
|
|
416
|
-
5,
|
|
417
|
-
12,
|
|
418
|
-
100000005,
|
|
419
|
-
6,
|
|
420
|
-
100000004,
|
|
421
|
-
100000005,
|
|
422
|
-
3,
|
|
423
|
-
100000001,
|
|
424
|
-
14,
|
|
425
|
-
4,
|
|
426
|
-
100000002,
|
|
427
|
-
100000003
|
|
428
|
-
]);
|
|
429
|
-
var bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
430
|
-
var cache = new EndpointCache({
|
|
431
|
-
size: 50,
|
|
432
|
-
params: [
|
|
433
|
-
"Endpoint",
|
|
434
|
-
"Region",
|
|
435
|
-
"UseDualStack",
|
|
436
|
-
"UseFIPS"
|
|
437
|
-
]
|
|
438
|
-
});
|
|
439
|
-
var defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
440
|
-
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
441
|
-
endpointParams,
|
|
442
|
-
logger: context.logger
|
|
443
|
-
}));
|
|
444
|
-
};
|
|
445
|
-
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
446
|
-
var SSOServiceException = class SSOServiceException extends ServiceException {
|
|
447
|
-
constructor(options) {
|
|
448
|
-
super(options);
|
|
449
|
-
Object.setPrototypeOf(this, SSOServiceException.prototype);
|
|
450
|
-
}
|
|
451
|
-
};
|
|
452
|
-
var InvalidRequestException = class InvalidRequestException extends SSOServiceException {
|
|
453
|
-
name = "InvalidRequestException";
|
|
454
|
-
$fault = "client";
|
|
455
|
-
constructor(opts) {
|
|
456
|
-
super({
|
|
457
|
-
name: "InvalidRequestException",
|
|
458
|
-
$fault: "client",
|
|
459
|
-
...opts
|
|
460
|
-
});
|
|
461
|
-
Object.setPrototypeOf(this, InvalidRequestException.prototype);
|
|
462
|
-
}
|
|
463
|
-
};
|
|
464
|
-
var ResourceNotFoundException = class ResourceNotFoundException extends SSOServiceException {
|
|
465
|
-
name = "ResourceNotFoundException";
|
|
466
|
-
$fault = "client";
|
|
467
|
-
constructor(opts) {
|
|
468
|
-
super({
|
|
469
|
-
name: "ResourceNotFoundException",
|
|
470
|
-
$fault: "client",
|
|
471
|
-
...opts
|
|
472
|
-
});
|
|
473
|
-
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
474
|
-
}
|
|
475
|
-
};
|
|
476
|
-
var TooManyRequestsException = class TooManyRequestsException extends SSOServiceException {
|
|
477
|
-
name = "TooManyRequestsException";
|
|
478
|
-
$fault = "client";
|
|
479
|
-
constructor(opts) {
|
|
480
|
-
super({
|
|
481
|
-
name: "TooManyRequestsException",
|
|
482
|
-
$fault: "client",
|
|
483
|
-
...opts
|
|
484
|
-
});
|
|
485
|
-
Object.setPrototypeOf(this, TooManyRequestsException.prototype);
|
|
486
|
-
}
|
|
487
|
-
};
|
|
488
|
-
var UnauthorizedException = class UnauthorizedException extends SSOServiceException {
|
|
489
|
-
name = "UnauthorizedException";
|
|
490
|
-
$fault = "client";
|
|
491
|
-
constructor(opts) {
|
|
492
|
-
super({
|
|
493
|
-
name: "UnauthorizedException",
|
|
494
|
-
$fault: "client",
|
|
495
|
-
...opts
|
|
496
|
-
});
|
|
497
|
-
Object.setPrototypeOf(this, UnauthorizedException.prototype);
|
|
498
|
-
}
|
|
499
|
-
};
|
|
500
|
-
var _ATT = "AccessTokenType";
|
|
501
|
-
var _GRC = "GetRoleCredentials";
|
|
502
|
-
var _GRCR = "GetRoleCredentialsRequest";
|
|
503
|
-
var _GRCRe = "GetRoleCredentialsResponse";
|
|
504
|
-
var _IRE = "InvalidRequestException";
|
|
505
|
-
var _RC = "RoleCredentials";
|
|
506
|
-
var _RNFE = "ResourceNotFoundException";
|
|
507
|
-
var _SAKT = "SecretAccessKeyType";
|
|
508
|
-
var _STT = "SessionTokenType";
|
|
509
|
-
var _TMRE = "TooManyRequestsException";
|
|
510
|
-
var _UE = "UnauthorizedException";
|
|
511
|
-
var _aI = "accountId";
|
|
512
|
-
var _aKI = "accessKeyId";
|
|
513
|
-
var _aT = "accessToken";
|
|
514
|
-
var _ai = "account_id";
|
|
515
|
-
var _c = "client";
|
|
516
|
-
var _e = "error";
|
|
517
|
-
var _ex = "expiration";
|
|
518
|
-
var _h = "http";
|
|
519
|
-
var _hE = "httpError";
|
|
520
|
-
var _hH = "httpHeader";
|
|
521
|
-
var _hQ = "httpQuery";
|
|
522
|
-
var _m = "message";
|
|
523
|
-
var _rC = "roleCredentials";
|
|
524
|
-
var _rN = "roleName";
|
|
525
|
-
var _rn = "role_name";
|
|
526
|
-
var _s = "smithy.ts.sdk.synthetic.com.amazonaws.sso";
|
|
527
|
-
var _sAK = "secretAccessKey";
|
|
528
|
-
var _sT = "sessionToken";
|
|
529
|
-
var _xasbt = "x-amz-sso_bearer_token";
|
|
530
|
-
var n0 = "com.amazonaws.sso";
|
|
531
|
-
var _s_registry = TypeRegistry.for(_s);
|
|
532
|
-
var SSOServiceException$ = [
|
|
533
|
-
-3,
|
|
534
|
-
_s,
|
|
535
|
-
"SSOServiceException",
|
|
536
|
-
0,
|
|
537
|
-
[],
|
|
538
|
-
[]
|
|
539
|
-
];
|
|
540
|
-
_s_registry.registerError(SSOServiceException$, SSOServiceException);
|
|
541
|
-
var n0_registry = TypeRegistry.for(n0);
|
|
542
|
-
var InvalidRequestException$ = [
|
|
543
|
-
-3,
|
|
544
|
-
n0,
|
|
545
|
-
_IRE,
|
|
546
|
-
{
|
|
547
|
-
[_e]: _c,
|
|
548
|
-
[_hE]: 400
|
|
549
|
-
},
|
|
550
|
-
[_m],
|
|
551
|
-
[0]
|
|
552
|
-
];
|
|
553
|
-
n0_registry.registerError(InvalidRequestException$, InvalidRequestException);
|
|
554
|
-
var ResourceNotFoundException$ = [
|
|
555
|
-
-3,
|
|
556
|
-
n0,
|
|
557
|
-
_RNFE,
|
|
558
|
-
{
|
|
559
|
-
[_e]: _c,
|
|
560
|
-
[_hE]: 404
|
|
561
|
-
},
|
|
562
|
-
[_m],
|
|
563
|
-
[0]
|
|
564
|
-
];
|
|
565
|
-
n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
|
|
566
|
-
var TooManyRequestsException$ = [
|
|
567
|
-
-3,
|
|
568
|
-
n0,
|
|
569
|
-
_TMRE,
|
|
570
|
-
{
|
|
571
|
-
[_e]: _c,
|
|
572
|
-
[_hE]: 429
|
|
573
|
-
},
|
|
574
|
-
[_m],
|
|
575
|
-
[0]
|
|
576
|
-
];
|
|
577
|
-
n0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);
|
|
578
|
-
var UnauthorizedException$ = [
|
|
579
|
-
-3,
|
|
580
|
-
n0,
|
|
581
|
-
_UE,
|
|
582
|
-
{
|
|
583
|
-
[_e]: _c,
|
|
584
|
-
[_hE]: 401
|
|
585
|
-
},
|
|
586
|
-
[_m],
|
|
587
|
-
[0]
|
|
588
|
-
];
|
|
589
|
-
n0_registry.registerError(UnauthorizedException$, UnauthorizedException);
|
|
590
|
-
var errorTypeRegistries = [_s_registry, n0_registry];
|
|
591
|
-
var AccessTokenType = [
|
|
592
|
-
0,
|
|
593
|
-
n0,
|
|
594
|
-
_ATT,
|
|
595
|
-
8,
|
|
596
|
-
0
|
|
597
|
-
];
|
|
598
|
-
var SecretAccessKeyType = [
|
|
599
|
-
0,
|
|
600
|
-
n0,
|
|
601
|
-
_SAKT,
|
|
602
|
-
8,
|
|
603
|
-
0
|
|
604
|
-
];
|
|
605
|
-
var SessionTokenType = [
|
|
606
|
-
0,
|
|
607
|
-
n0,
|
|
608
|
-
_STT,
|
|
609
|
-
8,
|
|
610
|
-
0
|
|
611
|
-
];
|
|
612
|
-
var GetRoleCredentialsRequest$ = [
|
|
613
|
-
3,
|
|
614
|
-
n0,
|
|
615
|
-
_GRCR,
|
|
616
|
-
0,
|
|
617
|
-
[
|
|
618
|
-
_rN,
|
|
619
|
-
_aI,
|
|
620
|
-
_aT
|
|
621
|
-
],
|
|
622
|
-
[
|
|
623
|
-
[0, { [_hQ]: _rn }],
|
|
624
|
-
[0, { [_hQ]: _ai }],
|
|
625
|
-
[() => AccessTokenType, { [_hH]: _xasbt }]
|
|
626
|
-
],
|
|
627
|
-
3
|
|
628
|
-
];
|
|
629
|
-
var GetRoleCredentialsResponse$ = [
|
|
630
|
-
3,
|
|
631
|
-
n0,
|
|
632
|
-
_GRCRe,
|
|
633
|
-
0,
|
|
634
|
-
[_rC],
|
|
635
|
-
[[() => RoleCredentials$, 0]]
|
|
636
|
-
];
|
|
637
|
-
var RoleCredentials$ = [
|
|
638
|
-
3,
|
|
639
|
-
n0,
|
|
640
|
-
_RC,
|
|
641
|
-
0,
|
|
642
|
-
[
|
|
643
|
-
_aKI,
|
|
644
|
-
_sAK,
|
|
645
|
-
_sT,
|
|
646
|
-
_ex
|
|
647
|
-
],
|
|
648
|
-
[
|
|
649
|
-
0,
|
|
650
|
-
[() => SecretAccessKeyType, 0],
|
|
651
|
-
[() => SessionTokenType, 0],
|
|
652
|
-
1
|
|
653
|
-
]
|
|
654
|
-
];
|
|
655
|
-
var GetRoleCredentials$ = [
|
|
656
|
-
9,
|
|
657
|
-
n0,
|
|
658
|
-
_GRC,
|
|
659
|
-
{ [_h]: [
|
|
660
|
-
"GET",
|
|
661
|
-
"/federation/credentials",
|
|
662
|
-
200
|
|
663
|
-
] },
|
|
664
|
-
() => GetRoleCredentialsRequest$,
|
|
665
|
-
() => GetRoleCredentialsResponse$
|
|
666
|
-
];
|
|
667
|
-
var getRuntimeConfig$1 = (config) => {
|
|
668
|
-
return {
|
|
669
|
-
apiVersion: "2019-06-10",
|
|
670
|
-
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
671
|
-
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
672
|
-
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
673
|
-
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
674
|
-
extensions: config?.extensions ?? [],
|
|
675
|
-
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOHttpAuthSchemeProvider,
|
|
676
|
-
httpAuthSchemes: config?.httpAuthSchemes ?? [{
|
|
677
|
-
schemeId: "aws.auth#sigv4",
|
|
678
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
679
|
-
signer: new AwsSdkSigV4Signer()
|
|
680
|
-
}, {
|
|
681
|
-
schemeId: "smithy.api#noAuth",
|
|
682
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
683
|
-
signer: new NoAuthSigner()
|
|
684
|
-
}],
|
|
685
|
-
logger: config?.logger ?? new NoOpLogger(),
|
|
686
|
-
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
687
|
-
protocolSettings: config?.protocolSettings ?? {
|
|
688
|
-
defaultNamespace: "com.amazonaws.sso",
|
|
689
|
-
errorTypeRegistries,
|
|
690
|
-
version: "2019-06-10",
|
|
691
|
-
serviceTarget: "SWBPortalService"
|
|
692
|
-
},
|
|
693
|
-
serviceId: config?.serviceId ?? "SSO",
|
|
694
|
-
urlParser: config?.urlParser ?? parseUrl,
|
|
695
|
-
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
696
|
-
utf8Encoder: config?.utf8Encoder ?? toUtf8
|
|
697
|
-
};
|
|
698
|
-
};
|
|
699
|
-
var getRuntimeConfig = (config) => {
|
|
700
|
-
emitWarningIfUnsupportedVersion(process.version);
|
|
701
|
-
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
702
|
-
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
703
|
-
const clientSharedValues = getRuntimeConfig$1(config);
|
|
704
|
-
emitWarningIfUnsupportedVersion$1(process.version);
|
|
705
|
-
const loaderConfig = {
|
|
706
|
-
profile: config?.profile,
|
|
707
|
-
logger: clientSharedValues.logger
|
|
708
|
-
};
|
|
709
|
-
return {
|
|
710
|
-
...clientSharedValues,
|
|
711
|
-
...config,
|
|
712
|
-
runtime: "node",
|
|
713
|
-
defaultsMode,
|
|
714
|
-
authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
715
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
716
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({
|
|
717
|
-
serviceId: clientSharedValues.serviceId,
|
|
718
|
-
clientVersion: packageInfo.version
|
|
719
|
-
}),
|
|
720
|
-
maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
721
|
-
region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, {
|
|
722
|
-
...NODE_REGION_CONFIG_FILE_OPTIONS,
|
|
723
|
-
...loaderConfig
|
|
724
|
-
}),
|
|
725
|
-
requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
726
|
-
retryMode: config?.retryMode ?? loadConfig({
|
|
727
|
-
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
728
|
-
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
|
|
729
|
-
}, config),
|
|
730
|
-
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
731
|
-
streamCollector: config?.streamCollector ?? streamCollector,
|
|
732
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
733
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
734
|
-
userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
|
|
735
|
-
};
|
|
736
|
-
};
|
|
737
|
-
var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
738
|
-
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
739
|
-
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
740
|
-
let _credentials = runtimeConfig.credentials;
|
|
741
|
-
return {
|
|
742
|
-
setHttpAuthScheme(httpAuthScheme) {
|
|
743
|
-
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
744
|
-
if (index === -1) _httpAuthSchemes.push(httpAuthScheme);
|
|
745
|
-
else _httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
746
|
-
},
|
|
747
|
-
httpAuthSchemes() {
|
|
748
|
-
return _httpAuthSchemes;
|
|
749
|
-
},
|
|
750
|
-
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
751
|
-
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
752
|
-
},
|
|
753
|
-
httpAuthSchemeProvider() {
|
|
754
|
-
return _httpAuthSchemeProvider;
|
|
755
|
-
},
|
|
756
|
-
setCredentials(credentials) {
|
|
757
|
-
_credentials = credentials;
|
|
758
|
-
},
|
|
759
|
-
credentials() {
|
|
760
|
-
return _credentials;
|
|
761
|
-
}
|
|
762
|
-
};
|
|
763
|
-
};
|
|
764
|
-
var resolveHttpAuthRuntimeConfig = (config) => {
|
|
765
|
-
return {
|
|
766
|
-
httpAuthSchemes: config.httpAuthSchemes(),
|
|
767
|
-
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
768
|
-
credentials: config.credentials()
|
|
769
|
-
};
|
|
770
|
-
};
|
|
771
|
-
var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
772
|
-
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
773
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
774
|
-
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
775
|
-
};
|
|
776
|
-
var SSOClient = class extends Client {
|
|
777
|
-
config;
|
|
778
|
-
constructor(...[configuration]) {
|
|
779
|
-
const _config_0 = getRuntimeConfig(configuration || {});
|
|
780
|
-
super(_config_0);
|
|
781
|
-
this.initConfig = _config_0;
|
|
782
|
-
const _config_8 = resolveRuntimeExtensions(resolveHttpAuthSchemeConfig(resolveEndpointConfig(resolveHostHeaderConfig(resolveRegionConfig(resolveRetryConfig(resolveUserAgentConfig(resolveClientEndpointParameters(_config_0))))))), configuration?.extensions || []);
|
|
783
|
-
this.config = _config_8;
|
|
784
|
-
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
785
|
-
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
786
|
-
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
787
|
-
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
788
|
-
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
789
|
-
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
790
|
-
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
791
|
-
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
792
|
-
httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider,
|
|
793
|
-
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({ "aws.auth#sigv4": config.credentials })
|
|
794
|
-
}));
|
|
795
|
-
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
796
|
-
}
|
|
797
|
-
destroy() {
|
|
798
|
-
super.destroy();
|
|
799
|
-
}
|
|
800
|
-
};
|
|
801
|
-
var GetRoleCredentialsCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
802
|
-
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
803
|
-
}).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").sc(GetRoleCredentials$).build() {};
|
|
804
|
-
var commands = { GetRoleCredentialsCommand };
|
|
805
|
-
var SSO = class extends SSOClient {};
|
|
806
|
-
createAggregatedClient(commands, SSO);
|
|
807
|
-
exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;
|
|
808
|
-
exports.SSOClient = SSOClient;
|
|
809
|
-
}));
|
|
810
|
-
//#endregion
|
|
811
|
-
//#region ../../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.972.55/node_modules/@aws-sdk/credential-provider-sso/dist-es/loadSso.js
|
|
812
|
-
var loadSso_exports = /* @__PURE__ */ __exportAll({
|
|
813
|
-
GetRoleCredentialsCommand: () => import_sso.GetRoleCredentialsCommand,
|
|
814
|
-
SSOClient: () => import_sso.SSOClient
|
|
815
|
-
});
|
|
816
|
-
var import_sso = require_sso();
|
|
817
|
-
//#endregion
|
|
818
|
-
export { dist_es_exports as t };
|