@rharkor/caching-for-turbo 2.4.1 → 2.4.2

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,8 +8,7 @@ export const modules = {
8
8
  var __webpack_unused_export__;
9
9
 
10
10
 
11
- var propertyProvider = __webpack_require__(71238);
12
- var sharedIniFileLoader = __webpack_require__(94964);
11
+ var config = __webpack_require__(47291);
13
12
  var client = __webpack_require__(5152);
14
13
  var tokenProviders = __webpack_require__(75433);
15
14
 
@@ -38,7 +37,7 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
38
37
  };
39
38
  }
40
39
  catch (e) {
41
- throw new propertyProvider.CredentialsProviderError(e.message, {
40
+ throw new config.CredentialsProviderError(e.message, {
42
41
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
43
42
  logger,
44
43
  });
@@ -46,17 +45,17 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
46
45
  }
47
46
  else {
48
47
  try {
49
- token = await sharedIniFileLoader.getSSOTokenFromFile(ssoStartUrl);
48
+ token = await config.getSSOTokenFromFile(ssoStartUrl);
50
49
  }
51
50
  catch (e) {
52
- throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
51
+ throw new config.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
53
52
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
54
53
  logger,
55
54
  });
56
55
  }
57
56
  }
58
57
  if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
59
- throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
58
+ throw new config.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
60
59
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
61
60
  logger,
62
61
  });
@@ -78,14 +77,14 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
78
77
  }));
79
78
  }
80
79
  catch (e) {
81
- throw new propertyProvider.CredentialsProviderError(e, {
80
+ throw new config.CredentialsProviderError(e, {
82
81
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
83
82
  logger,
84
83
  });
85
84
  }
86
85
  const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}, } = ssoResp;
