@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
@@ -0,0 +1,193 @@
1
+ import { ZodType } from 'zod';
2
+ import { Command } from 'commander';
3
+
4
+ /**
5
+ * A minimal representation of an environment key/value mapping.
6
+ * Values may be `undefined` to represent "unset".
7
+ */
8
+ type ProcessEnv = Record<string, string | undefined>;
9
+ /**
10
+ * Dynamic variable function signature. Receives the current expanded variables
11
+ * and the selected environment (if any), and returns either a string to set
12
+ * or `undefined` to unset/skip the variable.
13
+ */
14
+ type GetDotenvDynamicFunction = (vars: ProcessEnv, env: string | undefined) => string | undefined;
15
+ type GetDotenvDynamic = Record<string, GetDotenvDynamicFunction | ReturnType<GetDotenvDynamicFunction>>;
16
+ type Logger = Record<string, (...args: unknown[]) => void> | typeof console;
17
+ /**
18
+ * Options passed programmatically to `getDotenv`.
19
+ */
20
+ interface GetDotenvOptions {
21
+ /**
22
+ * default target environment (used if `env` is not provided)
23
+ */
24
+ defaultEnv?: string;
25
+ /**
26
+ * token indicating a dotenv file
27
+ */
28
+ dotenvToken: string;
29
+ /**
30
+ * path to JS/TS module default-exporting an object keyed to dynamic variable functions
31
+ */
32
+ dynamicPath?: string;
33
+ /**
34
+ * Programmatic dynamic variables map. When provided, this takes precedence
35
+ * over {@link GetDotenvOptions.dynamicPath}.
36
+ */
37
+ dynamic?: GetDotenvDynamic;
38
+ /**
39
+ * target environment
40
+ */
41
+ env?: string;
42
+ /**
43
+ * exclude dynamic variables from loading
44
+ */
45
+ excludeDynamic?: boolean;
46
+ /**
47
+ * exclude environment-specific variables from loading
48
+ */
49
+ excludeEnv?: boolean;
50
+ /**
51
+ * exclude global variables from loading
52
+ */
53
+ excludeGlobal?: boolean;
54
+ /**
55
+ * exclude private variables from loading
56
+ */
57
+ excludePrivate?: boolean;
58
+ /**
59
+ * exclude public variables from loading
60
+ */
61
+ excludePublic?: boolean;
62
+ /**
63
+ * load dotenv variables to `process.env`
64
+ */
65
+ loadProcess?: boolean;
66
+ /**
67
+ * log loaded dotenv variables to `logger`
68
+ */
69
+ log?: boolean;
70
+ /**
71
+ * logger object (defaults to console)
72
+ */
73
+ logger?: Logger;
74
+ /**
75
+ * if populated, writes consolidated dotenv file to this path (follows dotenvExpand rules)
76
+ */
77
+ outputPath?: string;
78
+ /**
79
+ * array of input directory paths
80
+ */
81
+ paths?: string[];
82
+ /**
83
+ * filename token indicating private variables
84
+ */
85
+ privateToken?: string;
86
+ /**
87
+ * explicit variables to include
88
+ */
89
+ vars?: ProcessEnv;
90
+ /**
91
+ * Reserved: config loader flag (no-op).
92
+ * The plugin-first host and generator paths already use the config
93
+ * loader/overlay pipeline unconditionally (no-op when no config files
94
+ * are present). This flag is accepted for forward compatibility but
95
+ * currently has no effect.
96
+ */
97
+ useConfigLoader?: boolean;
98
+ }
99
+
100
+ /** * Per-invocation context shared with plugins and actions. */
101
+ type GetDotenvCliCtx<TOptions extends GetDotenvOptions = GetDotenvOptions> = {
102
+ optionsResolved: TOptions;
103
+ dotenv: ProcessEnv;
104
+ plugins?: Record<string, unknown>;
105
+ pluginConfigs?: Record<string, unknown>;
106
+ };
107
+ /**
108
+ * Plugin-first CLI host for get-dotenv. Extends Commander.Command.
109
+ *
110
+ * Responsibilities:
111
+ * - Resolve options strictly and compute dotenv context (resolveAndLoad).
112
+ * - Expose a stable accessor for the current context (getCtx).
113
+ * - Provide a namespacing helper (ns).
114
+ * - Support composable plugins with parent → children install and afterResolve.
115
+ *
116
+ * NOTE: This host is additive and does not alter the legacy CLI.
117
+ */
118
+ declare class GetDotenvCli<TOptions extends GetDotenvOptions = GetDotenvOptions> extends Command {
119
+ /** Registered top-level plugins (composition happens via .use()) */
120
+ private _plugins;
121
+ /** One-time installation guard */
122
+ private _installed;
123
+ constructor(alias?: string);
124
+ /**
125
+ * Resolve options (strict) and compute dotenv context. * Stores the context on the instance under a symbol.
126
+ */
127
+ resolveAndLoad(customOptions?: Partial<TOptions>): Promise<GetDotenvCliCtx<TOptions>>;
128
+ /**
129
+ * Retrieve the current invocation context (if any).
130
+ */
131
+ getCtx(): GetDotenvCliCtx<TOptions> | undefined;
132
+ /** * Convenience helper to create a namespaced subcommand.
133
+ */
134
+ ns(name: string): Command;
135
+ /**
136
+ * Register a plugin for installation (parent level).
137
+ * Installation occurs on first resolveAndLoad() (or explicit install()).
138
+ */
139
+ use(plugin: GetDotenvCliPlugin): this;
140
+ /**
141
+ * Install all registered plugins in parent → children (pre-order).
142
+ * Runs only once per CLI instance.
143
+ */
144
+ install(): Promise<void>;
145
+ /**
146
+ * Run afterResolve hooks for all plugins (parent → children).
147
+ */
148
+ private _runAfterResolve;
149
+ }
150
+
151
+ /** Public plugin contract used by the GetDotenv CLI host. */ interface GetDotenvCliPlugin {
152
+ id?: string /**
153
+ * Setup phase: register commands and wiring on the provided CLI instance. * Runs parent → children (pre-order).
154
+ */;
155
+ setup: (cli: GetDotenvCli) => void | Promise<void>;
156
+ /**
157
+ * After the dotenv context is resolved, initialize any clients/secrets
158
+ * or attach per-plugin state under ctx.plugins (by convention).
159
+ * Runs parent → children (pre-order).
160
+ */
161
+ afterResolve?: (cli: GetDotenvCli, ctx: GetDotenvCliCtx) => void | Promise<void>;
162
+ /**
163
+ * Optional Zod schema for this plugin's config slice (from config.plugins[id]).
164
+ * When provided, the host validates the merged config under the guarded loader path.
165
+ */
166
+ configSchema?: ZodType;
167
+ /**
168
+ * Compositional children. Installed after the parent per pre-order.
169
+ */ children: GetDotenvCliPlugin[];
170
+ /**
171
+ * Compose a child plugin. Returns the parent to enable chaining.
172
+ */
173
+ use: (child: GetDotenvCliPlugin) => GetDotenvCliPlugin;
174
+ }
175
+ /**
176
+ * Public spec type for defining a plugin with optional children.
177
+ * Exported to ensure TypeDoc links and navigation resolve correctly.
178
+ */
179
+ type DefineSpec = Omit<GetDotenvCliPlugin, 'children' | 'use'> & {
180
+ children?: GetDotenvCliPlugin[];
181
+ };
182
+ /**
183
+ * Define a GetDotenv CLI plugin with compositional helpers.
184
+ *
185
+ * @example
186
+ * const parent = definePlugin(\{ id: 'p', setup(cli) \{ /* ... *\/ \} \})
187
+ * .use(childA)
188
+ * .use(childB);
189
+ */
190
+ declare const definePlugin: (spec: DefineSpec) => GetDotenvCliPlugin;
191
+
192
+ export { GetDotenvCli, definePlugin };
193
+ export type { DefineSpec, GetDotenvCliPlugin };
@@ -0,0 +1,193 @@
1
+ import { ZodType } from 'zod';
2
+ import { Command } from 'commander';
3
+
4
+ /**
5
+ * A minimal representation of an environment key/value mapping.
6
+ * Values may be `undefined` to represent "unset".
7
+ */
8
+ type ProcessEnv = Record<string, string | undefined>;
9
+ /**
10
+ * Dynamic variable function signature. Receives the current expanded variables
11
+ * and the selected environment (if any), and returns either a string to set
12
+ * or `undefined` to unset/skip the variable.
13
+ */
14
+ type GetDotenvDynamicFunction = (vars: ProcessEnv, env: string | undefined) => string | undefined;
15
+ type GetDotenvDynamic = Record<string, GetDotenvDynamicFunction | ReturnType<GetDotenvDynamicFunction>>;
16
+ type Logger = Record<string, (...args: unknown[]) => void> | typeof console;
17
+ /**
18
+ * Options passed programmatically to `getDotenv`.
19
+ */
20
+ interface GetDotenvOptions {
21
+ /**
22
+ * default target environment (used if `env` is not provided)
23
+ */
24
+ defaultEnv?: string;
25
+ /**
26
+ * token indicating a dotenv file
27
+ */
28
+ dotenvToken: string;
29
+ /**
30
+ * path to JS/TS module default-exporting an object keyed to dynamic variable functions
31
+ */
32
+ dynamicPath?: string;
33
+ /**
34
+ * Programmatic dynamic variables map. When provided, this takes precedence
35
+ * over {@link GetDotenvOptions.dynamicPath}.
36
+ */
37
+ dynamic?: GetDotenvDynamic;
38
+ /**
39
+ * target environment
40
+ */
41
+ env?: string;
42
+ /**
43
+ * exclude dynamic variables from loading
44
+ */
45
+ excludeDynamic?: boolean;
46
+ /**
47
+ * exclude environment-specific variables from loading
48
+ */
49
+ excludeEnv?: boolean;
50
+ /**
51
+ * exclude global variables from loading
52
+ */
53
+ excludeGlobal?: boolean;
54
+ /**
55
+ * exclude private variables from loading
56
+ */
57
+ excludePrivate?: boolean;
58
+ /**
59
+ * exclude public variables from loading
60
+ */
61
+ excludePublic?: boolean;
62
+ /**
63
+ * load dotenv variables to `process.env`
64
+ */
65
+ loadProcess?: boolean;
66
+ /**
67
+ * log loaded dotenv variables to `logger`
68
+ */
69
+ log?: boolean;
70
+ /**
71
+ * logger object (defaults to console)
72
+ */
73
+ logger?: Logger;
74
+ /**
75
+ * if populated, writes consolidated dotenv file to this path (follows dotenvExpand rules)
76
+ */
77
+ outputPath?: string;
78
+ /**
79
+ * array of input directory paths
80
+ */
81
+ paths?: string[];
82
+ /**
83
+ * filename token indicating private variables
84
+ */
85
+ privateToken?: string;
86
+ /**
87
+ * explicit variables to include
88
+ */
89
+ vars?: ProcessEnv;
90
+ /**
91
+ * Reserved: config loader flag (no-op).
92
+ * The plugin-first host and generator paths already use the config
93
+ * loader/overlay pipeline unconditionally (no-op when no config files
94
+ * are present). This flag is accepted for forward compatibility but
95
+ * currently has no effect.
96
+ */
97
+ useConfigLoader?: boolean;
98
+ }
99
+
100
+ /** * Per-invocation context shared with plugins and actions. */
101
+ type GetDotenvCliCtx<TOptions extends GetDotenvOptions = GetDotenvOptions> = {
102
+ optionsResolved: TOptions;
103
+ dotenv: ProcessEnv;
104
+ plugins?: Record<string, unknown>;
105
+ pluginConfigs?: Record<string, unknown>;
106
+ };
107
+ /**
108
+ * Plugin-first CLI host for get-dotenv. Extends Commander.Command.
109
+ *
110
+ * Responsibilities:
111
+ * - Resolve options strictly and compute dotenv context (resolveAndLoad).
112
+ * - Expose a stable accessor for the current context (getCtx).
113
+ * - Provide a namespacing helper (ns).
114
+ * - Support composable plugins with parent → children install and afterResolve.
115
+ *
116
+ * NOTE: This host is additive and does not alter the legacy CLI.
117
+ */
118
+ declare class GetDotenvCli<TOptions extends GetDotenvOptions = GetDotenvOptions> extends Command {
119
+ /** Registered top-level plugins (composition happens via .use()) */
120
+ private _plugins;
121
+ /** One-time installation guard */
122
+ private _installed;
123
+ constructor(alias?: string);
124
+ /**
125
+ * Resolve options (strict) and compute dotenv context. * Stores the context on the instance under a symbol.
126
+ */
127
+ resolveAndLoad(customOptions?: Partial<TOptions>): Promise<GetDotenvCliCtx<TOptions>>;
128
+ /**
129
+ * Retrieve the current invocation context (if any).
130
+ */
131
+ getCtx(): GetDotenvCliCtx<TOptions> | undefined;
132
+ /** * Convenience helper to create a namespaced subcommand.
133
+ */
134
+ ns(name: string): Command;
135
+ /**
136
+ * Register a plugin for installation (parent level).
137
+ * Installation occurs on first resolveAndLoad() (or explicit install()).
138
+ */
139
+ use(plugin: GetDotenvCliPlugin): this;
140
+ /**
141
+ * Install all registered plugins in parent → children (pre-order).
142
+ * Runs only once per CLI instance.
143
+ */
144
+ install(): Promise<void>;
145
+ /**
146
+ * Run afterResolve hooks for all plugins (parent → children).
147
+ */
148
+ private _runAfterResolve;
149
+ }
150
+
151
+ /** Public plugin contract used by the GetDotenv CLI host. */ interface GetDotenvCliPlugin {
152
+ id?: string /**
153
+ * Setup phase: register commands and wiring on the provided CLI instance. * Runs parent → children (pre-order).
154
+ */;
155
+ setup: (cli: GetDotenvCli) => void | Promise<void>;
156
+ /**
157
+ * After the dotenv context is resolved, initialize any clients/secrets
158
+ * or attach per-plugin state under ctx.plugins (by convention).
159
+ * Runs parent → children (pre-order).
160
+ */
161
+ afterResolve?: (cli: GetDotenvCli, ctx: GetDotenvCliCtx) => void | Promise<void>;
162
+ /**
163
+ * Optional Zod schema for this plugin's config slice (from config.plugins[id]).
164
+ * When provided, the host validates the merged config under the guarded loader path.
165
+ */
166
+ configSchema?: ZodType;
167
+ /**
168
+ * Compositional children. Installed after the parent per pre-order.
169
+ */ children: GetDotenvCliPlugin[];
170
+ /**
171
+ * Compose a child plugin. Returns the parent to enable chaining.
172
+ */
173
+ use: (child: GetDotenvCliPlugin) => GetDotenvCliPlugin;
174
+ }
175
+ /**
176
+ * Public spec type for defining a plugin with optional children.
177
+ * Exported to ensure TypeDoc links and navigation resolve correctly.
178
+ */
179
+ type DefineSpec = Omit<GetDotenvCliPlugin, 'children' | 'use'> & {
180
+ children?: GetDotenvCliPlugin[];
181
+ };
182
+ /**
183
+ * Define a GetDotenv CLI plugin with compositional helpers.
184
+ *
185
+ * @example
186
+ * const parent = definePlugin(\{ id: 'p', setup(cli) \{ /* ... *\/ \} \})
187
+ * .use(childA)
188
+ * .use(childB);
189
+ */
190
+ declare const definePlugin: (spec: DefineSpec) => GetDotenvCliPlugin;
191
+
192
+ export { GetDotenvCli, definePlugin };
193
+ export type { DefineSpec, GetDotenvCliPlugin };
@@ -0,0 +1,193 @@
1
+ import { ZodType } from 'zod';
2
+ import { Command } from 'commander';
3
+
4
+ /**
5
+ * A minimal representation of an environment key/value mapping.
6
+ * Values may be `undefined` to represent "unset".
7
+ */
8
+ type ProcessEnv = Record<string, string | undefined>;
9
+ /**
10
+ * Dynamic variable function signature. Receives the current expanded variables
11
+ * and the selected environment (if any), and returns either a string to set
12
+ * or `undefined` to unset/skip the variable.
13
+ */
14
+ type GetDotenvDynamicFunction = (vars: ProcessEnv, env: string | undefined) => string | undefined;
15
+ type GetDotenvDynamic = Record<string, GetDotenvDynamicFunction | ReturnType<GetDotenvDynamicFunction>>;
16
+ type Logger = Record<string, (...args: unknown[]) => void> | typeof console;
17
+ /**
18
+ * Options passed programmatically to `getDotenv`.
19
+ */
20
+ interface GetDotenvOptions {
21
+ /**
22
+ * default target environment (used if `env` is not provided)
23
+ */
24
+ defaultEnv?: string;
25
+ /**
26
+ * token indicating a dotenv file
27
+ */
28
+ dotenvToken: string;
29
+ /**
30
+ * path to JS/TS module default-exporting an object keyed to dynamic variable functions
31
+ */
32
+ dynamicPath?: string;
33
+ /**
34
+ * Programmatic dynamic variables map. When provided, this takes precedence
35
+ * over {@link GetDotenvOptions.dynamicPath}.
36
+ */
37
+ dynamic?: GetDotenvDynamic;
38
+ /**
39
+ * target environment
40
+ */
41
+ env?: string;
42
+ /**
43
+ * exclude dynamic variables from loading
44
+ */
45
+ excludeDynamic?: boolean;
46
+ /**
47
+ * exclude environment-specific variables from loading
48
+ */
49
+ excludeEnv?: boolean;
50
+ /**
51
+ * exclude global variables from loading
52
+ */
53
+ excludeGlobal?: boolean;
54
+ /**
55
+ * exclude private variables from loading
56
+ */
57
+ excludePrivate?: boolean;
58
+ /**
59
+ * exclude public variables from loading
60
+ */
61
+ excludePublic?: boolean;
62
+ /**
63
+ * load dotenv variables to `process.env`
64
+ */
65
+ loadProcess?: boolean;
66
+ /**
67
+ * log loaded dotenv variables to `logger`
68
+ */
69
+ log?: boolean;
70
+ /**
71
+ * logger object (defaults to console)
72
+ */
73
+ logger?: Logger;
74
+ /**
75
+ * if populated, writes consolidated dotenv file to this path (follows dotenvExpand rules)
76
+ */
77
+ outputPath?: string;
78
+ /**
79
+ * array of input directory paths
80
+ */
81
+ paths?: string[];
82
+ /**
83
+ * filename token indicating private variables
84
+ */
85
+ privateToken?: string;
86
+ /**
87
+ * explicit variables to include
88
+ */
89
+ vars?: ProcessEnv;
90
+ /**
91
+ * Reserved: config loader flag (no-op).
92
+ * The plugin-first host and generator paths already use the config
93
+ * loader/overlay pipeline unconditionally (no-op when no config files
94
+ * are present). This flag is accepted for forward compatibility but
95
+ * currently has no effect.
96
+ */
97
+ useConfigLoader?: boolean;
98
+ }
99
+
100
+ /** * Per-invocation context shared with plugins and actions. */
101
+ type GetDotenvCliCtx<TOptions extends GetDotenvOptions = GetDotenvOptions> = {
102
+ optionsResolved: TOptions;
103
+ dotenv: ProcessEnv;
104
+ plugins?: Record<string, unknown>;
105
+ pluginConfigs?: Record<string, unknown>;
106
+ };
107
+ /**
108
+ * Plugin-first CLI host for get-dotenv. Extends Commander.Command.
109
+ *
110
+ * Responsibilities:
111
+ * - Resolve options strictly and compute dotenv context (resolveAndLoad).
112
+ * - Expose a stable accessor for the current context (getCtx).
113
+ * - Provide a namespacing helper (ns).
114
+ * - Support composable plugins with parent → children install and afterResolve.
115
+ *
116
+ * NOTE: This host is additive and does not alter the legacy CLI.
117
+ */
118
+ declare class GetDotenvCli<TOptions extends GetDotenvOptions = GetDotenvOptions> extends Command {
119
+ /** Registered top-level plugins (composition happens via .use()) */
120
+ private _plugins;
121
+ /** One-time installation guard */
122
+ private _installed;
123
+ constructor(alias?: string);
124
+ /**
125
+ * Resolve options (strict) and compute dotenv context. * Stores the context on the instance under a symbol.
126
+ */
127
+ resolveAndLoad(customOptions?: Partial<TOptions>): Promise<GetDotenvCliCtx<TOptions>>;
128
+ /**
129
+ * Retrieve the current invocation context (if any).
130
+ */
131
+ getCtx(): GetDotenvCliCtx<TOptions> | undefined;
132
+ /** * Convenience helper to create a namespaced subcommand.
133
+ */
134
+ ns(name: string): Command;
135
+ /**
136
+ * Register a plugin for installation (parent level).
137
+ * Installation occurs on first resolveAndLoad() (or explicit install()).
138
+ */
139
+ use(plugin: GetDotenvCliPlugin): this;
140
+ /**
141
+ * Install all registered plugins in parent → children (pre-order).
142
+ * Runs only once per CLI instance.
143
+ */
144
+ install(): Promise<void>;
145
+ /**
146
+ * Run afterResolve hooks for all plugins (parent → children).
147
+ */
148
+ private _runAfterResolve;
149
+ }
150
+
151
+ /** Public plugin contract used by the GetDotenv CLI host. */ interface GetDotenvCliPlugin {
152
+ id?: string /**
153
+ * Setup phase: register commands and wiring on the provided CLI instance. * Runs parent → children (pre-order).
154
+ */;
155
+ setup: (cli: GetDotenvCli) => void | Promise<void>;
156
+ /**
157
+ * After the dotenv context is resolved, initialize any clients/secrets
158
+ * or attach per-plugin state under ctx.plugins (by convention).
159
+ * Runs parent → children (pre-order).
160
+ */
161
+ afterResolve?: (cli: GetDotenvCli, ctx: GetDotenvCliCtx) => void | Promise<void>;
162
+ /**
163
+ * Optional Zod schema for this plugin's config slice (from config.plugins[id]).
164
+ * When provided, the host validates the merged config under the guarded loader path.
165
+ */
166
+ configSchema?: ZodType;
167
+ /**
168
+ * Compositional children. Installed after the parent per pre-order.
169
+ */ children: GetDotenvCliPlugin[];
170
+ /**
171
+ * Compose a child plugin. Returns the parent to enable chaining.
172
+ */
173
+ use: (child: GetDotenvCliPlugin) => GetDotenvCliPlugin;
174
+ }
175
+ /**
176
+ * Public spec type for defining a plugin with optional children.
177
+ * Exported to ensure TypeDoc links and navigation resolve correctly.
178
+ */
179
+ type DefineSpec = Omit<GetDotenvCliPlugin, 'children' | 'use'> & {
180
+ children?: GetDotenvCliPlugin[];
181
+ };
182
+ /**
183
+ * Define a GetDotenv CLI plugin with compositional helpers.
184
+ *
185
+ * @example
186
+ * const parent = definePlugin(\{ id: 'p', setup(cli) \{ /* ... *\/ \} \})
187
+ * .use(childA)
188
+ * .use(childB);
189
+ */
190
+ declare const definePlugin: (spec: DefineSpec) => GetDotenvCliPlugin;
191
+
192
+ export { GetDotenvCli, definePlugin };
193
+ export type { DefineSpec, GetDotenvCliPlugin };