Merge pull request #21696 from taras/tm/fix-template-path

Includes templates in @backstage/repo-tools package and use them in CLI
This commit is contained in:
Fredrik Adelöw
2023-12-01 23:35:40 +01:00
committed by GitHub
4 changed files with 19 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/repo-tools': patch
---
Includes templates in @backstage/repo-tools package and use them in the CLI
+3 -1
View File
@@ -32,6 +32,7 @@
"dependencies": {
"@apidevtools/swagger-parser": "^10.1.0",
"@apisyouwonthate/style-guide": "^1.4.0",
"@backstage/backend-common": "workspace:^",
"@backstage/catalog-model": "workspace:^",
"@backstage/cli-common": "workspace:^",
"@backstage/cli-node": "workspace:^",
@@ -85,7 +86,8 @@
},
"files": [
"bin",
"dist/**/*.js"
"dist/**/*.js",
"templates"
],
"nodemonConfig": {
"watch": "./src",
@@ -21,6 +21,7 @@ import { paths as cliPaths } from '../../../lib/paths';
import { mkdirpSync } from 'fs-extra';
import fs from 'fs-extra';
import { exec } from '../../../lib/exec';
import { resolvePackagePath } from '@backstage/backend-common';
async function generate(spec: string, outputDirectory: string) {
const resolvedOpenapiPath = resolve(spec);
@@ -47,7 +48,15 @@ async function generate(spec: string, outputDirectory: string) {
'-g',
'typescript',
'-c',
'templates/typescript-backstage.yaml',
resolvePackagePath(
'@backstage/repo-tools',
'templates/typescript-backstage.yaml',
),
'-t',
resolvePackagePath(
'@backstage/repo-tools',
'templates/typescript-backstage',
),
'--generator-key',
'v3.0',
],
+1
View File
@@ -10083,6 +10083,7 @@ __metadata:
dependencies:
"@apidevtools/swagger-parser": ^10.1.0
"@apisyouwonthate/style-guide": ^1.4.0
"@backstage/backend-common": "workspace:^"
"@backstage/catalog-model": "workspace:^"
"@backstage/cli": "workspace:^"
"@backstage/cli-common": "workspace:^"