@karmaniverous/get-dotenv 7.0.7 → 7.0.9

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/dist/chunks/{createCli-DRgcaM2D.mjs → createCli-CCxTLJ1j.mjs} +57 -10
  2. package/dist/chunks/index-Cay5Gzhu.mjs +111 -0
  3. package/dist/chunks/{index-BzoCat8h.mjs → index-xqvxTkr9.mjs} +6 -6
  4. package/dist/chunks/{loader-V1vbmtyw.mjs → loader-C3DtD6HB.mjs} +4 -2
  5. package/dist/chunks/{readDotenvCascade-Dgx4SC1p.mjs → readDotenvCascade-CfFPgLCp.mjs} +52 -21
  6. package/dist/chunks/{readMergedOptions-x80ltQO_.mjs → readMergedOptions-_hjyCNZ7.mjs} +54 -14
  7. package/dist/chunks/{resolveCliOptions-CR-BEUmS.mjs → resolveCliOptions-Dp7wPY1K.mjs} +1 -1
  8. package/dist/chunks/{spawnEnv-CKgnHGpr.mjs → spawnEnv-DvisqPiU.mjs} +28 -3
  9. package/dist/chunks/{types-poB1VAs_.mjs → types-zXDNhcST.mjs} +1 -1
  10. package/dist/cli.d.ts +9 -5
  11. package/dist/cli.mjs +10 -15
  12. package/dist/cliHost.d.ts +9 -5
  13. package/dist/cliHost.mjs +6 -6
  14. package/dist/config.d.ts +1 -1
  15. package/dist/config.mjs +1 -1
  16. package/dist/env-overlay.d.ts +13 -9
  17. package/dist/env-overlay.mjs +2 -2
  18. package/dist/getdotenv.cli.mjs +10 -15
  19. package/dist/index.d.ts +10 -6
  20. package/dist/index.mjs +30 -23
  21. package/dist/plugins-aws.d.ts +1 -1
  22. package/dist/plugins-aws.mjs +4 -4
  23. package/dist/plugins-batch.d.ts +17 -1
  24. package/dist/plugins-batch.mjs +202 -68
  25. package/dist/plugins-cmd.d.ts +1 -1
  26. package/dist/plugins-cmd.mjs +6 -6
  27. package/dist/plugins-init.d.ts +1 -1
  28. package/dist/plugins-init.mjs +3 -3
  29. package/dist/plugins.d.ts +3 -1
  30. package/dist/plugins.mjs +9 -14
  31. package/package.json +40 -40
  32. package/schema/getdotenv.config.schema.json +207 -0
  33. package/dist/chunks/AwsRestJsonProtocol-BWWvLZiw.mjs +0 -1026
  34. package/dist/chunks/externalDataInterceptor-Bbvq4sdd.mjs +0 -19
  35. package/dist/chunks/getSSOTokenFromFile-ClTzvS3i.mjs +0 -22
  36. package/dist/chunks/index-4kbkrHS9.mjs +0 -12529
  37. package/dist/chunks/index-B5GwHCSX.mjs +0 -669
  38. package/dist/chunks/index-Cl6wXPYD.mjs +0 -82
  39. package/dist/chunks/index-D7Lv-lxm.mjs +0 -349
  40. package/dist/chunks/index-DFNP_Nrx.mjs +0 -188
  41. package/dist/chunks/index-DO68RbZ8.mjs +0 -103
  42. package/dist/chunks/index-Db08BBL5.mjs +0 -519
  43. package/dist/chunks/index-De2jIOhi.mjs +0 -541
  44. package/dist/chunks/index-IOQ1o3w3.mjs +0 -290
  45. package/dist/chunks/index-Tm4WDj9R.mjs +0 -383
  46. package/dist/chunks/index-fNrNPp4e.mjs +0 -946
  47. package/dist/chunks/index-w8gK2SKP.mjs +0 -31
  48. package/dist/chunks/loadSso-Ce3ChPPj.mjs +0 -488
  49. package/dist/chunks/package-DbbYaehr.mjs +0 -5
  50. package/dist/chunks/parseKnownFiles-BCL0L7aP.mjs +0 -23
  51. package/dist/chunks/sdk-stream-mixin-B_ajKWho.mjs +0 -307
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
- export { c as createCli } from './chunks/createCli-DRgcaM2D.mjs';
1
+ export { c as createCli } from './chunks/createCli-CCxTLJ1j.mjs';
2
2
  import 'zod';
