@karmaniverous/get-dotenv 6.5.2 → 7.0.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.
Files changed (42) hide show
  1. package/dist/chunks/{AwsRestJsonProtocol-7Uww6gmd.mjs → AwsRestJsonProtocol-DeiE3wkO.mjs} +22 -5
  2. package/dist/chunks/{createCli-pZgHlwKX.mjs → createCli-B9-MIwWj.mjs} +4 -4
  3. package/dist/chunks/{externalDataInterceptor-CnjiiRdu.mjs → externalDataInterceptor-gi2RH4ez.mjs} +2 -2
  4. package/dist/chunks/{getSSOTokenFromFile-Bct4fw5A.mjs → getSSOTokenFromFile-BfAhZf_d.mjs} +1 -1
  5. package/dist/chunks/{index-BJWV46OF.mjs → index-98yxYe1W.mjs} +73 -61
  6. package/dist/chunks/{index-CDPFly99.mjs → index-AssUn9IY.mjs} +218 -164
  7. package/dist/chunks/{index-BHKFx7ea.mjs → index-B6r8O7PJ.mjs} +5 -5
  8. package/dist/chunks/{index-Do8RFiEa.mjs → index-C21RHLO4.mjs} +2 -2
  9. package/dist/chunks/{index-Cg50N4ys.mjs → index-CAtxK29A.mjs} +2 -2
  10. package/dist/chunks/{index-Cy9EnHMK.mjs → index-CMSCF_uw.mjs} +73 -71
  11. package/dist/chunks/{index-CzwvgH1X.mjs → index-Ccay5Db0.mjs} +33 -35
  12. package/dist/chunks/{index-37ce0nLC.mjs → index-D8S1lJ24.mjs} +44 -39
  13. package/dist/chunks/{index-DeXLfLd1.mjs → index-DY7wYcXW.mjs} +18 -23
  14. package/dist/chunks/{index-Bmw8WxM1.mjs → index-DfvhftMN.mjs} +2 -2
  15. package/dist/chunks/{index-udC0OkWn.mjs → index-DtdHVcXz.mjs} +2 -2
  16. package/dist/chunks/{index-BjE-7W3n.mjs → index-mPj0Vhpw.mjs} +5 -5
  17. package/dist/chunks/{index-BfVeLAui.mjs → index-xRi3oKvY.mjs} +3 -3
  18. package/dist/chunks/{loadSso-DJONWtFw.mjs → loadSso-C-y9gQEz.mjs} +84 -73
  19. package/dist/chunks/{package-boo9EyYs.mjs → package-DiDNabNr.mjs} +1 -1
  20. package/dist/chunks/{parseKnownFiles-DsgpkpKC.mjs → parseKnownFiles-KczcjlE0.mjs} +1 -1
  21. package/dist/chunks/{readMergedOptions-uWSetyes.mjs → readMergedOptions-D6niy_Ep.mjs} +24 -3
  22. package/dist/chunks/{resolveCliOptions-7MwNdHqz.mjs → resolveCliOptions-PWF1aEM9.mjs} +1 -1
  23. package/dist/chunks/{sdk-stream-mixin-uGZKBKMz.mjs → sdk-stream-mixin-blFikF4G.mjs} +1 -1
  24. package/dist/chunks/{types-BSMtAo8_.mjs → types-Bp3u5-IH.mjs} +1 -1
  25. package/dist/cli.d.ts +4 -2
  26. package/dist/cli.mjs +5 -5
  27. package/dist/cliHost.d.ts +4 -2
  28. package/dist/cliHost.mjs +3 -3
  29. package/dist/getdotenv.cli.mjs +5 -5
  30. package/dist/index.d.ts +11 -5
  31. package/dist/index.mjs +12 -13
  32. package/dist/plugins-aws.d.ts +4 -2
  33. package/dist/plugins-aws.mjs +1 -1
  34. package/dist/plugins-batch.d.ts +4 -2
  35. package/dist/plugins-batch.mjs +1 -1
  36. package/dist/plugins-cmd.d.ts +4 -2
  37. package/dist/plugins-cmd.mjs +3 -3
  38. package/dist/plugins-init.d.ts +4 -2
  39. package/dist/plugins-init.mjs +11 -11
  40. package/dist/plugins.d.ts +4 -2
  41. package/dist/plugins.mjs +4 -4
  42. package/package.json +17 -17
@@ -1,11 +1,11 @@
1
1
  import { readFileSync } from 'fs';
2
- import { e as externalDataInterceptor } from './externalDataInterceptor-CnjiiRdu.mjs';
3
- import { C as CredentialsProviderError, s as setCredentialFeature } from './index-CDPFly99.mjs';
4
- import './getSSOTokenFromFile-Bct4fw5A.mjs';
2
+ import { e as externalDataInterceptor } from './externalDataInterceptor-gi2RH4ez.mjs';
3
+ import { C as CredentialsProviderError, s as setCredentialFeature } from './index-AssUn9IY.mjs';
4
+ import './getSSOTokenFromFile-BfAhZf_d.mjs';
5
5
  import 'fs/promises';
