@adobe/aio-cli-plugin-app 14.1.3 → 14.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 CHANGED
@@ -74,7 +74,7 @@ DESCRIPTION
74
74
  Create, run, test, and deploy Adobe I/O Apps
75
75
  ```
76
76
 
77
- _See code: [src/commands/app/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/index.js)_
77
+ _See code: [src/commands/app/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/index.js)_
78
78
 
79
79
  ## `aio app add`
80
80
 
@@ -92,7 +92,7 @@ DESCRIPTION
92
92
  Add a new component to an existing Adobe I/O App
93
93
  ```
94
94
 
95
- _See code: [src/commands/app/add/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/add/index.js)_
95
+ _See code: [src/commands/app/add/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/add/index.js)_
96
96
 
97
97
  ## `aio app add action`
98
98
 
@@ -117,7 +117,7 @@ ALIASES
117
117
  $ aio app add actions
118
118
  ```
119
119
 
120
- _See code: [src/commands/app/add/action.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/add/action.js)_
120
+ _See code: [src/commands/app/add/action.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/add/action.js)_
121
121
 
122
122
  ## `aio app add ci`
123
123
 
@@ -135,7 +135,7 @@ DESCRIPTION
135
135
  Add CI files
136
136
  ```
137
137
 
138
- _See code: [src/commands/app/add/ci.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/add/ci.js)_
138
+ _See code: [src/commands/app/add/ci.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/add/ci.js)_
139
139
 
140
140
  ## `aio app add event`
141
141
 
@@ -160,7 +160,7 @@ ALIASES
160
160
  $ aio app add events
161
161
  ```
162
162
 
163
- _See code: [src/commands/app/add/event.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/add/event.js)_
163
+ _See code: [src/commands/app/add/event.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/add/event.js)_
164
164
 
165
165
  ## `aio app add extension`
166
166
 
@@ -186,7 +186,7 @@ ALIASES
186
186
  $ aio app add extensions
187
187
  ```
188
188
 
189
- _See code: [src/commands/app/add/extension.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/add/extension.js)_
189
+ _See code: [src/commands/app/add/extension.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/add/extension.js)_
190
190
 
191
191
  ## `aio app add service`
192
192
 
@@ -210,7 +210,7 @@ ALIASES
210
210
  $ aio app add services
211
211
  ```
212
212
 
213
- _See code: [src/commands/app/add/service.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/add/service.js)_
213
+ _See code: [src/commands/app/add/service.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/add/service.js)_
214
214
 
215
215
  ## `aio app add web-assets`
216
216
 
@@ -231,7 +231,7 @@ DESCRIPTION
231
231
  Add web assets support
232
232
  ```
233
233
 
234
- _See code: [src/commands/app/add/web-assets.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/add/web-assets.js)_
234
+ _See code: [src/commands/app/add/web-assets.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/add/web-assets.js)_
235
235
 
236
236
  ## `aio app build`
237
237
 
@@ -261,7 +261,7 @@ DESCRIPTION
261
261
  Use the --force-build flag to force a build even if one already exists.
262
262
  ```
263
263
 
264
- _See code: [src/commands/app/build.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/build.js)_
264
+ _See code: [src/commands/app/build.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/build.js)_
265
265
 
266
266
  ## `aio app clean`
267
267
 
@@ -286,7 +286,7 @@ DESCRIPTION
286
286
  Note that this will require a full rebuild on your next build command.
287
287
  ```
288
288
 
289
- _See code: [src/commands/app/clean.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/clean.js)_
289
+ _See code: [src/commands/app/clean.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/clean.js)_
290
290
 
291
291
  ## `aio app create [PATH]`
292
292
 
@@ -308,7 +308,7 @@ DESCRIPTION
308
308
  Create a new Adobe I/O App with default parameters
309
309
  ```
310
310
 
311
- _See code: [src/commands/app/create.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/create.js)_
311
+ _See code: [src/commands/app/create.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/create.js)_
312
312
 
313
313
  ## `aio app delete`
314
314
 
@@ -326,7 +326,7 @@ DESCRIPTION
326
326
  Delete a component from an existing Adobe I/O App
327
327
  ```
328
328
 