3
3
  import 'path';
4
- import './chunks/loader-V1vbmtyw.mjs';
4
+ import './chunks/loader-C3DtD6HB.mjs';
5
5
  import 'fs-extra';
6
6
  import 'package-directory';
7
7
  import 'url';
@@ -13,27 +13,22 @@ import './chunks/loadModuleDefault-Dj8B3Stt.mjs';
13
13
  import 'crypto';
14
14
  import '@commander-js/extra-typings';
15
15
  import 'nanoid';
16
- import './chunks/readMergedOptions-x80ltQO_.mjs';
17
- import './chunks/readDotenvCascade-Dgx4SC1p.mjs';
16
+ import './chunks/readMergedOptions-_hjyCNZ7.mjs';
17
+ import './chunks/readDotenvCascade-CfFPgLCp.mjs';
18
18
  import 'dotenv';
19
19
  import 'execa';
20
20
  import './chunks/helpConfig-CGejgwWW.mjs';
21
- import './chunks/resolveCliOptions-CR-BEUmS.mjs';
21
+ import './chunks/resolveCliOptions-Dp7wPY1K.mjs';
22
22
  import './chunks/validate-CDl0rE6k.mjs';
23
23
  import './plugins-aws.mjs';
24
- import './chunks/spawnEnv-CKgnHGpr.mjs';
25
- import './chunks/index-4kbkrHS9.mjs';
26
- import 'node:os';
27
- import 'node:fs/promises';
28
- import 'node:stream';
29
- import 'node:crypto';
30
- import 'node:fs';
31
- import 'node:https';
32
- import 'node:process';
24
+ import './chunks/spawnEnv-DvisqPiU.mjs';
25
+ import './chunks/index-Cay5Gzhu.mjs';
33
26
  import './plugins-batch.mjs';
34
27
  import './chunks/invoke-DuRPU1oC.mjs';
35
28
  import 'globby';
36
- import './chunks/index-BzoCat8h.mjs';
29
+ import 'os';
30
+ import './chunks/index-xqvxTkr9.mjs';
37
31
  import './plugins-init.mjs';
32
+ import 'node:process';
38
33
  import 'readline/promises';
39
34
  import 'node:url';
package/dist/cliHost.d.ts CHANGED
@@ -287,7 +287,7 @@ interface RootOptionsShape {
287
287
  */
288
288
  trace?: boolean | string[];
289
289
  /** Paths to search for dotenv files (space-delimited string or array). */
290
- paths?: string;
290
+ paths?: string | string[];
291
291
  /** Delimiter for paths string (default: space). */
292
292
  pathsDelimiter?: string;
293
293
  /** Regex pattern for paths delimiter. */
@@ -384,7 +384,7 @@ type ProcessEnv = Record<string, string | undefined>;
384
384
  * and the selected environment (if any), and returns either a string to set
385
385
  * or `undefined` to unset/skip the variable.
386
386
  */
387
- type GetDotenvDynamicFunction = (vars: ProcessEnv, env: string | undefined) => string | undefined;
387
+ type GetDotenvDynamicFunction = (vars: ProcessEnv, env: string | undefined) => string | null | undefined;
388
388
  /**
389
389
  * A map of dynamic variable definitions.
390
390
  * Keys are variable names; values are either literal strings or functions.
@@ -903,10 +903,14 @@ declare class GetDotenvCli<TOptions extends GetDotenvOptions = GetDotenvOptions,
903
903
  install(): Promise<void>;
904
904
  /**
905
905
  * Run afterResolve hooks for registered plugins (parent → children).
906
- * When {@link invokedSubcommand} is provided, only the matching plugin
907
- * subtree runs; otherwise all plugins run (backward compatibility).
906
+ * When {@link commandPath} is provided, only the matching branch of the
907
+ * plugin tree runs; otherwise all plugins run (backward compatibility).
908
+ *
909
+ * The path is walked segment-by-segment against the plugin tree.
910
+ * Intermediate matches run their own afterResolve hook.
911
+ * The deepest match runs afterResolve for itself and all its descendants.
908
912
  */
909
- private _runAfterResolve;
913
+ _runAfterResolve(ctx: GetDotenvCliCtx<TOptions>, commandPath?: string[]): Promise<void>;
910
914
  }
911
915
 