87
86
  if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {
88
- throw new propertyProvider.CredentialsProviderError("SSO returns an invalid temporary credential.", {
87
+ throw new config.CredentialsProviderError("SSO returns an invalid temporary credential.", {
89
88
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
90
89
  logger,
91
90
  });
@@ -110,7 +109,7 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
110
109
  const validateSsoProfile = (profile, logger) => {
111
110
  const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
112
111
  if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
113
- throw new propertyProvider.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", ` +
112
+ throw new config.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", ` +
114
113
  `"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 });
115
114
  }
116
115
  return profile;
@@ -120,32 +119,32 @@ const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
120
119
  init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");
121
120
  const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
122
121
  const { ssoClient } = init;
123
- const profileName = sharedIniFileLoader.getProfileName({
122
+ const profileName = config.getProfileName({
124
123
  profile: init.profile ?? callerClientConfig?.profile,
125
124
  });
126
125
  if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
127
- const profiles = await sharedIniFileLoader.parseKnownFiles(init);
126
+ const profiles = await config.parseKnownFiles(init);
128
127
  const profile = profiles[profileName];
129
128
  if (!profile) {
130
- throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
129
+ throw new config.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
131
130
  }
132
131
  if (!isSsoProfile(profile)) {
133
- throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
132
+ throw new config.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
134
133
  logger: init.logger,
135
134
  });
136
135
  }
137
136
  if (profile?.sso_session) {
138
- const ssoSessions = await sharedIniFileLoader.loadSsoSessionData(init);
137
+ const ssoSessions = await config.loadSsoSessionData(init);
139
138
  const session = ssoSessions[profile.sso_session];
140
139
  const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;
141
140
  if (ssoRegion && ssoRegion !== session.sso_region) {
142
- throw new propertyProvider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
141
+ throw new config.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
143
142
  tryNextLink: false,
144
143
  logger: init.logger,
145
144
  });
146
145
  }
147
146
  if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {
148
- throw new propertyProvider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
147
+ throw new config.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
149
148
  tryNextLink: false,
150
149
  logger: init.logger,
151
150
  });
@@ -172,7 +171,7 @@ const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
172
171
  });
173
172
  }
174
173
  else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
175
- throw new propertyProvider.CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include " +
174
+ throw new config.CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include " +
176
175
  '"ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init.logger });
177
176
  }
178
177
  else {
@@ -217,24 +216,40 @@ exports.SSOClient = sso.SSOClient;
217
216
 
218
217
  /***/ }),
219
218
 
220
- /***/ 97452:
219
+ /***/ 32579:
221
220
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
222
221
 
223
222
 
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);
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
+
228
244
  const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
229
245
  return {
230
- operation: (0, util_middleware_1.getSmithyContext)(context).operation,
231
- region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
246
+ operation: client.getSmithyContext(context).operation,
247
+ region: (await client.normalizeProvider(config.region)()) ||
232
248
  (() => {
233
249
  throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
234
250
  })(),
235
251
  };
236
252
  };
237
- exports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider;
238
253
  function createAwsAuthSigv4HttpAuthOption(authParameters) {
239
254
  return {
240
255
  schemeId: "aws.auth#sigv4",
@@ -259,7 +274,7 @@ const defaultSSOHttpAuthSchemeProvider = (authParameters) => {
259
274
  const options = [];
260
275
  switch (authParameters.operation) {
261
276
  case "GetRoleCredentials": {
262
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
277
+ options.push(createSmithyApiNoAuthHttpAuthOption());
263
278
  break;
264
279
  }
265
280
  default: {
@@ -268,25 +283,31 @@ const defaultSSOHttpAuthSchemeProvider = (authParameters) => {
268
283
  }
269
284
  return options;
270
285
  };
271
- exports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider;
272
286
  const resolveHttpAuthSchemeConfig = (config) => {
273
- const config_0 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4Config)(config);
287
+ const config_0 = httpAuthSchemes.resolveAwsSdkSigV4Config(config);
274
288
  return Object.assign(config_0, {
275
- authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),
289
+ authSchemePreference: client.normalizeProvider(config.authSchemePreference ?? []),
276
290
  });
277
291
  };
278
- exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
279
-
280
292
 
281
- /***/ }),
282
-
283
- /***/ 49239:
284
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
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
+ };
285
306
 
307
+ var version = "3.997.7";
308
+ var packageInfo = {
309
+ version: version};
286
310
 
287
- Object.defineProperty(exports, "__esModule", ({ value: true }));
288
- exports.bdd = void 0;
289
- const util_endpoints_1 = __webpack_require__(79674);
290
311
  const k = "ref";
291
312
  const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [k]: "Endpoint" }, h = { [k]: d }, i = {}, j = [{ [k]: "Region" }];
292
313
  const _data = {
@@ -362,230 +383,28 @@ const nodes = new Int32Array([
362
383
  r + 2,
363
384
  r + 3,
364
385
  ]);
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
-
386
+ const bdd = endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
373
387
 
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({
388
+ const cache = new endpoints.EndpointCache({
380
389
  size: 50,
381
390
  params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
382
391
  });
383
392
  const defaultEndpointResolver = (endpointParams, context = {}) => {
384
- return cache.get(endpointParams, () => (0, util_endpoints_2.decideEndpoint)(bdd_1.bdd, {
393
+ return cache.get(endpointParams, () => endpoints.decideEndpoint(bdd, {
385
394
  endpointParams: endpointParams,
386
395
  logger: context.logger,
387
396
  }));
388
397
  };
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
- };
398
+ endpoints.customEndpointFunctions.aws = utilEndpoints.awsEndpointFunctions;
477
399
 
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 {
400
+ class SSOServiceException extends client.ServiceException {
571
401
  constructor(options) {
572
402
  super(options);
573
403
  Object.setPrototypeOf(this, SSOServiceException.prototype);
574
404
  }
575
405
  }
576
- exports.SSOServiceException = SSOServiceException;
577
-
578
-
579
- /***/ }),
580
-
581
- /***/ 24483:
582
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
583
406
 
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 {
407
+ class InvalidRequestException extends SSOServiceException {
589
408
  name = "InvalidRequestException";
590
409
  $fault = "client";
591
410
  constructor(opts) {
@@ -597,8 +416,7 @@ class InvalidRequestException extends SSOServiceException_1.SSOServiceException
597
416
  Object.setPrototypeOf(this, InvalidRequestException.prototype);
598
417
  }
599
418
  }
600
- exports.InvalidRequestException = InvalidRequestException;
601
- class ResourceNotFoundException extends SSOServiceException_1.SSOServiceException {
419
+ class ResourceNotFoundException extends SSOServiceException {
602
420
  name = "ResourceNotFoundException";
603
421
  $fault = "client";
604
422
  constructor(opts) {
@@ -610,8 +428,7 @@ class ResourceNotFoundException extends SSOServiceException_1.SSOServiceExceptio
610
428
  Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
611
429
  }
612
430
  }
613
- exports.ResourceNotFoundException = ResourceNotFoundException;
614
- class TooManyRequestsException extends SSOServiceException_1.SSOServiceException {
431
+ class TooManyRequestsException extends SSOServiceException {
615
432
  name = "TooManyRequestsException";
616
433
  $fault = "client";
617
434
  constructor(opts) {
@@ -623,8 +440,7 @@ class TooManyRequestsException extends SSOServiceException_1.SSOServiceException
623
440
  Object.setPrototypeOf(this, TooManyRequestsException.prototype);
624
441
  }
625
442
  }
626
- exports.TooManyRequestsException = TooManyRequestsException;
627
- class UnauthorizedException extends SSOServiceException_1.SSOServiceException {
443
+ class UnauthorizedException extends SSOServiceException {
628
444
  name = "UnauthorizedException";
629
445
  $fault = "client";
630
446
  constructor(opts) {
@@ -636,134 +452,7 @@ class UnauthorizedException extends SSOServiceException_1.SSOServiceException {
636
452
  Object.setPrototypeOf(this, UnauthorizedException.prototype);
637
453
  }
638
454
  }
639
- exports.UnauthorizedException = UnauthorizedException;
640
-
641
-
642
- /***/ }),
643
455
 
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;
767
456
  const _ATT = "AccessTokenType";
768
457
  const _GRC = "GetRoleCredentials";
769
458
  const _GRCR = "GetRoleCredentialsRequest";
@@ -795,26 +484,23 @@ const _sAK = "secretAccessKey";
795
484
  const _sT = "sessionToken";
796
485
  const _xasbt = "x-amz-sso_bearer_token";
797
486
  const n0 = "com.amazonaws.sso";
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];
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];
814
500
  var AccessTokenType = [0, n0, _ATT, 8, 0];
815
501
  var SecretAccessKeyType = [0, n0, _SAKT, 8, 0];
816
502
  var SessionTokenType = [0, n0, _STT, 8, 0];
817
- exports.GetRoleCredentialsRequest$ = [
503
+ var GetRoleCredentialsRequest$ = [
818
504
  3,
819
505
  n0,
820
506
  _GRCR,
@@ -827,15 +513,15 @@ exports.GetRoleCredentialsRequest$ = [
827
513
  ],
828
514
  3,
829
515
  ];
830
- exports.GetRoleCredentialsResponse$ = [
516
+ var GetRoleCredentialsResponse$ = [
831
517
  3,
832
518
  n0,
833
519
  _GRCRe,
834
520
  0,
835
521
  [_rC],
836
- [[() => exports.RoleCredentials$, 0]],
522
+ [[() => RoleCredentials$, 0]],
837
523
  ];
838
- exports.RoleCredentials$ = [
524
+ var RoleCredentials$ = [
839
525
  3,
840
526
  n0,
841
527
  _RC,
@@ -843,15 +529,207 @@ exports.RoleCredentials$ = [
843
529
  [_aKI, _sAK, _sT, _ex],
844
530
  [0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1],
845
531
  ];
846
- exports.GetRoleCredentials$ = [
532
+ var GetRoleCredentials$ = [
847
533
  9,
848
534
  n0,
849
535
  _GRC,
850
536
  { [_h]: ["GET", "/federation/credentials", 200] },
851
- () => exports.GetRoleCredentialsRequest$,
852
- () => exports.GetRoleCredentialsResponse$,
537
+ () => GetRoleCredentialsRequest$,
538
+ () => GetRoleCredentialsResponse$,
853
539
  ];
854
540
 
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
+
855
733
 
856
734
  /***/ }),
857
735
 
@@ -862,18 +740,17 @@ exports.GetRoleCredentials$ = [
862
740
 
863
741
  var client = __webpack_require__(5152);
864
742
  var httpAuthSchemes = __webpack_require__(97523);
865
- var propertyProvider = __webpack_require__(71238);
866
- var sharedIniFileLoader = __webpack_require__(94964);
743
+ var config = __webpack_require__(47291);
867
744
  var node_fs = __webpack_require__(73024);
868
745
 
869
746
  const fromEnvSigningName = ({ logger, signingName } = {}) => async () => {
870
747
  logger?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
871
748
  if (!signingName) {
872
- throw new propertyProvider.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger });
749
+ throw new config.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger });
873
750
  }
874
751
  const bearerTokenKey = httpAuthSchemes.getBearerTokenEnvKey(signingName);
875
752
  if (!(bearerTokenKey in process.env)) {
876
- throw new propertyProvider.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger });
753
+ throw new config.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger });
877
754
  }
878
755
  const token = { token: process.env[bearerTokenKey] };
879
756
  client.setTokenFeature(token, "BEARER_SERVICE_ENV_VARS", "3");
@@ -884,7 +761,7 @@ const EXPIRE_WINDOW_MS = 5 * 60 * 1000;
884
761
  const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
885
762
 
886
763
  const getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
887
- const { SSOOIDCClient } = await __webpack_require__.e(/* import() */ 443).then(__webpack_require__.t.bind(__webpack_require__, 89443, 23));
764
+ const { SSOOIDCClient } = await __webpack_require__.e(/* import() */ 443).then(__webpack_require__.t.bind(__webpack_require__, 89443, 19));
888
765
  const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];
889
766
  const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {
890
767
  region: ssoRegion ?? init.clientConfig?.region,
@@ -895,7 +772,7 @@ const getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
895
772
  };
896
773
 
897
774
  const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {
898
- const { CreateTokenCommand } = await __webpack_require__.e(/* import() */ 443).then(__webpack_require__.t.bind(__webpack_require__, 89443, 23));
775
+ const { CreateTokenCommand } = await __webpack_require__.e(/* import() */ 443).then(__webpack_require__.t.bind(__webpack_require__, 89443, 19));
899
776
  const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);
900
777
  return ssoOidcClient.send(new CreateTokenCommand({
901
778
  clientId: ssoToken.clientId,
@@ -907,19 +784,19 @@ const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientCo
907
784
 
908
785
  const validateTokenExpiry = (token) => {
909
786
  if (token.expiration && token.expiration.getTime() < Date.now()) {
910
- throw new propertyProvider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
787
+ throw new config.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
911
788
  }
912
789
  };
913
790
 
914
791
  const validateTokenKey = (key, value, forRefresh = false) => {
915
792
  if (typeof value === "undefined") {
916
- throw new propertyProvider.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
793
+ throw new config.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
917
794
  }
918
795
  };
919
796
 
920
797
  const { writeFile } = node_fs.promises;
921
798
  const writeSSOTokenToFile = (id, ssoToken) => {
922
- const tokenFilepath = sharedIniFileLoader.getSSOTokenFilepath(id);
799
+ const tokenFilepath = config.getSSOTokenFilepath(id);
923
800
  const tokenString = JSON.stringify(ssoToken, null, 2);
924
801
  return writeFile(tokenFilepath, tokenString);
925
802
  };
@@ -927,36 +804,36 @@ const writeSSOTokenToFile = (id, ssoToken) => {
927
804
  const lastRefreshAttemptTime = new Date(0);
928
805
  const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
929
806
  init.logger?.debug("@aws-sdk/token-providers - fromSso");
930
- const profiles = await sharedIniFileLoader.parseKnownFiles(init);
931
- const profileName = sharedIniFileLoader.getProfileName({
807
+ const profiles = await config.parseKnownFiles(init);
808
+ const profileName = config.getProfileName({
932
809
  profile: init.profile ?? callerClientConfig?.profile,
933
810
  });
934
811
  const profile = profiles[profileName];
935
812
  if (!profile) {
936
- throw new propertyProvider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
813
+ throw new config.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
937
814
  }
938
815
  else if (!profile["sso_session"]) {
939
- throw new propertyProvider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
816
+ throw new config.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
940
817
  }
941
818
  const ssoSessionName = profile["sso_session"];
942
- const ssoSessions = await sharedIniFileLoader.loadSsoSessionData(init);
819
+ const ssoSessions = await config.loadSsoSessionData(init);
943
820
  const ssoSession = ssoSessions[ssoSessionName];
944
821
  if (!ssoSession) {
945
- throw new propertyProvider.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
822
+ throw new config.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
946
823
  }
947
824
  for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) {
948
825
  if (!ssoSession[ssoSessionRequiredKey]) {
949
- throw new propertyProvider.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
826
+ throw new config.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
950
827
  }
951
828
  }
952
829
  ssoSession["sso_start_url"];
953
830
  const ssoRegion = ssoSession["sso_region"];
954
831
  let ssoToken;
955
832
  try {
956
- ssoToken = await sharedIniFileLoader.getSSOTokenFromFile(ssoSessionName);
833
+ ssoToken = await config.getSSOTokenFromFile(ssoSessionName);
957
834
  }
958
835
  catch (e) {
959
- throw new propertyProvider.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
836
+ throw new config.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
960
837
  }
961
838
  validateTokenKey("accessToken", ssoToken.accessToken);
962
839
  validateTokenKey("expiresAt", ssoToken.expiresAt);
@@ -1002,13 +879,13 @@ const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
1002
879
  const fromStatic = ({ token, logger }) => async () => {
1003
880
  logger?.debug("@aws-sdk/token-providers - fromStatic");
1004
881
  if (!token || !token.token) {
1005
- throw new propertyProvider.TokenProviderError(`Please pass a valid token to fromStatic`, false);
882
+ throw new config.TokenProviderError(`Please pass a valid token to fromStatic`, false);
1006
883
  }
1007
884
  return token;
1008
885
  };
1009
886
 
1010
- const nodeProvider = (init = {}) => propertyProvider.memoize(propertyProvider.chain(fromSso(init), async () => {
1011
- throw new propertyProvider.TokenProviderError("Could not load token from any providers", false);
887
+ const nodeProvider = (init = {}) => config.memoize(config.chain(fromSso(init), async () => {
888
+ throw new config.TokenProviderError("Could not load token from any providers", false);
1012
889
  }), (token) => token.expiration !== undefined && token.expiration.getTime() - Date.now() < 300000, (token) => token.expiration !== undefined);
1013
890
 
1014
891
  exports.fromEnvSigningName = fromEnvSigningName;
@@ -1017,13 +894,6 @@ exports.fromStatic = fromStatic;
1017
894
  exports.nodeProvider = nodeProvider;
1018
895
 
1019
896
 
1020
- /***/ }),
1021
-
1022
- /***/ 39955:
1023
- /***/ ((module) => {
1024
-
1025
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.997.6","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.8","@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.38","@aws-sdk/region-config-resolver":"^3.972.13","@aws-sdk/signature-v4-multi-region":"^3.996.25","@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.24","@smithy/config-resolver":"^4.4.17","@smithy/core":"^3.23.17","@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.32","@smithy/middleware-retry":"^4.5.7","@smithy/middleware-serde":"^4.2.20","@smithy/middleware-stack":"^4.2.14","@smithy/node-config-provider":"^4.3.14","@smithy/node-http-handler":"^4.6.1","@smithy/protocol-http":"^5.3.14","@smithy/smithy-client":"^4.12.13","@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.49","@smithy/util-defaults-mode-node":"^4.2.54","@smithy/util-endpoints":"^3.4.2","@smithy/util-middleware":"^4.2.14","@smithy/util-retry":"^4.3.6","@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
-
1027
897
  /***/ })
1028
898
 
1029
899
  };