@rharkor/caching-for-turbo 2.4.2 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,8 @@ export const modules = {
8
8
  var __webpack_unused_export__;
9
9
 
10
10
 
11
- var config = __webpack_require__(47291);
11
+ var propertyProvider = __webpack_require__(71238);
12
+ var sharedIniFileLoader = __webpack_require__(94964);
12
13
  var client = __webpack_require__(5152);
13
14
  var tokenProviders = __webpack_require__(75433);
14
15
 
@@ -37,7 +38,7 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
37
38
  };
38
39
  }
39
40
  catch (e) {
40
- throw new config.CredentialsProviderError(e.message, {
41
+ throw new propertyProvider.CredentialsProviderError(e.message, {
41
42
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
42
43
  logger,
43
44
  });
@@ -45,17 +46,17 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
45
46
  }
46
47
  else {
47
48
  try {
48
- token = await config.getSSOTokenFromFile(ssoStartUrl);
49
+ token = await sharedIniFileLoader.getSSOTokenFromFile(ssoStartUrl);
49
50
  }
50
51
  catch (e) {
51
- throw new config.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
52
+ throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
52
53
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
53
54
  logger,
54
55
  });
55
56
  }
56
57
  }
57
58
  if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
58
- throw new config.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
59
+ throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
59
60
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
60
61
  logger,
61
62
  });
@@ -77,14 +78,14 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
77
78
  }));
78
79
  }
79
80
  catch (e) {
80
- throw new config.CredentialsProviderError(e, {
81
+ throw new propertyProvider.CredentialsProviderError(e, {
81
82
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
82
83
  logger,
83
84
  });
84
85
  }
85
86
  const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}, } = ssoResp;