912
916
  /** src/cliHost/getRootCommand.ts
package/dist/cliHost.mjs CHANGED
@@ -1,12 +1,12 @@
1
- export { G as GetDotenvCli, g as definePlugin, r as readMergedOptions } from './chunks/readMergedOptions-x80ltQO_.mjs';
2
- export { b as buildSpawnEnv, r as resolveCommand, a as resolveShell, c as runCommand, d as runCommandResult, s as shouldCapture } from './chunks/spawnEnv-CKgnHGpr.mjs';
3
- export { b as baseGetDotenvCliOptions, r as resolveCliOptions } from './chunks/resolveCliOptions-CR-BEUmS.mjs';
4
- export { d as defineScripts, g as groupPlugins } from './chunks/types-poB1VAs_.mjs';
1
+ export { G as GetDotenvCli, d as definePlugin, r as readMergedOptions } from './chunks/readMergedOptions-_hjyCNZ7.mjs';
2
+ export { b as buildSpawnEnv, r as resolveCommand, a as resolveShell, c as runCommand, d as runCommandResult, s as shouldCapture } from './chunks/spawnEnv-DvisqPiU.mjs';
3
+ export { b as baseGetDotenvCliOptions, r as resolveCliOptions } from './chunks/resolveCliOptions-Dp7wPY1K.mjs';
4
+ export { d as defineScripts, g as groupPlugins } from './chunks/types-zXDNhcST.mjs';
5
5
  export { t as toHelpConfig } from './chunks/helpConfig-CGejgwWW.mjs';
6
6
  export { c as composeNestedEnv, m as maybePreserveNodeEvalArgv, s as stripOne } from './chunks/invoke-DuRPU1oC.mjs';
7
7
  export { z } from 'zod';
8
8
  import '@commander-js/extra-typings';
9
- import './chunks/readDotenvCascade-Dgx4SC1p.mjs';
9
+ import './chunks/readDotenvCascade-CfFPgLCp.mjs';
10
10
  import 'fs-extra';
11
11
  import 'radash';
12
12
  import 'node:buffer';
@@ -17,7 +17,7 @@ import 'path';
17
17
  import 'url';
18
18
  import 'dotenv';
19
19
  import 'nanoid';
20
- import './chunks/loader-V1vbmtyw.mjs';
20
+ import './chunks/loader-C3DtD6HB.mjs';
21
21
  import 'package-directory';
22
22
  import 'yaml';
23
23
  import 'execa';
package/dist/config.d.ts CHANGED
@@ -69,7 +69,7 @@ interface RootOptionsShape {
69
69
  */
70
70
  trace?: boolean | string[];
71
71
  /** Paths to search for dotenv files (space-delimited string or array). */
72
- paths?: string;
72
+ paths?: string | string[];
73
73
  /** Delimiter for paths string (default: space). */
74
74
  pathsDelimiter?: string;
75
75
  /** Regex pattern for paths delimiter. */
package/dist/config.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { d as discoverConfigFiles, l as loadConfigFile, r as resolveGetDotenvConfigSources, t as toFileUrl } from './chunks/loader-V1vbmtyw.mjs';
1
+ export { d as discoverConfigFiles, l as loadConfigFile, r as resolveGetDotenvConfigSources, t as toFileUrl } from './chunks/loader-C3DtD6HB.mjs';
2
2
  export { v as validateEnvAgainstSources } from './chunks/validate-CDl0rE6k.mjs';
3
3
  import 'fs-extra';
4
4
  import 'package-directory';