329
- _See code: [src/commands/app/delete/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/delete/index.js)_
329
+ _See code: [src/commands/app/delete/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/delete/index.js)_
330
330
 
331
331
  ## `aio app delete action [ACTION-NAME]`
332
332
 
@@ -352,7 +352,7 @@ ALIASES
352
352
  $ aio app delete actions
353
353
  ```
354
354
 
355
- _See code: [src/commands/app/delete/action.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/delete/action.js)_
355
+ _See code: [src/commands/app/delete/action.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/delete/action.js)_
356
356
 
357
357
  ## `aio app delete ci`
358
358
 
@@ -371,7 +371,7 @@ DESCRIPTION
371
371
  Delete existing CI files
372
372
  ```
373
373
 
374
- _See code: [src/commands/app/delete/ci.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/delete/ci.js)_
374
+ _See code: [src/commands/app/delete/ci.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/delete/ci.js)_
375
375
 
376
376
  ## `aio app delete extension`
377
377
 
@@ -397,7 +397,7 @@ ALIASES
397
397
  $ aio app delete extensions
398
398
  ```
399
399
 
400
- _See code: [src/commands/app/delete/extension.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/delete/extension.js)_
400
+ _See code: [src/commands/app/delete/extension.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/delete/extension.js)_
401
401
 
402
402
  ## `aio app delete service`
403
403
 
@@ -421,7 +421,7 @@ ALIASES
421
421
  $ aio app delete services
422
422
  ```
423
423
 
424
- _See code: [src/commands/app/delete/service.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/delete/service.js)_
424
+ _See code: [src/commands/app/delete/service.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/delete/service.js)_
425
425
 
426
426
  ## `aio app delete web-assets`
427
427
 
@@ -440,7 +440,7 @@ DESCRIPTION
440
440
  Delete existing web assets
441
441
  ```
442
442
 
443
- _See code: [src/commands/app/delete/web-assets.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/delete/web-assets.js)_
443
+ _See code: [src/commands/app/delete/web-assets.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/delete/web-assets.js)_
444
444
 
445
445
  ## `aio app deploy`
446
446
 
@@ -486,7 +486,7 @@ DESCRIPTION
486
486
  Use the --force-deploy flag to force deploy changes, regardless of production Workspace being published in Exchange.
487
487
  ```
488
488
 
489
- _See code: [src/commands/app/deploy.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/deploy.js)_
489
+ _See code: [src/commands/app/deploy.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/deploy.js)_
490
490
 
491
491
  ## `aio app get-url [ACTION]`
492
492
 
@@ -508,7 +508,7 @@ DESCRIPTION
508
508
  Get action URLs
509
509
  ```
510
510
 
511
- _See code: [src/commands/app/get-url.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/get-url.js)_
511
+ _See code: [src/commands/app/get-url.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/get-url.js)_
512
512
 
513
513
  ## `aio app info`
514
514
 
@@ -530,7 +530,7 @@ DESCRIPTION
530
530
  Display settings/configuration in use by an Adobe I/O App
531
531
  ```
532
532
 
533
- _See code: [src/commands/app/info.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/info.js)_
533
+ _See code: [src/commands/app/info.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/info.js)_
534
534
 
535
535
  ## `aio app init [PATH]`
536
536
 
