@karmaniverous/get-dotenv 6.3.0 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +1 -1
  2. package/dist/chunks/{AwsRestJsonProtocol-Dv5q8CFK.mjs → AwsRestJsonProtocol-D_GDWyaH.mjs} +2 -2
  3. package/dist/chunks/{createCli-BSn6Be40.mjs → createCli-Ct22WCEC.mjs} +9 -6
  4. package/dist/chunks/{externalDataInterceptor-pqHO-Qmn.mjs → externalDataInterceptor-BRIxrVUl.mjs} +2 -2
  5. package/dist/chunks/{getSSOTokenFromFile-otmZHSRV.mjs → getSSOTokenFromFile-TYPZln9_.mjs} +1 -1
  6. package/dist/chunks/{index-C4Ac6feq.mjs → index-5AyAFomx.mjs} +12 -10
  7. package/dist/chunks/{index-CXpZ0pei.mjs → index-5NxTUVel.mjs} +9 -7
  8. package/dist/chunks/{index-BNcKuiBy.mjs → index-BCVlyd0W.mjs} +12 -10
  9. package/dist/chunks/{index-CYoFYXZv.mjs → index-BMb3Lxzl.mjs} +10 -8
  10. package/dist/chunks/{index-CGg5wWCm.mjs → index-BNWgREzT.mjs} +8 -6
  11. package/dist/chunks/{index-eZMlmESW.mjs → index-BSO6unyj.mjs} +17 -15
  12. package/dist/chunks/{index-DLQEHTw4.mjs → index-Be7QY_7N.mjs} +10 -8
  13. package/dist/chunks/{index-BqZ3PB6c.mjs → index-BzOeGJbq.mjs} +115 -10
  14. package/dist/chunks/{index-B18W-ELX.mjs → index-CR4cJOVz.mjs} +7 -5
  15. package/dist/chunks/{index-C6uLiKpC.mjs → index-Dz-kRqKN.mjs} +7 -5
  16. package/dist/chunks/{index-DFNcs3pR.mjs → index-G-U0Dimh.mjs} +9 -7
  17. package/dist/chunks/{index-Bi0RIILn.mjs → index-LKToAIhZ.mjs} +7 -5
  18. package/dist/chunks/{index-DtRaL61T.mjs → index-jLjEQoIi.mjs} +7 -5
  19. package/dist/chunks/{loadSso-CJ_XUhEj.mjs → loadSso-BnjVSVhE.mjs} +9 -7
  20. package/dist/chunks/{loader-CePOf74i.mjs → loader-CE4HSRN4.mjs} +3 -0
  21. package/dist/chunks/{parseKnownFiles-B6x1cUmR.mjs → parseKnownFiles-CejYPe7q.mjs} +1 -1
  22. package/dist/chunks/readDotenvCascade-Bymjvyit.mjs +549 -0
  23. package/dist/chunks/{readMergedOptions-DLBDzpXX.mjs → readMergedOptions-DLRFU2qO.mjs} +99 -308
  24. package/dist/chunks/{resolveCliOptions-_qtsVxda.mjs → resolveCliOptions-C6oeNl9S.mjs} +4 -1
  25. package/dist/chunks/{sdk-stream-mixin-DCdC70Up.mjs → sdk-stream-mixin-BDitDomf.mjs} +1 -1
  26. package/dist/chunks/{spawnEnv-CQwFu7ZJ.mjs → spawnEnv-5kdIVv0x.mjs} +5 -2
  27. package/dist/chunks/{types-DdqcXCV1.mjs → types-BC96rfQj.mjs} +1 -1
  28. package/dist/cli.d.ts +218 -94
  29. package/dist/cli.mjs +10 -8
  30. package/dist/cliHost.d.ts +258 -97
  31. package/dist/cliHost.mjs +55 -8
  32. package/dist/config.d.ts +0 -10
  33. package/dist/config.mjs +4 -1
  34. package/dist/env-overlay.d.ts +308 -16
  35. package/dist/env-overlay.mjs +40 -1
  36. package/dist/getdotenv.cli.mjs +10 -8
  37. package/dist/index.d.ts +243 -115
  38. package/dist/index.mjs +223 -45
  39. package/dist/plugins-aws.d.ts +161 -26
  40. package/dist/plugins-aws.mjs +27 -6
  41. package/dist/plugins-batch.d.ts +150 -26
  42. package/dist/plugins-batch.mjs +6 -4
  43. package/dist/plugins-cmd.d.ts +149 -25
  44. package/dist/plugins-cmd.mjs +8 -6
  45. package/dist/plugins-init.d.ts +149 -25
  46. package/dist/plugins-init.mjs +5 -3
  47. package/dist/plugins.d.ts +161 -26
  48. package/dist/plugins.mjs +11 -9
  49. package/package.json +2 -1
  50. package/templates/config/ts/getdotenv.config.ts +5 -3
  51. package/dist/chunks/overlayEnv-Bqh_kPGA.mjs +0 -235
package/README.md CHANGED
@@ -22,7 +22,7 @@ See full guides:
22
22
 
23
23
  - [Getting started](./guides/getting-started.md)
24
24
  - [Config and overlays](./guides/config.md) (dynamic, validation, defaults):
25
- - [Dotenv editor (format-preserving)](./guides/dotenv-editor.md)
25
+ - [Dotenv editor (format-preserving)](./guides/dotenv-editor.md)
26
26
  - [Shell execution behavior, quoting, capture](./guides/shell.md)
