@karmaniverous/get-dotenv 4.0.0-3 → 4.1.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
@@ -8,14 +8,14 @@ interface GetDotenvCliOptions extends Omit<GetDotenvOptions, 'paths' | 'vars'> {
8
8
  * Cli alias. Should align with the `bin` property in `package.json`.
9
9
  */
10
10
  alias?: string;
11
- /**
12
- * Cli description (appears in CLI help).
13
- */
14
- description?: string;
15
11
  /**
16
12
  * Logs CLI internals when true.
17
13
  */
18
14
  debug?: boolean;
15
+ /**
16
+ * Cli description (appears in CLI help).
17
+ */
18
+ description?: string;
19
19
  /**
20
20
  * A delimited string of paths to dotenv files.
21
21
  */
@@ -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
  */
@@ -78,7 +78,7 @@ interface GetDotenvOptions {
78
78
  */
79
79
  dotenvToken?: string;
80
80
  /**
81
- * path to file exporting an object keyed to dynamic variable functions
81
+ * path to JS module default-exporting an object keyed to dynamic variable functions
82
82
  */
83
83
  dynamicPath?: string;
84
84
  /**
@@ -86,31 +86,31 @@ interface GetDotenvOptions {
86
86
  */
87
87
  env?: string;
88
88
  /**
89
- * exclude dynamic variables
89
+ * exclude dynamic variables from loading
90
90
  */
91
91
  excludeDynamic?: boolean;
92
92
  /**
93
- * exclude environment-specific variables
93
+ * exclude environment-specific variables from loading
94
94
  */
95
95
  excludeEnv?: boolean;
96
96
  /**
97
- * exclude global variables
97
+ * exclude global variables from loading
98
98
  */
99
99
  excludeGlobal?: boolean;
100
100
  /**
101
- * exclude private variables
101
+ * exclude private variables from loading
102
102
  */
103
103
  excludePrivate?: boolean;
104
104
  /**
105
- * exclude public variables
105
+ * exclude public variables from loading
106
106
  */
107
107
  excludePublic?: boolean;
108
108
  /**
109
- * load dotenv to process.env
109
+ * load dotenv variables to `process.env`
110
110
  */
111
111
  loadProcess?: boolean;
112
112
  /**
113
- * log result to logger
113
+ * log loaded dotenv variables to `logger`
114
114
  */
115
115
  log?: boolean;
116
116
  /**
@@ -118,7 +118,7 @@ interface GetDotenvOptions {
118
118
  */
119
119
  logger?: Logger;
120
120
  /**
121
- * if populated, writes consolidated .env file to this path (follows dotenvExpand rules)
121
+ * if populated, writes consolidated dotenv file to this path (follows dotenvExpand rules)
122
122
  */
123
123
  outputPath?: string;
124
124
  /**
@@ -202,44 +202,11 @@ interface GetDotenvCliGenerateOptions extends Omit<GetDotenvCliOptions, 'env'> {
202
202
  */
203
203
  postHook?: GetDotenvCliPostHookCallback;
204
204
  }
205
+
205
206
  /**
206
207
  * Generate a Commander CLI Command for get-dotenv.
207
208
  */
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
- }>;
209
+ declare const generateGetDotenvCli: ({ logger, preHook, postHook, ...cliOptionsCustom }?: GetDotenvCliGenerateOptions) => Command;
243
210
 
244
211
  /**
245
212
  * Asynchronously process dotenv files of the form `.env[.<ENV>][.<PRIVATE_TOKEN>]`
package/dist/index.d.mts CHANGED
@@ -8,14 +8,14 @@ interface GetDotenvCliOptions extends Omit<GetDotenvOptions, 'paths' | 'vars'> {
8
8
  * Cli alias. Should align with the `bin` property in `package.json`.
9
9
  */
10
10
  alias?: string;
11
- /**
12
- * Cli description (appears in CLI help).
13
- */
14
- description?: string;
15
11
  /**
16
12
  * Logs CLI internals when true.
17
13
  */
18
14
  debug?: boolean;
15
+ /**
16
+ * Cli description (appears in CLI help).
17
+ */
18
+ description?: string;
19
19
  /**
20
20
  * A delimited string of paths to dotenv files.
21
21
  */
@@ -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
  */
