@twin.org/cli-core 0.0.2-next.9 → 0.0.2
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/README.md +2 -2
- package/dist/es/cliBase.js +122 -0
- package/dist/es/cliBase.js.map +1 -0
- package/dist/es/cliDisplay.js +166 -0
- package/dist/es/cliDisplay.js.map +1 -0
- package/dist/es/cliOptions.js +36 -0
- package/dist/es/cliOptions.js.map +1 -0
- package/dist/es/cliParam.js +248 -0
- package/dist/es/cliParam.js.map +1 -0
- package/dist/es/cliUtils.js +235 -0
- package/dist/es/cliUtils.js.map +1 -0
- package/dist/es/commands/global.js +61 -0
- package/dist/es/commands/global.js.map +1 -0
- package/dist/es/index.js +14 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/ICliOptions.js +2 -0
- package/dist/es/models/ICliOptions.js.map +1 -0
- package/dist/es/models/ICliOutputOptionsConsole.js +2 -0
- package/dist/es/models/ICliOutputOptionsConsole.js.map +1 -0
- package/dist/es/models/ICliOutputOptionsEnv.js +2 -0
- package/dist/es/models/ICliOutputOptionsEnv.js.map +1 -0
- package/dist/es/models/ICliOutputOptionsJson.js +2 -0
- package/dist/es/models/ICliOutputOptionsJson.js.map +1 -0
- package/dist/es/models/cliOutputOptions.js +2 -0
- package/dist/es/models/cliOutputOptions.js.map +1 -0
- package/dist/types/cliBase.d.ts +1 -1
- package/dist/types/cliDisplay.d.ts +5 -0
- package/dist/types/cliParam.d.ts +10 -9
- package/dist/types/index.d.ts +11 -11
- package/dist/types/models/cliOutputOptions.d.ts +3 -3
- package/docs/changelog.md +1179 -72
- package/docs/examples.md +82 -1
- package/docs/reference/classes/CLIBase.md +3 -3
- package/docs/reference/classes/CLIDisplay.md +46 -26
- package/docs/reference/classes/CLIOptions.md +1 -1
- package/docs/reference/classes/CLIParam.md +97 -85
- package/docs/reference/classes/CLIUtils.md +25 -25
- package/docs/reference/interfaces/ICliOptions.md +12 -12
- package/docs/reference/interfaces/ICliOutputOptionsConsole.md +1 -1
- package/docs/reference/interfaces/ICliOutputOptionsEnv.md +3 -3
- package/docs/reference/interfaces/ICliOutputOptionsJson.md +3 -3
- package/locales/.validate-ignore +1 -0
- package/locales/en.json +0 -1
- package/package.json +28 -16
- package/dist/cjs/index.cjs +0 -878
- package/dist/esm/index.mjs +0 -849
|
@@ -14,9 +14,9 @@ Parameter utilities for the CLI.
|
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
### env()
|
|
17
|
+
### env() {#env}
|
|
18
18
|
|
|
19
|
-
> `static` **env**(`optionName`, `optionValue`, `allowEnvVar`): `
|
|
19
|
+
> `static` **env**(`optionName`, `optionValue`, `allowEnvVar`): `string` \| `undefined`
|
|
20
20
|
|
|
21
21
|
Check the option to see if it exists.
|
|
22
22
|
|
|
@@ -30,9 +30,9 @@ The name of the option.
|
|
|
30
30
|
|
|
31
31
|
##### optionValue
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
`string` \| `undefined`
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
The option value.
|
|
36
36
|
|
|
37
37
|
##### allowEnvVar
|
|
38
38
|
|
|
@@ -42,7 +42,7 @@ Allow the option to be read from an env var.
|
|
|
42
42
|
|
|
43
43
|
#### Returns
|
|
44
44
|
|
|
45
|
-
`
|
|
45
|
+
`string` \| `undefined`
|
|
46
46
|
|
|
47
47
|
The final option value.
|
|
48
48
|
|
|
@@ -52,9 +52,9 @@ An error if the option is invalid.
|
|
|
52
52
|
|
|
53
53
|
***
|
|
54
54
|
|
|
55
|
-
### stringValue()
|
|
55
|
+
### stringValue() {#stringvalue}
|
|
56
56
|
|
|
57
|
-
> `static` **stringValue**(`optionName`, `optionValue`, `allowEnvVar
|
|
57
|
+
> `static` **stringValue**(`optionName`, `optionValue`, `allowEnvVar?`): `string`
|
|
58
58
|
|
|
59
59
|
Check the option to see if the String exists.
|
|
60
60
|
|
|
@@ -68,11 +68,11 @@ The name of the option.
|
|
|
68
68
|
|
|
69
69
|
##### optionValue
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
`string` \| `undefined`
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
The option value.
|
|
74
74
|
|
|
75
|
-
##### allowEnvVar
|
|
75
|
+
##### allowEnvVar?
|
|
76
76
|
|
|
77
77
|
`boolean` = `true`
|
|
78
78
|
|
|
@@ -90,11 +90,17 @@ An error if the option is invalid.
|
|
|
90
90
|
|
|
91
91
|
***
|
|
92
92
|
|
|
93
|
-
###
|
|
93
|
+
### arrayOneOf() {#arrayoneof}
|
|
94
94
|
|
|
95
|
-
> `static` **
|
|
95
|
+
> `static` **arrayOneOf**\<`T`\>(`optionName`, `optionValue`, `validValues`, `allowEnvVar?`): `T`
|
|
96
96
|
|
|
97
|
-
Check the option to see if
|
|
97
|
+
Check the option to see if the value exists in the specific array.
|
|
98
|
+
|
|
99
|
+
#### Type Parameters
|
|
100
|
+
|
|
101
|
+
##### T
|
|
102
|
+
|
|
103
|
+
`T` = `string`
|
|
98
104
|
|
|
99
105
|
#### Parameters
|
|
100
106
|
|
|
@@ -106,11 +112,17 @@ The name of the option.
|
|
|
106
112
|
|
|
107
113
|
##### optionValue
|
|
108
114
|
|
|
115
|
+
`string` \| `undefined`
|
|
116
|
+
|
|
109
117
|
The option value.
|
|
110
118
|
|
|
111
|
-
|
|
119
|
+
##### validValues
|
|
112
120
|
|
|
113
|
-
|
|
121
|
+
`T`[]
|
|
122
|
+
|
|
123
|
+
The valid values.
|
|
124
|
+
|
|
125
|
+
##### allowEnvVar?
|
|
114
126
|
|
|
115
127
|
`boolean` = `true`
|
|
116
128
|
|
|
@@ -118,7 +130,7 @@ Allow the option to be read from an env var.
|
|
|
118
130
|
|
|
119
131
|
#### Returns
|
|
120
132
|
|
|
121
|
-
`
|
|
133
|
+
`T`
|
|
122
134
|
|
|
123
135
|
The final option value.
|
|
124
136
|
|
|
@@ -128,11 +140,11 @@ An error if the option is invalid.
|
|
|
128
140
|
|
|
129
141
|
***
|
|
130
142
|
|
|
131
|
-
###
|
|
143
|
+
### url() {#url}
|
|
132
144
|
|
|
133
|
-
> `static` **
|
|
145
|
+
> `static` **url**(`optionName`, `optionValue`, `allowEnvVar?`): `string`
|
|
134
146
|
|
|
135
|
-
Check the option to see if it
|
|
147
|
+
Check the option to see if it is a url.
|
|
136
148
|
|
|
137
149
|
#### Parameters
|
|
138
150
|
|
|
@@ -144,31 +156,19 @@ The name of the option.
|
|
|
144
156
|
|
|
145
157
|
##### optionValue
|
|
146
158
|
|
|
159
|
+
`string` \| `undefined`
|
|
160
|
+
|
|
147
161
|
The option value.
|
|
148
162
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
##### allowEnvVar
|
|
163
|
+
##### allowEnvVar?
|
|
152
164
|
|
|
153
165
|
`boolean` = `true`
|
|
154
166
|
|
|
155
167
|
Allow the option to be read from an env var.
|
|
156
168
|
|
|
157
|
-
##### minValue
|
|
158
|
-
|
|
159
|
-
`number` = `0`
|
|
160
|
-
|
|
161
|
-
The minimum value.
|
|
162
|
-
|
|
163
|
-
##### maxValue?
|
|
164
|
-
|
|
165
|
-
`number`
|
|
166
|
-
|
|
167
|
-
The maximum value.
|
|
168
|
-
|
|
169
169
|
#### Returns
|
|
170
170
|
|
|
171
|
-
`
|
|
171
|
+
`string`
|
|
172
172
|
|
|
173
173
|
The final option value.
|
|
174
174
|
|
|
@@ -178,11 +178,11 @@ An error if the option is invalid.
|
|
|
178
178
|
|
|
179
179
|
***
|
|
180
180
|
|
|
181
|
-
###
|
|
181
|
+
### number() {#number}
|
|
182
182
|
|
|
183
|
-
> `static` **
|
|
183
|
+
> `static` **number**(`optionName`, `optionValue`, `allowEnvVar?`, `minValue?`, `maxValue?`): `number`
|
|
184
184
|
|
|
185
|
-
Check the option to see if it exists and is
|
|
185
|
+
Check the option to see if it exists and is a number.
|
|
186
186
|
|
|
187
187
|
#### Parameters
|
|
188
188
|
|
|
@@ -194,17 +194,17 @@ The name of the option.
|
|
|
194
194
|
|
|
195
195
|
##### optionValue
|
|
196
196
|
|
|
197
|
-
|
|
197
|
+
`string` \| `undefined`
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
The option value.
|
|
200
200
|
|
|
201
|
-
##### allowEnvVar
|
|
201
|
+
##### allowEnvVar?
|
|
202
202
|
|
|
203
203
|
`boolean` = `true`
|
|
204
204
|
|
|
205
205
|
Allow the option to be read from an env var.
|
|
206
206
|
|
|
207
|
-
##### minValue
|
|
207
|
+
##### minValue?
|
|
208
208
|
|
|
209
209
|
`number` = `0`
|
|
210
210
|
|
|
@@ -228,11 +228,11 @@ An error if the option is invalid.
|
|
|
228
228
|
|
|
229
229
|
***
|
|
230
230
|
|
|
231
|
-
###
|
|
231
|
+
### integer() {#integer}
|
|
232
232
|
|
|
233
|
-
> `static` **
|
|
233
|
+
> `static` **integer**(`optionName`, `optionValue`, `allowEnvVar?`, `minValue?`, `maxValue?`): `number`
|
|
234
234
|
|
|
235
|
-
Check the option to see if it exists and is
|
|
235
|
+
Check the option to see if it exists and is an integer.
|
|
236
236
|
|
|
237
237
|
#### Parameters
|
|
238
238
|
|
|
@@ -244,31 +244,31 @@ The name of the option.
|
|
|
244
244
|
|
|
245
245
|
##### optionValue
|
|
246
246
|
|
|
247
|
-
|
|
247
|
+
`string` \| `undefined`
|
|
248
248
|
|
|
249
|
-
|
|
249
|
+
The option value.
|
|
250
250
|
|
|
251
|
-
##### allowEnvVar
|
|
251
|
+
##### allowEnvVar?
|
|
252
252
|
|
|
253
253
|
`boolean` = `true`
|
|
254
254
|
|
|
255
255
|
Allow the option to be read from an env var.
|
|
256
256
|
|
|
257
|
-
##### minValue
|
|
257
|
+
##### minValue?
|
|
258
258
|
|
|
259
|
-
`
|
|
259
|
+
`number` = `0`
|
|
260
260
|
|
|
261
261
|
The minimum value.
|
|
262
262
|
|
|
263
263
|
##### maxValue?
|
|
264
264
|
|
|
265
|
-
`
|
|
265
|
+
`number`
|
|
266
266
|
|
|
267
267
|
The maximum value.
|
|
268
268
|
|
|
269
269
|
#### Returns
|
|
270
270
|
|
|
271
|
-
`
|
|
271
|
+
`number`
|
|
272
272
|
|
|
273
273
|
The final option value.
|
|
274
274
|
|
|
@@ -278,11 +278,11 @@ An error if the option is invalid.
|
|
|
278
278
|
|
|
279
279
|
***
|
|
280
280
|
|
|
281
|
-
###
|
|
281
|
+
### bigint() {#bigint}
|
|
282
282
|
|
|
283
|
-
> `static` **
|
|
283
|
+
> `static` **bigint**(`optionName`, `optionValue`, `allowEnvVar?`, `minValue?`, `maxValue?`): `bigint`
|
|
284
284
|
|
|
285
|
-
Check the option to see if it exists and is a
|
|
285
|
+
Check the option to see if it exists and is a big number.
|
|
286
286
|
|
|
287
287
|
#### Parameters
|
|
288
288
|
|
|
@@ -294,19 +294,31 @@ The name of the option.
|
|
|
294
294
|
|
|
295
295
|
##### optionValue
|
|
296
296
|
|
|
297
|
-
|
|
297
|
+
`string` \| `undefined`
|
|
298
298
|
|
|
299
|
-
|
|
299
|
+
The option value.
|
|
300
300
|
|
|
301
|
-
##### allowEnvVar
|
|
301
|
+
##### allowEnvVar?
|
|
302
302
|
|
|
303
303
|
`boolean` = `true`
|
|
304
304
|
|
|
305
305
|
Allow the option to be read from an env var.
|
|
306
306
|
|
|
307
|
+
##### minValue?
|
|
308
|
+
|
|
309
|
+
`bigint` = `0n`
|
|
310
|
+
|
|
311
|
+
The minimum value.
|
|
312
|
+
|
|
313
|
+
##### maxValue?
|
|
314
|
+
|
|
315
|
+
`bigint`
|
|
316
|
+
|
|
317
|
+
The maximum value.
|
|
318
|
+
|
|
307
319
|
#### Returns
|
|
308
320
|
|
|
309
|
-
`
|
|
321
|
+
`bigint`
|
|
310
322
|
|
|
311
323
|
The final option value.
|
|
312
324
|
|
|
@@ -316,11 +328,11 @@ An error if the option is invalid.
|
|
|
316
328
|
|
|
317
329
|
***
|
|
318
330
|
|
|
319
|
-
###
|
|
331
|
+
### boolean() {#boolean}
|
|
320
332
|
|
|
321
|
-
> `static` **
|
|
333
|
+
> `static` **boolean**(`optionName`, `optionValue`, `allowEnvVar?`): `boolean`
|
|
322
334
|
|
|
323
|
-
Check the option to see if it exists and is
|
|
335
|
+
Check the option to see if it exists and is a boolean.
|
|
324
336
|
|
|
325
337
|
#### Parameters
|
|
326
338
|
|
|
@@ -332,11 +344,11 @@ The name of the option.
|
|
|
332
344
|
|
|
333
345
|
##### optionValue
|
|
334
346
|
|
|
335
|
-
|
|
347
|
+
`string` \| `undefined`
|
|
336
348
|
|
|
337
|
-
|
|
349
|
+
The option value.
|
|
338
350
|
|
|
339
|
-
##### allowEnvVar
|
|
351
|
+
##### allowEnvVar?
|
|
340
352
|
|
|
341
353
|
`boolean` = `true`
|
|
342
354
|
|
|
@@ -344,7 +356,7 @@ Allow the option to be read from an env var.
|
|
|
344
356
|
|
|
345
357
|
#### Returns
|
|
346
358
|
|
|
347
|
-
`
|
|
359
|
+
`boolean`
|
|
348
360
|
|
|
349
361
|
The final option value.
|
|
350
362
|
|
|
@@ -354,11 +366,11 @@ An error if the option is invalid.
|
|
|
354
366
|
|
|
355
367
|
***
|
|
356
368
|
|
|
357
|
-
###
|
|
369
|
+
### hex() {#hex}
|
|
358
370
|
|
|
359
|
-
> `static` **
|
|
371
|
+
> `static` **hex**(`optionName`, `optionValue`, `allowEnvVar?`): `Uint8Array`
|
|
360
372
|
|
|
361
|
-
Check the option to see if it exists and is
|
|
373
|
+
Check the option to see if it exists and is hex.
|
|
362
374
|
|
|
363
375
|
#### Parameters
|
|
364
376
|
|
|
@@ -370,11 +382,11 @@ The name of the option.
|
|
|
370
382
|
|
|
371
383
|
##### optionValue
|
|
372
384
|
|
|
373
|
-
|
|
385
|
+
`string` \| `undefined`
|
|
374
386
|
|
|
375
|
-
|
|
387
|
+
The option value.
|
|
376
388
|
|
|
377
|
-
##### allowEnvVar
|
|
389
|
+
##### allowEnvVar?
|
|
378
390
|
|
|
379
391
|
`boolean` = `true`
|
|
380
392
|
|
|
@@ -392,11 +404,11 @@ An error if the option is invalid.
|
|
|
392
404
|
|
|
393
405
|
***
|
|
394
406
|
|
|
395
|
-
###
|
|
407
|
+
### base64() {#base64}
|
|
396
408
|
|
|
397
|
-
> `static` **
|
|
409
|
+
> `static` **base64**(`optionName`, `optionValue`, `allowEnvVar?`): `Uint8Array`
|
|
398
410
|
|
|
399
|
-
Check the option to see if it exists and is
|
|
411
|
+
Check the option to see if it exists and is base64.
|
|
400
412
|
|
|
401
413
|
#### Parameters
|
|
402
414
|
|
|
@@ -408,11 +420,11 @@ The name of the option.
|
|
|
408
420
|
|
|
409
421
|
##### optionValue
|
|
410
422
|
|
|
411
|
-
|
|
423
|
+
`string` \| `undefined`
|
|
412
424
|
|
|
413
|
-
|
|
425
|
+
The option value.
|
|
414
426
|
|
|
415
|
-
##### allowEnvVar
|
|
427
|
+
##### allowEnvVar?
|
|
416
428
|
|
|
417
429
|
`boolean` = `true`
|
|
418
430
|
|
|
@@ -430,11 +442,11 @@ An error if the option is invalid.
|
|
|
430
442
|
|
|
431
443
|
***
|
|
432
444
|
|
|
433
|
-
###
|
|
445
|
+
### hexBase64() {#hexbase64}
|
|
434
446
|
|
|
435
|
-
> `static` **
|
|
447
|
+
> `static` **hexBase64**(`optionName`, `optionValue`, `allowEnvVar?`): `Uint8Array`
|
|
436
448
|
|
|
437
|
-
Check the option to see if it exists and is
|
|
449
|
+
Check the option to see if it exists and is hex or base64.
|
|
438
450
|
|
|
439
451
|
#### Parameters
|
|
440
452
|
|
|
@@ -446,11 +458,11 @@ The name of the option.
|
|
|
446
458
|
|
|
447
459
|
##### optionValue
|
|
448
460
|
|
|
449
|
-
|
|
461
|
+
`string` \| `undefined`
|
|
450
462
|
|
|
451
|
-
|
|
463
|
+
The option value.
|
|
452
464
|
|
|
453
|
-
##### allowEnvVar
|
|
465
|
+
##### allowEnvVar?
|
|
454
466
|
|
|
455
467
|
`boolean` = `true`
|
|
456
468
|
|
|
@@ -458,7 +470,7 @@ Allow the option to be read from an env var.
|
|
|
458
470
|
|
|
459
471
|
#### Returns
|
|
460
472
|
|
|
461
|
-
`
|
|
473
|
+
`Uint8Array`
|
|
462
474
|
|
|
463
475
|
The final option value.
|
|
464
476
|
|
|
@@ -14,7 +14,7 @@ Utilities function for helping in the CLI.
|
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
### fileExists()
|
|
17
|
+
### fileExists() {#fileexists}
|
|
18
18
|
|
|
19
19
|
> `static` **fileExists**(`filename`): `Promise`\<`boolean`\>
|
|
20
20
|
|
|
@@ -36,7 +36,7 @@ True if the file exists.
|
|
|
36
36
|
|
|
37
37
|
***
|
|
38
38
|
|
|
39
|
-
### fileExistsSync()
|
|
39
|
+
### fileExistsSync() {#fileexistssync}
|
|
40
40
|
|
|
41
41
|
> `static` **fileExistsSync**(`filename`): `boolean`
|
|
42
42
|
|
|
@@ -58,7 +58,7 @@ True if the file exists.
|
|
|
58
58
|
|
|
59
59
|
***
|
|
60
60
|
|
|
61
|
-
### dirExists()
|
|
61
|
+
### dirExists() {#direxists}
|
|
62
62
|
|
|
63
63
|
> `static` **dirExists**(`dir`): `Promise`\<`boolean`\>
|
|
64
64
|
|
|
@@ -80,7 +80,7 @@ True if the dir exists.
|
|
|
80
80
|
|
|
81
81
|
***
|
|
82
82
|
|
|
83
|
-
### dirExistsSync()
|
|
83
|
+
### dirExistsSync() {#direxistssync}
|
|
84
84
|
|
|
85
85
|
> `static` **dirExistsSync**(`dir`): `boolean`
|
|
86
86
|
|
|
@@ -102,9 +102,9 @@ True if the dir exists.
|
|
|
102
102
|
|
|
103
103
|
***
|
|
104
104
|
|
|
105
|
-
### readJsonFile()
|
|
105
|
+
### readJsonFile() {#readjsonfile}
|
|
106
106
|
|
|
107
|
-
> `static` **readJsonFile**\<`T`\>(`filename`): `Promise`\<`
|
|
107
|
+
> `static` **readJsonFile**\<`T`\>(`filename`): `Promise`\<`T` \| `undefined`\>
|
|
108
108
|
|
|
109
109
|
Read a JSON file and parse it.
|
|
110
110
|
|
|
@@ -124,15 +124,15 @@ The filename to read.
|
|
|
124
124
|
|
|
125
125
|
#### Returns
|
|
126
126
|
|
|
127
|
-
`Promise`\<`
|
|
127
|
+
`Promise`\<`T` \| `undefined`\>
|
|
128
128
|
|
|
129
129
|
The parsed JSON.
|
|
130
130
|
|
|
131
131
|
***
|
|
132
132
|
|
|
133
|
-
### readJsonFileSync()
|
|
133
|
+
### readJsonFileSync() {#readjsonfilesync}
|
|
134
134
|
|
|
135
|
-
> `static` **readJsonFileSync**\<`T`\>(`filename`): `
|
|
135
|
+
> `static` **readJsonFileSync**\<`T`\>(`filename`): `T` \| `undefined`
|
|
136
136
|
|
|
137
137
|
Read a JSON file and parse it, synchronously.
|
|
138
138
|
|
|
@@ -152,15 +152,15 @@ The filename to read.
|
|
|
152
152
|
|
|
153
153
|
#### Returns
|
|
154
154
|
|
|
155
|
-
`
|
|
155
|
+
`T` \| `undefined`
|
|
156
156
|
|
|
157
157
|
The parsed JSON.
|
|
158
158
|
|
|
159
159
|
***
|
|
160
160
|
|
|
161
|
-
### readLinesFile()
|
|
161
|
+
### readLinesFile() {#readlinesfile}
|
|
162
162
|
|
|
163
|
-
> `static` **readLinesFile**(`filename`): `Promise`\<`
|
|
163
|
+
> `static` **readLinesFile**(`filename`): `Promise`\<`string`[] \| `undefined`\>
|
|
164
164
|
|
|
165
165
|
Read a file as lines.
|
|
166
166
|
|
|
@@ -174,15 +174,15 @@ The filename to read.
|
|
|
174
174
|
|
|
175
175
|
#### Returns
|
|
176
176
|
|
|
177
|
-
`Promise`\<`
|
|
177
|
+
`Promise`\<`string`[] \| `undefined`\>
|
|
178
178
|
|
|
179
179
|
The lines.
|
|
180
180
|
|
|
181
181
|
***
|
|
182
182
|
|
|
183
|
-
### readLinesFileSync()
|
|
183
|
+
### readLinesFileSync() {#readlinesfilesync}
|
|
184
184
|
|
|
185
|
-
> `static` **readLinesFileSync**(`filename`): `
|
|
185
|
+
> `static` **readLinesFileSync**(`filename`): `string`[] \| `undefined`
|
|
186
186
|
|
|
187
187
|
Read a file as lines, synchronously.
|
|
188
188
|
|
|
@@ -196,13 +196,13 @@ The filename to read.
|
|
|
196
196
|
|
|
197
197
|
#### Returns
|
|
198
198
|
|
|
199
|
-
`
|
|
199
|
+
`string`[] \| `undefined`
|
|
200
200
|
|
|
201
201
|
The lines.
|
|
202
202
|
|
|
203
203
|
***
|
|
204
204
|
|
|
205
|
-
### findNpmRoot()
|
|
205
|
+
### findNpmRoot() {#findnpmroot}
|
|
206
206
|
|
|
207
207
|
> `static` **findNpmRoot**(`rootFolder`): `Promise`\<`string`\>
|
|
208
208
|
|
|
@@ -224,7 +224,7 @@ The root path.
|
|
|
224
224
|
|
|
225
225
|
***
|
|
226
226
|
|
|
227
|
-
### runShellCmd()
|
|
227
|
+
### runShellCmd() {#runshellcmd}
|
|
228
228
|
|
|
229
229
|
> `static` **runShellCmd**(`command`, `args`, `cwd`): `Promise`\<`void`\>
|
|
230
230
|
|
|
@@ -258,7 +258,7 @@ Promise to wait for command execution to complete.
|
|
|
258
258
|
|
|
259
259
|
***
|
|
260
260
|
|
|
261
|
-
### runShellApp()
|
|
261
|
+
### runShellApp() {#runshellapp}
|
|
262
262
|
|
|
263
263
|
> `static` **runShellApp**(`app`, `args`, `cwd`): `Promise`\<`void`\>
|
|
264
264
|
|
|
@@ -292,7 +292,7 @@ Promise to wait for command execution to complete.
|
|
|
292
292
|
|
|
293
293
|
***
|
|
294
294
|
|
|
295
|
-
### writeJsonFile()
|
|
295
|
+
### writeJsonFile() {#writejsonfile}
|
|
296
296
|
|
|
297
297
|
> `static` **writeJsonFile**\<`T`\>(`jsonFilename`, `data`, `append`): `Promise`\<`void`\>
|
|
298
298
|
|
|
@@ -308,9 +308,9 @@ Write a JSON file.
|
|
|
308
308
|
|
|
309
309
|
##### jsonFilename
|
|
310
310
|
|
|
311
|
-
|
|
311
|
+
`string` \| `undefined`
|
|
312
312
|
|
|
313
|
-
|
|
313
|
+
The filename to write.
|
|
314
314
|
|
|
315
315
|
##### data
|
|
316
316
|
|
|
@@ -330,7 +330,7 @@ Append to the file.
|
|
|
330
330
|
|
|
331
331
|
***
|
|
332
332
|
|
|
333
|
-
### writeEnvFile()
|
|
333
|
+
### writeEnvFile() {#writeenvfile}
|
|
334
334
|
|
|
335
335
|
> `static` **writeEnvFile**(`envFilename`, `data`, `append`): `Promise`\<`void`\>
|
|
336
336
|
|
|
@@ -340,9 +340,9 @@ Write an env file.
|
|
|
340
340
|
|
|
341
341
|
##### envFilename
|
|
342
342
|
|
|
343
|
-
|
|
343
|
+
`string` \| `undefined`
|
|
344
344
|
|
|
345
|
-
|
|
345
|
+
The filename to write.
|
|
346
346
|
|
|
347
347
|
##### data
|
|
348
348
|
|
|
@@ -4,7 +4,7 @@ Options for the CLI.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### title
|
|
7
|
+
### title {#title}
|
|
8
8
|
|
|
9
9
|
> **title**: `string`
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ The title of the CLI.
|
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### appName
|
|
15
|
+
### appName {#appname}
|
|
16
16
|
|
|
17
17
|
> **appName**: `string`
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ The name of the app used to execute it.
|
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
23
|
-
### version
|
|
23
|
+
### version {#version}
|
|
24
24
|
|
|
25
25
|
> **version**: `string`
|
|
26
26
|
|
|
@@ -28,7 +28,7 @@ The version of the app.
|
|
|
28
28
|
|
|
29
29
|
***
|
|
30
30
|
|
|
31
|
-
### icon
|
|
31
|
+
### icon {#icon}
|
|
32
32
|
|
|
33
33
|
> **icon**: `string`
|
|
34
34
|
|
|
@@ -36,32 +36,32 @@ The icon for the CLI as an emoji character.
|
|
|
36
36
|
|
|
37
37
|
***
|
|
38
38
|
|
|
39
|
-
### supportsLang?
|
|
39
|
+
### supportsLang? {#supportslang}
|
|
40
40
|
|
|
41
|
-
> `optional` **supportsLang
|
|
41
|
+
> `optional` **supportsLang?**: `boolean`
|
|
42
42
|
|
|
43
43
|
Supports different languages.
|
|
44
44
|
|
|
45
45
|
***
|
|
46
46
|
|
|
47
|
-
### supportsEnvFiles?
|
|
47
|
+
### supportsEnvFiles? {#supportsenvfiles}
|
|
48
48
|
|
|
49
|
-
> `optional` **supportsEnvFiles
|
|
49
|
+
> `optional` **supportsEnvFiles?**: `boolean`
|
|
50
50
|
|
|
51
51
|
Supports the loading of env files.
|
|
52
52
|
|
|
53
53
|
***
|
|
54
54
|
|
|
55
|
-
### overrideOutputWidth?
|
|
55
|
+
### overrideOutputWidth? {#overrideoutputwidth}
|
|
56
56
|
|
|
57
|
-
> `optional` **overrideOutputWidth
|
|
57
|
+
> `optional` **overrideOutputWidth?**: `number`
|
|
58
58
|
|
|
59
59
|
Override the default output width.
|
|
60
60
|
|
|
61
61
|
***
|
|
62
62
|
|
|
63
|
-
### showDevToolWarning?
|
|
63
|
+
### showDevToolWarning? {#showdevtoolwarning}
|
|
64
64
|
|
|
65
|
-
> `optional` **showDevToolWarning
|
|
65
|
+
> `optional` **showDevToolWarning?**: `boolean`
|
|
66
66
|
|
|
67
67
|
Show a warning that this is a dev tool and not for production use.
|
|
@@ -4,15 +4,15 @@ Options for the CLI Output for env.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### env?
|
|
7
|
+
### env? {#env}
|
|
8
8
|
|
|
9
|
-
> `optional` **env
|
|
9
|
+
> `optional` **env?**: `string`
|
|
10
10
|
|
|
11
11
|
Output the data to an environment file.
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### mergeEnv
|
|
15
|
+
### mergeEnv {#mergeenv}
|
|
16
16
|
|
|
17
17
|
> **mergeEnv**: `boolean`
|
|
18
18
|
|