27
27
  - [Shipped plugins](./guides/shipped/index.md)
28
28
  - [Authoring plugins](./guides/authoring/index.md) (host, lifecycle, exec, diagnostics)
@@ -1,5 +1,5 @@
1
- import { av as HttpProtocol, aw as NormalizedSchema, H as HttpRequest, ax as translateTraits, ay as extendedEncodeURIComponent, az as collectBody, aA as splitHeader, aB as SerdeContext, aC as FromStringShapeDeserializer, t as toUtf8, i as fromUtf8, aD as v4, aE as LazyJsonString, n as toBase64, aF as determineTimestampFormat, aG as dateToUtcString, aH as NumericValue, aI as SerdeContextConfig, aJ as deserializingStructIterator, m as fromBase64, aK as parseEpochTimestamp, aL as parseRfc7231DateTime, aM as parseRfc3339DateTimeWithOffset, aN as serializingStructIterator, aO as ProtocolLib, an as TypeRegistry } from './index-BNcKuiBy.mjs';
2
- import { s as sdkStreamMixin } from './sdk-stream-mixin-DCdC70Up.mjs';
1
+ import { av as HttpProtocol, aw as NormalizedSchema, H as HttpRequest, ax as translateTraits, ay as extendedEncodeURIComponent, az as collectBody, aA as splitHeader, aB as SerdeContext, aC as FromStringShapeDeserializer, t as toUtf8, i as fromUtf8, aD as v4, aE as LazyJsonString, n as toBase64, aF as determineTimestampFormat, aG as dateToUtcString, aH as NumericValue, aI as SerdeContextConfig, aJ as deserializingStructIterator, m as fromBase64, aK as parseEpochTimestamp, aL as parseRfc7231DateTime, aM as parseRfc3339DateTimeWithOffset, aN as serializingStructIterator, aO as ProtocolLib, an as TypeRegistry } from './index-BCVlyd0W.mjs';
2
+ import { s as sdkStreamMixin } from './sdk-stream-mixin-BDitDomf.mjs';
3
3
 
