@karmaniverous/get-dotenv 4.6.0-0 → 5.0.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 (48) hide show
  1. package/README.md +130 -23
  2. package/dist/cliHost.cjs +1078 -0
  3. package/dist/cliHost.d.cts +193 -0
  4. package/dist/cliHost.d.mts +193 -0
  5. package/dist/cliHost.d.ts +193 -0
  6. package/dist/cliHost.mjs +1074 -0
  7. package/dist/config.cjs +247 -0
  8. package/dist/config.d.cts +53 -0
  9. package/dist/config.d.mts +53 -0
  10. package/dist/config.d.ts +53 -0
  11. package/dist/config.mjs +242 -0
  12. package/dist/env-overlay.cjs +163 -0
  13. package/dist/env-overlay.d.cts +50 -0
  14. package/dist/env-overlay.d.mts +50 -0
  15. package/dist/env-overlay.d.ts +50 -0
  16. package/dist/env-overlay.mjs +161 -0
  17. package/dist/getdotenv.cli.mjs +2776 -733
  18. package/dist/index.cjs +886 -275
  19. package/dist/index.d.cts +117 -61
  20. package/dist/index.d.mts +117 -61
  21. package/dist/index.d.ts +117 -61
  22. package/dist/index.mjs +888 -278
  23. package/dist/plugins-aws.cjs +618 -0
  24. package/dist/plugins-aws.d.cts +178 -0
  25. package/dist/plugins-aws.d.mts +178 -0
  26. package/dist/plugins-aws.d.ts +178 -0
  27. package/dist/plugins-aws.mjs +616 -0
  28. package/dist/plugins-batch.cjs +569 -0
  29. package/dist/plugins-batch.d.cts +200 -0
  30. package/dist/plugins-batch.d.mts +200 -0
  31. package/dist/plugins-batch.d.ts +200 -0
  32. package/dist/plugins-batch.mjs +567 -0
  33. package/dist/plugins-init.cjs +282 -0
  34. package/dist/plugins-init.d.cts +182 -0
  35. package/dist/plugins-init.d.mts +182 -0
  36. package/dist/plugins-init.d.ts +182 -0
  37. package/dist/plugins-init.mjs +280 -0
  38. package/getdotenv.config.json +19 -0
  39. package/package.json +88 -17
  40. package/templates/cli/ts/index.ts +9 -0
  41. package/templates/cli/ts/plugins/hello.ts +17 -0
  42. package/templates/config/js/getdotenv.config.js +15 -0
  43. package/templates/config/json/local/getdotenv.config.local.json +7 -0
  44. package/templates/config/json/public/getdotenv.config.json +12 -0
  45. package/templates/config/public/getdotenv.config.json +13 -0
  46. package/templates/config/ts/getdotenv.config.ts +16 -0
  47. package/templates/config/yaml/local/getdotenv.config.local.yaml +7 -0
  48. package/templates/config/yaml/public/getdotenv.config.yaml +10 -0
package/dist/index.d.cts CHANGED
@@ -1,69 +1,46 @@
1
1
  import { Command } from 'commander';
2
2
 
3
- type Scripts = Record<string, string | {
4
- cmd: string;
5
- shell?: string | boolean;
6
- }>;
7
3
  /**
8
- * Options passed programmatically to `getDotenvCli`.
4
+ * Minimal root options shape shared by CLI and generator layers.
5
+ * Keep keys optional to respect exactOptionalPropertyTypes semantics.
9
6
  */