@@ -78,7 +78,7 @@ interface GetDotenvOptions {
78
78
  */
79
79
  dotenvToken?: string;
80
80
  /**
81
- * path to file exporting an object keyed to dynamic variable functions
81
+ * path to JS module default-exporting an object keyed to dynamic variable functions
82
82
  */
83
83
  dynamicPath?: string;
84
84
  /**
@@ -86,31 +86,31 @@ interface GetDotenvOptions {
86
86
  */
87
87
  env?: string;
88
88
  /**
89
- * exclude dynamic variables
89
+ * exclude dynamic variables from loading
90
90
  */
91
91
  excludeDynamic?: boolean;
92
92
  /**
93
- * exclude environment-specific variables
93
+ * exclude environment-specific variables from loading
94
94
  */
95
95
  excludeEnv?: boolean;
96
96
  /**
97
- * exclude global variables
97
+ * exclude global variables from loading
98
98
  */
99
99
  excludeGlobal?: boolean;
100
100
  /**
101
- * exclude private variables
101
+ * exclude private variables from loading
102
102
  */
103
103
  excludePrivate?: boolean;
104
104
  /**
105
- * exclude public variables
105
+ * exclude public variables from loading
106
106
  */
107
107
  excludePublic?: boolean;
108
108
  /**
109
- * load dotenv to process.env
109
+ * load dotenv variables to `process.env`
110
110
  */
111
111
  loadProcess?: boolean;
112
112
  /**
113
- * log result to logger
113
+ * log loaded dotenv variables to `logger`
114
114
  */
115
115
  log?: boolean;
116
116
  /**
@@ -118,7 +118,7 @@ interface GetDotenvOptions {
118
118
  */
119
119
  logger?: Logger;
120
120
  /**
121
- * if populated, writes consolidated .env file to this path (follows dotenvExpand rules)
121
+ * if populated, writes consolidated dotenv file to this path (follows dotenvExpand rules)
122
122
  */
123
123
  outputPath?: string;
124
124
  /**
@@ -202,44 +202,11 @@ interface GetDotenvCliGenerateOptions extends Omit<GetDotenvCliOptions, 'env'> {
202
202
  */
203
203
  postHook?: GetDotenvCliPostHookCallback;
204
204
  }
205
+
205
206
  /**
206
207
  * Generate a Commander CLI Command for get-dotenv.
207
208
  */
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
- }>;
209
+ declare const generateGetDotenvCli: ({ logger, preHook, postHook, ...cliOptionsCustom }?: GetDotenvCliGenerateOptions) => Command;
243
210
 
244
211
  /**
245
212
  * Asynchronously process dotenv files of the form `.env[.<ENV>][.<PRIVATE_TOKEN>]`
package/dist/index.d.ts CHANGED
@@ -8,14 +8,14 @@ interface GetDotenvCliOptions extends Omit<GetDotenvOptions, 'paths' | 'vars'> {
8
8
  * Cli alias. Should align with the `bin` property in `package.json`.
9
9
  */
10
10
  alias?: string;
11
- /**
12
- * Cli description (appears in CLI help).
13
- */
14
- description?: string;
15
11
  /**
16
12
  * Logs CLI internals when true.
17
13
  */
18
14
  debug?: boolean;
15
+ /**
16
+ * Cli description (appears in CLI help).
17
+ */
18
+ description?: string;
19
19
  /**
20
20
  * A delimited string of paths to dotenv files.
21
21
  */
@@ -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
  */
@@ -78,7 +78,7 @@ interface GetDotenvOptions {
78
78
  */
79
79
  dotenvToken?: string;
80
80
  /**
81
- * path to file exporting an object keyed to dynamic variable functions
81
+ * path to JS module default-exporting an object keyed to dynamic variable functions
82
82
  */
83
83
  dynamicPath?: string;
84
84
  /**
@@ -86,31 +86,31 @@ interface GetDotenvOptions {
86
86
  */
87
87
  env?: string;
88
88
  /**
89
- * exclude dynamic variables
89
+ * exclude dynamic variables from loading
90
90
  */
91
91
  excludeDynamic?: boolean;
92
92
  /**
93
- * exclude environment-specific variables
93
+ * exclude environment-specific variables from loading
94
94
  */
95
95
  excludeEnv?: boolean;
96
96
  /**
97
- * exclude global variables
97
+ * exclude global variables from loading
98
98
  */
99
99
  excludeGlobal?: boolean;
100
100
  /**
101
- * exclude private variables
101
+ * exclude private variables from loading
102
102
  */
103
103
  excludePrivate?: boolean;
104
104
  /**
105
- * exclude public variables
105
+ * exclude public variables from loading
106
106
  */
107
107
  excludePublic?: boolean;
108
108
  /**
109
- * load dotenv to process.env
109
+ * load dotenv variables to `process.env`
110
110
  */
111
111
  loadProcess?: boolean;
112
112
  /**
113
- * log result to logger
113
+ * log loaded dotenv variables to `logger`
114
114
  */
115
115
  log?: boolean;
116
116
  /**
@@ -118,7 +118,7 @@ interface GetDotenvOptions {
118
118
  */
119
119
  logger?: Logger;
120
120
  /**
121
- * if populated, writes consolidated .env file to this path (follows dotenvExpand rules)
121
+ * if populated, writes consolidated dotenv file to this path (follows dotenvExpand rules)
122
122
  */
123
123
  outputPath?: string;
124
124
  /**
@@ -202,44 +202,11 @@ interface GetDotenvCliGenerateOptions extends Omit<GetDotenvCliOptions, 'env'> {
202
202
  */
203
203
  postHook?: GetDotenvCliPostHookCallback;
204
204
  }
205
+
205
206
  /**
206
207
  * Generate a Commander CLI Command for get-dotenv.
207
208
  */
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
- }>;
209
+ declare const generateGetDotenvCli: ({ logger, preHook, postHook, ...cliOptionsCustom }?: GetDotenvCliGenerateOptions) => Command;
243
210
 
244
211
  /**
245
212
  * Asynchronously process dotenv files of the form `.env[.<ENV>][.<PRIVATE_TOKEN>]`