@karmaniverous/get-dotenv 4.0.0 → 4.2.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.
package/dist/index.d.cts CHANGED
@@ -5,7 +5,7 @@ import { Command } from '@commander-js/extra-typings';
5
5
  */
6
6
  interface GetDotenvCliOptions extends Omit<GetDotenvOptions, 'paths' | 'vars'> {
7
7
  /**
8
- * Cli alias. Should align with the `bin` property in `package.json`.
8
+ * CLI alias. Should align with the `bin` property in `package.json`.
9
9
  */
10
10
  alias?: string;
11
11
  /**
@@ -60,7 +60,7 @@ interface GetDotenvCliOptions extends Omit<GetDotenvOptions, 'paths' | 'vars'> {
60
60
  type ProcessEnv = Record<string, string | undefined>;
61
61
  type GetDotenvDynamicFunction = (vars: ProcessEnv) => string | undefined;
62
62
  type GetDotenvDynamic = Record<string, GetDotenvDynamicFunction | ReturnType<GetDotenvDynamicFunction>>;
63
- type Logger = Record<string, (...args: unknown[]) => void>;
63
+ type Logger = Record<string, (...args: unknown[]) => void> | typeof console;
64
64
  /**
65
65
  * Options passed programmatically to `getDotenv` and `getDotEnvSync`.
66
66
  */
@@ -129,6 +129,10 @@ interface GetDotenvOptions {
129
129
  * filename token indicating private variables
130
130
  */
131
131
  privateToken?: string;
132
+ /**
133
+ * Shell scripts that can be executed from the CLI, either individually or via the batch subcommand.
134
+ */
135
+ shellScripts?: Record<string, string>;
132
136
  /**
133
137
  * explicit variables to include
134
138
  */
@@ -202,44 +206,11 @@ interface GetDotenvCliGenerateOptions extends Omit<GetDotenvCliOptions, 'env'> {
202
206
  */
203
207
  postHook?: GetDotenvCliPostHookCallback;
204
208
  }
209
+
205
210
  /**
206
211
  * Generate a Commander CLI Command for get-dotenv.
207
212
  */
208
- declare const generateGetDotenvCli: ({ logger, preHook, postHook, ...cliOptionsCustom }?: GetDotenvCliGenerateOptions) => Command<[], {
209
- env?: string | undefined;
210
- vars?: string | undefined;
211
- command?: string | undefined;
212
- outputPath?: string | undefined;
213
- loadProcess?: true | undefined;
214
- loadProcessOff?: true | undefined;
215
- excludeAll?: true | undefined;
216
- excludeAllOff?: true | undefined;
217
- excludeDynamic?: true | undefined;
218
- excludeDynamicOff?: true | undefined;
219
- excludeEnv?: true | undefined;
220
- excludeEnvOff?: true | undefined;
221
- excludeGlobal?: true | undefined;
222
- excludeGlobalOff?: true | undefined;
223
- excludePrivate?: true | undefined;
224
- excludePrivateOff?: true | undefined;
225
- excludePublic?: true | undefined;
226
- excludePublicOff?: true | undefined;
227
- log?: true | undefined;
228
- logOff?: true | undefined;
229
- debug?: true | undefined;
230
- debugOff?: true | undefined;
231
- defaultEnv?: string | undefined;
232
- dotenvToken?: string | undefined;
233
- dynamicPath?: string | undefined;
234
- paths?: string | undefined;
235
- pathsDelimiter: string;
236
- pathsDelimiterPattern: string;
237
- privateToken?: string | undefined;
238
- varsDelimiter: string;
239
- varsDelimiterPattern: string;
240
- varsAssignor: string;
241
- varsAssignorPattern: string;
242
- }>;
213
+ declare const generateGetDotenvCli: ({ logger, preHook, postHook, ...cliOptionsCustom }?: GetDotenvCliGenerateOptions) => Command;
243
214
 
244
215
  /**
245
216
  * Asynchronously process dotenv files of the form `.env[.<ENV>][.<PRIVATE_TOKEN>]`
package/dist/index.d.mts CHANGED
@@ -5,7 +5,7 @@ import { Command } from '@commander-js/extra-typings';
5
5
  */
6
6
  interface GetDotenvCliOptions extends Omit<GetDotenvOptions, 'paths' | 'vars'> {
7
7
  /**
8
- * Cli alias. Should align with the `bin` property in `package.json`.
8
+ * CLI alias. Should align with the `bin` property in `package.json`.
9
9
  */
10
10
  alias?: string;
11
11
  /**
@@ -60,7 +60,7 @@ interface GetDotenvCliOptions extends Omit<GetDotenvOptions, 'paths' | 'vars'> {
60
60
  type ProcessEnv = Record<string, string | undefined>;
61
61
  type GetDotenvDynamicFunction = (vars: ProcessEnv) => string | undefined;
62
62
  type GetDotenvDynamic = Record<string, GetDotenvDynamicFunction | ReturnType<GetDotenvDynamicFunction>>;
63
- type Logger = Record<string, (...args: unknown[]) => void>;
63
+ type Logger = Record<string, (...args: unknown[]) => void> | typeof console;
64
64
  /**
65
65
  * Options passed programmatically to `getDotenv` and `getDotEnvSync`.
66
66
  */
@@ -129,6 +129,10 @@ interface GetDotenvOptions {
129
129
  * filename token indicating private variables
130
130
  */
131
131
  privateToken?: string;
132
+ /**
133
+ * Shell scripts that can be executed from the CLI, either individually or via the batch subcommand.
134
+ */
135
+ shellScripts?: Record<string, string>;
132
136
  /**
133
137
  * explicit variables to include
134
138
  */
@@ -202,44 +206,11 @@ interface GetDotenvCliGenerateOptions extends Omit<GetDotenvCliOptions, 'env'> {
202
206
  */
203
207
  postHook?: GetDotenvCliPostHookCallback;
204
208
  }
209
+
205
210
  /**
206
211
  * Generate a Commander CLI Command for get-dotenv.
207
212
  */
208
- declare const generateGetDotenvCli: ({ logger, preHook, postHook, ...cliOptionsCustom }?: GetDotenvCliGenerateOptions) => Command<[], {
209
- env?: string | undefined;
210
- vars?: string | undefined;
211
- command?: string | undefined;
212
- outputPath?: string | undefined;
213
- loadProcess?: true | undefined;
214
- loadProcessOff?: true | undefined;
215
- excludeAll?: true | undefined;
216
- excludeAllOff?: true | undefined;
217
- excludeDynamic?: true | undefined;
218
- excludeDynamicOff?: true | undefined;
219
- excludeEnv?: true | undefined;
220
- excludeEnvOff?: true | undefined;
221
- excludeGlobal?: true | undefined;
222
- excludeGlobalOff?: true | undefined;
223
- excludePrivate?: true | undefined;
224
- excludePrivateOff?: true | undefined;
225
- excludePublic?: true | undefined;
226
- excludePublicOff?: true | undefined;
227
- log?: true | undefined;
228
- logOff?: true | undefined;
229
- debug?: true | undefined;
230
- debugOff?: true | undefined;
231
- defaultEnv?: string | undefined;
232
- dotenvToken?: string | undefined;
233
- dynamicPath?: string | undefined;
234
- paths?: string | undefined;
235
- pathsDelimiter: string;
236
- pathsDelimiterPattern: string;
237
- privateToken?: string | undefined;
238
- varsDelimiter: string;
239
- varsDelimiterPattern: string;
240
- varsAssignor: string;
241
- varsAssignorPattern: string;
242
- }>;
213
+ declare const generateGetDotenvCli: ({ logger, preHook, postHook, ...cliOptionsCustom }?: GetDotenvCliGenerateOptions) => Command;
243
214
 
244
215
  /**
245
216
  * Asynchronously process dotenv files of the form `.env[.<ENV>][.<PRIVATE_TOKEN>]`
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import { Command } from '@commander-js/extra-typings';
5
5
  */
6
6
  interface GetDotenvCliOptions extends Omit<GetDotenvOptions, 'paths' | 'vars'> {
7
7
  /**
8
- * Cli alias. Should align with the `bin` property in `package.json`.
8
+ * CLI alias. Should align with the `bin` property in `package.json`.
9
9
  */
10
10
  alias?: string;
11
11
  /**
@@ -60,7 +60,7 @@ interface GetDotenvCliOptions extends Omit<GetDotenvOptions, 'paths' | 'vars'> {
60
60
  type ProcessEnv = Record<string, string | undefined>;
61
61
  type GetDotenvDynamicFunction = (vars: ProcessEnv) => string | undefined;
62
62
  type GetDotenvDynamic = Record<string, GetDotenvDynamicFunction | ReturnType<GetDotenvDynamicFunction>>;
63
- type Logger = Record<string, (...args: unknown[]) => void>;
63
+ type Logger = Record<string, (...args: unknown[]) => void> | typeof console;
64
64
  /**
65
65
  * Options passed programmatically to `getDotenv` and `getDotEnvSync`.
66
66
  */
@@ -129,6 +129,10 @@ interface GetDotenvOptions {
129
129
  * filename token indicating private variables
130
130
  */
131
131
  privateToken?: string;
132
+ /**
133
+ * Shell scripts that can be executed from the CLI, either individually or via the batch subcommand.
134
+ */
135
+ shellScripts?: Record<string, string>;
132
136
  /**
133
137
  * explicit variables to include
134
138
  */
@@ -202,44 +206,11 @@ interface GetDotenvCliGenerateOptions extends Omit<GetDotenvCliOptions, 'env'> {
202
206
  */
203
207
  postHook?: GetDotenvCliPostHookCallback;
204
208
  }
209
+
205
210
  /**
206
211
  * Generate a Commander CLI Command for get-dotenv.
207
212
  */
208
- declare const generateGetDotenvCli: ({ logger, preHook, postHook, ...cliOptionsCustom }?: GetDotenvCliGenerateOptions) => Command<[], {
209
- env?: string | undefined;
210
- vars?: string | undefined;
211
- command?: string | undefined;
212
- outputPath?: string | undefined;
213
- loadProcess?: true | undefined;
214
- loadProcessOff?: true | undefined;
215
- excludeAll?: true | undefined;
216
- excludeAllOff?: true | undefined;
217
- excludeDynamic?: true | undefined;
218
- excludeDynamicOff?: true | undefined;
219
- excludeEnv?: true | undefined;
220
- excludeEnvOff?: true | undefined;
221
- excludeGlobal?: true | undefined;
222
- excludeGlobalOff?: true | undefined;
223
- excludePrivate?: true | undefined;
224
- excludePrivateOff?: true | undefined;
225
- excludePublic?: true | undefined;
226
- excludePublicOff?: true | undefined;
227
- log?: true | undefined;
228
- logOff?: true | undefined;
229
- debug?: true | undefined;
230
- debugOff?: true | undefined;
231
- defaultEnv?: string | undefined;
232
- dotenvToken?: string | undefined;
233
- dynamicPath?: string | undefined;
234
- paths?: string | undefined;
235
- pathsDelimiter: string;
236
- pathsDelimiterPattern: string;
237
- privateToken?: string | undefined;
238
- varsDelimiter: string;
239
- varsDelimiterPattern: string;
240
- varsAssignor: string;
241
- varsAssignorPattern: string;
242
- }>;
213
+ declare const generateGetDotenvCli: ({ logger, preHook, postHook, ...cliOptionsCustom }?: GetDotenvCliGenerateOptions) => Command;
243
214
 
244
215
  /**
245
216
  * Asynchronously process dotenv files of the form `.env[.<ENV>][.<PRIVATE_TOKEN>]`