@adobe/aio-cli-plugin-app 8.6.1 → 9.1.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.
Files changed (44) hide show
  1. package/README.md +687 -256
  2. package/bin/openwhisk-standalone-config/get-runtimes.js +52 -0
  3. package/bin/openwhisk-standalone-config/runtimes.json +16 -8
  4. package/oclif.manifest.json +1 -1
  5. package/package.json +46 -47
  6. package/schema/config.schema.json +12 -3
  7. package/src/AddCommand.js +3 -3
  8. package/src/BaseCommand.js +5 -6
  9. package/src/commands/app/add/action.js +8 -8
  10. package/src/commands/app/add/ci.js +4 -5
  11. package/src/commands/app/add/event.js +7 -7
  12. package/src/commands/app/add/extension.js +7 -7
  13. package/src/commands/app/add/index.js +3 -3
  14. package/src/commands/app/add/service.js +3 -3
  15. package/src/commands/app/add/web-assets.js +8 -8
  16. package/src/commands/app/build.js +14 -14
  17. package/src/commands/app/config/get/index.js +3 -3
  18. package/src/commands/app/config/index.js +3 -3
  19. package/src/commands/app/config/set/index.js +3 -3
  20. package/src/commands/app/create.js +3 -3
  21. package/src/commands/app/delete/action.js +3 -3
  22. package/src/commands/app/delete/ci.js +6 -6
  23. package/src/commands/app/delete/event.js +3 -3
  24. package/src/commands/app/delete/extension.js +6 -6
  25. package/src/commands/app/delete/index.js +3 -3
  26. package/src/commands/app/delete/web-assets.js +3 -3
  27. package/src/commands/app/deploy.js +19 -21
  28. package/src/commands/app/get-url.js +8 -8
  29. package/src/commands/app/index.js +3 -3
  30. package/src/commands/app/info.js +7 -7
  31. package/src/commands/app/init.js +17 -16
  32. package/src/commands/app/list/extension-points.js +5 -5
  33. package/src/commands/app/list/extension.js +5 -5
  34. package/src/commands/app/list/index.js +3 -3
  35. package/src/commands/app/logs.js +9 -9
  36. package/src/commands/app/run.js +10 -11
  37. package/src/commands/app/test.js +7 -7
  38. package/src/commands/app/undeploy.js +10 -10
  39. package/src/commands/app/use.js +11 -11
  40. package/src/lib/app-helper.js +2 -2
  41. package/src/lib/build-actions.js +3 -2
  42. package/src/lib/import.js +3 -6
  43. package/src/lib/run-dev.js +4 -4
  44. package/src/lib/vscode.js +3 -3
@@ -12,7 +12,7 @@ governing permissions and limitations under the License.
12
12
  const AddCommand = require('../../../AddCommand')
13
13
  const yeoman = require('yeoman-environment')
14
14
  const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:add:action', { provider: 'debug' })
15
- const { flags } = require('@oclif/command')
15
+ const { Flags } = require('@oclif/core')
16
16
  const ora = require('ora')
17
17
  const path = require('path')
18
18
  const generators = require('@adobe/generator-aio-app')
@@ -21,7 +21,7 @@ const aioConfigLoader = require('@adobe/aio-lib-core-config')
21
21
 
