@karmaniverous/get-dotenv 3.0.5 → 3.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.
@@ -1,202 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getCli = void 0;
7
- var _boolean = require("boolean");
8
- var _commander = require("commander");
9
- var _execa = require("execa");
10
- var _lodash = _interopRequireDefault(require("lodash.frompairs"));
11
- var _lodash2 = _interopRequireDefault(require("lodash.isstring"));
12
- var _dotenvDefaults = require("./dotenvDefaults.js");
13
- var _dotenvExpand = require("./dotenvExpand.js");
14
- var _getDotenv = require("./getDotenv.js");
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
- // npm imports
17
-
18
- // lib imports
19
-
20
- const booleanExpand = value => (0, _boolean.boolean)((0, _dotenvExpand.dotenvExpand)(value));
21
-
22
- /**
23
- * GetDotenv CLI Options type
24
- *
25
- * @typedef {Object} GetDotenvCliOptions
26
- * @property {string} [cliInvocation] - cli invocation string (used for cli help)
27
- * @property {bool} [debug] - debug mode
28
- * @property {string} [defaultEnv] - default target environment
29
- * @property {string} [dotenvToken] - token indicating a dotenv file
30
- * @property {string} [dynamicPath] - path to file exporting an object keyed to dynamic variable functions
31
- * @property {string} [env] - target environment
32
- * @property {bool} [excludeDynamic] - exclude dynamic variables
33
- * @property {bool} [excludeEnv] - exclude environment-specific variables
34
- * @property {bool} [excludeGlobal] - exclude global & dynamic variables
35
- * @property {bool} [excludePrivate] - exclude private variables
36
- * @property {bool} [excludePublic] - exclude public variables
37
- * @property {bool} [log] - log result to console
38
- * @property {function} [logger] - logger function
39
- * @property {string} [outputPath] - if populated, writes consolidated .env file to this path (follows {@link https://github.com/motdotla/dotenv-expand/blob/master/tests/.env dotenv-expand rules})
40
- * @property {string} [paths] - space-delimited list of input directory paths
41
- * @property {string} [privateToken] - token indicating private variables.
42
- * @property {string} [shell] - execa shell option
43
- * @property {bool} [suppressDotenv] - suppress dotenv loading
44
- */
45
-
46
- /**
47
- * GetDotenv CLI Pre-hook Callback type. Transforms inbound options & executes side effects.
48
- *
49
- * @async
50
- * @callback GetDotenvPreHookCallback
51
- * @param {GetDotenvCliOptions} options - inbound GetDotenv CLI Options object
52
- * @returns {GetDotenvCliOptions} transformed GetDotenv CLI Options object (undefined return value is ignored)
53
- */
54
-
55
- /**
56
- * GetDotenv CLI Post-hook Callback type. Executes side effects within getdotenv context.
57
- *
58
- * @async
59
- * @callback GetDotenvPostHookCallback
60
- * @param {GetDotenvCliOptions} options - GetDotenv CLI Options object
61
- * @param {object} dotenv - dotenv object
62
- */
63
-
64
- /**
65
- * GetDotenv CLI Config type
66
- *
67
- * @typedef {Object} GetDotenvCliConfig
68
- * @property {object} [config] - config options
69
- * @property {GetDotenvCliOptions} [config.defaultOptions] - default options
70
- * @property {GetDotenvPreHookCallback} [config.preHook] - transforms inbound options & executes side effects
71
- * @property {GetDotenvPostHookCallback} [config.postHook] - executes side effects within getdotenv context
72
- */
73
-
74
- /**
75
- * Generate a CLI for get-dotenv.
76
- *
77
- * @param {GetDotenvCliConfig} [config] - config object
78
- * @returns {object} The CLI command.
79
- */
80
- const getCli = function () {
81
- let {
82
- defaultOptions = {},
83
- preHook,
84
- postHook
85
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
86
- let {
87
- cliInvocation = 'getdotenv',
88
- command,
89
- defaultEnv = 'dev',
90
- dotenvToken,
91
- dynamicPath,
92
- env,
93
- excludeDynamic,
94
- excludeEnv,
95
- excludeGlobal,
96
- excludePrivate,
97
- excludePublic,
98
- log,
99
- outputPath,
100
- paths,
101
- pathsDelimiter = '\\s+',
102
- privateToken,
103
- shell,
104
- suppressDotenv,
105
- vars,
106
- varsAssignor = '=',
107
- varsDelimiter = '\\s+'
108
- } = {
109
- ..._dotenvDefaults.dotenvDefaults,
110
- ...defaultOptions
111
- };
112
- if (Array.isArray(paths)) paths = paths.join(' ');
113
- return new _commander.Command().name(cliInvocation).description('Base CLI. All options except delimiters follow dotenv-expand rules.').enablePositionalOptions().passThroughOptions().option('-e, --env <string>', 'target environment', _dotenvExpand.dotenvExpand, env).option('--default-env <string>', 'default target environment', _dotenvExpand.dotenvExpand, defaultEnv).option('-p, --paths <string>', 'delimited list of paths to dotenv directory', _dotenvExpand.dotenvExpand, paths).option('--paths-delimiter <string>', 'regex paths delimiter', pathsDelimiter).option('-v, --vars <string>', 'delimited list KEY=VALUE pairs', _dotenvExpand.dotenvExpand, vars).option('--vars-delimiter <string>', 'regex vars delimiter', varsDelimiter).option('--vars-assignor <string>', 'regex vars assignment operator', varsAssignor).option('-y, --dynamic-path <string>', 'dynamic variables path', _dotenvExpand.dotenvExpand, dynamicPath).option('-o, --output-path <string>', 'consolidated output file, follows dotenv-expand rules using loaded env vars', _dotenvExpand.dotenvExpand, outputPath).addOption(new _commander.Option('-n, --exclude-env', `exclude environment-specific variables${excludeEnv ? ' (default)' : ''}`).conflicts('excludeEnvOff')).addOption(new _commander.Option('-N, --exclude-env-off', `exclude environment-specific variables OFF${!excludeEnv ? ' (default)' : ''}`).conflicts('excludeEnv')).addOption(new _commander.Option('-g, --exclude-global', `exclude global variables${excludeGlobal ? ' (default)' : ''}`).conflicts('excludeGlobalOff')).addOption(new _commander.Option('-G, --exclude-global-off', `exclude global variables OFF${!excludeGlobal ? ' (default)' : ''}`).conflicts('excludeGlobal')).addOption(new _commander.Option('-r, --exclude-private', `exclude private variables${excludePrivate ? ' (default)' : ''}`).conflicts('excludePrivateOff')).addOption(new _commander.Option('-R, --exclude-private-off', `exclude private variables OFF${!excludePrivate ? ' (default)' : ''}`).conflicts('excludePrivate')).addOption(new _commander.Option('-u, --exclude-public', `exclude public variables${excludePublic ? ' (default)' : ''}`).conflicts('excludePublicOff')).addOption(new _commander.Option('-U, --exclude-public-off', `exclude public variables OFF${!excludePublic ? ' (default)' : ''}`).conflicts('excludePublic')).addOption(new _commander.Option('-z, --exclude-dynamic', `exclude dynamic variables${excludeDynamic ? ' (default)' : ''}`).conflicts('excludeDynamicOff')).addOption(new _commander.Option('-Z, --exclude-dynamic-off', `exclude dynamic variables OFF${!excludeDynamic ? ' (default)' : ''}`).conflicts('excludeDynamic')).addOption(new _commander.Option('-l, --log', `console log extracted variables${log ? ' (default)' : ''}`).conflicts('logOff')).addOption(new _commander.Option('-L, --log-off', `console log extracted variables OFF${!log ? ' (default)' : ''}`).conflicts('log')).option('-x, --suppress-dotenv', 'suppress dotenv loading', booleanExpand, suppressDotenv ?? false).option('-c, --command <string>', 'shell command string', _dotenvExpand.dotenvExpand, command).option('-s, --shell <string>', 'execa shell option', _dotenvExpand.dotenvExpand, shell).option('--dotenv-token <string>', 'token indicating a dotenv file', _dotenvExpand.dotenvExpand, dotenvToken).option('--private-token <string>', 'token indicating private variables', _dotenvExpand.dotenvExpand, privateToken).option('-D, --debug', 'debug mode').addCommand(new _commander.Command().name('cmd').description('execute shell command string (default command)').configureHelp({
114
- showGlobalOptions: true
115
- }).enablePositionalOptions().passThroughOptions().action(async (options, _ref) => {
116
- let {
117
- args,
118
- parent
119
- } = _ref;
120
- if (args.length) await (0, _execa.execaCommand)(args.join(' '), {
121
- stdio: 'inherit',
122
- shell: parent.opts().shell
123
- });
124
- }), {
125
- isDefault: true
126
- }).hook('preSubcommand', async thisCommand => {
127
- var _paths;
128
- // Inherit options from parent command.
129
- const getdotenvOptions = process.env['getdotenvOptions'] ? JSON.parse(process.env['getdotenvOptions']) : {};
130
- const {
131
- excludeDynamicOff,
132
- excludeEnvOff,
133
- excludeGlobalOff,
134
- excludePrivateOff,
135
- excludePublicOff,
136
- logOff,
137
- ...localOptions
138
- } = thisCommand.opts();
139
- if (excludeDynamicOff) localOptions.excludeDynamic = false;
140
- if (excludeEnvOff) localOptions.excludeEnv = false;
141
- if (excludeGlobalOff) localOptions.excludeGlobal = false;
142
- if (excludePrivateOff) localOptions.excludePrivate = false;
143
- if (excludePublicOff) localOptions.excludePublic = false;
144
- if (logOff) localOptions.log = false;
145
- let mergedOptions = {
146
- ...getdotenvOptions,
147
- ...localOptions
148
- };
149
-
150
- // Execute pre-hook.
151
- const options = preHook ? (await preHook(mergedOptions)) ?? mergedOptions : mergedOptions;
152
-
153
- // Get options.
154
- let {
155
- command,
156
- debug,
157
- defaultEnv,
158
- env,
159
- paths,
160
- pathsDelimiter,
161
- suppressDotenv,
162
- vars: varsStr,
163
- varsDelimiter,
164
- varsAssignor,
165
- ...rest
166
- } = options;
167
-
168
- // Parse vars.
169
- const vars = varsStr !== null && varsStr !== void 0 && varsStr.length ? (0, _lodash.default)(varsStr.split(new RegExp(varsDelimiter)).map(v => v.split(new RegExp(varsAssignor)))) : undefined;
170
- if (debug) {
171
- console.log('*** getdotenvOptions ***', getdotenvOptions);
172
- console.log('*** localOptions ***', localOptions);
173
- console.log('*** mergedOptions ***', mergedOptions);
174
- console.log('*** options ***', options);
175
- console.log('*** vars ***', vars);
176
- }
177
-
178
- // Execute getdotenv.
179
- if ((_paths = paths) !== null && _paths !== void 0 && _paths.length && !suppressDotenv) {
180
- var _paths2;
181
- if ((0, _lodash2.default)(paths)) paths = (_paths2 = paths) === null || _paths2 === void 0 ? void 0 : _paths2.split(new RegExp(pathsDelimiter));
182
- var dotenv = await (0, _getDotenv.getDotenv)({
183
- ...rest,
184
- env: env ?? defaultEnv,
185
- loadProcess: true,
186
- paths,
187
- vars
188
- });
189
- }
190
- if (debug) console.log('*** dotenv ***', dotenv);
191
-
192
- // Execute post-hook.
193
- if (postHook) await postHook(options, dotenv);
194
-
195
- // Execute shell command.
196
- if (command) await (0, _execa.execaCommand)(command, {
197
- stdio: 'inherit',
198
- shell
199
- });
200
- });
201
- };
202
- exports.getCli = getCli;
@@ -1,13 +0,0 @@
1
- export const dotenvDefaults = {
2
- dotenvToken: '.env',
3
- excludeDynamic: false,
4
- excludeEnv: false,
5
- excludeGlobal: false,
6
- excludePrivate: false,
7
- excludePublic: false,
8
- loadProcess: false,
9
- log: false,
10
- logger: console.log,
11
- paths: ['./'],
12
- privateToken: 'local',
13
- };
package/lib/getCli.js DELETED
@@ -1,360 +0,0 @@
1
- // npm imports
2
- import { boolean } from 'boolean';
3
- import { Command, Option } from 'commander';
4
- import { execaCommand } from 'execa';
5
- import fromPairs from 'lodash.frompairs';
6
- import isString from 'lodash.isstring';
7
-
8
- // lib imports
9
- import { dotenvDefaults } from './dotenvDefaults.js';
10
- import { dotenvExpand } from './dotenvExpand.js';
11
- import { getDotenv } from './getDotenv.js';
12
-
13
- const booleanExpand = (value) => boolean(dotenvExpand(value));
14
-
15
- /**
16
- * GetDotenv CLI Options type
17
- *
18
- * @typedef {Object} GetDotenvCliOptions
19
- * @property {string} [cliInvocation] - cli invocation string (used for cli help)
20
- * @property {bool} [debug] - debug mode
21
- * @property {string} [defaultEnv] - default target environment
22
- * @property {string} [dotenvToken] - token indicating a dotenv file
23
- * @property {string} [dynamicPath] - path to file exporting an object keyed to dynamic variable functions
24
- * @property {string} [env] - target environment
25
- * @property {bool} [excludeDynamic] - exclude dynamic variables
26
- * @property {bool} [excludeEnv] - exclude environment-specific variables
27
- * @property {bool} [excludeGlobal] - exclude global & dynamic variables
28
- * @property {bool} [excludePrivate] - exclude private variables
29
- * @property {bool} [excludePublic] - exclude public variables
30
- * @property {bool} [log] - log result to console
31
- * @property {function} [logger] - logger function
32
- * @property {string} [outputPath] - if populated, writes consolidated .env file to this path (follows {@link https://github.com/motdotla/dotenv-expand/blob/master/tests/.env dotenv-expand rules})
33
- * @property {string} [paths] - space-delimited list of input directory paths
34
- * @property {string} [privateToken] - token indicating private variables.
35
- * @property {string} [shell] - execa shell option
36
- * @property {bool} [suppressDotenv] - suppress dotenv loading
37
- */
38
-
39
- /**
40
- * GetDotenv CLI Pre-hook Callback type. Transforms inbound options & executes side effects.
41
- *
42
- * @async
43
- * @callback GetDotenvPreHookCallback
44
- * @param {GetDotenvCliOptions} options - inbound GetDotenv CLI Options object
45
- * @returns {GetDotenvCliOptions} transformed GetDotenv CLI Options object (undefined return value is ignored)
46
- */
47
-
48
- /**
49
- * GetDotenv CLI Post-hook Callback type. Executes side effects within getdotenv context.
50
- *
51
- * @async
52
- * @callback GetDotenvPostHookCallback
53
- * @param {GetDotenvCliOptions} options - GetDotenv CLI Options object
54
- * @param {object} dotenv - dotenv object
55
- */
56
-
57
- /**
58
- * GetDotenv CLI Config type
59
- *
60
- * @typedef {Object} GetDotenvCliConfig
61
- * @property {object} [config] - config options
62
- * @property {GetDotenvCliOptions} [config.defaultOptions] - default options
63
- * @property {GetDotenvPreHookCallback} [config.preHook] - transforms inbound options & executes side effects
64
- * @property {GetDotenvPostHookCallback} [config.postHook] - executes side effects within getdotenv context
65
- */
66
-
67
- /**
68
- * Generate a CLI for get-dotenv.
69
- *
70
- * @param {GetDotenvCliConfig} [config] - config object
71
- * @returns {object} The CLI command.
72
- */
73
- export const getCli = ({ defaultOptions = {}, preHook, postHook } = {}) => {
74
- let {
75
- cliInvocation = 'getdotenv',
76
- command,
77
- defaultEnv = 'dev',
78
- dotenvToken,
79
- dynamicPath,
80
- env,
81
- excludeDynamic,
82
- excludeEnv,
83
- excludeGlobal,
84
- excludePrivate,
85
- excludePublic,
86
- log,
87
- outputPath,
88
- paths,
89
- pathsDelimiter = '\\s+',
90
- privateToken,
91
- shell,
92
- suppressDotenv,
93
- vars,
94
- varsAssignor = '=',
95
- varsDelimiter = '\\s+',
96
- } = {
97
- ...dotenvDefaults,
98
- ...defaultOptions,
99
- };
100
-
101
- if (Array.isArray(paths)) paths = paths.join(' ');
102
-
103
- return new Command()
104
- .name(cliInvocation)
105
- .description(
106
- 'Base CLI. All options except delimiters follow dotenv-expand rules.'
107
- )
108
- .enablePositionalOptions()
109
- .passThroughOptions()
110
- .option('-e, --env <string>', 'target environment', dotenvExpand, env)
111
- .option(
112
- '--default-env <string>',
113
- 'default target environment',
114
- dotenvExpand,
115
- defaultEnv
116
- )
117
- .option(
118
- '-p, --paths <string>',
119
- 'delimited list of paths to dotenv directory',
120
- dotenvExpand,
121
- paths
122
- )
123
- .option(
124
- '--paths-delimiter <string>',
125
- 'regex paths delimiter',
126
- pathsDelimiter
127
- )
128
- .option(
129
- '-v, --vars <string>',
130
- 'delimited list KEY=VALUE pairs',
131
- dotenvExpand,
132
- vars
133
- )
134
- .option('--vars-delimiter <string>', 'regex vars delimiter', varsDelimiter)
135
- .option(
136
- '--vars-assignor <string>',
137
- 'regex vars assignment operator',
138
- varsAssignor
139
- )
140
- .option(
141
- '-y, --dynamic-path <string>',
142
- 'dynamic variables path',
143
- dotenvExpand,
144
- dynamicPath
145
- )
146
- .option(
147
- '-o, --output-path <string>',
148
- 'consolidated output file, follows dotenv-expand rules using loaded env vars',
149
- dotenvExpand,
150
- outputPath
151
- )
152
- .addOption(
153
- new Option(
154
- '-n, --exclude-env',
155
- `exclude environment-specific variables${
156
- excludeEnv ? ' (default)' : ''
157
- }`
158
- ).conflicts('excludeEnvOff')
159
- )
160
- .addOption(
161
- new Option(
162
- '-N, --exclude-env-off',
163
- `exclude environment-specific variables OFF${
164
- !excludeEnv ? ' (default)' : ''
165
- }`
166
- ).conflicts('excludeEnv')
167
- )
168
- .addOption(
169
- new Option(
170
- '-g, --exclude-global',
171
- `exclude global variables${excludeGlobal ? ' (default)' : ''}`
172
- ).conflicts('excludeGlobalOff')
173
- )
174
- .addOption(
175
- new Option(
176
- '-G, --exclude-global-off',
177
- `exclude global variables OFF${!excludeGlobal ? ' (default)' : ''}`
178
- ).conflicts('excludeGlobal')
179
- )
180
- .addOption(
181
- new Option(
182
- '-r, --exclude-private',
183
- `exclude private variables${excludePrivate ? ' (default)' : ''}`
184
- ).conflicts('excludePrivateOff')
185
- )
186
- .addOption(
187
- new Option(
188
- '-R, --exclude-private-off',
189
- `exclude private variables OFF${!excludePrivate ? ' (default)' : ''}`
190
- ).conflicts('excludePrivate')
191
- )
192
- .addOption(
193
- new Option(
194
- '-u, --exclude-public',
195
- `exclude public variables${excludePublic ? ' (default)' : ''}`
196
- ).conflicts('excludePublicOff')
197
- )
198
- .addOption(
199
- new Option(
200
- '-U, --exclude-public-off',
201
- `exclude public variables OFF${!excludePublic ? ' (default)' : ''}`
202
- ).conflicts('excludePublic')
203
- )
204
- .addOption(
205
- new Option(
206
- '-z, --exclude-dynamic',
207
- `exclude dynamic variables${excludeDynamic ? ' (default)' : ''}`
208
- ).conflicts('excludeDynamicOff')
209
- )
210
- .addOption(
211
- new Option(
212
- '-Z, --exclude-dynamic-off',
213
- `exclude dynamic variables OFF${!excludeDynamic ? ' (default)' : ''}`
214
- ).conflicts('excludeDynamic')
215
- )
216
- .addOption(
217
- new Option(
218
- '-l, --log',
219
- `console log extracted variables${log ? ' (default)' : ''}`
220
- ).conflicts('logOff')
221
- )
222
- .addOption(
223
- new Option(
224
- '-L, --log-off',
225
- `console log extracted variables OFF${!log ? ' (default)' : ''}`
226
- ).conflicts('log')
227
- )
228
- .option(
229
- '-x, --suppress-dotenv',
230
- 'suppress dotenv loading',
231
- booleanExpand,
232
- suppressDotenv ?? false
233
- )
234
- .option(
235
- '-c, --command <string>',
236
- 'shell command string',
237
- dotenvExpand,
238
- command
239
- )
240
- .option('-s, --shell <string>', 'execa shell option', dotenvExpand, shell)
241
- .option(
242
- '--dotenv-token <string>',
243
- 'token indicating a dotenv file',
244
- dotenvExpand,
245
- dotenvToken
246
- )
247
- .option(
248
- '--private-token <string>',
249
- 'token indicating private variables',
250
- dotenvExpand,
251
- privateToken
252
- )
253
- .option('-D, --debug', 'debug mode')
254
- .addCommand(
255
- new Command()
256
- .name('cmd')
257
- .description('execute shell command string (default command)')
258
- .configureHelp({ showGlobalOptions: true })
259
- .enablePositionalOptions()
260
- .passThroughOptions()
261
- .action(async (options, { args, parent }) => {
262
- if (args.length)
263
- await execaCommand(args.join(' '), {
264
- stdio: 'inherit',
265
- shell: parent.opts().shell,
266
- });
267
- }),
268
- { isDefault: true }
269
- )
270
- .hook('preSubcommand', async (thisCommand) => {
271
- // Inherit options from parent command.
272
- const getdotenvOptions = process.env['getdotenvOptions']
273
- ? JSON.parse(process.env['getdotenvOptions'])
274
- : {};
275
-
276
- const {
277
- excludeDynamicOff,
278
- excludeEnvOff,
279
- excludeGlobalOff,
280
- excludePrivateOff,
281
- excludePublicOff,
282
- logOff,
283
- ...localOptions
284
- } = thisCommand.opts();
285
-
286
- if (excludeDynamicOff) localOptions.excludeDynamic = false;
287
- if (excludeEnvOff) localOptions.excludeEnv = false;
288
- if (excludeGlobalOff) localOptions.excludeGlobal = false;
289
- if (excludePrivateOff) localOptions.excludePrivate = false;
290
- if (excludePublicOff) localOptions.excludePublic = false;
291
- if (logOff) localOptions.log = false;
292
-
293
- let mergedOptions = {
294
- ...getdotenvOptions,
295
- ...localOptions,
296
- };
297
-
298
- // Execute pre-hook.
299
- const options = preHook
300
- ? (await preHook(mergedOptions)) ?? mergedOptions
301
- : mergedOptions;
302
-
303
- // Get options.
304
- let {
305
- command,
306
- debug,
307
- defaultEnv,
308
- env,
309
- paths,
310
- pathsDelimiter,
311
- suppressDotenv,
312
- vars: varsStr,
313
- varsDelimiter,
314
- varsAssignor,
315
- ...rest
316
- } = options;
317
-
318
- // Parse vars.
319
- const vars = varsStr?.length
320
- ? fromPairs(
321
- varsStr
322
- .split(new RegExp(varsDelimiter))
323
- .map((v) => v.split(new RegExp(varsAssignor)))
324
- )
325
- : undefined;
326
-
327
- if (debug) {
328
- console.log('*** getdotenvOptions ***', getdotenvOptions);
329
- console.log('*** localOptions ***', localOptions);
330
- console.log('*** mergedOptions ***', mergedOptions);
331
- console.log('*** options ***', options);
332
- console.log('*** vars ***', vars);
333
- }
334
-
335
- // Execute getdotenv.
336
- if (paths?.length && !suppressDotenv) {
337
- if (isString(paths)) paths = paths?.split(new RegExp(pathsDelimiter));
338
-
339
- var dotenv = await getDotenv({
340
- ...rest,
341
- env: env ?? defaultEnv,
342
- loadProcess: true,
343
- paths,
344
- vars,
345
- });
346
- }
347
-
348
- if (debug) console.log('*** dotenv ***', dotenv);
349
-
350
- // Execute post-hook.
351
- if (postHook) await postHook(options, dotenv);
352
-
353
- // Execute shell command.
354
- if (command)
355
- await execaCommand(command, {
356
- stdio: 'inherit',
357
- shell,
358
- });
359
- });
360
- };