10
- interface GetDotenvCliOptions extends Omit<GetDotenvOptions, 'paths' | 'vars'> {
11
- /**
12
- * Logs CLI internals when true.
13
- */
7
+ type RootOptionsShape = {
8
+ env?: string;
9
+ vars?: string;
10
+ command?: string;
11
+ outputPath?: string;
12
+ shell?: string | boolean;
13
+ loadProcess?: boolean;
14
+ excludeAll?: boolean;
15
+ excludeDynamic?: boolean;
16
+ excludeEnv?: boolean;
17
+ excludeGlobal?: boolean;
18
+ excludePrivate?: boolean;
19
+ excludePublic?: boolean;
20
+ log?: boolean;
14
21
  debug?: boolean;
15
- /**
16
- * A delimited string of paths to dotenv files.
17
- */
22
+ capture?: boolean;
23
+ defaultEnv?: string;
24
+ dotenvToken?: string;
25
+ dynamicPath?: string;
26
+ trace?: boolean | string[];
18
27
  paths?: string;
19
- /**
20
- * A delimiter string with which to split `paths`. Only used if
21
- * `pathsDelimiterPattern` is not provided.
22
- */
23
28
  pathsDelimiter?: string;
24
- /**
25
- * A regular expression pattern with which to split `paths`. Supersedes
26
- * `pathsDelimiter`.
27
- */
28
29
  pathsDelimiterPattern?: string;
29
- /**
30
- * Scripts that can be executed from the CLI, either individually or via the batch subcommand.
31
- */
32
- scripts?: Scripts;
33
- /**
34
- * Determines how commands and scripts are executed. If `false` or
35
- * `undefined`, commands are executed as plain Javascript using the default
36
- * execa parser. If `true`, commands are executed using the default OS shell
37
- * parser. Otherwise the user may provide a specific shell string (e.g.
38
- * `/bin/bash`)
39
- */
40
- shell?: string | boolean;
41
- /**
42
- * A delimited string of key-value pairs declaratively specifying variables &
43
- * values to be loaded in addition to any dotenv files.
44
- */
45
- vars?: string;
46
- /**
47
- * A string with which to split keys from values in `vars`. Only used if
48
- * `varsDelimiterPattern` is not provided.
49
- */
50
- varsAssignor?: string;
51
- /**
52
- * A regular expression pattern with which to split variable names from values
53
- * in `vars`. Supersedes `varsAssignor`.
54
- */
55
- varsAssignorPattern?: string;
56
- /**
57
- * A string with which to split `vars` into key-value pairs. Only used if
58
- * `varsDelimiterPattern` is not provided.
59
- */
30
+ privateToken?: string;
60
31
  varsDelimiter?: string;
61
- /**
62
- * A regular expression pattern with which to split `vars` into key-value
63
- * pairs. Supersedes `varsDelimiter`.
64
- */
65
32
  varsDelimiterPattern?: string;
66
- }
33
+ varsAssignor?: string;
34
+ varsAssignorPattern?: string;
35
+ scripts?: ScriptsTable;
36
+ };
37
+ /**
38
+ * Scripts table shape (configurable shell type).
39
+ */
40
+ type ScriptsTable<TShell extends string | boolean = string | boolean> = Record<string, string | {
41
+ cmd: string;
42
+ shell?: TShell;
43
+ }>;
67
44
 
68
45
  /**
69
46
  * A minimal representation of an environment key/value mapping.
@@ -158,15 +135,22 @@ interface GetDotenvOptions {
158
135
  * explicit variables to include
159
136
  */
160
137
  vars?: ProcessEnv;
138
+ /**
139
+ * Reserved: config loader flag (no-op).
140
+ * The plugin-first host and generator paths already use the config
141
+ * loader/overlay pipeline unconditionally (no-op when no config files
142
+ * are present). This flag is accepted for forward compatibility but
143
+ * currently has no effect.
144
+ */
145
+ useConfigLoader?: boolean;
161
146
  }
162
147
  /**
163
- * Converts programmatic CLI options to `getDotenv` options.
164
- *
148
+ * Converts programmatic CLI options to `getDotenv` options. *
165
149
  * @param cliOptions - CLI options. Defaults to `{}`.
166
150
  *
167
151
  * @returns `getDotenv` options.
168
152
  */