@@ -69,7 +69,7 @@ interface RootOptionsShape {
69
69
  */
70
70
  trace?: boolean | string[];
71
71
  /** Paths to search for dotenv files (space-delimited string or array). */
72
- paths?: string;
72
+ paths?: string | string[];
73
73
  /** Delimiter for paths string (default: space). */
74
74
  pathsDelimiter?: string;
75
75
  /** Regex pattern for paths delimiter. */
@@ -165,7 +165,7 @@ type ProcessEnv = Record<string, string | undefined>;
165
165
  * and the selected environment (if any), and returns either a string to set
166
166
  * or `undefined` to unset/skip the variable.
167
167
  */
168
- type GetDotenvDynamicFunction = (vars: ProcessEnv, env: string | undefined) => string | undefined;
168
+ type GetDotenvDynamicFunction = (vars: ProcessEnv, env: string | undefined) => string | null | undefined;
169
169
  /**
170
170
  * A map of dynamic variable definitions.
171
171
  * Keys are variable names; values are either literal strings or functions.
@@ -318,15 +318,17 @@ declare function pushDotenvProvenance(prov: DotenvProvenance, key: string, entry
318
318
 
319
319
  /**
320
320
  * Apply a dynamic map to the target progressively.
321
- * - Functions receive (target, env) and may return string | undefined.
322
- * - Literals are assigned directly (including undefined).
321
+ * - Functions receive (target, env) and may return string | null | undefined.
322
+ * - string set the key to that value.
323
+ * - undefined → no-op, leave existing value unchanged.
324
+ * - null → delete the key from the target.
323
325
  *
324
326
  * @param target - Mutable target environment to assign into.
325
327
  * @param map - Dynamic map to apply (functions and/or literal values).
326
328
  * @param env - Selected environment name (if any) passed through to dynamic functions.
327
- * @returns Nothing.
329
+ * @returns Set of keys that were deleted (value was null).
328
330
  */
329
- declare function applyDynamicMap(target: ProcessEnv, map?: GetDotenvDynamic, env?: string): void;
331
+ declare function applyDynamicMap(target: ProcessEnv, map?: GetDotenvDynamic, env?: string): Set<string>;
330
332
  /**
331
333
  * Load a default-export dynamic map from a JS/TS file (without applying it).
332
334
  *
@@ -357,12 +359,14 @@ declare function loadDynamicModuleDefault(absPath: string, cacheDirName: string)
357
359
  * @param prov - Provenance map to append into.
358
360
  * @param meta - Dynamic provenance metadata (source tier and optional dynamicPath).
359
361
  *
362
+ * @returns Set of keys that were deleted (value was null).
363
+ *
360
364
  * @public
361
365
  */
362
366
  declare function applyDynamicMapWithProvenance(target: ProcessEnv, map: GetDotenvDynamic | undefined, env: string | undefined, prov: DotenvProvenance, meta: {
363
367
  dynamicSource: DotenvDynamicSource;
364
368
  dynamicPath?: string;
365
- }): void;
369
+ }): Set<string>;
366
370
  /**
367
371
  * Load a default-export dynamic map from a JS/TS file and apply it.
368
372
  * Uses util/loadModuleDefault for robust TS handling (direct import, esbuild,
@@ -376,9 +380,9 @@ declare function applyDynamicMapWithProvenance(target: ProcessEnv, map: GetDoten
376
380
  * @param absPath - Absolute path to the dynamic module file.
377
381
  * @param env - Selected environment name (if any).
378
382
  * @param cacheDirName - Cache subdirectory under `.tsbuild/` for compiled artifacts.
379
- * @returns A `Promise\<void\>` which resolves after the module (if present) has been applied.
383
+ * @returns A `Promise\<Set\<string\>\>` resolving to the set of deleted keys.
380
384
  */
381
- declare function loadAndApplyDynamic(target: ProcessEnv, absPath: string, env: string | undefined, cacheDirName: string): Promise<void>;
385
+ declare function loadAndApplyDynamic(target: ProcessEnv, absPath: string, env: string | undefined, cacheDirName: string): Promise<Set<string>>;
382
386
 