4
4
  function quoteHeader(part) {
5
5
  if (part.includes(",") || part.includes('"')) {
@@ -1,21 +1,24 @@
1
1
  import 'zod';
2
2
  import 'path';
3
- import { r as resolveGetDotenvConfigSources } from './loader-CePOf74i.mjs';
3
+ import { r as resolveGetDotenvConfigSources } from './loader-CE4HSRN4.mjs';
4
+ import 'nanoid';
4
5
  import 'fs-extra';
5
- import { a as defaultsDeep, g as getDotenvCliOptions2Options, b as baseRootOptionDefaults, G as GetDotenvCli, c as attachRootOptions } from './readMergedOptions-DLBDzpXX.mjs';
6
6
  import 'node:path';
7
+ import 'radash';
8
+ import 'node:buffer';
9
+ import { a as defaultsDeep, g as getDotenvCliOptions2Options, b as baseRootOptionDefaults, G as GetDotenvCli, c as attachRootOptions } from './readMergedOptions-DLRFU2qO.mjs';
7
10
  import 'crypto';
8
11
  import 'url';
9
- import 'nanoid';
12
+ import '@commander-js/extra-typings';
10
13
  import 'dotenv';
11
14
  import 'execa';
12
15
  import { t as toHelpConfig } from './helpConfig-CGejgwWW.mjs';
13
- import { r as resolveCliOptions } from './resolveCliOptions-_qtsVxda.mjs';
16
+ import { r as resolveCliOptions } from './resolveCliOptions-C6oeNl9S.mjs';
14
17
  import { v as validateEnvAgainstSources } from './validate-CDl0rE6k.mjs';
15
18
  import { awsPlugin } from '../plugins-aws.mjs';
16
- import { a as awsWhoamiPlugin } from './index-BNcKuiBy.mjs';
19
+ import { a as awsWhoamiPlugin } from './index-BCVlyd0W.mjs';
17
20
  import { batchPlugin } from '../plugins-batch.mjs';
18
- import { c as cmdPlugin } from './index-BqZ3PB6c.mjs';
21
+ import { c as cmdPlugin } from './index-BzOeGJbq.mjs';
19
22
  import { initPlugin } from '../plugins-init.mjs';
20
23
 
21
24
  const dbg = (...args) => {
@@ -1,5 +1,5 @@
1
- import { t as tokenIntercept } from './getSSOTokenFromFile-otmZHSRV.mjs';
2
- import { h as fileIntercept } from './index-BNcKuiBy.mjs';
1
+ import { t as tokenIntercept } from './getSSOTokenFromFile-TYPZln9_.mjs';
2
+ import { h as fileIntercept } from './index-BCVlyd0W.mjs';
3
3
 
4
4
  const externalDataInterceptor = {
5
5
  getFileRecord() {
@@ -1,7 +1,7 @@
1
1
  import { readFile } from 'fs/promises';
2
2
  import { createHash } from 'crypto';
3
3
  import { join } from 'path';
4
- import { j as getHomeDir } from './index-BNcKuiBy.mjs';
4
+ import { j as getHomeDir } from './index-BCVlyd0W.mjs';
5
5
 
6
6
  const getSSOTokenFilepath = (id) => {
7
7
  const hasher = createHash("sha1");
@@ -1,20 +1,22 @@
1
- import { aq as ProviderError, ar as IniSectionType, as as CONFIG_PREFIX_SEPARATOR, v as readFile, at as getConfigFilepath, au as parseIni, k as getProfileName, C as CredentialsProviderError, s as setCredentialFeature } from './index-BNcKuiBy.mjs';
1
+ import { aq as ProviderError, ar as IniSectionType, as as CONFIG_PREFIX_SEPARATOR, v as readFile, at as getConfigFilepath, au as parseIni, k as getProfileName, C as CredentialsProviderError, s as setCredentialFeature } from './index-BCVlyd0W.mjs';
2
2
  import { promises } from 'fs';
3
- import { g as getSSOTokenFilepath, a as getSSOTokenFromFile } from './getSSOTokenFromFile-otmZHSRV.mjs';
4
- import { p as parseKnownFiles } from './parseKnownFiles-B6x1cUmR.mjs';
5
- import './readMergedOptions-DLBDzpXX.mjs';
3
+ import { g as getSSOTokenFilepath, a as getSSOTokenFromFile } from './getSSOTokenFromFile-TYPZln9_.mjs';
4
+ import { p as parseKnownFiles } from './parseKnownFiles-CejYPe7q.mjs';
5
+ import './readMergedOptions-DLRFU2qO.mjs';
6
6
  import 'zod';
7
7
  import '@commander-js/extra-typings';
8
- import './overlayEnv-Bqh_kPGA.mjs';
8
+ import './readDotenvCascade-Bymjvyit.mjs';
9
9
  import 'fs-extra';
10
+ import 'radash';
11
+ import 'node:buffer';
10
12
  import 'node:path';
11
13
  import './loadModuleDefault-Dj8B3Stt.mjs';
12
14
  import 'crypto';
13
15
  import 'path';
14
16
  import 'url';
15
- import 'nanoid';
16
17
  import 'dotenv';
17
- import './loader-CePOf74i.mjs';
18
+ import 'nanoid';
19
+ import './loader-CE4HSRN4.mjs';
18
20
  import 'package-directory';
19
21
  import 'yaml';
20
22
  import 'execa';
@@ -57,7 +59,7 @@ const EXPIRE_WINDOW_MS = 5 * 60 * 1000;
57
59
  const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
58
60
 
59
61
  const getSsoOidcClient = async (ssoRegion, init = {}) => {
60
- const { SSOOIDCClient } = await import('./index-CXpZ0pei.mjs');
62
+ const { SSOOIDCClient } = await import('./index-5NxTUVel.mjs');
61
63
  const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop];
62
64
  const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {
63
65
  region: ssoRegion ?? init.clientConfig?.region,
@@ -68,7 +70,7 @@ const getSsoOidcClient = async (ssoRegion, init = {}) => {
68
70
  };
69
71
 
70
72
  const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}) => {
71
- const { CreateTokenCommand } = await import('./index-CXpZ0pei.mjs');
73
+ const { CreateTokenCommand } = await import('./index-5NxTUVel.mjs');
72
74
  const ssoOidcClient = await getSsoOidcClient(ssoRegion, init);
73
75
  return ssoOidcClient.send(new CreateTokenCommand({
74
76
  clientId: ssoToken.clientId,
@@ -221,7 +223,7 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
221
223
  });
222
224
  }
223
225
  const { accessToken } = token;
224
- const { SSOClient, GetRoleCredentialsCommand } = await import('./loadSso-CJ_XUhEj.mjs');
226
+ const { SSOClient, GetRoleCredentialsCommand } = await import('./loadSso-BnjVSVhE.mjs');
225
227
  const sso = ssoClient ||
226
228
  new SSOClient(Object.assign({}, clientConfig ?? {}, {
227
229
  logger: clientConfig?.logger ?? parentClientConfig?.logger,
@@ -1,19 +1,21 @@
1
- import { 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, 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, O as loadConfig, 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, X as NODE_REGION_CONFIG_FILE_OPTIONS, Y as NODE_REGION_CONFIG_OPTIONS, 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 } from './index-BNcKuiBy.mjs';
1
+ import { 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, 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, O as loadConfig, 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, X as NODE_REGION_CONFIG_FILE_OPTIONS, Y as NODE_REGION_CONFIG_OPTIONS, 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 } from './index-BCVlyd0W.mjs';
2
2
  import { p as packageInfo } from './package-boo9EyYs.mjs';
3
- import { A as AwsRestJsonProtocol } from './AwsRestJsonProtocol-Dv5q8CFK.mjs';
4
- import './readMergedOptions-DLBDzpXX.mjs';
3
+ import { A as AwsRestJsonProtocol } from './AwsRestJsonProtocol-D_GDWyaH.mjs';
4
+ import './readMergedOptions-DLRFU2qO.mjs';
5
5
  import 'zod';
6
6
  import '@commander-js/extra-typings';
7
- import './overlayEnv-Bqh_kPGA.mjs';
7
+ import './readDotenvCascade-Bymjvyit.mjs';
8
8
  import 'fs-extra';
9
+ import 'radash';
10
+ import 'node:buffer';
9
11
  import 'node:path';
10
12
  import './loadModuleDefault-Dj8B3Stt.mjs';
11
13
  import 'crypto';
12
14
  import 'path';
13
15
  import 'url';
14
- import 'nanoid';
15
16
  import 'dotenv';
16
- import './loader-CePOf74i.mjs';
17
+ import 'nanoid';
18
+ import './loader-CE4HSRN4.mjs';
17
19
  import 'package-directory';
18
20
  import 'yaml';
19
21
  import 'execa';
@@ -25,7 +27,7 @@ import 'https';
25
27
  import 'stream';
26
28
  import 'process';
27
29
  import 'node:fs';
28
- import './sdk-stream-mixin-DCdC70Up.mjs';
30
+ import './sdk-stream-mixin-BDitDomf.mjs';
29
31
 
30
32
  const defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {
31
33
  return {
@@ -1,5 +1,7 @@
1
- import { d as definePlugin } from './readMergedOptions-DLBDzpXX.mjs';
1
+ import { d as definePlugin } from './readMergedOptions-DLRFU2qO.mjs';
2
2
  import 'execa';
3
+ import 'radash';
4
+ import 'node:buffer';
3
5
  import 'fs-extra';
4
6
  import 'node:path';
5
7
  import crypto$1, { createHmac, createHash } from 'crypto';
@@ -8,7 +10,7 @@ import 'url';
8
10
  import '@commander-js/extra-typings';
9
11
  import 'nanoid';
10
12
  import 'dotenv';
11
- import './loader-CePOf74i.mjs';
13
+ import './loader-CE4HSRN4.mjs';
12
14
  import 'package-directory';
13
15
  import 'yaml';
14
16
  import 'zod';
@@ -2182,7 +2184,7 @@ class HttpProtocol extends SerdeContext {
2182
2184
  });
2183
2185
  }
2184
2186
  async loadEventStreamCapability() {
2185
- const { EventStreamSerde } = await import('./index-B18W-ELX.mjs');
2187
+ const { EventStreamSerde } = await import('./index-CR4cJOVz.mjs');
2186
2188
  return new EventStreamSerde({
2187
2189
  marshaller: this.getEventStreamMarshaller(),
2188
2190
  serializer: this.serializer,
@@ -8483,10 +8485,10 @@ const fromEnv = (init) => async () => {
8483
8485
 
8484
8486
  const ENV_IMDS_DISABLED$1 = "AWS_EC2_METADATA_DISABLED";
8485
8487
  const remoteProvider = async (init) => {
8486
- const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await import('./index-DtRaL61T.mjs');
8488
+ const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await import('./index-jLjEQoIi.mjs');
8487
8489
  if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {
8488
8490
  init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");
8489
- const { fromHttp } = await import('./index-CGg5wWCm.mjs');
8491
+ const { fromHttp } = await import('./index-BNWgREzT.mjs');
8490
8492
  return chain(fromHttp(init), fromContainerMetadata(init));
8491
8493
  }
8492
8494
  if (process.env[ENV_IMDS_DISABLED$1] && process.env[ENV_IMDS_DISABLED$1] !== "false") {
@@ -8590,22 +8592,22 @@ const defaultProvider = (init = {}) => memoizeChain([
8590
8592
  if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
8591
8593
  throw new CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger });
8592
8594
  }
8593
- const { fromSSO } = await import('./index-C4Ac6feq.mjs');
8595
+ const { fromSSO } = await import('./index-5AyAFomx.mjs');
8594
8596
  return fromSSO(init)(awsIdentityProperties);
8595
8597
  },
8596
8598
  async (awsIdentityProperties) => {
8597
8599
  init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");
8598
- const { fromIni } = await import('./index-eZMlmESW.mjs');
8600
+ const { fromIni } = await import('./index-BSO6unyj.mjs');
8599
8601
  return fromIni(init)(awsIdentityProperties);
8600
8602
  },
8601
8603
  async (awsIdentityProperties) => {
8602
8604
  init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");
8603
- const { fromProcess } = await import('./index-CYoFYXZv.mjs');
8605
+ const { fromProcess } = await import('./index-BMb3Lxzl.mjs');
8604
8606
  return fromProcess(init)(awsIdentityProperties);
8605
8607
  },
8606
8608
  async (awsIdentityProperties) => {
8607
8609
  init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");
8608
- const { fromTokenFile } = await import('./index-DLQEHTw4.mjs');
8610
+ const { fromTokenFile } = await import('./index-Be7QY_7N.mjs');
8609
8611
  return fromTokenFile(init)(awsIdentityProperties);
8610
8612
  },
8611
8613
  async () => {
@@ -8778,7 +8780,7 @@ const inferPhysicalRegion = async () => {
8778
8780
  }
8779
8781
  if (!process.env[ENV_IMDS_DISABLED]) {
8780
8782
  try {
8781
- const { getInstanceMetadataEndpoint, httpRequest } = await import('./index-DtRaL61T.mjs');
8783
+ const { getInstanceMetadataEndpoint, httpRequest } = await import('./index-jLjEQoIi.mjs');
8782
8784
  const endpoint = await getInstanceMetadataEndpoint();
8783
8785
  return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString();
8784
8786
  }
@@ -1,21 +1,23 @@
1
1
  import { exec } from 'child_process';
2
2
  import { promisify } from 'util';
3
- import { s as setCredentialFeature, C as CredentialsProviderError, k as getProfileName } from './index-BNcKuiBy.mjs';
4
- import { e as externalDataInterceptor } from './externalDataInterceptor-pqHO-Qmn.mjs';
5
- import { p as parseKnownFiles } from './parseKnownFiles-B6x1cUmR.mjs';
6
- import './readMergedOptions-DLBDzpXX.mjs';
3
+ import { s as setCredentialFeature, C as CredentialsProviderError, k as getProfileName } from './index-BCVlyd0W.mjs';
4
+ import { e as externalDataInterceptor } from './externalDataInterceptor-BRIxrVUl.mjs';
5
+ import { p as parseKnownFiles } from './parseKnownFiles-CejYPe7q.mjs';
6
+ import './readMergedOptions-DLRFU2qO.mjs';
7
7
  import 'zod';
8
8
  import '@commander-js/extra-typings';
9
- import './overlayEnv-Bqh_kPGA.mjs';
9
+ import './readDotenvCascade-Bymjvyit.mjs';
10
10
  import 'fs-extra';
11
+ import 'radash';
12
+ import 'node:buffer';
11
13
  import 'node:path';
12
14
  import './loadModuleDefault-Dj8B3Stt.mjs';
13
15
  import 'crypto';
14
16
  import 'path';
15
17
  import 'url';
16
- import 'nanoid';
17
18
  import 'dotenv';
18
- import './loader-CePOf74i.mjs';
19
+ import 'nanoid';
20
+ import './loader-CE4HSRN4.mjs';
19
21
  import 'package-directory';
20
22
  import 'yaml';
21
23
  import 'execa';
@@ -27,7 +29,7 @@ import 'https';
27
29
  import 'stream';
28
30
  import 'process';
29
31
  import 'node:fs';
30
- import './getSSOTokenFromFile-otmZHSRV.mjs';
32
+ import './getSSOTokenFromFile-TYPZln9_.mjs';
31
33
  import 'fs/promises';
32
34
 
33
35
  const getValidatedProcessCredentials = (profileName, data, profiles) => {
@@ -1,19 +1,21 @@
1
1
  import fs from 'fs/promises';
2
- import { C as CredentialsProviderError, H as HttpRequest, p as parseRfc3339DateTime, N as NodeHttpHandler, s as setCredentialFeature } from './index-BNcKuiBy.mjs';
3
- import { s as sdkStreamMixin } from './sdk-stream-mixin-DCdC70Up.mjs';
4
- import './readMergedOptions-DLBDzpXX.mjs';
2
+ import { C as CredentialsProviderError, H as HttpRequest, p as parseRfc3339DateTime, N as NodeHttpHandler, s as setCredentialFeature } from './index-BCVlyd0W.mjs';
3
+ import { s as sdkStreamMixin } from './sdk-stream-mixin-BDitDomf.mjs';
4
+ import './readMergedOptions-DLRFU2qO.mjs';
5
5
  import 'zod';
6
6
  import '@commander-js/extra-typings';
7
- import './overlayEnv-Bqh_kPGA.mjs';
7
+ import './readDotenvCascade-Bymjvyit.mjs';
8
8
  import 'fs-extra';
9
+ import 'radash';
10
+ import 'node:buffer';
9
11
  import 'node:path';
10
12
  import './loadModuleDefault-Dj8B3Stt.mjs';
11
13
  import 'crypto';
12
14
  import 'path';
13
15
  import 'url';
14
- import 'nanoid';
15
16
  import 'dotenv';
16
- import './loader-CePOf74i.mjs';
17
+ import 'nanoid';
18
+ import './loader-CE4HSRN4.mjs';
17
19
  import 'package-directory';
18
20
  import 'yaml';
19
21
  import 'execa';
@@ -1,21 +1,23 @@
1
- import { C as CredentialsProviderError, s as setCredentialFeature, u as chain, k as getProfileName, v as readFile, H as HttpRequest } from './index-BNcKuiBy.mjs';
1
+ import { C as CredentialsProviderError, s as setCredentialFeature, u as chain, k as getProfileName, v as readFile, H as HttpRequest } from './index-BCVlyd0W.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-B6x1cUmR.mjs';
7
- import './readMergedOptions-DLBDzpXX.mjs';
6
+ import { p as parseKnownFiles } from './parseKnownFiles-CejYPe7q.mjs';
7
+ import './readMergedOptions-DLRFU2qO.mjs';
8
8
  import 'zod';
9
9
  import '@commander-js/extra-typings';
10
- import './overlayEnv-Bqh_kPGA.mjs';
10
+ import './readDotenvCascade-Bymjvyit.mjs';
11
11
  import 'fs-extra';
12
+ import 'radash';
13
+ import 'node:buffer';
12
14
  import './loadModuleDefault-Dj8B3Stt.mjs';
13
15
  import 'crypto';
14
16
  import 'path';
15
17
  import 'url';
16
- import 'nanoid';
17
18
  import 'dotenv';
18
- import './loader-CePOf74i.mjs';
19
+ import 'nanoid';
20
+ import './loader-CE4HSRN4.mjs';
19
21
  import 'package-directory';
20
22
  import 'yaml';
21
23
  import 'execa';
@@ -30,19 +32,19 @@ import 'process';
30
32
  const resolveCredentialSource = (credentialSource, profileName, logger) => {
31
33
  const sourceProvidersMap = {
32
34
  EcsContainer: async (options) => {
33
- const { fromHttp } = await import('./index-CGg5wWCm.mjs');
34
- const { fromContainerMetadata } = await import('./index-DtRaL61T.mjs');
35
+ const { fromHttp } = await import('./index-BNWgREzT.mjs');
36
+ const { fromContainerMetadata } = await import('./index-jLjEQoIi.mjs');
35
37
  logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
36
38
  return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
37
39
  },
38
40
  Ec2InstanceMetadata: async (options) => {
39
41
  logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
40
- const { fromInstanceMetadata } = await import('./index-DtRaL61T.mjs');
42
+ const { fromInstanceMetadata } = await import('./index-jLjEQoIi.mjs');
41
43
  return async () => fromInstanceMetadata(options)().then(setNamedProvider);
42
44
  },
43
45
  Environment: async (options) => {
44
46
  logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
45
- const { fromEnv } = await import('./index-Bi0RIILn.mjs');
47
+ const { fromEnv } = await import('./index-LKToAIhZ.mjs');
46
48
  return async () => fromEnv(options)().then(setNamedProvider);
47
49
  },
48
50
  };
@@ -84,7 +86,7 @@ const resolveAssumeRoleCredentials = async (profileName, profiles, options, visi
84
86
  const profileData = profiles[profileName];
85
87
  const { source_profile, region } = profileData;
86
88
  if (!options.roleAssumer) {
87
- const { getDefaultRoleAssumer } = await import('./index-C6uLiKpC.mjs');
89
+ const { getDefaultRoleAssumer } = await import('./index-Dz-kRqKN.mjs');
88
90
  options.roleAssumer = getDefaultRoleAssumer({
89
91
  ...options.clientConfig,
90
92
  credentialProviderLogger: options.logger,
@@ -169,7 +171,7 @@ class LoginCredentialsFetcher {
169
171
  return this.profileData.login_session;
170
172
  }
171
173
  async refresh(token) {
172
- const { SigninClient, CreateOAuth2TokenCommand } = await import('./index-DFNcs3pR.mjs');
174
+ const { SigninClient, CreateOAuth2TokenCommand } = await import('./index-G-U0Dimh.mjs');
173
175
  const { logger, userAgentAppId } = this.callerClientConfig ?? {};
174
176
  const isH2 = (requestHandler) => {
175
177
  return requestHandler?.metadata?.handlerProtocol === "h2";
@@ -418,13 +420,13 @@ const resolveLoginCredentials = async (profileName, options) => {
418
420
  };
419
421
 
420
422
  const isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
421
- const resolveProcessCredentials = async (options, profile) => import('./index-CYoFYXZv.mjs').then(({ fromProcess }) => fromProcess({
423
+ const resolveProcessCredentials = async (options, profile) => import('./index-BMb3Lxzl.mjs').then(({ fromProcess }) => fromProcess({
422
424
  ...options,
423
425
  profile,
424
426
  })().then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_PROCESS", "v")));
425
427
 
426
428
  const resolveSsoCredentials = async (profile, profileData, options = {}) => {
427
- const { fromSSO } = await import('./index-C4Ac6feq.mjs');
429
+ const { fromSSO } = await import('./index-5AyAFomx.mjs');
428
430
  return fromSSO({
429
431
  profile,
430
432
  logger: options.logger,
@@ -469,7 +471,7 @@ const isWebIdentityProfile = (arg) => Boolean(arg) &&
469
471
  typeof arg.web_identity_token_file === "string" &&
470
472
  typeof arg.role_arn === "string" &&
471
473
  ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1;
472
- const resolveWebIdentityCredentials = async (profile, options) => import('./index-DLQEHTw4.mjs').then(({ fromTokenFile }) => fromTokenFile({
474
+ const resolveWebIdentityCredentials = async (profile, options) => import('./index-Be7QY_7N.mjs').then(({ fromTokenFile }) => fromTokenFile({
473
475
  webIdentityTokenFile: profile.web_identity_token_file,
474
476
  roleArn: profile.role_arn,
475
477
  roleSessionName: profile.role_session_name,
@@ -1,21 +1,23 @@
1
1
  import { readFileSync } from 'fs';
2
- import { e as externalDataInterceptor } from './externalDataInterceptor-pqHO-Qmn.mjs';
3
- import { C as CredentialsProviderError, s as setCredentialFeature } from './index-BNcKuiBy.mjs';
4
- import './getSSOTokenFromFile-otmZHSRV.mjs';
2
+ import { e as externalDataInterceptor } from './externalDataInterceptor-BRIxrVUl.mjs';
3
+ import { C as CredentialsProviderError, s as setCredentialFeature } from './index-BCVlyd0W.mjs';
4
+ import './getSSOTokenFromFile-TYPZln9_.mjs';
5
5
  import 'fs/promises';
6
6
  import 'crypto';
7
7
  import 'path';
8
- import './readMergedOptions-DLBDzpXX.mjs';
8
+ import './readMergedOptions-DLRFU2qO.mjs';
9
9
  import 'zod';
10
10
  import '@commander-js/extra-typings';
11
- import './overlayEnv-Bqh_kPGA.mjs';
11
+ import './readDotenvCascade-Bymjvyit.mjs';
12
12
  import 'fs-extra';
13
+ import 'radash';
14
+ import 'node:buffer';
13
15
  import 'node:path';
14
16
  import './loadModuleDefault-Dj8B3Stt.mjs';
15
17
  import 'url';
16
- import 'nanoid';
17
18
  import 'dotenv';
18
- import './loader-CePOf74i.mjs';
19
+ import 'nanoid';
20
+ import './loader-CE4HSRN4.mjs';
19
21
  import 'package-directory';
20
22
  import 'yaml';
21
23
  import 'execa';
@@ -33,7 +35,7 @@ const fromWebToken = (init) => async (awsIdentityProperties) => {
33
35
  const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;
34
36
  let { roleAssumerWithWebIdentity } = init;
35
37
  if (!roleAssumerWithWebIdentity) {
36
- const { getDefaultRoleAssumerWithWebIdentity } = await import('./index-C6uLiKpC.mjs');
38
+ const { getDefaultRoleAssumerWithWebIdentity } = await import('./index-Dz-kRqKN.mjs');
37
39
  roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
38
40
  ...init.clientConfig,
39
41
  credentialProviderLogger: init.logger,
@@ -1,5 +1,7 @@
1
- import { l as redactTriple, m as maybeWarnEntropy, r as readMergedOptions, g as getDotenvCliOptions2Options, d as definePlugin } from './readMergedOptions-DLBDzpXX.mjs';
1
+ import { camel } from 'radash';
2
+ import { r as readMergedOptions, g as getDotenvCliOptions2Options, d as definePlugin } from './readMergedOptions-DLRFU2qO.mjs';
2
3
  import 'execa';
4
+ import 'node:buffer';
3
5
  import 'fs-extra';
4
6
  import 'node:path';
5
7
  import 'crypto';
@@ -8,14 +10,119 @@ import 'url';
8
10
  import '@commander-js/extra-typings';
9
11
  import 'nanoid';
10
12
  import 'dotenv';
11
- import './loader-CePOf74i.mjs';
13
+ import './loader-CE4HSRN4.mjs';
12
14
  import 'package-directory';
13
15
  import 'yaml';
14
16
  import { z } from 'zod';
15
- import { b as resolveCommand, c as resolveShell, t as tokenize, s as shouldCapture, r as runCommand, d as buildSpawnEnv } from './spawnEnv-CQwFu7ZJ.mjs';
17
+ import { b as resolveCommand, c as resolveShell, t as tokenize, s as shouldCapture, r as runCommand, d as buildSpawnEnv } from './spawnEnv-5kdIVv0x.mjs';
16
18
  import { m as maybePreserveNodeEvalArgv, c as composeNestedEnv, s as stripOne } from './invoke-DuRPU1oC.mjs';
17
- import { c as dotenvExpandFromProcessEnv } from './overlayEnv-Bqh_kPGA.mjs';
18
- import { r as resolveCliOptions, b as baseGetDotenvCliOptions } from './resolveCliOptions-_qtsVxda.mjs';
19
+ import { h as dotenvExpandFromProcessEnv } from './readDotenvCascade-Bymjvyit.mjs';
20
+ import { r as resolveCliOptions, b as baseGetDotenvCliOptions } from './resolveCliOptions-C6oeNl9S.mjs';
21
+
22
+ /** src/diagnostics/entropy.ts
23
+ * Entropy diagnostics (presentation-only).
24
+ * - Gated by min length and printable ASCII.
25
+ * - Warn once per key per run when bits/char \>= threshold.
26
+ * - Supports whitelist patterns to suppress known-noise keys.
27
+ */
28
+ const warned = new Set();
29
+ const isPrintableAscii = (s) => /^[\x20-\x7E]+$/.test(s);
30
+ const compile$1 = (patterns) => (patterns ?? []).map((p) => (typeof p === 'string' ? new RegExp(p, 'i') : p));
31
+ const whitelisted = (key, regs) => regs.some((re) => re.test(key));
32
+ const shannonBitsPerChar = (s) => {
33
+ const freq = new Map();
34
+ for (const ch of s)
35
+ freq.set(ch, (freq.get(ch) ?? 0) + 1);
36
+ const n = s.length;
37
+ let h = 0;
38
+ for (const c of freq.values()) {
39
+ const p = c / n;
40
+ h -= p * Math.log2(p);
41
+ }
42
+ return h;
43
+ };
44
+ /**
45
+ * Maybe emit a one-line entropy warning for a key.
46
+ * Caller supplies an `emit(line)` function; the helper ensures once-per-key.
47
+ */
48
+ const maybeWarnEntropy = (key, value, origin, opts, emit) => {
49
+ if (!opts || opts.warnEntropy === false)
50
+ return;
51
+ if (warned.has(key))
52
+ return;
53
+ const v = value ?? '';
54
+ const minLen = Math.max(0, opts.entropyMinLength ?? 16);
55
+ const threshold = opts.entropyThreshold ?? 3.8;
56
+ if (v.length < minLen)
57
+ return;
58
+ if (!isPrintableAscii(v))
59
+ return;
60
+ const wl = compile$1(opts.entropyWhitelist);
61
+ if (whitelisted(key, wl))
62
+ return;
63
+ const bpc = shannonBitsPerChar(v);
64
+ if (bpc >= threshold) {
65
+ warned.add(key);
66
+ emit(`[entropy] key=${key} score=${bpc.toFixed(2)} len=${String(v.length)} origin=${origin}`);
67
+ }
68
+ };
69
+
70
+ const DEFAULT_PATTERNS = [
71
+ '\\bsecret\\b',
72
+ '\\btoken\\b',
73
+ '\\bpass(word)?\\b',
74
+ '\\bapi[_-]?key\\b',
75
+ '\\bkey\\b',
76
+ ];
77
+ const compile = (patterns) => (patterns && patterns.length > 0 ? patterns : DEFAULT_PATTERNS).map((p) => typeof p === 'string' ? new RegExp(p, 'i') : p);
78
+ const shouldRedactKey = (key, regs) => regs.some((re) => re.test(key));
79
+ const MASK = '[redacted]';
80
+ /**
81
+ * Redact a single displayed value according to key/patterns.
82
+ * Returns the original value when redaction is disabled or key is not matched.
83
+ */
84
+ const redactDisplay = (key, value, opts) => {
85
+ if (!value)
86
+ return value;
87
+ if (!opts?.redact)
88
+ return value;
89
+ const regs = compile(opts.redactPatterns);
90
+ return shouldRedactKey(key, regs) ? MASK : value;
91
+ };
92
+ /**
93
+ * Produce a shallow redacted copy of an env-like object for display.
94
+ */
95
+ const redactObject = (obj, opts) => {
96
+ if (!opts?.redact)
97
+ return { ...obj };
98
+ const regs = compile(opts.redactPatterns);
99
+ const out = {};
100
+ for (const [k, v] of Object.entries(obj)) {
101
+ out[k] = v && shouldRedactKey(k, regs) ? MASK : v;
102
+ }
103
+ return out;
104
+ };
105
+ /**
106
+ * Utility to redact three related displayed values (parent/dotenv/final)
107
+ * consistently for trace lines.
108
+ */
109
+ const redactTriple = (key, triple, opts) => {
110
+ if (!opts?.redact)
111
+ return triple;
112
+ const regs = compile(opts.redactPatterns);
113
+ const maskIf = (v) => (v && shouldRedactKey(key, regs) ? MASK : v);
114
+ const out = {};
115
+ const p = maskIf(triple.parent);
116
+ const d = maskIf(triple.dotenv);
117
+ const f = maskIf(triple.final);
118
+ if (p !== undefined)
119
+ out.parent = p;
120
+ if (d !== undefined)
121
+ out.dotenv = d;
122
+ if (f !== undefined)
123
+ out.final = f;
124
+ return out;
125
+ };
19
126
 
20
127
  /**
21
128
  * Trace child env composition with redaction and entropy warnings.
@@ -239,8 +346,7 @@ const attachCmdParentInvoker = (cli, options, plugin) => {
239
346
  console.error('[getdotenv:alias] install alias option', flags);
240
347
  }
241
348
  const long = flags.split(/[ ,|]+/).find((f) => f.startsWith('--')) ?? '--cmd';
242
- const name = long.replace(/^--/, '');
243
- return name.replace(/-([a-z])/g, (_m, c) => c.toUpperCase());
349
+ return camel(long.replace(/^--/, ''));
244
350
  };
245
351
  const aliasKey = deriveKey(aliasSpec.flags);
246
352
  // Expose the option on the parent (root) command.
@@ -353,8 +459,7 @@ const cmdPlugin = (options = {}) => {
353
459
  : options.optionAlias;
354
460
  const deriveKey = (flags) => {
355
461
  const long = flags.split(/[ ,|]+/).find((f) => f.startsWith('--')) ?? '--cmd';
356
- const name = long.replace(/^--/, '');
357
- return name.replace(/-([a-z])/g, (_m, c) => c.toUpperCase());
462
+ return camel(long.replace(/^--/, ''));
358
463
  };
359
464
  const aliasKey = aliasSpec ? deriveKey(aliasSpec.flags) : undefined;
360
465
  // Mount is the command ('cmd'); attach default action.
@@ -372,4 +477,4 @@ const cmdPlugin = (options = {}) => {
372
477
  return plugin;
373
478
  };
374
479
 
375
- export { cmdPlugin as c, traceChildEnv as t };
480
+ export { redactDisplay as a, cmdPlugin as c, maybeWarnEntropy as m, redactObject as r, traceChildEnv as t };
@@ -1,17 +1,19 @@
1
- import { t as toUtf8, i as fromUtf8 } from './index-BNcKuiBy.mjs';
2
- import './readMergedOptions-DLBDzpXX.mjs';
1
+ import { t as toUtf8, i as fromUtf8 } from './index-BCVlyd0W.mjs';
2
+ import './readMergedOptions-DLRFU2qO.mjs';
3
3
  import 'zod';
4
4
  import '@commander-js/extra-typings';
5
- import './overlayEnv-Bqh_kPGA.mjs';
5
+ import './readDotenvCascade-Bymjvyit.mjs';
6
6
  import 'fs-extra';
7
+ import 'radash';
8
+ import 'node:buffer';
7
9
  import 'node:path';
8
10
  import './loadModuleDefault-Dj8B3Stt.mjs';
9
11
  import 'crypto';
10
12
  import 'path';
11
13
  import 'url';
12
- import 'nanoid';
13
14
  import 'dotenv';
14
- import './loader-CePOf74i.mjs';
15
+ import 'nanoid';
16
+ import './loader-CE4HSRN4.mjs';
15
17
  import 'package-directory';
16
18
  import 'yaml';
17
19
  import 'execa';