@monorise/react 8.0.0-dev.0 → 8.0.0-dev.1

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