From 0bcb5fc5c10701eb7eca8db06679a09dda737554 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 2 Aug 2025 14:24:23 +0200 Subject: [PATCH 1/4] cli/templates: frontend-plugin-module -> new-* + remove from default Signed-off-by: Patrik Oldsberg --- packages/cli/src/modules/new/lib/defaultTemplates.ts | 1 - .../.eslintrc.js.hbs | 0 .../README.md.hbs | 0 .../package.json.hbs | 0 .../portable-template.yaml | 0 .../src/index.ts.hbs | 0 .../src/plugin.ts.hbs | 0 .../src/setupTests.ts | 0 8 files changed, 1 deletion(-) rename packages/cli/templates/{frontend-plugin-module => new-frontend-plugin-module}/.eslintrc.js.hbs (100%) rename packages/cli/templates/{frontend-plugin-module => new-frontend-plugin-module}/README.md.hbs (100%) rename packages/cli/templates/{frontend-plugin-module => new-frontend-plugin-module}/package.json.hbs (100%) rename packages/cli/templates/{frontend-plugin-module => new-frontend-plugin-module}/portable-template.yaml (100%) rename packages/cli/templates/{frontend-plugin-module => new-frontend-plugin-module}/src/index.ts.hbs (100%) rename packages/cli/templates/{frontend-plugin-module => new-frontend-plugin-module}/src/plugin.ts.hbs (100%) rename packages/cli/templates/{frontend-plugin-module => new-frontend-plugin-module}/src/setupTests.ts (100%) diff --git a/packages/cli/src/modules/new/lib/defaultTemplates.ts b/packages/cli/src/modules/new/lib/defaultTemplates.ts index 2a4ff9e963..1a2f7a89d4 100644 --- a/packages/cli/src/modules/new/lib/defaultTemplates.ts +++ b/packages/cli/src/modules/new/lib/defaultTemplates.ts @@ -16,7 +16,6 @@ export const defaultTemplates = [ '@backstage/cli/templates/frontend-plugin', - '@backstage/cli/templates/frontend-plugin-module', '@backstage/cli/templates/backend-plugin', '@backstage/cli/templates/backend-plugin-module', '@backstage/cli/templates/plugin-web-library', diff --git a/packages/cli/templates/frontend-plugin-module/.eslintrc.js.hbs b/packages/cli/templates/new-frontend-plugin-module/.eslintrc.js.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin-module/.eslintrc.js.hbs rename to packages/cli/templates/new-frontend-plugin-module/.eslintrc.js.hbs diff --git a/packages/cli/templates/frontend-plugin-module/README.md.hbs b/packages/cli/templates/new-frontend-plugin-module/README.md.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin-module/README.md.hbs rename to packages/cli/templates/new-frontend-plugin-module/README.md.hbs diff --git a/packages/cli/templates/frontend-plugin-module/package.json.hbs b/packages/cli/templates/new-frontend-plugin-module/package.json.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin-module/package.json.hbs rename to packages/cli/templates/new-frontend-plugin-module/package.json.hbs diff --git a/packages/cli/templates/frontend-plugin-module/portable-template.yaml b/packages/cli/templates/new-frontend-plugin-module/portable-template.yaml similarity index 100% rename from packages/cli/templates/frontend-plugin-module/portable-template.yaml rename to packages/cli/templates/new-frontend-plugin-module/portable-template.yaml diff --git a/packages/cli/templates/frontend-plugin-module/src/index.ts.hbs b/packages/cli/templates/new-frontend-plugin-module/src/index.ts.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin-module/src/index.ts.hbs rename to packages/cli/templates/new-frontend-plugin-module/src/index.ts.hbs diff --git a/packages/cli/templates/frontend-plugin-module/src/plugin.ts.hbs b/packages/cli/templates/new-frontend-plugin-module/src/plugin.ts.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin-module/src/plugin.ts.hbs rename to packages/cli/templates/new-frontend-plugin-module/src/plugin.ts.hbs diff --git a/packages/cli/templates/frontend-plugin-module/src/setupTests.ts b/packages/cli/templates/new-frontend-plugin-module/src/setupTests.ts similarity index 100% rename from packages/cli/templates/frontend-plugin-module/src/setupTests.ts rename to packages/cli/templates/new-frontend-plugin-module/src/setupTests.ts From 35dd3f58b4c011d24de9a6ffe7c8abed031b5f62 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 2 Aug 2025 14:27:15 +0200 Subject: [PATCH 2/4] cli/templates/new-frontend-plugin-module: add pluginId to package.json Signed-off-by: Patrik Oldsberg --- .../cli/templates/new-frontend-plugin-module/package.json.hbs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/templates/new-frontend-plugin-module/package.json.hbs b/packages/cli/templates/new-frontend-plugin-module/package.json.hbs index 2a12cb3559..d0511d96c0 100644 --- a/packages/cli/templates/new-frontend-plugin-module/package.json.hbs +++ b/packages/cli/templates/new-frontend-plugin-module/package.json.hbs @@ -10,7 +10,8 @@ "types": "dist/index.d.ts" }, "backstage": { - "role": "frontend-plugin-module" + "role": "frontend-plugin-module", + "pluginId": "{{pluginId}}" }, "sideEffects": false, "scripts": { From 6c6991453f65c0fe1a0177e122a8ae64bc047600 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 3 Aug 2025 02:16:02 +0200 Subject: [PATCH 3/4] cli/templates/new-frontend-plugin-module: fix package export + change to module.tsx Signed-off-by: Patrik Oldsberg --- .../cli/templates/new-frontend-plugin-module/src/index.ts.hbs | 2 +- .../src/{plugin.ts.hbs => module.tsx.hbs} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename packages/cli/templates/new-frontend-plugin-module/src/{plugin.ts.hbs => module.tsx.hbs} (100%) diff --git a/packages/cli/templates/new-frontend-plugin-module/src/index.ts.hbs b/packages/cli/templates/new-frontend-plugin-module/src/index.ts.hbs index 63ead4f9c9..aec3cb2b06 100644 --- a/packages/cli/templates/new-frontend-plugin-module/src/index.ts.hbs +++ b/packages/cli/templates/new-frontend-plugin-module/src/index.ts.hbs @@ -1 +1 @@ -export { {{ moduleVar }} } from './plugin'; +export { {{ moduleVar }} as default } from './plugin'; diff --git a/packages/cli/templates/new-frontend-plugin-module/src/plugin.ts.hbs b/packages/cli/templates/new-frontend-plugin-module/src/module.tsx.hbs similarity index 100% rename from packages/cli/templates/new-frontend-plugin-module/src/plugin.ts.hbs rename to packages/cli/templates/new-frontend-plugin-module/src/module.tsx.hbs From 4c7dc313aae12f394805c598b7407554078f65a2 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 4 Aug 2025 10:06:17 +0200 Subject: [PATCH 4/4] create-app: add explicit NFS template to next-app Signed-off-by: Patrik Oldsberg --- .../templates/next-app/package.json.hbs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/create-app/templates/next-app/package.json.hbs b/packages/create-app/templates/next-app/package.json.hbs index 8399c6505a..2a476f6dea 100644 --- a/packages/create-app/templates/next-app/package.json.hbs +++ b/packages/create-app/templates/next-app/package.json.hbs @@ -22,6 +22,27 @@ "prettier:check": "prettier --check .", "new": "backstage-cli new" }, + "backstage": { + "cli": { + "new": { + "globals": { + "license": "UNLICENSED" + }, + "templates": [ + "@backstage/cli/templates/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/scaffolder-backend-module", + ] + } + } + }, "workspaces": { "packages": [ "packages/*",