383
387
  /**
384
388
  * Configuration sources for environment overlay.
@@ -1,5 +1,5 @@
1
- import { e as dotenvExpandAll } from './chunks/readDotenvCascade-Dgx4SC1p.mjs';
2
- export { a as applyDynamicMap, b as applyDynamicMapWithProvenance, c as createDotenvProvenance, l as loadAndApplyDynamic, g as loadDynamicModuleDefault, o as overlayEnvWithProvenance, p as pushDotenvProvenance, h as readDotenvCascadeWithProvenance } from './chunks/readDotenvCascade-Dgx4SC1p.mjs';
1
+ import { d as dotenvExpandAll } from './chunks/readDotenvCascade-CfFPgLCp.mjs';
2
+ export { a as applyDynamicMap, b as applyDynamicMapWithProvenance, c as createDotenvProvenance, l as loadAndApplyDynamic, e as loadDynamicModuleDefault, o as overlayEnvWithProvenance, p as pushDotenvProvenance, r as readDotenvCascadeWithProvenance } from './chunks/readDotenvCascade-CfFPgLCp.mjs';
3
3
  import 'fs-extra';
4
4
  import 'node:path';
5
5
  import 'radash';
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import { c as createCli } from './chunks/createCli-DRgcaM2D.mjs';
2
+ import { c as createCli } from './chunks/createCli-CCxTLJ1j.mjs';
3
3
  import 'zod';
4
4
  import 'path';
5
- import './chunks/loader-V1vbmtyw.mjs';
5
+ import './chunks/loader-C3DtD6HB.mjs';
6
6
  import 'fs-extra';
7
7
  import 'package-directory';
8
8
  import 'url';
@@ -14,28 +14,23 @@ import './chunks/loadModuleDefault-Dj8B3Stt.mjs';
14
14
  import 'crypto';
15
15
  import '@commander-js/extra-typings';
16
16
  import 'nanoid';
17
- import './chunks/readMergedOptions-x80ltQO_.mjs';
18
- import './chunks/readDotenvCascade-Dgx4SC1p.mjs';
17
+ import './chunks/readMergedOptions-_hjyCNZ7.mjs';
18
+ import './chunks/readDotenvCascade-CfFPgLCp.mjs';
19
19
  import 'dotenv';
20
20
  import 'execa';
21
21
  import './chunks/helpConfig-CGejgwWW.mjs';
22
- import './chunks/resolveCliOptions-CR-BEUmS.mjs';
22
+ import './chunks/resolveCliOptions-Dp7wPY1K.mjs';
23
23
  import './chunks/validate-CDl0rE6k.mjs';
24
24
  import './plugins-aws.mjs';
25
- import './chunks/spawnEnv-CKgnHGpr.mjs';
26
- import './chunks/index-4kbkrHS9.mjs';
27
- import 'node:os';
28
- import 'node:fs/promises';
29
- import 'node:stream';
30
- import 'node:crypto';
31
- import 'node:fs';
32
- import 'node:https';
33
- import 'node:process';
25
+ import './chunks/spawnEnv-DvisqPiU.mjs';
26
+ import './chunks/index-Cay5Gzhu.mjs';
34
27
  import './plugins-batch.mjs';
35
28
  import './chunks/invoke-DuRPU1oC.mjs';
36
29
  import 'globby';
37
- import './chunks/index-BzoCat8h.mjs';
30
+ import 'os';
31
+ import './chunks/index-xqvxTkr9.mjs';
38
32
  import './plugins-init.mjs';
33
+ import 'node:process';
39
34
  import 'readline/promises';
40
35
  import 'node:url';
41
36
 
package/dist/index.d.ts CHANGED
@@ -286,7 +286,7 @@ interface RootOptionsShape {
286
286
  */
287
287
  trace?: boolean | string[];
288
288
  /** Paths to search for dotenv files (space-delimited string or array). */
289
- paths?: string;
289
+ paths?: string | string[];
290
290
  /** Delimiter for paths string (default: space). */
291
291
  pathsDelimiter?: string;
292
292
  /** Regex pattern for paths delimiter. */
@@ -398,7 +398,7 @@ type RootOptionsShapeCompat = Omit<RootOptionsShape, 'vars' | 'paths'> & {
398
398
  * and the selected environment (if any), and returns either a string to set
399
399
  * or `undefined` to unset/skip the variable.
400
400
  */
401
- type GetDotenvDynamicFunction = (vars: ProcessEnv, env: string | undefined) => string | undefined;
401
+ type GetDotenvDynamicFunction = (vars: ProcessEnv, env: string | undefined) => string | null | undefined;
402
402
  /**
403
403
  * A map of dynamic variable definitions.
404
404
  * Keys are variable names; values are either literal strings or functions.
@@ -433,7 +433,7 @@ type GetDotenvOptions = Omit<z.output<typeof getDotenvOptionsSchemaResolved>, 'l
433
433
  * Vars-aware dynamic helpers (compile-time DX).
434
434
  * DynamicFn: receive the current expanded variables and optional env.
435
435
  */
436
- type DynamicFn<Vars extends ProcessEnv> = (vars: Vars, env?: string) => string | undefined;
436
+ type DynamicFn<Vars extends ProcessEnv> = (vars: Vars, env?: string) => string | null | undefined;
437
437
  /**
438
438
  * Vars-aware dynamic map type used by {@link defineDynamic} and JS/TS configs.
439
439
  *
@@ -952,10 +952,14 @@ declare class GetDotenvCli<TOptions extends GetDotenvOptions = GetDotenvOptions,
952
952
  install(): Promise<void>;
953
953
  /**
954
954
  * Run afterResolve hooks for registered plugins (parent → children).
955
- * When {@link invokedSubcommand} is provided, only the matching plugin
956
- * subtree runs; otherwise all plugins run (backward compatibility).
955
+ * When {@link commandPath} is provided, only the matching branch of the
956
+ * plugin tree runs; otherwise all plugins run (backward compatibility).
957
+ *
958
+ * The path is walked segment-by-segment against the plugin tree.
959
+ * Intermediate matches run their own afterResolve hook.
960
+ * The deepest match runs afterResolve for itself and all its descendants.
957
961
  */
958
- private _runAfterResolve;
962
+ _runAfterResolve(ctx: GetDotenvCliCtx<TOptions>, commandPath?: string[]): Promise<void>;
959
963
  }
