@adobe/aio-cli-plugin-app 14.3.0 → 14.3.1-alpha.1

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.3.0/src/commands/app/index.js)_
77
+ _See code: [src/commands/app/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.1-alpha.1/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.3.0/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.1-alpha.1/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.3.0/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.1-alpha.1/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.3.0/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.1-alpha.1/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.3.0/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.1-alpha.1/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.3.0/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.1-alpha.1/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.3.0/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.1-alpha.1/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.3.0/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.1-alpha.1/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.3.0/src/commands/app/build.js)_
264
+ _See code: [src/commands/app/build.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.1-alpha.1/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.3.0/src/commands/app/clean.js)_
289
+ _See code: [src/commands/app/clean.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.1-alpha.1/src/commands/app/clean.js)_
290
290
 
291
291
  ## `aio app create [PATH]`
292
292
 
@@ -297,7 +297,7 @@ USAGE
297
297
  $ aio app create [PATH] [-v] [--version] [-i <value>]
298
298
 
299
299
  ARGUMENTS
300
- PATH [default: .] Path to the app directory
300
+ [PATH] [default: .] Path to the app directory
301
301
 
302
302
  FLAGS
303
303
  -i, --import=<value> Import an Adobe I/O Developer Console configuration file
@@ -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.3.0/src/commands/app/create.js)_
311
+ _See code: [src/commands/app/create.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.1-alpha.1/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.3.0/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.1-alpha.1/src/commands/app/delete/index.js)_
330
330
 
331
331
  ## `aio app delete action [ACTION-NAME]`
332
332
 
@@ -337,7 +337,7 @@ USAGE
337
337
  $ aio app delete action [ACTION-NAME] [-v] [--version] [-y]
338
338
 
339
339
  ARGUMENTS
340
- ACTION-NAME Action `pkg/name` to delete, you can specify multiple actions via a comma separated list
340
+ [ACTION-NAME] Action `pkg/name` to delete, you can specify multiple actions via a comma separated list
341
341
 
342
342
  FLAGS
343
343
  -v, --verbose Verbose output
@@ -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.3.0/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.1-alpha.1/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.3.0/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.1-alpha.1/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.3.0/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.1-alpha.1/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.3.0/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.1-alpha.1/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.3.0/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.1-alpha.1/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.3.0/src/commands/app/deploy.js)_
489
+ _See code: [src/commands/app/deploy.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.1-alpha.1/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.3.0/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.1-alpha.1/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.3.0/src/commands/app/info.js)_
533
+ _See code: [src/commands/app/info.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.1-alpha.1/src/commands/app/info.js)_
534
534
 
535
535
  ## `aio app init [PATH]`
536
536
 
@@ -543,7 +543,7 @@ USAGE
543
543
  <value> | | ] [--confirm-new-workspace] [--use-jwt] [--github-pat <value> ] [--linter none|basic|adobe-recommended]
544
544
 
545
545
  ARGUMENTS
546
- PATH [default: .] Path to the app directory
546
+ [PATH] [default: .] Path to the app directory
547
547
 
548
548
  FLAGS
549
549
  -e, --extension=<value>... Extension point(s) to implement
@@ -572,7 +572,7 @@ DESCRIPTION
572
572
  Create a new Adobe I/O App
573
573
  ```
574
574
 
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)_
575
+ _See code: [src/commands/app/init.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.1-alpha.1/src/commands/app/init.js)_
576
576
 
577
577
  ## `aio app install PATH`
578
578
 
@@ -596,7 +596,7 @@ DESCRIPTION
596
596
  This command will support installing apps packaged by 'aio app pack'.
597
597
  ```
598
598
 
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)_
599
+ _See code: [src/commands/app/install.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.1-alpha.1/src/commands/app/install.js)_
600
600
 
601
601
  ## `aio app list`
602
602
 
@@ -614,7 +614,7 @@ DESCRIPTION
614
614
  List components for Adobe I/O App
615
615
  ```
616
616
 
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)_
617
+ _See code: [src/commands/app/list/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.1-alpha.1/src/commands/app/list/index.js)_
618
618
 
619
619
  ## `aio app list extension`
620
620
 
@@ -639,7 +639,7 @@ ALIASES
639
639
  $ aio app list extensions
640
640
  ```