169
- declare const getDotenvCliOptions2Options: ({ paths, pathsDelimiter, pathsDelimiterPattern, vars, varsAssignor, varsAssignorPattern, varsDelimiter, varsDelimiterPattern, ...rest }: GetDotenvCliOptions) => GetDotenvOptions;
153
+ declare const getDotenvCliOptions2Options: ({ paths, pathsDelimiter, pathsDelimiterPattern, vars, varsAssignor, varsAssignorPattern, varsDelimiter, varsDelimiterPattern, ...rest }: RootOptionsShape) => GetDotenvOptions;
170
154
 
171
155
  /**
172
156
  * Recursively expands environment variables in a string. Variables may be
@@ -236,8 +220,79 @@ declare const dotenvExpandAll: (values?: ProcessEnv, options?: {
236
220
  */
237
221
  declare const dotenvExpandFromProcessEnv: (value: string | undefined) => string | undefined;
238
222
 
223
+ type Scripts = Record<string, string | {
224
+ cmd: string;
225
+ shell?: string | boolean;
226
+ }>;
227
+ /**
228
+ * Options passed programmatically to `getDotenvCli`.
229
+ */
230
+ interface GetDotenvCliOptions extends Omit<GetDotenvOptions, 'paths' | 'vars'> {
231
+ /**
232
+ * Logs CLI internals when true.
233
+ */
234
+ debug?: boolean;
235
+ /**
236
+ * When true, capture child stdout/stderr and re-emit after completion.
237
+ * Useful for tests/CI. Default behavior is streaming via stdio: 'inherit'.
238
+ */
239
+ capture?: boolean;
240
+ /**
241
+ * A delimited string of paths to dotenv files.
242
+ */
243
+ paths?: string;
244
+ /**
245
+ * A delimiter string with which to split `paths`. Only used if
246
+ * `pathsDelimiterPattern` is not provided.
247
+ */
248
+ pathsDelimiter?: string;
249
+ /**
250
+ * A regular expression pattern with which to split `paths`. Supersedes
251
+ * `pathsDelimiter`.
252
+ */
253
+ pathsDelimiterPattern?: string;
254
+ /**
255
+ * Scripts that can be executed from the CLI, either individually or via the batch subcommand.
256
+ */
257
+ scripts?: Scripts;
258
+ /**
259
+ * Determines how commands and scripts are executed. If `false` or
260
+ * `undefined`, commands are executed as plain Javascript using the default
261
+ * execa parser. If `true`, commands are executed using the default OS shell
262
+ * parser. Otherwise the user may provide a specific shell string (e.g.
263
+ * `/bin/bash`)
264
+ */
265
+ shell?: string | boolean;
266
+ /**
267
+ * A delimited string of key-value pairs declaratively specifying variables &
268
+ * values to be loaded in addition to any dotenv files.
269
+ */
270
+ vars?: string;
271
+ /**
272
+ * A string with which to split keys from values in `vars`. Only used if
273
+ * `varsDelimiterPattern` is not provided.
274
+ */
275
+ varsAssignor?: string;
276
+ /**
277
+ * A regular expression pattern with which to split variable names from values
278
+ * in `vars`. Supersedes `varsAssignor`.
279
+ */
280
+ varsAssignorPattern?: string;
281
+ /**
282
+ * A string with which to split `vars` into key-value pairs. Only used if
283
+ * `varsDelimiterPattern` is not provided.
284
+ */
285
+ varsDelimiter?: string;
286
+ /**
287
+ * A regular expression pattern with which to split `vars` into key-value
288
+ * pairs. Supersedes `varsDelimiter`.
289
+ */
290
+ varsDelimiterPattern?: string;
291
+ }
292
+
239
293
  /**
240
- * GetDotenv CLI Pre-hook Callback function type. Mutates inbound options & * executes side effects within the `getDotenv` context.
294
+ * GetDotenv CLI Pre-hook Callback function type. Mutates inbound options &
295
+ * executes side effects within the `getDotenv` context.
241
296
  */
242
297
  type GetDotenvCliPreHookCallback = (options: GetDotenvCliOptions) => Promise<void>;