960
964
 
961
965
  /**
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- export { c as createCli } from './chunks/createCli-DRgcaM2D.mjs';
2
- import { j as resolveGetDotenvOptions, w as writeDotenvFile } from './chunks/readMergedOptions-x80ltQO_.mjs';
3
- export { G as GetDotenvCli, a as assertLogger, c as baseRootOptionDefaults, d as defaultsDeep, e as defineDynamic, f as defineGetDotenvConfig, g as definePlugin, h as getDotenvCliOptions2Options, i as interpolateDeep, r as readMergedOptions } from './chunks/readMergedOptions-x80ltQO_.mjs';
4
- export { b as buildSpawnEnv, s as shouldCapture, t as tokenize } from './chunks/spawnEnv-CKgnHGpr.mjs';
5
- export { d as defineScripts, g as groupPlugins } from './chunks/types-poB1VAs_.mjs';
1
+ export { c as createCli } from './chunks/createCli-CCxTLJ1j.mjs';
2
+ import { e as resolveGetDotenvOptions, w as writeDotenvFile } from './chunks/readMergedOptions-_hjyCNZ7.mjs';
3
+ export { G as GetDotenvCli, f as assertLogger, b as baseRootOptionDefaults, a as defaultsDeep, h as defineDynamic, i as defineGetDotenvConfig, d as definePlugin, g as getDotenvCliOptions2Options, j as interpolateDeep, r as readMergedOptions } from './chunks/readMergedOptions-_hjyCNZ7.mjs';
4
+ export { b as buildSpawnEnv, s as shouldCapture, t as tokenize } from './chunks/spawnEnv-DvisqPiU.mjs';
5
+ export { d as defineScripts, g as groupPlugins } from './chunks/types-zXDNhcST.mjs';
6
6
  import { omit, pick } from 'radash';
7
7
  import { Buffer } from 'node:buffer';
8
8
  export { l as loadModuleDefault } from './chunks/loadModuleDefault-Dj8B3Stt.mjs';
@@ -10,35 +10,30 @@ import { InvalidArgumentError } from '@commander-js/extra-typings';
10
10
  import 'zod';
11
11
  import { nanoid } from 'nanoid';
12
12
  import path$1 from 'path';
13
- import { a as redactObject, m as maybeWarnEntropy } from './chunks/index-BzoCat8h.mjs';
14
- export { r as redactDisplay, t as traceChildEnv } from './chunks/index-BzoCat8h.mjs';
15
- import { r as readDotenv, e as dotenvExpandAll, a as applyDynamicMap, l as loadAndApplyDynamic } from './chunks/readDotenvCascade-Dgx4SC1p.mjs';
16
- export { d as dotenvExpand, f as dotenvExpandFromProcessEnv } from './chunks/readDotenvCascade-Dgx4SC1p.mjs';
13
+ import { r as redactObject, m as maybeWarnEntropy } from './chunks/index-xqvxTkr9.mjs';
14
+ export { a as redactDisplay, t as traceChildEnv } from './chunks/index-xqvxTkr9.mjs';
15
+ import { g as readDotenv, d as dotenvExpandAll, a as applyDynamicMap, l as loadAndApplyDynamic } from './chunks/readDotenvCascade-CfFPgLCp.mjs';
16
+ export { h as dotenvExpand, f as dotenvExpandFromProcessEnv } from './chunks/readDotenvCascade-CfFPgLCp.mjs';
17
17
  import fs from 'fs-extra';
18
18
  import path from 'node:path';
19
19
  import 'crypto';
20
20
  import 'url';
21
21
  import 'dotenv';
22
- import './chunks/loader-V1vbmtyw.mjs';
22
+ import './chunks/loader-C3DtD6HB.mjs';
23
23
  import 'package-directory';
24
24
  import 'yaml';
25
25
  import 'execa';
26
26
  import './chunks/helpConfig-CGejgwWW.mjs';
27
- import './chunks/resolveCliOptions-CR-BEUmS.mjs';
27
+ import './chunks/resolveCliOptions-Dp7wPY1K.mjs';
28
28
  import './chunks/validate-CDl0rE6k.mjs';
29
29
  import './plugins-aws.mjs';
30
- import './chunks/index-4kbkrHS9.mjs';
31
- import 'node:os';
32
- import 'node:fs/promises';
33
- import 'node:stream';
34
- import 'node:crypto';
35
- import 'node:fs';
36
- import 'node:https';
37
- import 'node:process';
30
+ import './chunks/index-Cay5Gzhu.mjs';
38
31
  import './plugins-batch.mjs';
39
32
  import './chunks/invoke-DuRPU1oC.mjs';
40
33
  import 'globby';
34
+ import 'os';
41
35
  import './plugins-init.mjs';
36
+ import 'node:process';
42
37
  import 'readline/promises';
43
38
  import 'node:url';
44
39
 
@@ -927,11 +922,13 @@ async function getDotenv(options = {}) {
927
922
  ...(outputPath ? { [outputKey]: outputPath } : {}),
928
923
  }, { progressive: true });
929
924
  // Process dynamic variables. Programmatic option takes precedence over path.
925
+ const deletedKeys = new Set();
930
926
  if (!excludeDynamic) {
931
927
  // A2 precedence: programmatic dynamic < dynamicPath (dynamicPath wins when present)
932
928
  if (options.dynamic && Object.keys(options.dynamic).length > 0) {
933
929
  try {
934
- applyDynamicMap(dotenv, options.dynamic, env ?? defaultEnv);
930
+ for (const k of applyDynamicMap(dotenv, options.dynamic, env ?? defaultEnv))
931
+ deletedKeys.add(k);
935
932
  }
936
933
  catch {
937
934
  throw new Error(`Unable to evaluate dynamic variables.`);
@@ -940,7 +937,8 @@ async function getDotenv(options = {}) {
940
937
  // dynamicPath is evaluated even when programmatic `dynamic` is present.
941
938
  if (dynamicPath) {
942
939
  const absDynamicPath = path$1.resolve(dynamicPath);
943
- await loadAndApplyDynamic(dotenv, absDynamicPath, env ?? defaultEnv, 'getdotenv-dynamic');
940
+ for (const k of await loadAndApplyDynamic(dotenv, absDynamicPath, env ?? defaultEnv, 'getdotenv-dynamic'))
941
+ deletedKeys.add(k);
944
942
  }
945
943
  }
946
944
  // Write output file.
@@ -989,8 +987,17 @@ async function getDotenv(options = {}) {
989
987
  }
990
988
  }
991
989
  // Load process.env.
992
- if (loadProcess)
993
- Object.assign(process.env, resultDotenv);
990
+ if (loadProcess) {
991
+ for (const key of deletedKeys) {
992
+ Reflect.deleteProperty(process.env, key);
993
+ }
994
+ for (const [key, value] of Object.entries(resultDotenv)) {
995
+ if (value === undefined)
996
+ Reflect.deleteProperty(process.env, key);
997
+ else
998
+ process.env[key] = value;
999
+ }
1000
+ }
994
1001
  return resultDotenv;
995
1002
  }
996
1003
 
@@ -272,7 +272,7 @@ type ProcessEnv = Record<string, string | undefined>;
272
272
  * and the selected environment (if any), and returns either a string to set
273
273
  * or `undefined` to unset/skip the variable.
274
274
  */
