@adobe/aio-cli-plugin-app 8.6.0 → 8.6.1-pre.2022-06-25.2ab6c018

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 (38) hide show
  1. package/README.md +685 -256
  2. package/oclif.manifest.json +1 -1
  3. package/package.json +23 -27
  4. package/src/AddCommand.js +3 -3
  5. package/src/BaseCommand.js +5 -6
  6. package/src/commands/app/add/action.js +4 -4
  7. package/src/commands/app/add/ci.js +2 -2
  8. package/src/commands/app/add/event.js +4 -4
  9. package/src/commands/app/add/extension.js +4 -4
  10. package/src/commands/app/add/index.js +3 -3
  11. package/src/commands/app/add/service.js +3 -3
  12. package/src/commands/app/add/web-assets.js +4 -4
  13. package/src/commands/app/build.js +12 -12
  14. package/src/commands/app/config/get/index.js +3 -3
  15. package/src/commands/app/config/index.js +3 -3
  16. package/src/commands/app/config/set/index.js +3 -3
  17. package/src/commands/app/create.js +3 -3
  18. package/src/commands/app/delete/action.js +3 -3
  19. package/src/commands/app/delete/ci.js +3 -3
  20. package/src/commands/app/delete/event.js +3 -3
  21. package/src/commands/app/delete/extension.js +6 -6
  22. package/src/commands/app/delete/index.js +3 -3
  23. package/src/commands/app/delete/web-assets.js +3 -3
  24. package/src/commands/app/deploy.js +19 -21
  25. package/src/commands/app/get-url.js +7 -7
  26. package/src/commands/app/index.js +3 -3
  27. package/src/commands/app/info.js +7 -7
  28. package/src/commands/app/init.js +11 -10
  29. package/src/commands/app/list/extension-points.js +4 -4
  30. package/src/commands/app/list/extension.js +4 -4
  31. package/src/commands/app/list/index.js +3 -3
  32. package/src/commands/app/logs.js +9 -9
  33. package/src/commands/app/run.js +9 -10
  34. package/src/commands/app/test.js +7 -7
  35. package/src/commands/app/undeploy.js +10 -10
  36. package/src/commands/app/use.js +11 -11
  37. package/src/lib/build-actions.js +3 -2
  38. package/src/lib/run-dev.js +1 -1
@@ -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']
@@ -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,12 +12,12 @@ 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
 
@@ -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'
@@ -12,13 +12,11 @@ governing permissions and limitations under the License.
12
12
 
13
13
  const ora = require('ora')
14
14
  const chalk = require('chalk')
15
- // const path = require('path')
16
- const { cli } = require('cli-ux')
17
15
 
18
16
  const BaseCommand = require('../../BaseCommand')
19
17
  const BuildCommand = require('./build')
20
18
  const webLib = require('@adobe/aio-lib-web')
21
- const { flags } = require('@oclif/command')
19
+ const { Flags, CliUx: { ux: cli } } = require('@oclif/core')
22
20
  const { createWebExportFilter, runScript, buildExtensionPointPayloadWoMetadata, buildExcShellViewExtensionMetadata } = require('../../lib/app-helper')
23
21
  const rtLib = require('@adobe/aio-lib-runtime')
24
22
  const LogForwarding = require('../../lib/log-forwarding')