243
298
  /**
@@ -280,7 +335,8 @@ interface GetDotenvCliGenerateOptions extends GetDotenvCliOptions {
280
335
  }
281
336
 
282
337
  /**
283
- * Generate a Commander CLI Command for get-dotenv. * Orchestration only: delegates building and lifecycle hooks.
338
+ * Generate a Commander CLI Command for get-dotenv.
339
+ * Orchestration only: delegates building and lifecycle hooks.
284
340
  */
285
341
  declare const generateGetDotenvCli: (customOptions: Pick<GetDotenvCliGenerateOptions, "importMetaUrl"> & Partial<Omit<GetDotenvCliGenerateOptions, "importMetaUrl">>) => Promise<Command>;
286
342
 
package/dist/index.d.mts CHANGED
@@ -1,69 +1,46 @@
1
1
  import { Command } from 'commander';
2
2
 
3
- type Scripts = Record<string, string | {
4
- cmd: string;
5
- shell?: string | boolean;
6
- }>;
7
3
  /**
8
- * Options passed programmatically to `getDotenvCli`.
4
+ * Minimal root options shape shared by CLI and generator layers.
5
+ * Keep keys optional to respect exactOptionalPropertyTypes semantics.
9
6
  */
10
- interface GetDotenvCliOptions extends Omit<GetDotenvOptions, 'paths' | 'vars'> {
11
- /**
12
- * Logs CLI internals when true.
13
- */
7
+ type RootOptionsShape = {
8
+ env?: string;
9
+ vars?: string;
10
+ command?: string;
11
+ outputPath?: string;
12
+ shell?: string | boolean;
13
+ loadProcess?: boolean;
14
+ excludeAll?: boolean;
15
+ excludeDynamic?: boolean;
16
+ excludeEnv?: boolean;
17
+ excludeGlobal?: boolean;
18
+ excludePrivate?: boolean;
19
+ excludePublic?: boolean;
20
+ log?: boolean;
14
21
  debug?: boolean;
15
- /**
16
- * A delimited string of paths to dotenv files.
17
- */
22
+ capture?: boolean;
23
+ defaultEnv?: string;
24
+ dotenvToken?: string;
25
+ dynamicPath?: string;
26
+ trace?: boolean | string[];
18
27
  paths?: string;
19
- /**
20
- * A delimiter string with which to split `paths`. Only used if
21
- * `pathsDelimiterPattern` is not provided.
22
- */
23
28
  pathsDelimiter?: string;
24
- /**
25
- * A regular expression pattern with which to split `paths`. Supersedes
26
- * `pathsDelimiter`.
27
- */
28
29
  pathsDelimiterPattern?: string;
29
- /**
30
- * Scripts that can be executed from the CLI, either individually or via the batch subcommand.
31
- */
32
- scripts?: Scripts;
33
- /**
34
- * Determines how commands and scripts are executed. If `false` or
35
- * `undefined`, commands are executed as plain Javascript using the default
36
- * execa parser. If `true`, commands are executed using the default OS shell
37
- * parser. Otherwise the user may provide a specific shell string (e.g.
38
- * `/bin/bash`)
39
- */
40
- shell?: string | boolean;
41
- /**
42
- * A delimited string of key-value pairs declaratively specifying variables &
43
- * values to be loaded in addition to any dotenv files.
44
- */
45
- vars?: string;
46
- /**
47
- * A string with which to split keys from values in `vars`. Only used if
48
- * `varsDelimiterPattern` is not provided.
49
- */
50
- varsAssignor?: string;
51
- /**
52
- * A regular expression pattern with which to split variable names from values
53
- * in `vars`. Supersedes `varsAssignor`.
54
- */
55
- varsAssignorPattern?: string;
56
- /**
57
- * A string with which to split `vars` into key-value pairs. Only used if
58
- * `varsDelimiterPattern` is not provided.
59
- */
30
+ privateToken?: string;
60
31
  varsDelimiter?: string;
61
- /**
62
- * A regular expression pattern with which to split `vars` into key-value
63
- * pairs. Supersedes `varsDelimiter`.
64
- */
65
32
  varsDelimiterPattern?: string;
66
- }
33
+ varsAssignor?: string;
34
+ varsAssignorPattern?: string;
35
+ scripts?: ScriptsTable;
36
+ };
37
+ /**
38
+ * Scripts table shape (configurable shell type).
39
+ */
40
+ type ScriptsTable<TShell extends string | boolean = string | boolean> = Record<string, string | {
41
+ cmd: string;
42
+ shell?: TShell;
43
+ }>;
67
44
 