@@ -539,8 +539,8 @@ Create a new Adobe I/O App
539
539
  ```
540
540
  USAGE
541
541
  $ aio app init [PATH] [-v] [--version] [--install] [-y] [--login] [-e <value>... | -t <value>... | --repo
542
- <value>] [--standalone-app | | ] [-w <value> | -i <value>] [--confirm-new-workspace] [--use-jwt] [--github-pat
543
- <value> ] [--linter none|basic|adobe-recommended]
542
+ <value>] [--standalone-app | | ] [--template-options <value>] [-o <value> | -i <value> | ] [-p <value> | | ] [-w
543
+ <value> | | ] [--confirm-new-workspace] [--use-jwt] [--github-pat <value> ] [--linter none|basic|adobe-recommended]
544
544
 
545
545
  ARGUMENTS
546
546
  PATH [default: .] Path to the app directory
@@ -548,6 +548,8 @@ ARGUMENTS
548
548
  FLAGS
549
549
  -e, --extension=<value>... Extension point(s) to implement
550
550
  -i, --import=<value> Import an Adobe I/O Developer Console configuration file
551
+ -o, --org=<value> Specify the Adobe Developer Console Org to init from (orgId, or orgCode)
552
+ -p, --project=<value> Specify the Adobe Developer Console Project to init from (projectId, or projectName)
551
553
  -t, --template=<value>... Specify a link to a template that will be installed
552
554
  -v, --verbose Verbose output
553
555
  -w, --workspace=<value> [default: Stage] Specify the Adobe Developer Console Workspace to init from,
@@ -561,6 +563,7 @@ FLAGS
561
563
  --[no-]login Login using your Adobe ID for interacting with Adobe I/O Developer Console
562
564
  --repo=<value> Init from gh quick-start repo. Expected to be of the form <owner>/<repo>/<path>
563
565
  --standalone-app Create a stand-alone application
566
+ --template-options=<value> Optional template options, as a base64-encoded json string
564
567
  --use-jwt if the config has both jwt and OAuth Server to Server Credentials (while migrating),
565
568
  prefer the JWT credentials
566
569
  --version Show version
@@ -569,7 +572,7 @@ DESCRIPTION
569
572
  Create a new Adobe I/O App
570
573
  ```
571
574
 
572
- _See code: [src/commands/app/init.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/init.js)_
575
+ _See code: [src/commands/app/init.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/init.js)_
573
576
 
574
577
  ## `aio app install PATH`
575
578
 
@@ -577,22 +580,23 @@ This command will support installing apps packaged by 'aio app pack'.
577
580
 
578
581
  ```
579
582
  USAGE
580
- $ aio app install PATH [-v] [--version] [-o <value>] [--tests]
583
+ $ aio app install PATH [-v] [--version] [--allow-scripts] [-o <value>] [--tests]
581
584
 
582
585
  ARGUMENTS
583
586
  PATH Path to the app package to install
584
587
 
585
588
  FLAGS
586
- -o, --output=<value> [default: .] The packaged app output folder path
587
- -v, --verbose Verbose output
588
- --[no-]tests Run packaged app unit tests (e.g. aio app:test)
589
- --version Show version
589
+ -o, --output=<value> [default: .] The packaged app output folder path
590
+ -v, --verbose Verbose output
591
+ --[no-]allow-scripts Allow post and preinstall scripts during npm install/npm ci
592
+ --[no-]tests Run packaged app unit tests (e.g. aio app:test)
593
+ --version Show version
590
594
 
591
595
  DESCRIPTION
592
596
  This command will support installing apps packaged by 'aio app pack'.
593
597
  ```
594
598
 
595
- _See code: [src/commands/app/install.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/install.js)_
599
+ _See code: [src/commands/app/install.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/install.js)_
596
600
 
597
601
  ## `aio app list`
598
602
 
@@ -610,7 +614,7 @@ DESCRIPTION
610
614
  List components for Adobe I/O App
611
615
  ```
612
616
 
613
- _See code: [src/commands/app/list/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/list/index.js)_
617
+ _See code: [src/commands/app/list/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/list/index.js)_
614
618
 
615
619
  ## `aio app list extension`
616
620
 
@@ -635,7 +639,7 @@ ALIASES
635
639
  $ aio app list extensions
636
640
  ```
637
641
 
638
- _See code: [src/commands/app/list/extension.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/list/extension.js)_
642
+ _See code: [src/commands/app/list/extension.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/list/extension.js)_
639
643
 
640
644
  ## `aio app logs`
641
645
 
@@ -659,7 +663,7 @@ DESCRIPTION
659
663
  Fetch logs for an Adobe I/O App
660
664
  ```
661
665
 
662
- _See code: [src/commands/app/logs.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/logs.js)_
666
+ _See code: [src/commands/app/logs.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/logs.js)_
663
667
 
664
668
  ## `aio app pack [PATH]`
665
669
 
@@ -667,7 +671,7 @@ This command will support packaging apps for redistribution.
667
671
 
668
672
  ```
669
673
  USAGE
670
- $ aio app pack [PATH] [-v] [--version] [-o <value>]
674
+ $ aio app pack [PATH] [-v] [--version] [--lock-file] [-o <value>]
671
675
 
