From ea90ab0590f3ad6096e3b4042c7dccdef532377e Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 17 Mar 2026 12:39:05 +0100 Subject: [PATCH] Move yarn new templates from @backstage/cli to @backstage/cli-module-new The built-in templates used by `yarn new` are moved from `packages/cli/templates/` to `packages/cli-module-new/templates/`, colocating them with the code that consumes them. A backwards compatibility rewrite in the template resolution ensures that existing `@backstage/cli/templates/*` references in root `package.json` configurations continue to work by transparently resolving them to `@backstage/cli-module-new/templates/*`. Signed-off-by: Patrik Oldsberg Made-with: Cursor --- .changeset/move-cli-new-templates-cli.md | 5 ++ .../move-cli-new-templates-create-app.md | 5 ++ .changeset/move-cli-new-templates.md | 5 ++ .../building-apps/08-migrating.md | 22 +++---- docs/tooling/cli/04-templates.md | 28 ++++---- packages/cli-module-new/package.json | 7 +- .../src/lib/defaultTemplates.ts | 22 +++---- .../loadPortableTemplateConfig.test.ts | 66 +++++++++++++++++++ .../preparation/loadPortableTemplateConfig.ts | 12 +++- .../backend-plugin-module/.eslintrc.js.hbs | 0 .../backend-plugin-module/README.md.hbs | 0 .../backend-plugin-module/package.json.hbs | 0 .../portable-template.yaml | 0 .../backend-plugin-module/src/index.ts.hbs | 0 .../backend-plugin-module/src/module.ts.hbs | 0 .../templates/backend-plugin/.eslintrc.js.hbs | 0 .../templates/backend-plugin/README.md.hbs | 0 .../templates/backend-plugin/dev/index.ts.hbs | 0 .../templates/backend-plugin/package.json.hbs | 0 .../backend-plugin/portable-template.yaml | 0 .../templates/backend-plugin/src/index.ts.hbs | 0 .../backend-plugin/src/plugin.test.ts.hbs | 0 .../backend-plugin/src/plugin.ts.hbs | 0 .../backend-plugin/src/router.test.ts | 0 .../templates/backend-plugin/src/router.ts | 0 .../src/services/TodoListService.ts | 0 .../backend-plugin/src/setupTests.ts | 0 .../catalog-provider-module/.eslintrc.js.hbs | 0 .../catalog-provider-module/README.md.hbs | 0 .../catalog-provider-module/config.d.ts.hbs | 0 .../catalog-provider-module/package.json.hbs | 0 .../portable-template.yaml | 0 .../catalog-provider-module/src/index.ts.hbs | 0 .../catalog-provider-module/src/module.ts.hbs | 0 .../src/provider/readProviderConfigs.ts.hbs | 0 .../provider/{{providerClass}}.test.ts.hbs | 0 .../src/provider/{{providerClass}}.ts.hbs | 0 .../templates/cli-module/.eslintrc.js.hbs | 0 .../templates/cli-module/README.md.hbs | 0 .../templates/cli-module/bin/{{binName}} | 0 .../templates/cli-module/package.json.hbs | 0 .../cli-module/portable-template.yaml | 0 .../cli-module/src/commands/example.ts | 0 .../templates/cli-module/src/index.ts.hbs | 0 .../frontend-plugin/.eslintrc.js.hbs | 0 .../templates/frontend-plugin/README.md.hbs | 0 .../frontend-plugin/dev/index.tsx.hbs | 0 .../frontend-plugin/package.json.hbs | 0 .../frontend-plugin/portable-template.yaml | 0 .../ExampleComponent.test.tsx.hbs | 0 .../ExampleComponent/ExampleComponent.tsx.hbs | 0 .../src/components/ExampleComponent/index.ts | 0 .../ExampleFetchComponent.test.tsx.hbs | 0 .../ExampleFetchComponent.tsx.hbs | 0 .../components/ExampleFetchComponent/index.ts | 0 .../frontend-plugin/src/index.ts.hbs | 0 .../frontend-plugin/src/plugin.test.ts.hbs | 0 .../frontend-plugin/src/plugin.ts.hbs | 0 .../frontend-plugin/src/routes.ts.hbs | 0 .../frontend-plugin/src/setupTests.ts | 0 .../.eslintrc.js.hbs | 0 .../new-frontend-plugin-module/README.md.hbs | 0 .../package.json.hbs | 0 .../portable-template.yaml | 0 .../src/index.ts.hbs | 0 .../src/module.tsx.hbs | 0 .../src/setupTests.ts | 0 .../new-frontend-plugin/.eslintrc.js.hbs | 0 .../new-frontend-plugin/README.md.hbs | 0 .../new-frontend-plugin/dev/index.tsx | 0 .../new-frontend-plugin/package.json.hbs | 0 .../portable-template.yaml | 0 .../ExampleComponent.test.tsx.hbs | 0 .../ExampleComponent/ExampleComponent.tsx.hbs | 0 .../src/components/ExampleComponent/index.ts | 0 .../ExampleFetchComponent.test.tsx.hbs | 0 .../ExampleFetchComponent.tsx.hbs | 0 .../components/ExampleFetchComponent/index.ts | 0 .../new-frontend-plugin/src/index.ts.hbs | 0 .../src/plugin.test.ts.hbs | 0 .../new-frontend-plugin/src/plugin.tsx.hbs | 0 .../new-frontend-plugin/src/routes.ts | 0 .../new-frontend-plugin/src/setupTests.ts | 0 .../templates/node-library/.eslintrc.js.hbs | 0 .../templates/node-library/README.md.hbs | 0 .../templates/node-library/package.json.hbs | 0 .../node-library/portable-template.yaml | 0 .../templates/node-library/src/index.ts.hbs | 0 .../templates/node-library/src/setupTests.ts | 0 .../plugin-common-library/.eslintrc.js.hbs | 0 .../plugin-common-library/README.md.hbs | 0 .../plugin-common-library/package.json.hbs | 0 .../portable-template.yaml | 0 .../plugin-common-library/src/index.ts.hbs | 0 .../plugin-common-library/src/setupTests.ts | 0 .../plugin-node-library/.eslintrc.js.hbs | 0 .../plugin-node-library/README.md.hbs | 0 .../plugin-node-library/package.json.hbs | 0 .../portable-template.yaml | 0 .../plugin-node-library/src/index.ts.hbs | 0 .../plugin-node-library/src/setupTests.ts | 0 .../plugin-web-library/.eslintrc.js.hbs | 0 .../plugin-web-library/README.md.hbs | 0 .../plugin-web-library/package.json.hbs | 0 .../plugin-web-library/portable-template.yaml | 0 .../ExampleComponent.test.tsx | 0 .../ExampleComponent/ExampleComponent.tsx | 0 .../src/components/ExampleComponent/index.ts | 0 .../src/components/index.ts | 0 .../plugin-web-library/src/hooks/index.ts | 0 .../src/hooks/useExample/index.ts | 0 .../src/hooks/useExample/useExample.ts | 0 .../plugin-web-library/src/index.ts.hbs | 0 .../plugin-web-library/src/setupTests.ts | 0 .../.eslintrc.js.hbs | 0 .../scaffolder-backend-module/README.md.hbs | 0 .../package.json.hbs | 0 .../portable-template.yaml | 0 .../src/actions/example.test.ts | 0 .../src/actions/example.ts | 0 .../src/index.ts.hbs | 0 .../scaffolder-backend-module/src/module.ts | 0 .../templates/web-library/.eslintrc.js.hbs | 0 .../templates/web-library/README.md.hbs | 0 .../templates/web-library/package.json.hbs | 0 .../web-library/portable-template.yaml | 0 .../templates/web-library/src/index.ts.hbs | 0 .../templates/web-library/src/setupTests.ts | 0 .../templates/next-app/package.json.hbs | 23 +++---- 129 files changed, 146 insertions(+), 49 deletions(-) create mode 100644 .changeset/move-cli-new-templates-cli.md create mode 100644 .changeset/move-cli-new-templates-create-app.md create mode 100644 .changeset/move-cli-new-templates.md rename packages/{cli => cli-module-new}/templates/backend-plugin-module/.eslintrc.js.hbs (100%) rename packages/{cli => cli-module-new}/templates/backend-plugin-module/README.md.hbs (100%) rename packages/{cli => cli-module-new}/templates/backend-plugin-module/package.json.hbs (100%) rename packages/{cli => cli-module-new}/templates/backend-plugin-module/portable-template.yaml (100%) rename packages/{cli => cli-module-new}/templates/backend-plugin-module/src/index.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/backend-plugin-module/src/module.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/backend-plugin/.eslintrc.js.hbs (100%) rename packages/{cli => cli-module-new}/templates/backend-plugin/README.md.hbs (100%) rename packages/{cli => cli-module-new}/templates/backend-plugin/dev/index.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/backend-plugin/package.json.hbs (100%) rename packages/{cli => cli-module-new}/templates/backend-plugin/portable-template.yaml (100%) rename packages/{cli => cli-module-new}/templates/backend-plugin/src/index.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/backend-plugin/src/plugin.test.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/backend-plugin/src/plugin.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/backend-plugin/src/router.test.ts (100%) rename packages/{cli => cli-module-new}/templates/backend-plugin/src/router.ts (100%) rename packages/{cli => cli-module-new}/templates/backend-plugin/src/services/TodoListService.ts (100%) rename packages/{cli => cli-module-new}/templates/backend-plugin/src/setupTests.ts (100%) rename packages/{cli => cli-module-new}/templates/catalog-provider-module/.eslintrc.js.hbs (100%) rename packages/{cli => cli-module-new}/templates/catalog-provider-module/README.md.hbs (100%) rename packages/{cli => cli-module-new}/templates/catalog-provider-module/config.d.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/catalog-provider-module/package.json.hbs (100%) rename packages/{cli => cli-module-new}/templates/catalog-provider-module/portable-template.yaml (100%) rename packages/{cli => cli-module-new}/templates/catalog-provider-module/src/index.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/catalog-provider-module/src/module.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/catalog-provider-module/src/provider/readProviderConfigs.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/catalog-provider-module/src/provider/{{providerClass}}.test.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/catalog-provider-module/src/provider/{{providerClass}}.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/cli-module/.eslintrc.js.hbs (100%) rename packages/{cli => cli-module-new}/templates/cli-module/README.md.hbs (100%) rename packages/{cli => cli-module-new}/templates/cli-module/bin/{{binName}} (100%) rename packages/{cli => cli-module-new}/templates/cli-module/package.json.hbs (100%) rename packages/{cli => cli-module-new}/templates/cli-module/portable-template.yaml (100%) rename packages/{cli => cli-module-new}/templates/cli-module/src/commands/example.ts (100%) rename packages/{cli => cli-module-new}/templates/cli-module/src/index.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/frontend-plugin/.eslintrc.js.hbs (100%) rename packages/{cli => cli-module-new}/templates/frontend-plugin/README.md.hbs (100%) rename packages/{cli => cli-module-new}/templates/frontend-plugin/dev/index.tsx.hbs (100%) rename packages/{cli => cli-module-new}/templates/frontend-plugin/package.json.hbs (100%) rename packages/{cli => cli-module-new}/templates/frontend-plugin/portable-template.yaml (100%) rename packages/{cli => cli-module-new}/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs (100%) rename packages/{cli => cli-module-new}/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.tsx.hbs (100%) rename packages/{cli => cli-module-new}/templates/frontend-plugin/src/components/ExampleComponent/index.ts (100%) rename packages/{cli => cli-module-new}/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs (100%) rename packages/{cli => cli-module-new}/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs (100%) rename packages/{cli => cli-module-new}/templates/frontend-plugin/src/components/ExampleFetchComponent/index.ts (100%) rename packages/{cli => cli-module-new}/templates/frontend-plugin/src/index.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/frontend-plugin/src/plugin.test.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/frontend-plugin/src/plugin.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/frontend-plugin/src/routes.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/frontend-plugin/src/setupTests.ts (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin-module/.eslintrc.js.hbs (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin-module/README.md.hbs (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin-module/package.json.hbs (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin-module/portable-template.yaml (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin-module/src/index.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin-module/src/module.tsx.hbs (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin-module/src/setupTests.ts (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin/.eslintrc.js.hbs (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin/README.md.hbs (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin/dev/index.tsx (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin/package.json.hbs (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin/portable-template.yaml (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin/src/components/ExampleComponent/ExampleComponent.tsx.hbs (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin/src/components/ExampleComponent/index.ts (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin/src/components/ExampleFetchComponent/index.ts (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin/src/index.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin/src/plugin.test.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin/src/plugin.tsx.hbs (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin/src/routes.ts (100%) rename packages/{cli => cli-module-new}/templates/new-frontend-plugin/src/setupTests.ts (100%) rename packages/{cli => cli-module-new}/templates/node-library/.eslintrc.js.hbs (100%) rename packages/{cli => cli-module-new}/templates/node-library/README.md.hbs (100%) rename packages/{cli => cli-module-new}/templates/node-library/package.json.hbs (100%) rename packages/{cli => cli-module-new}/templates/node-library/portable-template.yaml (100%) rename packages/{cli => cli-module-new}/templates/node-library/src/index.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/node-library/src/setupTests.ts (100%) rename packages/{cli => cli-module-new}/templates/plugin-common-library/.eslintrc.js.hbs (100%) rename packages/{cli => cli-module-new}/templates/plugin-common-library/README.md.hbs (100%) rename packages/{cli => cli-module-new}/templates/plugin-common-library/package.json.hbs (100%) rename packages/{cli => cli-module-new}/templates/plugin-common-library/portable-template.yaml (100%) rename packages/{cli => cli-module-new}/templates/plugin-common-library/src/index.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/plugin-common-library/src/setupTests.ts (100%) rename packages/{cli => cli-module-new}/templates/plugin-node-library/.eslintrc.js.hbs (100%) rename packages/{cli => cli-module-new}/templates/plugin-node-library/README.md.hbs (100%) rename packages/{cli => cli-module-new}/templates/plugin-node-library/package.json.hbs (100%) rename packages/{cli => cli-module-new}/templates/plugin-node-library/portable-template.yaml (100%) rename packages/{cli => cli-module-new}/templates/plugin-node-library/src/index.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/plugin-node-library/src/setupTests.ts (100%) rename packages/{cli => cli-module-new}/templates/plugin-web-library/.eslintrc.js.hbs (100%) rename packages/{cli => cli-module-new}/templates/plugin-web-library/README.md.hbs (100%) rename packages/{cli => cli-module-new}/templates/plugin-web-library/package.json.hbs (100%) rename packages/{cli => cli-module-new}/templates/plugin-web-library/portable-template.yaml (100%) rename packages/{cli => cli-module-new}/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.test.tsx (100%) rename packages/{cli => cli-module-new}/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.tsx (100%) rename packages/{cli => cli-module-new}/templates/plugin-web-library/src/components/ExampleComponent/index.ts (100%) rename packages/{cli => cli-module-new}/templates/plugin-web-library/src/components/index.ts (100%) rename packages/{cli => cli-module-new}/templates/plugin-web-library/src/hooks/index.ts (100%) rename packages/{cli => cli-module-new}/templates/plugin-web-library/src/hooks/useExample/index.ts (100%) rename packages/{cli => cli-module-new}/templates/plugin-web-library/src/hooks/useExample/useExample.ts (100%) rename packages/{cli => cli-module-new}/templates/plugin-web-library/src/index.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/plugin-web-library/src/setupTests.ts (100%) rename packages/{cli => cli-module-new}/templates/scaffolder-backend-module/.eslintrc.js.hbs (100%) rename packages/{cli => cli-module-new}/templates/scaffolder-backend-module/README.md.hbs (100%) rename packages/{cli => cli-module-new}/templates/scaffolder-backend-module/package.json.hbs (100%) rename packages/{cli => cli-module-new}/templates/scaffolder-backend-module/portable-template.yaml (100%) rename packages/{cli => cli-module-new}/templates/scaffolder-backend-module/src/actions/example.test.ts (100%) rename packages/{cli => cli-module-new}/templates/scaffolder-backend-module/src/actions/example.ts (100%) rename packages/{cli => cli-module-new}/templates/scaffolder-backend-module/src/index.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/scaffolder-backend-module/src/module.ts (100%) rename packages/{cli => cli-module-new}/templates/web-library/.eslintrc.js.hbs (100%) rename packages/{cli => cli-module-new}/templates/web-library/README.md.hbs (100%) rename packages/{cli => cli-module-new}/templates/web-library/package.json.hbs (100%) rename packages/{cli => cli-module-new}/templates/web-library/portable-template.yaml (100%) rename packages/{cli => cli-module-new}/templates/web-library/src/index.ts.hbs (100%) rename packages/{cli => cli-module-new}/templates/web-library/src/setupTests.ts (100%) diff --git a/.changeset/move-cli-new-templates-cli.md b/.changeset/move-cli-new-templates-cli.md new file mode 100644 index 0000000000..47b5237a6b --- /dev/null +++ b/.changeset/move-cli-new-templates-cli.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +The built-in `yarn new` templates have been moved to `@backstage/cli-module-new`. Existing references to `@backstage/cli/templates/*` in your root `package.json` will continue to work through a backwards compatibility rewrite in the `new` command. diff --git a/.changeset/move-cli-new-templates-create-app.md b/.changeset/move-cli-new-templates-create-app.md new file mode 100644 index 0000000000..b7871eb5ef --- /dev/null +++ b/.changeset/move-cli-new-templates-create-app.md @@ -0,0 +1,5 @@ +--- +'@backstage/create-app': patch +--- + +Updated the `next-app` template to reference `@backstage/cli-module-new/templates/*` instead of `@backstage/cli/templates/*` for the built-in `yarn new` templates. diff --git a/.changeset/move-cli-new-templates.md b/.changeset/move-cli-new-templates.md new file mode 100644 index 0000000000..20c1aafb96 --- /dev/null +++ b/.changeset/move-cli-new-templates.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli-module-new': patch +--- + +The built-in `yarn new` templates have been moved to this package from `@backstage/cli`. The default template references have been updated from `@backstage/cli/templates/*` to `@backstage/cli-module-new/templates/*`. Existing references to `@backstage/cli/templates/*` in your root `package.json` will continue to work through a backwards compatibility rewrite. diff --git a/docs/frontend-system/building-apps/08-migrating.md b/docs/frontend-system/building-apps/08-migrating.md index 2849b7d68b..9f18067a55 100644 --- a/docs/frontend-system/building-apps/08-migrating.md +++ b/docs/frontend-system/building-apps/08-migrating.md @@ -915,17 +915,17 @@ When creating a new Backstage app with `create-app` and using the `--next` flag "license": "UNLICENSED" }, "templates": [ - "@backstage/cli/templates/new-frontend-plugin", - "@backstage/cli/templates/new-frontend-plugin-module", - "@backstage/cli/templates/backend-plugin", - "@backstage/cli/templates/backend-plugin-module", - "@backstage/cli/templates/plugin-web-library", - "@backstage/cli/templates/plugin-node-library", - "@backstage/cli/templates/plugin-common-library", - "@backstage/cli/templates/web-library", - "@backstage/cli/templates/node-library", - "@backstage/cli/templates/catalog-provider-module", - "@backstage/cli/templates/scaffolder-backend-module" + "@backstage/cli-module-new/templates/new-frontend-plugin", + "@backstage/cli-module-new/templates/new-frontend-plugin-module", + "@backstage/cli-module-new/templates/backend-plugin", + "@backstage/cli-module-new/templates/backend-plugin-module", + "@backstage/cli-module-new/templates/plugin-web-library", + "@backstage/cli-module-new/templates/plugin-node-library", + "@backstage/cli-module-new/templates/plugin-common-library", + "@backstage/cli-module-new/templates/web-library", + "@backstage/cli-module-new/templates/node-library", + "@backstage/cli-module-new/templates/catalog-provider-module", + "@backstage/cli-module-new/templates/scaffolder-backend-module" ] } } diff --git a/docs/tooling/cli/04-templates.md b/docs/tooling/cli/04-templates.md index 894cc7efd0..2a79942174 100644 --- a/docs/tooling/cli/04-templates.md +++ b/docs/tooling/cli/04-templates.md @@ -73,7 +73,7 @@ Custom templates can be installed from local directories. To install a template Each entry in the `templates` array should be a relative path that points to a directory containing a `portable-template.yaml` file. If the path starts with `./` it will be used as is, otherwise it will be resolved as a module within `node_modules`. -When defining the `templates` array it will override the default set of templates. If you want to keep using one of the build-in templates in the Backstage CLI you can reference them directly within the CLI package. This following is the full list of built-in templates: +When defining the `templates` array it will override the default set of templates. If you want to keep using one of the build-in templates in the Backstage CLI you can reference them directly within the `@backstage/cli-module-new` package. This following is the full list of built-in templates: ```json { @@ -82,16 +82,16 @@ When defining the `templates` array it will override the default set of template "cli": { "new": { "templates": [ - "@backstage/cli/templates/frontend-plugin", - "@backstage/cli/templates/backend-plugin", - "@backstage/cli/templates/backend-plugin-module", - "@backstage/cli/templates/plugin-web-library", - "@backstage/cli/templates/plugin-node-library", - "@backstage/cli/templates/plugin-common-library", - "@backstage/cli/templates/web-library", - "@backstage/cli/templates/node-library", - "@backstage/cli/templates/catalog-provider-module", - "@backstage/cli/templates/scaffolder-backend-module" + "@backstage/cli-module-new/templates/frontend-plugin", + "@backstage/cli-module-new/templates/backend-plugin", + "@backstage/cli-module-new/templates/backend-plugin-module", + "@backstage/cli-module-new/templates/plugin-web-library", + "@backstage/cli-module-new/templates/plugin-node-library", + "@backstage/cli-module-new/templates/plugin-common-library", + "@backstage/cli-module-new/templates/web-library", + "@backstage/cli-module-new/templates/node-library", + "@backstage/cli-module-new/templates/catalog-provider-module", + "@backstage/cli-module-new/templates/scaffolder-backend-module" ] } } @@ -99,6 +99,10 @@ When defining the `templates` array it will override the default set of template } ``` +:::note +The old `@backstage/cli/templates/*` paths are still supported for backwards compatibility and will be automatically rewritten to `@backstage/cli-module-new/templates/*`. +::: + ## Creating your own CLI templates Each template lives in its own directory and must have a `portable-template.yaml` file that describes the template. The template directory can also contain any files that should be templated or copied to the generated package. @@ -128,7 +132,7 @@ export function getPluginId() { } ``` -If you'd like to see more examples, you can find all the default templates and their yaml files [here](https://github.com/backstage/backstage/tree/master/packages/cli/templates). +If you'd like to see more examples, you can find all the default templates and their yaml files [here](https://github.com/backstage/backstage/tree/master/packages/cli-module-new/templates). Once your template is ready, [add it to your config](#installing-custom-templates), and you should now be able to select it when running `yarn new`. diff --git a/packages/cli-module-new/package.json b/packages/cli-module-new/package.json index 9ca1664f7a..1983210bb1 100644 --- a/packages/cli-module-new/package.json +++ b/packages/cli-module-new/package.json @@ -19,9 +19,11 @@ "license": "Apache-2.0", "main": "src/index.ts", "types": "src/index.ts", + "bin": "bin/backstage-cli-module-new", "files": [ "dist", - "bin" + "bin", + "templates" ], "scripts": { "build": "backstage-cli package build", @@ -57,6 +59,5 @@ "@types/inquirer": "^8.1.3", "@types/lodash": "^4.14.151", "@types/recursive-readdir": "^2.2.0" - }, - "bin": "bin/backstage-cli-module-new" + } } diff --git a/packages/cli-module-new/src/lib/defaultTemplates.ts b/packages/cli-module-new/src/lib/defaultTemplates.ts index dea35a6e99..e8b8e7eb70 100644 --- a/packages/cli-module-new/src/lib/defaultTemplates.ts +++ b/packages/cli-module-new/src/lib/defaultTemplates.ts @@ -15,15 +15,15 @@ */ export const defaultTemplates = [ - '@backstage/cli/templates/frontend-plugin', - '@backstage/cli/templates/backend-plugin', - '@backstage/cli/templates/backend-plugin-module', - '@backstage/cli/templates/plugin-web-library', - '@backstage/cli/templates/plugin-node-library', - '@backstage/cli/templates/plugin-common-library', - '@backstage/cli/templates/web-library', - '@backstage/cli/templates/node-library', - '@backstage/cli/templates/cli-module', - '@backstage/cli/templates/catalog-provider-module', - '@backstage/cli/templates/scaffolder-backend-module', + '@backstage/cli-module-new/templates/frontend-plugin', + '@backstage/cli-module-new/templates/backend-plugin', + '@backstage/cli-module-new/templates/backend-plugin-module', + '@backstage/cli-module-new/templates/plugin-web-library', + '@backstage/cli-module-new/templates/plugin-node-library', + '@backstage/cli-module-new/templates/plugin-common-library', + '@backstage/cli-module-new/templates/web-library', + '@backstage/cli-module-new/templates/node-library', + '@backstage/cli-module-new/templates/cli-module', + '@backstage/cli-module-new/templates/catalog-provider-module', + '@backstage/cli-module-new/templates/scaffolder-backend-module', ]; diff --git a/packages/cli-module-new/src/lib/preparation/loadPortableTemplateConfig.test.ts b/packages/cli-module-new/src/lib/preparation/loadPortableTemplateConfig.test.ts index f8167ef339..a89d0c3905 100644 --- a/packages/cli-module-new/src/lib/preparation/loadPortableTemplateConfig.test.ts +++ b/packages/cli-module-new/src/lib/preparation/loadPortableTemplateConfig.test.ts @@ -200,6 +200,72 @@ describe('loadPortableTemplateConfig', () => { }); }); + it('should rewrite legacy @backstage/cli/templates paths', async () => { + mockDir.setContent({ + 'package.json': JSON.stringify({ + backstage: { + cli: { + new: { + templates: [ + '@backstage/cli/templates/backend-plugin', + '@backstage/cli/templates/frontend-plugin', + ], + }, + }, + }, + }), + node_modules: { + '@backstage': { + 'cli-module-new': { + templates: { + 'backend-plugin': { + [TEMPLATE_FILE_NAME]: + 'name: backend-plugin\nrole: backend-plugin\n', + }, + 'frontend-plugin': { + [TEMPLATE_FILE_NAME]: + 'name: frontend-plugin\nrole: frontend-plugin\n', + }, + }, + }, + }, + }, + }); + + await expect( + loadPortableTemplateConfig({ + packagePath: mockDir.resolve('package.json'), + }), + ).resolves.toEqual({ + isUsingDefaultTemplates: false, + templatePointers: [ + { + name: 'backend-plugin', + target: realpathSync( + mockDir.resolve( + 'node_modules/@backstage/cli-module-new/templates/backend-plugin', + TEMPLATE_FILE_NAME, + ), + ), + }, + { + name: 'frontend-plugin', + target: realpathSync( + mockDir.resolve( + 'node_modules/@backstage/cli-module-new/templates/frontend-plugin', + TEMPLATE_FILE_NAME, + ), + ), + }, + ], + license: 'Apache-2.0', + private: true, + version: '0.1.0', + packageNamePrefix: '@internal/', + packageNamePluginInfix: 'backstage-plugin-', + }); + }); + it('should reject templates with conflicting names', async () => { mockDir.setContent({ 'package.json': JSON.stringify({ diff --git a/packages/cli-module-new/src/lib/preparation/loadPortableTemplateConfig.ts b/packages/cli-module-new/src/lib/preparation/loadPortableTemplateConfig.ts index 5040904138..50ffda7516 100644 --- a/packages/cli-module-new/src/lib/preparation/loadPortableTemplateConfig.ts +++ b/packages/cli-module-new/src/lib/preparation/loadPortableTemplateConfig.ts @@ -157,6 +157,9 @@ export async function loadPortableTemplateConfig( }; } +const CLI_TEMPLATE_PREFIX = '@backstage/cli/templates/'; +const CLI_MODULE_NEW_TEMPLATE_PREFIX = '@backstage/cli-module-new/templates/'; + function resolveLocalTemplatePath(pointer: string, basePath: string): string { if (isAbsolute(pointer)) { throw new Error(`Template target may not be an absolute path`); @@ -166,7 +169,14 @@ function resolveLocalTemplatePath(pointer: string, basePath: string): string { return resolvePath(basePath, pointer, TEMPLATE_FILE_NAME); } - return require.resolve(`${pointer}/${TEMPLATE_FILE_NAME}`, { + // Rewrite legacy @backstage/cli/templates/* paths to @backstage/cli-module-new/templates/* + const resolvedPointer = pointer.startsWith(CLI_TEMPLATE_PREFIX) + ? `${CLI_MODULE_NEW_TEMPLATE_PREFIX}${pointer.slice( + CLI_TEMPLATE_PREFIX.length, + )}` + : pointer; + + return require.resolve(`${resolvedPointer}/${TEMPLATE_FILE_NAME}`, { paths: [basePath], }); } diff --git a/packages/cli/templates/backend-plugin-module/.eslintrc.js.hbs b/packages/cli-module-new/templates/backend-plugin-module/.eslintrc.js.hbs similarity index 100% rename from packages/cli/templates/backend-plugin-module/.eslintrc.js.hbs rename to packages/cli-module-new/templates/backend-plugin-module/.eslintrc.js.hbs diff --git a/packages/cli/templates/backend-plugin-module/README.md.hbs b/packages/cli-module-new/templates/backend-plugin-module/README.md.hbs similarity index 100% rename from packages/cli/templates/backend-plugin-module/README.md.hbs rename to packages/cli-module-new/templates/backend-plugin-module/README.md.hbs diff --git a/packages/cli/templates/backend-plugin-module/package.json.hbs b/packages/cli-module-new/templates/backend-plugin-module/package.json.hbs similarity index 100% rename from packages/cli/templates/backend-plugin-module/package.json.hbs rename to packages/cli-module-new/templates/backend-plugin-module/package.json.hbs diff --git a/packages/cli/templates/backend-plugin-module/portable-template.yaml b/packages/cli-module-new/templates/backend-plugin-module/portable-template.yaml similarity index 100% rename from packages/cli/templates/backend-plugin-module/portable-template.yaml rename to packages/cli-module-new/templates/backend-plugin-module/portable-template.yaml diff --git a/packages/cli/templates/backend-plugin-module/src/index.ts.hbs b/packages/cli-module-new/templates/backend-plugin-module/src/index.ts.hbs similarity index 100% rename from packages/cli/templates/backend-plugin-module/src/index.ts.hbs rename to packages/cli-module-new/templates/backend-plugin-module/src/index.ts.hbs diff --git a/packages/cli/templates/backend-plugin-module/src/module.ts.hbs b/packages/cli-module-new/templates/backend-plugin-module/src/module.ts.hbs similarity index 100% rename from packages/cli/templates/backend-plugin-module/src/module.ts.hbs rename to packages/cli-module-new/templates/backend-plugin-module/src/module.ts.hbs diff --git a/packages/cli/templates/backend-plugin/.eslintrc.js.hbs b/packages/cli-module-new/templates/backend-plugin/.eslintrc.js.hbs similarity index 100% rename from packages/cli/templates/backend-plugin/.eslintrc.js.hbs rename to packages/cli-module-new/templates/backend-plugin/.eslintrc.js.hbs diff --git a/packages/cli/templates/backend-plugin/README.md.hbs b/packages/cli-module-new/templates/backend-plugin/README.md.hbs similarity index 100% rename from packages/cli/templates/backend-plugin/README.md.hbs rename to packages/cli-module-new/templates/backend-plugin/README.md.hbs diff --git a/packages/cli/templates/backend-plugin/dev/index.ts.hbs b/packages/cli-module-new/templates/backend-plugin/dev/index.ts.hbs similarity index 100% rename from packages/cli/templates/backend-plugin/dev/index.ts.hbs rename to packages/cli-module-new/templates/backend-plugin/dev/index.ts.hbs diff --git a/packages/cli/templates/backend-plugin/package.json.hbs b/packages/cli-module-new/templates/backend-plugin/package.json.hbs similarity index 100% rename from packages/cli/templates/backend-plugin/package.json.hbs rename to packages/cli-module-new/templates/backend-plugin/package.json.hbs diff --git a/packages/cli/templates/backend-plugin/portable-template.yaml b/packages/cli-module-new/templates/backend-plugin/portable-template.yaml similarity index 100% rename from packages/cli/templates/backend-plugin/portable-template.yaml rename to packages/cli-module-new/templates/backend-plugin/portable-template.yaml diff --git a/packages/cli/templates/backend-plugin/src/index.ts.hbs b/packages/cli-module-new/templates/backend-plugin/src/index.ts.hbs similarity index 100% rename from packages/cli/templates/backend-plugin/src/index.ts.hbs rename to packages/cli-module-new/templates/backend-plugin/src/index.ts.hbs diff --git a/packages/cli/templates/backend-plugin/src/plugin.test.ts.hbs b/packages/cli-module-new/templates/backend-plugin/src/plugin.test.ts.hbs similarity index 100% rename from packages/cli/templates/backend-plugin/src/plugin.test.ts.hbs rename to packages/cli-module-new/templates/backend-plugin/src/plugin.test.ts.hbs diff --git a/packages/cli/templates/backend-plugin/src/plugin.ts.hbs b/packages/cli-module-new/templates/backend-plugin/src/plugin.ts.hbs similarity index 100% rename from packages/cli/templates/backend-plugin/src/plugin.ts.hbs rename to packages/cli-module-new/templates/backend-plugin/src/plugin.ts.hbs diff --git a/packages/cli/templates/backend-plugin/src/router.test.ts b/packages/cli-module-new/templates/backend-plugin/src/router.test.ts similarity index 100% rename from packages/cli/templates/backend-plugin/src/router.test.ts rename to packages/cli-module-new/templates/backend-plugin/src/router.test.ts diff --git a/packages/cli/templates/backend-plugin/src/router.ts b/packages/cli-module-new/templates/backend-plugin/src/router.ts similarity index 100% rename from packages/cli/templates/backend-plugin/src/router.ts rename to packages/cli-module-new/templates/backend-plugin/src/router.ts diff --git a/packages/cli/templates/backend-plugin/src/services/TodoListService.ts b/packages/cli-module-new/templates/backend-plugin/src/services/TodoListService.ts similarity index 100% rename from packages/cli/templates/backend-plugin/src/services/TodoListService.ts rename to packages/cli-module-new/templates/backend-plugin/src/services/TodoListService.ts diff --git a/packages/cli/templates/backend-plugin/src/setupTests.ts b/packages/cli-module-new/templates/backend-plugin/src/setupTests.ts similarity index 100% rename from packages/cli/templates/backend-plugin/src/setupTests.ts rename to packages/cli-module-new/templates/backend-plugin/src/setupTests.ts diff --git a/packages/cli/templates/catalog-provider-module/.eslintrc.js.hbs b/packages/cli-module-new/templates/catalog-provider-module/.eslintrc.js.hbs similarity index 100% rename from packages/cli/templates/catalog-provider-module/.eslintrc.js.hbs rename to packages/cli-module-new/templates/catalog-provider-module/.eslintrc.js.hbs diff --git a/packages/cli/templates/catalog-provider-module/README.md.hbs b/packages/cli-module-new/templates/catalog-provider-module/README.md.hbs similarity index 100% rename from packages/cli/templates/catalog-provider-module/README.md.hbs rename to packages/cli-module-new/templates/catalog-provider-module/README.md.hbs diff --git a/packages/cli/templates/catalog-provider-module/config.d.ts.hbs b/packages/cli-module-new/templates/catalog-provider-module/config.d.ts.hbs similarity index 100% rename from packages/cli/templates/catalog-provider-module/config.d.ts.hbs rename to packages/cli-module-new/templates/catalog-provider-module/config.d.ts.hbs diff --git a/packages/cli/templates/catalog-provider-module/package.json.hbs b/packages/cli-module-new/templates/catalog-provider-module/package.json.hbs similarity index 100% rename from packages/cli/templates/catalog-provider-module/package.json.hbs rename to packages/cli-module-new/templates/catalog-provider-module/package.json.hbs diff --git a/packages/cli/templates/catalog-provider-module/portable-template.yaml b/packages/cli-module-new/templates/catalog-provider-module/portable-template.yaml similarity index 100% rename from packages/cli/templates/catalog-provider-module/portable-template.yaml rename to packages/cli-module-new/templates/catalog-provider-module/portable-template.yaml diff --git a/packages/cli/templates/catalog-provider-module/src/index.ts.hbs b/packages/cli-module-new/templates/catalog-provider-module/src/index.ts.hbs similarity index 100% rename from packages/cli/templates/catalog-provider-module/src/index.ts.hbs rename to packages/cli-module-new/templates/catalog-provider-module/src/index.ts.hbs diff --git a/packages/cli/templates/catalog-provider-module/src/module.ts.hbs b/packages/cli-module-new/templates/catalog-provider-module/src/module.ts.hbs similarity index 100% rename from packages/cli/templates/catalog-provider-module/src/module.ts.hbs rename to packages/cli-module-new/templates/catalog-provider-module/src/module.ts.hbs diff --git a/packages/cli/templates/catalog-provider-module/src/provider/readProviderConfigs.ts.hbs b/packages/cli-module-new/templates/catalog-provider-module/src/provider/readProviderConfigs.ts.hbs similarity index 100% rename from packages/cli/templates/catalog-provider-module/src/provider/readProviderConfigs.ts.hbs rename to packages/cli-module-new/templates/catalog-provider-module/src/provider/readProviderConfigs.ts.hbs diff --git a/packages/cli/templates/catalog-provider-module/src/provider/{{providerClass}}.test.ts.hbs b/packages/cli-module-new/templates/catalog-provider-module/src/provider/{{providerClass}}.test.ts.hbs similarity index 100% rename from packages/cli/templates/catalog-provider-module/src/provider/{{providerClass}}.test.ts.hbs rename to packages/cli-module-new/templates/catalog-provider-module/src/provider/{{providerClass}}.test.ts.hbs diff --git a/packages/cli/templates/catalog-provider-module/src/provider/{{providerClass}}.ts.hbs b/packages/cli-module-new/templates/catalog-provider-module/src/provider/{{providerClass}}.ts.hbs similarity index 100% rename from packages/cli/templates/catalog-provider-module/src/provider/{{providerClass}}.ts.hbs rename to packages/cli-module-new/templates/catalog-provider-module/src/provider/{{providerClass}}.ts.hbs diff --git a/packages/cli/templates/cli-module/.eslintrc.js.hbs b/packages/cli-module-new/templates/cli-module/.eslintrc.js.hbs similarity index 100% rename from packages/cli/templates/cli-module/.eslintrc.js.hbs rename to packages/cli-module-new/templates/cli-module/.eslintrc.js.hbs diff --git a/packages/cli/templates/cli-module/README.md.hbs b/packages/cli-module-new/templates/cli-module/README.md.hbs similarity index 100% rename from packages/cli/templates/cli-module/README.md.hbs rename to packages/cli-module-new/templates/cli-module/README.md.hbs diff --git a/packages/cli/templates/cli-module/bin/{{binName}} b/packages/cli-module-new/templates/cli-module/bin/{{binName}} similarity index 100% rename from packages/cli/templates/cli-module/bin/{{binName}} rename to packages/cli-module-new/templates/cli-module/bin/{{binName}} diff --git a/packages/cli/templates/cli-module/package.json.hbs b/packages/cli-module-new/templates/cli-module/package.json.hbs similarity index 100% rename from packages/cli/templates/cli-module/package.json.hbs rename to packages/cli-module-new/templates/cli-module/package.json.hbs diff --git a/packages/cli/templates/cli-module/portable-template.yaml b/packages/cli-module-new/templates/cli-module/portable-template.yaml similarity index 100% rename from packages/cli/templates/cli-module/portable-template.yaml rename to packages/cli-module-new/templates/cli-module/portable-template.yaml diff --git a/packages/cli/templates/cli-module/src/commands/example.ts b/packages/cli-module-new/templates/cli-module/src/commands/example.ts similarity index 100% rename from packages/cli/templates/cli-module/src/commands/example.ts rename to packages/cli-module-new/templates/cli-module/src/commands/example.ts diff --git a/packages/cli/templates/cli-module/src/index.ts.hbs b/packages/cli-module-new/templates/cli-module/src/index.ts.hbs similarity index 100% rename from packages/cli/templates/cli-module/src/index.ts.hbs rename to packages/cli-module-new/templates/cli-module/src/index.ts.hbs diff --git a/packages/cli/templates/frontend-plugin/.eslintrc.js.hbs b/packages/cli-module-new/templates/frontend-plugin/.eslintrc.js.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin/.eslintrc.js.hbs rename to packages/cli-module-new/templates/frontend-plugin/.eslintrc.js.hbs diff --git a/packages/cli/templates/frontend-plugin/README.md.hbs b/packages/cli-module-new/templates/frontend-plugin/README.md.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin/README.md.hbs rename to packages/cli-module-new/templates/frontend-plugin/README.md.hbs diff --git a/packages/cli/templates/frontend-plugin/dev/index.tsx.hbs b/packages/cli-module-new/templates/frontend-plugin/dev/index.tsx.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin/dev/index.tsx.hbs rename to packages/cli-module-new/templates/frontend-plugin/dev/index.tsx.hbs diff --git a/packages/cli/templates/frontend-plugin/package.json.hbs b/packages/cli-module-new/templates/frontend-plugin/package.json.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin/package.json.hbs rename to packages/cli-module-new/templates/frontend-plugin/package.json.hbs diff --git a/packages/cli/templates/frontend-plugin/portable-template.yaml b/packages/cli-module-new/templates/frontend-plugin/portable-template.yaml similarity index 100% rename from packages/cli/templates/frontend-plugin/portable-template.yaml rename to packages/cli-module-new/templates/frontend-plugin/portable-template.yaml diff --git a/packages/cli/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs b/packages/cli-module-new/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs rename to packages/cli-module-new/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs diff --git a/packages/cli/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.tsx.hbs b/packages/cli-module-new/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.tsx.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.tsx.hbs rename to packages/cli-module-new/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.tsx.hbs diff --git a/packages/cli/templates/frontend-plugin/src/components/ExampleComponent/index.ts b/packages/cli-module-new/templates/frontend-plugin/src/components/ExampleComponent/index.ts similarity index 100% rename from packages/cli/templates/frontend-plugin/src/components/ExampleComponent/index.ts rename to packages/cli-module-new/templates/frontend-plugin/src/components/ExampleComponent/index.ts diff --git a/packages/cli/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs b/packages/cli-module-new/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs rename to packages/cli-module-new/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs diff --git a/packages/cli/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs b/packages/cli-module-new/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs rename to packages/cli-module-new/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs diff --git a/packages/cli/templates/frontend-plugin/src/components/ExampleFetchComponent/index.ts b/packages/cli-module-new/templates/frontend-plugin/src/components/ExampleFetchComponent/index.ts similarity index 100% rename from packages/cli/templates/frontend-plugin/src/components/ExampleFetchComponent/index.ts rename to packages/cli-module-new/templates/frontend-plugin/src/components/ExampleFetchComponent/index.ts diff --git a/packages/cli/templates/frontend-plugin/src/index.ts.hbs b/packages/cli-module-new/templates/frontend-plugin/src/index.ts.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin/src/index.ts.hbs rename to packages/cli-module-new/templates/frontend-plugin/src/index.ts.hbs diff --git a/packages/cli/templates/frontend-plugin/src/plugin.test.ts.hbs b/packages/cli-module-new/templates/frontend-plugin/src/plugin.test.ts.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin/src/plugin.test.ts.hbs rename to packages/cli-module-new/templates/frontend-plugin/src/plugin.test.ts.hbs diff --git a/packages/cli/templates/frontend-plugin/src/plugin.ts.hbs b/packages/cli-module-new/templates/frontend-plugin/src/plugin.ts.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin/src/plugin.ts.hbs rename to packages/cli-module-new/templates/frontend-plugin/src/plugin.ts.hbs diff --git a/packages/cli/templates/frontend-plugin/src/routes.ts.hbs b/packages/cli-module-new/templates/frontend-plugin/src/routes.ts.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin/src/routes.ts.hbs rename to packages/cli-module-new/templates/frontend-plugin/src/routes.ts.hbs diff --git a/packages/cli/templates/frontend-plugin/src/setupTests.ts b/packages/cli-module-new/templates/frontend-plugin/src/setupTests.ts similarity index 100% rename from packages/cli/templates/frontend-plugin/src/setupTests.ts rename to packages/cli-module-new/templates/frontend-plugin/src/setupTests.ts diff --git a/packages/cli/templates/new-frontend-plugin-module/.eslintrc.js.hbs b/packages/cli-module-new/templates/new-frontend-plugin-module/.eslintrc.js.hbs similarity index 100% rename from packages/cli/templates/new-frontend-plugin-module/.eslintrc.js.hbs rename to packages/cli-module-new/templates/new-frontend-plugin-module/.eslintrc.js.hbs diff --git a/packages/cli/templates/new-frontend-plugin-module/README.md.hbs b/packages/cli-module-new/templates/new-frontend-plugin-module/README.md.hbs similarity index 100% rename from packages/cli/templates/new-frontend-plugin-module/README.md.hbs rename to packages/cli-module-new/templates/new-frontend-plugin-module/README.md.hbs diff --git a/packages/cli/templates/new-frontend-plugin-module/package.json.hbs b/packages/cli-module-new/templates/new-frontend-plugin-module/package.json.hbs similarity index 100% rename from packages/cli/templates/new-frontend-plugin-module/package.json.hbs rename to packages/cli-module-new/templates/new-frontend-plugin-module/package.json.hbs diff --git a/packages/cli/templates/new-frontend-plugin-module/portable-template.yaml b/packages/cli-module-new/templates/new-frontend-plugin-module/portable-template.yaml similarity index 100% rename from packages/cli/templates/new-frontend-plugin-module/portable-template.yaml rename to packages/cli-module-new/templates/new-frontend-plugin-module/portable-template.yaml diff --git a/packages/cli/templates/new-frontend-plugin-module/src/index.ts.hbs b/packages/cli-module-new/templates/new-frontend-plugin-module/src/index.ts.hbs similarity index 100% rename from packages/cli/templates/new-frontend-plugin-module/src/index.ts.hbs rename to packages/cli-module-new/templates/new-frontend-plugin-module/src/index.ts.hbs diff --git a/packages/cli/templates/new-frontend-plugin-module/src/module.tsx.hbs b/packages/cli-module-new/templates/new-frontend-plugin-module/src/module.tsx.hbs similarity index 100% rename from packages/cli/templates/new-frontend-plugin-module/src/module.tsx.hbs rename to packages/cli-module-new/templates/new-frontend-plugin-module/src/module.tsx.hbs diff --git a/packages/cli/templates/new-frontend-plugin-module/src/setupTests.ts b/packages/cli-module-new/templates/new-frontend-plugin-module/src/setupTests.ts similarity index 100% rename from packages/cli/templates/new-frontend-plugin-module/src/setupTests.ts rename to packages/cli-module-new/templates/new-frontend-plugin-module/src/setupTests.ts diff --git a/packages/cli/templates/new-frontend-plugin/.eslintrc.js.hbs b/packages/cli-module-new/templates/new-frontend-plugin/.eslintrc.js.hbs similarity index 100% rename from packages/cli/templates/new-frontend-plugin/.eslintrc.js.hbs rename to packages/cli-module-new/templates/new-frontend-plugin/.eslintrc.js.hbs diff --git a/packages/cli/templates/new-frontend-plugin/README.md.hbs b/packages/cli-module-new/templates/new-frontend-plugin/README.md.hbs similarity index 100% rename from packages/cli/templates/new-frontend-plugin/README.md.hbs rename to packages/cli-module-new/templates/new-frontend-plugin/README.md.hbs diff --git a/packages/cli/templates/new-frontend-plugin/dev/index.tsx b/packages/cli-module-new/templates/new-frontend-plugin/dev/index.tsx similarity index 100% rename from packages/cli/templates/new-frontend-plugin/dev/index.tsx rename to packages/cli-module-new/templates/new-frontend-plugin/dev/index.tsx diff --git a/packages/cli/templates/new-frontend-plugin/package.json.hbs b/packages/cli-module-new/templates/new-frontend-plugin/package.json.hbs similarity index 100% rename from packages/cli/templates/new-frontend-plugin/package.json.hbs rename to packages/cli-module-new/templates/new-frontend-plugin/package.json.hbs diff --git a/packages/cli/templates/new-frontend-plugin/portable-template.yaml b/packages/cli-module-new/templates/new-frontend-plugin/portable-template.yaml similarity index 100% rename from packages/cli/templates/new-frontend-plugin/portable-template.yaml rename to packages/cli-module-new/templates/new-frontend-plugin/portable-template.yaml diff --git a/packages/cli/templates/new-frontend-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs b/packages/cli-module-new/templates/new-frontend-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs similarity index 100% rename from packages/cli/templates/new-frontend-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs rename to packages/cli-module-new/templates/new-frontend-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs diff --git a/packages/cli/templates/new-frontend-plugin/src/components/ExampleComponent/ExampleComponent.tsx.hbs b/packages/cli-module-new/templates/new-frontend-plugin/src/components/ExampleComponent/ExampleComponent.tsx.hbs similarity index 100% rename from packages/cli/templates/new-frontend-plugin/src/components/ExampleComponent/ExampleComponent.tsx.hbs rename to packages/cli-module-new/templates/new-frontend-plugin/src/components/ExampleComponent/ExampleComponent.tsx.hbs diff --git a/packages/cli/templates/new-frontend-plugin/src/components/ExampleComponent/index.ts b/packages/cli-module-new/templates/new-frontend-plugin/src/components/ExampleComponent/index.ts similarity index 100% rename from packages/cli/templates/new-frontend-plugin/src/components/ExampleComponent/index.ts rename to packages/cli-module-new/templates/new-frontend-plugin/src/components/ExampleComponent/index.ts diff --git a/packages/cli/templates/new-frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs b/packages/cli-module-new/templates/new-frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs similarity index 100% rename from packages/cli/templates/new-frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs rename to packages/cli-module-new/templates/new-frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs diff --git a/packages/cli/templates/new-frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs b/packages/cli-module-new/templates/new-frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs similarity index 100% rename from packages/cli/templates/new-frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs rename to packages/cli-module-new/templates/new-frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs diff --git a/packages/cli/templates/new-frontend-plugin/src/components/ExampleFetchComponent/index.ts b/packages/cli-module-new/templates/new-frontend-plugin/src/components/ExampleFetchComponent/index.ts similarity index 100% rename from packages/cli/templates/new-frontend-plugin/src/components/ExampleFetchComponent/index.ts rename to packages/cli-module-new/templates/new-frontend-plugin/src/components/ExampleFetchComponent/index.ts diff --git a/packages/cli/templates/new-frontend-plugin/src/index.ts.hbs b/packages/cli-module-new/templates/new-frontend-plugin/src/index.ts.hbs similarity index 100% rename from packages/cli/templates/new-frontend-plugin/src/index.ts.hbs rename to packages/cli-module-new/templates/new-frontend-plugin/src/index.ts.hbs diff --git a/packages/cli/templates/new-frontend-plugin/src/plugin.test.ts.hbs b/packages/cli-module-new/templates/new-frontend-plugin/src/plugin.test.ts.hbs similarity index 100% rename from packages/cli/templates/new-frontend-plugin/src/plugin.test.ts.hbs rename to packages/cli-module-new/templates/new-frontend-plugin/src/plugin.test.ts.hbs diff --git a/packages/cli/templates/new-frontend-plugin/src/plugin.tsx.hbs b/packages/cli-module-new/templates/new-frontend-plugin/src/plugin.tsx.hbs similarity index 100% rename from packages/cli/templates/new-frontend-plugin/src/plugin.tsx.hbs rename to packages/cli-module-new/templates/new-frontend-plugin/src/plugin.tsx.hbs diff --git a/packages/cli/templates/new-frontend-plugin/src/routes.ts b/packages/cli-module-new/templates/new-frontend-plugin/src/routes.ts similarity index 100% rename from packages/cli/templates/new-frontend-plugin/src/routes.ts rename to packages/cli-module-new/templates/new-frontend-plugin/src/routes.ts diff --git a/packages/cli/templates/new-frontend-plugin/src/setupTests.ts b/packages/cli-module-new/templates/new-frontend-plugin/src/setupTests.ts similarity index 100% rename from packages/cli/templates/new-frontend-plugin/src/setupTests.ts rename to packages/cli-module-new/templates/new-frontend-plugin/src/setupTests.ts diff --git a/packages/cli/templates/node-library/.eslintrc.js.hbs b/packages/cli-module-new/templates/node-library/.eslintrc.js.hbs similarity index 100% rename from packages/cli/templates/node-library/.eslintrc.js.hbs rename to packages/cli-module-new/templates/node-library/.eslintrc.js.hbs diff --git a/packages/cli/templates/node-library/README.md.hbs b/packages/cli-module-new/templates/node-library/README.md.hbs similarity index 100% rename from packages/cli/templates/node-library/README.md.hbs rename to packages/cli-module-new/templates/node-library/README.md.hbs diff --git a/packages/cli/templates/node-library/package.json.hbs b/packages/cli-module-new/templates/node-library/package.json.hbs similarity index 100% rename from packages/cli/templates/node-library/package.json.hbs rename to packages/cli-module-new/templates/node-library/package.json.hbs diff --git a/packages/cli/templates/node-library/portable-template.yaml b/packages/cli-module-new/templates/node-library/portable-template.yaml similarity index 100% rename from packages/cli/templates/node-library/portable-template.yaml rename to packages/cli-module-new/templates/node-library/portable-template.yaml diff --git a/packages/cli/templates/node-library/src/index.ts.hbs b/packages/cli-module-new/templates/node-library/src/index.ts.hbs similarity index 100% rename from packages/cli/templates/node-library/src/index.ts.hbs rename to packages/cli-module-new/templates/node-library/src/index.ts.hbs diff --git a/packages/cli/templates/node-library/src/setupTests.ts b/packages/cli-module-new/templates/node-library/src/setupTests.ts similarity index 100% rename from packages/cli/templates/node-library/src/setupTests.ts rename to packages/cli-module-new/templates/node-library/src/setupTests.ts diff --git a/packages/cli/templates/plugin-common-library/.eslintrc.js.hbs b/packages/cli-module-new/templates/plugin-common-library/.eslintrc.js.hbs similarity index 100% rename from packages/cli/templates/plugin-common-library/.eslintrc.js.hbs rename to packages/cli-module-new/templates/plugin-common-library/.eslintrc.js.hbs diff --git a/packages/cli/templates/plugin-common-library/README.md.hbs b/packages/cli-module-new/templates/plugin-common-library/README.md.hbs similarity index 100% rename from packages/cli/templates/plugin-common-library/README.md.hbs rename to packages/cli-module-new/templates/plugin-common-library/README.md.hbs diff --git a/packages/cli/templates/plugin-common-library/package.json.hbs b/packages/cli-module-new/templates/plugin-common-library/package.json.hbs similarity index 100% rename from packages/cli/templates/plugin-common-library/package.json.hbs rename to packages/cli-module-new/templates/plugin-common-library/package.json.hbs diff --git a/packages/cli/templates/plugin-common-library/portable-template.yaml b/packages/cli-module-new/templates/plugin-common-library/portable-template.yaml similarity index 100% rename from packages/cli/templates/plugin-common-library/portable-template.yaml rename to packages/cli-module-new/templates/plugin-common-library/portable-template.yaml diff --git a/packages/cli/templates/plugin-common-library/src/index.ts.hbs b/packages/cli-module-new/templates/plugin-common-library/src/index.ts.hbs similarity index 100% rename from packages/cli/templates/plugin-common-library/src/index.ts.hbs rename to packages/cli-module-new/templates/plugin-common-library/src/index.ts.hbs diff --git a/packages/cli/templates/plugin-common-library/src/setupTests.ts b/packages/cli-module-new/templates/plugin-common-library/src/setupTests.ts similarity index 100% rename from packages/cli/templates/plugin-common-library/src/setupTests.ts rename to packages/cli-module-new/templates/plugin-common-library/src/setupTests.ts diff --git a/packages/cli/templates/plugin-node-library/.eslintrc.js.hbs b/packages/cli-module-new/templates/plugin-node-library/.eslintrc.js.hbs similarity index 100% rename from packages/cli/templates/plugin-node-library/.eslintrc.js.hbs rename to packages/cli-module-new/templates/plugin-node-library/.eslintrc.js.hbs diff --git a/packages/cli/templates/plugin-node-library/README.md.hbs b/packages/cli-module-new/templates/plugin-node-library/README.md.hbs similarity index 100% rename from packages/cli/templates/plugin-node-library/README.md.hbs rename to packages/cli-module-new/templates/plugin-node-library/README.md.hbs diff --git a/packages/cli/templates/plugin-node-library/package.json.hbs b/packages/cli-module-new/templates/plugin-node-library/package.json.hbs similarity index 100% rename from packages/cli/templates/plugin-node-library/package.json.hbs rename to packages/cli-module-new/templates/plugin-node-library/package.json.hbs diff --git a/packages/cli/templates/plugin-node-library/portable-template.yaml b/packages/cli-module-new/templates/plugin-node-library/portable-template.yaml similarity index 100% rename from packages/cli/templates/plugin-node-library/portable-template.yaml rename to packages/cli-module-new/templates/plugin-node-library/portable-template.yaml diff --git a/packages/cli/templates/plugin-node-library/src/index.ts.hbs b/packages/cli-module-new/templates/plugin-node-library/src/index.ts.hbs similarity index 100% rename from packages/cli/templates/plugin-node-library/src/index.ts.hbs rename to packages/cli-module-new/templates/plugin-node-library/src/index.ts.hbs diff --git a/packages/cli/templates/plugin-node-library/src/setupTests.ts b/packages/cli-module-new/templates/plugin-node-library/src/setupTests.ts similarity index 100% rename from packages/cli/templates/plugin-node-library/src/setupTests.ts rename to packages/cli-module-new/templates/plugin-node-library/src/setupTests.ts diff --git a/packages/cli/templates/plugin-web-library/.eslintrc.js.hbs b/packages/cli-module-new/templates/plugin-web-library/.eslintrc.js.hbs similarity index 100% rename from packages/cli/templates/plugin-web-library/.eslintrc.js.hbs rename to packages/cli-module-new/templates/plugin-web-library/.eslintrc.js.hbs diff --git a/packages/cli/templates/plugin-web-library/README.md.hbs b/packages/cli-module-new/templates/plugin-web-library/README.md.hbs similarity index 100% rename from packages/cli/templates/plugin-web-library/README.md.hbs rename to packages/cli-module-new/templates/plugin-web-library/README.md.hbs diff --git a/packages/cli/templates/plugin-web-library/package.json.hbs b/packages/cli-module-new/templates/plugin-web-library/package.json.hbs similarity index 100% rename from packages/cli/templates/plugin-web-library/package.json.hbs rename to packages/cli-module-new/templates/plugin-web-library/package.json.hbs diff --git a/packages/cli/templates/plugin-web-library/portable-template.yaml b/packages/cli-module-new/templates/plugin-web-library/portable-template.yaml similarity index 100% rename from packages/cli/templates/plugin-web-library/portable-template.yaml rename to packages/cli-module-new/templates/plugin-web-library/portable-template.yaml diff --git a/packages/cli/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.test.tsx b/packages/cli-module-new/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.test.tsx similarity index 100% rename from packages/cli/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.test.tsx rename to packages/cli-module-new/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.test.tsx diff --git a/packages/cli/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.tsx b/packages/cli-module-new/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.tsx similarity index 100% rename from packages/cli/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.tsx rename to packages/cli-module-new/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.tsx diff --git a/packages/cli/templates/plugin-web-library/src/components/ExampleComponent/index.ts b/packages/cli-module-new/templates/plugin-web-library/src/components/ExampleComponent/index.ts similarity index 100% rename from packages/cli/templates/plugin-web-library/src/components/ExampleComponent/index.ts rename to packages/cli-module-new/templates/plugin-web-library/src/components/ExampleComponent/index.ts diff --git a/packages/cli/templates/plugin-web-library/src/components/index.ts b/packages/cli-module-new/templates/plugin-web-library/src/components/index.ts similarity index 100% rename from packages/cli/templates/plugin-web-library/src/components/index.ts rename to packages/cli-module-new/templates/plugin-web-library/src/components/index.ts diff --git a/packages/cli/templates/plugin-web-library/src/hooks/index.ts b/packages/cli-module-new/templates/plugin-web-library/src/hooks/index.ts similarity index 100% rename from packages/cli/templates/plugin-web-library/src/hooks/index.ts rename to packages/cli-module-new/templates/plugin-web-library/src/hooks/index.ts diff --git a/packages/cli/templates/plugin-web-library/src/hooks/useExample/index.ts b/packages/cli-module-new/templates/plugin-web-library/src/hooks/useExample/index.ts similarity index 100% rename from packages/cli/templates/plugin-web-library/src/hooks/useExample/index.ts rename to packages/cli-module-new/templates/plugin-web-library/src/hooks/useExample/index.ts diff --git a/packages/cli/templates/plugin-web-library/src/hooks/useExample/useExample.ts b/packages/cli-module-new/templates/plugin-web-library/src/hooks/useExample/useExample.ts similarity index 100% rename from packages/cli/templates/plugin-web-library/src/hooks/useExample/useExample.ts rename to packages/cli-module-new/templates/plugin-web-library/src/hooks/useExample/useExample.ts diff --git a/packages/cli/templates/plugin-web-library/src/index.ts.hbs b/packages/cli-module-new/templates/plugin-web-library/src/index.ts.hbs similarity index 100% rename from packages/cli/templates/plugin-web-library/src/index.ts.hbs rename to packages/cli-module-new/templates/plugin-web-library/src/index.ts.hbs diff --git a/packages/cli/templates/plugin-web-library/src/setupTests.ts b/packages/cli-module-new/templates/plugin-web-library/src/setupTests.ts similarity index 100% rename from packages/cli/templates/plugin-web-library/src/setupTests.ts rename to packages/cli-module-new/templates/plugin-web-library/src/setupTests.ts diff --git a/packages/cli/templates/scaffolder-backend-module/.eslintrc.js.hbs b/packages/cli-module-new/templates/scaffolder-backend-module/.eslintrc.js.hbs similarity index 100% rename from packages/cli/templates/scaffolder-backend-module/.eslintrc.js.hbs rename to packages/cli-module-new/templates/scaffolder-backend-module/.eslintrc.js.hbs diff --git a/packages/cli/templates/scaffolder-backend-module/README.md.hbs b/packages/cli-module-new/templates/scaffolder-backend-module/README.md.hbs similarity index 100% rename from packages/cli/templates/scaffolder-backend-module/README.md.hbs rename to packages/cli-module-new/templates/scaffolder-backend-module/README.md.hbs diff --git a/packages/cli/templates/scaffolder-backend-module/package.json.hbs b/packages/cli-module-new/templates/scaffolder-backend-module/package.json.hbs similarity index 100% rename from packages/cli/templates/scaffolder-backend-module/package.json.hbs rename to packages/cli-module-new/templates/scaffolder-backend-module/package.json.hbs diff --git a/packages/cli/templates/scaffolder-backend-module/portable-template.yaml b/packages/cli-module-new/templates/scaffolder-backend-module/portable-template.yaml similarity index 100% rename from packages/cli/templates/scaffolder-backend-module/portable-template.yaml rename to packages/cli-module-new/templates/scaffolder-backend-module/portable-template.yaml diff --git a/packages/cli/templates/scaffolder-backend-module/src/actions/example.test.ts b/packages/cli-module-new/templates/scaffolder-backend-module/src/actions/example.test.ts similarity index 100% rename from packages/cli/templates/scaffolder-backend-module/src/actions/example.test.ts rename to packages/cli-module-new/templates/scaffolder-backend-module/src/actions/example.test.ts diff --git a/packages/cli/templates/scaffolder-backend-module/src/actions/example.ts b/packages/cli-module-new/templates/scaffolder-backend-module/src/actions/example.ts similarity index 100% rename from packages/cli/templates/scaffolder-backend-module/src/actions/example.ts rename to packages/cli-module-new/templates/scaffolder-backend-module/src/actions/example.ts diff --git a/packages/cli/templates/scaffolder-backend-module/src/index.ts.hbs b/packages/cli-module-new/templates/scaffolder-backend-module/src/index.ts.hbs similarity index 100% rename from packages/cli/templates/scaffolder-backend-module/src/index.ts.hbs rename to packages/cli-module-new/templates/scaffolder-backend-module/src/index.ts.hbs diff --git a/packages/cli/templates/scaffolder-backend-module/src/module.ts b/packages/cli-module-new/templates/scaffolder-backend-module/src/module.ts similarity index 100% rename from packages/cli/templates/scaffolder-backend-module/src/module.ts rename to packages/cli-module-new/templates/scaffolder-backend-module/src/module.ts diff --git a/packages/cli/templates/web-library/.eslintrc.js.hbs b/packages/cli-module-new/templates/web-library/.eslintrc.js.hbs similarity index 100% rename from packages/cli/templates/web-library/.eslintrc.js.hbs rename to packages/cli-module-new/templates/web-library/.eslintrc.js.hbs diff --git a/packages/cli/templates/web-library/README.md.hbs b/packages/cli-module-new/templates/web-library/README.md.hbs similarity index 100% rename from packages/cli/templates/web-library/README.md.hbs rename to packages/cli-module-new/templates/web-library/README.md.hbs diff --git a/packages/cli/templates/web-library/package.json.hbs b/packages/cli-module-new/templates/web-library/package.json.hbs similarity index 100% rename from packages/cli/templates/web-library/package.json.hbs rename to packages/cli-module-new/templates/web-library/package.json.hbs diff --git a/packages/cli/templates/web-library/portable-template.yaml b/packages/cli-module-new/templates/web-library/portable-template.yaml similarity index 100% rename from packages/cli/templates/web-library/portable-template.yaml rename to packages/cli-module-new/templates/web-library/portable-template.yaml diff --git a/packages/cli/templates/web-library/src/index.ts.hbs b/packages/cli-module-new/templates/web-library/src/index.ts.hbs similarity index 100% rename from packages/cli/templates/web-library/src/index.ts.hbs rename to packages/cli-module-new/templates/web-library/src/index.ts.hbs diff --git a/packages/cli/templates/web-library/src/setupTests.ts b/packages/cli-module-new/templates/web-library/src/setupTests.ts similarity index 100% rename from packages/cli/templates/web-library/src/setupTests.ts rename to packages/cli-module-new/templates/web-library/src/setupTests.ts diff --git a/packages/create-app/templates/next-app/package.json.hbs b/packages/create-app/templates/next-app/package.json.hbs index 49436f5fcf..2ace0f549b 100644 --- a/packages/create-app/templates/next-app/package.json.hbs +++ b/packages/create-app/templates/next-app/package.json.hbs @@ -29,17 +29,17 @@ "license": "UNLICENSED" }, "templates": [ - "@backstage/cli/templates/new-frontend-plugin", - "@backstage/cli/templates/new-frontend-plugin-module", - "@backstage/cli/templates/backend-plugin", - "@backstage/cli/templates/backend-plugin-module", - "@backstage/cli/templates/plugin-web-library", - "@backstage/cli/templates/plugin-node-library", - "@backstage/cli/templates/plugin-common-library", - "@backstage/cli/templates/web-library", - "@backstage/cli/templates/node-library", - "@backstage/cli/templates/catalog-provider-module", - "@backstage/cli/templates/scaffolder-backend-module" + "@backstage/cli-module-new/templates/new-frontend-plugin", + "@backstage/cli-module-new/templates/new-frontend-plugin-module", + "@backstage/cli-module-new/templates/backend-plugin", + "@backstage/cli-module-new/templates/backend-plugin-module", + "@backstage/cli-module-new/templates/plugin-web-library", + "@backstage/cli-module-new/templates/plugin-node-library", + "@backstage/cli-module-new/templates/plugin-common-library", + "@backstage/cli-module-new/templates/web-library", + "@backstage/cli-module-new/templates/node-library", + "@backstage/cli-module-new/templates/catalog-provider-module", + "@backstage/cli-module-new/templates/scaffolder-backend-module" ] } } @@ -51,6 +51,7 @@ "devDependencies": { "@backstage/cli": "^{{version '@backstage/cli'}}", "@backstage/cli-defaults": "^{{version '@backstage/cli-defaults'}}", + "@backstage/cli-module-new": "^{{version '@backstage/cli-module-new'}}", "@backstage/e2e-test-utils": "^{{version '@backstage/e2e-test-utils'}}", "@jest/environment-jsdom-abstract": "^30.0.0", "@playwright/test": "^1.32.3",