cli/new: remove targetPath configuration in templates
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -44,7 +44,6 @@ describe('writeTemplateContents', () => {
|
||||
id: 'test',
|
||||
files: [],
|
||||
role: 'frontend-plugin',
|
||||
targetPath: 'plugins/plugin-test',
|
||||
templateValues: {},
|
||||
},
|
||||
{
|
||||
@@ -83,7 +82,6 @@ describe('writeTemplateContents', () => {
|
||||
},
|
||||
],
|
||||
role: 'frontend-plugin',
|
||||
targetPath: 'plugins/plugin-test',
|
||||
templateValues: {},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -34,7 +34,6 @@ describe('collectTemplateParams', () => {
|
||||
template: {
|
||||
id: 'test',
|
||||
templatePath: '/test',
|
||||
targetPath: '/example',
|
||||
role: 'frontend-plugin' as const,
|
||||
files: [],
|
||||
templateValues: {},
|
||||
|
||||
@@ -23,7 +23,6 @@ describe('loadTemplate', () => {
|
||||
content: {
|
||||
'path/to/template1.yaml': `
|
||||
template: template1
|
||||
targetPath: plugins
|
||||
role: frontend-plugin
|
||||
`,
|
||||
'path/to/template1/hello.txt': 'hello world',
|
||||
@@ -37,9 +36,9 @@ describe('loadTemplate', () => {
|
||||
|
||||
expect(result).toEqual({
|
||||
id: 'template1',
|
||||
templatePath: mockDir.resolve('path/to/template1'),
|
||||
targetPath: 'plugins',
|
||||
role: 'frontend-plugin',
|
||||
files: [{ path: 'hello.txt', content: 'hello world' }],
|
||||
templateValues: {},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -96,7 +95,6 @@ describe('loadTemplate', () => {
|
||||
content: {
|
||||
'path/to/template1.yaml': `
|
||||
template: template1
|
||||
targetPath: plugins
|
||||
role: invalid-role
|
||||
`,
|
||||
},
|
||||
@@ -119,7 +117,6 @@ describe('loadTemplate', () => {
|
||||
content: {
|
||||
'path/to/template1.yaml': `
|
||||
template: template1
|
||||
targetPath: plugins
|
||||
role: frontend-plugin
|
||||
`,
|
||||
},
|
||||
|
||||
@@ -34,7 +34,6 @@ const templateDefinitionSchema = z
|
||||
.object({
|
||||
description: z.string().optional(),
|
||||
template: z.string(),
|
||||
targetPath: z.string(),
|
||||
role: z.enum(TEMPLATE_ROLES),
|
||||
additionalActions: z.array(z.string()).optional(),
|
||||
templateValues: z.record(z.string()).optional(),
|
||||
|
||||
@@ -67,7 +67,6 @@ export type PortableTemplateFile = {
|
||||
export type PortableTemplate = {
|
||||
id: string;
|
||||
description?: string;
|
||||
targetPath: string;
|
||||
role: PortableTemplateRole;
|
||||
additionalActions?: string[];
|
||||
files: PortableTemplateFile[];
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
description: A new backend module that extends an existing backend plugin with additional features
|
||||
template: ./default-backend-module
|
||||
targetPath: plugins
|
||||
role: backend-plugin-module
|
||||
additionalActions:
|
||||
- install-backend
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
description: A new backend plugin
|
||||
template: ./default-backend-plugin
|
||||
targetPath: plugins
|
||||
role: backend-plugin
|
||||
additionalActions:
|
||||
- install-backend
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
description: A new isomorphic common plugin package
|
||||
template: ./default-common-plugin-package
|
||||
targetPath: plugins
|
||||
role: plugin-common-library
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
description: A new Node.js library plugin package
|
||||
template: ./default-node-plugin-package
|
||||
targetPath: plugins
|
||||
role: plugin-node-library
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
description: A new frontend plugin
|
||||
template: ./default-plugin
|
||||
targetPath: plugins
|
||||
role: frontend-plugin
|
||||
additionalActions:
|
||||
- install-frontend
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
description: A new web library plugin package
|
||||
template: ./default-react-plugin-package
|
||||
targetPath: plugins
|
||||
role: plugin-web-library
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
description: A new node-library package, exporting shared functionality for backend plugins and modules
|
||||
template: ./node-library-package
|
||||
targetPath: packages
|
||||
role: node-library
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
description: A module exporting custom actions for @backstage/plugin-scaffolder-backend
|
||||
template: ./scaffolder-module
|
||||
targetPath: plugins
|
||||
role: backend-plugin-module
|
||||
params:
|
||||
pluginId: scaffolder
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
description: A new web-library package, exporting shared functionality for frontend plugins
|
||||
template: ./web-library-package
|
||||
targetPath: packages
|
||||
role: web-library
|
||||
|
||||
Reference in New Issue
Block a user