672
676
  ARGUMENTS
673
677
  PATH [default: .] Path to the app directory to package
@@ -675,13 +679,14 @@ ARGUMENTS
675
679
  FLAGS
676
680
  -o, --output=<value> [default: dist/app.zip] The packaged app output file path
677
681
  -v, --verbose Verbose output
682
+ --[no-]lock-file Include the package-lock.json file in the packaged app
678
683
  --version Show version
679
684
 
680
685
  DESCRIPTION
681
686
  This command will support packaging apps for redistribution.
682
687
  ```
683
688
 
684
- _See code: [src/commands/app/pack.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/pack.js)_
689
+ _See code: [src/commands/app/pack.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/pack.js)_
685
690
 
686
691
  ## `aio app run`
687
692
 
@@ -703,7 +708,7 @@ DESCRIPTION
703
708
  Run an Adobe I/O App
704
709
  ```
705
710
 
706
- _See code: [src/commands/app/run.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/run.js)_
711
+ _See code: [src/commands/app/run.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/run.js)_
707
712
 
708
713
  ## `aio app test`
709
714
 
@@ -731,7 +736,7 @@ DESCRIPTION
731
736
  If the extension has a hook called 'test' in its 'ext.config.yaml', the script specified will be run instead.
732
737
  ```
733
738
 
734
- _See code: [src/commands/app/test.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/test.js)_
739
+ _See code: [src/commands/app/test.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/test.js)_
735
740
 
736
741
  ## `aio app undeploy`
737
742
 
@@ -756,7 +761,7 @@ DESCRIPTION
756
761
  Undeploys an Adobe I/O App
757
762
  ```
758
763
 
759
- _See code: [src/commands/app/undeploy.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/undeploy.js)_
764
+ _See code: [src/commands/app/undeploy.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/undeploy.js)_
760
765
 
761
766
  ## `aio app use [CONFIG_FILE_PATH]`
762
767
 
@@ -803,5 +808,5 @@ DESCRIPTION
803
808
  page in https://developer.adobe.com/console/