22
22
  class AddActionCommand extends AddCommand {
23
23
  async run () {
24
- const { flags } = this.parse(AddActionCommand)
24
+ const { flags } = await this.parse(AddActionCommand)
25
25
 
26
26
  aioLogger.debug(`add actions with flags: ${JSON.stringify(flags)}`)
27
27
  const spinner = ora()
@@ -46,6 +46,8 @@ class AddActionCommand extends AddCommand {
46
46
  const supportedOrgServices = aioConfigLoader.get('project.org.details.services') || []
47
47
 
48
48
  const env = yeoman.createEnv()
49
+ // by default yeoman runs the install, we control installation from the app plugin
50
+ env.options = { skipInstall: true }
49
51
  const addActionGen = env.instantiate(generators['add-action'], {
50
52
  options: {
51
53
  'skip-prompt': flags.yes,
@@ -53,10 +55,8 @@ class AddActionCommand extends AddCommand {
53
55
  'config-path': configData.file,
54
56
  'adobe-services': servicesToGeneratorInput(workspaceServices),
55
57
  'supported-adobe-services': servicesToGeneratorInput(supportedOrgServices),
56
- 'full-key-to-manifest': configData.key,
57
- // force: true,
58
- // by default yeoman runs the install, we control installation from the app plugin
59
- 'skip-install': true
58
+ 'full-key-to-manifest': configData.key
59
+ // force: true
60
60
  }
61
61
  })
62
62
  await env.runGenerator(addActionGen)
@@ -69,12 +69,12 @@ AddActionCommand.description = `Add new actions
69
69
  `
70
70
 
71
71
  AddActionCommand.flags = {
72
- yes: flags.boolean({
72
+ yes: Flags.boolean({
73
73
  description: 'Skip questions, and use all default values',
74
74
  default: false,
75
75
  char: 'y'
76
76
  }),
77
- extension: flags.string({
77
+ extension: Flags.string({
78
78
  description: 'Add actions to a specific extension',
79
79
  char: 'e',
80
80
  multiple: false,
@@ -16,17 +16,16 @@ const generators = require('@adobe/generator-aio-app')
16
16
 
17
17
  class AddCICommand extends BaseCommand {
18
18
  async run () {
19
- const { args, flags } = this.parse(AddCICommand)
19
+ const { args, flags } = await this.parse(AddCICommand)
20
20
 
21
21
  aioLogger.debug(`adding component ${args.component} to the project, using flags: ${flags}`)
22
22
 
23
23
  const env = yeoman.createEnv()
24
+ // by default yeoman runs the install, we control installation from the app plugin
25
+ env.options = { skipInstall: true }
24
26
  const gen = env.instantiate(
25
27
  generators['add-ci'], {
26
- options: {
27
- // by default yeoman runs the install, we control installation from the app plugin
28
- 'skip-install': true
29
- }
28
+ options: { }
30
29
  })
31
30
  await env.runGenerator(gen)
32
31
  }
@@ -12,14 +12,14 @@ governing permissions and limitations under the License.
12
12
  const AddCommand = require('../../../AddCommand')
13
13
  const yeoman = require('yeoman-environment')
14
14
  const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:add:event', { provider: 'debug' })
15
- const { flags } = require('@oclif/command')
15
+ const { Flags } = require('@oclif/core')
16
16
  const ora = require('ora')
17
17
  const path = require('path')
18
18
  const generators = require('@adobe/generator-aio-app')
19
19
 
20
20
  class AddEventCommand extends AddCommand {
21
21
  async run () {
22
- const { flags } = this.parse(AddEventCommand)
22
+ const { flags } = await this.parse(AddEventCommand)
23
23
 
24
24
  aioLogger.debug(`add events with flags: ${JSON.stringify(flags)}`)
25
25
  const spinner = ora()
@@ -35,6 +35,8 @@ class AddEventCommand extends AddCommand {
35
35
  const configData = this.getRuntimeManifestConfigFile(configName)
36
36
 
37
37
  const env = yeoman.createEnv()
38
+ // by default yeoman runs the install, we control installation from the app plugin
39
+ env.options = { skipInstall: true }
38
40
  const eventsGen = env.instantiate(generators['add-events'], {
39
41
  options: {
40
42
  'skip-prompt': flags.yes,
@@ -42,9 +44,7 @@ class AddEventCommand extends AddCommand {
42
44
  'config-path': configData.file,
43
45
  'full-key-to-manifest': configData.key,
44
46
  // force overwrites, no useless prompts, this is a feature exposed by yeoman itself
45
- force: true,
46
- // by default yeoman runs the install, we control installation from the app plugin
47
- 'skip-install': true
47
+ force: true
48
48
  }
49
49
  })
50
50
  await env.runGenerator(eventsGen)
@@ -57,12 +57,12 @@ AddEventCommand.description = `Add a new Adobe I/O Events action
57
57
  `
58
58
 
59
59
  AddEventCommand.flags = {
60
- yes: flags.boolean({
60
+ yes: Flags.boolean({
61
61
  description: 'Skip questions, and use all default values',
62
62
  default: false,
63
63
  char: 'y'
64
64
  }),
65
- extension: flags.string({
65
+ extension: Flags.string({
66
66
  description: 'Add actions to a specific extension',
67
67
  char: 'e',
68
68
  multiple: false,
@@ -12,7 +12,7 @@ governing permissions and limitations under the License.
12
12
  const AddCommand = require('../../../AddCommand')
13
13
  const yeoman = require('yeoman-environment')
14
14
  const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:add:action', { provider: 'debug' })
15
- const { flags } = require('@oclif/command')
15
+ const { Flags } = require('@oclif/core')
16
16
  const ora = require('ora')
17
17
 
18
18
  const { atLeastOne } = require('../../../lib/app-helper')
@@ -22,7 +22,7 @@ const chalk = require('chalk')
22
22
 
23
23
  class AddExtensionCommand extends AddCommand {
24
24
  async run () {
25
- const { flags } = this.parse(AddExtensionCommand)
25
+ const { flags } = await this.parse(AddExtensionCommand)
26
26
 
27
27
  aioLogger.debug(`add extensions with flags: ${JSON.stringify(flags)}`)
28
28
  const spinner = ora()
@@ -91,6 +91,8 @@ class AddExtensionCommand extends AddCommand {
91
91
 
92
92
  async runCodeGenerators (flags, implementations) {
93
93
  const env = yeoman.createEnv()
94
+ // by default yeoman runs the install, we control installation from the app plugin
95
+ env.options = { skipInstall: true }
94
96
  for (let i = 0; i < implementations.length; ++i) {
95
97
  const implementation = implementations[i]
96
98
  const gen = env.instantiate(implementation.generator,
@@ -98,9 +100,7 @@ class AddExtensionCommand extends AddCommand {
98
100
  options: {
99
101
  'skip-prompt': flags.yes,
100
102
  // no yeoman overwrite prompts
101
- force: true,
102
- // by default yeoman runs the install, we control installation from the app plugin
103
- 'skip-install': true
103
+ force: true
104
104
  }
105
105
  })
106
106
  this.log(chalk.blue(chalk.bold(`Running generator for ${implementation.name}`)))
@@ -112,12 +112,12 @@ class AddExtensionCommand extends AddCommand {
112
112
  AddExtensionCommand.description = `Add new extensions or a standalone application to the project
113
113
  `
114
114
  AddExtensionCommand.flags = {
115
- yes: flags.boolean({
115
+ yes: Flags.boolean({
116
116
  description: 'Skip questions, and use all default values',
117
117
  default: false,
118
118
  char: 'y'
119
119
  }),
120
- extension: flags.string({
120
+ extension: Flags.string({
121
121
  description: 'Specify extensions to add, skips selection prompt',
122
122
  char: 'e',
123
123
  multiple: true
@@ -9,13 +9,13 @@ 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 HHelp = require('@oclif/plugin-help').default
12
+ const { Help } = require('@oclif/core')
13
13
  const BaseCommand = require('../../../BaseCommand')
14
14
 
15
15
  class AddCommand extends BaseCommand {
16
16
  async run () {
17
- const help = new HHelp(this.config)
18
- help.showHelp(['app:add', '--help'])
17
+ const help = new Help(this.config)
18
+ await help.showHelp(['app:add', '--help'])
19
19
  }
20
20
  }
21
21
 
@@ -26,7 +26,7 @@ const { ENTP_INT_CERTS_FOLDER } = require('../../../lib/defaults')
26
26
 
27
27
  class AddServiceCommand extends BaseCommand {
28
28
  async run () {
29
- const { flags } = this.parse(AddServiceCommand)
29
+ const { flags } = await this.parse(AddServiceCommand)
30
30
 
31
31
  aioLogger.debug(`adding services to the current workspace, using flags: ${JSON.stringify(flags, null, 2)}`)
32
32
 
@@ -80,7 +80,7 @@ class AddServiceCommand extends BaseCommand {
80
80
  const currentServiceCodesSet = new Set(currentServiceProperties.map(s => s.sdkCode))
81
81
  const filteredServices = supportedServices.filter(s => s.type === 'entp' && !currentServiceCodesSet.has(s.code))
82
82
  if (filteredServices.length <= 0) {
83
- this.cleanConsoleCLIOutput()
83
+ await this.cleanConsoleCLIOutput()
84
84
  this.error(`All supported Services in the Organization have already been added to Workspace ${workspace.name}`)
85
85
  }
86
86
  // prompt to manually select services
@@ -92,7 +92,7 @@ class AddServiceCommand extends BaseCommand {
92
92
  newServiceProperties.push(...currentServiceProperties)
93
93
  }
94
94
  if (op === 'clone') {
95
- // get latest workspaces which are not the current
95
+ // get the latest workspaces which are not the current
96
96
  const otherWorkspaces = (
97
97
  await consoleCLI.getWorkspaces(orgId, project.id)
98
98
  ).filter(w => w.id !== workspace.id)
@@ -12,7 +12,7 @@ governing permissions and limitations under the License.
12
12
  const AddCommand = require('../../../AddCommand')
13
13
  const yeoman = require('yeoman-environment')
14
14
  const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:add:web-assets', { provider: 'debug' })
15
- const { flags } = require('@oclif/command')
15
+ const { Flags } = require('@oclif/core')
16
16
  const ora = require('ora')
17
17
  const generators = require('@adobe/generator-aio-app')
18
18
  const aioConfigLoader = require('@adobe/aio-lib-core-config')
@@ -20,7 +20,7 @@ const { servicesToGeneratorInput } = require('../../../lib/app-helper')
20
20
 
21
21
  class AddWebAssetsCommand extends AddCommand {
22
22
  async run () {
23
- const { flags } = this.parse(AddWebAssetsCommand)
23
+ const { flags } = await this.parse(AddWebAssetsCommand)
24
24
  const spinner = ora()
25
25
  aioLogger.debug(`add web-assets with flags: ${JSON.stringify(flags)}`)
26
26
 
@@ -39,15 +39,15 @@ class AddWebAssetsCommand extends AddCommand {
39
39
  []
40
40
 
41
41
  const env = yeoman.createEnv()
42
+ // by default yeoman runs the install, we control installation from the app plugin
43
+ env.options = { skipInstall: true }
42
44
  const gen = env.instantiate(generators['add-web-assets'], {
43
45
  options: {
44
46
  'skip-prompt': flags.yes,
45
47
  'project-name': projectName,
46
48
  'web-src-folder': webSrcFolder,
47
- 'adobe-services': servicesToGeneratorInput(workspaceServices),
48
- // force: true,
49
- // by default yeoman runs the install, we control installation from the app plugin
50
- 'skip-install': true
49
+ 'adobe-services': servicesToGeneratorInput(workspaceServices)
50
+ // force: true
51
51
  }
52
52
  })
53
53
  await env.runGenerator(gen)
@@ -60,12 +60,12 @@ AddWebAssetsCommand.description = `Add web assets support
60
60
  `
61
61
 
62
62
  AddWebAssetsCommand.flags = {
63
- yes: flags.boolean({
63
+ yes: Flags.boolean({
64
64
  description: 'Skip questions, and use all default values',
65
65
  default: false,
66
66
  char: 'y'
67
67
  }),
68
- extension: flags.string({
68
+ extension: Flags.string({
69
69
  description: 'Add web-assets to a specific extension',
70
70
  char: 'e',
71
71
  multiple: false,
@@ -14,7 +14,7 @@ const ora = require('ora')
14
14
  const chalk = require('chalk')
15
15
 
16
16
  const BaseCommand = require('../../BaseCommand')
17
- const { flags } = require('@oclif/command')
17
+ const { Flags } = require('@oclif/core')
18
18
  const { runScript, writeConfig } = require('../../lib/app-helper')
19
19
  const RuntimeLib = require('@adobe/aio-lib-runtime')
20
20
  const { bundle } = require('@adobe/aio-lib-web')
@@ -24,7 +24,7 @@ const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-
24
24
  class Build extends BaseCommand {
25
25
  async run () {
26
26
  // cli input
27
- const { flags } = this.parse(Build)
27
+ const { flags } = await this.parse(Build)
28
28
  // flags
29
29
  flags['web-assets'] = flags['web-assets'] && !flags['skip-static'] && !flags['skip-web-assets'] && !flags.action
30
30
  flags.actions = flags.actions && !flags['skip-actions']
@@ -110,14 +110,14 @@ class Build extends BaseCommand {
110
110
  if (script) {
111
111
  spinner.fail(chalk.green(`build-static skipped by hook '${name}'`))
112
112
  } else {
113
- const entryFile = config.web.src + '/index.html'
113
+ const entries = config.web.src + '/**/*.html'
114
114
  const bundleOptions = {
115
115
  shouldDisableCache: true,
116
116
  shouldContentHash: flags['content-hash'],
117
117
  shouldOptimize: flags['web-optimize'],
118
118
  logLevel: flags.verbose ? 'verbose' : 'warn'
119
119
  }
120
- const bundler = await bundle(entryFile, config.web.distProd, bundleOptions, onProgress)
120
+ const bundler = await bundle(entries, config.web.distProd, bundleOptions, onProgress)
121
121
  await bundler.run()
122
122
  spinner.succeed(chalk.green(`Building web assets for '${name}'`))
123
123
  }
@@ -144,47 +144,47 @@ This will always force a rebuild unless --no-force-build is set.
144
144
 
145
145
  Build.flags = {
146
146
  ...BaseCommand.flags,
147
- 'skip-static': flags.boolean({
147
+ 'skip-static': Flags.boolean({
148
148
  description: '[deprecated] Please use --no-web-assets'
149
149
  }),
150
- 'skip-web-assets': flags.boolean({
150
+ 'skip-web-assets': Flags.boolean({
151
151
  description: '[deprecated] Please use --no-web-assets'
152
152
  }),
153
- 'skip-actions': flags.boolean({
153
+ 'skip-actions': Flags.boolean({
154
154
  description: '[deprecated] Please use --no-actions'
155
155
  }),
156
- actions: flags.boolean({
156
+ actions: Flags.boolean({
157
157
  description: '[default: true] Build actions if any',
158
158
  default: true,
159
159
  allowNo: true,
160
160
  exclusive: ['action'] // should be action exclusive --no-action but see https://github.com/oclif/oclif/issues/600
161
161
  }),
162
- action: flags.string({
162
+ action: Flags.string({
163
163
  description: 'Build only a specific action, the flags can be specified multiple times, this will set --no-publish',
164
164
  char: 'a',
165
165
  exclusive: ['extension'],
166
166
  multiple: true
167
167
  }),
168
- 'web-assets': flags.boolean({
168
+ 'web-assets': Flags.boolean({
169
169
  description: '[default: true] Build web-assets if any',
170
170
  default: true,
171
171
  allowNo: true
172
172
  }),
173
- 'force-build': flags.boolean({
173
+ 'force-build': Flags.boolean({
174
174
  description: '[default: true] Force a build even if one already exists',
175
175
  default: true,
176
176
  allowNo: true
177
177
  }),
178
- 'content-hash': flags.boolean({
178
+ 'content-hash': Flags.boolean({
179
179
  description: '[default: true] Enable content hashing in browser code',
180
180
  default: true,
181
181
  allowNo: true
182
182
  }),
183
- 'web-optimize': flags.boolean({
183
+ 'web-optimize': Flags.boolean({
184
184
  description: '[default: false] Enable optimization (minification) of js/css/html',
185
185
  default: false
186
186
  }),
187
- extension: flags.string({
187
+ extension: Flags.string({
188
188
  description: 'Build only a specific extension point, the flags can be specified multiple times',
189
189
  exclusive: ['action'],
190
190
  multiple: true,
@@ -9,13 +9,13 @@ 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 HHelp = require('@oclif/plugin-help').default
12
+ const { Help } = require('@oclif/core')
13
13
  const BaseCommand = require('../../../../BaseCommand')
14
14
 
15
15
  class IndexCommand extends BaseCommand {
16
16
  async run () {
17
- const help = new HHelp(this.config)
18
- help.showHelp(['app:config:get', '--help'])
17
+ const help = new Help(this.config)
18
+ await help.showHelp(['app:config:get', '--help'])
19
19
  }
20
20
  }
21
21
 
@@ -9,13 +9,13 @@ 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 HHelp = require('@oclif/plugin-help').default
12
+ const { Help } = require('@oclif/core')
13
13
  const BaseCommand = require('../../../BaseCommand')
14
14
 
15
15
  class IndexCommand extends BaseCommand {
16
16
  async run () {
17
- const help = new HHelp(this.config)
18
- help.showHelp(['app:config', '--help'])
17
+ const help = new Help(this.config)
18
+ await help.showHelp(['app:config', '--help'])
19
19
  }
20
20
  }
21
21
 
@@ -9,13 +9,13 @@ 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 HHelp = require('@oclif/plugin-help').default
12
+ const { Help } = require('@oclif/core')
13
13
  const BaseCommand = require('../../../../BaseCommand')
14
14
 
15
15
  class IndexCommand extends BaseCommand {
16
16
  async run () {
17
- const help = new HHelp(this.config)
18
- help.showHelp(['app:config:set', '--help'])
17
+ const help = new Help(this.config)
18
+ await help.showHelp(['app:config:set', '--help'])
19
19
  }
20
20
  }
21
21
 
@@ -11,11 +11,11 @@ governing permissions and limitations under the License.
11
11
 
12
12
  const BaseCommand = require('../../BaseCommand')
13
13
  const InitCommand = require('./init')
14
- const { flags } = require('@oclif/command')
14
+ const { Flags } = require('@oclif/core')
15
15
 
16
16
  class Create extends BaseCommand {
17
17
  async run () {
18
- const { args, flags } = this.parse(Create)
18
+ const { args, flags } = await this.parse(Create)
19
19
 
20
20
  if (flags.import) {
21
21
  return InitCommand.run([args.path, '-y', '--import', flags.import])
@@ -29,7 +29,7 @@ Create.description = `Create a new Adobe I/O App with default parameters
29
29
 
30
30
  Create.flags = {
31
31
  ...BaseCommand.flags,
32
- import: flags.string({
32
+ import: Flags.string({
33
33
  description: 'Import an Adobe I/O Developer Console configuration file',
34
34
  char: 'i'
35
35
  })
@@ -12,7 +12,7 @@ governing permissions and limitations under the License.
12
12
  const BaseCommand = require('../../../BaseCommand')
13
13
  const inquirer = require('inquirer')
14
14
  const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:delete:action', { provider: 'debug' })
15
- const { flags } = require('@oclif/command')
15
+ const { Flags } = require('@oclif/core')
16
16
  const fs = require('fs-extra')
17
17
  const path = require('path')
18
18
  const chalk = require('chalk')
@@ -21,7 +21,7 @@ const { atLeastOne, deleteUserConfig } = require('../../../lib/app-helper')
21
21
 
22
22
  class DeleteActionCommand extends BaseCommand {
23
23
  async run () {
24
- const { args, flags } = this.parse(DeleteActionCommand)
24
+ const { args, flags } = await this.parse(DeleteActionCommand)
25
25
 
26
26
  aioLogger.debug(`deleting actions from the project, with args ${JSON.stringify(args)}, and flags: ${JSON.stringify(flags)}`)
27
27
 
@@ -145,7 +145,7 @@ DeleteActionCommand.description = `Delete existing actions
145
145
  `
146
146
 
147
147
  DeleteActionCommand.flags = {
148
- yes: flags.boolean({
148
+ yes: Flags.boolean({
149
149
  description: 'Skip questions, and use all default values',
150
150
  char: 'y',
151
151
  default: false
@@ -12,21 +12,21 @@ governing permissions and limitations under the License.
12
12
  const BaseCommand = require('../../../BaseCommand')
13
13
  const yeoman = require('yeoman-environment')
14
14
  const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:add:action', { provider: 'debug' })
15
- const { flags } = require('@oclif/command')
15
+ const { Flags } = require('@oclif/core')
16
16
  const generators = require('@adobe/generator-aio-app')
17
17
 
18
18
  class DeleteCICommand extends BaseCommand {
19
19
  async run () {
20
- const { flags } = this.parse(DeleteCICommand)
20
+ const { flags } = await this.parse(DeleteCICommand)
21
21
 
22
22
  aioLogger.debug(`deleting CI files from the project, using flags: ${JSON.stringify(flags)}`)
23
23
 
24
24
  const env = yeoman.createEnv()
25
+ // by default yeoman runs the install, we control installation from the app plugin
26
+ env.options = { skipInstall: true }
25
27
  const gen = env.instantiate(generators['delete-ci'], {
26
28
  options: {
27
- 'skip-prompt': flags.yes,
28
- // by default yeoman runs the install, we control installation from the app plugin
29
- 'skip-install': true
29
+ 'skip-prompt': flags.yes
30
30
  }
31
31
  })
32
32
  await env.runGenerator(gen)
@@ -37,7 +37,7 @@ DeleteCICommand.description = `Delete existing CI files
37
37
  `
38
38
 
39
39
  DeleteCICommand.flags = {
40
- yes: flags.boolean({
40
+ yes: Flags.boolean({
41
41
  description: 'Skip questions, and use all default values',
42
42
  default: false,
43
43
  char: 'y'
@@ -11,13 +11,13 @@ governing permissions and limitations under the License.
11
11
 
12
12
  const BaseCommand = require('../../../BaseCommand')
13
13
  const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:delete:event', { provider: 'debug' })
14
- const { flags } = require('@oclif/command')
14
+ const { Flags } = require('@oclif/core')
15
15
  const DeleteActionCommand = require('./action')
16
16
  const chalk = require('chalk')
17
17
 
18
18
  class DeleteEventCommand extends BaseCommand {
19
19
  async run () {
20
- const { args, flags } = this.parse(DeleteEventCommand)
20
+ const { args, flags } = await this.parse(DeleteEventCommand)
21
21
 
22
22
  aioLogger.debug(`deleting events from the project, with args ${JSON.stringify(args)}, and flags: ${JSON.stringify(flags)}`)
23
23
 
@@ -46,7 +46,7 @@ DeleteEventCommand.description = `Delete existing Adobe I/O Events actions
46
46
  `
47
47
 
48
48
  DeleteEventCommand.flags = {
49
- yes: flags.boolean({
49
+ yes: Flags.boolean({
50
50
  description: 'Skip questions, and use all default values',
51
51
  char: 'y',
52
52
  default: false
@@ -11,7 +11,7 @@ governing permissions and limitations under the License.
11
11
 
12
12
  const BaseCommand = require('../../../BaseCommand')
13
13
  const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:add:action', { provider: 'debug' })
14
- const { flags } = require('@oclif/command')
14
+ const { Flags } = require('@oclif/core')
15
15
 
16
16
  const { atLeastOne, deleteUserConfig } = require('../../../lib/app-helper')
17
17
  const { implPromptChoices } = require('../../../lib/defaults')
@@ -21,7 +21,7 @@ const { EOL } = require('os')
21
21
 
22
22
  class DeleteExtensionCommand extends BaseCommand {
23
23
  async run () {
24
- const { flags } = this.parse(DeleteExtensionCommand)
24
+ const { flags } = await this.parse(DeleteExtensionCommand)
25
25
 
26
26
  aioLogger.debug(`delete extension with flags: ${JSON.stringify(flags)}`)
27
27
 
@@ -102,19 +102,19 @@ class DeleteExtensionCommand extends BaseCommand {
102
102
  }
103
103
  }
104
104
 
105
- DeleteExtensionCommand.description = `Add new extensions or a standalone application to the project
105
+ DeleteExtensionCommand.description = `Delete existing extensions
106
106
  `
107
107
  DeleteExtensionCommand.flags = {
108
- yes: flags.boolean({
108
+ yes: Flags.boolean({
109
109
  description: 'Skip questions, and use all default values',
110
110
  default: false,
111
111
  char: 'y'
112
112
  }),
113
- 'skip-install': flags.boolean({
113
+ 'skip-install': Flags.boolean({
114
114
  description: 'Skip npm installation after files are created',
115
115
  default: false
116
116
  }),
117
- extension: flags.string({
117
+ extension: Flags.string({
118
118
  description: 'Specify extensions to delete, skips selection prompt',
119
119
  char: 'e',
120
120
  multiple: true
@@ -9,13 +9,13 @@ 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 HHelp = require('@oclif/plugin-help').default
12
+ const { Help } = require('@oclif/core')
13
13
  const BaseCommand = require('../../../BaseCommand')
14
14
 
15
15
  class DeleteCommand extends BaseCommand {
16
16
  async run () {
17
- const help = new HHelp(this.config)
18
- help.showHelp(['app:delete', '--help'])
17
+ const help = new Help(this.config)
18
+ await help.showHelp(['app:delete', '--help'])
19
19
  }
20
20
  }
21
21
 
@@ -11,7 +11,7 @@ governing permissions and limitations under the License.
11
11
 
12
12
  const BaseCommand = require('../../../BaseCommand')
13
13
  const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:add:action', { provider: 'debug' })
14
- const { flags } = require('@oclif/command')
14
+ const { Flags } = require('@oclif/core')
15
15
  const fs = require('fs-extra')
16
16
  const inquirer = require('inquirer')
17
17
  const { atLeastOne } = require('../../../lib/app-helper')
@@ -21,7 +21,7 @@ const path = require('path')
21
21
 
22
22
  class DeleteWebAssetsCommand extends BaseCommand {
23
23
  async run () {
24
- const { flags } = this.parse(DeleteWebAssetsCommand)
24
+ const { flags } = await this.parse(DeleteWebAssetsCommand)
25
25
 
26
26
  aioLogger.debug(`deleting web assets from the project, using flags: ${JSON.stringify(flags)}`)
27
27
 
@@ -90,7 +90,7 @@ DeleteWebAssetsCommand.description = `Delete existing web assets
90
90
  `
91
91
 
92
92
  DeleteWebAssetsCommand.flags = {
93
- yes: flags.boolean({
93
+ yes: Flags.boolean({
94
94
  description: 'Skip questions, and use all default values',
95
95
  default: false,
96
96
  char: 'y'