86
87
  if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {
87
- throw new config.CredentialsProviderError("SSO returns an invalid temporary credential.", {
88
+ throw new propertyProvider.CredentialsProviderError("SSO returns an invalid temporary credential.", {
88
89
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
89
90
  logger,
90
91
  });
@@ -109,7 +110,7 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
109
110
  const validateSsoProfile = (profile, logger) => {
110
111
  const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
111
112
  if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
112
- throw new config.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", ` +
113
+ throw new propertyProvider.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", ` +
113
114
  `"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });
114
115
  }
115
116
  return profile;
@@ -119,32 +120,32 @@ const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
119
120
  init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");
120
121
  const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
121
122
  const { ssoClient } = init;
122
- const profileName = config.getProfileName({
123
+ const profileName = sharedIniFileLoader.getProfileName({
123
124
  profile: init.profile ?? callerClientConfig?.profile,
124
125
  });
125
126
  if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
126
- const profiles = await config.parseKnownFiles(init);
127
+ const profiles = await sharedIniFileLoader.parseKnownFiles(init);
127
128
  const profile = profiles[profileName];
128
129
  if (!profile) {
129
- throw new config.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
130
+ throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
130
131
  }
131
132
  if (!isSsoProfile(profile)) {
132
- throw new config.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
133
+ throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
133
134
  logger: init.logger,
134
135
  });
135
136
  }
136
137
  if (profile?.sso_session) {
137
- const ssoSessions = await config.loadSsoSessionData(init);
138
+ const ssoSessions = await sharedIniFileLoader.loadSsoSessionData(init);
138
139
  const session = ssoSessions[profile.sso_session];
139
140
  const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;
140
141
  if (ssoRegion && ssoRegion !== session.sso_region) {
141
- throw new config.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
142
+ throw new propertyProvider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
142
143
  tryNextLink: false,
143
144
  logger: init.logger,
144
145
  });
145
146
  }
146
147
  if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {
147
- throw new config.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
148
+ throw new propertyProvider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
148
149
  tryNextLink: false,
149
150
  logger: init.logger,
150
151
  });
@@ -171,7 +172,7 @@ const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
171
172
  });
172
173
  }
173
174
  else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
174
- throw new config.CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include " +
175
+ throw new propertyProvider.CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include " +
175
176
  '"ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init.logger });
176
177
  }
177
178
  else {
@@ -216,40 +217,24 @@ exports.SSOClient = sso.SSOClient;
216
217
 
217
218
  /***/ }),
218
219
 
219
- /***/ 32579:
220
+ /***/ 97452:
220
221
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
221
222
 
222
223
 
223
-
224
- var middlewareHostHeader = __webpack_require__(52590);
225
- var middlewareLogger = __webpack_require__(85242);
226
- var middlewareRecursionDetection = __webpack_require__(81568);
227
- var middlewareUserAgent = __webpack_require__(32959);
228
- var core = __webpack_require__(90402);
229
- var client = __webpack_require__(92658);
230
- var config = __webpack_require__(47291);
231
- var endpoints = __webpack_require__(62085);
232
- var protocols = __webpack_require__(93422);
233
- var retry = __webpack_require__(23609);
234
- var schema = __webpack_require__(26890);
235
- var httpAuthSchemes = __webpack_require__(97523);
236
- var client$1 = __webpack_require__(5152);
237
- var utilUserAgentNode = __webpack_require__(51656);
238
- var serde = __webpack_require__(92430);
239
- var nodeHttpHandler = __webpack_require__(61279);
240
- var protocols$1 = __webpack_require__(37288);
241
- var utilEndpoints = __webpack_require__(83068);
242
- var regionConfigResolver = __webpack_require__(36463);
243
-
224
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
225
+ exports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = void 0;
226
+ const httpAuthSchemes_1 = __webpack_require__(97523);
227
+ const util_middleware_1 = __webpack_require__(76324);
244
228
  const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
245
229
  return {
246
- operation: client.getSmithyContext(context).operation,
247
- region: (await client.normalizeProvider(config.region)()) ||
230
+ operation: (0, util_middleware_1.getSmithyContext)(context).operation,
231
+ region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
248
232
  (() => {
249
233
  throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
250
234
  })(),
251
235
  };
252
236
  };
237
+ exports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider;
253
238
  function createAwsAuthSigv4HttpAuthOption(authParameters) {
254
239
  return {
255
240
  schemeId: "aws.auth#sigv4",
@@ -274,7 +259,7 @@ const defaultSSOHttpAuthSchemeProvider = (authParameters) => {
274
259
  const options = [];
275
260
  switch (authParameters.operation) {
276
261
  case "GetRoleCredentials": {
277
- options.push(createSmithyApiNoAuthHttpAuthOption());
262
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
278
263
  break;
279
264
  }
280
265
  default: {
@@ -283,31 +268,25 @@ const defaultSSOHttpAuthSchemeProvider = (authParameters) => {
283
268
  }
284
269
  return options;
285
270
  };
271
+ exports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider;
286
272
  const resolveHttpAuthSchemeConfig = (config) => {
287
- const config_0 = httpAuthSchemes.resolveAwsSdkSigV4Config(config);
273
+ const config_0 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4Config)(config);
288
274
  return Object.assign(config_0, {
289
- authSchemePreference: client.normalizeProvider(config.authSchemePreference ?? []),
275
+ authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),
290
276
  });
291
277
  };
278
+ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
292
279
 
293
- const resolveClientEndpointParameters = (options) => {
294
- return Object.assign(options, {
295
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
296
- useFipsEndpoint: options.useFipsEndpoint ?? false,
297
- defaultSigningName: "awsssoportal",
298
- });
299
- };
300
- const commonParams = {
301
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
302
- Endpoint: { type: "builtInParams", name: "endpoint" },
303
- Region: { type: "builtInParams", name: "region" },
304
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
305
- };
306
280
 
307
- var version = "3.997.7";
308
- var packageInfo = {
309
- version: version};
281
+ /***/ }),
282
+
283
+ /***/ 49239:
284
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
285
+
310
286
 
287
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
288
+ exports.bdd = void 0;
289
+ const util_endpoints_1 = __webpack_require__(79674);
311
290
  const k = "ref";
312
291
  const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [k]: "Endpoint" }, h = { [k]: d }, i = {}, j = [{ [k]: "Region" }];
313
292
  const _data = {
@@ -383,28 +362,230 @@ const nodes = new Int32Array([
383
362
  r + 2,
384
363
  r + 3,
385
364
  ]);
386
- const bdd = endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
365
+ exports.bdd = util_endpoints_1.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
366
+
367
+
368
+ /***/ }),
369
+
370
+ /***/ 85074:
371
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
372
+
387
373
 
388
- const cache = new endpoints.EndpointCache({
374
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
375
+ exports.defaultEndpointResolver = void 0;
376
+ const util_endpoints_1 = __webpack_require__(83068);
377
+ const util_endpoints_2 = __webpack_require__(79674);
378
+ const bdd_1 = __webpack_require__(49239);
379
+ const cache = new util_endpoints_2.EndpointCache({
389
380
  size: 50,
390
381
  params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
391
382
  });
392
383
  const defaultEndpointResolver = (endpointParams, context = {}) => {
393
- return cache.get(endpointParams, () => endpoints.decideEndpoint(bdd, {
384
+ return cache.get(endpointParams, () => (0, util_endpoints_2.decideEndpoint)(bdd_1.bdd, {
394
385
  endpointParams: endpointParams,
395
386
  logger: context.logger,
396
387
  }));
397
388
  };
398
- endpoints.customEndpointFunctions.aws = utilEndpoints.awsEndpointFunctions;
389
+ exports.defaultEndpointResolver = defaultEndpointResolver;
390
+ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
391
+
392
+
393
+ /***/ }),
394
+
395
+ /***/ 32579:
396
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
397
+
398
+
399
+
400
+ var middlewareHostHeader = __webpack_require__(52590);
401
+ var middlewareLogger = __webpack_require__(85242);
402
+ var middlewareRecursionDetection = __webpack_require__(81568);
403
+ var middlewareUserAgent = __webpack_require__(32959);
404
+ var configResolver = __webpack_require__(39316);
405
+ var core = __webpack_require__(90402);
406
+ var schema = __webpack_require__(26890);
407
+ var middlewareContentLength = __webpack_require__(47212);
408
+ var middlewareEndpoint = __webpack_require__(40099);
409
+ var middlewareRetry = __webpack_require__(19618);
410
+ var smithyClient = __webpack_require__(61411);
411
+ var httpAuthSchemeProvider = __webpack_require__(97452);
412
+ var runtimeConfig = __webpack_require__(85541);
413
+ var regionConfigResolver = __webpack_require__(36463);
414
+ var protocolHttp = __webpack_require__(72356);
415
+ var schemas_0 = __webpack_require__(52167);
416
+ var errors = __webpack_require__(24483);
417
+ var SSOServiceException = __webpack_require__(69849);
418
+
419
+ const resolveClientEndpointParameters = (options) => {
420
+ return Object.assign(options, {
421
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
422
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
423
+ defaultSigningName: "awsssoportal",
424
+ });
425
+ };
426
+ const commonParams = {
427
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
428
+ Endpoint: { type: "builtInParams", name: "endpoint" },
429
+ Region: { type: "builtInParams", name: "region" },
430
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
431
+ };
432
+
433
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
434
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
435
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
436
+ let _credentials = runtimeConfig.credentials;
437
+ return {
438
+ setHttpAuthScheme(httpAuthScheme) {
439
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
440
+ if (index === -1) {
441
+ _httpAuthSchemes.push(httpAuthScheme);
442
+ }
443
+ else {
444
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
445
+ }
446
+ },
447
+ httpAuthSchemes() {
448
+ return _httpAuthSchemes;
449
+ },
450
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
451
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
452
+ },
453
+ httpAuthSchemeProvider() {
454
+ return _httpAuthSchemeProvider;
455
+ },
456
+ setCredentials(credentials) {
457
+ _credentials = credentials;
458
+ },
459
+ credentials() {
460
+ return _credentials;
461
+ },
462
+ };
463
+ };
464
+ const resolveHttpAuthRuntimeConfig = (config) => {
465
+ return {
466
+ httpAuthSchemes: config.httpAuthSchemes(),
467
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
468
+ credentials: config.credentials(),
469
+ };
470
+ };
471
+
472
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
473
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
474
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
475
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
476
+ };
399
477
 
400
- class SSOServiceException extends client.ServiceException {
478
+ class SSOClient extends smithyClient.Client {
479
+ config;
480
+ constructor(...[configuration]) {
481
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
482
+ super(_config_0);
483
+ this.initConfig = _config_0;
484
+ const _config_1 = resolveClientEndpointParameters(_config_0);
485
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
486
+ const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
487
+ const _config_4 = configResolver.resolveRegionConfig(_config_3);
488
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
489
+ const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
490
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
491
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
492
+ this.config = _config_8;
493
+ this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
494
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
495
+ this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
496
+ this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
497
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
498
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
499
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
500
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
501
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider,
502
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
503
+ "aws.auth#sigv4": config.credentials,
504
+ }),
505
+ }));
506
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
507
+ }
508
+ destroy() {
509
+ super.destroy();
510
+ }
511
+ }
512
+
513
+ class GetRoleCredentialsCommand extends smithyClient.Command
514
+ .classBuilder()
515
+ .ep(commonParams)
516
+ .m(function (Command, cs, config, o) {
517
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
518
+ })
519
+ .s("SWBPortalService", "GetRoleCredentials", {})
520
+ .n("SSOClient", "GetRoleCredentialsCommand")
521
+ .sc(schemas_0.GetRoleCredentials$)
522
+ .build() {
523
+ }
524
+
525
+ const commands = {
526
+ GetRoleCredentialsCommand,
527
+ };
528
+ class SSO extends SSOClient {
529
+ }
530
+ smithyClient.createAggregatedClient(commands, SSO);
531
+
532
+ exports.$Command = smithyClient.Command;
533
+ exports.__Client = smithyClient.Client;
534
+ exports.SSOServiceException = SSOServiceException.SSOServiceException;
535
+ exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;
536
+ exports.SSO = SSO;
537
+ exports.SSOClient = SSOClient;
538
+ Object.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&
539
+ !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
540
+ Object.defineProperty(exports, '__proto__', {
541
+ enumerable: true,
542
+ value: schemas_0['__proto__']
543
+ });
544
+
545
+ Object.keys(schemas_0).forEach(function (k) {
546
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];
547
+ });
548
+ Object.prototype.hasOwnProperty.call(errors, '__proto__') &&
549
+ !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
550
+ Object.defineProperty(exports, '__proto__', {
551
+ enumerable: true,
552
+ value: errors['__proto__']
553
+ });
554
+
555
+ Object.keys(errors).forEach(function (k) {
556
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];
557
+ });
558
+
559
+
560
+ /***/ }),
561
+
562
+ /***/ 69849:
563
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
564
+
565
+
566
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
567
+ exports.SSOServiceException = exports.__ServiceException = void 0;
568
+ const smithy_client_1 = __webpack_require__(61411);
569
+ Object.defineProperty(exports, "__ServiceException", ({ enumerable: true, get: function () { return smithy_client_1.ServiceException; } }));
570
+ class SSOServiceException extends smithy_client_1.ServiceException {
401
571
  constructor(options) {
402
572
  super(options);
403
573
  Object.setPrototypeOf(this, SSOServiceException.prototype);
404
574
  }
405
575
  }
576
+ exports.SSOServiceException = SSOServiceException;
577
+
578
+
579
+ /***/ }),
580
+
581
+ /***/ 24483:
582
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
406
583
 
407
- class InvalidRequestException extends SSOServiceException {
584
+
585
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
586
+ exports.UnauthorizedException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InvalidRequestException = void 0;
587
+ const SSOServiceException_1 = __webpack_require__(69849);
588
+ class InvalidRequestException extends SSOServiceException_1.SSOServiceException {
408
589
  name = "InvalidRequestException";
409
590
  $fault = "client";
410
591
  constructor(opts) {
@@ -416,7 +597,8 @@ class InvalidRequestException extends SSOServiceException {
416
597
  Object.setPrototypeOf(this, InvalidRequestException.prototype);
417
598
  }
418
599
  }
419
- class ResourceNotFoundException extends SSOServiceException {
600
+ exports.InvalidRequestException = InvalidRequestException;
601
+ class ResourceNotFoundException extends SSOServiceException_1.SSOServiceException {
420
602
  name = "ResourceNotFoundException";
421
603
  $fault = "client";
422
604
  constructor(opts) {
@@ -428,7 +610,8 @@ class ResourceNotFoundException extends SSOServiceException {
428
610
  Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
429
611
  }
430
612
  }
431
- class TooManyRequestsException extends SSOServiceException {
613
+ exports.ResourceNotFoundException = ResourceNotFoundException;
614
+ class TooManyRequestsException extends SSOServiceException_1.SSOServiceException {
432
615
  name = "TooManyRequestsException";
433
616
  $fault = "client";
434
617
  constructor(opts) {
@@ -440,7 +623,8 @@ class TooManyRequestsException extends SSOServiceException {
440
623
  Object.setPrototypeOf(this, TooManyRequestsException.prototype);
441
624
  }
442
625
  }
443
- class UnauthorizedException extends SSOServiceException {
626
+ exports.TooManyRequestsException = TooManyRequestsException;
627
+ class UnauthorizedException extends SSOServiceException_1.SSOServiceException {
444
628
  name = "UnauthorizedException";
445
629
  $fault = "client";
446
630
  constructor(opts) {
@@ -452,7 +636,134 @@ class UnauthorizedException extends SSOServiceException {
452
636
  Object.setPrototypeOf(this, UnauthorizedException.prototype);
453
637
  }
454
638
  }
639
+ exports.UnauthorizedException = UnauthorizedException;
640
+
641
+
642
+ /***/ }),
455
643
 
644
+ /***/ 85541:
645
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
646
+
647
+
648
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
649
+ exports.getRuntimeConfig = void 0;
650
+ const tslib_1 = __webpack_require__(61860);
651
+ const package_json_1 = tslib_1.__importDefault(__webpack_require__(39955));
652
+ const client_1 = __webpack_require__(5152);
653
+ const httpAuthSchemes_1 = __webpack_require__(97523);
654
+ const util_user_agent_node_1 = __webpack_require__(51656);
655
+ const config_resolver_1 = __webpack_require__(39316);
656
+ const hash_node_1 = __webpack_require__(5092);
657
+ const middleware_retry_1 = __webpack_require__(19618);
658
+ const node_config_provider_1 = __webpack_require__(55704);
659
+ const node_http_handler_1 = __webpack_require__(61279);
660
+ const smithy_client_1 = __webpack_require__(61411);
661
+ const util_body_length_node_1 = __webpack_require__(13638);
662
+ const util_defaults_mode_node_1 = __webpack_require__(15435);
663
+ const util_retry_1 = __webpack_require__(15518);
664
+ const runtimeConfig_shared_1 = __webpack_require__(43082);
665
+ const getRuntimeConfig = (config) => {
666
+ (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
667
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
668
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
669
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
670
+ (0, client_1.emitWarningIfUnsupportedVersion)(process.version);
671
+ const loaderConfig = {
672
+ profile: config?.profile,
673
+ logger: clientSharedValues.logger,
674
+ };
675
+ return {
676
+ ...clientSharedValues,
677
+ ...config,
678
+ runtime: "node",
679
+ defaultsMode,
680
+ authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(httpAuthSchemes_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
681
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
682
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
683
+ (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
684
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
685
+ region: config?.region ??
686
+ (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
687
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
688
+ retryMode: config?.retryMode ??
689
+ (0, node_config_provider_1.loadConfig)({
690
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
691
+ default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
692
+ }, config),
693
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
694
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
695
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
696
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
697
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
698
+ };
699
+ };
700
+ exports.getRuntimeConfig = getRuntimeConfig;
701
+
702
+
703
+ /***/ }),
704
+
705
+ /***/ 43082:
706
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
707
+
708
+
709
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
710
+ exports.getRuntimeConfig = void 0;
711
+ const httpAuthSchemes_1 = __webpack_require__(97523);
712
+ const protocols_1 = __webpack_require__(37288);
713
+ const core_1 = __webpack_require__(90402);
714
+ const smithy_client_1 = __webpack_require__(61411);
715
+ const url_parser_1 = __webpack_require__(14494);
716
+ const util_base64_1 = __webpack_require__(68385);
717
+ const util_utf8_1 = __webpack_require__(71577);
718
+ const httpAuthSchemeProvider_1 = __webpack_require__(97452);
719
+ const endpointResolver_1 = __webpack_require__(85074);
720
+ const schemas_0_1 = __webpack_require__(52167);
721
+ const getRuntimeConfig = (config) => {
722
+ return {
723
+ apiVersion: "2019-06-10",
724
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
725
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
726
+ disableHostPrefix: config?.disableHostPrefix ?? false,
727
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
728
+ extensions: config?.extensions ?? [],
729
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider,
730
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
731
+ {
732
+ schemeId: "aws.auth#sigv4",
733
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
734
+ signer: new httpAuthSchemes_1.AwsSdkSigV4Signer(),
735
+ },
736
+ {
737
+ schemeId: "smithy.api#noAuth",
738
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
739
+ signer: new core_1.NoAuthSigner(),
740
+ },
741
+ ],
742
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
743
+ protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
744
+ protocolSettings: config?.protocolSettings ?? {
745
+ defaultNamespace: "com.amazonaws.sso",
746
+ errorTypeRegistries: schemas_0_1.errorTypeRegistries,
747
+ version: "2019-06-10",
748
+ serviceTarget: "SWBPortalService",
749
+ },
750
+ serviceId: config?.serviceId ?? "SSO",
751
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
752
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
753
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
754
+ };
755
+ };
756
+ exports.getRuntimeConfig = getRuntimeConfig;
757
+
758
+
759
+ /***/ }),
760
+
761
+ /***/ 52167:
762
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
763
+
764
+
765
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
766
+ exports.GetRoleCredentials$ = exports.RoleCredentials$ = exports.GetRoleCredentialsResponse$ = exports.GetRoleCredentialsRequest$ = exports.errorTypeRegistries = exports.UnauthorizedException$ = exports.TooManyRequestsException$ = exports.ResourceNotFoundException$ = exports.InvalidRequestException$ = exports.SSOServiceException$ = void 0;
456
767
  const _ATT = "AccessTokenType";
457
768
  const _GRC = "GetRoleCredentials";
458
769
  const _GRCR = "GetRoleCredentialsRequest";
@@ -484,23 +795,26 @@ const _sAK = "secretAccessKey";
484
795
  const _sT = "sessionToken";
485
796
  const _xasbt = "x-amz-sso_bearer_token";
486
797
  const n0 = "com.amazonaws.sso";
487
- const _s_registry = schema.TypeRegistry.for(_s);
488
- var SSOServiceException$ = [-3, _s, "SSOServiceException", 0, [], []];
489
- _s_registry.registerError(SSOServiceException$, SSOServiceException);
490
- const n0_registry = schema.TypeRegistry.for(n0);
491
- var InvalidRequestException$ = [-3, n0, _IRE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];
492
- n0_registry.registerError(InvalidRequestException$, InvalidRequestException);
493
- var ResourceNotFoundException$ = [-3, n0, _RNFE, { [_e]: _c, [_hE]: 404 }, [_m], [0]];
494
- n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
495
- var TooManyRequestsException$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_m], [0]];
496
- n0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);
497
- var UnauthorizedException$ = [-3, n0, _UE, { [_e]: _c, [_hE]: 401 }, [_m], [0]];
498
- n0_registry.registerError(UnauthorizedException$, UnauthorizedException);
499
- const errorTypeRegistries = [_s_registry, n0_registry];
798
+ const schema_1 = __webpack_require__(26890);
799
+ const errors_1 = __webpack_require__(24483);
800
+ const SSOServiceException_1 = __webpack_require__(69849);
801
+ const _s_registry = schema_1.TypeRegistry.for(_s);
802
+ exports.SSOServiceException$ = [-3, _s, "SSOServiceException", 0, [], []];
803
+ _s_registry.registerError(exports.SSOServiceException$, SSOServiceException_1.SSOServiceException);
804
+ const n0_registry = schema_1.TypeRegistry.for(n0);
805
+ exports.InvalidRequestException$ = [-3, n0, _IRE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];
806
+ n0_registry.registerError(exports.InvalidRequestException$, errors_1.InvalidRequestException);
807
+ exports.ResourceNotFoundException$ = [-3, n0, _RNFE, { [_e]: _c, [_hE]: 404 }, [_m], [0]];
808
+ n0_registry.registerError(exports.ResourceNotFoundException$, errors_1.ResourceNotFoundException);
809
+ exports.TooManyRequestsException$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_m], [0]];
810
+ n0_registry.registerError(exports.TooManyRequestsException$, errors_1.TooManyRequestsException);
811
+ exports.UnauthorizedException$ = [-3, n0, _UE, { [_e]: _c, [_hE]: 401 }, [_m], [0]];
812
+ n0_registry.registerError(exports.UnauthorizedException$, errors_1.UnauthorizedException);
813
+ exports.errorTypeRegistries = [_s_registry, n0_registry];
500
814
  var AccessTokenType = [0, n0, _ATT, 8, 0];
501
815
  var SecretAccessKeyType = [0, n0, _SAKT, 8, 0];
502
816
  var SessionTokenType = [0, n0, _STT, 8, 0];
503
- var GetRoleCredentialsRequest$ = [
817
+ exports.GetRoleCredentialsRequest$ = [
504
818
  3,
505
819
  n0,
506
820
  _GRCR,
@@ -513,15 +827,15 @@ var GetRoleCredentialsRequest$ = [
513
827
  ],
514
828
  3,
515
829
  ];
516
- var GetRoleCredentialsResponse$ = [
830
+ exports.GetRoleCredentialsResponse$ = [
517
831
  3,
518
832
  n0,
519
833
  _GRCRe,
520
834
  0,
521
835
  [_rC],
522
- [[() => RoleCredentials$, 0]],
836
+ [[() => exports.RoleCredentials$, 0]],
523
837
  ];
524
- var RoleCredentials$ = [
838
+ exports.RoleCredentials$ = [
525
839
  3,
526
840
  n0,
527
841
  _RC,
@@ -529,207 +843,15 @@ var RoleCredentials$ = [
529
843
  [_aKI, _sAK, _sT, _ex],
530
844
  [0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1],
531
845
  ];
532
- var GetRoleCredentials$ = [
846
+ exports.GetRoleCredentials$ = [
533
847
  9,
534
848
  n0,
535
849
  _GRC,
536
850
  { [_h]: ["GET", "/federation/credentials", 200] },
537
- () => GetRoleCredentialsRequest$,
538
- () => GetRoleCredentialsResponse$,
851
+ () => exports.GetRoleCredentialsRequest$,
852
+ () => exports.GetRoleCredentialsResponse$,
539
853
  ];
540
854
 
541
- const getRuntimeConfig$1 = (config) => {
542
- return {
543
- apiVersion: "2019-06-10",
544
- base64Decoder: config?.base64Decoder ?? serde.fromBase64,
545
- base64Encoder: config?.base64Encoder ?? serde.toBase64,
546
- disableHostPrefix: config?.disableHostPrefix ?? false,
547
- endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
548
- extensions: config?.extensions ?? [],
549
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOHttpAuthSchemeProvider,
550
- httpAuthSchemes: config?.httpAuthSchemes ?? [
551
- {
552
- schemeId: "aws.auth#sigv4",
553
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
554
- signer: new httpAuthSchemes.AwsSdkSigV4Signer(),
555
- },
556
- {
557
- schemeId: "smithy.api#noAuth",
558
- identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
559
- signer: new core.NoAuthSigner(),
560
- },
561
- ],
562
- logger: config?.logger ?? new client.NoOpLogger(),
563
- protocol: config?.protocol ?? protocols$1.AwsRestJsonProtocol,
564
- protocolSettings: config?.protocolSettings ?? {
565
- defaultNamespace: "com.amazonaws.sso",
566
- errorTypeRegistries,
567
- version: "2019-06-10",
568
- serviceTarget: "SWBPortalService",
569
- },
570
- serviceId: config?.serviceId ?? "SSO",
571
- urlParser: config?.urlParser ?? protocols.parseUrl,
572
- utf8Decoder: config?.utf8Decoder ?? serde.fromUtf8,
573
- utf8Encoder: config?.utf8Encoder ?? serde.toUtf8,
574
- };
575
- };
576
-
577
- const getRuntimeConfig = (config$1) => {
578
- client.emitWarningIfUnsupportedVersion(process.version);
579
- const defaultsMode = config.resolveDefaultsModeConfig(config$1);
580
- const defaultConfigProvider = () => defaultsMode().then(client.loadConfigsForDefaultMode);
581
- const clientSharedValues = getRuntimeConfig$1(config$1);
582
- client$1.emitWarningIfUnsupportedVersion(process.version);
583
- const loaderConfig = {
584
- profile: config$1?.profile,
585
- logger: clientSharedValues.logger,
586
- };
587
- return {
588
- ...clientSharedValues,
589
- ...config$1,
590
- runtime: "node",
591
- defaultsMode,
592
- authSchemePreference: config$1?.authSchemePreference ?? config.loadConfig(httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
593
- bodyLengthChecker: config$1?.bodyLengthChecker ?? serde.calculateBodyLength,
594
- defaultUserAgentProvider: config$1?.defaultUserAgentProvider ??
595
- utilUserAgentNode.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
596
- maxAttempts: config$1?.maxAttempts ?? config.loadConfig(retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config$1),
597
- region: config$1?.region ??
598
- config.loadConfig(config.NODE_REGION_CONFIG_OPTIONS, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
599
- requestHandler: nodeHttpHandler.NodeHttpHandler.create(config$1?.requestHandler ?? defaultConfigProvider),
600
- retryMode: config$1?.retryMode ??
601
- config.loadConfig({
602
- ...retry.NODE_RETRY_MODE_CONFIG_OPTIONS,
603
- default: async () => (await defaultConfigProvider()).retryMode || retry.DEFAULT_RETRY_MODE,
604
- }, config$1),
605
- sha256: config$1?.sha256 ?? serde.Hash.bind(null, "sha256"),
606
- streamCollector: config$1?.streamCollector ?? nodeHttpHandler.streamCollector,
607
- useDualstackEndpoint: config$1?.useDualstackEndpoint ?? config.loadConfig(config.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
608
- useFipsEndpoint: config$1?.useFipsEndpoint ?? config.loadConfig(config.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
609
- userAgentAppId: config$1?.userAgentAppId ?? config.loadConfig(utilUserAgentNode.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
610
- };
611
- };
612
-
613
- const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
614
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
615
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
616
- let _credentials = runtimeConfig.credentials;
617
- return {
618
- setHttpAuthScheme(httpAuthScheme) {
619
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
620
- if (index === -1) {
621
- _httpAuthSchemes.push(httpAuthScheme);
622
- }
623
- else {
624
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
625
- }
626
- },
627
- httpAuthSchemes() {
628
- return _httpAuthSchemes;
629
- },
630
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
631
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
632
- },
633
- httpAuthSchemeProvider() {
634
- return _httpAuthSchemeProvider;
635
- },
636
- setCredentials(credentials) {
637
- _credentials = credentials;
638
- },
639
- credentials() {
640
- return _credentials;
641
- },
642
- };
643
- };
644
- const resolveHttpAuthRuntimeConfig = (config) => {
645
- return {
646
- httpAuthSchemes: config.httpAuthSchemes(),
647
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
648
- credentials: config.credentials(),
649
- };
650
- };
651
-
652
- const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
653
- const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
654
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
655
- return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
656
- };
657
-
658
- class SSOClient extends client.Client {
659
- config;
660
- constructor(...[configuration]) {
661
- const _config_0 = getRuntimeConfig(configuration || {});
662
- super(_config_0);
663
- this.initConfig = _config_0;
664
- const _config_1 = resolveClientEndpointParameters(_config_0);
665
- const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
666
- const _config_3 = retry.resolveRetryConfig(_config_2);
667
- const _config_4 = config.resolveRegionConfig(_config_3);
668
- const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
669
- const _config_6 = endpoints.resolveEndpointConfig(_config_5);
670
- const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
671
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
672
- this.config = _config_8;
673
- this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
674
- this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
675
- this.middlewareStack.use(retry.getRetryPlugin(this.config));
676
- this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));
677
- this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
678
- this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
679
- this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
680
- this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
681
- httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider,
682
- identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
683
- "aws.auth#sigv4": config.credentials,
684
- }),
685
- }));
686
- this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
687
- }
688
- destroy() {
689
- super.destroy();
690
- }
691
- }
692
-
693
- class GetRoleCredentialsCommand extends client.Command
694
- .classBuilder()
695
- .ep(commonParams)
696
- .m(function (Command, cs, config, o) {
697
- return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
698
- })
699
- .s("SWBPortalService", "GetRoleCredentials", {})
700
- .n("SSOClient", "GetRoleCredentialsCommand")
701
- .sc(GetRoleCredentials$)
702
- .build() {
703
- }
704
-
705
- const commands = {
706
- GetRoleCredentialsCommand,
707
- };
708
- class SSO extends SSOClient {
709
- }
710
- client.createAggregatedClient(commands, SSO);
711
-
712
- exports.$Command = client.Command;
713
- exports.__Client = client.Client;
714
- exports.GetRoleCredentials$ = GetRoleCredentials$;
715
- exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;
716
- exports.GetRoleCredentialsRequest$ = GetRoleCredentialsRequest$;
717
- exports.GetRoleCredentialsResponse$ = GetRoleCredentialsResponse$;
718
- exports.InvalidRequestException = InvalidRequestException;
719
- exports.InvalidRequestException$ = InvalidRequestException$;
720
- exports.ResourceNotFoundException = ResourceNotFoundException;
721
- exports.ResourceNotFoundException$ = ResourceNotFoundException$;
722
- exports.RoleCredentials$ = RoleCredentials$;
723
- exports.SSO = SSO;
724
- exports.SSOClient = SSOClient;
725
- exports.SSOServiceException = SSOServiceException;
726
- exports.SSOServiceException$ = SSOServiceException$;
727
- exports.TooManyRequestsException = TooManyRequestsException;
728
- exports.TooManyRequestsException$ = TooManyRequestsException$;
729
- exports.UnauthorizedException = UnauthorizedException;
730
- exports.UnauthorizedException$ = UnauthorizedException$;
731
- exports.errorTypeRegistries = errorTypeRegistries;
732
-
733
855
 
734
856
  /***/ }),
735
857
 
@@ -740,17 +862,18 @@ exports.errorTypeRegistries = errorTypeRegistries;
740
862
 
741
863
  var client = __webpack_require__(5152);
742
864
  var httpAuthSchemes = __webpack_require__(97523);
743
- var config = __webpack_require__(47291);
865
+ var propertyProvider = __webpack_require__(71238);
866
+ var sharedIniFileLoader = __webpack_require__(94964);
744
867
  var node_fs = __webpack_require__(73024);
745
868
 
746
869
  const fromEnvSigningName = ({ logger, signingName } = {}) => async () => {
747
870
  logger?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
748
871
  if (!signingName) {
749
- throw new config.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger });
872
+ throw new propertyProvider.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger });
750
873
  }
751
874
  const bearerTokenKey = httpAuthSchemes.getBearerTokenEnvKey(signingName);
752
875
  if (!(bearerTokenKey in process.env)) {
753
- throw new config.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger });
876
+ throw new propertyProvider.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger });
754
877
  }
755
878
  const token = { token: process.env[bearerTokenKey] };
756
879
  client.setTokenFeature(token, "BEARER_SERVICE_ENV_VARS", "3");
@@ -761,7 +884,7 @@ const EXPIRE_WINDOW_MS = 5 * 60 * 1000;
761
884
  const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
762
885
 
763
886
  const getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
764
- const { SSOOIDCClient } = await __webpack_require__.e(/* import() */ 443).then(__webpack_require__.t.bind(__webpack_require__, 89443, 19));
887
+ const { SSOOIDCClient } = await __webpack_require__.e(/* import() */ 443).then(__webpack_require__.t.bind(__webpack_require__, 89443, 23));
765
888
  const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];
766
889
  const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {
767
890
  region: ssoRegion ?? init.clientConfig?.region,
@@ -772,7 +895,7 @@ const getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
772
895
  };
773
896
 
774
897
  const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {
775
- const { CreateTokenCommand } = await __webpack_require__.e(/* import() */ 443).then(__webpack_require__.t.bind(__webpack_require__, 89443, 19));
898
+ const { CreateTokenCommand } = await __webpack_require__.e(/* import() */ 443).then(__webpack_require__.t.bind(__webpack_require__, 89443, 23));
776
899
  const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);
777
900
  return ssoOidcClient.send(new CreateTokenCommand({
778
901
  clientId: ssoToken.clientId,
@@ -784,19 +907,19 @@ const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientCo
784
907
 
785
908
  const validateTokenExpiry = (token) => {
786
909
  if (token.expiration && token.expiration.getTime() < Date.now()) {
787
- throw new config.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
910
+ throw new propertyProvider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
788
911
  }
789
912
  };
790
913
 
791
914
  const validateTokenKey = (key, value, forRefresh = false) => {
792
915
  if (typeof value === "undefined") {
793
- throw new config.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
916
+ throw new propertyProvider.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
794
917
  }
795
918
  };
796
919
 
797
920
  const { writeFile } = node_fs.promises;
798
921
  const writeSSOTokenToFile = (id, ssoToken) => {
799
- const tokenFilepath = config.getSSOTokenFilepath(id);
922
+ const tokenFilepath = sharedIniFileLoader.getSSOTokenFilepath(id);
800
923
  const tokenString = JSON.stringify(ssoToken, null, 2);
801
924
  return writeFile(tokenFilepath, tokenString);
802
925
  };
@@ -804,36 +927,36 @@ const writeSSOTokenToFile = (id, ssoToken) => {
804
927
  const lastRefreshAttemptTime = new Date(0);
805
928
  const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
806
929
  init.logger?.debug("@aws-sdk/token-providers - fromSso");
807
- const profiles = await config.parseKnownFiles(init);
808
- const profileName = config.getProfileName({
930
+ const profiles = await sharedIniFileLoader.parseKnownFiles(init);
931
+ const profileName = sharedIniFileLoader.getProfileName({
809
932
  profile: init.profile ?? callerClientConfig?.profile,
810
933
  });
811
934
  const profile = profiles[profileName];
812
935
  if (!profile) {
813
- throw new config.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
936
+ throw new propertyProvider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
814
937
  }
815
938
  else if (!profile["sso_session"]) {
816
- throw new config.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
939
+ throw new propertyProvider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
817
940
  }
818
941
  const ssoSessionName = profile["sso_session"];
819
- const ssoSessions = await config.loadSsoSessionData(init);
942
+ const ssoSessions = await sharedIniFileLoader.loadSsoSessionData(init);
820
943
  const ssoSession = ssoSessions[ssoSessionName];
821
944
  if (!ssoSession) {
822
- throw new config.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
945
+ throw new propertyProvider.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
823
946
  }
824
947
  for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) {
825
948
  if (!ssoSession[ssoSessionRequiredKey]) {
826
- throw new config.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
949
+ throw new propertyProvider.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
827
950
  }
828
951
  }
829
952
  ssoSession["sso_start_url"];
830
953
  const ssoRegion = ssoSession["sso_region"];
831
954
  let ssoToken;
832
955
  try {
833
- ssoToken = await config.getSSOTokenFromFile(ssoSessionName);
956
+ ssoToken = await sharedIniFileLoader.getSSOTokenFromFile(ssoSessionName);
834
957
  }
835
958
  catch (e) {
836
- throw new config.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
959
+ throw new propertyProvider.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
837
960
  }
838
961
  validateTokenKey("accessToken", ssoToken.accessToken);
839
962
  validateTokenKey("expiresAt", ssoToken.expiresAt);
@@ -879,13 +1002,13 @@ const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
879
1002
  const fromStatic = ({ token, logger }) => async () => {
880
1003
  logger?.debug("@aws-sdk/token-providers - fromStatic");
881
1004
  if (!token || !token.token) {
882
- throw new config.TokenProviderError(`Please pass a valid token to fromStatic`, false);
1005
+ throw new propertyProvider.TokenProviderError(`Please pass a valid token to fromStatic`, false);
883
1006
  }
884
1007
  return token;
885
1008
  };
886
1009
 
887
- const nodeProvider = (init = {}) => config.memoize(config.chain(fromSso(init), async () => {
888
- throw new config.TokenProviderError("Could not load token from any providers", false);
1010
+ const nodeProvider = (init = {}) => propertyProvider.memoize(propertyProvider.chain(fromSso(init), async () => {
1011
+ throw new propertyProvider.TokenProviderError("Could not load token from any providers", false);
889
1012
  }), (token) => token.expiration !== undefined && token.expiration.getTime() - Date.now() < 300000, (token) => token.expiration !== undefined);
890
1013
 
891
1014
  exports.fromEnvSigningName = fromEnvSigningName;
@@ -894,6 +1017,13 @@ exports.fromStatic = fromStatic;
894
1017
  exports.nodeProvider = nodeProvider;
895
1018
 
896
1019
 
1020
+ /***/ }),
1021
+
1022
+ /***/ 39955:
1023
+ /***/ ((module) => {
1024
+
1025
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.997.2","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:types\' \'yarn:build:es\' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"yarn g:turbo run build -F=\\"$npm_package_name\\"","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=20.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.974.4","@aws-sdk/middleware-host-header":"^3.972.10","@aws-sdk/middleware-logger":"^3.972.10","@aws-sdk/middleware-recursion-detection":"^3.972.11","@aws-sdk/middleware-user-agent":"^3.972.34","@aws-sdk/region-config-resolver":"^3.972.13","@aws-sdk/signature-v4-multi-region":"^3.996.21","@aws-sdk/types":"^3.973.8","@aws-sdk/util-endpoints":"^3.996.8","@aws-sdk/util-user-agent-browser":"^3.972.10","@aws-sdk/util-user-agent-node":"^3.973.20","@smithy/config-resolver":"^4.4.17","@smithy/core":"^3.23.16","@smithy/fetch-http-handler":"^5.3.17","@smithy/hash-node":"^4.2.14","@smithy/invalid-dependency":"^4.2.14","@smithy/middleware-content-length":"^4.2.14","@smithy/middleware-endpoint":"^4.4.31","@smithy/middleware-retry":"^4.5.4","@smithy/middleware-serde":"^4.2.19","@smithy/middleware-stack":"^4.2.14","@smithy/node-config-provider":"^4.3.14","@smithy/node-http-handler":"^4.6.0","@smithy/protocol-http":"^5.3.14","@smithy/smithy-client":"^4.12.12","@smithy/types":"^4.14.1","@smithy/url-parser":"^4.2.14","@smithy/util-base64":"^4.3.2","@smithy/util-body-length-browser":"^4.2.2","@smithy/util-body-length-node":"^4.2.3","@smithy/util-defaults-mode-browser":"^4.3.48","@smithy/util-defaults-mode-node":"^4.2.53","@smithy/util-endpoints":"^3.4.2","@smithy/util-middleware":"^4.2.14","@smithy/util-retry":"^4.3.3","@smithy/util-utf8":"^4.2.2","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","premove":"4.0.0","typescript":"~5.8.3"},"typesVersions":{"<4.5":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./cognito-identity.d.ts","./cognito-identity.js","./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sso.d.ts","./sso.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/cognito-identity/runtimeConfig":"./dist-es/submodules/cognito-identity/runtimeConfig.browser","./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sso/runtimeConfig":"./dist-es/submodules/sso/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./package.json":"./package.json","./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"},"./signin":{"types":"./dist-types/submodules/signin/index.d.ts","module":"./dist-es/submodules/signin/index.js","node":"./dist-cjs/submodules/signin/index.js","import":"./dist-es/submodules/signin/index.js","require":"./dist-cjs/submodules/signin/index.js"},"./cognito-identity":{"types":"./dist-types/submodules/cognito-identity/index.d.ts","module":"./dist-es/submodules/cognito-identity/index.js","node":"./dist-cjs/submodules/cognito-identity/index.js","import":"./dist-es/submodules/cognito-identity/index.js","require":"./dist-cjs/submodules/cognito-identity/index.js"},"./sso":{"types":"./dist-types/submodules/sso/index.d.ts","module":"./dist-es/submodules/sso/index.js","node":"./dist-cjs/submodules/sso/index.js","import":"./dist-es/submodules/sso/index.js","require":"./dist-cjs/submodules/sso/index.js"}}}');
1026
+
897
1027
  /***/ })
898
1028
 
899
1029
  };