@adobe/aio-cli-plugin-app 10.7.1 → 11.0.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 +36 -64
- package/oclif.manifest.json +3 -66
- package/package.json +6 -5
- package/src/commands/app/add/event.js +13 -35
- package/src/commands/app/deploy.js +12 -22
- package/src/commands/app/pack.js +64 -19
- package/src/commands/app/undeploy.js +4 -13
- package/src/commands/app/delete/event.js +0 -67
package/README.md
CHANGED
|
@@ -39,7 +39,6 @@ $ aio app --help
|
|
|
39
39
|
* [`aio app delete`](#aio-app-delete)
|
|
40
40
|
* [`aio app delete action [ACTION-NAME]`](#aio-app-delete-action-action-name)
|
|
41
41
|
* [`aio app delete ci`](#aio-app-delete-ci)
|
|
42
|
-
* [`aio app delete event [EVENT-ACTION-NAME]`](#aio-app-delete-event-event-action-name)
|
|
43
42
|
* [`aio app delete extension`](#aio-app-delete-extension)
|
|
44
43
|
* [`aio app delete service`](#aio-app-delete-service)
|
|
45
44
|
* [`aio app delete web-assets`](#aio-app-delete-web-assets)
|
|
@@ -71,7 +70,7 @@ DESCRIPTION
|
|
|
71
70
|
Create, run, test, and deploy Adobe I/O Apps
|
|
72
71
|
```
|
|
73
72
|
|
|
74
|
-
_See code: [src/commands/app/index.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
73
|
+
_See code: [src/commands/app/index.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/index.ts)_
|
|
75
74
|
|
|
76
75
|
## `aio app add`
|
|
77
76
|
|
|
@@ -89,7 +88,7 @@ DESCRIPTION
|
|
|
89
88
|
Add a new component to an existing Adobe I/O App
|
|
90
89
|
```
|
|
91
90
|
|
|
92
|
-
_See code: [src/commands/app/add/index.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
91
|
+
_See code: [src/commands/app/add/index.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/add/index.ts)_
|
|
93
92
|
|
|
94
93
|
## `aio app add action`
|
|
95
94
|
|
|
@@ -114,7 +113,7 @@ ALIASES
|
|
|
114
113
|
$ aio app add actions
|
|
115
114
|
```
|
|
116
115
|
|
|
117
|
-
_See code: [src/commands/app/add/action.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
116
|
+
_See code: [src/commands/app/add/action.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/add/action.ts)_
|
|
118
117
|
|
|
119
118
|
## `aio app add ci`
|
|
120
119
|
|
|
@@ -132,7 +131,7 @@ DESCRIPTION
|
|
|
132
131
|
Add CI files
|
|
133
132
|
```
|
|
134
133
|
|
|
135
|
-
_See code: [src/commands/app/add/ci.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
134
|
+
_See code: [src/commands/app/add/ci.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/add/ci.ts)_
|
|
136
135
|
|
|
137
136
|
## `aio app add event`
|
|
138
137
|
|
|
@@ -140,16 +139,14 @@ Add a new Adobe I/O Events action
|
|
|
140
139
|
|
|
141
140
|
```
|
|
142
141
|
USAGE
|
|
143
|
-
$ aio app add event [-v] [--version] [--install] [-y] [-e <value>]
|
|
142
|
+
$ aio app add event [-v] [--version] [--install] [-y] [-e <value>]
|
|
144
143
|
|
|
145
144
|
FLAGS
|
|
146
|
-
-e, --extension=<value>
|
|
147
|
-
-v, --verbose
|
|
148
|
-
-y, --yes
|
|
149
|
-
--
|
|
150
|
-
|
|
151
|
-
--[no-]install [default: true] Run npm installation after files are created
|
|
152
|
-
--version Show version
|
|
145
|
+
-e, --extension=<value> Add events to a specific extension
|
|
146
|
+
-v, --verbose Verbose output
|
|
147
|
+
-y, --yes Skip questions, and use all default values
|
|
148
|
+
--[no-]install [default: true] Run npm installation after files are created
|
|
149
|
+
--version Show version
|
|
153
150
|
|
|
154
151
|
DESCRIPTION
|
|
155
152
|
Add a new Adobe I/O Events action
|
|
@@ -159,7 +156,7 @@ ALIASES
|
|
|
159
156
|
$ aio app add events
|
|
160
157
|
```
|
|
161
158
|
|
|
162
|
-
_See code: [src/commands/app/add/event.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
159
|
+
_See code: [src/commands/app/add/event.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/add/event.ts)_
|
|
163
160
|
|
|
164
161
|
## `aio app add extension`
|
|
165
162
|
|
|
@@ -185,7 +182,7 @@ ALIASES
|
|
|
185
182
|
$ aio app add extensions
|
|
186
183
|
```
|
|
187
184
|
|
|
188
|
-
_See code: [src/commands/app/add/extension.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
185
|
+
_See code: [src/commands/app/add/extension.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/add/extension.ts)_
|
|
189
186
|
|
|
190
187
|
## `aio app add service`
|
|
191
188
|
|
|
@@ -209,7 +206,7 @@ ALIASES
|
|
|
209
206
|
$ aio app add services
|
|
210
207
|
```
|
|
211
208
|
|
|
212
|
-
_See code: [src/commands/app/add/service.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
209
|
+
_See code: [src/commands/app/add/service.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/add/service.ts)_
|
|
213
210
|
|
|
214
211
|
## `aio app add web-assets`
|
|
215
212
|
|
|
@@ -230,7 +227,7 @@ DESCRIPTION
|
|
|
230
227
|
Add web assets support
|
|
231
228
|
```
|
|
232
229
|
|
|
233
|
-
_See code: [src/commands/app/add/web-assets.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
230
|
+
_See code: [src/commands/app/add/web-assets.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/add/web-assets.ts)_
|
|
234
231
|
|
|
235
232
|
## `aio app build`
|
|
236
233
|
|
|
@@ -259,7 +256,7 @@ DESCRIPTION
|
|
|
259
256
|
This will always force a rebuild unless --no-force-build is set.
|
|
260
257
|
```
|
|
261
258
|
|
|
262
|
-
_See code: [src/commands/app/build.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
259
|
+
_See code: [src/commands/app/build.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/build.ts)_
|
|
263
260
|
|
|
264
261
|
## `aio app create [PATH]`
|
|
265
262
|
|
|
@@ -281,7 +278,7 @@ DESCRIPTION
|
|
|
281
278
|
Create a new Adobe I/O App with default parameters
|
|
282
279
|
```
|
|
283
280
|
|
|
284
|
-
_See code: [src/commands/app/create.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
281
|
+
_See code: [src/commands/app/create.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/create.ts)_
|
|
285
282
|
|
|
286
283
|
## `aio app delete`
|
|
287
284
|
|
|
@@ -299,7 +296,7 @@ DESCRIPTION
|
|
|
299
296
|
Delete a component from an existing Adobe I/O App
|
|
300
297
|
```
|
|
301
298
|
|
|
302
|
-
_See code: [src/commands/app/delete/index.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
299
|
+
_See code: [src/commands/app/delete/index.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/delete/index.ts)_
|
|
303
300
|
|
|
304
301
|
## `aio app delete action [ACTION-NAME]`
|
|
305
302
|
|
|
@@ -325,7 +322,7 @@ ALIASES
|
|
|
325
322
|
$ aio app delete actions
|
|
326
323
|
```
|
|
327
324
|
|
|
328
|
-
_See code: [src/commands/app/delete/action.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
325
|
+
_See code: [src/commands/app/delete/action.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/delete/action.ts)_
|
|
329
326
|
|
|
330
327
|
## `aio app delete ci`
|
|
331
328
|
|
|
@@ -344,33 +341,7 @@ DESCRIPTION
|
|
|
344
341
|
Delete existing CI files
|
|
345
342
|
```
|
|
346
343
|
|
|
347
|
-
_See code: [src/commands/app/delete/ci.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
348
|
-
|
|
349
|
-
## `aio app delete event [EVENT-ACTION-NAME]`
|
|
350
|
-
|
|
351
|
-
Delete existing Adobe I/O Events actions
|
|
352
|
-
|
|
353
|
-
```
|
|
354
|
-
USAGE
|
|
355
|
-
$ aio app delete event [EVENT-ACTION-NAME] [-v] [--version] [-y]
|
|
356
|
-
|
|
357
|
-
ARGUMENTS
|
|
358
|
-
EVENT-ACTION-NAME Action `pkg/name` to delete, you can specify multiple actions via a comma separated list
|
|
359
|
-
|
|
360
|
-
FLAGS
|
|
361
|
-
-v, --verbose Verbose output
|
|
362
|
-
-y, --yes Skip questions, and use all default values
|
|
363
|
-
--version Show version
|
|
364
|
-
|
|
365
|
-
DESCRIPTION
|
|
366
|
-
Delete existing Adobe I/O Events actions
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
ALIASES
|
|
370
|
-
$ aio app delete events
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
_See code: [src/commands/app/delete/event.ts](https://github.com/adobe/aio-cli-plugin-app/blob/10.7.1/src/commands/app/delete/event.ts)_
|
|
344
|
+
_See code: [src/commands/app/delete/ci.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/delete/ci.ts)_
|
|
374
345
|
|
|
375
346
|
## `aio app delete extension`
|
|
376
347
|
|
|
@@ -396,7 +367,7 @@ ALIASES
|
|
|
396
367
|
$ aio app delete extensions
|
|
397
368
|
```
|
|
398
369
|
|
|
399
|
-
_See code: [src/commands/app/delete/extension.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
370
|
+
_See code: [src/commands/app/delete/extension.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/delete/extension.ts)_
|
|
400
371
|
|
|
401
372
|
## `aio app delete service`
|
|
402
373
|
|
|
@@ -420,7 +391,7 @@ ALIASES
|
|
|
420
391
|
$ aio app delete services
|
|
421
392
|
```
|
|
422
393
|
|
|
423
|
-
_See code: [src/commands/app/delete/service.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
394
|
+
_See code: [src/commands/app/delete/service.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/delete/service.ts)_
|
|
424
395
|
|
|
425
396
|
## `aio app delete web-assets`
|
|
426
397
|
|
|
@@ -439,7 +410,7 @@ DESCRIPTION
|
|
|
439
410
|
Delete existing web assets
|
|
440
411
|
```
|
|
441
412
|
|
|
442
|
-
_See code: [src/commands/app/delete/web-assets.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
413
|
+
_See code: [src/commands/app/delete/web-assets.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/delete/web-assets.ts)_
|
|
443
414
|
|
|
444
415
|
## `aio app deploy`
|
|
445
416
|
|
|
@@ -449,7 +420,7 @@ Build and deploy an Adobe I/O App
|
|
|
449
420
|
USAGE
|
|
450
421
|
$ aio app deploy [-v] [--version] [--actions | -a <value>] [--web-assets] [--force-build | ] [--content-hash]
|
|
451
422
|
[--web-optimize] [-e <value> | ] [--build] [--open] [--force-deploy] [--force-publish | | --publish]
|
|
452
|
-
[--force-events ] [--log-forwarding-update]
|
|
423
|
+
[--force-events | | ] [--log-forwarding-update]
|
|
453
424
|
|
|
454
425
|
FLAGS
|
|
455
426
|
-a, --action=<value>... Deploy only a specific action, the flags can be specified multiple times, this will set
|
|
@@ -462,7 +433,8 @@ FLAGS
|
|
|
462
433
|
--[no-]force-build [default: true] Force a build even if one already exists
|
|
463
434
|
--force-deploy [default: false] Force deploy changes, regardless of production Workspace being
|
|
464
435
|
published in Exchange.
|
|
465
|
-
--[no-]force-events [default: false] Force event registrations and
|
|
436
|
+
--[no-]force-events [default: false] Force event registrations and delete any registrations not part of the
|
|
437
|
+
config file
|
|
466
438
|
--force-publish [default: false] Force publish extension(s) to Exchange, delete previously published
|
|
467
439
|
extension points
|
|
468
440
|
--[no-]log-forwarding-update [default: true] Update log forwarding configuration on server
|
|
@@ -479,7 +451,7 @@ DESCRIPTION
|
|
|
479
451
|
This will always force a rebuild unless --no-force-build is set.
|
|
480
452
|
```
|
|
481
453
|
|
|
482
|
-
_See code: [src/commands/app/deploy.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
454
|
+
_See code: [src/commands/app/deploy.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/deploy.ts)_
|
|
483
455
|
|
|
484
456
|
## `aio app get-url [ACTION]`
|
|
485
457
|
|
|
@@ -502,7 +474,7 @@ DESCRIPTION
|
|
|
502
474
|
Get action URLs
|
|
503
475
|
```
|
|
504
476
|
|
|
505
|
-
_See code: [src/commands/app/get-url.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
477
|
+
_See code: [src/commands/app/get-url.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/get-url.ts)_
|
|
506
478
|
|
|
507
479
|
## `aio app info`
|
|
508
480
|
|
|
@@ -524,7 +496,7 @@ DESCRIPTION
|
|
|
524
496
|
Display settings/configuration in use by an Adobe I/O App
|
|
525
497
|
```
|
|
526
498
|
|
|
527
|
-
_See code: [src/commands/app/info.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
499
|
+
_See code: [src/commands/app/info.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/info.ts)_
|
|
528
500
|
|
|
529
501
|
## `aio app init [PATH]`
|
|
530
502
|
|
|
@@ -558,7 +530,7 @@ DESCRIPTION
|
|
|
558
530
|
Create a new Adobe I/O App
|
|
559
531
|
```
|
|
560
532
|
|
|
561
|
-
_See code: [src/commands/app/init.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
533
|
+
_See code: [src/commands/app/init.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/init.ts)_
|
|
562
534
|
|
|
563
535
|
## `aio app list`
|
|
564
536
|
|
|
@@ -576,7 +548,7 @@ DESCRIPTION
|
|
|
576
548
|
List components for Adobe I/O App
|
|
577
549
|
```
|
|
578
550
|
|
|
579
|
-
_See code: [src/commands/app/list/index.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
551
|
+
_See code: [src/commands/app/list/index.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/list/index.ts)_
|
|
580
552
|
|
|
581
553
|
## `aio app list extension`
|
|
582
554
|
|
|
@@ -601,7 +573,7 @@ ALIASES
|
|
|
601
573
|
$ aio app list extensions
|
|
602
574
|
```
|
|
603
575
|
|
|
604
|
-
_See code: [src/commands/app/list/extension.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
576
|
+
_See code: [src/commands/app/list/extension.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/list/extension.ts)_
|
|
605
577
|
|
|
606
578
|
## `aio app logs`
|
|
607
579
|
|
|
@@ -625,7 +597,7 @@ DESCRIPTION
|
|
|
625
597
|
Fetch logs for an Adobe I/O App
|
|
626
598
|
```
|
|
627
599
|
|
|
628
|
-
_See code: [src/commands/app/logs.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
600
|
+
_See code: [src/commands/app/logs.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/logs.ts)_
|
|
629
601
|
|
|
630
602
|
## `aio app run`
|
|
631
603
|
|
|
@@ -648,7 +620,7 @@ DESCRIPTION
|
|
|
648
620
|
Run an Adobe I/O App
|
|
649
621
|
```
|
|
650
622
|
|
|
651
|
-
_See code: [src/commands/app/run.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
623
|
+
_See code: [src/commands/app/run.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/run.ts)_
|
|
652
624
|
|
|
653
625
|
## `aio app test`
|
|
654
626
|
|
|
@@ -676,7 +648,7 @@ DESCRIPTION
|
|
|
676
648
|
If the extension has a hook called 'test' in its 'ext.config.yaml', the script specified will be run instead.
|
|
677
649
|
```
|
|
678
650
|
|
|
679
|
-
_See code: [src/commands/app/test.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
651
|
+
_See code: [src/commands/app/test.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/test.ts)_
|
|
680
652
|
|
|
681
653
|
## `aio app undeploy`
|
|
682
654
|
|
|
@@ -701,7 +673,7 @@ DESCRIPTION
|
|
|
701
673
|
Undeploys an Adobe I/O App
|
|
702
674
|
```
|
|
703
675
|
|
|
704
|
-
_See code: [src/commands/app/undeploy.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
676
|
+
_See code: [src/commands/app/undeploy.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/undeploy.ts)_
|
|
705
677
|
|
|
706
678
|
## `aio app use [CONFIG_FILE_PATH]`
|
|
707
679
|
|
|
@@ -749,5 +721,5 @@ DESCRIPTION
|
|
|
749
721
|
page in https://developer.adobe.com/console/
|
|
750
722
|
```
|
|
751
723
|
|
|
752
|
-
_See code: [src/commands/app/use.ts](https://github.com/adobe/aio-cli-plugin-app/blob/
|
|
724
|
+
_See code: [src/commands/app/use.ts](https://github.com/adobe/aio-cli-plugin-app/blob/11.0.0/src/commands/app/use.ts)_
|
|
753
725
|
<!-- commandsstop -->
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "11.0.0",
|
|
3
3
|
"commands": {
|
|
4
4
|
"app:build": {
|
|
5
5
|
"id": "app:build",
|
|
@@ -235,11 +235,8 @@
|
|
|
235
235
|
"force-events": {
|
|
236
236
|
"name": "force-events",
|
|
237
237
|
"type": "boolean",
|
|
238
|
-
"description": "[default: false] Force event registrations and
|
|
238
|
+
"description": "[default: false] Force event registrations and delete any registrations not part of the config file",
|
|
239
239
|
"allowNo": true,
|
|
240
|
-
"dependsOn": [
|
|
241
|
-
"feature-event-hooks"
|
|
242
|
-
],
|
|
243
240
|
"exclusive": [
|
|
244
241
|
"action",
|
|
245
242
|
"publish"
|
|
@@ -250,13 +247,6 @@
|
|
|
250
247
|
"type": "boolean",
|
|
251
248
|
"description": "[default: true] Update log forwarding configuration on server",
|
|
252
249
|
"allowNo": true
|
|
253
|
-
},
|
|
254
|
-
"feature-event-hooks": {
|
|
255
|
-
"name": "feature-event-hooks",
|
|
256
|
-
"type": "boolean",
|
|
257
|
-
"description": "[default: false] Enable event hooks feature",
|
|
258
|
-
"hidden": true,
|
|
259
|
-
"allowNo": true
|
|
260
250
|
}
|
|
261
251
|
},
|
|
262
252
|
"args": {}
|
|
@@ -667,7 +657,7 @@
|
|
|
667
657
|
"char": "o",
|
|
668
658
|
"description": "The packaged app output file path",
|
|
669
659
|
"multiple": false,
|
|
670
|
-
"default": "app.zip"
|
|
660
|
+
"default": "dist/app.zip"
|
|
671
661
|
}
|
|
672
662
|
},
|
|
673
663
|
"args": {
|
|
@@ -861,13 +851,6 @@
|
|
|
861
851
|
"exclusive": [
|
|
862
852
|
"unpublish"
|
|
863
853
|
]
|
|
864
|
-
},
|
|
865
|
-
"feature-event-hooks": {
|
|
866
|
-
"name": "feature-event-hooks",
|
|
867
|
-
"type": "boolean",
|
|
868
|
-
"description": "[default: false] Enable event hooks feature",
|
|
869
|
-
"hidden": true,
|
|
870
|
-
"allowNo": true
|
|
871
854
|
}
|
|
872
855
|
},
|
|
873
856
|
"args": {}
|
|
@@ -1106,12 +1089,6 @@
|
|
|
1106
1089
|
"char": "e",
|
|
1107
1090
|
"description": "Add events to a specific extension",
|
|
1108
1091
|
"multiple": false
|
|
1109
|
-
},
|
|
1110
|
-
"experimental-allow-events-templates": {
|
|
1111
|
-
"name": "experimental-allow-events-templates",
|
|
1112
|
-
"type": "boolean",
|
|
1113
|
-
"description": "Feature flag to enable events templates. NOTE: skip-prompt will have no effect if this flag is enabled.",
|
|
1114
|
-
"allowNo": false
|
|
1115
1092
|
}
|
|
1116
1093
|
},
|
|
1117
1094
|
"args": {}
|
|
@@ -1368,46 +1345,6 @@
|
|
|
1368
1345
|
},
|
|
1369
1346
|
"args": {}
|
|
1370
1347
|
},
|
|
1371
|
-
"app:delete:event": {
|
|
1372
|
-
"id": "app:delete:event",
|
|
1373
|
-
"description": "Delete existing Adobe I/O Events actions\n",
|
|
1374
|
-
"strict": true,
|
|
1375
|
-
"pluginName": "@adobe/aio-cli-plugin-app",
|
|
1376
|
-
"pluginAlias": "@adobe/aio-cli-plugin-app",
|
|
1377
|
-
"pluginType": "core",
|
|
1378
|
-
"aliases": [
|
|
1379
|
-
"app:delete:events"
|
|
1380
|
-
],
|
|
1381
|
-
"flags": {
|
|
1382
|
-
"verbose": {
|
|
1383
|
-
"name": "verbose",
|
|
1384
|
-
"type": "boolean",
|
|
1385
|
-
"char": "v",
|
|
1386
|
-
"description": "Verbose output",
|
|
1387
|
-
"allowNo": false
|
|
1388
|
-
},
|
|
1389
|
-
"version": {
|
|
1390
|
-
"name": "version",
|
|
1391
|
-
"type": "boolean",
|
|
1392
|
-
"description": "Show version",
|
|
1393
|
-
"allowNo": false
|
|
1394
|
-
},
|
|
1395
|
-
"yes": {
|
|
1396
|
-
"name": "yes",
|
|
1397
|
-
"type": "boolean",
|
|
1398
|
-
"char": "y",
|
|
1399
|
-
"description": "Skip questions, and use all default values",
|
|
1400
|
-
"allowNo": false
|
|
1401
|
-
}
|
|
1402
|
-
},
|
|
1403
|
-
"args": {
|
|
1404
|
-
"event-action-name": {
|
|
1405
|
-
"name": "event-action-name",
|
|
1406
|
-
"description": "Action `pkg/name` to delete, you can specify multiple actions via a comma separated list",
|
|
1407
|
-
"required": false
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
},
|
|
1411
1348
|
"app:delete:extension": {
|
|
1412
1349
|
"id": "app:delete:extension",
|
|
1413
1350
|
"description": "Delete existing extensions\n",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/aio-cli-plugin-app",
|
|
3
3
|
"description": "Create, Build and Deploy Adobe I/O Applications",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "11.0.0",
|
|
5
5
|
"author": "Adobe Inc.",
|
|
6
6
|
"bugs": "https://github.com/adobe/aio-cli-plugin-app/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"@adobe/aio-lib-runtime": "^5.0.0",
|
|
17
17
|
"@adobe/aio-lib-templates": "^2.2.0",
|
|
18
18
|
"@adobe/aio-lib-web": "^6.1.0",
|
|
19
|
-
"@adobe/generator-aio-app": "^
|
|
20
|
-
"@adobe/generator-app-common-lib": "^0.
|
|
19
|
+
"@adobe/generator-aio-app": "^6.0.0",
|
|
20
|
+
"@adobe/generator-app-common-lib": "^1.0.0",
|
|
21
21
|
"@adobe/inquirer-table-checkbox": "^1.2.0",
|
|
22
22
|
"@oclif/core": "^2.11.6",
|
|
23
23
|
"@parcel/core": "^2.7.0",
|
|
@@ -48,12 +48,13 @@
|
|
|
48
48
|
"term-size": "^2.2.1",
|
|
49
49
|
"unzipper": "^0.10.11",
|
|
50
50
|
"upath": "^2",
|
|
51
|
+
"junk": "^3.1.0",
|
|
51
52
|
"which": "^3.0.0",
|
|
52
53
|
"yeoman-environment": "^3.2.0"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
56
|
"@adobe/aio-lib-test-proxy": "^1.0.0",
|
|
56
|
-
"@adobe/eslint-config-aio-lib-config": "^2.0.
|
|
57
|
+
"@adobe/eslint-config-aio-lib-config": "^2.0.2",
|
|
57
58
|
"@types/jest": "^29",
|
|
58
59
|
"babel-runtime": "^6.26.0",
|
|
59
60
|
"core-js": "^3",
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
"eslint-plugin-import": "^2.28.0",
|
|
64
65
|
"eslint-plugin-jest": "^27.2.3",
|
|
65
66
|
"eslint-plugin-jsdoc": "^42.0.0",
|
|
66
|
-
"eslint-plugin-n": "^
|
|
67
|
+
"eslint-plugin-n": "^15.7",
|
|
67
68
|
"eslint-plugin-node": "^11.1.0",
|
|
68
69
|
"eslint-plugin-promise": "^6.1.1",
|
|
69
70
|
"jest": "^29.5.0",
|
|
@@ -11,12 +11,9 @@ governing permissions and limitations under the License.
|
|
|
11
11
|
|
|
12
12
|
const AddCommand = require('../../../AddCommand')
|
|
13
13
|
const TemplatesCommand = require('../../../TemplatesCommand')
|
|
14
|
-
const yeoman = require('yeoman-environment')
|
|
15
14
|
const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:add:event', { provider: 'debug' })
|
|
16
15
|
const { Flags } = require('@oclif/core')
|
|
17
|
-
const ora = require('ora')
|
|
18
16
|
const path = require('path')
|
|
19
|
-
const generators = require('@adobe/generator-aio-app')
|
|
20
17
|
const TemplateRegistryAPI = require('@adobe/aio-lib-templates')
|
|
21
18
|
|
|
22
19
|
class AddEventCommand extends TemplatesCommand {
|
|
@@ -24,7 +21,6 @@ class AddEventCommand extends TemplatesCommand {
|
|
|
24
21
|
const { flags } = await this.parse(AddEventCommand)
|
|
25
22
|
|
|
26
23
|
aioLogger.debug(`add events with flags: ${JSON.stringify(flags)}`)
|
|
27
|
-
const spinner = ora()
|
|
28
24
|
|
|
29
25
|
// guaranteed to have at least one, otherwise would throw in config load or in matching the ext name
|
|
30
26
|
const entries = Object.entries(this.getAppExtConfigs(flags))
|
|
@@ -36,41 +32,27 @@ class AddEventCommand extends TemplatesCommand {
|
|
|
36
32
|
const config = entries[0][1]
|
|
37
33
|
const actionFolder = path.relative(config.root, config.actions.src)
|
|
38
34
|
const runtimeManifestData = this.getRuntimeManifestConfigFile(configName)
|
|
39
|
-
|
|
35
|
+
const eventsData = this.getEventsConfigFile(configName)
|
|
40
36
|
const templateOptions = {
|
|
41
37
|
'skip-prompt': false,
|
|
42
38
|
'action-folder': actionFolder,
|
|
43
39
|
'config-path': runtimeManifestData.file,
|
|
44
|
-
'full-key-to-manifest': runtimeManifestData.key
|
|
40
|
+
'full-key-to-manifest': runtimeManifestData.key,
|
|
41
|
+
'full-key-to-events-manifest': eventsData.key,
|
|
42
|
+
'events-config-path': eventsData.file
|
|
45
43
|
}
|
|
46
44
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const templates = await this.selectTemplates(searchCriteria, orderByCriteria)
|
|
52
|
-
if (templates.length === 0) {
|
|
53
|
-
this.error('No events templates were chosen to be installed.')
|
|
54
|
-
} else {
|
|
55
|
-
await this.installTemplates({
|
|
56
|
-
useDefaultValues: flags.yes,
|
|
57
|
-
installNpm: flags.install,
|
|
58
|
-
templateOptions,
|
|
59
|
-
templates
|
|
60
|
-
})
|
|
61
|
-
}
|
|
62
|
-
// by default yeoman runs the install, we control installation from the app plugin
|
|
45
|
+
const [searchCriteria, orderByCriteria] = await this.getSearchCriteria()
|
|
46
|
+
const templates = await this.selectTemplates(searchCriteria, orderByCriteria)
|
|
47
|
+
if (templates.length === 0) {
|
|
48
|
+
this.error('No events templates were chosen to be installed.')
|
|
63
49
|
} else {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
options: templateOptions
|
|
50
|
+
await this.installTemplates({
|
|
51
|
+
useDefaultValues: flags.yes,
|
|
52
|
+
installNpm: flags.install,
|
|
53
|
+
templateOptions,
|
|
54
|
+
templates
|
|
70
55
|
})
|
|
71
|
-
await env.runGenerator(eventsGen)
|
|
72
|
-
|
|
73
|
-
await this.runInstallPackages(flags, spinner)
|
|
74
56
|
}
|
|
75
57
|
}
|
|
76
58
|
|
|
@@ -106,10 +88,6 @@ AddEventCommand.flags = {
|
|
|
106
88
|
multiple: false,
|
|
107
89
|
parse: str => [str]
|
|
108
90
|
}),
|
|
109
|
-
'experimental-allow-events-templates': Flags.boolean({
|
|
110
|
-
description: 'Feature flag to enable events templates. NOTE: skip-prompt will have no effect if this flag is enabled.',
|
|
111
|
-
default: false
|
|
112
|
-
}),
|
|
113
91
|
...AddCommand.flags
|
|
114
92
|
}
|
|
115
93
|
|
|
@@ -22,6 +22,9 @@ const { createWebExportFilter, runInProcess, buildExtensionPointPayloadWoMetadat
|
|
|
22
22
|
const rtLib = require('@adobe/aio-lib-runtime')
|
|
23
23
|
const LogForwarding = require('../../lib/log-forwarding')
|
|
24
24
|
|
|
25
|
+
const PRE_DEPLOY_EVENT_REG = 'pre-deploy-event-reg'
|
|
26
|
+
const POST_DEPLOY_EVENT_REG = 'post-deploy-event-reg'
|
|
27
|
+
|
|
25
28
|
class Deploy extends BuildCommand {
|
|
26
29
|
async run () {
|
|
27
30
|
// cli input
|
|
@@ -142,13 +145,10 @@ class Deploy extends BuildCommand {
|
|
|
142
145
|
|
|
143
146
|
try {
|
|
144
147
|
await runInProcess(config.hooks['pre-app-deploy'], config)
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
// output should be "Error : <plugin-name> : <error-message>\n" for each failure
|
|
150
|
-
this.error(hookResults.failures.map(f => `${f.plugin.name} : ${f.error.message}`).join('\nError: '), { exit: 1 })
|
|
151
|
-
}
|
|
148
|
+
const hookResults = await this.config.runHook(PRE_DEPLOY_EVENT_REG, { appConfig: config, force: flags['force-events'] })
|
|
149
|
+
if (hookResults?.failures?.length > 0) {
|
|
150
|
+
// output should be "Error : <plugin-name> : <error-message>\n" for each failure
|
|
151
|
+
this.error(hookResults.failures.map(f => `${f.plugin.name} : ${f.error.message}`).join('\nError: '), { exit: 1 })
|
|
152
152
|
}
|
|
153
153
|
} catch (err) {
|
|
154
154
|
this.error(err)
|
|
@@ -250,13 +250,10 @@ class Deploy extends BuildCommand {
|
|
|
250
250
|
|
|
251
251
|
try {
|
|
252
252
|
await runInProcess(config.hooks['post-app-deploy'], config)
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
// output should be "Error : <plugin-name> : <error-message>\n" for each failure
|
|
258
|
-
this.error(hookResults.failures.map(f => `${f.plugin.name} : ${f.error.message}`).join('\nError: '), { exit: 1 })
|
|
259
|
-
}
|
|
253
|
+
const hookResults = await this.config.runHook(POST_DEPLOY_EVENT_REG, { appConfig: config, force: flags['force-events'] })
|
|
254
|
+
if (hookResults?.failures?.length > 0) {
|
|
255
|
+
// output should be "Error : <plugin-name> : <error-message>\n" for each failure
|
|
256
|
+
this.error(hookResults.failures.map(f => `${f.plugin.name} : ${f.error.message}`).join('\nError: '), { exit: 1 })
|
|
260
257
|
}
|
|
261
258
|
} catch (err) {
|
|
262
259
|
this.error(err)
|
|
@@ -353,10 +350,9 @@ Deploy.flags = {
|
|
|
353
350
|
exclusive: ['action', 'publish'] // no-publish is excluded
|
|
354
351
|
}),
|
|
355
352
|
'force-events': Flags.boolean({
|
|
356
|
-
description: '[default: false] Force event registrations and
|
|
353
|
+
description: '[default: false] Force event registrations and delete any registrations not part of the config file',
|
|
357
354
|
default: false,
|
|
358
355
|
allowNo: true,
|
|
359
|
-
dependsOn: ['feature-event-hooks'],
|
|
360
356
|
exclusive: ['action', 'publish'] // no-publish is excluded
|
|
361
357
|
}),
|
|
362
358
|
'web-optimize': Flags.boolean({
|
|
@@ -367,12 +363,6 @@ Deploy.flags = {
|
|
|
367
363
|
description: '[default: true] Update log forwarding configuration on server',
|
|
368
364
|
default: true,
|
|
369
365
|
allowNo: true
|
|
370
|
-
}),
|
|
371
|
-
'feature-event-hooks': Flags.boolean({
|
|
372
|
-
description: '[default: false] Enable event hooks feature',
|
|
373
|
-
default: false,
|
|
374
|
-
allowNo: true,
|
|
375
|
-
hidden: true
|
|
376
366
|
})
|
|
377
367
|
}
|
|
378
368
|
|
package/src/commands/app/pack.js
CHANGED
|
@@ -21,14 +21,16 @@ const { loadConfigFile, writeFile } = require('../../lib/import-helper')
|
|
|
21
21
|
const { getObjectValue } = require('../../lib/app-helper')
|
|
22
22
|
const ora = require('ora')
|
|
23
23
|
const chalk = require('chalk')
|
|
24
|
+
const junk = require('junk')
|
|
24
25
|
|
|
25
26
|
// eslint-disable-next-line node/no-missing-require
|
|
26
27
|
const libConfigNext = require('@adobe/aio-cli-lib-app-config-next')
|
|
27
28
|
|
|
29
|
+
const DIST_FOLDER = 'dist'
|
|
28
30
|
const DEFAULTS = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
OUTPUT_ZIP_FILE_PATH: path.join(DIST_FOLDER, 'app.zip'),
|
|
32
|
+
ARTIFACTS_FOLDER_PATH: path.join(DIST_FOLDER, 'app-package'),
|
|
33
|
+
DEPLOY_YAML_FILE_NAME: 'deploy.yaml'
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
class Pack extends BaseCommand {
|
|
@@ -53,20 +55,37 @@ class Pack extends BaseCommand {
|
|
|
53
55
|
aioLogger.debug(`changed current working directory to: ${resolvedPath}`)
|
|
54
56
|
}
|
|
55
57
|
|
|
58
|
+
// get all 'dist' locations of all extensions (relative to the current working directory)
|
|
59
|
+
const distLocations = Object.entries(appConfig.all)
|
|
60
|
+
.map(([, extConfig]) => path.relative(process.cwd(), extConfig.app.dist))
|
|
61
|
+
|
|
56
62
|
try {
|
|
57
63
|
// 1. create artifacts phase
|
|
58
|
-
this.spinner.start(`Creating package artifacts folder '${DEFAULTS.
|
|
59
|
-
await fs.emptyDir(DEFAULTS.
|
|
60
|
-
this.spinner.succeed(`Created package artifacts folder '${DEFAULTS.
|
|
64
|
+
this.spinner.start(`Creating package artifacts folder '${DEFAULTS.ARTIFACTS_FOLDER_PATH}'...`)
|
|
65
|
+
await fs.emptyDir(DEFAULTS.ARTIFACTS_FOLDER_PATH)
|
|
66
|
+
this.spinner.succeed(`Created package artifacts folder '${DEFAULTS.ARTIFACTS_FOLDER_PATH}'`)
|
|
61
67
|
|
|
62
68
|
// ACNA-2038
|
|
63
69
|
// not artifacts folder should exist before we fire the event
|
|
64
|
-
|
|
70
|
+
|
|
71
|
+
const hookResults = await this.config.runHook('pre-pack', { appConfig, artifactsFolder: DEFAULTS.ARTIFACTS_FOLDER_PATH })
|
|
72
|
+
if (hookResults?.failures?.length > 0) {
|
|
73
|
+
// output should be "Error : <plugin-name> : <error-message>\n" for each failure
|
|
74
|
+
this.error(hookResults.failures.map(f => `${f.plugin.name} : ${f.error.message}`).join('\nError: '), { exit: 1 })
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// 1a. Get file list to pack
|
|
78
|
+
const fileList = await this.filesToPack({ filesToExclude: [flags.output, DEFAULTS.DIST_FOLDER, ...distLocations] })
|
|
79
|
+
this.log('=== Files to pack ===')
|
|
80
|
+
fileList.forEach((file) => {
|
|
81
|
+
this.log(` ${file}`)
|
|
82
|
+
})
|
|
83
|
+
this.log('=====================')
|
|
65
84
|
|
|
66
85
|
// 2. copy files to package phase
|
|
67
86
|
this.spinner.start('Copying project files...')
|
|
68
|
-
|
|
69
|
-
await this.copyPackageFiles(DEFAULTS.
|
|
87
|
+
|
|
88
|
+
await this.copyPackageFiles(DEFAULTS.ARTIFACTS_FOLDER_PATH, fileList)
|
|
70
89
|
this.spinner.succeed('Copied project files')
|
|
71
90
|
|
|
72
91
|
// 3. add/modify artifacts phase
|
|
@@ -79,13 +98,18 @@ class Pack extends BaseCommand {
|
|
|
79
98
|
this.spinner.succeed('Added code-download annotations')
|
|
80
99
|
|
|
81
100
|
// doing this before zip so other things can be added to the zip
|
|
82
|
-
await this.config.runHook('post-pack', { appConfig, artifactsFolder: DEFAULTS.
|
|
101
|
+
await this.config.runHook('post-pack', { appConfig, artifactsFolder: DEFAULTS.ARTIFACTS_FOLDER_PATH })
|
|
83
102
|
|
|
84
103
|
// 4. zip package phase
|
|
85
|
-
this.spinner.start(`Zipping package artifacts folder '${DEFAULTS.
|
|
104
|
+
this.spinner.start(`Zipping package artifacts folder '${DEFAULTS.ARTIFACTS_FOLDER_PATH}' to '${outputZipFile}'...`)
|
|
86
105
|
await fs.remove(outputZipFile)
|
|
87
|
-
await this.zipHelper(DEFAULTS.
|
|
88
|
-
this.spinner.succeed(`Zipped package artifacts folder '${DEFAULTS.
|
|
106
|
+
await this.zipHelper(DEFAULTS.ARTIFACTS_FOLDER_PATH, outputZipFile)
|
|
107
|
+
this.spinner.succeed(`Zipped package artifacts folder '${DEFAULTS.ARTIFACTS_FOLDER_PATH}' to '${outputZipFile}'`)
|
|
108
|
+
|
|
109
|
+
// 5. finally delete the artifacts folder
|
|
110
|
+
this.spinner.start(`Deleting package artifacts folder '${DEFAULTS.ARTIFACTS_FOLDER_PATH}'...`)
|
|
111
|
+
await fs.remove(DEFAULTS.ARTIFACTS_FOLDER_PATH)
|
|
112
|
+
this.spinner.succeed(`Deleted package artifacts folder '${DEFAULTS.ARTIFACTS_FOLDER_PATH}'`)
|
|
89
113
|
} catch (e) {
|
|
90
114
|
this.spinner.fail(e.message)
|
|
91
115
|
this.error(flags.verbose ? e : e.message)
|
|
@@ -176,7 +200,7 @@ class Pack extends BaseCommand {
|
|
|
176
200
|
}
|
|
177
201
|
|
|
178
202
|
await writeFile(
|
|
179
|
-
path.join(DEFAULTS.
|
|
203
|
+
path.join(DEFAULTS.ARTIFACTS_FOLDER_PATH, DEFAULTS.DEPLOY_YAML_FILE_NAME),
|
|
180
204
|
yaml.dump(deployJson),
|
|
181
205
|
{ overwrite: true })
|
|
182
206
|
}
|
|
@@ -239,17 +263,38 @@ class Pack extends BaseCommand {
|
|
|
239
263
|
*
|
|
240
264
|
* This runs `npm pack` to get the list.
|
|
241
265
|
*
|
|
242
|
-
* @param {
|
|
243
|
-
* @param {string}
|
|
266
|
+
* @param {object} options the options for the method
|
|
267
|
+
* @param {Array<string>} options.filesToExclude a list of files to exclude
|
|
268
|
+
* @param {string} options.workingDirectory the working directory to run `npm pack` in
|
|
244
269
|
* @returns {Array<string>} a list of files that are to be packed
|
|
245
270
|
*/
|
|
246
|
-
async filesToPack (filesToExclude = [], workingDirectory = process.cwd()) {
|
|
271
|
+
async filesToPack ({ filesToExclude = [], workingDirectory = process.cwd() } = {}) {
|
|
247
272
|
const { stdout } = await execa('npm', ['pack', '--dry-run', '--json'], { cwd: workingDirectory })
|
|
248
273
|
|
|
274
|
+
const noJunkFiles = (file) => {
|
|
275
|
+
const isJunkFile = junk.is(file)
|
|
276
|
+
if (isJunkFile) {
|
|
277
|
+
aioLogger.debug(`junk file (omitted from pack): ${file}`)
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
return !isJunkFile
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
const noDotFiles = (file) => {
|
|
284
|
+
const isDotFile = /^\..*/.test(file)
|
|
285
|
+
if (isDotFile) {
|
|
286
|
+
aioLogger.debug(`hidden dotfile (omitted from pack): ${file}`)
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
return !isDotFile
|
|
290
|
+
}
|
|
291
|
+
|
|
249
292
|
const { files } = JSON.parse(stdout)[0]
|
|
250
293
|
return files
|
|
251
294
|
.map(file => file.path)
|
|
252
295
|
.filter(file => !filesToExclude.includes(file))
|
|
296
|
+
.filter(noJunkFiles) // no junk files like .DS_Store
|
|
297
|
+
.filter(noDotFiles) // no files that start with a '.'
|
|
253
298
|
}
|
|
254
299
|
|
|
255
300
|
/**
|
|
@@ -291,7 +336,7 @@ class Pack extends BaseCommand {
|
|
|
291
336
|
|
|
292
337
|
// rewrite config files
|
|
293
338
|
for (const [file, keys] of Object.entries(fileToAnnotationKey)) {
|
|
294
|
-
const configFilePath = path.join(DEFAULTS.
|
|
339
|
+
const configFilePath = path.join(DEFAULTS.ARTIFACTS_FOLDER_PATH, file)
|
|
295
340
|
const { values } = loadConfigFile(configFilePath)
|
|
296
341
|
|
|
297
342
|
keys.forEach(key => {
|
|
@@ -321,7 +366,7 @@ Pack.flags = {
|
|
|
321
366
|
output: Flags.string({
|
|
322
367
|
description: 'The packaged app output file path',
|
|
323
368
|
char: 'o',
|
|
324
|
-
default: DEFAULTS.
|
|
369
|
+
default: DEFAULTS.OUTPUT_ZIP_FILE_PATH
|
|
325
370
|
})
|
|
326
371
|
}
|
|
327
372
|
|
|
@@ -78,13 +78,10 @@ class Undeploy extends BaseCommand {
|
|
|
78
78
|
// undeploy
|
|
79
79
|
try {
|
|
80
80
|
await runInProcess(config.hooks['pre-app-undeploy'], config)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
// output should be "Error : <plugin-name> : <error-message>\n" for each failure
|
|
86
|
-
this.error(hookResults.failures.map(f => `${f.plugin.name} : ${f.error.message}`).join('\nError: '), { exit: 1 })
|
|
87
|
-
}
|
|
81
|
+
const hookResults = await this.config.runHook('pre-undeploy-event-reg', { appConfig: config })
|
|
82
|
+
if (hookResults?.failures?.length > 0) {
|
|
83
|
+
// output should be "Error : <plugin-name> : <error-message>\n" for each failure
|
|
84
|
+
this.error(hookResults.failures.map(f => `${f.plugin.name} : ${f.error.message}`).join('\nError: '), { exit: 1 })
|
|
88
85
|
}
|
|
89
86
|
} catch (err) {
|
|
90
87
|
this.log(err)
|
|
@@ -178,12 +175,6 @@ Undeploy.flags = {
|
|
|
178
175
|
description: 'Force unpublish extension(s) from Exchange, will delete all extension points',
|
|
179
176
|
default: false,
|
|
180
177
|
exclusive: ['unpublish'] // unpublish is excluded
|
|
181
|
-
}),
|
|
182
|
-
'feature-event-hooks': Flags.boolean({
|
|
183
|
-
description: '[default: false] Enable event hooks feature',
|
|
184
|
-
default: false,
|
|
185
|
-
allowNo: true,
|
|
186
|
-
hidden: true
|
|
187
178
|
})
|
|
188
179
|
}
|
|
189
180
|
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020 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 aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:delete:event', { provider: 'debug' })
|
|
14
|
-
const { Flags, Args } = require('@oclif/core')
|
|
15
|
-
const DeleteActionCommand = require('./action')
|
|
16
|
-
const chalk = require('chalk')
|
|
17
|
-
|
|
18
|
-
class DeleteEventCommand extends BaseCommand {
|
|
19
|
-
async run () {
|
|
20
|
-
const { args, flags } = await this.parse(DeleteEventCommand)
|
|
21
|
-
|
|
22
|
-
aioLogger.debug(`deleting events from the project, with args ${JSON.stringify(args)}, and flags: ${JSON.stringify(flags)}`)
|
|
23
|
-
|
|
24
|
-
// NOTE: this command only wraps app delete action, events will have more than actions later on
|
|
25
|
-
if (flags.yes && !args['event-action-name']) {
|
|
26
|
-
this.error('<event-action-name> must also be provided when using --yes')
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (!args['event-action-name']) {
|
|
30
|
-
this.log(chalk.bold(chalk.blue('NOTE: this is running the \'app delete action\' command, please select events actions.')))
|
|
31
|
-
this.log()
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const cmdLineArgs = []
|
|
35
|
-
if (args['event-action-name']) {
|
|
36
|
-
cmdLineArgs.push(args['event-action-name'])
|
|
37
|
-
}
|
|
38
|
-
if (flags.yes) {
|
|
39
|
-
cmdLineArgs.push('--yes')
|
|
40
|
-
}
|
|
41
|
-
await DeleteActionCommand.run(cmdLineArgs)
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
DeleteEventCommand.description = `Delete existing Adobe I/O Events actions
|
|
46
|
-
`
|
|
47
|
-
|
|
48
|
-
DeleteEventCommand.flags = {
|
|
49
|
-
yes: Flags.boolean({
|
|
50
|
-
description: 'Skip questions, and use all default values',
|
|
51
|
-
char: 'y',
|
|
52
|
-
default: false
|
|
53
|
-
}),
|
|
54
|
-
...BaseCommand.flags
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
DeleteEventCommand.args =
|
|
58
|
-
{
|
|
59
|
-
'event-action-name': Args.string({
|
|
60
|
-
description: 'Action `pkg/name` to delete, you can specify multiple actions via a comma separated list',
|
|
61
|
-
required: false
|
|
62
|
-
})
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
DeleteEventCommand.aliases = ['app:delete:events']
|
|
66
|
-
|
|
67
|
-
module.exports = DeleteEventCommand
|