@adobe/aio-cli-plugin-app 10.3.0 → 10.3.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
@@ -71,7 +71,7 @@ DESCRIPTION
71
71
  Create, run, test, and deploy Adobe I/O Apps
72
72
  ```
73
73
 
74
- _See code: [src/commands/app/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/10.3.0/src/commands/app/index.js)_
74
+ _See code: [src/commands/app/index.js](https://github.com/adobe/aio-cli-plugin-app/blob/10.3.1/src/commands/app/index.js)_
75
75
 
76
76
  ## `aio app add`
77
77
 
@@ -631,12 +631,14 @@ Undeploys an Adobe I/O App
631
631
 
632
632
  ```
633
633
  USAGE
634
- $ aio app undeploy [-v] [--version] [--actions] [--web-assets] [-e <value>] [--force-unpublish | --unpublish]
634
+ $ aio app undeploy [-v] [--version] [--actions] [--events] [--web-assets] [-e <value>] [--force-unpublish |
635
+ --unpublish]
635
636
 
636
637
  FLAGS
637
638
  -e, --extension=<value>... Undeploy only a specific extension, the flags can be specified multiple times
638
639
  -v, --verbose Verbose output
639
640
  --[no-]actions [default: true] Undeploy actions if any
641
+ --[no-]events [default: true] Undeploy (unregister) events if any
640
642
  --force-unpublish Force unpublish extension(s) from Exchange, will delete all extension points
641
643
  --[no-]unpublish [default: true] Unpublish selected extension(s) from Exchange
642
644
  --version Show version
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "10.3.0",
2
+ "version": "10.3.1",
3
3
  "commands": {
4
4
  "app:build": {
5
5
  "id": "app:build",
@@ -815,6 +815,12 @@
815
815
  "description": "[default: true] Undeploy actions if any",
816
816
  "allowNo": true
817
817
  },
818
+ "events": {
819
+ "name": "events",
820
+ "type": "boolean",
821
+ "description": "[default: true] Undeploy (unregister) events if any",
822
+ "allowNo": true
823
+ },
818
824
  "web-assets": {
819
825
  "name": "web-assets",
820
826
  "type": "boolean",
@@ -842,6 +848,13 @@
842
848
  "exclusive": [
843
849
  "unpublish"
844
850
  ]
851
+ },
852
+ "feature-event-hooks": {
853
+ "name": "feature-event-hooks",
854
+ "type": "boolean",
855
+ "description": "[default: false] Enable event hooks feature",
856
+ "hidden": true,
857
+ "allowNo": true
845
858
  }
846
859
  },
847
860
  "args": {}
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": "10.3.0",
4
+ "version": "10.3.1",
5
5
  "author": "Adobe Inc.",
6
6
  "bugs": "https://github.com/adobe/aio-cli-plugin-app/issues",
7
7
  "dependencies": {
@@ -118,6 +118,14 @@ class Undeploy extends BaseCommand {
118
118
 
119
119
  try {
120
120
  await runScript(config.hooks['post-app-undeploy'])
121
+ if (flags['feature-event-hooks'] && flags.events) {
122
+ this.log('feature-event-hooks is enabled, running post-undeploy-event-reg hook')
123
+ const hookResults = await this.config.runHook('post-undeploy-event-reg', { appConfig: config })
124
+ if (hookResults?.failures?.length > 0) {
125
+ // output should be "Error : <plugin-name> : <error-message>\n" for each failure
126
+ this.error(hookResults.failures.map(f => `${f.plugin.name} : ${f.error.message}`).join('\nError: '), { exit: 1 })
127
+ }
128
+ }
121
129
  } catch (err) {
122
130
  this.log(err)
123
131
  }
@@ -147,6 +155,11 @@ Undeploy.flags = {
147
155
  default: true,
148
156
  allowNo: true
149
157
  }),
158
+ events: Flags.boolean({
159
+ description: '[default: true] Undeploy (unregister) events if any',
160
+ default: true,
161
+ allowNo: true
162
+ }),
150
163
  'web-assets': Flags.boolean({
151
164
  description: '[default: true] Undeploy web-assets if any',
152
165
  default: true,
@@ -166,6 +179,12 @@ Undeploy.flags = {
166
179
  description: 'Force unpublish extension(s) from Exchange, will delete all extension points',
167
180
  default: false,
168
181
  exclusive: ['unpublish'] // unpublish is excluded
182
+ }),
183
+ 'feature-event-hooks': Flags.boolean({
184
+ description: '[default: false] Enable event hooks feature',
185
+ default: false,
186
+ allowNo: true,
187
+ hidden: true
169
188
  })
170
189
  }
171
190