804
809
  ```
805
810
 
806
- _See code: [src/commands/app/use.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.1.3/src/commands/app/use.js)_
811
+ _See code: [src/commands/app/use.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.0/src/commands/app/use.js)_
807
812
  <!-- commandsstop -->
@@ -573,23 +573,32 @@
573
573
  "multiple": true,
574
574
  "type": "option"
575
575
  },
576
+ "template-options": {
577
+ "description": "Optional template options, as a base64-encoded json string",
578
+ "name": "template-options",
579
+ "hasDynamicHelp": false,
580
+ "multiple": false,
581
+ "type": "option"
582
+ },
576
583
  "org": {
577
- "description": "Specify the Adobe Developer Console Org to init from",
584
+ "char": "o",
585
+ "description": "Specify the Adobe Developer Console Org to init from (orgId, or orgCode)",
578
586
  "exclusive": [
579
- "import"
587
+ "import",
588
+ "no-login"
580
589
  ],
581
- "hidden": true,
582
590
  "name": "org",
583
591
  "hasDynamicHelp": false,
584
592
  "multiple": false,
585
593
  "type": "option"
586
594
  },
587
595
  "project": {
588
- "description": "Specify the Adobe Developer Console Project to init from",
596
+ "char": "p",
597
+ "description": "Specify the Adobe Developer Console Project to init from (projectId, or projectName)",
589
598
  "exclusive": [
590
- "import"
599
+ "import",
600
+ "no-login"
591
601
  ],
592
- "hidden": true,
593
602
  "name": "project",
594
603
  "hasDynamicHelp": false,
595
604
  "multiple": false,
@@ -599,7 +608,8 @@
599
608
  "char": "w",
600
609
  "description": "Specify the Adobe Developer Console Workspace to init from, defaults to Stage",
601
610
  "exclusive": [
602
- "import"
611
+ "import",
612
+ "no-login"
603
613
  ],
604
614
  "name": "workspace",
605
615
  "default": "Stage",
@@ -694,6 +704,12 @@
694
704
  "allowNo": false,
695
705
  "type": "boolean"
696
706
  },
707
+ "allow-scripts": {
708
+ "description": "Allow post and preinstall scripts during npm install/npm ci",
709
+ "name": "allow-scripts",
710
+ "allowNo": true,
711
+ "type": "boolean"
712
+ },
697
713
  "output": {
698
714
  "char": "o",
699
715
  "description": "The packaged app output folder path",
@@ -840,6 +856,12 @@
840
856
  "allowNo": false,
841
857
  "type": "boolean"
842
858
  },
859
+ "lock-file": {
860
+ "description": "Include the package-lock.json file in the packaged app",
861
+ "name": "lock-file",
862
+ "allowNo": true,
863
+ "type": "boolean"
864
+ },
843
865
  "output": {
844
866
  "char": "o",
845
867
  "description": "The packaged app output file path",
@@ -2190,5 +2212,5 @@
2190
2212
  ]
2191
2213
  }
2192
2214
  },
2193
- "version": "14.1.3"
2215
+ "version": "14.3.0"
2194
2216
  }
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": "14.1.3",
4
+ "version": "14.3.0",
5
5
  "author": "Adobe Inc.",
6
6
  "bugs": "https://github.com/adobe/aio-cli-plugin-app/issues",
7
7
  "dependencies": {
@@ -14,7 +14,7 @@
14
14
  "@adobe/aio-lib-ims": "^7",
15
15
  "@adobe/aio-lib-runtime": "^7.1.3",
16
16
  "@adobe/aio-lib-templates": "^3",
17
- "@adobe/aio-lib-web": "^7",
17
+ "@adobe/aio-lib-web": "^7.0.6",
18
18
  "@adobe/generator-aio-app": "^9",
19
19
  "@adobe/generator-app-common-lib": "^3",
20
20
  "@adobe/inquirer-table-checkbox": "^2",
@@ -122,6 +122,7 @@ class InitCommand extends TemplatesCommand {
122
122
  useDefaultValues: flags.yes,
123
123
  installNpm: flags.install,
124
124
  installConfig: flags.login,
125
+ templateOptions: flags['template-options'],
125
126
  templates
126
127
  })
127
128
  }
@@ -174,6 +175,7 @@ class InitCommand extends TemplatesCommand {
174
175
  await this.installTemplates({
175
176
  useDefaultValues: flags.yes,
176
177
  installNpm: flags.install,
178
+ templateOptions: flags['template-options'],
177
179
  templates
178
180
  })
179
181
  }
@@ -456,21 +458,33 @@ InitCommand.flags = {
456
458
  char: 't',
457
459
  multiple: true
458
460
  }),
461
+ 'template-options': Flags.string({
462
+ description: 'Optional template options, as a base64-encoded json string',
463
+ parse: input => {
464
+ try {
465
+ const decoded = Buffer.from(input, 'base64').toString('utf8')
466
+ aioLogger.debug(`--template-options: ${input} decoded as ${decoded}`)
467
+ return JSON.parse(decoded)
468
+ } catch (e) {
469
+ throw new Error(`--template-options: ${input} is not a base64 encoded JSON object.`)
470
+ }
471
+ }
472
+ }),
459
473
  org: Flags.string({
460
- description: 'Specify the Adobe Developer Console Org to init from',
461
- hidden: true,
462
- exclusive: ['import'] // also no-login
474
+ description: 'Specify the Adobe Developer Console Org to init from (orgId, or orgCode)',
475
+ char: 'o',
476
+ exclusive: ['import', 'no-login']
463
477
  }),
464
478
  project: Flags.string({
465
- description: 'Specify the Adobe Developer Console Project to init from',
466
- hidden: true,
467
- exclusive: ['import'] // also no-login
479
+ description: 'Specify the Adobe Developer Console Project to init from (projectId, or projectName)',
480
+ char: 'p',
481
+ exclusive: ['import', 'no-login']
468
482
  }),
469
483
  workspace: Flags.string({
470
484
  description: 'Specify the Adobe Developer Console Workspace to init from, defaults to Stage',
471
485
  default: DEFAULT_WORKSPACE,
472
486
  char: 'w',
473
- exclusive: ['import'] // also no-login
487
+ exclusive: ['import', 'no-login']
474
488
  }),
475
489
  'confirm-new-workspace': Flags.boolean({
476
490
  description: 'Prompt to confirm before creating a new workspace',
@@ -19,7 +19,7 @@ const execa = require('execa')
19
19
  const unzipper = require('unzipper')
20
20
  const { validateJsonWithSchema } = require('../../lib/install-helper')
21
21
  const jsYaml = require('js-yaml')
22
- const { USER_CONFIG_FILE, DEPLOY_CONFIG_FILE } = require('../../lib/defaults')
22
+ const { USER_CONFIG_FILE, DEPLOY_CONFIG_FILE, PACKAGE_LOCK_FILE } = require('../../lib/defaults')
23
23
  const ora = require('ora')
24
24
 
25
25
  // eslint-disable-next-line node/no-missing-require
@@ -51,7 +51,14 @@ class InstallCommand extends BaseCommand {
51
51
  await this.unzipFile(args.path, outputPath)
52
52
  await this.validateAppConfig(outputPath, USER_CONFIG_FILE)
53
53
  await this.validateDeployConfig(outputPath, DEPLOY_CONFIG_FILE)
54
- await this.npmInstall(flags.verbose)
54
+
55
+ const packageLockPath = path.join(outputPath, PACKAGE_LOCK_FILE)
56
+ if (fs.existsSync(packageLockPath)) {
57
+ await this.npmCI(flags.verbose, flags['allow-scripts'])
58
+ } else {
59
+ this.warn('No lockfile found, running standard npm install. It is recommended that you include a lockfile with your app bundle.')
60
+ await this.npmInstall(flags.verbose, flags['allow-scripts'])
61
+ }
55
62
  if (flags.tests) {
56
63
  await this.runTests()
57
64
  }
@@ -131,15 +138,26 @@ class InstallCommand extends BaseCommand {
131
138
  }
132
139
  }
133
140
 
134
- async npmInstall (isVerbose) {
141
+ async npmInstall (isVerbose = false, allowScripts = true) {
142
+ const ignoreScripts = allowScripts ? undefined : '--ignore-scripts'
135
143
  this.spinner.start('Running npm install...')
136
144
  const stdio = isVerbose ? 'inherit' : 'ignore'
137
- return execa('npm', ['install'], { stdio })
145
+ return execa('npm', ['install', ignoreScripts], { stdio })
138
146
  .then(() => {
139
147
  this.spinner.succeed('Ran npm install')
140
148
  })
141
149
  }
142
150
 
151
+ async npmCI (isVerbose = false, allowScripts = true) {
152
+ const ignoreScripts = allowScripts ? undefined : '--ignore-scripts'
153
+ this.spinner.start('Running npm ci...')
154
+ const stdio = isVerbose ? 'inherit' : 'ignore'
155
+ return execa('npm', ['ci', ignoreScripts], { stdio })
156
+ .then(() => {
157
+ this.spinner.succeed('Ran npm ci')
158
+ })
159
+ }
160
+
143
161
  async runTests (isVerbose) {
144
162
  this.spinner.start('Running app tests...')
145
163
  return this.config.runCommand('app:test').then((result) => {
@@ -157,6 +175,11 @@ InstallCommand.description = `This command will support installing apps packaged
157
175
 