68
45
  /**
69
46
  * A minimal representation of an environment key/value mapping.
@@ -158,15 +135,22 @@ interface GetDotenvOptions {
158
135
  * explicit variables to include
159
136
  */
160
137
  vars?: ProcessEnv;
138
+ /**
139
+ * Reserved: config loader flag (no-op).
140
+ * The plugin-first host and generator paths already use the config
141
+ * loader/overlay pipeline unconditionally (no-op when no config files
142
+ * are present). This flag is accepted for forward compatibility but
143
+ * currently has no effect.
144
+ */
145
+ useConfigLoader?: boolean;
161
146
  }
162
147
  /**
163
- * Converts programmatic CLI options to `getDotenv` options.
164
- *
148
+ * Converts programmatic CLI options to `getDotenv` options. *
165
149
  * @param cliOptions - CLI options. Defaults to `{}`.
166
150
  *
167
151
  * @returns `getDotenv` options.
168
152
  */
169
- declare const getDotenvCliOptions2Options: ({ paths, pathsDelimiter, pathsDelimiterPattern, vars, varsAssignor, varsAssignorPattern, varsDelimiter, varsDelimiterPattern, ...rest }: GetDotenvCliOptions) => GetDotenvOptions;
153
+ declare const getDotenvCliOptions2Options: ({ paths, pathsDelimiter, pathsDelimiterPattern, vars, varsAssignor, varsAssignorPattern, varsDelimiter, varsDelimiterPattern, ...rest }: RootOptionsShape) => GetDotenvOptions;
170
154
 
171
155
  /**
172
156
  * Recursively expands environment variables in a string. Variables may be
@@ -236,8 +220,79 @@ declare const dotenvExpandAll: (values?: ProcessEnv, options?: {
236
220
  */
237
221
  declare const dotenvExpandFromProcessEnv: (value: string | undefined) => string | undefined;
238
222
 
223
+ type Scripts = Record<string, string | {
224
+ cmd: string;
225
+ shell?: string | boolean;
226
+ }>;
227
+ /**
228
+ * Options passed programmatically to `getDotenvCli`.
229
+ */
230
+ interface GetDotenvCliOptions extends Omit<GetDotenvOptions, 'paths' | 'vars'> {
231
+ /**
232
+ * Logs CLI internals when true.
233
+ */
234
+ debug?: boolean;
235
+ /**
236
+ * When true, capture child stdout/stderr and re-emit after completion.
237
+ * Useful for tests/CI. Default behavior is streaming via stdio: 'inherit'.
238
+ */
239
+ capture?: boolean;
240
+ /**
241
+ * A delimited string of paths to dotenv files.
242
+ */
243
+ paths?: string;
244
+ /**
245
+ * A delimiter string with which to split `paths`. Only used if
246
+ * `pathsDelimiterPattern` is not provided.
247
+ */
248
+ pathsDelimiter?: string;
249
+ /**
250
+ * A regular expression pattern with which to split `paths`. Supersedes
251
+ * `pathsDelimiter`.
252
+ */
253
+ pathsDelimiterPattern?: string;
254
+ /**
255
+ * Scripts that can be executed from the CLI, either individually or via the batch subcommand.
256
+ */
257
+ scripts?: Scripts;
258
+ /**
259
+ * Determines how commands and scripts are executed. If `false` or
260
+ * `undefined`, commands are executed as plain Javascript using the default
261
+ * execa parser. If `true`, commands are executed using the default OS shell
262
+ * parser. Otherwise the user may provide a specific shell string (e.g.
263
+ * `/bin/bash`)
264
+ */
265
+ shell?: string | boolean;
266
+ /**
267
+ * A delimited string of key-value pairs declaratively specifying variables &
268
+ * values to be loaded in addition to any dotenv files.
269
+ */
270
+ vars?: string;
271
+ /**
272
+ * A string with which to split keys from values in `vars`. Only used if
273
+ * `varsDelimiterPattern` is not provided.
274
+ */
275
+ varsAssignor?: string;
276
+ /**
277
+ * A regular expression pattern with which to split variable names from values
278
+ * in `vars`. Supersedes `varsAssignor`.
279
+ */
280
+ varsAssignorPattern?: string;
281
+ /**
282
+ * A string with which to split `vars` into key-value pairs. Only used if
283
+ * `varsDelimiterPattern` is not provided.
284
+ */
285
+ varsDelimiter?: string;
286
+ /**
287
+ * A regular expression pattern with which to split `vars` into key-value
288
+ * pairs. Supersedes `varsDelimiter`.
289
+ */
290
+ varsDelimiterPattern?: string;
291
+ }
292
+
239
293
  /**
240
- * GetDotenv CLI Pre-hook Callback function type. Mutates inbound options & * executes side effects within the `getDotenv` context.
294
+ * GetDotenv CLI Pre-hook Callback function type. Mutates inbound options &
295
+ * executes side effects within the `getDotenv` context.
241
296
  */
