@adobe/aio-cli-plugin-app 8.2.0 → 8.3.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/README.md +40 -34
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
- package/src/AddCommand.js +41 -0
- package/src/BaseCommand.js +9 -0
- package/src/commands/app/add/action.js +9 -15
- package/src/commands/app/add/ci.js +7 -1
- package/src/commands/app/add/event.js +7 -14
- package/src/commands/app/add/extension.js +9 -14
- package/src/commands/app/add/web-assets.js +9 -15
- package/src/commands/app/build.js +1 -1
- package/src/commands/app/delete/action.js +1 -1
- package/src/commands/app/delete/ci.js +3 -1
- package/src/commands/app/init.js +22 -24
- package/src/lib/actions-watcher.js +43 -15
- package/src/lib/build-actions.js +3 -2
- package/src/lib/deploy-actions.js +9 -2
- package/src/lib/run-dev.js +1 -1
- package/src/lib/vscode.js +3 -1
package/README.md
CHANGED
|
@@ -71,7 +71,7 @@ OPTIONS
|
|
|
71
71
|
--version Show version
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
_See code: [src/commands/app/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
74
|
+
_See code: [src/commands/app/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/index.js)_
|
|
75
75
|
|
|
76
76
|
## `aio app:add`
|
|
77
77
|
|
|
@@ -88,7 +88,7 @@ OPTIONS
|
|
|
88
88
|
--version Show version
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
_See code: [src/commands/app/add/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
91
|
+
_See code: [src/commands/app/add/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/add/index.js)_
|
|
92
92
|
|
|
93
93
|
## `aio app:add:action`
|
|
94
94
|
|
|
@@ -103,16 +103,17 @@ USAGE
|
|
|
103
103
|
|
|
104
104
|
OPTIONS
|
|
105
105
|
-e, --extension=extension Add actions to a specific extension
|
|
106
|
+
-s, --skip-install [deprecated] Please use --no-install
|
|
106
107
|
-v, --verbose Verbose output
|
|
107
108
|
-y, --yes Skip questions, and use all default values
|
|
108
|
-
--
|
|
109
|
+
--[no-]install [default: true] Run npm installation after files are created
|
|
109
110
|
--version Show version
|
|
110
111
|
|
|
111
112
|
ALIASES
|
|
112
113
|
$ aio app:add:actions
|
|
113
114
|
```
|
|
114
115
|
|
|
115
|
-
_See code: [src/commands/app/add/action.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
116
|
+
_See code: [src/commands/app/add/action.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/add/action.js)_
|
|
116
117
|
|
|
117
118
|
## `aio app:add:ci`
|
|
118
119
|
|
|
@@ -130,7 +131,7 @@ OPTIONS
|
|
|
130
131
|
--version Show version
|
|
131
132
|
```
|
|
132
133
|
|
|
133
|
-
_See code: [src/commands/app/add/ci.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
134
|
+
_See code: [src/commands/app/add/ci.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/add/ci.js)_
|
|
134
135
|
|
|
135
136
|
## `aio app:add:event`
|
|
136
137
|
|
|
@@ -145,16 +146,17 @@ USAGE
|
|
|
145
146
|
|
|
146
147
|
OPTIONS
|
|
147
148
|
-e, --extension=extension Add actions to a specific extension
|
|
149
|
+
-s, --skip-install [deprecated] Please use --no-install
|
|
148
150
|
-v, --verbose Verbose output
|
|
149
151
|
-y, --yes Skip questions, and use all default values
|
|
150
|
-
--
|
|
152
|
+
--[no-]install [default: true] Run npm installation after files are created
|
|
151
153
|
--version Show version
|
|
152
154
|
|
|
153
155
|
ALIASES
|
|
154
156
|
$ aio app:add:events
|
|
155
157
|
```
|
|
156
158
|
|
|
157
|
-
_See code: [src/commands/app/add/event.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
159
|
+
_See code: [src/commands/app/add/event.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/add/event.js)_
|
|
158
160
|
|
|
159
161
|
## `aio app:add:extension`
|
|
160
162
|
|
|
@@ -169,9 +171,10 @@ USAGE
|
|
|
169
171
|
|
|
170
172
|
OPTIONS
|
|
171
173
|
-e, --extension=extension Specify extensions to add, skips selection prompt
|
|
174
|
+
-s, --skip-install [deprecated] Please use --no-install
|
|
172
175
|
-v, --verbose Verbose output
|
|
173
176
|
-y, --yes Skip questions, and use all default values
|
|
174
|
-
--
|
|
177
|
+
--[no-]install [default: true] Run npm installation after files are created
|
|
175
178
|
--version Show version
|
|
176
179
|
|
|
177
180
|
ALIASES
|
|
@@ -179,7 +182,7 @@ ALIASES
|
|
|
179
182
|
$ aio app:add:extensions
|
|
180
183
|
```
|
|
181
184
|
|
|
182
|
-
_See code: [src/commands/app/add/extension.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
185
|
+
_See code: [src/commands/app/add/extension.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/add/extension.js)_
|
|
183
186
|
|
|
184
187
|
## `aio app:add:service`
|
|
185
188
|
|
|
@@ -200,7 +203,7 @@ ALIASES
|
|
|
200
203
|
$ aio app:add:services
|
|
201
204
|
```
|
|
202
205
|
|
|
203
|
-
_See code: [src/commands/app/add/service.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
206
|
+
_See code: [src/commands/app/add/service.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/add/service.js)_
|
|
204
207
|
|
|
205
208
|
## `aio app:add:web-assets`
|
|
206
209
|
|
|
@@ -215,13 +218,14 @@ USAGE
|
|
|
215
218
|
|
|
216
219
|
OPTIONS
|
|
217
220
|
-e, --extension=extension Add web-assets to a specific extension
|
|
221
|
+
-s, --skip-install [deprecated] Please use --no-install
|
|
218
222
|
-v, --verbose Verbose output
|
|
219
223
|
-y, --yes Skip questions, and use all default values
|
|
220
|
-
--
|
|
224
|
+
--[no-]install [default: true] Run npm installation after files are created
|
|
221
225
|
--version Show version
|
|
222
226
|
```
|
|
223
227
|
|
|
224
|
-
_See code: [src/commands/app/add/web-assets.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
228
|
+
_See code: [src/commands/app/add/web-assets.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/add/web-assets.js)_
|
|
225
229
|
|
|
226
230
|
## `aio app:build`
|
|
227
231
|
|
|
@@ -266,7 +270,7 @@ DESCRIPTION
|
|
|
266
270
|
This will always force a rebuild unless --no-force-build is set.
|
|
267
271
|
```
|
|
268
272
|
|
|
269
|
-
_See code: [src/commands/app/build.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
273
|
+
_See code: [src/commands/app/build.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/build.js)_
|
|
270
274
|
|
|
271
275
|
## `aio app:create [PATH]`
|
|
272
276
|
|
|
@@ -288,7 +292,7 @@ OPTIONS
|
|
|
288
292
|
--version Show version
|
|
289
293
|
```
|
|
290
294
|
|
|
291
|
-
_See code: [src/commands/app/create.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
295
|
+
_See code: [src/commands/app/create.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/create.js)_
|
|
292
296
|
|
|
293
297
|
## `aio app:delete`
|
|
294
298
|
|
|
@@ -305,7 +309,7 @@ OPTIONS
|
|
|
305
309
|
--version Show version
|
|
306
310
|
```
|
|
307
311
|
|
|
308
|
-
_See code: [src/commands/app/delete/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
312
|
+
_See code: [src/commands/app/delete/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/delete/index.js)_
|
|
309
313
|
|
|
310
314
|
## `aio app:delete:action [ACTION-NAME]`
|
|
311
315
|
|
|
@@ -330,7 +334,7 @@ ALIASES
|
|
|
330
334
|
$ aio app:delete:actions
|
|
331
335
|
```
|
|
332
336
|
|
|
333
|
-
_See code: [src/commands/app/delete/action.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
337
|
+
_See code: [src/commands/app/delete/action.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/delete/action.js)_
|
|
334
338
|
|
|
335
339
|
## `aio app:delete:ci`
|
|
336
340
|
|
|
@@ -349,7 +353,7 @@ OPTIONS
|
|
|
349
353
|
--version Show version
|
|
350
354
|
```
|
|
351
355
|
|
|
352
|
-
_See code: [src/commands/app/delete/ci.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
356
|
+
_See code: [src/commands/app/delete/ci.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/delete/ci.js)_
|
|
353
357
|
|
|
354
358
|
## `aio app:delete:event [EVENT-ACTION-NAME]`
|
|
355
359
|
|
|
@@ -374,7 +378,7 @@ ALIASES
|
|
|
374
378
|
$ aio app:delete:events
|
|
375
379
|
```
|
|
376
380
|
|
|
377
|
-
_See code: [src/commands/app/delete/event.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
381
|
+
_See code: [src/commands/app/delete/event.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/delete/event.js)_
|
|
378
382
|
|
|
379
383
|
## `aio app:delete:extension`
|
|
380
384
|
|
|
@@ -399,7 +403,7 @@ ALIASES
|
|
|
399
403
|
$ aio app:delete:extensions
|
|
400
404
|
```
|
|
401
405
|
|
|
402
|
-
_See code: [src/commands/app/delete/extension.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
406
|
+
_See code: [src/commands/app/delete/extension.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/delete/extension.js)_
|
|
403
407
|
|
|
404
408
|
## `aio app:delete:service`
|
|
405
409
|
|
|
@@ -420,7 +424,7 @@ ALIASES
|
|
|
420
424
|
$ aio app:delete:services
|
|
421
425
|
```
|
|
422
426
|
|
|
423
|
-
_See code: [src/commands/app/delete/service.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
427
|
+
_See code: [src/commands/app/delete/service.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/delete/service.js)_
|
|
424
428
|
|
|
425
429
|
## `aio app:delete:web-assets`
|
|
426
430
|
|
|
@@ -439,7 +443,7 @@ OPTIONS
|
|
|
439
443
|
--version Show version
|
|
440
444
|
```
|
|
441
445
|
|
|
442
|
-
_See code: [src/commands/app/delete/web-assets.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
446
|
+
_See code: [src/commands/app/delete/web-assets.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/delete/web-assets.js)_
|
|
443
447
|
|
|
444
448
|
## `aio app:deploy`
|
|
445
449
|
|
|
@@ -497,7 +501,7 @@ DESCRIPTION
|
|
|
497
501
|
This will always force a rebuild unless --no-force-build is set.
|
|
498
502
|
```
|
|
499
503
|
|
|
500
|
-
_See code: [src/commands/app/deploy.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
504
|
+
_See code: [src/commands/app/deploy.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/deploy.js)_
|
|
501
505
|
|
|
502
506
|
## `aio app:get-url [ACTION]`
|
|
503
507
|
|
|
@@ -518,7 +522,7 @@ OPTIONS
|
|
|
518
522
|
--version Show version
|
|
519
523
|
```
|
|
520
524
|
|
|
521
|
-
_See code: [src/commands/app/get-url.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
525
|
+
_See code: [src/commands/app/get-url.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/get-url.js)_
|
|
522
526
|
|
|
523
527
|
## `aio app:info`
|
|
524
528
|
|
|
@@ -540,7 +544,7 @@ OPTIONS
|
|
|
540
544
|
--version Show version
|
|
541
545
|
```
|
|
542
546
|
|
|
543
|
-
_See code: [src/commands/app/info.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
547
|
+
_See code: [src/commands/app/info.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/info.js)_
|
|
544
548
|
|
|
545
549
|
## `aio app:init [PATH]`
|
|
546
550
|
|
|
@@ -559,7 +563,7 @@ ARGUMENTS
|
|
|
559
563
|
OPTIONS
|
|
560
564
|
-e, --extension=extension Extension point(s) to implement
|
|
561
565
|
-i, --import=import Import an Adobe I/O Developer Console configuration file
|
|
562
|
-
-s, --skip-install
|
|
566
|
+
-s, --skip-install [deprecated] Please use --no-install
|
|
563
567
|
-v, --verbose Verbose output
|
|
564
568
|
|
|
565
569
|
-w, --workspace=workspace [default: Stage] Specify the Adobe Developer Console Workspace to init from, defaults to
|
|
@@ -569,12 +573,14 @@ OPTIONS
|
|
|
569
573
|
|
|
570
574
|
--[no-]extensions Use --no-extensions to create a blank application that does not integrate with Exchange
|
|
571
575
|
|
|
576
|
+
--[no-]install [default: true] Run npm installation after files are created
|
|
577
|
+
|
|
572
578
|
--[no-]login Login using your Adobe ID for interacting with Adobe I/O Developer Console
|
|
573
579
|
|
|
574
580
|
--version Show version
|
|
575
581
|
```
|
|
576
582
|
|
|
577
|
-
_See code: [src/commands/app/init.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
583
|
+
_See code: [src/commands/app/init.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/init.js)_
|
|
578
584
|
|
|
579
585
|
## `aio app:list`
|
|
580
586
|
|
|
@@ -591,7 +597,7 @@ OPTIONS
|
|
|
591
597
|
--version Show version
|
|
592
598
|
```
|
|
593
599
|
|
|
594
|
-
_See code: [src/commands/app/list/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
600
|
+
_See code: [src/commands/app/list/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/list/index.js)_
|
|
595
601
|
|
|
596
602
|
## `aio app:list:extension`
|
|
597
603
|
|
|
@@ -615,7 +621,7 @@ ALIASES
|
|
|
615
621
|
$ aio app:list:extensions
|
|
616
622
|
```
|
|
617
623
|
|
|
618
|
-
_See code: [src/commands/app/list/extension.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
624
|
+
_See code: [src/commands/app/list/extension.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/list/extension.js)_
|
|
619
625
|
|
|
620
626
|
## `aio app:list:extension-points`
|
|
621
627
|
|
|
@@ -639,7 +645,7 @@ ALIASES
|
|
|
639
645
|
$ aio app:list:extension-points
|
|
640
646
|
```
|
|
641
647
|
|
|
642
|
-
_See code: [src/commands/app/list/extension-points.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
648
|
+
_See code: [src/commands/app/list/extension-points.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/list/extension-points.js)_
|
|
643
649
|
|
|
644
650
|
## `aio app:logs`
|
|
645
651
|
|
|
@@ -663,7 +669,7 @@ OPTIONS
|
|
|
663
669
|
--version Show version
|
|
664
670
|
```
|
|
665
671
|
|
|
666
|
-
_See code: [src/commands/app/logs.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
672
|
+
_See code: [src/commands/app/logs.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/logs.js)_
|
|
667
673
|
|
|
668
674
|
## `aio app:run`
|
|
669
675
|
|
|
@@ -686,7 +692,7 @@ OPTIONS
|
|
|
686
692
|
--version Show version
|
|
687
693
|
```
|
|
688
694
|
|
|
689
|
-
_See code: [src/commands/app/run.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
695
|
+
_See code: [src/commands/app/run.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/run.js)_
|
|
690
696
|
|
|
691
697
|
## `aio app:test`
|
|
692
698
|
|
|
@@ -720,7 +726,7 @@ DESCRIPTION
|
|
|
720
726
|
If the extension has a hook called 'test' in its 'ext.config.yaml', the script specified will be run instead.
|
|
721
727
|
```
|
|
722
728
|
|
|
723
|
-
_See code: [src/commands/app/test.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
729
|
+
_See code: [src/commands/app/test.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/test.js)_
|
|
724
730
|
|
|
725
731
|
## `aio app:undeploy`
|
|
726
732
|
|
|
@@ -746,7 +752,7 @@ OPTIONS
|
|
|
746
752
|
--[no-]web-assets [default: true] Undeploy web-assets if any
|
|
747
753
|
```
|
|
748
754
|
|
|
749
|
-
_See code: [src/commands/app/undeploy.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
755
|
+
_See code: [src/commands/app/undeploy.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/undeploy.js)_
|
|
750
756
|
|
|
751
757
|
## `aio app:use [CONFIG_FILE_PATH]`
|
|
752
758
|
|
|
@@ -806,5 +812,5 @@ DESCRIPTION
|
|
|
806
812
|
page in https://console.adobe.io
|
|
807
813
|
```
|
|
808
814
|
|
|
809
|
-
_See code: [src/commands/app/use.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.
|
|
815
|
+
_See code: [src/commands/app/use.js](https://github.com/adobe/aio-cli-plugin-app/blob/8.3.0/src/commands/app/use.js)_
|
|
810
816
|
<!-- commandsstop -->
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"8.2.0","commands":{"app:build":{"id":"app:build","description":"Build an Adobe I/O App\n\nThis will always force a rebuild unless --no-force-build is set.\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"skip-static":{"name":"skip-static","type":"boolean","description":"[deprecated] Please use --no-web-assets","allowNo":false},"skip-web-assets":{"name":"skip-web-assets","type":"boolean","description":"[deprecated] Please use --no-web-assets","allowNo":false},"skip-actions":{"name":"skip-actions","type":"boolean","description":"[deprecated] Please use --no-actions","allowNo":false},"actions":{"name":"actions","type":"boolean","description":"[default: true] Build actions if any","allowNo":true},"action":{"name":"action","type":"option","char":"a","description":"Build only a specific action, the flags can be specified multiple times, this will set --no-publish"},"web-assets":{"name":"web-assets","type":"boolean","description":"[default: true] Build web-assets if any","allowNo":true},"force-build":{"name":"force-build","type":"boolean","description":"[default: true] Force a build even if one already exists","allowNo":true},"content-hash":{"name":"content-hash","type":"boolean","description":"[default: true] Enable content hashing in browser code","allowNo":true},"web-optimize":{"name":"web-optimize","type":"boolean","description":"[default: false] Enable optimization (minification) of js/css/html","allowNo":false},"extension":{"name":"extension","type":"option","char":"e","description":"Build only a specific extension point, the flags can be specified multiple times"}},"args":[]},"app:create":{"id":"app:create","description":"Create a new Adobe I/O App with default parameters\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"import":{"name":"import","type":"option","char":"i","description":"Import an Adobe I/O Developer Console configuration file"}},"args":[{"name":"path","description":"Path to the app directory","default":"."}]},"app:deploy":{"id":"app:deploy","description":"Build and deploy an Adobe I/O App\n\nThis will always force a rebuild unless --no-force-build is set.\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"skip-build":{"name":"skip-build","type":"boolean","description":"[deprecated] Please use --no-build","allowNo":false},"skip-deploy":{"name":"skip-deploy","type":"boolean","description":"[deprecated] Please use 'aio app build'","allowNo":false},"skip-static":{"name":"skip-static","type":"boolean","description":"[deprecated] Please use --no-web-assets","allowNo":false},"skip-web-assets":{"name":"skip-web-assets","type":"boolean","description":"[deprecated] Please use --no-web-assets","allowNo":false},"skip-actions":{"name":"skip-actions","type":"boolean","description":"[deprecated] Please use --no-actions","allowNo":false},"actions":{"name":"actions","type":"boolean","description":"[default: true] Deploy actions if any","allowNo":true},"action":{"name":"action","type":"option","char":"a","description":"Deploy only a specific action, the flags can be specified multiple times, this will set --no-publish"},"web-assets":{"name":"web-assets","type":"boolean","description":"[default: true] Deploy web-assets if any","allowNo":true},"build":{"name":"build","type":"boolean","description":"[default: true] Run the build phase before deployment","allowNo":true},"force-build":{"name":"force-build","type":"boolean","description":"[default: true] Force a build even if one already exists","allowNo":true},"content-hash":{"name":"content-hash","type":"boolean","description":"[default: true] Enable content hashing in browser code","allowNo":true},"open":{"name":"open","type":"boolean","description":"Open the default web browser after a successful deploy, only valid if your app has a front-end","allowNo":false},"extension":{"name":"extension","type":"option","char":"e","description":"Deploy only a specific extension, the flags can be specified multiple times"},"publish":{"name":"publish","type":"boolean","description":"[default: true] Publish extension(s) to Exchange","allowNo":true},"force-publish":{"name":"force-publish","type":"boolean","description":"Force publish extension(s) to Exchange, delete previously published extension points","allowNo":false},"web-optimize":{"name":"web-optimize","type":"boolean","description":"[default: false] Enable optimization (minification) of web js/css/html","allowNo":false}},"args":[]},"app:get-url":{"id":"app:get-url","description":"Get action URLs","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"cdn":{"name":"cdn","type":"boolean","description":"Display CDN based action URLs","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","description":"Output json","allowNo":false},"hson":{"name":"hson","type":"boolean","char":"h","description":"Output human readable json","allowNo":false},"yml":{"name":"yml","type":"boolean","char":"y","description":"Output yml","allowNo":false}},"args":[{"name":"action"}]},"app":{"id":"app","description":"Create, run, test, and deploy Adobe I/O Apps","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:info":{"id":"app:info","description":"Display settings/configuration in use by an Adobe I/O App\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","description":"Output json","allowNo":false},"hson":{"name":"hson","type":"boolean","char":"h","description":"Output human readable json","allowNo":false},"yml":{"name":"yml","type":"boolean","char":"y","description":"Output yml","allowNo":false},"mask":{"name":"mask","type":"boolean","description":"Hide known private info","allowNo":true}},"args":[]},"app:init":{"id":"app:init","description":"Create a new Adobe I/O App\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"skip-install":{"name":"skip-install","type":"boolean","char":"s","description":"Skip npm installation after files are created","allowNo":false},"import":{"name":"import","type":"option","char":"i","description":"Import an Adobe I/O Developer Console configuration file"},"login":{"name":"login","type":"boolean","description":"Login using your Adobe ID for interacting with Adobe I/O Developer Console","allowNo":true},"extensions":{"name":"extensions","type":"boolean","description":"Use --no-extensions to create a blank application that does not integrate with Exchange","allowNo":true},"extension":{"name":"extension","type":"option","char":"e","description":"Extension point(s) to implement"},"workspace":{"name":"workspace","type":"option","char":"w","description":"Specify the Adobe Developer Console Workspace to init from, defaults to Stage","default":"Stage"}},"args":[{"name":"path","description":"Path to the app directory","default":"."}]},"app:logs":{"id":"app:logs","description":"Fetch logs for an Adobe I/O App\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"limit":{"name":"limit","type":"option","char":"l","description":"Limit number of activations to fetch logs from ( 1-50 )","default":1},"action":{"name":"action","type":"option","char":"a","description":"Fetch logs for a specific action"},"strip":{"name":"strip","type":"boolean","char":"r","description":"strip timestamp information and output first line only","allowNo":false},"tail":{"name":"tail","type":"boolean","char":"t","description":"Fetch logs continuously","allowNo":false},"watch":{"name":"watch","type":"boolean","char":"w","description":"Fetch logs continuously","allowNo":false},"poll":{"name":"poll","type":"boolean","char":"o","description":"Fetch logs continuously","allowNo":false}},"args":[]},"app:run":{"id":"app:run","description":"Run an Adobe I/O App","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"local":{"name":"local","type":"boolean","description":"Run/debug actions locally ( requires Docker running )","allowNo":false},"serve":{"name":"serve","type":"boolean","description":"[default: true] Start frontend server (experimental)","allowNo":true},"skip-actions":{"name":"skip-actions","type":"boolean","description":"[deprecated] Please use --no-actions","allowNo":false},"actions":{"name":"actions","type":"boolean","description":"[default: true] Run actions, defaults to true, to skip actions use --no-actions","allowNo":true},"open":{"name":"open","type":"boolean","description":"Open the default web browser after a successful run, only valid if your app has a front-end","allowNo":false},"extension":{"name":"extension","type":"option","char":"e","description":"Run only a specific extension, this flag can only be specified once"}},"args":[]},"app:test":{"id":"app:test","description":"Run tests for an Adobe I/O App\nIf no flags are specified, by default only unit-tests are run.\n\nFor the --action flag, it tries a substring search on the 'package-name/action-name' pair for an action.\nFor the --extension flag, it tries a substring search on the 'extension-name' only.\nIf the extension has a hook called 'test' in its 'ext.config.yaml', the script specified will be run instead.\n\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"extension":{"name":"extension","type":"option","char":"e","description":"the extension(s) to test"},"action":{"name":"action","type":"option","char":"a","description":"the action(s) to test"},"all":{"name":"all","type":"boolean","description":"run both unit and e2e tests","allowNo":false},"e2e":{"name":"e2e","type":"boolean","description":"run e2e tests","allowNo":false},"unit":{"name":"unit","type":"boolean","description":"run unit tests","allowNo":false}},"args":[]},"app:undeploy":{"id":"app:undeploy","description":"Undeploys an Adobe I/O App\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"skip-static":{"name":"skip-static","type":"boolean","description":"[deprecated] Please use --no-web-assets","allowNo":false},"skip-web-assets":{"name":"skip-web-assets","type":"boolean","description":"[deprecated] Please use --no-web-assets","allowNo":false},"skip-actions":{"name":"skip-actions","type":"boolean","description":"[deprecated] Please use --no-actions","allowNo":false},"actions":{"name":"actions","type":"boolean","description":"[default: true] Undeploy actions if any","allowNo":true},"web-assets":{"name":"web-assets","type":"boolean","description":"[default: true] Undeploy web-assets if any","allowNo":true},"extension":{"name":"extension","type":"option","char":"e","description":"Undeploy only a specific extension, the flags can be specified multiple times"},"unpublish":{"name":"unpublish","type":"boolean","description":"[default: true] Unpublish selected extension(s) from Exchange","allowNo":true},"force-unpublish":{"name":"force-unpublish","type":"boolean","description":"Force unpublish extension(s) from Exchange, will delete all extension points","allowNo":false}},"args":[]},"app:use":{"id":"app:use","description":"Import an Adobe Developer Console configuration file.\n\nIf the optional configuration file is not set, this command will retrieve the console org, project, and workspace settings from the global config.\n\nTo set these global config values, see the help text for 'aio console --help'.\n\nTo download the configuration file for your project, select the 'Download' button in the toolbar of your project's page in https://console.adobe.io\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"overwrite":{"name":"overwrite","type":"boolean","description":"Overwrite any .aio and .env files during import of the Adobe Developer Console configuration file","allowNo":false},"merge":{"name":"merge","type":"boolean","description":"Merge any .aio and .env files during import of the Adobe Developer Console configuration file","allowNo":false},"global":{"name":"global","type":"boolean","char":"g","description":"Use the global Adobe Developer Console Org / Project / Workspace configuration, which can be set via `aio console` commands","allowNo":false},"workspace":{"name":"workspace","type":"option","char":"w","description":"Specify the Adobe Developer Console Workspace name to import the configuration from","default":""},"workspace-name":{"name":"workspace-name","type":"option","char":"w","description":"[DEPRECATED]: please use --workspace instead","default":""},"no-service-sync":{"name":"no-service-sync","type":"boolean","description":"Skip the Service sync prompt and do not attach current Service subscriptions to the new Workspace","allowNo":false},"confirm-service-sync":{"name":"confirm-service-sync","type":"boolean","description":"Skip the Service sync prompt and overwrite Service subscriptions in the new Workspace with current subscriptions","allowNo":false},"no-input":{"name":"no-input","type":"boolean","description":"Skip user prompts by setting --no-service-sync and --merge. Requires one of config_file_path or --global or --workspace","allowNo":false}},"args":[{"name":"config_file_path","description":"path to an Adobe I/O Developer Console configuration file","required":false}]},"app:add:action":{"id":"app:add:action","description":"Add new actions\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:add:actions"],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"skip-install":{"name":"skip-install","type":"boolean","description":"Skip npm installation after files are created","allowNo":false},"extension":{"name":"extension","type":"option","char":"e","description":"Add actions to a specific extension"},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:add:ci":{"id":"app:add:ci","description":"Add CI files\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:add:event":{"id":"app:add:event","description":"Add a new Adobe I/O Events action\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:add:events"],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"skip-install":{"name":"skip-install","type":"boolean","description":"Skip npm installation after files are created","allowNo":false},"extension":{"name":"extension","type":"option","char":"e","description":"Add actions to a specific extension"},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:add:extension":{"id":"app:add:extension","description":"Add new extensions or a standalone application to the project\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:add:ext","app:add:extensions"],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"skip-install":{"name":"skip-install","type":"boolean","description":"Skip npm installation after files are created","allowNo":false},"extension":{"name":"extension","type":"option","char":"e","description":"Specify extensions to add, skips selection prompt"},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:add":{"id":"app:add","description":"Add a new component to an existing Adobe I/O App","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:add:service":{"id":"app:add:service","description":"Subscribe to Services in the current Workspace\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:add:services"],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:add:web-assets":{"id":"app:add:web-assets","description":"Add web assets support\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"skip-install":{"name":"skip-install","type":"boolean","description":"Skip npm installation after files are created","allowNo":false},"extension":{"name":"extension","type":"option","char":"e","description":"Add web-assets to a specific extension"},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:delete:action":{"id":"app:delete:action","description":"Delete existing actions\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:delete:actions"],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[{"name":"action-name","description":"Action `pkg/name` to delete, you can specify multiple actions via a comma separated list","required":false,"default":""}]},"app:delete:ci":{"id":"app:delete:ci","description":"Delete existing CI files\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:delete:event":{"id":"app:delete:event","description":"Delete existing Adobe I/O Events actions\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:delete:events"],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[{"name":"event-action-name","description":"Action `pkg/name` to delete, you can specify multiple actions via a comma separated list","required":false}]},"app:delete:extension":{"id":"app:delete:extension","description":"Add new extensions or a standalone application to the project\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:delete:ext","app:delete:extensions"],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"skip-install":{"name":"skip-install","type":"boolean","description":"Skip npm installation after files are created","allowNo":false},"extension":{"name":"extension","type":"option","char":"e","description":"Specify extensions to delete, skips selection prompt"},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:delete":{"id":"app:delete","description":"Delete a component from an existing Adobe I/O App","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:delete:service":{"id":"app:delete:service","description":"Delete Services in the current Workspace\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:delete:services"],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:delete:web-assets":{"id":"app:delete:web-assets","description":"Delete existing web assets\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:list:extension-points":{"id":"app:list:extension-points","description":"List all extension points for the selected org\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:list:ext-points","app:list:extension-points"],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","description":"Output json","allowNo":false},"yml":{"name":"yml","type":"boolean","char":"y","description":"Output yml","allowNo":false}},"args":[]},"app:list:extension":{"id":"app:list:extension","description":"List implemented extensions\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:list:ext","app:list:extensions"],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","description":"Output json","allowNo":false},"yml":{"name":"yml","type":"boolean","char":"y","description":"Output yml","allowNo":false}},"args":[]},"app:list":{"id":"app:list","description":"List components for Adobe I/O App","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]}}}
|
|
1
|
+
{"version":"8.3.0","commands":{"app:build":{"id":"app:build","description":"Build an Adobe I/O App\n\nThis will always force a rebuild unless --no-force-build is set.\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"skip-static":{"name":"skip-static","type":"boolean","description":"[deprecated] Please use --no-web-assets","allowNo":false},"skip-web-assets":{"name":"skip-web-assets","type":"boolean","description":"[deprecated] Please use --no-web-assets","allowNo":false},"skip-actions":{"name":"skip-actions","type":"boolean","description":"[deprecated] Please use --no-actions","allowNo":false},"actions":{"name":"actions","type":"boolean","description":"[default: true] Build actions if any","allowNo":true},"action":{"name":"action","type":"option","char":"a","description":"Build only a specific action, the flags can be specified multiple times, this will set --no-publish"},"web-assets":{"name":"web-assets","type":"boolean","description":"[default: true] Build web-assets if any","allowNo":true},"force-build":{"name":"force-build","type":"boolean","description":"[default: true] Force a build even if one already exists","allowNo":true},"content-hash":{"name":"content-hash","type":"boolean","description":"[default: true] Enable content hashing in browser code","allowNo":true},"web-optimize":{"name":"web-optimize","type":"boolean","description":"[default: false] Enable optimization (minification) of js/css/html","allowNo":false},"extension":{"name":"extension","type":"option","char":"e","description":"Build only a specific extension point, the flags can be specified multiple times"}},"args":[]},"app:create":{"id":"app:create","description":"Create a new Adobe I/O App with default parameters\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"import":{"name":"import","type":"option","char":"i","description":"Import an Adobe I/O Developer Console configuration file"}},"args":[{"name":"path","description":"Path to the app directory","default":"."}]},"app:deploy":{"id":"app:deploy","description":"Build and deploy an Adobe I/O App\n\nThis will always force a rebuild unless --no-force-build is set.\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"skip-build":{"name":"skip-build","type":"boolean","description":"[deprecated] Please use --no-build","allowNo":false},"skip-deploy":{"name":"skip-deploy","type":"boolean","description":"[deprecated] Please use 'aio app build'","allowNo":false},"skip-static":{"name":"skip-static","type":"boolean","description":"[deprecated] Please use --no-web-assets","allowNo":false},"skip-web-assets":{"name":"skip-web-assets","type":"boolean","description":"[deprecated] Please use --no-web-assets","allowNo":false},"skip-actions":{"name":"skip-actions","type":"boolean","description":"[deprecated] Please use --no-actions","allowNo":false},"actions":{"name":"actions","type":"boolean","description":"[default: true] Deploy actions if any","allowNo":true},"action":{"name":"action","type":"option","char":"a","description":"Deploy only a specific action, the flags can be specified multiple times, this will set --no-publish"},"web-assets":{"name":"web-assets","type":"boolean","description":"[default: true] Deploy web-assets if any","allowNo":true},"build":{"name":"build","type":"boolean","description":"[default: true] Run the build phase before deployment","allowNo":true},"force-build":{"name":"force-build","type":"boolean","description":"[default: true] Force a build even if one already exists","allowNo":true},"content-hash":{"name":"content-hash","type":"boolean","description":"[default: true] Enable content hashing in browser code","allowNo":true},"open":{"name":"open","type":"boolean","description":"Open the default web browser after a successful deploy, only valid if your app has a front-end","allowNo":false},"extension":{"name":"extension","type":"option","char":"e","description":"Deploy only a specific extension, the flags can be specified multiple times"},"publish":{"name":"publish","type":"boolean","description":"[default: true] Publish extension(s) to Exchange","allowNo":true},"force-publish":{"name":"force-publish","type":"boolean","description":"Force publish extension(s) to Exchange, delete previously published extension points","allowNo":false},"web-optimize":{"name":"web-optimize","type":"boolean","description":"[default: false] Enable optimization (minification) of web js/css/html","allowNo":false}},"args":[]},"app:get-url":{"id":"app:get-url","description":"Get action URLs","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"cdn":{"name":"cdn","type":"boolean","description":"Display CDN based action URLs","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","description":"Output json","allowNo":false},"hson":{"name":"hson","type":"boolean","char":"h","description":"Output human readable json","allowNo":false},"yml":{"name":"yml","type":"boolean","char":"y","description":"Output yml","allowNo":false}},"args":[{"name":"action"}]},"app":{"id":"app","description":"Create, run, test, and deploy Adobe I/O Apps","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:info":{"id":"app:info","description":"Display settings/configuration in use by an Adobe I/O App\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","description":"Output json","allowNo":false},"hson":{"name":"hson","type":"boolean","char":"h","description":"Output human readable json","allowNo":false},"yml":{"name":"yml","type":"boolean","char":"y","description":"Output yml","allowNo":false},"mask":{"name":"mask","type":"boolean","description":"Hide known private info","allowNo":true}},"args":[]},"app:init":{"id":"app:init","description":"Create a new Adobe I/O App\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"skip-install":{"name":"skip-install","type":"boolean","char":"s","description":"[deprecated] Please use --no-install","allowNo":false},"install":{"name":"install","type":"boolean","description":"[default: true] Run npm installation after files are created","allowNo":true},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"import":{"name":"import","type":"option","char":"i","description":"Import an Adobe I/O Developer Console configuration file"},"login":{"name":"login","type":"boolean","description":"Login using your Adobe ID for interacting with Adobe I/O Developer Console","allowNo":true},"extensions":{"name":"extensions","type":"boolean","description":"Use --no-extensions to create a blank application that does not integrate with Exchange","allowNo":true},"extension":{"name":"extension","type":"option","char":"e","description":"Extension point(s) to implement"},"workspace":{"name":"workspace","type":"option","char":"w","description":"Specify the Adobe Developer Console Workspace to init from, defaults to Stage","default":"Stage"}},"args":[{"name":"path","description":"Path to the app directory","default":"."}]},"app:logs":{"id":"app:logs","description":"Fetch logs for an Adobe I/O App\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"limit":{"name":"limit","type":"option","char":"l","description":"Limit number of activations to fetch logs from ( 1-50 )","default":1},"action":{"name":"action","type":"option","char":"a","description":"Fetch logs for a specific action"},"strip":{"name":"strip","type":"boolean","char":"r","description":"strip timestamp information and output first line only","allowNo":false},"tail":{"name":"tail","type":"boolean","char":"t","description":"Fetch logs continuously","allowNo":false},"watch":{"name":"watch","type":"boolean","char":"w","description":"Fetch logs continuously","allowNo":false},"poll":{"name":"poll","type":"boolean","char":"o","description":"Fetch logs continuously","allowNo":false}},"args":[]},"app:run":{"id":"app:run","description":"Run an Adobe I/O App","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"local":{"name":"local","type":"boolean","description":"Run/debug actions locally ( requires Docker running )","allowNo":false},"serve":{"name":"serve","type":"boolean","description":"[default: true] Start frontend server (experimental)","allowNo":true},"skip-actions":{"name":"skip-actions","type":"boolean","description":"[deprecated] Please use --no-actions","allowNo":false},"actions":{"name":"actions","type":"boolean","description":"[default: true] Run actions, defaults to true, to skip actions use --no-actions","allowNo":true},"open":{"name":"open","type":"boolean","description":"Open the default web browser after a successful run, only valid if your app has a front-end","allowNo":false},"extension":{"name":"extension","type":"option","char":"e","description":"Run only a specific extension, this flag can only be specified once"}},"args":[]},"app:test":{"id":"app:test","description":"Run tests for an Adobe I/O App\nIf no flags are specified, by default only unit-tests are run.\n\nFor the --action flag, it tries a substring search on the 'package-name/action-name' pair for an action.\nFor the --extension flag, it tries a substring search on the 'extension-name' only.\nIf the extension has a hook called 'test' in its 'ext.config.yaml', the script specified will be run instead.\n\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"extension":{"name":"extension","type":"option","char":"e","description":"the extension(s) to test"},"action":{"name":"action","type":"option","char":"a","description":"the action(s) to test"},"all":{"name":"all","type":"boolean","description":"run both unit and e2e tests","allowNo":false},"e2e":{"name":"e2e","type":"boolean","description":"run e2e tests","allowNo":false},"unit":{"name":"unit","type":"boolean","description":"run unit tests","allowNo":false}},"args":[]},"app:undeploy":{"id":"app:undeploy","description":"Undeploys an Adobe I/O App\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"skip-static":{"name":"skip-static","type":"boolean","description":"[deprecated] Please use --no-web-assets","allowNo":false},"skip-web-assets":{"name":"skip-web-assets","type":"boolean","description":"[deprecated] Please use --no-web-assets","allowNo":false},"skip-actions":{"name":"skip-actions","type":"boolean","description":"[deprecated] Please use --no-actions","allowNo":false},"actions":{"name":"actions","type":"boolean","description":"[default: true] Undeploy actions if any","allowNo":true},"web-assets":{"name":"web-assets","type":"boolean","description":"[default: true] Undeploy web-assets if any","allowNo":true},"extension":{"name":"extension","type":"option","char":"e","description":"Undeploy only a specific extension, the flags can be specified multiple times"},"unpublish":{"name":"unpublish","type":"boolean","description":"[default: true] Unpublish selected extension(s) from Exchange","allowNo":true},"force-unpublish":{"name":"force-unpublish","type":"boolean","description":"Force unpublish extension(s) from Exchange, will delete all extension points","allowNo":false}},"args":[]},"app:use":{"id":"app:use","description":"Import an Adobe Developer Console configuration file.\n\nIf the optional configuration file is not set, this command will retrieve the console org, project, and workspace settings from the global config.\n\nTo set these global config values, see the help text for 'aio console --help'.\n\nTo download the configuration file for your project, select the 'Download' button in the toolbar of your project's page in https://console.adobe.io\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"overwrite":{"name":"overwrite","type":"boolean","description":"Overwrite any .aio and .env files during import of the Adobe Developer Console configuration file","allowNo":false},"merge":{"name":"merge","type":"boolean","description":"Merge any .aio and .env files during import of the Adobe Developer Console configuration file","allowNo":false},"global":{"name":"global","type":"boolean","char":"g","description":"Use the global Adobe Developer Console Org / Project / Workspace configuration, which can be set via `aio console` commands","allowNo":false},"workspace":{"name":"workspace","type":"option","char":"w","description":"Specify the Adobe Developer Console Workspace name to import the configuration from","default":""},"workspace-name":{"name":"workspace-name","type":"option","char":"w","description":"[DEPRECATED]: please use --workspace instead","default":""},"no-service-sync":{"name":"no-service-sync","type":"boolean","description":"Skip the Service sync prompt and do not attach current Service subscriptions to the new Workspace","allowNo":false},"confirm-service-sync":{"name":"confirm-service-sync","type":"boolean","description":"Skip the Service sync prompt and overwrite Service subscriptions in the new Workspace with current subscriptions","allowNo":false},"no-input":{"name":"no-input","type":"boolean","description":"Skip user prompts by setting --no-service-sync and --merge. Requires one of config_file_path or --global or --workspace","allowNo":false}},"args":[{"name":"config_file_path","description":"path to an Adobe I/O Developer Console configuration file","required":false}]},"app:add:action":{"id":"app:add:action","description":"Add new actions\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:add:actions"],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"extension":{"name":"extension","type":"option","char":"e","description":"Add actions to a specific extension"},"skip-install":{"name":"skip-install","type":"boolean","char":"s","description":"[deprecated] Please use --no-install","allowNo":false},"install":{"name":"install","type":"boolean","description":"[default: true] Run npm installation after files are created","allowNo":true},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:add:ci":{"id":"app:add:ci","description":"Add CI files\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:add:event":{"id":"app:add:event","description":"Add a new Adobe I/O Events action\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:add:events"],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"extension":{"name":"extension","type":"option","char":"e","description":"Add actions to a specific extension"},"skip-install":{"name":"skip-install","type":"boolean","char":"s","description":"[deprecated] Please use --no-install","allowNo":false},"install":{"name":"install","type":"boolean","description":"[default: true] Run npm installation after files are created","allowNo":true},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:add:extension":{"id":"app:add:extension","description":"Add new extensions or a standalone application to the project\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:add:ext","app:add:extensions"],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"extension":{"name":"extension","type":"option","char":"e","description":"Specify extensions to add, skips selection prompt"},"skip-install":{"name":"skip-install","type":"boolean","char":"s","description":"[deprecated] Please use --no-install","allowNo":false},"install":{"name":"install","type":"boolean","description":"[default: true] Run npm installation after files are created","allowNo":true},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:add":{"id":"app:add","description":"Add a new component to an existing Adobe I/O App","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:add:service":{"id":"app:add:service","description":"Subscribe to Services in the current Workspace\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:add:services"],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:add:web-assets":{"id":"app:add:web-assets","description":"Add web assets support\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"extension":{"name":"extension","type":"option","char":"e","description":"Add web-assets to a specific extension"},"skip-install":{"name":"skip-install","type":"boolean","char":"s","description":"[deprecated] Please use --no-install","allowNo":false},"install":{"name":"install","type":"boolean","description":"[default: true] Run npm installation after files are created","allowNo":true},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:delete:action":{"id":"app:delete:action","description":"Delete existing actions\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:delete:actions"],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[{"name":"action-name","description":"Action `pkg/name` to delete, you can specify multiple actions via a comma separated list","required":false,"default":""}]},"app:delete:ci":{"id":"app:delete:ci","description":"Delete existing CI files\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:delete:event":{"id":"app:delete:event","description":"Delete existing Adobe I/O Events actions\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:delete:events"],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[{"name":"event-action-name","description":"Action `pkg/name` to delete, you can specify multiple actions via a comma separated list","required":false}]},"app:delete:extension":{"id":"app:delete:extension","description":"Add new extensions or a standalone application to the project\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:delete:ext","app:delete:extensions"],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"skip-install":{"name":"skip-install","type":"boolean","description":"Skip npm installation after files are created","allowNo":false},"extension":{"name":"extension","type":"option","char":"e","description":"Specify extensions to delete, skips selection prompt"},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:delete":{"id":"app:delete","description":"Delete a component from an existing Adobe I/O App","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:delete:service":{"id":"app:delete:service","description":"Delete Services in the current Workspace\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:delete:services"],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:delete:web-assets":{"id":"app:delete:web-assets","description":"Delete existing web assets\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip questions, and use all default values","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]},"app:list:extension-points":{"id":"app:list:extension-points","description":"List all extension points for the selected org\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:list:ext-points","app:list:extension-points"],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","description":"Output json","allowNo":false},"yml":{"name":"yml","type":"boolean","char":"y","description":"Output yml","allowNo":false}},"args":[]},"app:list:extension":{"id":"app:list:extension","description":"List implemented extensions\n","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":["app:list:ext","app:list:extensions"],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","description":"Output json","allowNo":false},"yml":{"name":"yml","type":"boolean","char":"y","description":"Output yml","allowNo":false}},"args":[]},"app:list":{"id":"app:list","description":"List components for Adobe I/O App","pluginName":"@adobe/aio-cli-plugin-app","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"boolean","description":"Show version","allowNo":false}},"args":[]}}}
|
package/package.json
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2021 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
7
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
8
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
9
|
+
governing permissions and limitations under the License.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const BaseCommand = require('./BaseCommand')
|
|
13
|
+
const { flags } = require('@oclif/command')
|
|
14
|
+
const { installPackages } = require('./lib/app-helper')
|
|
15
|
+
|
|
16
|
+
class AddCommand extends BaseCommand {
|
|
17
|
+
async runInstallPackages (flags, spinner) {
|
|
18
|
+
const doInstall = flags.install && !flags['skip-install']
|
|
19
|
+
if (doInstall) {
|
|
20
|
+
await installPackages('.', { spinner, verbose: flags.verbose })
|
|
21
|
+
} else {
|
|
22
|
+
this.log('skipped installation, make sure to run \'npm install\' later on')
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
AddCommand.flags = {
|
|
28
|
+
'skip-install': flags.boolean({
|
|
29
|
+
description: '[deprecated] Please use --no-install',
|
|
30
|
+
char: 's',
|
|
31
|
+
default: false
|
|
32
|
+
}),
|
|
33
|
+
install: flags.boolean({
|
|
34
|
+
description: '[default: true] Run npm installation after files are created',
|
|
35
|
+
default: true,
|
|
36
|
+
allowNo: true
|
|
37
|
+
}),
|
|
38
|
+
...BaseCommand.flags
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
module.exports = AddCommand
|
package/src/BaseCommand.js
CHANGED
|
@@ -30,6 +30,15 @@ class BaseCommand extends Command {
|
|
|
30
30
|
// default error handler for app commands
|
|
31
31
|
async catch (error) {
|
|
32
32
|
aioLogger.error(error) // debug log
|
|
33
|
+
this.handleError(error)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
handleError (error) {
|
|
37
|
+
const errorMessages = ['no such file or directory', 'find configuration']
|
|
38
|
+
if (errorMessages.find(msg => error.message.includes(msg))) {
|
|
39
|
+
this.error(`Not a valid application root folder.
|
|
40
|
+
Please run 'aio app' commands from a folder generated by aio app init`)
|
|
41
|
+
}
|
|
33
42
|
this.error(error.message)
|
|
34
43
|
}
|
|
35
44
|
|
|
@@ -9,17 +9,17 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
9
9
|
governing permissions and limitations under the License.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const AddCommand = require('../../../AddCommand')
|
|
13
13
|
const yeoman = require('yeoman-environment')
|
|
14
14
|
const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:add:action', { provider: 'debug' })
|
|
15
15
|
const { flags } = require('@oclif/command')
|
|
16
16
|
const ora = require('ora')
|
|
17
17
|
const path = require('path')
|
|
18
18
|
const generators = require('@adobe/generator-aio-app')
|
|
19
|
-
const { servicesToGeneratorInput
|
|
19
|
+
const { servicesToGeneratorInput } = require('../../../lib/app-helper')
|
|
20
20
|
const aioConfigLoader = require('@adobe/aio-lib-core-config')
|
|
21
21
|
|
|
22
|
-
class AddActionCommand extends
|
|
22
|
+
class AddActionCommand extends AddCommand {
|
|
23
23
|
async run () {
|
|
24
24
|
const { flags } = this.parse(AddActionCommand)
|
|
25
25
|
|
|
@@ -53,17 +53,15 @@ class AddActionCommand extends BaseCommand {
|
|
|
53
53
|
'config-path': configData.file,
|
|
54
54
|
'adobe-services': servicesToGeneratorInput(workspaceServices),
|
|
55
55
|
'supported-adobe-services': servicesToGeneratorInput(supportedOrgServices),
|
|
56
|
-
'full-key-to-manifest': configData.key
|
|
57
|
-
// force: true
|
|
56
|
+
'full-key-to-manifest': configData.key,
|
|
57
|
+
// force: true,
|
|
58
|
+
// by default yeoman runs the install, we control installation from the app plugin
|
|
59
|
+
'skip-install': true
|
|
58
60
|
}
|
|
59
61
|
})
|
|
60
62
|
await env.runGenerator(addActionGen)
|
|
61
63
|
|
|
62
|
-
|
|
63
|
-
await installPackages('.', { spinner, verbose: flags.verbose })
|
|
64
|
-
} else {
|
|
65
|
-
this.log('--skip-install, make sure to run \'npm install\' later on')
|
|
66
|
-
}
|
|
64
|
+
await this.runInstallPackages(flags, spinner)
|
|
67
65
|
}
|
|
68
66
|
}
|
|
69
67
|
|
|
@@ -76,17 +74,13 @@ AddActionCommand.flags = {
|
|
|
76
74
|
default: false,
|
|
77
75
|
char: 'y'
|
|
78
76
|
}),
|
|
79
|
-
'skip-install': flags.boolean({
|
|
80
|
-
description: 'Skip npm installation after files are created',
|
|
81
|
-
default: false
|
|
82
|
-
}),
|
|
83
77
|
extension: flags.string({
|
|
84
78
|
description: 'Add actions to a specific extension',
|
|
85
79
|
char: 'e',
|
|
86
80
|
multiple: false,
|
|
87
81
|
parse: str => [str]
|
|
88
82
|
}),
|
|
89
|
-
...
|
|
83
|
+
...AddCommand.flags
|
|
90
84
|
}
|
|
91
85
|
|
|
92
86
|
AddActionCommand.aliases = ['app:add:actions']
|
|
@@ -21,7 +21,13 @@ class AddCICommand extends BaseCommand {
|
|
|
21
21
|
aioLogger.debug(`adding component ${args.component} to the project, using flags: ${flags}`)
|
|
22
22
|
|
|
23
23
|
const env = yeoman.createEnv()
|
|
24
|
-
const gen = env.instantiate(
|
|
24
|
+
const gen = env.instantiate(
|
|
25
|
+
generators['add-ci'], {
|
|
26
|
+
options: {
|
|
27
|
+
// by default yeoman runs the install, we control installation from the app plugin
|
|
28
|
+
'skip-install': true
|
|
29
|
+
}
|
|
30
|
+
})
|
|
25
31
|
await env.runGenerator(gen)
|
|
26
32
|
}
|
|
27
33
|
}
|
|
@@ -9,16 +9,15 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
9
9
|
governing permissions and limitations under the License.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const AddCommand = require('../../../AddCommand')
|
|
13
13
|
const yeoman = require('yeoman-environment')
|
|
14
14
|
const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:add:event', { provider: 'debug' })
|
|
15
15
|
const { flags } = require('@oclif/command')
|
|
16
|
-
const { installPackages } = require('../../../lib/app-helper')
|
|
17
16
|
const ora = require('ora')
|
|
18
17
|
const path = require('path')
|
|
19
18
|
const generators = require('@adobe/generator-aio-app')
|
|
20
19
|
|
|
21
|
-
class AddEventCommand extends
|
|
20
|
+
class AddEventCommand extends AddCommand {
|
|
22
21
|
async run () {
|
|
23
22
|
const { flags } = this.parse(AddEventCommand)
|
|
24
23
|
|
|
@@ -43,16 +42,14 @@ class AddEventCommand extends BaseCommand {
|
|
|
43
42
|
'config-path': configData.file,
|
|
44
43
|
'full-key-to-manifest': configData.key,
|
|
45
44
|
// force overwrites, no useless prompts, this is a feature exposed by yeoman itself
|
|
46
|
-
force: true
|
|
45
|
+
force: true,
|
|
46
|
+
// by default yeoman runs the install, we control installation from the app plugin
|
|
47
|
+
'skip-install': true
|
|
47
48
|
}
|
|
48
49
|
})
|
|
49
50
|
await env.runGenerator(eventsGen)
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
await installPackages('.', { spinner, verbose: flags.verbose })
|
|
53
|
-
} else {
|
|
54
|
-
this.log('--skip-install, make sure to run \'npm install\' later on')
|
|
55
|
-
}
|
|
52
|
+
await this.runInstallPackages(flags, spinner)
|
|
56
53
|
}
|
|
57
54
|
}
|
|
58
55
|
|
|
@@ -65,17 +62,13 @@ AddEventCommand.flags = {
|
|
|
65
62
|
default: false,
|
|
66
63
|
char: 'y'
|
|
67
64
|
}),
|
|
68
|
-
'skip-install': flags.boolean({
|
|
69
|
-
description: 'Skip npm installation after files are created',
|
|
70
|
-
default: false
|
|
71
|
-
}),
|
|
72
65
|
extension: flags.string({
|
|
73
66
|
description: 'Add actions to a specific extension',
|
|
74
67
|
char: 'e',
|
|
75
68
|
multiple: false,
|
|
76
69
|
parse: str => [str]
|
|
77
70
|
}),
|
|
78
|
-
...
|
|
71
|
+
...AddCommand.flags
|
|
79
72
|
}
|
|
80
73
|
|
|
81
74
|
AddEventCommand.aliases = ['app:add:events']
|
|
@@ -9,18 +9,18 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
9
9
|
governing permissions and limitations under the License.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const AddCommand = require('../../../AddCommand')
|
|
13
13
|
const yeoman = require('yeoman-environment')
|
|
14
14
|
const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:add:action', { provider: 'debug' })
|
|
15
15
|
const { flags } = require('@oclif/command')
|
|
16
16
|
const ora = require('ora')
|
|
17
17
|
|
|
18
|
-
const {
|
|
18
|
+
const { atLeastOne } = require('../../../lib/app-helper')
|
|
19
19
|
const aioConfigLoader = require('@adobe/aio-lib-core-config')
|
|
20
20
|
const { implPromptChoices } = require('../../../lib/defaults')
|
|
21
21
|
const chalk = require('chalk')
|
|
22
22
|
|
|
23
|
-
class AddExtensionCommand extends
|
|
23
|
+
class AddExtensionCommand extends AddCommand {
|
|
24
24
|
async run () {
|
|
25
25
|
const { flags } = this.parse(AddExtensionCommand)
|
|
26
26
|
|
|
@@ -36,11 +36,7 @@ class AddExtensionCommand extends BaseCommand {
|
|
|
36
36
|
|
|
37
37
|
await this.runCodeGenerators(flags, implementationsToAdd)
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
await installPackages('.', { spinner, verbose: flags.verbose })
|
|
41
|
-
} else {
|
|
42
|
-
this.log('--skip-install, make sure to run \'npm install\' later on')
|
|
43
|
-
}
|
|
39
|
+
await this.runInstallPackages(flags, spinner)
|
|
44
40
|
|
|
45
41
|
// warn about services to add
|
|
46
42
|
const workspaceServices =
|
|
@@ -101,7 +97,10 @@ class AddExtensionCommand extends BaseCommand {
|
|
|
101
97
|
{
|
|
102
98
|
options: {
|
|
103
99
|
'skip-prompt': flags.yes,
|
|
104
|
-
|
|
100
|
+
// no yeoman overwrite prompts
|
|
101
|
+
force: true,
|
|
102
|
+
// by default yeoman runs the install, we control installation from the app plugin
|
|
103
|
+
'skip-install': true
|
|
105
104
|
}
|
|
106
105
|
})
|
|
107
106
|
this.log(chalk.blue(chalk.bold(`Running generator for ${implementation.name}`)))
|
|
@@ -118,16 +117,12 @@ AddExtensionCommand.flags = {
|
|
|
118
117
|
default: false,
|
|
119
118
|
char: 'y'
|
|
120
119
|
}),
|
|
121
|
-
'skip-install': flags.boolean({
|
|
122
|
-
description: 'Skip npm installation after files are created',
|
|
123
|
-
default: false
|
|
124
|
-
}),
|
|
125
120
|
extension: flags.string({
|
|
126
121
|
description: 'Specify extensions to add, skips selection prompt',
|
|
127
122
|
char: 'e',
|
|
128
123
|
multiple: true
|
|
129
124
|
}),
|
|
130
|
-
...
|
|
125
|
+
...AddCommand.flags
|
|
131
126
|
}
|
|
132
127
|
|
|
133
128
|
AddExtensionCommand.aliases = ['app:add:ext', 'app:add:extensions']
|
|
@@ -9,16 +9,16 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
9
9
|
governing permissions and limitations under the License.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const AddCommand = require('../../../AddCommand')
|
|
13
13
|
const yeoman = require('yeoman-environment')
|
|
14
14
|
const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:add:web-assets', { provider: 'debug' })
|
|
15
15
|
const { flags } = require('@oclif/command')
|
|
16
16
|
const ora = require('ora')
|
|
17
17
|
const generators = require('@adobe/generator-aio-app')
|
|
18
18
|
const aioConfigLoader = require('@adobe/aio-lib-core-config')
|
|
19
|
-
const {
|
|
19
|
+
const { servicesToGeneratorInput } = require('../../../lib/app-helper')
|
|
20
20
|
|
|
21
|
-
class AddWebAssetsCommand extends
|
|
21
|
+
class AddWebAssetsCommand extends AddCommand {
|
|
22
22
|
async run () {
|
|
23
23
|
const { flags } = this.parse(AddWebAssetsCommand)
|
|
24
24
|
const spinner = ora()
|
|
@@ -44,17 +44,15 @@ class AddWebAssetsCommand extends BaseCommand {
|
|
|
44
44
|
'skip-prompt': flags.yes,
|
|
45
45
|
'project-name': projectName,
|
|
46
46
|
'web-src-folder': webSrcFolder,
|
|
47
|
-
'adobe-services': servicesToGeneratorInput(workspaceServices)
|
|
48
|
-
// force: true
|
|
47
|
+
'adobe-services': servicesToGeneratorInput(workspaceServices),
|
|
48
|
+
// force: true,
|
|
49
|
+
// by default yeoman runs the install, we control installation from the app plugin
|
|
50
|
+
'skip-install': true
|
|
49
51
|
}
|
|
50
52
|
})
|
|
51
53
|
await env.runGenerator(gen)
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
await installPackages('.', { spinner, verbose: flags.verbose })
|
|
55
|
-
} else {
|
|
56
|
-
this.log('--skip-install, make sure to run \'npm install\' later on')
|
|
57
|
-
}
|
|
55
|
+
await this.runInstallPackages(flags, spinner)
|
|
58
56
|
}
|
|
59
57
|
}
|
|
60
58
|
|
|
@@ -67,17 +65,13 @@ AddWebAssetsCommand.flags = {
|
|
|
67
65
|
default: false,
|
|
68
66
|
char: 'y'
|
|
69
67
|
}),
|
|
70
|
-
'skip-install': flags.boolean({
|
|
71
|
-
description: 'Skip npm installation after files are created',
|
|
72
|
-
default: false
|
|
73
|
-
}),
|
|
74
68
|
extension: flags.string({
|
|
75
69
|
description: 'Add web-assets to a specific extension',
|
|
76
70
|
char: 'e',
|
|
77
71
|
multiple: false,
|
|
78
72
|
parse: str => [str]
|
|
79
73
|
}),
|
|
80
|
-
...
|
|
74
|
+
...AddCommand.flags
|
|
81
75
|
}
|
|
82
76
|
|
|
83
77
|
AddWebAssetsCommand.args = []
|
|
@@ -78,7 +78,7 @@ class Build extends BaseCommand {
|
|
|
78
78
|
aioLogger.debug(`run hook for 'build-actions' for actions in '${name}' returned ${script}`)
|
|
79
79
|
spinner.start(`Building actions for '${name}'`)
|
|
80
80
|
if (!script) {
|
|
81
|
-
builtList = await RuntimeLib.buildActions(config, filterActions)
|
|
81
|
+
builtList = await RuntimeLib.buildActions(config, filterActions, true)
|
|
82
82
|
}
|
|
83
83
|
if (builtList.length > 0) {
|
|
84
84
|
spinner.succeed(chalk.green(`Built ${builtList.length} action(s) for '${name}'`))
|
|
@@ -87,7 +87,7 @@ class DeleteActionCommand extends BaseCommand {
|
|
|
87
87
|
// NOTE: (attempt) to delete test files. The test file must match the action name
|
|
88
88
|
// file in the same folder, which is true in most cases, but won't work for asset compute action tests for example.
|
|
89
89
|
try {
|
|
90
|
-
const pathToE2eTests = path.join(action.e2eTestsDir, action.actionName + '.e2e.js')
|
|
90
|
+
const pathToE2eTests = path.join(action.e2eTestsDir, action.actionName + '.e2e.test.js')
|
|
91
91
|
const pathToUnitTests = path.join(action.unitTestsDir, action.actionName + '.test.js')
|
|
92
92
|
fs.removeSync(pathToE2eTests)
|
|
93
93
|
aioLogger.debug(`deleted '${pathToE2eTests}'`)
|
|
@@ -24,7 +24,9 @@ class DeleteCICommand extends BaseCommand {
|
|
|
24
24
|
const env = yeoman.createEnv()
|
|
25
25
|
const gen = env.instantiate(generators['delete-ci'], {
|
|
26
26
|
options: {
|
|
27
|
-
'skip-prompt': flags.yes
|
|
27
|
+
'skip-prompt': flags.yes,
|
|
28
|
+
// by default yeoman runs the install, we control installation from the app plugin
|
|
29
|
+
'skip-install': true
|
|
28
30
|
}
|
|
29
31
|
})
|
|
30
32
|
await env.runGenerator(gen)
|
package/src/commands/app/init.js
CHANGED
|
@@ -9,7 +9,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
9
9
|
governing permissions and limitations under the License.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const AddCommand = require('../../AddCommand')
|
|
13
13
|
const yeoman = require('yeoman-environment')
|
|
14
14
|
const path = require('path')
|
|
15
15
|
const fs = require('fs-extra')
|
|
@@ -20,14 +20,14 @@ const { flags } = require('@oclif/command')
|
|
|
20
20
|
const generators = require('@adobe/generator-aio-app')
|
|
21
21
|
|
|
22
22
|
const { loadAndValidateConfigFile, importConfigJson } = require('../../lib/import')
|
|
23
|
-
const {
|
|
23
|
+
const { atLeastOne } = require('../../lib/app-helper')
|
|
24
24
|
|
|
25
25
|
const { ENTP_INT_CERTS_FOLDER, SERVICE_API_KEY_ENV, implPromptChoices } = require('../../lib/defaults')
|
|
26
26
|
const cloneDeep = require('lodash.clonedeep')
|
|
27
27
|
|
|
28
28
|
const DEFAULT_WORKSPACE = 'Stage'
|
|
29
29
|
|
|
30
|
-
class InitCommand extends
|
|
30
|
+
class InitCommand extends AddCommand {
|
|
31
31
|
async run () {
|
|
32
32
|
const { args, flags } = this.parse(InitCommand)
|
|
33
33
|
|
|
@@ -56,11 +56,7 @@ class InitCommand extends BaseCommand {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
// install packages, always at the end, so user can ctrl+c
|
|
59
|
-
|
|
60
|
-
await installPackages('.', { spinner, verbose: flags.verbose })
|
|
61
|
-
} else {
|
|
62
|
-
this.log('--skip-install, make sure to run \'npm install\' later on')
|
|
63
|
-
}
|
|
59
|
+
await this.runInstallPackages(flags, spinner)
|
|
64
60
|
|
|
65
61
|
this.log(chalk.bold(chalk.green('✔ App initialization finished!')))
|
|
66
62
|
this.log('> Tip: you can add more actions, web-assets and events to your project via the `aio app add` commands')
|
|
@@ -143,7 +139,7 @@ class InitCommand extends BaseCommand {
|
|
|
143
139
|
}
|
|
144
140
|
return extList
|
|
145
141
|
} else {
|
|
146
|
-
const choices = cloneDeep(implPromptChoices)
|
|
142
|
+
const choices = cloneDeep(implPromptChoices)
|
|
147
143
|
|
|
148
144
|
// disable extensions that lack required services
|
|
149
145
|
if (orgSupportedServices) {
|
|
@@ -245,14 +241,19 @@ class InitCommand extends BaseCommand {
|
|
|
245
241
|
|
|
246
242
|
async runCodeGenerators (flags, extensionPoints, projectName) {
|
|
247
243
|
let env = yeoman.createEnv()
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
244
|
+
const initialGenerators = ['base-app', 'add-ci']
|
|
245
|
+
// first run app generator that will generate the root skeleton + ci
|
|
246
|
+
for (const generatorKey of initialGenerators) {
|
|
247
|
+
const appGen = env.instantiate(generators[generatorKey], {
|
|
248
|
+
options: {
|
|
249
|
+
'skip-prompt': flags.yes,
|
|
250
|
+
'project-name': projectName,
|
|
251
|
+
// by default yeoman runs the install, we control installation from the app plugin
|
|
252
|
+
'skip-install': true
|
|
253
|
+
}
|
|
254
|
+
})
|
|
255
|
+
await env.runGenerator(appGen)
|
|
256
|
+
}
|
|
256
257
|
|
|
257
258
|
// Creating new Yeoman env here to workaround an issue where yeoman reuses the conflicter from previous environment.
|
|
258
259
|
// https://github.com/yeoman/environment/issues/324
|
|
@@ -266,7 +267,9 @@ class InitCommand extends BaseCommand {
|
|
|
266
267
|
options: {
|
|
267
268
|
'skip-prompt': flags.yes,
|
|
268
269
|
// do not prompt for overwrites
|
|
269
|
-
force: true
|
|
270
|
+
force: true,
|
|
271
|
+
// by default yeoman runs the install, we control installation from the app plugin
|
|
272
|
+
'skip-install': true
|
|
270
273
|
}
|
|
271
274
|
})
|
|
272
275
|
await env.runGenerator(extGen)
|
|
@@ -295,17 +298,12 @@ InitCommand.description = `Create a new Adobe I/O App
|
|
|
295
298
|
`
|
|
296
299
|
|
|
297
300
|
InitCommand.flags = {
|
|
298
|
-
...
|
|
301
|
+
...AddCommand.flags,
|
|
299
302
|
yes: flags.boolean({
|
|
300
303
|
description: 'Skip questions, and use all default values',
|
|
301
304
|
default: false,
|
|
302
305
|
char: 'y'
|
|
303
306
|
}),
|
|
304
|
-
'skip-install': flags.boolean({
|
|
305
|
-
description: 'Skip npm installation after files are created',
|
|
306
|
-
char: 's',
|
|
307
|
-
default: false
|
|
308
|
-
}),
|
|
309
307
|
import: flags.string({
|
|
310
308
|
description: 'Import an Adobe I/O Developer Console configuration file',
|
|
311
309
|
char: 'i'
|
|
@@ -9,7 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
|
|
|
9
9
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
10
|
governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
const upath = require('upath')
|
|
13
13
|
const chokidar = require('chokidar')
|
|
14
14
|
const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:actions-watcher', { provider: 'debug' })
|
|
15
15
|
const buildActions = require('./build-actions')
|
|
@@ -58,12 +58,13 @@ module.exports = async (watcherOptions) => {
|
|
|
58
58
|
* Builds and deploy the app.
|
|
59
59
|
*
|
|
60
60
|
* @param {WatcherOptions} watcherOptions the options for the watcher
|
|
61
|
+
* @param {Array<string>} filterActions add filters to deploy only specified OpenWhisk actions
|
|
61
62
|
*/
|
|
62
|
-
async function buildAndDeploy (watcherOptions) {
|
|
63
|
+
async function buildAndDeploy (watcherOptions, filterActions) {
|
|
63
64
|
const { config, isLocal, log } = watcherOptions
|
|
64
65
|
|
|
65
|
-
await buildActions(config)
|
|
66
|
-
await deployActions(config, isLocal, log)
|
|
66
|
+
await buildActions(config, filterActions)
|
|
67
|
+
await deployActions(config, isLocal, log, filterActions)
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
/**
|
|
@@ -75,30 +76,57 @@ async function buildAndDeploy (watcherOptions) {
|
|
|
75
76
|
function createChangeHandler (watcherOptions) {
|
|
76
77
|
const { watcher, log } = watcherOptions
|
|
77
78
|
|
|
78
|
-
let
|
|
79
|
-
let
|
|
79
|
+
let deploymentInProgress = false
|
|
80
|
+
let fileChanged = false
|
|
81
|
+
let undeployedFile = ''
|
|
80
82
|
|
|
81
83
|
return async (filePath) => {
|
|
82
|
-
if (
|
|
84
|
+
if (deploymentInProgress) {
|
|
83
85
|
aioLogger.debug(`${filePath} has changed. Deploy in progress. This change will be deployed after completion of current deployment.`)
|
|
84
|
-
|
|
86
|
+
undeployedFile = filePath
|
|
87
|
+
fileChanged = true
|
|
85
88
|
return
|
|
86
89
|
}
|
|
87
|
-
|
|
90
|
+
deploymentInProgress = true
|
|
88
91
|
try {
|
|
89
92
|
aioLogger.debug(`${filePath} has changed. Redeploying actions.`)
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
const filterActions = getActionNameFromPath(filePath, watcherOptions)
|
|
94
|
+
await buildAndDeploy(watcherOptions, filterActions)
|
|
95
|
+
aioLogger.debug('Deployment successful')
|
|
92
96
|
} catch (err) {
|
|
93
97
|
log(' -> Error encountered while deploying actions. Stopping auto refresh.')
|
|
94
98
|
aioLogger.debug(err)
|
|
95
99
|
await watcher.close()
|
|
96
100
|
}
|
|
97
|
-
if (
|
|
101
|
+
if (fileChanged) {
|
|
98
102
|
aioLogger.debug('Code changed during deployment. Triggering deploy again.')
|
|
99
|
-
|
|
100
|
-
await createChangeHandler(watcherOptions)(
|
|
103
|
+
fileChanged = deploymentInProgress = false
|
|
104
|
+
await createChangeHandler(watcherOptions)(undeployedFile)
|
|
101
105
|
}
|
|
102
|
-
|
|
106
|
+
deploymentInProgress = false
|
|
103
107
|
}
|
|
104
108
|
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Util function which returns the actionName from the filePath.
|
|
112
|
+
*
|
|
113
|
+
* @param {string} filePath path of the file
|
|
114
|
+
* @param {WatcherOptions} watcherOptions the options for the watcher
|
|
115
|
+
* @returns {Array<string>} All of the actions which match the modified path
|
|
116
|
+
*/
|
|
117
|
+
function getActionNameFromPath (filePath, watcherOptions) {
|
|
118
|
+
const actionNames = []
|
|
119
|
+
const unixFilePath = upath.toUnix(filePath)
|
|
120
|
+
const { config } = watcherOptions
|
|
121
|
+
Object.entries(config.manifest.full.packages).forEach(([, pkg]) => {
|
|
122
|
+
if (pkg.actions) {
|
|
123
|
+
Object.entries(pkg.actions).forEach(([actionName, action]) => {
|
|
124
|
+
const unixActionFunction = upath.toUnix(action.function)
|
|
125
|
+
if (unixActionFunction.includes(unixFilePath)) {
|
|
126
|
+
actionNames.push(actionName)
|
|
127
|
+
}
|
|
128
|
+
})
|
|
129
|
+
}
|
|
130
|
+
})
|
|
131
|
+
return actionNames
|
|
132
|
+
}
|
package/src/lib/build-actions.js
CHANGED
|
@@ -17,12 +17,13 @@ const { buildActions } = require('@adobe/aio-lib-runtime')
|
|
|
17
17
|
* Builds actions.
|
|
18
18
|
*
|
|
19
19
|
* @param {object} config see src/lib/config-loader.js
|
|
20
|
+
* @param {Array<string>} filterActions add filters to deploy only specified OpenWhisk actions
|
|
20
21
|
*/
|
|
21
|
-
module.exports = async (config) => {
|
|
22
|
+
module.exports = async (config, filterActions) => {
|
|
22
23
|
utils.runScript(config.hooks['pre-app-build'])
|
|
23
24
|
const script = await utils.runScript(config.hooks['build-actions'])
|
|
24
25
|
if (!script) {
|
|
25
|
-
await buildActions(config)
|
|
26
|
+
await buildActions(config, filterActions)
|
|
26
27
|
}
|
|
27
28
|
utils.runScript(config.hooks['post-app-build'])
|
|
28
29
|
}
|
|
@@ -19,13 +19,20 @@ const { deployActions } = require('@adobe/aio-lib-runtime')
|
|
|
19
19
|
* @param {object} config see src/lib/config-loader.js
|
|
20
20
|
* @param {boolean} isLocal=false set to true if it's a local deploy
|
|
21
21
|
* @param {Function} [log] a log function
|
|
22
|
+
* @param {boolean} filter true if a filter by built actions is desired.
|
|
22
23
|
*/
|
|
23
24
|
/** @private */
|
|
24
|
-
module.exports = async (config, isLocal = false, log = () => {}) => {
|
|
25
|
+
module.exports = async (config, isLocal = false, log = () => {}, filter = false) => {
|
|
25
26
|
utils.runScript(config.hooks['pre-app-deploy'])
|
|
26
27
|
const script = await utils.runScript(config.hooks['deploy-actions'])
|
|
27
28
|
if (!script) {
|
|
28
|
-
const
|
|
29
|
+
const deployConfig = {
|
|
30
|
+
isLocalDev: isLocal,
|
|
31
|
+
filterEntities: {
|
|
32
|
+
byBuiltActions: filter
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const entities = await deployActions(config, deployConfig, log)
|
|
29
36
|
if (entities.actions) {
|
|
30
37
|
const web = entities.actions.filter(utils.createWebExportFilter(true))
|
|
31
38
|
const nonWeb = entities.actions.filter(utils.createWebExportFilter(false))
|
package/src/lib/run-dev.js
CHANGED
|
@@ -122,7 +122,7 @@ async function runDev (config, dataDir, options = {}, log = () => {}) {
|
|
|
122
122
|
// Deploy Phase - deploy actions
|
|
123
123
|
if (withBackend) {
|
|
124
124
|
log('redeploying actions..')
|
|
125
|
-
await deployActions(devConfig, isLocal, log)
|
|
125
|
+
await deployActions(devConfig, isLocal, log, true)
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
// Deploy Phase - serve the web UI
|
package/src/lib/vscode.js
CHANGED
|
@@ -47,7 +47,9 @@ function update (config) {
|
|
|
47
47
|
'app-config': config,
|
|
48
48
|
'env-file': config.envFile,
|
|
49
49
|
'frontend-url': props.frontEndUrl,
|
|
50
|
-
'skip-prompt': true
|
|
50
|
+
'skip-prompt': true,
|
|
51
|
+
// by default yeoman runs the install, we control installation from the app plugin
|
|
52
|
+
'skip-install': true
|
|
51
53
|
}
|
|
52
54
|
})
|
|
53
55
|
await env.runGenerator(gen)
|