641
641
 
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)_
642
+ _See code: [src/commands/app/list/extension.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.1-alpha.1/src/commands/app/list/extension.js)_
643
643
 
644
644
  ## `aio app logs`
645
645
 
@@ -663,7 +663,7 @@ DESCRIPTION
663
663
  Fetch logs for an Adobe I/O App
664
664
  ```
665
665
 
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)_
666
+ _See code: [src/commands/app/logs.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.1-alpha.1/src/commands/app/logs.js)_
667
667
 
668
668
  ## `aio app pack [PATH]`
669
669
 
@@ -674,7 +674,7 @@ USAGE
674
674
  $ aio app pack [PATH] [-v] [--version] [--lock-file] [-o <value>]
675
675
 
676
676
  ARGUMENTS
677
- PATH [default: .] Path to the app directory to package
677
+ [PATH] [default: .] Path to the app directory to package
678
678
 
679
679
  FLAGS
680
680
  -o, --output=<value> [default: dist/app.zip] The packaged app output file path
@@ -686,7 +686,7 @@ DESCRIPTION
686
686
  This command will support packaging apps for redistribution.
687
687
  ```
688
688
 
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)_
689
+ _See code: [src/commands/app/pack.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.1-alpha.1/src/commands/app/pack.js)_
690
690
 
691
691
  ## `aio app run`
692
692
 
@@ -708,7 +708,7 @@ DESCRIPTION
708
708
  Run an Adobe I/O App
709
709
  ```
710
710
 
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)_
711
+ _See code: [src/commands/app/run.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.1-alpha.1/src/commands/app/run.js)_
712
712
 
713
713
  ## `aio app test`
714
714
 
@@ -736,7 +736,7 @@ DESCRIPTION
736
736
  If the extension has a hook called 'test' in its 'ext.config.yaml', the script specified will be run instead.
737
737
  ```
738
738
 
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)_
739
+ _See code: [src/commands/app/test.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.1-alpha.1/src/commands/app/test.js)_
740
740
 
741
741
  ## `aio app undeploy`
742
742
 
@@ -761,7 +761,7 @@ DESCRIPTION
761
761
  Undeploys an Adobe I/O App
762
762
  ```
763
763
 
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)_
764
+ _See code: [src/commands/app/undeploy.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.1-alpha.1/src/commands/app/undeploy.js)_
765
765
 
766
766
  ## `aio app use [CONFIG_FILE_PATH]`
767
767
 
@@ -773,7 +773,7 @@ USAGE
773
773
  [--confirm-new-workspace] [--no-service-sync | --confirm-service-sync] [--no-input] [--use-jwt]
774
774
 
775
775
  ARGUMENTS
776
- CONFIG_FILE_PATH path to an Adobe I/O Developer Console configuration file
776
+ [CONFIG_FILE_PATH] path to an Adobe I/O Developer Console configuration file
777
777
 
778
778
  FLAGS
779
779
  -g, --global Use the global Adobe Developer Console Org / Project / Workspace configuration,
@@ -808,5 +808,5 @@ DESCRIPTION
808
808
  page in https://developer.adobe.com/console/
809
809
  ```
810
810
 
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)_
811
+ _See code: [src/commands/app/use.js](https://github.com/adobe/aio-cli-plugin-app/blob/14.3.1-alpha.1/src/commands/app/use.js)_
812
812
  <!-- commandsstop -->
@@ -2017,12 +2017,12 @@
2017
2017
  "index.js"
2018
2018
  ]
2019
2019
  },