158
176
  InstallCommand.flags = {
159
177
  ...BaseCommand.flags,
178
+ 'allow-scripts': Flags.boolean({
179
+ description: 'Allow post and preinstall scripts during npm install/npm ci',
180
+ default: true,
181
+ allowNo: true
182
+ }),
160
183
  output: Flags.string({
161
184
  description: 'The packaged app output folder path',
162
185
  char: 'o',
@@ -71,8 +71,13 @@ class Pack extends BaseCommand {
71
71
  this.error(hookResults.failures.map(f => `${f.plugin.name} : ${f.error.message}`).join('\nError: '), { exit: 1 })
72
72
  }
73
73
 
74
+ const filesToInclude = flags['lock-file'] ? ['package-lock.json'] : []
75
+
74
76
  // 1a. Get file list to pack
75
- const fileList = await this.filesToPack({ filesToExclude: [flags.output, DEFAULTS.DIST_FOLDER, ...distLocations] })
77
+ const fileList = await this.filesToPack({
78
+ filesToExclude: [flags.output, DEFAULTS.DIST_FOLDER, ...distLocations],
79
+ filesToInclude
80
+ })
76
81
  this.log('=== Files to pack ===')
77
82
  fileList.forEach((file) => {
78
83
  this.log(` ${file}`)
@@ -265,10 +270,11 @@ class Pack extends BaseCommand {
265
270
  *
266
271
  * @param {object} options the options for the method
267
272
  * @param {Array<string>} options.filesToExclude a list of files to exclude
273
+ * @param {Array<string>} options.filesToInclude a list of files to include (will always be included)
268
274
  * @param {string} options.workingDirectory the working directory to run `npm pack` in
269
275
  * @returns {Array<string>} a list of files that are to be packed
270
276
  */
271
- async filesToPack ({ filesToExclude = [], workingDirectory = process.cwd() } = {}) {
277
+ async filesToPack ({ filesToExclude = [], filesToInclude = [], workingDirectory = process.cwd() } = {}) {
272
278
  const { stdout } = await execa('npm', ['pack', '--dry-run', '--json'], { cwd: workingDirectory })
273
279
 
274
280
  const noJunkFiles = (file) => {
@@ -290,11 +296,14 @@ class Pack extends BaseCommand {
290
296
  }
291
297
 
292
298
  const { files } = JSON.parse(stdout)[0]
293
- return files
294
- .map(file => file.path)
295
- .filter(file => !filesToExclude.includes(file))
296
- .filter(noJunkFiles) // no junk files like .DS_Store
297
- .filter(noDotFiles) // no files that start with a '.'
299
+ return [
300
+ ...files
301
+ .map(file => file.path)
302
+ .filter(file => !filesToExclude.includes(file))
303
+ .filter(noJunkFiles) // no junk files like .DS_Store
304
+ .filter(noDotFiles), // no files that start with a '.'
305
+ ...filesToInclude
306
+ ]
298
307
  }
299
308
 
300
309
  /**
@@ -361,6 +370,11 @@ Pack.description = `This command will support packaging apps for redistribution.
361
370
 
362
371
  Pack.flags = {
363
372
  ...BaseCommand.flags,
373
+ 'lock-file': Flags.boolean({
374
+ description: 'Include the package-lock.json file in the packaged app',
375
+ default: true,
376
+ allowNo: true
377
+ }),
364
378
  output: Flags.string({
365
379
  description: 'The packaged app output file path',
366
380
  char: 'o',
@@ -18,7 +18,7 @@ const OPERATIONS = {
18
18
 
19
19
  const AUDIT_SERVICE_ENDPOINT_ROUTE = '/audit-log-api/event-post'
20
20
  const AUDIT_SERVICE_ENDPOINTS = {
21
- stage: 'https://deploy-service.stg.app-builder.corp.adp.adobe.io',
21
+ stage: 'https://deploy-service.stg.app-builder.adp.adobe.io',
22
22
  prod: 'https://deploy-service.app-builder.adp.adobe.io'
23
23
  }
24
24
 
@@ -15,7 +15,7 @@ const { getCliEnv } = require('@adobe/aio-lib-env')
15
15
  const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:auth-helper', { provider: 'debug' })
16
16
 
17
17
  const DEPLOY_SERVICE_ENDPOINTS = {
18
- stage: 'https://deploy-service.stg.app-builder.corp.adp.adobe.io',
18
+ stage: 'https://deploy-service.stg.app-builder.adp.adobe.io',
19
19
  prod: 'https://deploy-service.app-builder.adp.adobe.io'
20
20
  }
21
21
 
@@ -33,6 +33,7 @@ module.exports = {
33
33
  IMPORT_CONFIG_FILE: 'config.json',
34
34
  USER_CONFIG_FILE: 'app.config.yaml',
35
35
  DEPLOY_CONFIG_FILE: 'deploy.yaml',
36
+ PACKAGE_LOCK_FILE: 'package-lock.json',
36
37
  LEGACY_RUNTIME_MANIFEST: 'manifest.yml',
37
38
  INCLUDE_DIRECTIVE: '$include',
38
39
  APPLICATION_CONFIG_KEY: 'application',