From 3e4f4f78eb29ebf5c981dcd47ae527ff7b3a463d Mon Sep 17 00:00:00 2001 From: Shazron Abdullah <36107+shazron@users.noreply.github.com> Date: Tue, 30 Apr 2024 08:12:06 +0800 Subject: [PATCH] feat: run add-vscode-config generator on app init (retooled local debugging) (#798) --- package.json | 2 +- src/commands/app/init.js | 2 +- test/commands/app/init.test.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 63d57de0..55aba7a6 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "@adobe/aio-lib-runtime": "^6", "@adobe/aio-lib-templates": "^3", "@adobe/aio-lib-web": "^7", - "@adobe/generator-aio-app": "^7", + "@adobe/generator-aio-app": "^8", "@adobe/generator-app-common-lib": "^2", "@adobe/inquirer-table-checkbox": "^2", "@oclif/core": "^2.11.6", diff --git a/src/commands/app/init.js b/src/commands/app/init.js index 25512c50..7550a73f 100644 --- a/src/commands/app/init.js +++ b/src/commands/app/init.js @@ -75,7 +75,7 @@ class InitCommand extends TemplatesCommand { getInitialGenerators (flags) { // TODO read from config to override - const initialGenerators = ['base-app', 'add-ci'] + const initialGenerators = ['base-app', 'add-ci', 'add-vscode-config'] if (flags['standalone-app']) { initialGenerators.push('application') diff --git a/test/commands/app/init.test.js b/test/commands/app/init.test.js index ccc3a38d..8434c132 100644 --- a/test/commands/app/init.test.js +++ b/test/commands/app/init.test.js @@ -314,7 +314,7 @@ describe('--no-login', () => { await command.run() expect(command.installTemplates).toHaveBeenCalledWith(installOptions) - expect(command.runCodeGenerators).toHaveBeenCalledWith(['base-app', 'add-ci', 'application'], false, 'cwd', 'basic') + expect(command.runCodeGenerators).toHaveBeenCalledWith(['base-app', 'add-ci', 'add-vscode-config', 'application'], false, 'cwd', 'basic') expect(LibConsoleCLI.init).not.toHaveBeenCalled() expect(importHelperLib.importConfigJson).not.toHaveBeenCalled() }) @@ -464,7 +464,7 @@ describe('--no-login', () => { await command.run() expect(command.installTemplates).toHaveBeenCalledWith(installOptions) - expect(command.runCodeGenerators).toHaveBeenCalledWith(['base-app', 'add-ci', 'application'], true, 'cwd', 'none') + expect(command.runCodeGenerators).toHaveBeenCalledWith(['base-app', 'add-ci', 'add-vscode-config', 'application'], true, 'cwd', 'none') expect(LibConsoleCLI.init).not.toHaveBeenCalled() expect(importHelperLib.importConfigJson).not.toHaveBeenCalled() }) @@ -482,7 +482,7 @@ describe('--no-login', () => { await command.run() expect(command.installTemplates).toHaveBeenCalledWith(installOptions) - expect(command.runCodeGenerators).toHaveBeenCalledWith(['base-app', 'add-ci', 'application'], true, 'cwd', 'adobe-recommended') + expect(command.runCodeGenerators).toHaveBeenCalledWith(['base-app', 'add-ci', 'add-vscode-config', 'application'], true, 'cwd', 'adobe-recommended') expect(LibConsoleCLI.init).not.toHaveBeenCalled() expect(importHelperLib.importConfigJson).not.toHaveBeenCalled() })