275
- type GetDotenvDynamicFunction = (vars: ProcessEnv, env: string | undefined) => string | undefined;
275
+ type GetDotenvDynamicFunction = (vars: ProcessEnv, env: string | undefined) => string | null | undefined;
276
276
  /**
277
277
  * A map of dynamic variable definitions.
278
278
  * Keys are variable names; values are either literal strings or functions.
@@ -1,4 +1,4 @@
1
- import { r as readMergedOptions, g as definePlugin } from './chunks/readMergedOptions-x80ltQO_.mjs';
1
+ import { r as readMergedOptions, d as definePlugin } from './chunks/readMergedOptions-_hjyCNZ7.mjs';
2
2
  import 'execa';
3
3
  import { isObject } from 'radash';
4
4
  import 'node:buffer';
@@ -10,12 +10,12 @@ import 'url';
10
10
  import '@commander-js/extra-typings';
11
11
  import 'nanoid';
12
12
  import 'dotenv';
13
- import './chunks/loader-V1vbmtyw.mjs';
13
+ import './chunks/loader-C3DtD6HB.mjs';
14
14
  import 'package-directory';
15
15
  import 'yaml';
16
16
  import { z } from 'zod';
17
- import { c as runCommand, d as runCommandResult, s as shouldCapture, a as resolveShell, b as buildSpawnEnv } from './chunks/spawnEnv-CKgnHGpr.mjs';
18
- import './chunks/readDotenvCascade-Dgx4SC1p.mjs';
17
+ import { c as runCommand, d as runCommandResult, s as shouldCapture, a as resolveShell, b as buildSpawnEnv } from './chunks/spawnEnv-DvisqPiU.mjs';
18
+ import './chunks/readDotenvCascade-CfFPgLCp.mjs';
19
19
  import './chunks/loadModuleDefault-Dj8B3Stt.mjs';
20
20
 
21
21
  /**
@@ -272,7 +272,7 @@ type ProcessEnv = Record<string, string | undefined>;
272
272
  * and the selected environment (if any), and returns either a string to set
273
273
  * or `undefined` to unset/skip the variable.
274
274
  */