2020
- "app:config:get": {
2020
+ "app:config:set": {
2021
2021
  "aliases": [
2022
- "app:config:get"
2022
+ "app:config:set"
2023
2023
  ],
2024
2024
  "args": {},
2025
- "description": "Get app config",
2025
+ "description": "Set app config",
2026
2026
  "flags": {
2027
2027
  "verbose": {
2028
2028
  "char": "v",
@@ -2040,7 +2040,7 @@
2040
2040
  },
2041
2041
  "hasDynamicHelp": false,
2042
2042
  "hiddenAliases": [],
2043
- "id": "app:config:get",
2043
+ "id": "app:config:set",
2044
2044
  "pluginAlias": "@adobe/aio-cli-plugin-app",
2045
2045
  "pluginName": "@adobe/aio-cli-plugin-app",
2046
2046
  "pluginType": "core",
@@ -2051,17 +2051,17 @@
2051
2051
  "commands",
2052
2052
  "app",
2053
2053
  "config",
2054
- "get",
2054
+ "set",
2055
2055
  "index.js"
2056
2056
  ]
2057
2057
  },
2058
- "app:config:get:log-forwarding": {
2058
+ "app:config:set:log-forwarding": {
2059
2059
  "aliases": [
2060
- "app:config:get:log-forwarding",
2061
- "app:config:get:lf"
2060
+ "app:config:set:log-forwarding",
2061
+ "app:config:set:lf"
2062
2062
  ],
2063
2063
  "args": {},
2064
- "description": "Get log forwarding destination configuration",
2064
+ "description": "Set log forwarding destination configuration",
2065
2065
  "flags": {
2066
2066
  "verbose": {
2067
2067
  "char": "v",
@@ -2079,7 +2079,7 @@
2079
2079
  },
2080
2080
  "hasDynamicHelp": false,
2081
2081
  "hiddenAliases": [],
2082
- "id": "app:config:get:log-forwarding",
2082
+ "id": "app:config:set:log-forwarding",
2083
2083
  "pluginAlias": "@adobe/aio-cli-plugin-app",
2084
2084
  "pluginName": "@adobe/aio-cli-plugin-app",
2085
2085
  "pluginType": "core",
@@ -2090,16 +2090,16 @@
2090
2090
  "commands",
2091
2091
  "app",
2092
2092
  "config",
2093
- "get",
2093
+ "set",
2094
2094
  "log-forwarding.js"
2095
2095
  ]
2096
2096
  },
2097
- "app:config:set": {
2097
+ "app:config:get": {
2098
2098
  "aliases": [
2099
- "app:config:set"
2099
+ "app:config:get"
2100
2100
  ],
2101
2101
  "args": {},
2102
- "description": "Set app config",
2102
+ "description": "Get app config",
2103
2103
  "flags": {
2104
2104
  "verbose": {
2105
2105
  "char": "v",
@@ -2117,7 +2117,7 @@
2117
2117
  },
2118
2118
  "hasDynamicHelp": false,
2119
2119
  "hiddenAliases": [],
2120
- "id": "app:config:set",
2120
+ "id": "app:config:get",
2121
2121
  "pluginAlias": "@adobe/aio-cli-plugin-app",
2122
2122
  "pluginName": "@adobe/aio-cli-plugin-app",
2123
2123
  "pluginType": "core",
@@ -2128,17 +2128,17 @@
2128
2128
  "commands",
2129
2129
  "app",
2130
2130
  "config",
2131
- "set",
2131
+ "get",
2132
2132
  "index.js"
2133
2133
  ]
2134
2134
  },
2135
- "app:config:set:log-forwarding": {
2135
+ "app:config:get:log-forwarding": {
2136
2136
  "aliases": [
2137
- "app:config:set:log-forwarding",
2138
- "app:config:set:lf"
2137
+ "app:config:get:log-forwarding",
2138
+ "app:config:get:lf"
2139
2139
  ],
2140
2140
  "args": {},
2141
- "description": "Set log forwarding destination configuration",
2141
+ "description": "Get log forwarding destination configuration",
2142
2142
  "flags": {
2143
2143
  "verbose": {
2144
2144
  "char": "v",
@@ -2156,7 +2156,7 @@
2156
2156
  },
2157
2157
  "hasDynamicHelp": false,
2158
2158
  "hiddenAliases": [],
2159
- "id": "app:config:set:log-forwarding",
2159
+ "id": "app:config:get:log-forwarding",
2160
2160
  "pluginAlias": "@adobe/aio-cli-plugin-app",
2161
2161
  "pluginName": "@adobe/aio-cli-plugin-app",
2162
2162
  "pluginType": "core",
@@ -2167,7 +2167,7 @@
2167
2167
  "commands",
2168
2168
  "app",
2169
2169
  "config",
2170
- "set",
2170
+ "get",
2171
2171
  "log-forwarding.js"
2172
2172
  ]
2173
2173
  },
@@ -2212,5 +2212,5 @@
2212
2212
  ]
2213
2213
  }
2214
2214
  },
2215
- "version": "14.3.0"
2215
+ "version": "14.3.1-alpha.1"
2216
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.3.0",
4
+ "version": "14.3.1-alpha.1",
5
5
  "author": "Adobe Inc.",
6
6
  "bugs": "https://github.com/adobe/aio-cli-plugin-app/issues",
7
7
  "dependencies": {
@@ -26,7 +26,7 @@ const {
26
26
  const rtLib = require('@adobe/aio-lib-runtime')
27
27
  const LogForwarding = require('../../lib/log-forwarding')
28
28
  const { sendAppAssetsDeployedAuditLog, sendAppDeployAuditLog } = require('../../lib/audit-logger')
29
- const { setRuntimeApiHostAndAuthHandler, getAccessToken } = require('../../lib/auth-helper')
29
+ const { setRuntimeApiHostAndAuthHandler, getAccessToken, getTokenData } = require('../../lib/auth-helper')
30
30
  const logActions = require('../../lib/log-actions')
31
31
 
32
32
  const PRE_DEPLOY_EVENT_REG = 'pre-deploy-event-reg'
@@ -68,6 +68,8 @@ class Deploy extends BuildCommand {
68
68
 
69
69
  if (cliDetails?.accessToken) {
70
70
  try {
71
+ // store user id from token data for cdn deploy audit metadata
72
+ appInfo.auditUserId = getTokenData(cliDetails.accessToken)?.user_id
71
73
  // send audit log at start (don't wait for deployment to finish)
72
74
  await sendAppDeployAuditLog({
73
75
  accessToken: cliDetails?.accessToken,
@@ -130,8 +132,12 @@ class Deploy extends BuildCommand {
130
132
  // - break into smaller pieces deploy, allowing to first deploy all actions then all web assets
131
133
  for (let i = 0; i < keys.length; ++i) {
132
134
  const k = keys[i]
133
- const v = setRuntimeApiHostAndAuthHandler(values[i])
134
-
135
+ // auditUserId is only set if it is available in the token data
136
+ // falsy because "", 0, false, null, undefined, NaN, etc. are all invalid values
137
+ const v = {
138
+ ...(appInfo.auditUserId && { auditUserId: appInfo.auditUserId }),
139
+ ...setRuntimeApiHostAndAuthHandler(values[i])
140
+ }
135
141
  await this.deploySingleConfig({ name: k, config: v, originalConfig: values[i], flags, spinner })
136
142
  if (cliDetails?.accessToken && v.app.hasFrontend && flags['web-assets']) {
137
143
  const opItems = getFilesCountWithExtension(v.web.distProd)
@@ -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 { getToken, context } = require('@adobe/aio-lib-ims')
12
+ const { getToken, context, getTokenData: getImsTokenData } = require('@adobe/aio-lib-ims')
13
13
  const { CLI } = require('@adobe/aio-lib-ims/src/context')
14
14
  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' })
@@ -90,8 +90,29 @@ const setRuntimeApiHostAndAuthHandler = (_config) => {
90
90
  }
91
91
  }
92
92
 
93
+ /**
94
+ * Decodes a JWT token and returns its payload as a JavaScript object.
95
+ *
96
+ * @function getTokenData
97
+ * @param {string} token - The JWT token to decode
98
+ * @returns {object|null} The decoded payload of the JWT token or null if the token is invalid or cannot be decoded
99
+ */
100
+ const getTokenData = (token) => {
101
+ if (typeof token !== 'string') {
102
+ aioLogger.error('Invalid token provided to getTokenData :: not a string')
103
+ return null
104
+ }
105
+ try {
106
+ return getImsTokenData(token)
107
+ } catch (e) {
108
+ aioLogger.error('Error decoding token payload in getTokenData ::', e)
109
+ return null
110
+ }
111
+ }
112
+
93
113
  module.exports = {
94
114
  getAccessToken,
115
+ getTokenData,
95
116
  bearerAuthHandler,
96
117
  setRuntimeApiHostAndAuthHandler
97
118
  }