6
6
  import 'crypto';
7
7
  import 'path';
8
- import './readMergedOptions-uWSetyes.mjs';
8
+ import './readMergedOptions-D6niy_Ep.mjs';
9
9
  import 'zod';
10
10
  import '@commander-js/extra-typings';
11
11
  import './readDotenvCascade-HLU7FsEQ.mjs';
@@ -35,7 +35,7 @@ const fromWebToken = (init) => async (awsIdentityProperties) => {
35
35
  const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;
36
36
  let { roleAssumerWithWebIdentity } = init;
37
37
  if (!roleAssumerWithWebIdentity) {
38
- const { getDefaultRoleAssumerWithWebIdentity } = await import('./index-Cy9EnHMK.mjs');
38
+ const { getDefaultRoleAssumerWithWebIdentity } = await import('./index-CMSCF_uw.mjs');
39
39
  roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
40
40
  ...init.clientConfig,
41
41
  credentialProviderLogger: init.logger,
@@ -1,5 +1,5 @@
1
- import { t as toUtf8, i as fromUtf8 } from './index-CDPFly99.mjs';
2
- import './readMergedOptions-uWSetyes.mjs';
1
+ import { t as toUtf8, i as fromUtf8 } from './index-AssUn9IY.mjs';
2
+ import './readMergedOptions-D6niy_Ep.mjs';
3
3
  import 'zod';
4
4
  import '@commander-js/extra-typings';
5
5
  import './readDotenvCascade-HLU7FsEQ.mjs';
@@ -1,5 +1,5 @@
1
1
  import { camel } from 'radash';
2
- import { r as readMergedOptions, g as getDotenvCliOptions2Options, d as definePlugin } from './readMergedOptions-uWSetyes.mjs';
2
+ import { r as readMergedOptions, g as getDotenvCliOptions2Options, d as definePlugin } from './readMergedOptions-D6niy_Ep.mjs';
3
3
  import 'execa';
4
4
  import 'node:buffer';
5
5
  import 'fs-extra';
@@ -17,7 +17,7 @@ import { z } from 'zod';
17
17
  import { b as resolveCommand, c as resolveShell, t as tokenize, s as shouldCapture, r as runCommand, d as buildSpawnEnv } from './spawnEnv-5kdIVv0x.mjs';
18
18
  import { m as maybePreserveNodeEvalArgv, c as composeNestedEnv, s as stripOne } from './invoke-DuRPU1oC.mjs';
19
19
  import { f as dotenvExpandFromProcessEnv } from './readDotenvCascade-HLU7FsEQ.mjs';
20
- import { r as resolveCliOptions, b as baseGetDotenvCliOptions } from './resolveCliOptions-7MwNdHqz.mjs';
20
+ import { r as resolveCliOptions, b as baseGetDotenvCliOptions } from './resolveCliOptions-PWF1aEM9.mjs';
21
21
 
22
22
  /** src/diagnostics/entropy.ts
23
23
  * Entropy diagnostics (presentation-only).
@@ -1,6 +1,6 @@
1
- import { O as loadConfig, X as NODE_REGION_CONFIG_FILE_OPTIONS, Y as NODE_REGION_CONFIG_OPTIONS, w as resolveAwsSdkSigV4Config, x as normalizeProvider, y as getSmithyContext, z as EndpointCache, A as resolveEndpoint, B as awsEndpointFunctions, D as customEndpointFunctions, t as toUtf8, i as fromUtf8, F as parseUrl, aP as AwsQueryProtocol, G as NoOpLogger, I as AwsSdkSigV4Signer, J as NoAuthSigner, n as toBase64, m as fromBase64, K as emitWarningIfUnsupportedVersion, L as resolveDefaultsModeConfig, M as emitWarningIfUnsupportedVersion$1, r as streamCollector, P as Hash, N as NodeHttpHandler, Q as createDefaultUserAgentProvider, R as calculateBodyLength, S as NODE_APP_ID_CONFIG_OPTIONS, T as NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, U as NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, V as NODE_RETRY_MODE_CONFIG_OPTIONS, W as DEFAULT_RETRY_MODE, Z as NODE_MAX_ATTEMPT_CONFIG_OPTIONS, _ as NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, $ as loadConfigsForDefaultMode, a0 as getAwsRegionExtensionConfiguration, a1 as getDefaultExtensionConfiguration, a2 as getHttpHandlerExtensionConfiguration, a3 as resolveAwsRegionExtensionConfiguration, a4 as resolveDefaultRuntimeConfig, a5 as resolveHttpHandlerRuntimeConfig, a6 as Client, a7 as resolveUserAgentConfig, a8 as resolveRetryConfig, a9 as resolveRegionConfig, aa as resolveEndpointConfig, ab as resolveHostHeaderConfig, ac as getSchemaSerdePlugin, ad as getUserAgentPlugin, ae as getRetryPlugin, af as getContentLengthPlugin, ag as getHostHeaderPlugin, ah as getLoggerPlugin, ai as getRecursionDetectionPlugin, aj as getHttpAuthSchemeEndpointRuleSetPlugin, ak as DefaultIdentityProviderConfig, al as getHttpSigningPlugin, am as ServiceException, an as TypeRegistry, ao as Command, ap as getEndpointPlugin, s as setCredentialFeature } from './index-CDPFly99.mjs';
2
- import { p as packageInfo } from './package-boo9EyYs.mjs';
3
- import './readMergedOptions-uWSetyes.mjs';
1
+ import { O as loadConfig, X as NODE_REGION_CONFIG_FILE_OPTIONS, Y as NODE_REGION_CONFIG_OPTIONS, w as resolveAwsSdkSigV4Config, x as normalizeProvider, y as getSmithyContext, z as EndpointCache, A as resolveEndpoint, B as awsEndpointFunctions, D as customEndpointFunctions, t as toUtf8, i as fromUtf8, F as parseUrl, aQ as AwsQueryProtocol, G as NoOpLogger, I as AwsSdkSigV4Signer, J as NoAuthSigner, n as toBase64, m as fromBase64, K as emitWarningIfUnsupportedVersion, L as resolveDefaultsModeConfig, M as emitWarningIfUnsupportedVersion$1, r as streamCollector, P as Hash, N as NodeHttpHandler, Q as createDefaultUserAgentProvider, R as calculateBodyLength, S as NODE_APP_ID_CONFIG_OPTIONS, T as NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, U as NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, V as NODE_RETRY_MODE_CONFIG_OPTIONS, W as DEFAULT_RETRY_MODE, Z as NODE_MAX_ATTEMPT_CONFIG_OPTIONS, _ as NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, $ as loadConfigsForDefaultMode, a0 as getAwsRegionExtensionConfiguration, a1 as getDefaultExtensionConfiguration, a2 as getHttpHandlerExtensionConfiguration, a3 as resolveAwsRegionExtensionConfiguration, a4 as resolveDefaultRuntimeConfig, a5 as resolveHttpHandlerRuntimeConfig, a6 as Client, a7 as resolveUserAgentConfig, a8 as resolveRetryConfig, a9 as resolveRegionConfig, aa as resolveEndpointConfig, ab as resolveHostHeaderConfig, ac as getSchemaSerdePlugin, ad as getUserAgentPlugin, ae as getRetryPlugin, af as getContentLengthPlugin, ag as getHostHeaderPlugin, ah as getLoggerPlugin, ai as getRecursionDetectionPlugin, aj as getHttpAuthSchemeEndpointRuleSetPlugin, ak as DefaultIdentityProviderConfig, al as getHttpSigningPlugin, am as ServiceException, an as TypeRegistry, ao as Command, ap as getEndpointPlugin, s as setCredentialFeature } from './index-AssUn9IY.mjs';
2
+ import { p as packageInfo } from './package-DiDNabNr.mjs';
3
+ import './readMergedOptions-D6niy_Ep.mjs';
4
4
  import 'zod';
5
5
  import '@commander-js/extra-typings';
6
6
  import './readDotenvCascade-HLU7FsEQ.mjs';
@@ -147,12 +147,13 @@ const getRuntimeConfig$1 = (config) => {
147
147
  },
148
148
  ],
149
149
  logger: config?.logger ?? new NoOpLogger(),
150
- protocol: config?.protocol ??
151
- new AwsQueryProtocol({
152
- defaultNamespace: "com.amazonaws.sts",
153
- xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
154
- version: "2011-06-15",
155
- }),
150
+ protocol: config?.protocol ?? AwsQueryProtocol,
151
+ protocolSettings: config?.protocolSettings ?? {
152
+ defaultNamespace: "com.amazonaws.sts",
153
+ xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
154
+ version: "2011-06-15",
155
+ serviceTarget: "AWSSecurityTokenServiceV20110615",
156
+ },
156
157
  serviceId: config?.serviceId ?? "STS",
157
158
  urlParser: config?.urlParser ?? parseUrl,
158
159
  utf8Decoder: config?.utf8Decoder ?? fromUtf8,
@@ -289,14 +290,14 @@ class STSClient extends Client {
289
290
  }
290
291
  }
291
292
 
292
- let STSServiceException$1 = class STSServiceException extends ServiceException {
293
+ class STSServiceException extends ServiceException {
293
294
  constructor(options) {
294
295
  super(options);
295
296
  Object.setPrototypeOf(this, STSServiceException.prototype);
296
297
  }
297
- };
298
+ }
298
299
 
299
- let ExpiredTokenException$1 = class ExpiredTokenException extends STSServiceException$1 {
300
+ class ExpiredTokenException extends STSServiceException {
300
301
  name = "ExpiredTokenException";
301
302
  $fault = "client";
302
303
  constructor(opts) {
@@ -307,8 +308,8 @@ let ExpiredTokenException$1 = class ExpiredTokenException extends STSServiceExce
307
308
  });
308
309
  Object.setPrototypeOf(this, ExpiredTokenException.prototype);
309
310
  }
310
- };
311
- let MalformedPolicyDocumentException$1 = class MalformedPolicyDocumentException extends STSServiceException$1 {
311
+ }
312
+ class MalformedPolicyDocumentException extends STSServiceException {
312
313
  name = "MalformedPolicyDocumentException";
313
314
  $fault = "client";
314
315
  constructor(opts) {
@@ -319,8 +320,8 @@ let MalformedPolicyDocumentException$1 = class MalformedPolicyDocumentException
319
320
  });
320
321
  Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
321
322
  }
322
- };
323
- let PackedPolicyTooLargeException$1 = class PackedPolicyTooLargeException extends STSServiceException$1 {
323
+ }
324
+ class PackedPolicyTooLargeException extends STSServiceException {
324
325
  name = "PackedPolicyTooLargeException";
325
326
  $fault = "client";
326
327
  constructor(opts) {
@@ -331,8 +332,8 @@ let PackedPolicyTooLargeException$1 = class PackedPolicyTooLargeException extend
331
332
  });
332
333
  Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);
333
334
  }
334
- };
335
- let RegionDisabledException$1 = class RegionDisabledException extends STSServiceException$1 {
335
+ }
336
+ class RegionDisabledException extends STSServiceException {
336
337
  name = "RegionDisabledException";
337
338
  $fault = "client";
338
339
  constructor(opts) {
@@ -343,8 +344,8 @@ let RegionDisabledException$1 = class RegionDisabledException extends STSService
343
344
  });
344
345
  Object.setPrototypeOf(this, RegionDisabledException.prototype);
345
346
  }
346
- };
347
- let IDPRejectedClaimException$1 = class IDPRejectedClaimException extends STSServiceException$1 {
347
+ }
348
+ class IDPRejectedClaimException extends STSServiceException {
348
349
  name = "IDPRejectedClaimException";
349
350
  $fault = "client";
350
351
  constructor(opts) {
@@ -355,8 +356,8 @@ let IDPRejectedClaimException$1 = class IDPRejectedClaimException extends STSSer
355
356
  });
356
357
  Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);
357
358
  }
358
- };
359
- let InvalidIdentityTokenException$1 = class InvalidIdentityTokenException extends STSServiceException$1 {
359
+ }
360
+ class InvalidIdentityTokenException extends STSServiceException {
360
361
  name = "InvalidIdentityTokenException";
361
362
  $fault = "client";
362
363
  constructor(opts) {
@@ -367,8 +368,8 @@ let InvalidIdentityTokenException$1 = class InvalidIdentityTokenException extend
367
368
  });
368
369
  Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);
369
370
  }
370
- };
371
- let IDPCommunicationErrorException$1 = class IDPCommunicationErrorException extends STSServiceException$1 {
371
+ }
372
+ class IDPCommunicationErrorException extends STSServiceException {
372
373
  name = "IDPCommunicationErrorException";
373
374
  $fault = "client";
374
375
  constructor(opts) {
@@ -379,7 +380,7 @@ let IDPCommunicationErrorException$1 = class IDPCommunicationErrorException exte
379
380
  });
380
381
  Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);
381
382
  }
382
- };
383
+ }
383
384
 
384
385
  const _A = "Arn";
385
386
  const _AKI = "AccessKeyId";
@@ -442,8 +443,8 @@ const _tLT = "tagListType";
442
443
  const n0 = "com.amazonaws.sts";
443
444
  var accessKeySecretType = [0, n0, _aKST, 8, 0];
444
445
  var clientTokenType = [0, n0, _cTT, 8, 0];
445
- var AssumedRoleUser = [3, n0, _ARU, 0, [_ARI, _A], [0, 0]];
446
- var AssumeRoleRequest = [
446
+ var AssumedRoleUser$ = [3, n0, _ARU, 0, [_ARI, _A], [0, 0]];
447
+ var AssumeRoleRequest$ = [
447
448
  3,
448
449
  n0,
449
450
  _ARR,
@@ -451,15 +452,15 @@ var AssumeRoleRequest = [
451
452
  [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],
452
453
  [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType],
453
454
  ];
454
- var AssumeRoleResponse = [
455
+ var AssumeRoleResponse$ = [
455
456
  3,
456
457
  n0,
457
458
  _ARRs,
458
459
  0,
459
460
  [_C, _ARU, _PPS, _SI],
460
- [[() => Credentials, 0], () => AssumedRoleUser, 1, 0],
461
+ [[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0],
461
462
  ];
462
- var AssumeRoleWithWebIdentityRequest = [
463
+ var AssumeRoleWithWebIdentityRequest$ = [
463
464
  3,
464
465
  n0,
465
466
  _ARWWIR,
@@ -467,15 +468,15 @@ var AssumeRoleWithWebIdentityRequest = [
467
468
  [_RA, _RSN, _WIT, _PI, _PA, _P, _DS],
468
469
  [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1],
469
470
  ];
470
- var AssumeRoleWithWebIdentityResponse = [
471
+ var AssumeRoleWithWebIdentityResponse$ = [
471
472
  3,
472
473
  n0,
473
474
  _ARWWIRs,
474
475
  0,
475
476
  [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
476
- [[() => Credentials, 0], 0, () => AssumedRoleUser, 1, 0, 0, 0],
477
+ [[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0],
477
478
  ];
478
- var Credentials = [
479
+ var Credentials$ = [
479
480
  3,
480
481
  n0,
481
482
  _C,
@@ -483,85 +484,85 @@ var Credentials = [
483
484
  [_AKI, _SAK, _ST, _E],
484
485
  [0, [() => accessKeySecretType, 0], 0, 4],
485
486
  ];
486
- var ExpiredTokenException = [
487
+ var ExpiredTokenException$ = [
487
488
  -3,
488
489
  n0,
489
490
  _ETE,
490
- { [_e]: _c, [_hE]: 400, [_aQE]: [`ExpiredTokenException`, 400] },
491
+ { [_aQE]: [`ExpiredTokenException`, 400], [_e]: _c, [_hE]: 400 },
491
492
  [_m],
492
493
  [0],
493
494
  ];
494
- TypeRegistry.for(n0).registerError(ExpiredTokenException, ExpiredTokenException$1);
495
- var IDPCommunicationErrorException = [
495
+ TypeRegistry.for(n0).registerError(ExpiredTokenException$, ExpiredTokenException);
496
+ var IDPCommunicationErrorException$ = [
496
497
  -3,
497
498
  n0,
498
499
  _IDPCEE,
499
- { [_e]: _c, [_hE]: 400, [_aQE]: [`IDPCommunicationError`, 400] },
500
+ { [_aQE]: [`IDPCommunicationError`, 400], [_e]: _c, [_hE]: 400 },
500
501
  [_m],
501
502
  [0],
502
503
  ];
503
- TypeRegistry.for(n0).registerError(IDPCommunicationErrorException, IDPCommunicationErrorException$1);
504
- var IDPRejectedClaimException = [
504
+ TypeRegistry.for(n0).registerError(IDPCommunicationErrorException$, IDPCommunicationErrorException);
505
+ var IDPRejectedClaimException$ = [
505
506
  -3,
506
507
  n0,
507
508
  _IDPRCE,
508
- { [_e]: _c, [_hE]: 403, [_aQE]: [`IDPRejectedClaim`, 403] },
509
+ { [_aQE]: [`IDPRejectedClaim`, 403], [_e]: _c, [_hE]: 403 },
509
510
  [_m],
510
511
  [0],
511
512
  ];
512
- TypeRegistry.for(n0).registerError(IDPRejectedClaimException, IDPRejectedClaimException$1);
513
- var InvalidIdentityTokenException = [
513
+ TypeRegistry.for(n0).registerError(IDPRejectedClaimException$, IDPRejectedClaimException);
514
+ var InvalidIdentityTokenException$ = [
514
515
  -3,
515
516
  n0,
516
517
  _IITE,
517
- { [_e]: _c, [_hE]: 400, [_aQE]: [`InvalidIdentityToken`, 400] },
518
+ { [_aQE]: [`InvalidIdentityToken`, 400], [_e]: _c, [_hE]: 400 },
518
519
  [_m],
519
520
  [0],
520
521
  ];
521
- TypeRegistry.for(n0).registerError(InvalidIdentityTokenException, InvalidIdentityTokenException$1);
522
- var MalformedPolicyDocumentException = [
522
+ TypeRegistry.for(n0).registerError(InvalidIdentityTokenException$, InvalidIdentityTokenException);
523
+ var MalformedPolicyDocumentException$ = [
523
524
  -3,
524
525
  n0,
525
526
  _MPDE,
526
- { [_e]: _c, [_hE]: 400, [_aQE]: [`MalformedPolicyDocument`, 400] },
527
+ { [_aQE]: [`MalformedPolicyDocument`, 400], [_e]: _c, [_hE]: 400 },
527
528
  [_m],
528
529
  [0],
529
530
  ];
530
- TypeRegistry.for(n0).registerError(MalformedPolicyDocumentException, MalformedPolicyDocumentException$1);
531
- var PackedPolicyTooLargeException = [
531
+ TypeRegistry.for(n0).registerError(MalformedPolicyDocumentException$, MalformedPolicyDocumentException);
532
+ var PackedPolicyTooLargeException$ = [
532
533
  -3,
533
534
  n0,
534
535
  _PPTLE,
535
- { [_e]: _c, [_hE]: 400, [_aQE]: [`PackedPolicyTooLarge`, 400] },
536
+ { [_aQE]: [`PackedPolicyTooLarge`, 400], [_e]: _c, [_hE]: 400 },
536
537
  [_m],
537
538
  [0],
538
539
  ];
539
- TypeRegistry.for(n0).registerError(PackedPolicyTooLargeException, PackedPolicyTooLargeException$1);
540
- var PolicyDescriptorType = [3, n0, _PDT, 0, [_a], [0]];
541
- var ProvidedContext = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]];
542
- var RegionDisabledException = [
540
+ TypeRegistry.for(n0).registerError(PackedPolicyTooLargeException$, PackedPolicyTooLargeException);
541
+ var PolicyDescriptorType$ = [3, n0, _PDT, 0, [_a], [0]];
542
+ var ProvidedContext$ = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]];
543
+ var RegionDisabledException$ = [
543
544
  -3,
544
545
  n0,
545
546
  _RDE,
546
- { [_e]: _c, [_hE]: 403, [_aQE]: [`RegionDisabledException`, 403] },
547
+ { [_aQE]: [`RegionDisabledException`, 403], [_e]: _c, [_hE]: 403 },
547
548
  [_m],
548
549
  [0],
549
550
  ];
550
- TypeRegistry.for(n0).registerError(RegionDisabledException, RegionDisabledException$1);
551
- var Tag = [3, n0, _Ta, 0, [_K, _V], [0, 0]];
552
- var STSServiceException = [-3, _s, "STSServiceException", 0, [], []];
553
- TypeRegistry.for(_s).registerError(STSServiceException, STSServiceException$1);
554
- var policyDescriptorListType = [1, n0, _pDLT, 0, () => PolicyDescriptorType];
555
- var ProvidedContextsListType = [1, n0, _PCLT, 0, () => ProvidedContext];
556
- var tagListType = [1, n0, _tLT, 0, () => Tag];
557
- var AssumeRole = [9, n0, _AR, 0, () => AssumeRoleRequest, () => AssumeRoleResponse];
558
- var AssumeRoleWithWebIdentity = [
551
+ TypeRegistry.for(n0).registerError(RegionDisabledException$, RegionDisabledException);
552
+ var Tag$ = [3, n0, _Ta, 0, [_K, _V], [0, 0]];
553
+ var STSServiceException$ = [-3, _s, "STSServiceException", 0, [], []];
554
+ TypeRegistry.for(_s).registerError(STSServiceException$, STSServiceException);
555
+ var policyDescriptorListType = [1, n0, _pDLT, 0, () => PolicyDescriptorType$];
556
+ var ProvidedContextsListType = [1, n0, _PCLT, 0, () => ProvidedContext$];
557
+ var tagListType = [1, n0, _tLT, 0, () => Tag$];
558
+ var AssumeRole$ = [9, n0, _AR, 0, () => AssumeRoleRequest$, () => AssumeRoleResponse$];
559
+ var AssumeRoleWithWebIdentity$ = [
559
560
  9,
560
561
  n0,
561
562
  _ARWWI,
562
563
  0,
563
- () => AssumeRoleWithWebIdentityRequest,
564
- () => AssumeRoleWithWebIdentityResponse,
564
+ () => AssumeRoleWithWebIdentityRequest$,
565
+ () => AssumeRoleWithWebIdentityResponse$,
565
566
  ];
566
567
 
567
568
  class AssumeRoleCommand extends Command
@@ -572,7 +573,7 @@ class AssumeRoleCommand extends Command
572
573
  })
573
574
  .s("AWSSecurityTokenServiceV20110615", "AssumeRole", {})
574
575
  .n("STSClient", "AssumeRoleCommand")
575
- .sc(AssumeRole)
576
+ .sc(AssumeRole$)
576
577
  .build() {
577
578
  }
578
579
 
@@ -584,7 +585,7 @@ class AssumeRoleWithWebIdentityCommand extends Command
584
585
  })
585
586
  .s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {})
586
587
  .n("STSClient", "AssumeRoleWithWebIdentityCommand")
587
- .sc(AssumeRoleWithWebIdentity)
588
+ .sc(AssumeRoleWithWebIdentity$)
588
589
  .build() {
589
590
  }
590
591
 
@@ -600,9 +601,10 @@ const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
600
601
  const resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
601
602
  const region = typeof _region === "function" ? await _region() : _region;
602
603
  const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
603
- const stsDefaultRegion = await stsRegionDefaultResolver(loaderConfig)();
604
+ let stsDefaultRegion = "";
605
+ const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await stsRegionDefaultResolver(loaderConfig)());
604
606
  credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);
605
- return region ?? parentRegion ?? stsDefaultRegion;
607
+ return resolvedRegion;
606
608
  };
607
609
  const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {
608
610
  let stsClient;
@@ -702,4 +704,4 @@ const getCustomizableStsClientCtor = (baseCtor, customizations) => {
702
704
  const getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
703
705
  const getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
704
706
 
705
- export { Command as $Command, AssumeRoleCommand, AssumeRoleWithWebIdentityCommand, ExpiredTokenException$1 as ExpiredTokenException, IDPCommunicationErrorException$1 as IDPCommunicationErrorException, IDPRejectedClaimException$1 as IDPRejectedClaimException, InvalidIdentityTokenException$1 as InvalidIdentityTokenException, MalformedPolicyDocumentException$1 as MalformedPolicyDocumentException, PackedPolicyTooLargeException$1 as PackedPolicyTooLargeException, RegionDisabledException$1 as RegionDisabledException, STSClient, STSServiceException$1 as STSServiceException, Client as __Client, getDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity };
707
+ export { Command as $Command, AssumeRole$, AssumeRoleCommand, AssumeRoleRequest$, AssumeRoleResponse$, AssumeRoleWithWebIdentity$, AssumeRoleWithWebIdentityCommand, AssumeRoleWithWebIdentityRequest$, AssumeRoleWithWebIdentityResponse$, AssumedRoleUser$, Credentials$, ExpiredTokenException, ExpiredTokenException$, IDPCommunicationErrorException, IDPCommunicationErrorException$, IDPRejectedClaimException, IDPRejectedClaimException$, InvalidIdentityTokenException, InvalidIdentityTokenException$, MalformedPolicyDocumentException, MalformedPolicyDocumentException$, PackedPolicyTooLargeException, PackedPolicyTooLargeException$, PolicyDescriptorType$, ProvidedContext$, RegionDisabledException, RegionDisabledException$, STSClient, STSServiceException, STSServiceException$, Tag$, Client as __Client, getDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity };
@@ -1,10 +1,10 @@
1
- import { C as CredentialsProviderError, s as setCredentialFeature, u as chain, k as getProfileName, v as readFile, H as HttpRequest } from './index-CDPFly99.mjs';
1
+ import { C as CredentialsProviderError, s as setCredentialFeature, u as chain, k as getProfileName, v as readFile, H as HttpRequest } from './index-AssUn9IY.mjs';
2
2
  import { createHash, createPrivateKey, createPublicKey, sign } from 'node:crypto';
3
3
  import { promises } from 'node:fs';
4
4
  import { homedir } from 'node:os';
5
5
  import { dirname, join } from 'node:path';
6
- import { p as parseKnownFiles } from './parseKnownFiles-DsgpkpKC.mjs';
7
- import './readMergedOptions-uWSetyes.mjs';
6
+ import { p as parseKnownFiles } from './parseKnownFiles-KczcjlE0.mjs';
7
+ import './readMergedOptions-D6niy_Ep.mjs';
8
8
  import 'zod';
9
9
  import '@commander-js/extra-typings';
10
10
  import './readDotenvCascade-HLU7FsEQ.mjs';
@@ -32,19 +32,19 @@ import 'process';
32
32
  const resolveCredentialSource = (credentialSource, profileName, logger) => {
33
33
  const sourceProvidersMap = {
34
34
  EcsContainer: async (options) => {
35
- const { fromHttp } = await import('./index-BfVeLAui.mjs');
36
- const { fromContainerMetadata } = await import('./index-Bmw8WxM1.mjs');
35
+ const { fromHttp } = await import('./index-xRi3oKvY.mjs');
36
+ const { fromContainerMetadata } = await import('./index-DfvhftMN.mjs');
37
37
  logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
38
38
  return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
39
39
  },
40
40
  Ec2InstanceMetadata: async (options) => {
41
41
  logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
42
- const { fromInstanceMetadata } = await import('./index-Bmw8WxM1.mjs');
42
+ const { fromInstanceMetadata } = await import('./index-DfvhftMN.mjs');
43
43
  return async () => fromInstanceMetadata(options)().then(setNamedProvider);
44
44
  },
45
45
  Environment: async (options) => {
46
46
  logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
47
- const { fromEnv } = await import('./index-udC0OkWn.mjs');
47
+ const { fromEnv } = await import('./index-DtdHVcXz.mjs');
48
48
  return async () => fromEnv(options)().then(setNamedProvider);
49
49
  },
50
50
  };
@@ -81,18 +81,19 @@ const isCredentialSourceProfile = (arg, { profile, logger }) => {
81
81
  }
82
82
  return withProviderProfile;
83
83
  };
84
- const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}, resolveProfileData) => {
84
+ const resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData) => {
85
85
  options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
86
86
  const profileData = profiles[profileName];
87
87
  const { source_profile, region } = profileData;
88
88
  if (!options.roleAssumer) {
89
- const { getDefaultRoleAssumer } = await import('./index-Cy9EnHMK.mjs');
89
+ const { getDefaultRoleAssumer } = await import('./index-CMSCF_uw.mjs');
90
90
  options.roleAssumer = getDefaultRoleAssumer({
91
91
  ...options.clientConfig,
92
92
  credentialProviderLogger: options.logger,
93
93
  parentClientConfig: {
94
+ ...callerClientConfig,
94
95
  ...options?.parentClientConfig,
95
- region: region ?? options?.parentClientConfig?.region,
96
+ region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region,
96
97
  },
97
98
  }, options.clientPlugins);
98
99
  }
@@ -103,7 +104,7 @@ const resolveAssumeRoleCredentials = async (profileName, profiles, options, visi
103
104
  }
104
105
  options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);
105
106
  const sourceCredsProvider = source_profile
106
- ? resolveProfileData(source_profile, profiles, options, {
107
+ ? resolveProfileData(source_profile, profiles, options, callerClientConfig, {
107
108
  ...visitedProfiles,
108
109
  [source_profile]: true,
109
110
  }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}))
@@ -171,7 +172,7 @@ class LoginCredentialsFetcher {
171
172
  return this.profileData.login_session;
172
173
  }
173
174
  async refresh(token) {
174
- const { SigninClient, CreateOAuth2TokenCommand } = await import('./index-37ce0nLC.mjs');
175
+ const { SigninClient, CreateOAuth2TokenCommand } = await import('./index-D8S1lJ24.mjs');
175
176
  const { logger, userAgentAppId } = this.callerClientConfig ?? {};
176
177
  const isH2 = (requestHandler) => {
177
178
  return requestHandler?.metadata?.handlerProtocol === "h2";
@@ -411,28 +412,30 @@ const fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {
411
412
  const isLoginProfile = (data) => {
412
413
  return Boolean(data && data.login_session);
413
414
  };
414
- const resolveLoginCredentials = async (profileName, options) => {
415
+ const resolveLoginCredentials = async (profileName, options, callerClientConfig) => {
415
416
  const credentials = await fromLoginCredentials({
416
417
  ...options,
417
418
  profile: profileName,
418
- })();
419
+ })({ callerClientConfig });
419
420
  return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC");
420
421
  };
421
422
 
422
423
  const isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
423
- const resolveProcessCredentials = async (options, profile) => import('./index-BjE-7W3n.mjs').then(({ fromProcess }) => fromProcess({
424
+ const resolveProcessCredentials = async (options, profile) => import('./index-mPj0Vhpw.mjs').then(({ fromProcess }) => fromProcess({
424
425
  ...options,
425
426
  profile,
426
427
  })().then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_PROCESS", "v")));
427
428
 
428
- const resolveSsoCredentials = async (profile, profileData, options = {}) => {
429
- const { fromSSO } = await import('./index-DeXLfLd1.mjs');
429
+ const resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {
430
+ const { fromSSO } = await import('./index-DY7wYcXW.mjs');
430
431
  return fromSSO({
431
432
  profile,
432
433
  logger: options.logger,
433
434
  parentClientConfig: options.parentClientConfig,
434
435
  clientConfig: options.clientConfig,
435
- })().then((creds) => {
436
+ })({
437
+ callerClientConfig,
438
+ }).then((creds) => {
436
439
  if (profileData.sso_session) {
437
440
  return setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r");
438
441
  }
@@ -471,54 +474,49 @@ const isWebIdentityProfile = (arg) => Boolean(arg) &&
471
474
  typeof arg.web_identity_token_file === "string" &&
472
475
  typeof arg.role_arn === "string" &&
473
476
  ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1;
474
- const resolveWebIdentityCredentials = async (profile, options) => import('./index-BHKFx7ea.mjs').then(({ fromTokenFile }) => fromTokenFile({
477
+ const resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => import('./index-B6r8O7PJ.mjs').then(({ fromTokenFile }) => fromTokenFile({
475
478
  webIdentityTokenFile: profile.web_identity_token_file,
476
479
  roleArn: profile.role_arn,
477
480
  roleSessionName: profile.role_session_name,
478
481
  roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
479
482
  logger: options.logger,
480
483
  parentClientConfig: options.parentClientConfig,
481
- })().then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q")));
484
+ })({
485
+ callerClientConfig,
486
+ }).then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q")));
482
487
 
483
- const resolveProfileData = async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
488
+ const resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
484
489
  const data = profiles[profileName];
485
490
  if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
486
491
  return resolveStaticCredentials(data, options);
487
492
  }
488
493
  if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {
489
- return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles, resolveProfileData);
494
+ return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData);
490
495
  }
491
496
  if (isStaticCredsProfile(data)) {
492
497
  return resolveStaticCredentials(data, options);
493
498
  }
494
499
  if (isWebIdentityProfile(data)) {
495
- return resolveWebIdentityCredentials(data, options);
500
+ return resolveWebIdentityCredentials(data, options, callerClientConfig);
496
501
  }
497
502
  if (isProcessProfile(data)) {
498
503
  return resolveProcessCredentials(options, profileName);
499
504
  }
500
505
  if (isSsoProfile(data)) {
501
- return await resolveSsoCredentials(profileName, data, options);
506
+ return await resolveSsoCredentials(profileName, data, options, callerClientConfig);
502
507
  }
503
508
  if (isLoginProfile(data)) {
504
- return resolveLoginCredentials(profileName, options);
509
+ return resolveLoginCredentials(profileName, options, callerClientConfig);
505
510
  }
506
511
  throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
507
512
  };
508
513
 
509
- const fromIni = (_init = {}) => async ({ callerClientConfig } = {}) => {
510
- const init = {
511
- ..._init,
512
- parentClientConfig: {
513
- ...callerClientConfig,
514
- ..._init.parentClientConfig,
515
- },
516
- };
514
+ const fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {
517
515
  init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
518
516
  const profiles = await parseKnownFiles(init);
519
517
  return resolveProfileData(getProfileName({
520
- profile: _init.profile ?? callerClientConfig?.profile,
521
- }), profiles, init);
518
+ profile: init.profile ?? callerClientConfig?.profile,
519
+ }), profiles, init, callerClientConfig);
522
520
  };
523
521
 
524
522
  export { fromIni };