275
- type GetDotenvDynamicFunction = (vars: ProcessEnv, env: string | undefined) => string | undefined;
275
+ type GetDotenvDynamicFunction = (vars: ProcessEnv, env: string | undefined) => string | null | undefined;
276
276
  /**
277
277
  * A map of dynamic variable definitions.
278
278
  * Keys are variable names; values are either literal strings or functions.
@@ -561,6 +561,11 @@ interface ExecShellCommandBatchOptions {
561
561
  * an array is treated as argv for shell‑off execution.
562
562
  */
563
563
  command?: string | string[];
564
+ /**
565
+ * Maximum number of concurrent executions when {@link ExecShellCommandBatchOptions.parallel} is true.
566
+ * Defaults to {@link defaultConcurrency}.
567
+ */
568
+ concurrency?: number;
564
569
  /**
565
570
  * Merged root CLI options bag (JSON‑serializable) forwarded for nested composition
566
571
  * by downstream executors. Used to compute child overlays deterministically.
@@ -586,6 +591,11 @@ interface ExecShellCommandBatchOptions {
586
591
  * Logger used for headings, listings, and diagnostics.
587
592
  */
588
593
  logger: Logger;
594
+ /**
595
+ * When true, execute commands across discovered directories in parallel.
596
+ * Output is buffered per-directory and printed in discovery order.
597
+ */
598
+ parallel?: boolean;
589
599
  /**
590
600
  * Resolve the batch root from the nearest package directory instead of CWD.
591
601
  */
@@ -608,12 +618,16 @@ interface ExecShellCommandBatchOptions {
608
618
  interface BatchParentInvokerFlags {
609
619
  /** Command to execute. */
610
620
  command?: string;
621
+ /** Maximum concurrent executions in parallel mode. */
622
+ concurrency?: number;
611
623
  /** Space-delimited glob patterns. */
612
624
  globs?: string;
613
625
  /** List directories without executing. */
614
626
  list?: boolean;
615
627
  /** Ignore errors and continue. */
616
628
  ignoreErrors?: boolean;
629
+ /** Execute commands in parallel across directories. */
630
+ parallel?: boolean;
617
631
  /** Use package directory as root. */
618
632
  pkgCwd?: boolean;
619
633
  /** Root path for discovery. */
@@ -636,6 +650,7 @@ interface BatchCmdSubcommandOptions {
636
650
  * - scripts/shell: used to resolve command and shell behavior per script or global default.
637
651
  */
638
652
  declare const batchPlugin: (opts?: BatchPluginOptions) => PluginWithInstanceHelpers<GetDotenvOptions, {
653
+ concurrency?: number | undefined;
639
654
  scripts?: Record<string, string | {
640
655
  cmd: string;
641
656
  shell?: string | boolean | undefined;
@@ -643,6 +658,7 @@ declare const batchPlugin: (opts?: BatchPluginOptions) => PluginWithInstanceHelp
643
658
  shell?: string | boolean | undefined;
644
659
  rootPath?: string | undefined;
645
660
  globs?: string | undefined;
661
+ parallel?: boolean | undefined;
646
662
  pkgCwd?: boolean | undefined;
647
663
  }, [], {}, {}>;
648
664
  /**