@semiont/graph 0.5.5 → 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +78 -79
  2. package/dist/bowser-D72SKZAH.js +2820 -0
  3. package/dist/bowser-D72SKZAH.js.map +1 -0
  4. package/dist/chunk-27S56UPF.js +4754 -0
  5. package/dist/chunk-27S56UPF.js.map +1 -0
  6. package/dist/chunk-4UP2SG3N.js +2095 -0
  7. package/dist/chunk-4UP2SG3N.js.map +1 -0
  8. package/dist/chunk-6DEJAFBY.js +125 -0
  9. package/dist/chunk-6DEJAFBY.js.map +1 -0
  10. package/dist/chunk-7UD62TQI.js +3317 -0
  11. package/dist/chunk-7UD62TQI.js.map +1 -0
  12. package/dist/chunk-B2W57CWL.js +47 -0
  13. package/dist/chunk-B2W57CWL.js.map +1 -0
  14. package/dist/chunk-DCLCNCC5.js +1051 -0
  15. package/dist/chunk-DCLCNCC5.js.map +1 -0
  16. package/dist/chunk-KE4TRQI4.js +576 -0
  17. package/dist/chunk-KE4TRQI4.js.map +1 -0
  18. package/dist/chunk-MWZWSKZD.js +1166 -0
  19. package/dist/chunk-MWZWSKZD.js.map +1 -0
  20. package/dist/chunk-V4VXQDJC.js +436 -0
  21. package/dist/chunk-V4VXQDJC.js.map +1 -0
  22. package/dist/dist-es-2CKOZ7UJ.js +69 -0
  23. package/dist/dist-es-2CKOZ7UJ.js.map +1 -0
  24. package/dist/dist-es-CUJAAJXF.js +6632 -0
  25. package/dist/dist-es-CUJAAJXF.js.map +1 -0
  26. package/dist/dist-es-LM7J2FUI.js +87 -0
  27. package/dist/dist-es-LM7J2FUI.js.map +1 -0
  28. package/dist/dist-es-QTXLRLLM.js +169 -0
  29. package/dist/dist-es-QTXLRLLM.js.map +1 -0
  30. package/dist/dist-es-R223S2WP.js +484 -0
  31. package/dist/dist-es-R223S2WP.js.map +1 -0
  32. package/dist/dist-es-SI3C7IEH.js +22 -0
  33. package/dist/dist-es-SI3C7IEH.js.map +1 -0
  34. package/dist/dist-es-XNPYIYQW.js +314 -0
  35. package/dist/dist-es-XNPYIYQW.js.map +1 -0
  36. package/dist/dist-es-ZYIOCGDF.js +376 -0
  37. package/dist/dist-es-ZYIOCGDF.js.map +1 -0
  38. package/dist/event-streams-AI5RIQ2F.js +1376 -0
  39. package/dist/event-streams-AI5RIQ2F.js.map +1 -0
  40. package/dist/index.js +2 -1
  41. package/dist/index.js.map +1 -1
  42. package/dist/loadSso-6PVX5KA7.js +576 -0
  43. package/dist/loadSso-6PVX5KA7.js.map +1 -0
  44. package/dist/signin-GV4P4PGF.js +662 -0
  45. package/dist/signin-GV4P4PGF.js.map +1 -0
  46. package/dist/sso-oidc-WFVKSVW6.js +829 -0
  47. package/dist/sso-oidc-WFVKSVW6.js.map +1 -0
  48. package/dist/sts-7N7QMJRQ.js +1244 -0
  49. package/dist/sts-7N7QMJRQ.js.map +1 -0
  50. package/package.json +13 -8