242
297
  type GetDotenvCliPreHookCallback = (options: GetDotenvCliOptions) => Promise<void>;
243
298
  /**
@@ -280,7 +335,8 @@ interface GetDotenvCliGenerateOptions extends GetDotenvCliOptions {
280
335
  }
281
336
 
282
337
  /**
283
- * Generate a Commander CLI Command for get-dotenv. * Orchestration only: delegates building and lifecycle hooks.
338
+ * Generate a Commander CLI Command for get-dotenv.
339
+ * Orchestration only: delegates building and lifecycle hooks.
284
340
  */
285
341
  declare const generateGetDotenvCli: (customOptions: Pick<GetDotenvCliGenerateOptions, "importMetaUrl"> & Partial<Omit<GetDotenvCliGenerateOptions, "importMetaUrl">>) => Promise<Command>;
286
342
 
package/dist/index.d.ts CHANGED
@@ -1,69 +1,46 @@
1
1
  import { Command } from 'commander';
2
2
 
3
- type Scripts = Record<string, string | {
4
- cmd: string;
5
- shell?: string | boolean;
6
- }>;
7
3
  /**
8
- * Options passed programmatically to `getDotenvCli`.
4
+ * Minimal root options shape shared by CLI and generator layers.
5
+ * Keep keys optional to respect exactOptionalPropertyTypes semantics.
9
6
  */