@@ -26,7 +24,7 @@ const LogForwarding = require('../../lib/log-forwarding')
26
24
  class Deploy extends BuildCommand {
27
25
  async run () {
28
26
  // cli input
29
- const { flags } = this.parse(Deploy)
27
+ const { flags } = await this.parse(Deploy)
30
28
 
31
29
  // flags
32
30
  flags['web-assets'] = flags['web-assets'] && !flags['skip-web-assets'] && !flags['skip-static'] && !flags.action
@@ -260,80 +258,80 @@ This will always force a rebuild unless --no-force-build is set.
260
258
 
261
259
  Deploy.flags = {
262
260
  ...BaseCommand.flags,
263
- 'skip-build': flags.boolean({
261
+ 'skip-build': Flags.boolean({
264
262
  description: '[deprecated] Please use --no-build'
265
263
  }),
266
- 'skip-deploy': flags.boolean({
264
+ 'skip-deploy': Flags.boolean({
267
265
  description: '[deprecated] Please use \'aio app build\''
268
266
  }),
269
- 'skip-static': flags.boolean({
267
+ 'skip-static': Flags.boolean({
270
268
  description: '[deprecated] Please use --no-web-assets'
271
269
  }),
272
- 'skip-web-assets': flags.boolean({
270
+ 'skip-web-assets': Flags.boolean({
273
271
  description: '[deprecated] Please use --no-web-assets'
274
272
  }),
275
- 'skip-actions': flags.boolean({
273
+ 'skip-actions': Flags.boolean({
276
274
  description: '[deprecated] Please use --no-actions'
277
275
  }),
278
- actions: flags.boolean({
276
+ actions: Flags.boolean({
279
277
  description: '[default: true] Deploy actions if any',
280
278
  default: true,
281
279
  allowNo: true,
282
280
  exclusive: ['action'] // should be action exclusive --no-action but see https://github.com/oclif/oclif/issues/600
283
281
  }),
284
- action: flags.string({
282
+ action: Flags.string({
285
283
  description: 'Deploy only a specific action, the flags can be specified multiple times, this will set --no-publish',
286
284
  char: 'a',
287
285
  exclusive: ['extension'],
288
286
  multiple: true
289
287
  }),
290
- 'web-assets': flags.boolean({
288
+ 'web-assets': Flags.boolean({
291
289
  description: '[default: true] Deploy web-assets if any',
292
290
  default: true,
293
291
  allowNo: true
294
292
  }),
295
- build: flags.boolean({
293
+ build: Flags.boolean({
296
294
  description: '[default: true] Run the build phase before deployment',
297
295
  default: true,
298
296
  allowNo: true
299
297
  }),
300
- 'force-build': flags.boolean({
298
+ 'force-build': Flags.boolean({
301
299
  description: '[default: true] Force a build even if one already exists',
302
300
  exclusive: ['no-build'], // no-build
303
301
  default: true,
304
302
  allowNo: true
305
303
  }),
306
- 'content-hash': flags.boolean({
304
+ 'content-hash': Flags.boolean({
307
305
  description: '[default: true] Enable content hashing in browser code',
308
306
  default: true,
309
307
  allowNo: true
310
308
  }),
311
- open: flags.boolean({
309
+ open: Flags.boolean({
312
310
  description: 'Open the default web browser after a successful deploy, only valid if your app has a front-end',
313
311
  default: false
314
312
  }),
315
- extension: flags.string({
313
+ extension: Flags.string({
316
314
  description: 'Deploy only a specific extension, the flags can be specified multiple times',
317
315
  exclusive: ['action'],
318
316
  char: 'e',
319
317
  multiple: true
320
318
  }),
321
- publish: flags.boolean({
319
+ publish: Flags.boolean({
322
320
  description: '[default: true] Publish extension(s) to Exchange',
323
321
  allowNo: true,
324
322
  default: true,
325
323
  exclusive: ['action']
326
324
  }),
327
- 'force-publish': flags.boolean({
325
+ 'force-publish': Flags.boolean({
328
326
  description: 'Force publish extension(s) to Exchange, delete previously published extension points',
329
327
  default: false,
330
328
  exclusive: ['action', 'publish'] // no-publish is excluded
331
329
  }),
332
- 'web-optimize': flags.boolean({
330
+ 'web-optimize': Flags.boolean({
333
331
  description: '[default: false] Enable optimization (minification) of web js/css/html',
334
332
  default: false
335
333
  }),
336
- 'log-forwarding-update': flags.boolean({
334
+ 'log-forwarding-update': Flags.boolean({
337
335
  description: '[default: true] Update log forwarding configuration on server',
338
336
  default: true,
339
337
  allowNo: true
@@ -12,7 +12,7 @@ governing permissions and limitations under the License.
12
12
 
13
13
  const chalk = require('chalk')
14
14
 
15
- const { flags } = require('@oclif/command')
15
+ const { Flags } = require('@oclif/core')
16
16
 
17
17
  const BaseCommand = require('../../BaseCommand')
18
18
  const { wrapError } = require('../../lib/app-helper')
@@ -23,7 +23,7 @@ const { loadLocalDevConfig } = require('../../lib/run-local-runtime')
23
23
  class GetUrlCommand extends BaseCommand {
24
24
  async run () {
25
25
  // cli input
26
- const { args, flags } = this.parse(GetUrlCommand)
26
+ const { args, flags } = await this.parse(GetUrlCommand)
27
27
 
28
28
  try {
29
29
  const options = {}
@@ -96,22 +96,22 @@ GetUrlCommand.description = 'Get action URLs'
96
96
 
97
97
  GetUrlCommand.flags = {
98
98
  ...BaseCommand.flags,
99
- cdn: flags.boolean({
99
+ cdn: Flags.boolean({
100
100
  description: 'Display CDN based action URLs'
101
101
  }),
102
- json: flags.boolean({
102
+ json: Flags.boolean({
103
103
  description: 'Output json',
104
104
  char: 'j'
105
105
  }),
106
- hson: flags.boolean({
106
+ hson: Flags.boolean({
107
107
  description: 'Output human readable json',
108
108
  char: 'h'
109
109
  }),
110
- yml: flags.boolean({
110
+ yml: Flags.boolean({
111
111
  description: 'Output yml',
112
112
  char: 'y'
113
113
  }),
114
- local: flags.boolean({
114
+ local: Flags.boolean({
115
115
  description: 'Display locally based action URLs'
116
116
  })
117
117
  }
@@ -10,13 +10,13 @@ OF ANY KIND, either express or implied. See the License for the specific languag
10
10
  governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- const HHelp = require('@oclif/plugin-help').default
13
+ const { Help } = require('@oclif/core')
14
14
  const BaseCommand = require('../../BaseCommand')
15
15
 
16
16
  class IndexCommand extends BaseCommand {
17
17
  async run () {
18
- const help = new HHelp(this.config)
19
- help.showHelp(['app', '--help'])
18
+ const help = new Help(this.config)
19
+ await help.showHelp(['app', '--help'])
20
20
  }
21
21
  }
22
22
 
@@ -11,14 +11,14 @@ governing permissions and limitations under the License.
11
11
  */
12
12
 
13
13
  const BaseCommand = require('../../BaseCommand')
14
- const { flags } = require('@oclif/command')
14
+ const { Flags } = require('@oclif/core')
15
15
  const yaml = require('js-yaml')
16
16
  const deepCopy = require('lodash.clonedeep')
17
17
 
18
18
  class Info extends BaseCommand {
19
19
  async run () {
20
20
  // cli input
21
- const { flags } = this.parse(Info)
21
+ const { flags } = await this.parse(Info)
22
22
  const appConfig = deepCopy(this.getFullConfig({ allowNoImpl: true }))
23
23
 
24
24
  // includes .env secret delete all aio config for now
@@ -39,7 +39,7 @@ class Info extends BaseCommand {
39
39
  this.log(JSON.stringify(appConfig))
40
40
  } else if (flags.yml) {
41
41
  // remove undefined fields
42
- this.log(yaml.safeDump(JSON.parse(JSON.stringify(appConfig))))
42
+ this.log(yaml.safeDump(JSON.parse(JSON.stringify(appConfig)), {}))
43
43
  } else { // flags.hson
44
44
  this.log(JSON.stringify(appConfig, null, 2))
45
45
  }
@@ -56,23 +56,23 @@ Info.description = `Display settings/configuration in use by an Adobe I/O App
56
56
 
57
57
  Info.flags = {
58
58
  ...BaseCommand.flags,
59
- json: flags.boolean({
59
+ json: Flags.boolean({
60
60
  description: 'Output json',
61
61
  char: 'j',
62
62
  exclusive: ['hson', 'yml']
63
63
  }),
64
- hson: flags.boolean({
64
+ hson: Flags.boolean({
65
65
  default: true,
66
66
  description: 'Output human readable json',
67
67
  char: 'h',
68
68
  exclusive: ['json', 'yml']
69
69
  }),
70
- yml: flags.boolean({
70
+ yml: Flags.boolean({
71
71
  description: 'Output yml',
72
72
  char: 'y',
73
73
  exclusive: ['hson', 'json']
74
74
  }),
75
- mask: flags.boolean({
75
+ mask: Flags.boolean({
76
76
  description: 'Hide known private info',
77
77
  default: true,
78
78
  allowNo: true
@@ -16,7 +16,7 @@ const fs = require('fs-extra')
16
16
  const ora = require('ora')
17
17
  const chalk = require('chalk')
18
18
  // const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:init', { provider: 'debug' })
19
- const { flags } = require('@oclif/command')
19
+ const { Flags } = require('@oclif/core')
20
20
  const generators = require('@adobe/generator-aio-app')
21
21
 
22
22
  const { loadAndValidateConfigFile, importConfigJson } = require('../../lib/import')
@@ -29,7 +29,7 @@ const DEFAULT_WORKSPACE = 'Stage'
29
29
 
30
30
  class InitCommand extends AddCommand {
31
31
  async run () {
32
- const { args, flags } = this.parse(InitCommand)
32
+ const { args, flags } = await this.parse(InitCommand)
33
33
 
34
34
  if (!flags.login && flags.workspace !== DEFAULT_WORKSPACE) {
35
35
  this.error('--no-login and --workspace flags cannot be used together.')
@@ -132,7 +132,8 @@ class InitCommand extends AddCommand {
132
132
  const isTermAccepted = await consoleCLI.checkDevTermsForOrg(orgId)
133
133
  if (!isTermAccepted) {
134
134
  const terms = await consoleCLI.getDevTermsForOrg()
135
- const confirmDevTerms = await consoleCLI.prompt.promptConfirm(terms.text)
135
+ const confirmDevTerms = await consoleCLI.prompt.promptConfirm(`${terms.text}
136
+ \nDo you agree with the new Developer Terms?`)
136
137
  if (!confirmDevTerms) {
137
138
  this.error('The Developer Terms of Service were declined')
138
139
  } else {
@@ -328,38 +329,38 @@ InitCommand.description = `Create a new Adobe I/O App
328
329
 
329
330
  InitCommand.flags = {
330
331
  ...AddCommand.flags,
331
- yes: flags.boolean({
332
+ yes: Flags.boolean({
332
333
  description: 'Skip questions, and use all default values',
333
334
  default: false,
334
335
  char: 'y'
335
336
  }),
336
- import: flags.string({
337
+ import: Flags.string({
337
338
  description: 'Import an Adobe I/O Developer Console configuration file',
338
339
  char: 'i'
339
340
  }),
340
- login: flags.boolean({
341
+ login: Flags.boolean({
341
342
  description: 'Login using your Adobe ID for interacting with Adobe I/O Developer Console',
342
343
  default: true,
343
344
  allowNo: true
344
345
  }),
345
- extensions: flags.boolean({
346
+ extensions: Flags.boolean({
346
347
  description: 'Use --no-extensions to create a blank application that does not integrate with Exchange',
347
348
  default: true,
348
349
  allowNo: true
349
350
  }),
350
- extension: flags.string({
351
+ extension: Flags.string({
351
352
  description: 'Extension point(s) to implement',
352
353
  char: 'e',
353
354
  multiple: true,
354
355
  exclusive: ['extensions']
355
356
  }),
356
- workspace: flags.string({
357
+ workspace: Flags.string({
357
358
  description: 'Specify the Adobe Developer Console Workspace to init from, defaults to Stage',
358
359
  default: DEFAULT_WORKSPACE,
359
360
  char: 'w',
360
361
  exclusive: ['import'] // also no-login
361
362
  }),
362
- 'confirm-new-workspace': flags.boolean({
363
+ 'confirm-new-workspace': Flags.boolean({
363
364
  description: 'Skip and confirm prompt for creating a new workspace',
364
365
  default: false
365
366
  })