@@ -0,0 +1,1244 @@
1
+ import {
2
+ AwsQueryProtocol
3
+ } from "./chunk-27S56UPF.js";
4
+ import {
5
+ package_default
6
+ } from "./chunk-6DEJAFBY.js";
7
+ import {
8
+ AwsSdkSigV4ASigner,
9
+ AwsSdkSigV4Signer,
10
+ NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,
11
+ NODE_SIGV4A_CONFIG_OPTIONS,
12
+ SignatureV4,
13
+ getSchemaSerdePlugin,
14
+ resolveAwsSdkSigV4AConfig,
15
+ resolveAwsSdkSigV4Config,
16
+ streamCollector
17
+ } from "./chunk-MWZWSKZD.js";
18
+ import {
19
+ NodeHttpHandler
20
+ } from "./chunk-V4VXQDJC.js";
21
+ import {
22
+ BinaryDecisionDiagram,
23
+ Client,
24
+ Command,
25
+ DEFAULT_RETRY_MODE,
26
+ DefaultIdentityProviderConfig,
27
+ EndpointCache,
28
+ NODE_APP_ID_CONFIG_OPTIONS,
29
+ NODE_MAX_ATTEMPT_CONFIG_OPTIONS,
30
+ NODE_RETRY_MODE_CONFIG_OPTIONS,
31
+ NoAuthSigner,
32
+ NoOpLogger,
33
+ ServiceException,
34
+ awsEndpointFunctions,
35
+ createAggregatedClient,
36
+ createDefaultUserAgentProvider,
37
+ customEndpointFunctions,
38
+ decideEndpoint,
39
+ emitWarningIfUnsupportedVersion,
40
+ emitWarningIfUnsupportedVersion2,
41
+ getAwsRegionExtensionConfiguration,
42
+ getDefaultExtensionConfiguration,
43
+ getEndpointPlugin,
44
+ getHostHeaderPlugin,
45
+ getHttpAuthSchemeEndpointRuleSetPlugin,
46
+ getHttpSigningPlugin,
47
+ getLoggerPlugin,
48
+ getRecursionDetectionPlugin,
49
+ getRetryPlugin,
50
+ getUserAgentPlugin,
51
+ loadConfigsForDefaultMode,
52
+ resolveAwsRegionExtensionConfiguration,
53
+ resolveDefaultRuntimeConfig,
54
+ resolveEndpointConfig,
55
+ resolveHostHeaderConfig,
56
+ resolveParams,
57
+ resolveRetryConfig,
58
+ resolveUserAgentConfig,
59
+ setCredentialFeature,
60
+ stsRegionDefaultResolver
61
+ } from "./chunk-7UD62TQI.js";
62
+ import {
63
+ NODE_REGION_CONFIG_FILE_OPTIONS,
64
+ NODE_REGION_CONFIG_OPTIONS,
65
+ NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,
66
+ NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,
67
+ TypeRegistry,
68
+ getContentLengthPlugin,
69
+ getHttpHandlerExtensionConfiguration,
70
+ getSmithyContext,
71
+ loadConfig,
72
+ normalizeProvider,
73
+ parseUrl,
74
+ resolveDefaultsModeConfig,
75
+ resolveHttpHandlerRuntimeConfig,
76
+ resolveRegionConfig
77
+ } from "./chunk-4UP2SG3N.js";
78
+ import {
79
+ Hash,
80
+ calculateBodyLength,
81
+ fromBase64,
82
+ fromUtf8,
83
+ toBase64,
84
+ toUtf8
85
+ } from "./chunk-DCLCNCC5.js";
86
+
87
+ // ../../node_modules/@smithy/signature-v4/dist-es/signature-v4a-container.js
88
+ var signatureV4aContainer = {
89
+ SignatureV4a: null
90
+ };
91
+
92
+ // ../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/signature-v4-crt-container.js
93
+ var signatureV4CrtContainer = {
94
+ CrtSignerV4: null
95
+ };
96
+
97
+ // ../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/SignatureV4SignWithCredentials.js
98
+ var SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token";
99
+ var SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase();
100
+ var SignatureV4SignWithCredentials = class extends SignatureV4 {
101
+ async signWithCredentials(requestToSign, credentials, options) {
102
+ const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);
103
+ requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken;
104
+ const privateAccess = this;
105
+ setSingleOverride(privateAccess, credentialsWithoutSessionToken);
106
+ return privateAccess.signRequest(requestToSign, options ?? {});
107
+ }
108
+ async presignWithCredentials(requestToSign, credentials, options) {
109
+ const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);
110
+ delete requestToSign.headers[SESSION_TOKEN_HEADER];
111
+ requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;
112
+ requestToSign.query = requestToSign.query ?? {};
113
+ requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;
114
+ const privateAccess = this;
115
+ setSingleOverride(privateAccess, credentialsWithoutSessionToken);
116
+ return this.presign(requestToSign, options);
117
+ }
118
+ };
119
+ function getCredentialsWithoutSessionToken(credentials) {
120
+ return {
121
+ accessKeyId: credentials.accessKeyId,
122
+ secretAccessKey: credentials.secretAccessKey,
123
+ expiration: credentials.expiration
124
+ };
125
+ }
126
+ function setSingleOverride(privateAccess, credentialsWithoutSessionToken) {
127
+ const currentCredentialProvider = privateAccess.credentialProvider;
128
+ privateAccess.credentialProvider = () => {
129
+ privateAccess.credentialProvider = currentCredentialProvider;
130
+ return Promise.resolve(credentialsWithoutSessionToken);
131
+ };
132
+ }
133
+
134
+ // ../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/SignatureV4MultiRegion.js
135
+ var SignatureV4MultiRegion = class {
136
+ sigv4aSigner;
137
+ sigv4Signer;
138
+ signerOptions;
139
+ static sigv4aDependency() {
140
+ if (typeof signatureV4CrtContainer.CrtSignerV4 === "function") {
141
+ return "crt";
142
+ } else if (typeof signatureV4aContainer.SignatureV4a === "function") {
143
+ return "js";
144
+ }
145
+ return "none";
146
+ }
147
+ constructor(options) {
148
+ this.sigv4Signer = new SignatureV4SignWithCredentials(options);
149
+ this.signerOptions = options;
150
+ }
151
+ async sign(requestToSign, options = {}) {
152
+ if (options.signingRegion === "*") {
153
+ return this.getSigv4aSigner().sign(requestToSign, options);
154
+ }
155
+ return this.sigv4Signer.sign(requestToSign, options);
156
+ }
157
+ async signWithCredentials(requestToSign, credentials, options = {}) {
158
+ if (options.signingRegion === "*") {
159
+ const signer = this.getSigv4aSigner();
160
+ const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
161
+ if (CrtSignerV4 && signer instanceof CrtSignerV4) {
162
+ return signer.signWithCredentials(requestToSign, credentials, options);
163
+ } else {
164
+ throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);
165
+ }
166
+ }
167
+ return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options);
168
+ }
169
+ async presign(originalRequest, options = {}) {
170
+ if (options.signingRegion === "*") {
171
+ const signer = this.getSigv4aSigner();
172
+ const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
173
+ if (CrtSignerV4 && signer instanceof CrtSignerV4) {
174
+ return signer.presign(originalRequest, options);
175
+ } else {
176
+ throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);
177
+ }
178
+ }
179
+ return this.sigv4Signer.presign(originalRequest, options);
180
+ }
181
+ async presignWithCredentials(originalRequest, credentials, options = {}) {
182
+ if (options.signingRegion === "*") {
183
+ throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");
184
+ }
185
+ return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options);
186
+ }
187
+ getSigv4aSigner() {
188
+ if (!this.sigv4aSigner) {
189
+ const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
190
+ const JsSigV4aSigner = signatureV4aContainer.SignatureV4a;
191
+ if (this.signerOptions.runtime === "node") {
192
+ if (!CrtSignerV4 && !JsSigV4aSigner) {
193
+ throw new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");
194
+ }
195
+ if (CrtSignerV4 && typeof CrtSignerV4 === "function") {
196
+ this.sigv4aSigner = new CrtSignerV4({
197
+ ...this.signerOptions,
198
+ signingAlgorithm: 1
199
+ });
200
+ } else if (JsSigV4aSigner && typeof JsSigV4aSigner === "function") {
201
+ this.sigv4aSigner = new JsSigV4aSigner({
202
+ ...this.signerOptions
203
+ });
204
+ } else {
205
+ throw new Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");
206
+ }
207
+ } else {
208
+ if (!JsSigV4aSigner || typeof JsSigV4aSigner !== "function") {
209
+ throw new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");
210
+ }
211
+ this.sigv4aSigner = new JsSigV4aSigner({
212
+ ...this.signerOptions
213
+ });
214
+ }
215
+ }
216
+ return this.sigv4aSigner;
217
+ }
218
+ };
219
+
220
+ // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/bdd.js
221
+ var q = "ref";
222
+ var a = -1;
223
+ var b = true;
224
+ var c = "isSet";
225
+ var d = "PartitionResult";
226
+ var e = "booleanEquals";
227
+ var f = "stringEquals";
228
+ var g = "getAttr";
229
+ var h = "us-east-1";
230
+ var i = "sigv4";
231
+ var j = "sts";
232
+ var k = "https://sts.{Region}.{PartitionResult#dnsSuffix}";
233
+ var l = { [q]: "Endpoint" };
234
+ var m = { [q]: "Region" };
235
+ var n = { [q]: d };
236
+ var o = {};
237
+ var p = [m];
238
+ var _data = {
239
+ conditions: [
240
+ [c, [l]],
241
+ [c, p],
242
+ ["aws.partition", p, d],
243
+ [e, [{ [q]: "UseFIPS" }, b]],
244
+ [e, [{ [q]: "UseDualStack" }, b]],
245
+ [f, [m, "aws-global"]],
246
+ [e, [{ [q]: "UseGlobalEndpoint" }, b]],
247
+ [f, [m, "eu-central-1"]],
248
+ [e, [{ fn: g, argv: [n, "supportsDualStack"] }, b]],
249
+ [e, [{ fn: g, argv: [n, "supportsFIPS"] }, b]],
250
+ [f, [m, "ap-south-1"]],
251
+ [f, [m, "eu-north-1"]],
252
+ [f, [m, "eu-west-1"]],
253
+ [f, [m, "eu-west-2"]],
254
+ [f, [m, "eu-west-3"]],
255
+ [f, [m, "sa-east-1"]],
256
+ [f, [m, h]],
257
+ [f, [m, "us-east-2"]],
258
+ [f, [m, "us-west-2"]],
259
+ [f, [m, "us-west-1"]],
260
+ [f, [m, "ca-central-1"]],
261
+ [f, [m, "ap-southeast-1"]],
262
+ [f, [m, "ap-northeast-1"]],
263
+ [f, [m, "ap-southeast-2"]],
264
+ [f, [{ fn: g, argv: [n, "name"] }, "aws-us-gov"]]
265
+ ],
266
+ results: [
267
+ [a],
268
+ ["https://sts.amazonaws.com", { authSchemes: [{ name: i, signingName: j, signingRegion: h }] }],
269
+ [k, { authSchemes: [{ name: i, signingName: j, signingRegion: "{Region}" }] }],
270
+ [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
271
+ [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
272
+ [l, o],
273
+ ["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", o],
274
+ [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
275
+ ["https://sts.{Region}.amazonaws.com", o],
276
+ ["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", o],
277
+ [a, "FIPS is enabled but this partition does not support FIPS"],
278
+ ["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", o],
279
+ [a, "DualStack is enabled but this partition does not support DualStack"],
280
+ [k, o],
281
+ [a, "Invalid Configuration: Missing Region"]
282
+ ]
283
+ };
284
+ var root = 2;
285
+ var r = 1e8;
286
+ var nodes = new Int32Array([
287
+ -1,
288
+ 1,
289
+ -1,
290
+ 0,
291
+ 30,
292
+ 3,
293
+ 1,
294
+ 4,
295
+ r + 14,
296
+ 2,
297
+ 5,
298
+ r + 14,
299
+ 3,
300
+ 25,
301
+ 6,
302
+ 4,
303
+ 24,
304
+ 7,
305
+ 5,
306
+ r + 1,
307
+ 8,
308
+ 6,
309
+ 9,
310
+ r + 13,
311
+ 7,
312
+ r + 1,
313
+ 10,
314
+ 10,
315
+ r + 1,
316
+ 11,
317
+ 11,
318
+ r + 1,
319
+ 12,
320
+ 12,
321
+ r + 1,
322
+ 13,
323
+ 13,
324
+ r + 1,
325
+ 14,
326
+ 14,
327
+ r + 1,
328
+ 15,
329
+ 15,
330
+ r + 1,
331
+ 16,
332
+ 16,
333
+ r + 1,
334
+ 17,
335
+ 17,
336
+ r + 1,
337
+ 18,
338
+ 18,
339
+ r + 1,
340
+ 19,
341
+ 19,
342
+ r + 1,
343
+ 20,
344
+ 20,
345
+ r + 1,
346
+ 21,
347
+ 21,
348
+ r + 1,
349
+ 22,
350
+ 22,
351
+ r + 1,
352
+ 23,
353
+ 23,
354
+ r + 1,
355
+ r + 2,
356
+ 8,
357
+ r + 11,
358
+ r + 12,
359
+ 4,
360
+ 28,
361
+ 26,
362
+ 9,
363
+ 27,
364
+ r + 10,
365
+ 24,
366
+ r + 8,
367
+ r + 9,
368
+ 8,
369
+ 29,
370
+ r + 7,
371
+ 9,
372
+ r + 6,
373
+ r + 7,
374
+ 3,
375
+ r + 3,
376
+ 31,
377
+ 4,
378
+ r + 4,
379
+ r + 5
380
+ ]);
381
+ var bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
382
+
383
+ // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js
384
+ var cache = new EndpointCache({
385
+ size: 50,
386
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"]
387
+ });
388
+ var defaultEndpointResolver = (endpointParams, context = {}) => {
389
+ return cache.get(endpointParams, () => decideEndpoint(bdd, {
390
+ endpointParams,
391
+ logger: context.logger
392
+ }));
393
+ };
394
+ customEndpointFunctions.aws = awsEndpointFunctions;
395
+
396
+ // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js
397
+ var createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {
398
+ if (!input) {
399
+ throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
400
+ }
401
+ const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);
402
+ const instructionsFn = getSmithyContext(context)?.commandInstance?.constructor?.getEndpointParameterInstructions;
403
+ if (!instructionsFn) {
404
+ throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);
405
+ }
406
+ const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config);
407
+ return Object.assign(defaultParameters, endpointParameters);
408
+ };
409
+ var _defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
410
+ return {
411
+ operation: getSmithyContext(context).operation,
412
+ region: await normalizeProvider(config.region)() || (() => {
413
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
414
+ })()
415
+ };
416
+ };
417
+ var defaultSTSHttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultSTSHttpAuthSchemeParametersProvider);
418
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
419
+ return {
420
+ schemeId: "aws.auth#sigv4",
421
+ signingProperties: {
422
+ name: "sts",
423
+ region: authParameters.region
424
+ },
425
+ propertiesExtractor: (config, context) => ({
426
+ signingProperties: {
427
+ config,
428
+ context
429
+ }
430
+ })
431
+ };
432
+ }
433
+ function createAwsAuthSigv4aHttpAuthOption(authParameters) {
434
+ return {
435
+ schemeId: "aws.auth#sigv4a",
436
+ signingProperties: {
437
+ name: "sts",
438
+ region: authParameters.region
439
+ },
440
+ propertiesExtractor: (config, context) => ({
441
+ signingProperties: {
442
+ config,
443
+ context
444
+ }
445
+ })
446
+ };
447
+ }
448
+ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
449
+ return {
450
+ schemeId: "smithy.api#noAuth"
451
+ };
452
+ }
453
+ var createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver2, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {
454
+ const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {
455
+ const endpoint = defaultEndpointResolver2(authParameters);
456
+ const authSchemes = endpoint.properties?.authSchemes;
457
+ if (!authSchemes) {
458
+ return defaultHttpAuthSchemeResolver(authParameters);
459
+ }
460
+ const options = [];
461
+ for (const scheme of authSchemes) {
462
+ const { name: resolvedName, properties = {}, ...rest } = scheme;
463
+ const name = resolvedName.toLowerCase();
464
+ if (resolvedName !== name) {
465
+ console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`);
466
+ }
467
+ let schemeId;
468
+ if (name === "sigv4a") {
469
+ schemeId = "aws.auth#sigv4a";
470
+ const sigv4Present = authSchemes.find((s) => {
471
+ const name2 = s.name.toLowerCase();
472
+ return name2 !== "sigv4a" && name2.startsWith("sigv4");
473
+ });
474
+ if (SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
475
+ continue;
476
+ }
477
+ } else if (name.startsWith("sigv4")) {
478
+ schemeId = "aws.auth#sigv4";
479
+ } else {
480
+ throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`);
481
+ }
482
+ const createOption = createHttpAuthOptionFunctions[schemeId];
483
+ if (!createOption) {
484
+ throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`);
485
+ }
486
+ const option = createOption(authParameters);
487
+ option.schemeId = schemeId;
488
+ option.signingProperties = { ...option.signingProperties || {}, ...rest, ...properties };
489
+ options.push(option);
490
+ }
491
+ return options;
492
+ };
493
+ return endpointRuleSetHttpAuthSchemeProvider;
494
+ };
495
+ var _defaultSTSHttpAuthSchemeProvider = (authParameters) => {
496
+ const options = [];
497
+ switch (authParameters.operation) {
498
+ case "AssumeRoleWithWebIdentity": {
499
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
500
+ options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
501
+ break;
502
+ }
503
+ default: {
504
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
505
+ options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
506
+ }
507
+ }
508
+ return options;
509
+ };
510
+ var defaultSTSHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultSTSHttpAuthSchemeProvider, {
511
+ "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
512
+ "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
513
+ "smithy.api#noAuth": createSmithyApiNoAuthHttpAuthOption
514
+ });
515
+ var resolveHttpAuthSchemeConfig = (config) => {
516
+ const config_0 = resolveAwsSdkSigV4Config(config);
517
+ const config_1 = resolveAwsSdkSigV4AConfig(config_0);
518
+ return Object.assign(config_1, {
519
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
520
+ });
521
+ };
522
+
523
+ // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/EndpointParameters.js
524
+ var resolveClientEndpointParameters = (options) => {
525
+ return Object.assign(options, {
526
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
527
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
528
+ useGlobalEndpoint: options.useGlobalEndpoint ?? false,
529
+ defaultSigningName: "sts"
530
+ });
531
+ };
532
+ var commonParams = {
533
+ UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
534
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
535
+ Endpoint: { type: "builtInParams", name: "endpoint" },
536
+ Region: { type: "builtInParams", name: "region" },
537
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
538
+ };
539
+
540
+ // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js
541
+ var STSServiceException = class _STSServiceException extends ServiceException {
542
+ constructor(options) {
543
+ super(options);
544
+ Object.setPrototypeOf(this, _STSServiceException.prototype);
545
+ }
546
+ };
547
+
548
+ // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/errors.js
549
+ var ExpiredTokenException = class _ExpiredTokenException extends STSServiceException {
550
+ name = "ExpiredTokenException";
551
+ $fault = "client";
552
+ constructor(opts) {
553
+ super({
554
+ name: "ExpiredTokenException",
555
+ $fault: "client",
556
+ ...opts
557
+ });
558
+ Object.setPrototypeOf(this, _ExpiredTokenException.prototype);
559
+ }
560
+ };
561
+ var MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException {
562
+ name = "MalformedPolicyDocumentException";
563
+ $fault = "client";
564
+ constructor(opts) {
565
+ super({
566
+ name: "MalformedPolicyDocumentException",
567
+ $fault: "client",
568
+ ...opts
569
+ });
570
+ Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype);
571
+ }
572
+ };
573
+ var PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException {
574
+ name = "PackedPolicyTooLargeException";
575
+ $fault = "client";
576
+ constructor(opts) {
577
+ super({
578
+ name: "PackedPolicyTooLargeException",
579
+ $fault: "client",
580
+ ...opts
581
+ });
582
+ Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype);
583
+ }
584
+ };
585
+ var RegionDisabledException = class _RegionDisabledException extends STSServiceException {
586
+ name = "RegionDisabledException";
587
+ $fault = "client";
588
+ constructor(opts) {
589
+ super({
590
+ name: "RegionDisabledException",
591
+ $fault: "client",
592
+ ...opts
593
+ });
594
+ Object.setPrototypeOf(this, _RegionDisabledException.prototype);
595
+ }
596
+ };
597
+ var IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException {
598
+ name = "IDPRejectedClaimException";
599
+ $fault = "client";
600
+ constructor(opts) {
601
+ super({
602
+ name: "IDPRejectedClaimException",
603
+ $fault: "client",
604
+ ...opts
605
+ });
606
+ Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype);
607
+ }
608
+ };
609
+ var InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException {
610
+ name = "InvalidIdentityTokenException";
611
+ $fault = "client";
612
+ constructor(opts) {
613
+ super({
614
+ name: "InvalidIdentityTokenException",
615
+ $fault: "client",
616
+ ...opts
617
+ });
618
+ Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype);
619
+ }
620
+ };
621
+ var IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException {
622
+ name = "IDPCommunicationErrorException";
623
+ $fault = "client";
624
+ $retryable = {};
625
+ constructor(opts) {
626
+ super({
627
+ name: "IDPCommunicationErrorException",
628
+ $fault: "client",
629
+ ...opts
630
+ });
631
+ Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype);
632
+ }
633
+ };
634
+
635
+ // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js
636
+ var _A = "Arn";
637
+ var _AKI = "AccessKeyId";
638
+ var _AR = "AssumeRole";
639
+ var _ARI = "AssumedRoleId";
640
+ var _ARR = "AssumeRoleRequest";
641
+ var _ARRs = "AssumeRoleResponse";
642
+ var _ARU = "AssumedRoleUser";
643
+ var _ARWWI = "AssumeRoleWithWebIdentity";
644
+ var _ARWWIR = "AssumeRoleWithWebIdentityRequest";
645
+ var _ARWWIRs = "AssumeRoleWithWebIdentityResponse";
646
+ var _Au = "Audience";
647
+ var _C = "Credentials";
648
+ var _CA = "ContextAssertion";
649
+ var _DS = "DurationSeconds";
650
+ var _E = "Expiration";
651
+ var _EI = "ExternalId";
652
+ var _ETE = "ExpiredTokenException";
653
+ var _IDPCEE = "IDPCommunicationErrorException";
654
+ var _IDPRCE = "IDPRejectedClaimException";
655
+ var _IITE = "InvalidIdentityTokenException";
656
+ var _K = "Key";
657
+ var _MPDE = "MalformedPolicyDocumentException";
658
+ var _P = "Policy";
659
+ var _PA = "PolicyArns";
660
+ var _PAr = "ProviderArn";
661
+ var _PC = "ProvidedContexts";
662
+ var _PCLT = "ProvidedContextsListType";
663
+ var _PCr = "ProvidedContext";
664
+ var _PDT = "PolicyDescriptorType";
665
+ var _PI = "ProviderId";
666
+ var _PPS = "PackedPolicySize";
667
+ var _PPTLE = "PackedPolicyTooLargeException";
668
+ var _Pr = "Provider";
669
+ var _RA = "RoleArn";
670
+ var _RDE = "RegionDisabledException";
671
+ var _RSN = "RoleSessionName";
672
+ var _SAK = "SecretAccessKey";
673
+ var _SFWIT = "SubjectFromWebIdentityToken";
674
+ var _SI = "SourceIdentity";
675
+ var _SN = "SerialNumber";
676
+ var _ST = "SessionToken";
677
+ var _T = "Tags";
678
+ var _TC = "TokenCode";
679
+ var _TTK = "TransitiveTagKeys";
680
+ var _Ta = "Tag";
681
+ var _V = "Value";
682
+ var _WIT = "WebIdentityToken";
683
+ var _a = "arn";
684
+ var _aKST = "accessKeySecretType";
685
+ var _aQE = "awsQueryError";
686
+ var _c = "client";
687
+ var _cTT = "clientTokenType";
688
+ var _e = "error";
689
+ var _hE = "httpError";
690
+ var _m = "message";
691
+ var _pDLT = "policyDescriptorListType";
692
+ var _s = "smithy.ts.sdk.synthetic.com.amazonaws.sts";
693
+ var _tLT = "tagListType";
694
+ var n0 = "com.amazonaws.sts";
695
+ var _s_registry = TypeRegistry.for(_s);
696
+ var STSServiceException$ = [-3, _s, "STSServiceException", 0, [], []];
697
+ _s_registry.registerError(STSServiceException$, STSServiceException);
698
+ var n0_registry = TypeRegistry.for(n0);
699
+ var ExpiredTokenException$ = [
700
+ -3,
701
+ n0,
702
+ _ETE,
703
+ { [_aQE]: [`ExpiredTokenException`, 400], [_e]: _c, [_hE]: 400 },
704
+ [_m],
705
+ [0]
706
+ ];
707
+ n0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);
708
+ var IDPCommunicationErrorException$ = [
709
+ -3,
710
+ n0,
711
+ _IDPCEE,
712
+ { [_aQE]: [`IDPCommunicationError`, 400], [_e]: _c, [_hE]: 400 },
713
+ [_m],
714
+ [0]
715
+ ];
716
+ n0_registry.registerError(IDPCommunicationErrorException$, IDPCommunicationErrorException);
717
+ var IDPRejectedClaimException$ = [
718
+ -3,
719
+ n0,
720
+ _IDPRCE,
721
+ { [_aQE]: [`IDPRejectedClaim`, 403], [_e]: _c, [_hE]: 403 },
722
+ [_m],
723
+ [0]
724
+ ];
725
+ n0_registry.registerError(IDPRejectedClaimException$, IDPRejectedClaimException);
726
+ var InvalidIdentityTokenException$ = [
727
+ -3,
728
+ n0,
729
+ _IITE,
730
+ { [_aQE]: [`InvalidIdentityToken`, 400], [_e]: _c, [_hE]: 400 },
731
+ [_m],
732
+ [0]
733
+ ];
734
+ n0_registry.registerError(InvalidIdentityTokenException$, InvalidIdentityTokenException);
735
+ var MalformedPolicyDocumentException$ = [
736
+ -3,
737
+ n0,
738
+ _MPDE,
739
+ { [_aQE]: [`MalformedPolicyDocument`, 400], [_e]: _c, [_hE]: 400 },
740
+ [_m],
741
+ [0]
742
+ ];
743
+ n0_registry.registerError(MalformedPolicyDocumentException$, MalformedPolicyDocumentException);
744
+ var PackedPolicyTooLargeException$ = [
745
+ -3,
746
+ n0,
747
+ _PPTLE,
748
+ { [_aQE]: [`PackedPolicyTooLarge`, 400], [_e]: _c, [_hE]: 400 },
749
+ [_m],
750
+ [0]
751
+ ];
752
+ n0_registry.registerError(PackedPolicyTooLargeException$, PackedPolicyTooLargeException);
753
+ var RegionDisabledException$ = [
754
+ -3,
755
+ n0,
756
+ _RDE,
757
+ { [_aQE]: [`RegionDisabledException`, 403], [_e]: _c, [_hE]: 403 },
758
+ [_m],
759
+ [0]
760
+ ];
761
+ n0_registry.registerError(RegionDisabledException$, RegionDisabledException);
762
+ var errorTypeRegistries = [
763
+ _s_registry,
764
+ n0_registry
765
+ ];
766
+ var accessKeySecretType = [0, n0, _aKST, 8, 0];
767
+ var clientTokenType = [0, n0, _cTT, 8, 0];
768
+ var AssumedRoleUser$ = [
769
+ 3,
770
+ n0,
771
+ _ARU,
772
+ 0,
773
+ [_ARI, _A],
774
+ [0, 0],
775
+ 2
776
+ ];
777
+ var AssumeRoleRequest$ = [
778
+ 3,
779
+ n0,
780
+ _ARR,
781
+ 0,
782
+ [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],
783
+ [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType],
784
+ 2
785
+ ];
786
+ var AssumeRoleResponse$ = [
787
+ 3,
788
+ n0,
789
+ _ARRs,
790
+ 0,
791
+ [_C, _ARU, _PPS, _SI],
792
+ [[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0]
793
+ ];
794
+ var AssumeRoleWithWebIdentityRequest$ = [
795
+ 3,
796
+ n0,
797
+ _ARWWIR,
798
+ 0,
799
+ [_RA, _RSN, _WIT, _PI, _PA, _P, _DS],
800
+ [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1],
801
+ 3
802
+ ];
803
+ var AssumeRoleWithWebIdentityResponse$ = [
804
+ 3,
805
+ n0,
806
+ _ARWWIRs,
807
+ 0,
808
+ [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
809
+ [[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0]
810
+ ];
811
+ var Credentials$ = [
812
+ 3,
813
+ n0,
814
+ _C,
815
+ 0,
816
+ [_AKI, _SAK, _ST, _E],
817
+ [0, [() => accessKeySecretType, 0], 0, 4],
818
+ 4
819
+ ];
820
+ var PolicyDescriptorType$ = [
821
+ 3,
822
+ n0,
823
+ _PDT,
824
+ 0,
825
+ [_a],
826
+ [0]
827
+ ];
828
+ var ProvidedContext$ = [
829
+ 3,
830
+ n0,
831
+ _PCr,
832
+ 0,
833
+ [_PAr, _CA],
834
+ [0, 0]
835
+ ];
836
+ var Tag$ = [
837
+ 3,
838
+ n0,
839
+ _Ta,
840
+ 0,
841
+ [_K, _V],
842
+ [0, 0],
843
+ 2
844
+ ];
845
+ var policyDescriptorListType = [
846
+ 1,
847
+ n0,
848
+ _pDLT,
849
+ 0,
850
+ () => PolicyDescriptorType$
851
+ ];
852
+ var ProvidedContextsListType = [
853
+ 1,
854
+ n0,
855
+ _PCLT,
856
+ 0,
857
+ () => ProvidedContext$
858
+ ];
859
+ var tagKeyListType = 64 | 0;
860
+ var tagListType = [
861
+ 1,
862
+ n0,
863
+ _tLT,
864
+ 0,
865
+ () => Tag$
866
+ ];
867
+ var AssumeRole$ = [
868
+ 9,
869
+ n0,
870
+ _AR,
871
+ 0,
872
+ () => AssumeRoleRequest$,
873
+ () => AssumeRoleResponse$
874
+ ];
875
+ var AssumeRoleWithWebIdentity$ = [
876
+ 9,
877
+ n0,
878
+ _ARWWI,
879
+ 0,
880
+ () => AssumeRoleWithWebIdentityRequest$,
881
+ () => AssumeRoleWithWebIdentityResponse$
882
+ ];
883
+
884
+ // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js
885
+ var getRuntimeConfig = (config) => {
886
+ return {
887
+ apiVersion: "2011-06-15",
888
+ base64Decoder: config?.base64Decoder ?? fromBase64,
889
+ base64Encoder: config?.base64Encoder ?? toBase64,
890
+ disableHostPrefix: config?.disableHostPrefix ?? false,
891
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
892
+ extensions: config?.extensions ?? [],
893
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSTSHttpAuthSchemeProvider,
894
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
895
+ {
896
+ schemeId: "aws.auth#sigv4",
897
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
898
+ signer: new AwsSdkSigV4Signer()
899
+ },
900
+ {
901
+ schemeId: "aws.auth#sigv4a",
902
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
903
+ signer: new AwsSdkSigV4ASigner()
904
+ },
905
+ {
906
+ schemeId: "smithy.api#noAuth",
907
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
908
+ signer: new NoAuthSigner()
909
+ }
910
+ ],
911
+ logger: config?.logger ?? new NoOpLogger(),
912
+ protocol: config?.protocol ?? AwsQueryProtocol,
913
+ protocolSettings: config?.protocolSettings ?? {
914
+ defaultNamespace: "com.amazonaws.sts",
915
+ errorTypeRegistries,
916
+ xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
917
+ version: "2011-06-15",
918
+ serviceTarget: "AWSSecurityTokenServiceV20110615"
919
+ },
920
+ serviceId: config?.serviceId ?? "STS",
921
+ signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion,
922
+ urlParser: config?.urlParser ?? parseUrl,
923
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
924
+ utf8Encoder: config?.utf8Encoder ?? toUtf8
925
+ };
926
+ };
927
+
928
+ // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js
929
+ var getRuntimeConfig2 = (config) => {
930
+ emitWarningIfUnsupportedVersion2(process.version);
931
+ const defaultsMode = resolveDefaultsModeConfig(config);
932
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
933
+ const clientSharedValues = getRuntimeConfig(config);
934
+ emitWarningIfUnsupportedVersion(process.version);
935
+ const loaderConfig = {
936
+ profile: config?.profile,
937
+ logger: clientSharedValues.logger
938
+ };
939
+ return {
940
+ ...clientSharedValues,
941
+ ...config,
942
+ runtime: "node",
943
+ defaultsMode,
944
+ authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
945
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
946
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }),
947
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
948
+ {
949
+ schemeId: "aws.auth#sigv4",
950
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()),
951
+ signer: new AwsSdkSigV4Signer()
952
+ },
953
+ {
954
+ schemeId: "aws.auth#sigv4a",
955
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
956
+ signer: new AwsSdkSigV4ASigner()
957
+ },
958
+ {
959
+ schemeId: "smithy.api#noAuth",
960
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
961
+ signer: new NoAuthSigner()
962
+ }
963
+ ],
964
+ maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
965
+ region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
966
+ requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
967
+ retryMode: config?.retryMode ?? loadConfig({
968
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
969
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
970
+ }, config),
971
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
972
+ sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? loadConfig(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
973
+ streamCollector: config?.streamCollector ?? streamCollector,
974
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
975
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
976
+ userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
977
+ };
978
+ };
979
+
980
+ // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthExtensionConfiguration.js
981
+ var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
982
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
983
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
984
+ let _credentials = runtimeConfig.credentials;
985
+ return {
986
+ setHttpAuthScheme(httpAuthScheme) {
987
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
988
+ if (index === -1) {
989
+ _httpAuthSchemes.push(httpAuthScheme);
990
+ } else {
991
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
992
+ }
993
+ },
994
+ httpAuthSchemes() {
995
+ return _httpAuthSchemes;
996
+ },
997
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
998
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
999
+ },
1000
+ httpAuthSchemeProvider() {
1001
+ return _httpAuthSchemeProvider;
1002
+ },
1003
+ setCredentials(credentials) {
1004
+ _credentials = credentials;
1005
+ },
1006
+ credentials() {
1007
+ return _credentials;
1008
+ }
1009
+ };
1010
+ };
1011
+ var resolveHttpAuthRuntimeConfig = (config) => {
1012
+ return {
1013
+ httpAuthSchemes: config.httpAuthSchemes(),
1014
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
1015
+ credentials: config.credentials()
1016
+ };
1017
+ };
1018
+
1019
+ // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js
1020
+ var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
1021
+ const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
1022
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
1023
+ return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
1024
+ };
1025
+
1026
+ // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js
1027
+ var STSClient = class extends Client {
1028
+ config;
1029
+ constructor(...[configuration]) {
1030
+ const _config_0 = getRuntimeConfig2(configuration || {});
1031
+ super(_config_0);
1032
+ this.initConfig = _config_0;
1033
+ const _config_1 = resolveClientEndpointParameters(_config_0);
1034
+ const _config_2 = resolveUserAgentConfig(_config_1);
1035
+ const _config_3 = resolveRetryConfig(_config_2);
1036
+ const _config_4 = resolveRegionConfig(_config_3);
1037
+ const _config_5 = resolveHostHeaderConfig(_config_4);
1038
+ const _config_6 = resolveEndpointConfig(_config_5);
1039
+ const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
1040
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
1041
+ this.config = _config_8;
1042
+ this.middlewareStack.use(getSchemaSerdePlugin(this.config));
1043
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
1044
+ this.middlewareStack.use(getRetryPlugin(this.config));
1045
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
1046
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
1047
+ this.middlewareStack.use(getLoggerPlugin(this.config));
1048
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
1049
+ this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
1050
+ httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider,
1051
+ identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
1052
+ "aws.auth#sigv4": config.credentials,
1053
+ "aws.auth#sigv4a": config.credentials
1054
+ })
1055
+ }));
1056
+ this.middlewareStack.use(getHttpSigningPlugin(this.config));
1057
+ }
1058
+ destroy() {
1059
+ super.destroy();
1060
+ }
1061
+ };
1062
+
1063
+ // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js
1064
+ var AssumeRoleCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o2) {
1065
+ return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
1066
+ }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").sc(AssumeRole$).build() {
1067
+ };
1068
+
1069
+ // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js
1070
+ var AssumeRoleWithWebIdentityCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o2) {
1071
+ return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
1072
+ }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").sc(AssumeRoleWithWebIdentity$).build() {
1073
+ };
1074
+
1075
+ // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js
1076
+ var commands = {
1077
+ AssumeRoleCommand,
1078
+ AssumeRoleWithWebIdentityCommand
1079
+ };
1080
+ var STS = class extends STSClient {
1081
+ };
1082
+ createAggregatedClient(commands, STS);
1083
+
1084
+ // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js
1085
+ var getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
1086
+ if (typeof assumedRoleUser?.Arn === "string") {
1087
+ const arnComponents = assumedRoleUser.Arn.split(":");
1088
+ if (arnComponents.length > 4 && arnComponents[4] !== "") {
1089
+ return arnComponents[4];
1090
+ }
1091
+ }
1092
+ return void 0;
1093
+ };
1094
+ var resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
1095
+ const region = typeof _region === "function" ? await _region() : _region;
1096
+ const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
1097
+ let stsDefaultRegion = "";
1098
+ const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await stsRegionDefaultResolver(loaderConfig)());
1099
+ credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);
1100
+ return resolvedRegion;
1101
+ };
1102
+ var getDefaultRoleAssumer = (stsOptions, STSClient2) => {
1103
+ let stsClient;
1104
+ let closureSourceCreds;
1105
+ return async (sourceCreds, params) => {
1106
+ closureSourceCreds = sourceCreds;
1107
+ if (!stsClient) {
1108
+ const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
1109
+ const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
1110
+ logger,
1111
+ profile
1112
+ });
1113
+ const isCompatibleRequestHandler = !isH2(requestHandler);
1114
+ stsClient = new STSClient2({
1115
+ ...stsOptions,
1116
+ userAgentAppId,
1117
+ profile,
1118
+ credentialDefaultProvider: () => async () => closureSourceCreds,
1119
+ region: resolvedRegion,
1120
+ requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
1121
+ logger
1122
+ });
1123
+ }
1124
+ const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));
1125
+ if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
1126
+ throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
1127
+ }
1128
+ const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
1129
+ const credentials = {
1130
+ accessKeyId: Credentials.AccessKeyId,
1131
+ secretAccessKey: Credentials.SecretAccessKey,
1132
+ sessionToken: Credentials.SessionToken,
1133
+ expiration: Credentials.Expiration,
1134
+ ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
1135
+ ...accountId && { accountId }
1136
+ };
1137
+ setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
1138
+ return credentials;
1139
+ };
1140
+ };
1141
+ var getDefaultRoleAssumerWithWebIdentity = (stsOptions, STSClient2) => {
1142
+ let stsClient;
1143
+ return async (params) => {
1144
+ if (!stsClient) {
1145
+ const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
1146
+ const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
1147
+ logger,
1148
+ profile
1149
+ });
1150
+ const isCompatibleRequestHandler = !isH2(requestHandler);
1151
+ stsClient = new STSClient2({
1152
+ ...stsOptions,
1153
+ userAgentAppId,
1154
+ profile,
1155
+ region: resolvedRegion,
1156
+ requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
1157
+ logger
1158
+ });
1159
+ }
1160
+ const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
1161
+ if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
1162
+ throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
1163
+ }
1164
+ const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
1165
+ const credentials = {
1166
+ accessKeyId: Credentials.AccessKeyId,
1167
+ secretAccessKey: Credentials.SecretAccessKey,
1168
+ sessionToken: Credentials.SessionToken,
1169
+ expiration: Credentials.Expiration,
1170
+ ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
1171
+ ...accountId && { accountId }
1172
+ };
1173
+ if (accountId) {
1174
+ setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
1175
+ }
1176
+ setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
1177
+ return credentials;
1178
+ };
1179
+ };
1180
+ var isH2 = (requestHandler) => {
1181
+ return requestHandler?.metadata?.handlerProtocol === "h2";
1182
+ };
1183
+
1184
+ // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultRoleAssumers.js
1185
+ var getCustomizableStsClientCtor = (baseCtor, customizations) => {
1186
+ if (!customizations)
1187
+ return baseCtor;
1188
+ else
1189
+ return class CustomizableSTSClient extends baseCtor {
1190
+ constructor(config) {
1191
+ super(config);
1192
+ for (const customization of customizations) {
1193
+ this.middlewareStack.use(customization);
1194
+ }
1195
+ }
1196
+ };
1197
+ };
1198
+ var getDefaultRoleAssumer2 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
1199
+ var getDefaultRoleAssumerWithWebIdentity2 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
1200
+ var decorateDefaultCredentialProvider = (provider) => (input) => provider({
1201
+ roleAssumer: getDefaultRoleAssumer2(input),
1202
+ roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input),
1203
+ ...input
1204
+ });
1205
+ export {
1206
+ Command as $Command,
1207
+ AssumeRole$,
1208
+ AssumeRoleCommand,
1209
+ AssumeRoleRequest$,
1210
+ AssumeRoleResponse$,
1211
+ AssumeRoleWithWebIdentity$,
1212
+ AssumeRoleWithWebIdentityCommand,
1213
+ AssumeRoleWithWebIdentityRequest$,
1214
+ AssumeRoleWithWebIdentityResponse$,
1215
+ AssumedRoleUser$,
1216
+ Credentials$,
1217
+ ExpiredTokenException,
1218
+ ExpiredTokenException$,
1219
+ IDPCommunicationErrorException,
1220
+ IDPCommunicationErrorException$,
1221
+ IDPRejectedClaimException,
1222
+ IDPRejectedClaimException$,
1223
+ InvalidIdentityTokenException,
1224
+ InvalidIdentityTokenException$,
1225
+ MalformedPolicyDocumentException,
1226
+ MalformedPolicyDocumentException$,
1227
+ PackedPolicyTooLargeException,
1228
+ PackedPolicyTooLargeException$,
1229
+ PolicyDescriptorType$,
1230
+ ProvidedContext$,
1231
+ RegionDisabledException,
1232
+ RegionDisabledException$,
1233
+ STS,
1234
+ STSClient,
1235
+ STSServiceException,
1236
+ STSServiceException$,
1237
+ Tag$,
1238
+ Client as __Client,
1239
+ decorateDefaultCredentialProvider,
1240
+ errorTypeRegistries,
1241
+ getDefaultRoleAssumer2 as getDefaultRoleAssumer,
1242
+ getDefaultRoleAssumerWithWebIdentity2 as getDefaultRoleAssumerWithWebIdentity
1243
+ };
1244
+ //# sourceMappingURL=sts-7N7QMJRQ.js.map