10
- interface GetDotenvCliOptions extends Omit<GetDotenvOptions, 'paths' | 'vars'> {
11
- /**
12
- * Logs CLI internals when true.
13
- */
7
+ type RootOptionsShape = {
8
+ env?: string;
9
+ vars?: string;
10
+ command?: string;
11
+ outputPath?: string;
12
+ shell?: string | boolean;
13
+ loadProcess?: boolean;
14
+ excludeAll?: boolean;
15
+ excludeDynamic?: boolean;
16
+ excludeEnv?: boolean;
17
+ excludeGlobal?: boolean;
18
+ excludePrivate?: boolean;
19
+ excludePublic?: boolean;
20
+ log?: boolean;
14
21
  debug?: boolean;
15
- /**
16
- * A delimited string of paths to dotenv files.
17
- */
22
+ capture?: boolean;
23
+ defaultEnv?: string;
24
+ dotenvToken?: string;
25
+ dynamicPath?: string;
26
+ trace?: boolean | string[];
18
27
  paths?: string;
19
- /**
20
- * A delimiter string with which to split `paths`. Only used if
21
- * `pathsDelimiterPattern` is not provided.
22
- */
23
28
  pathsDelimiter?: string;
24
- /**
25
- * A regular expression pattern with which to split `paths`. Supersedes
26
- * `pathsDelimiter`.
27
- */
28
29
  pathsDelimiterPattern?: string;
29
- /**
30
- * Scripts that can be executed from the CLI, either individually or via the batch subcommand.
31
- */
32
- scripts?: Scripts;
33
- /**
34
- * Determines how commands and scripts are executed. If `false` or
35
- * `undefined`, commands are executed as plain Javascript using the default
36
- * execa parser. If `true`, commands are executed using the default OS shell
37
- * parser. Otherwise the user may provide a specific shell string (e.g.
38
- * `/bin/bash`)
39
- */
40
- shell?: string | boolean;
41
- /**
42
- * A delimited string of key-value pairs declaratively specifying variables &
43
- * values to be loaded in addition to any dotenv files.
44
- */
45
- vars?: string;
46
- /**
47
- * A string with which to split keys from values in `vars`. Only used if
48
- * `varsDelimiterPattern` is not provided.
49
- */
50
- varsAssignor?: string;
51
- /**
52
- * A regular expression pattern with which to split variable names from values
53
- * in `vars`. Supersedes `varsAssignor`.
54
- */
55
- varsAssignorPattern?: string;
56
- /**
57
- * A string with which to split `vars` into key-value pairs. Only used if
58
- * `varsDelimiterPattern` is not provided.
59
- */
30
+ privateToken?: string;
60
31
  varsDelimiter?: string;
61
- /**
62
- * A regular expression pattern with which to split `vars` into key-value
63
- * pairs. Supersedes `varsDelimiter`.
64
- */
65
32
  varsDelimiterPattern?: string;
66
- }
33
+ varsAssignor?: string;
34
+ varsAssignorPattern?: string;
35
+ scripts?: ScriptsTable;
36
+ };
37
+ /**
38
+ * Scripts table shape (configurable shell type).
39
+ */
40
+ type ScriptsTable<TShell extends string | boolean = string | boolean> = Record<string, string | {
41
+ cmd: string;
42
+ shell?: TShell;
43
+ }>;
67
44
 
68
45
  /**
69
46
  * A minimal representation of an environment key/value mapping.
@@ -158,15 +135,22 @@ interface GetDotenvOptions {
158
135
  * explicit variables to include
159
136
  */
160
137
  vars?: ProcessEnv;
138
+ /**
139
+ * Reserved: config loader flag (no-op).
140
+ * The plugin-first host and generator paths already use the config
141
+ * loader/overlay pipeline unconditionally (no-op when no config files
142
+ * are present). This flag is accepted for forward compatibility but
143
+ * currently has no effect.
144
+ */
145
+ useConfigLoader?: boolean;
161
146
  }
162
147
  /**
163
- * Converts programmatic CLI options to `getDotenv` options.
164
- *
148
+ * Converts programmatic CLI options to `getDotenv` options. *
165
149
  * @param cliOptions - CLI options. Defaults to `{}`.
166
150
  *
167
151
  * @returns `getDotenv` options.
168
152
  */
169
- declare const getDotenvCliOptions2Options: ({ paths, pathsDelimiter, pathsDelimiterPattern, vars, varsAssignor, varsAssignorPattern, varsDelimiter, varsDelimiterPattern, ...rest }: GetDotenvCliOptions) => GetDotenvOptions;
153
+ declare const getDotenvCliOptions2Options: ({ paths, pathsDelimiter, pathsDelimiterPattern, vars, varsAssignor, varsAssignorPattern, varsDelimiter, varsDelimiterPattern, ...rest }: RootOptionsShape) => GetDotenvOptions;
170
154
 
171
155
  /**
172
156
  * Recursively expands environment variables in a string. Variables may be
@@ -236,8 +220,79 @@ declare const dotenvExpandAll: (values?: ProcessEnv, options?: {
236
220
  */
