@caweb/cli 1.8.9 → 1.8.10
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/lib/cli.js +19 -0
- package/package.json +2 -2
package/lib/cli.js
CHANGED
|
@@ -49,6 +49,7 @@ function addWebpackCmds(){
|
|
|
49
49
|
program.command('build')
|
|
50
50
|
.description('Builds the current project.')
|
|
51
51
|
.allowUnknownOption(true)
|
|
52
|
+
.allowExcessArguments(true)
|
|
52
53
|
.action(env.webpack)
|
|
53
54
|
|
|
54
55
|
|
|
@@ -75,6 +76,7 @@ function addWebpackCmds(){
|
|
|
75
76
|
.option( '--no-a11y', 'Skips IBM Accessibility Checker.', false )
|
|
76
77
|
.option( '--no-jshint', 'Skips JSHint.', false )
|
|
77
78
|
.allowUnknownOption(true)
|
|
79
|
+
.allowExcessArguments(true)
|
|
78
80
|
.action(env.webpack)
|
|
79
81
|
|
|
80
82
|
// a11y Command.
|
|
@@ -101,6 +103,7 @@ function addWebpackCmds(){
|
|
|
101
103
|
.option( '--output-folder <folder>', 'Where the scan results should be saved.', 'a11y')
|
|
102
104
|
.option( '--output-filename-timestamp', 'Should the timestamp be included in the filename of the reports?', false)
|
|
103
105
|
.allowUnknownOption(true)
|
|
106
|
+
.allowExcessArguments(true)
|
|
104
107
|
.action(env.a11y)
|
|
105
108
|
|
|
106
109
|
|
|
@@ -125,6 +128,7 @@ function addWebpackCmds(){
|
|
|
125
128
|
.option('--property-values <values...>', 'Runs property value audit.', ['font-size', 'padding,padding-top,padding-bottom,padding-right,padding-left', 'margin,margin-top,marin-bottom,marin-right,marin-left'] )
|
|
126
129
|
.addOption(new Option('--no-property-values', 'Skips property values audit.', false ).hideHelp())
|
|
127
130
|
.allowUnknownOption(true)
|
|
131
|
+
.allowExcessArguments(true)
|
|
128
132
|
.action(env.audit)
|
|
129
133
|
|
|
130
134
|
// JSHint Command.
|
|
@@ -134,6 +138,7 @@ function addWebpackCmds(){
|
|
|
134
138
|
.option( '--output-filename <name>', 'Filename for the scan results.', 'jshint')
|
|
135
139
|
.option( '--output-folder <folder>', 'Where the hint results should be saved.', 'jshint')
|
|
136
140
|
.allowUnknownOption(true)
|
|
141
|
+
.allowExcessArguments(true)
|
|
137
142
|
.action(env.hint)
|
|
138
143
|
}
|
|
139
144
|
|
|
@@ -190,6 +195,7 @@ function addWPEnvCommands(){
|
|
|
190
195
|
false
|
|
191
196
|
)
|
|
192
197
|
.allowUnknownOption(true)
|
|
198
|
+
.allowExcessArguments(true)
|
|
193
199
|
.action( withSpinner(env.start) )
|
|
194
200
|
|
|
195
201
|
// Destroy Command.
|
|
@@ -204,6 +210,7 @@ function addWPEnvCommands(){
|
|
|
204
210
|
true
|
|
205
211
|
)
|
|
206
212
|
.allowUnknownOption(true)
|
|
213
|
+
.allowExcessArguments(true)
|
|
207
214
|
.action( withSpinner(env.destroy) )
|
|
208
215
|
|
|
209
216
|
// Stop Command.
|
|
@@ -212,12 +219,14 @@ function addWPEnvCommands(){
|
|
|
212
219
|
'Stops running WordPress for development and tests and frees the ports.'
|
|
213
220
|
)
|
|
214
221
|
.allowUnknownOption(true)
|
|
222
|
+
.allowExcessArguments(true)
|
|
215
223
|
.action( withSpinner(env.stop) )
|
|
216
224
|
|
|
217
225
|
// Install Path Command.
|
|
218
226
|
program.command('install-path')
|
|
219
227
|
.description('Get the path where all of the environment files are stored. This includes the Docker files, WordPress, PHPUnit files, and any sources that were downloaded.')
|
|
220
228
|
.allowUnknownOption(true)
|
|
229
|
+
.allowExcessArguments(true)
|
|
221
230
|
.action( withSpinner(env.installPath) )
|
|
222
231
|
|
|
223
232
|
// Clean Command.
|
|
@@ -232,6 +241,7 @@ function addWPEnvCommands(){
|
|
|
232
241
|
true
|
|
233
242
|
)
|
|
234
243
|
.allowUnknownOption(true)
|
|
244
|
+
.allowExcessArguments(true)
|
|
235
245
|
.action( withSpinner(env.clean) )
|
|
236
246
|
|
|
237
247
|
// Logs Command.
|
|
@@ -246,6 +256,7 @@ function addWPEnvCommands(){
|
|
|
246
256
|
true
|
|
247
257
|
)
|
|
248
258
|
.allowUnknownOption(true)
|
|
259
|
+
.allowExcessArguments(true)
|
|
249
260
|
.action( withSpinner(env.logs) )
|
|
250
261
|
|
|
251
262
|
|
|
@@ -262,6 +273,7 @@ function addWPEnvCommands(){
|
|
|
262
273
|
'.'
|
|
263
274
|
)
|
|
264
275
|
.allowUnknownOption(true)
|
|
276
|
+
.allowExcessArguments(true)
|
|
265
277
|
.action( withSpinner(env.run) )
|
|
266
278
|
|
|
267
279
|
|
|
@@ -270,6 +282,7 @@ function addWPEnvCommands(){
|
|
|
270
282
|
.description('Open shell terminal in WordPress environment.')
|
|
271
283
|
.addArgument(envArg)
|
|
272
284
|
.allowUnknownOption(true)
|
|
285
|
+
.allowExcessArguments(true)
|
|
273
286
|
.action( withSpinner(env.shell) )
|
|
274
287
|
|
|
275
288
|
}
|
|
@@ -282,6 +295,7 @@ export default function cli() {
|
|
|
282
295
|
.description('Command Line Interface utilized by CAWebPublishing to accomplish several tasks.')
|
|
283
296
|
.version( pkg.version )
|
|
284
297
|
.allowUnknownOption(true)
|
|
298
|
+
.allowExcessArguments(true)
|
|
285
299
|
.configureHelp({
|
|
286
300
|
sortSubcommands: true,
|
|
287
301
|
sortOptions: true,
|
|
@@ -301,6 +315,7 @@ export default function cli() {
|
|
|
301
315
|
.argument('[slug]', 'Plugin slug to update.', 'all')
|
|
302
316
|
.addOption(new Option('--environment <env>', 'Which environment to use.').choices(['development', 'tests']).default('development'))
|
|
303
317
|
.allowUnknownOption(true)
|
|
318
|
+
.allowExcessArguments(true)
|
|
304
319
|
.action( withSpinner(env.updatePlugins) )
|
|
305
320
|
|
|
306
321
|
// Create a Design System Block Command.
|
|
@@ -308,6 +323,7 @@ export default function cli() {
|
|
|
308
323
|
.description('Scaffold for WordPress plugin to register CA.gov Design System Block.')
|
|
309
324
|
.argument('<slug>', 'Plugin slug to use.')
|
|
310
325
|
.allowUnknownOption(true)
|
|
326
|
+
.allowExcessArguments(true)
|
|
311
327
|
.action( withSpinner(env.createBlock) )
|
|
312
328
|
|
|
313
329
|
// Update a Design System Block Command.
|
|
@@ -315,6 +331,7 @@ export default function cli() {
|
|
|
315
331
|
.description('Updates a CA.gov Design System Block.')
|
|
316
332
|
.argument('<slug>', 'Plugin slug to update.')
|
|
317
333
|
.allowUnknownOption(true)
|
|
334
|
+
.allowExcessArguments(true)
|
|
318
335
|
.action( withSpinner(env.updateBlock) )
|
|
319
336
|
|
|
320
337
|
|
|
@@ -357,6 +374,7 @@ export default function cli() {
|
|
|
357
374
|
false
|
|
358
375
|
)
|
|
359
376
|
.allowUnknownOption(true)
|
|
377
|
+
.allowExcessArguments(true)
|
|
360
378
|
.action( withSpinner(env.sync) )
|
|
361
379
|
|
|
362
380
|
// Test Command.
|
|
@@ -365,6 +383,7 @@ export default function cli() {
|
|
|
365
383
|
.description('Test commands on a WordPress environment')
|
|
366
384
|
//.addArgument(envArg)
|
|
367
385
|
.allowUnknownOption(true)
|
|
386
|
+
.allowExcessArguments(true)
|
|
368
387
|
.action(withSpinner(env.test))
|
|
369
388
|
*/
|
|
370
389
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caweb/cli",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.10",
|
|
4
4
|
"description": "CAWebPublishing Command Line Interface.",
|
|
5
5
|
"exports": "./lib/env.js",
|
|
6
6
|
"type": "module",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@caweb/webpack": "^1.3.
|
|
59
|
+
"@caweb/webpack": "^1.3.16",
|
|
60
60
|
"@inquirer/prompts": "^7.2.3",
|
|
61
61
|
"@wordpress/create-block": "^4.58.1",
|
|
62
62
|
"@wordpress/env": "^10.15.0",
|