237
221
  declare const dotenvExpandFromProcessEnv: (value: string | undefined) => string | undefined;
238
222
 
223
+ type Scripts = Record<string, string | {
224
+ cmd: string;
225
+ shell?: string | boolean;
226
+ }>;
227
+ /**
228
+ * Options passed programmatically to `getDotenvCli`.
229
+ */
230
+ interface GetDotenvCliOptions extends Omit<GetDotenvOptions, 'paths' | 'vars'> {
231
+ /**
232
+ * Logs CLI internals when true.
233
+ */
234
+ debug?: boolean;
235
+ /**
236
+ * When true, capture child stdout/stderr and re-emit after completion.
237
+ * Useful for tests/CI. Default behavior is streaming via stdio: 'inherit'.
238
+ */
239
+ capture?: boolean;
240
+ /**
241
+ * A delimited string of paths to dotenv files.
242
+ */
243
+ paths?: string;
244
+ /**
245
+ * A delimiter string with which to split `paths`. Only used if
246
+ * `pathsDelimiterPattern` is not provided.
247
+ */
248
+ pathsDelimiter?: string;
249
+ /**
250
+ * A regular expression pattern with which to split `paths`. Supersedes
251
+ * `pathsDelimiter`.
252
+ */
253
+ pathsDelimiterPattern?: string;
254
+ /**
255
+ * Scripts that can be executed from the CLI, either individually or via the batch subcommand.
256
+ */
257
+ scripts?: Scripts;
258
+ /**
259
+ * Determines how commands and scripts are executed. If `false` or
260
+ * `undefined`, commands are executed as plain Javascript using the default
261
+ * execa parser. If `true`, commands are executed using the default OS shell
262
+ * parser. Otherwise the user may provide a specific shell string (e.g.
263
+ * `/bin/bash`)
264
+ */
265
+ shell?: string | boolean;
266
+ /**
267
+ * A delimited string of key-value pairs declaratively specifying variables &
268
+ * values to be loaded in addition to any dotenv files.
269
+ */
270
+ vars?: string;
271
+ /**
272
+ * A string with which to split keys from values in `vars`. Only used if
273
+ * `varsDelimiterPattern` is not provided.
274
+ */
275
+ varsAssignor?: string;
276
+ /**
277
+ * A regular expression pattern with which to split variable names from values
278
+ * in `vars`. Supersedes `varsAssignor`.
279
+ */
280
+ varsAssignorPattern?: string;
281
+ /**
282
+ * A string with which to split `vars` into key-value pairs. Only used if
283
+ * `varsDelimiterPattern` is not provided.
284
+ */
285
+ varsDelimiter?: string;
286
+ /**
287
+ * A regular expression pattern with which to split `vars` into key-value
288
+ * pairs. Supersedes `varsDelimiter`.
289
+ */
290
+ varsDelimiterPattern?: string;
291
+ }
292
+
239
293
  /**
240
- * GetDotenv CLI Pre-hook Callback function type. Mutates inbound options & * executes side effects within the `getDotenv` context.
294
+ * GetDotenv CLI Pre-hook Callback function type. Mutates inbound options &
295
+ * executes side effects within the `getDotenv` context.
241
296
  */
242
297
  type GetDotenvCliPreHookCallback = (options: GetDotenvCliOptions) => Promise<void>;
243
298
  /**
@@ -280,7 +335,8 @@ interface GetDotenvCliGenerateOptions extends GetDotenvCliOptions {
280
335
  }
281
336
 
282
337
  /**
283
- * Generate a Commander CLI Command for get-dotenv. * Orchestration only: delegates building and lifecycle hooks.
338
+ * Generate a Commander CLI Command for get-dotenv.
339
+ * Orchestration only: delegates building and lifecycle hooks.
284
340
  */
285
341
  declare const generateGetDotenvCli: (customOptions: Pick<GetDotenvCliGenerateOptions, "importMetaUrl"> & Partial<Omit<GetDotenvCliGenerateOptions, "importMetaUrl">>) => Promise<Command>;
286
342