@backstage/repo-tools 0.16.5 → 0.16.6-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/CHANGELOG.md +13 -2
  2. package/dist/commands/api-reports/api-reports/createTemporaryTsConfig.cjs.js +2 -2
  3. package/dist/commands/api-reports/api-reports/generateTypeDeclarations.cjs.js +2 -3
  4. package/dist/commands/api-reports/api-reports/patchApiReportGeneration.cjs.js +2 -2
  5. package/dist/commands/api-reports/api-reports/runApiExtraction.cjs.js +6 -15
  6. package/dist/commands/api-reports/buildApiReports.cjs.js +4 -5
  7. package/dist/commands/api-reports/categorizePackageDirs.cjs.js +3 -3
  8. package/dist/commands/api-reports/cli-reports/runCliExtraction.cjs.js +3 -3
  9. package/dist/commands/api-reports/common/tryRunPrettier.cjs.js +3 -3
  10. package/dist/commands/api-reports/sql-reports/runSqlExtraction.cjs.js +6 -6
  11. package/dist/commands/knip-reports/knip-extractor.cjs.js +6 -6
  12. package/dist/commands/lint-legacy-backend-exports/lint-legacy-backend-exports.cjs.js +2 -2
  13. package/dist/commands/package/schema/openapi/diff.cjs.js +4 -4
  14. package/dist/commands/package/schema/openapi/fuzz.cjs.js +3 -3
  15. package/dist/commands/package/schema/openapi/generate/client.cjs.js +5 -5
  16. package/dist/commands/package/schema/openapi/generate/server.cjs.js +6 -6
  17. package/dist/commands/package/schema/openapi/init.cjs.js +4 -4
  18. package/dist/commands/package-docs/command.cjs.js +17 -22
  19. package/dist/commands/package-docs/utils.cjs.js +5 -2
  20. package/dist/commands/repo/schema/openapi/diff.cjs.js +3 -3
  21. package/dist/commands/repo/schema/openapi/test.cjs.js +8 -3
  22. package/dist/commands/repo/schema/openapi/verify.cjs.js +2 -2
  23. package/dist/lib/openapi/helpers.cjs.js +2 -2
  24. package/dist/lib/paths.cjs.js +7 -7
  25. package/dist/lib/runner.cjs.js +2 -1
  26. package/dist/package.json.cjs.js +1 -1
  27. package/package.json +12 -12
package/CHANGELOG.md CHANGED
@@ -1,10 +1,21 @@
1
1
  # @backstage/repo-tools
2
2
 
3
- ## 0.16.5
3
+ ## 0.16.6-next.0
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - e67d18a: Updated `@microsoft/api-extractor` to `7.57.3` and added tests for `getTsDocConfig`
7
+ - 6738cf0: build(deps): bump `minimatch` from 9.0.5 to 10.2.1
8
+ - 2a51546: Fixed prettier existence checks in OpenAPI commands to use `fs.pathExists` instead of checking the resolved path string, which was always truthy.
9
+ - 70fc178: Migrated from deprecated `findPaths` to `targetPaths` and `findOwnPaths` from `@backstage/cli-common`.
10
+ - de62a9d: Upgraded `commander` dependency from `^12.0.0` to `^14.0.3` across all CLI packages.
11
+ - 18a946c: Updated `@microsoft/api-extractor` to `7.57.3` and added tests for `getTsDocConfig`
12
+ - Updated dependencies
13
+ - @backstage/cli-common@0.2.0-next.0
14
+ - @backstage/cli-node@0.2.19-next.0
15
+ - @backstage/config-loader@1.10.9-next.0
16
+ - @backstage/backend-plugin-api@1.7.1-next.0
17
+ - @backstage/catalog-model@1.7.6
18
+ - @backstage/errors@1.2.7
8
19
 
9
20
  ## 0.16.4
10
21
 
@@ -2,14 +2,14 @@
2
2
 
3
3
  var fs = require('fs-extra');
4
4
  var path = require('node:path');
5
- var paths = require('../../../lib/paths.cjs.js');
5
+ var cliCommon = require('@backstage/cli-common');
6
6
 
7
7
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
8
 
9
9
  var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
10
10
 
11
11
  async function createTemporaryTsConfig(includedPackageDirs) {
12
- const path$1 = paths.paths.resolveTargetRoot("tsconfig.tmp.json");
12
+ const path$1 = cliCommon.targetPaths.resolveRoot("tsconfig.tmp.json");
13
13
  process.once("exit", () => {
14
14
  fs__default.default.removeSync(path$1);
15
15
  });
@@ -2,14 +2,13 @@
2
2
 
3
3
  var fs = require('fs-extra');
4
4
  var cliCommon = require('@backstage/cli-common');
5
- var paths = require('../../../lib/paths.cjs.js');
6
5
 
7
6
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
7
 
9
8
  var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
10
9
 
11
10
  async function generateTypeDeclarations(tsconfigFilePath) {
12
- await fs__default.default.remove(paths.paths.resolveTargetRoot("dist-types"));
11
+ await fs__default.default.remove(cliCommon.targetPaths.resolveRoot("dist-types"));
13
12
  try {
14
13
  await cliCommon.run(
15
14
  [
@@ -23,7 +22,7 @@ async function generateTypeDeclarations(tsconfigFilePath) {
23
22
  "false"
24
23
  ],
25
24
  {
26
- cwd: paths.paths.targetRoot
25
+ cwd: cliCommon.targetPaths.rootDir
27
26
  }
28
27
  ).waitForExit();
29
28
  } catch (error) {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var tryRunPrettier = require('../common/tryRunPrettier.cjs.js');
4
- var paths = require('../../../lib/paths.cjs.js');
4
+ var cliCommon = require('@backstage/cli-common');
5
5
 
6
6
  let applied = false;
7
7
  function patchApiReportGeneration() {
@@ -92,7 +92,7 @@ function patchApiReportGeneration() {
92
92
  parser: "markdown",
93
93
  // We need a real-looking filepath for proper config resolution, not just a directory
94
94
  // Ideally, the real filepath would be better, but it would require too much patching, for very little gain.
95
- filepath: `${paths.paths.targetRoot}/report.api.md`
95
+ filepath: `${cliCommon.targetPaths.rootDir}/report.api.md`
96
96
  });
97
97
  };
98
98
  }
@@ -8,7 +8,7 @@ var lodash = require('lodash');
8
8
  var minimatch = require('minimatch');
9
9
  var path = require('node:path');
10
10
  var getPackageExportDetails = require('../../../lib/getPackageExportDetails.cjs.js');
11
- var paths = require('../../../lib/paths.cjs.js');
11
+ var cliCommon = require('@backstage/cli-common');
12
12
  var logApiReportInstructions = require('../common/logApiReportInstructions.cjs.js');
13
13
  var patchApiReportGeneration = require('./patchApiReportGeneration.cjs.js');
14
14
 
@@ -16,9 +16,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
16
16
 
17
17
  var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
18
18
 
19
- const tmpDir = paths.paths.resolveTargetRoot(
20
- "./node_modules/.cache/api-extractor"
21
- );
19
+ const tmpDir = cliCommon.targetPaths.resolveRoot("./node_modules/.cache/api-extractor");
22
20
  async function countApiReportWarnings(reportPath) {
23
21
  try {
24
22
  const content = await fs__default.default.readFile(reportPath, "utf8");
@@ -58,7 +56,7 @@ async function findPackageEntryPoints(packageDirs) {
58
56
  return Promise.all(
59
57
  packageDirs.map(async (packageDir) => {
60
58
  const pkg = await fs__default.default.readJson(
61
- paths.paths.resolveTargetRoot(packageDir, "package.json")
59
+ cliCommon.targetPaths.resolveRoot(packageDir, "package.json")
62
60
  );
63
61
  return getPackageExportDetails.getPackageExportDetails(pkg).map((details) => {
64
62
  return { packageDir, ...details };
@@ -80,11 +78,7 @@ async function runApiExtraction({
80
78
  const allEntryPoints = await findPackageEntryPoints(packageDirs);
81
79
  const allDistTypesEntryPointPaths = allEntryPoints.map(
82
80
  ({ packageDir, distTypesPath }) => {
83
- return paths.paths.resolveTargetRoot(
84
- "./dist-types",
85
- packageDir,
86
- distTypesPath
87
- );
81
+ return cliCommon.targetPaths.resolveRoot("./dist-types", packageDir, distTypesPath);
88
82
  }
89
83
  );
90
84
  let compilerState = void 0;
@@ -101,11 +95,8 @@ async function runApiExtraction({
101
95
  )) {
102
96
  console.log(`## Processing ${packageDir}`);
103
97
  const noBail = Array.isArray(allowWarnings) ? allowWarnings.some((aw) => aw === packageDir || minimatch.minimatch(packageDir, aw)) : allowWarnings;
104
- const projectFolder = paths.paths.resolveTargetRoot(packageDir);
105
- const packageFolder = paths.paths.resolveTargetRoot(
106
- "./dist-types",
107
- packageDir
108
- );
98
+ const projectFolder = cliCommon.targetPaths.resolveRoot(packageDir);
99
+ const packageFolder = cliCommon.targetPaths.resolveRoot("./dist-types", packageDir);
109
100
  const remainingReportFiles = new Set(
110
101
  fs__default.default.readdirSync(projectFolder).filter(
111
102
  (filename) => (
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var categorizePackageDirs = require('./categorizePackageDirs.cjs.js');
4
+ var cliCommon = require('@backstage/cli-common');
4
5
  var paths = require('../../lib/paths.cjs.js');
5
6
  var runSqlExtraction = require('./sql-reports/runSqlExtraction.cjs.js');
6
7
  var runCliExtraction = require('./cli-reports/runCliExtraction.cjs.js');
@@ -10,9 +11,7 @@ var createTemporaryTsConfig = require('./api-reports/createTemporaryTsConfig.cjs
10
11
  var generateTypeDeclarations = require('./api-reports/generateTypeDeclarations.cjs.js');
11
12
 
12
13
  async function buildApiReports(paths$1 = [], opts) {
13
- const tmpDir = paths.paths.resolveTargetRoot(
14
- "./node_modules/.cache/api-extractor"
15
- );
14
+ const tmpDir = cliCommon.targetPaths.resolveRoot("./node_modules/.cache/api-extractor");
16
15
  const isCiBuild = opts.ci;
17
16
  const isDocsBuild = opts.docs;
18
17
  const runTsc = opts.tsc;
@@ -40,7 +39,7 @@ async function buildApiReports(paths$1 = [], opts) {
40
39
  if (!isAllPackages) {
41
40
  temporaryTsConfigPath = await createTemporaryTsConfig.createTemporaryTsConfig(selectedPackageDirs);
42
41
  }
43
- const tsconfigFilePath = temporaryTsConfigPath ?? paths.paths.resolveTargetRoot("tsconfig.json");
42
+ const tsconfigFilePath = temporaryTsConfigPath ?? cliCommon.targetPaths.resolveRoot("tsconfig.json");
44
43
  if (runTsc) {
45
44
  console.log("# Compiling TypeScript");
46
45
  await generateTypeDeclarations.generateTypeDeclarations(tsconfigFilePath);
@@ -76,7 +75,7 @@ async function buildApiReports(paths$1 = [], opts) {
76
75
  console.log("# Generating package documentation");
77
76
  await buildDocs.buildDocs({
78
77
  inputDir: tmpDir,
79
- outputDir: paths.paths.resolveTargetRoot("docs/reference")
78
+ outputDir: cliCommon.targetPaths.resolveRoot("docs/reference")
80
79
  });
81
80
  }
82
81
  }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var fs = require('fs-extra');
4
- var paths = require('../../lib/paths.cjs.js');
4
+ var cliCommon = require('@backstage/cli-common');
5
5
 
6
6
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
7
7
 
@@ -19,7 +19,7 @@ async function categorizePackageDirs(packageDirs) {
19
19
  if (!dir) {
20
20
  return;
21
21
  }
22
- const pkgJson = await fs__default.default.readJson(paths.paths.resolveTargetRoot(dir, "package.json")).catch((error) => {
22
+ const pkgJson = await fs__default.default.readJson(cliCommon.targetPaths.resolveRoot(dir, "package.json")).catch((error) => {
23
23
  if (error.code === "ENOENT") {
24
24
  return void 0;
25
25
  }
@@ -29,7 +29,7 @@ async function categorizePackageDirs(packageDirs) {
29
29
  if (!role) {
30
30
  return;
31
31
  }
32
- if (await fs__default.default.pathExists(paths.paths.resolveTargetRoot(dir, "migrations"))) {
32
+ if (await fs__default.default.pathExists(cliCommon.targetPaths.resolveRoot(dir, "migrations"))) {
33
33
  sqlPackageDirs.push(dir);
34
34
  }
35
35
  if (pkgJson?.backstage?.inline) {
@@ -3,7 +3,7 @@
3
3
  var path = require('node:path');
4
4
  var fs = require('fs-extra');
5
5
  var util = require('../../util.cjs.js');
6
- var paths = require('../../../lib/paths.cjs.js');
6
+ var cliCommon = require('@backstage/cli-common');
7
7
  var generateCliReport = require('./generateCliReport.cjs.js');
8
8
  var logApiReportInstructions = require('../common/logApiReportInstructions.cjs.js');
9
9
 
@@ -75,7 +75,7 @@ async function runCliExtraction({
75
75
  }) {
76
76
  for (const packageDir of packageDirs) {
77
77
  console.log(`## Processing ${packageDir}`);
78
- const fullDir = paths.paths.resolveTargetRoot(packageDir);
78
+ const fullDir = cliCommon.targetPaths.resolveRoot(packageDir);
79
79
  const pkgJson = await fs__default.default.readJson(path.resolve(fullDir, "package.json"));
80
80
  if (!pkgJson.bin) {
81
81
  throw new Error(`CLI Package in ${packageDir} has no bin field`);
@@ -114,7 +114,7 @@ async function runCliExtraction({
114
114
  console.log("");
115
115
  console.log(
116
116
  `The conflicting file is ${path.relative(
117
- paths.paths.targetRoot,
117
+ cliCommon.targetPaths.rootDir,
118
118
  reportPath
119
119
  )}, expecting the following content:`
120
120
  );
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var paths = require('../../../lib/paths.cjs.js');
3
+ var cliCommon = require('@backstage/cli-common');
4
4
 
5
5
  async function tryRunPrettierAsync(content, extraConfig = { parser: "markdown" }) {
6
6
  try {
7
7
  const prettier = require("prettier");
8
- const filepath = extraConfig.filepath ?? `${paths.paths.targetRoot}/should-not-be-ignored.any`;
8
+ const filepath = extraConfig.filepath ?? `${cliCommon.targetPaths.rootDir}/should-not-be-ignored.any`;
9
9
  const config = await prettier.resolveConfig(filepath, { editorconfig: true }) ?? {};
10
10
  const formattedContent = prettier.format(content, {
11
11
  ...config,
@@ -22,7 +22,7 @@ async function tryRunPrettierAsync(content, extraConfig = { parser: "markdown" }
22
22
  function createPrettierSyncFormatter(prettierSync, extraConfig = {}) {
23
23
  return function tryRunPrettierInner(content) {
24
24
  try {
25
- const filepath = extraConfig.filepath ?? `${paths.paths.targetRoot}/should-not-be-ignored.any`;
25
+ const filepath = extraConfig.filepath ?? `${cliCommon.targetPaths.rootDir}/should-not-be-ignored.any`;
26
26
  const resolveConfig = (
27
27
  // @ts-expect-error: v2 requires .sync, @prettier/sync v3 does not
28
28
  prettierSync.resolveConfig?.sync ?? prettierSync.resolveConfig
@@ -2,7 +2,7 @@
2
2
 
3
3
  var fs = require('fs-extra');
4
4
  var path = require('node:path');
5
- var paths = require('../../../lib/paths.cjs.js');
5
+ var cliCommon = require('@backstage/cli-common');
6
6
  var justDiff = require('just-diff');
7
7
  var getPgSchemaInfo = require('./getPgSchemaInfo.cjs.js');
8
8
  var generateSqlReport = require('./generateSqlReport.cjs.js');
@@ -23,13 +23,13 @@ async function runSqlExtraction(options) {
23
23
  }
24
24
  let dbIndex = 1;
25
25
  for (const packageDir of options.packageDirs) {
26
- const migrationDir = paths.paths.resolveTargetRoot(packageDir, "migrations");
26
+ const migrationDir = cliCommon.targetPaths.resolveRoot(packageDir, "migrations");
27
27
  if (!await fs__default.default.pathExists(migrationDir)) {
28
28
  console.log(`No SQL migrations found in ${packageDir}`);
29
29
  continue;
30
30
  }
31
31
  const { name: pkgName } = await fs.readJson(
32
- paths.paths.resolveTargetRoot(packageDir, "package.json")
32
+ cliCommon.targetPaths.resolveRoot(packageDir, "package.json")
33
33
  );
34
34
  const migrationFiles = await fs__default.default.readdir(migrationDir, {
35
35
  withFileTypes: true
@@ -59,7 +59,7 @@ async function runSqlExtraction(options) {
59
59
  }
60
60
  }
61
61
  async function runSingleSqlExtraction(targetDir, migrationTarget, pkgName, knex, options) {
62
- const migrationDir = paths.paths.resolveTargetRoot(
62
+ const migrationDir = cliCommon.targetPaths.resolveRoot(
63
63
  targetDir,
64
64
  "migrations",
65
65
  migrationTarget
@@ -106,7 +106,7 @@ async function runSingleSqlExtraction(targetDir, migrationTarget, pkgName, knex,
106
106
  break;
107
107
  }
108
108
  }
109
- const reportPath = paths.paths.resolveTargetRoot(
109
+ const reportPath = cliCommon.targetPaths.resolveRoot(
110
110
  targetDir,
111
111
  `report${migrationTarget === "." ? "" : `-${migrationTarget}`}.sql.md`
112
112
  );
@@ -134,7 +134,7 @@ async function runSingleSqlExtraction(targetDir, migrationTarget, pkgName, knex,
134
134
  console.log("");
135
135
  console.log(
136
136
  `The conflicting file is ${path.relative(
137
- paths.paths.targetRoot,
137
+ cliCommon.targetPaths.rootDir,
138
138
  reportPath
139
139
  )}, expecting the following content:`
140
140
  );
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var paths = require('../../lib/paths.cjs.js');
3
+ var cliCommon = require('@backstage/cli-common');
4
4
  var pLimit = require('p-limit');
5
5
  var os = require('node:os');
6
6
  var path = require('node:path');
@@ -77,9 +77,9 @@ async function handlePackage({
77
77
  isLocalBuild
78
78
  }) {
79
79
  console.log(`## Processing ${packageDir}`);
80
- const fullDir = paths.paths.resolveTargetRoot(packageDir);
80
+ const fullDir = cliCommon.targetPaths.resolveRoot(packageDir);
81
81
  const reportPath = path.resolve(fullDir, "knip-report.md");
82
- const run = util.createBinRunner(paths.paths.targetRoot, "");
82
+ const run = util.createBinRunner(cliCommon.targetPaths.rootDir, "");
83
83
  let report = await run(
84
84
  `${knipDir}/knip.js`,
85
85
  "-W",
@@ -122,7 +122,7 @@ async function handlePackage({
122
122
  console.log("");
123
123
  console.log(
124
124
  `The conflicting file is ${path.relative(
125
- paths.paths.targetRoot,
125
+ cliCommon.targetPaths.rootDir,
126
126
  reportPath
127
127
  )}, expecting the following content:`
128
128
  );
@@ -138,8 +138,8 @@ async function runKnipReports({
138
138
  packageDirs,
139
139
  isLocalBuild
140
140
  }) {
141
- const knipDir = paths.paths.resolveTargetRoot("./node_modules/knip/bin/");
142
- const knipConfigPath = paths.paths.resolveTargetRoot("./knip.json");
141
+ const knipDir = cliCommon.targetPaths.resolveRoot("./node_modules/knip/bin/");
142
+ const knipConfigPath = cliCommon.targetPaths.resolveRoot("./knip.json");
143
143
  const limiter = pLimit__default.default(os__default.default.cpus().length);
144
144
  await generateKnipConfig({ knipConfigPath });
145
145
  try {
@@ -3,7 +3,7 @@
3
3
  var tsMorph = require('ts-morph');
4
4
  var cliNode = require('@backstage/cli-node');
5
5
  var fs = require('fs-extra');
6
- var paths = require('../../lib/paths.cjs.js');
6
+ var cliCommon = require('@backstage/cli-common');
7
7
  var path = require('node:path');
8
8
 
9
9
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
@@ -12,7 +12,7 @@ var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
12
12
  var path__default = /*#__PURE__*/_interopDefaultCompat(path);
13
13
 
14
14
  const project = new tsMorph.Project({
15
- tsConfigFilePath: paths.paths.resolveTargetRoot("tsconfig.json")
15
+ tsConfigFilePath: cliCommon.targetPaths.resolveRoot("tsconfig.json")
16
16
  });
17
17
  function readPackageJson(pkg) {
18
18
  return JSON.parse(fs__default.default.readFileSync(path__default.default.join(pkg, "package.json"), "utf-8"));
@@ -3,7 +3,7 @@
3
3
  var chalk = require('chalk');
4
4
  var exec = require('../../../../lib/exec.cjs.js');
5
5
  var helpers = require('../../../../lib/openapi/helpers.cjs.js');
6
- var paths = require('../../../../lib/paths.cjs.js');
6
+ var cliCommon = require('@backstage/cli-common');
7
7
  var node_process = require('node:process');
8
8
  var promises = require('node:fs/promises');
9
9
  var path = require('node:path');
@@ -37,7 +37,7 @@ async function check(opts) {
37
37
  baseRef
38
38
  ],
39
39
  {
40
- cwd: paths.paths.targetRoot,
40
+ cwd: cliCommon.targetPaths.rootDir,
41
41
  env: { CI: opts.json ? "1" : void 0, ...node_process.env }
42
42
  }
43
43
  );
@@ -47,13 +47,13 @@ async function check(opts) {
47
47
  failed = true;
48
48
  }
49
49
  if (opts.json) {
50
- const file = (await promises.readFile(path.resolve(paths.paths.targetRoot, "ci-run-details.json"))).toString();
50
+ const file = (await promises.readFile(path.resolve(cliCommon.targetPaths.rootDir, "ci-run-details.json"))).toString();
51
51
  const results = JSON.parse(file);
52
52
  console.log(file);
53
53
  if (!opts.ignore && results.failed) {
54
54
  throw new Error("Some checks failed");
55
55
  }
56
- await promises.rm(path.resolve(paths.paths.targetRoot, "ci-run-details.json"));
56
+ await promises.rm(path.resolve(cliCommon.targetPaths.rootDir, "ci-run-details.json"));
57
57
  } else {
58
58
  console.log(reduceOpticOutput(output));
59
59
  if (!opts.ignore && failed) {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var fs = require('fs-extra');
4
- var paths = require('../../../../lib/paths.cjs.js');
4
+ var cliCommon = require('@backstage/cli-common');
5
5
  var chalk = require('chalk');
6
6
  var exec = require('../../../../lib/exec.cjs.js');
7
7
  var helpers = require('../../../../lib/openapi/helpers.cjs.js');
@@ -30,7 +30,7 @@ async function fuzz(opts) {
30
30
  await fs__default.default.readFile(resolvedOpenapiPath, "utf8")
31
31
  );
32
32
  const configSource = configLoader.ConfigSources.default({
33
- rootDir: paths.paths.targetRoot
33
+ rootDir: cliCommon.targetPaths.rootDir
34
34
  });
35
35
  const config = await configLoader.ConfigSources.toConfig(configSource);
36
36
  const pluginId = openapiSpec.info.title;
@@ -38,7 +38,7 @@ async function fuzz(opts) {
38
38
  if (opts.debug) {
39
39
  args.push(
40
40
  "--cassette-path",
41
- paths.paths.resolveTargetRoot(path.join(".cassettes", `${pluginId}.yml`))
41
+ cliCommon.targetPaths.resolveRoot(path.join(".cassettes", `${pluginId}.yml`))
42
42
  );
43
43
  }
44
44
  if (opts.limit) {
@@ -7,8 +7,8 @@ var path = require('node:path');
7
7
  var exec = require('../../../../../lib/exec.cjs.js');
8
8
  var constants = require('../../../../../lib/openapi/constants.cjs.js');
9
9
  var dedupeImports = require('../../../../../lib/openapi/dedupe-imports.cjs.js');
10
+ var cliCommon = require('@backstage/cli-common');
10
11
  var helpers = require('../../../../../lib/openapi/helpers.cjs.js');
11
- var paths = require('../../../../../lib/paths.cjs.js');
12
12
 
13
13
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
14
14
 
@@ -17,7 +17,7 @@ var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
17
17
 
18
18
  async function generate(outputDirectory, clientAdditionalProperties, abortSignal) {
19
19
  const resolvedOpenapiPath = await helpers.getPathToCurrentOpenApiSpec();
20
- const resolvedOutputDirectory = paths.paths.resolveTargetRoot(
20
+ const resolvedOutputDirectory = cliCommon.targetPaths.resolveRoot(
21
21
  outputDirectory,
22
22
  constants.OUTPUT_PATH
23
23
  );
@@ -61,14 +61,14 @@ async function generate(outputDirectory, clientAdditionalProperties, abortSignal
61
61
  const parentDirectory = path.resolve(resolvedOutputDirectory, "..");
62
62
  await fs__default.default.writeFile(
63
63
  path.resolve(parentDirectory, "index.ts"),
64
- `//
64
+ `//
65
65
  export * from './generated';`
66
66
  );
67
67
  await exec.exec(`yarn backstage-cli package lint --fix ${parentDirectory}`, [], {
68
68
  signal: abortSignal?.signal
69
69
  });
70
- const prettier = paths.paths.resolveTargetRoot("node_modules/.bin/prettier");
71
- if (prettier) {
70
+ const prettier = cliCommon.targetPaths.resolveRoot("node_modules/.bin/prettier");
71
+ if (await fs__default.default.pathExists(prettier)) {
72
72
  await exec.exec(`${prettier} --write ${parentDirectory}`, [], {
73
73
  signal: abortSignal?.signal
74
74
  });
@@ -8,8 +8,8 @@ var path = require('node:path');
8
8
  var exec = require('../../../../../lib/exec.cjs.js');
9
9
  var constants = require('../../../../../lib/openapi/constants.cjs.js');
10
10
  var dedupeImports = require('../../../../../lib/openapi/dedupe-imports.cjs.js');
11
+ var cliCommon = require('@backstage/cli-common');
11
12
  var helpers = require('../../../../../lib/openapi/helpers.cjs.js');
12
- var paths = require('../../../../../lib/paths.cjs.js');
13
13
 
14
14
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
15
15
 
@@ -20,10 +20,10 @@ var YAML__default = /*#__PURE__*/_interopDefaultCompat(YAML);
20
20
  async function generateSpecFile() {
21
21
  const openapiPath = await helpers.getPathToCurrentOpenApiSpec();
22
22
  const yaml = YAML__default.default.load(await fs__default.default.readFile(openapiPath, "utf8"));
23
- const tsPath = paths.paths.resolveTarget(constants.TS_SCHEMA_PATH);
23
+ const tsPath = cliCommon.targetPaths.resolve(constants.TS_SCHEMA_PATH);
24
24
  const schemaDir = path.dirname(tsPath);
25
25
  await fs__default.default.mkdirp(schemaDir);
26
- const oldTsPath = paths.paths.resolveTarget(constants.OLD_SCHEMA_PATH);
26
+ const oldTsPath = cliCommon.targetPaths.resolve(constants.OLD_SCHEMA_PATH);
27
27
  if (fs__default.default.existsSync(oldTsPath)) {
28
28
  console.warn(`Removing old schema file at ${oldTsPath}`);
29
29
  fs__default.default.removeSync(oldTsPath);
@@ -50,9 +50,9 @@ export const createOpenApiRouter = async (
50
50
  export * from './generated';`
51
51
  );
52
52
  await exec.exec(`yarn backstage-cli package lint`, ["--fix", tsPath, indexFile]);
53
- if (await paths.paths.resolveTargetRoot("node_modules/.bin/prettier")) {
53
+ if (await fs__default.default.pathExists(cliCommon.targetPaths.resolveRoot("node_modules/.bin/prettier"))) {
54
54
  await exec.exec(`yarn prettier`, ["--write", tsPath, indexFile], {
55
- cwd: paths.paths.targetRoot
55
+ cwd: cliCommon.targetPaths.rootDir
56
56
  });
57
57
  }
58
58
  }
@@ -109,7 +109,7 @@ async function generate(serverAdditionalProperties, abortSignal) {
109
109
  signal: abortSignal?.signal
110
110
  }
111
111
  );
112
- const prettier = paths.paths.resolveTargetRoot("node_modules/.bin/prettier");
112
+ const prettier = cliCommon.targetPaths.resolveRoot("node_modules/.bin/prettier");
113
113
  if (prettier) {
114
114
  await exec.exec(`${prettier} --write ${resolvedOutputDirectory}`, [], {
115
115
  signal: abortSignal?.signal
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var fs = require('fs-extra');
4
+ var cliCommon = require('@backstage/cli-common');
4
5
  var constants = require('../../../../lib/openapi/constants.cjs.js');
5
- var paths = require('../../../../lib/paths.cjs.js');
6
6
  var chalk = require('chalk');
7
7
  var exec = require('../../../../lib/exec.cjs.js');
8
8
  var helpers = require('../../../../lib/openapi/helpers.cjs.js');
@@ -35,7 +35,7 @@ async function init() {
35
35
  capture:
36
36
  ${constants.YAML_SCHEMA_PATH}:
37
37
  # \u{1F527} Runnable example with simple get requests.
38
- # Run with "PORT=3000 optic capture ${constants.YAML_SCHEMA_PATH} --update interactive" in '${paths.paths.targetDir}'
38
+ # Run with "PORT=3000 optic capture ${constants.YAML_SCHEMA_PATH} --update interactive" in '${cliCommon.targetPaths.dir}'
39
39
  # You can change the server and the 'requests' section to experiment
40
40
  server:
41
41
  # This will not be used by 'backstage-repo-tools schema openapi test', but may be useful for interactive updates.
@@ -46,10 +46,10 @@ capture:
46
46
  # \u{1F527} Specify a command that will generate traffic
47
47
  command: yarn backstage-cli package test --no-watch ${ROUTER_TEST_PATHS.map(
48
48
  (e) => `"${e}"`
49
- ).join(" ")}
49
+ ).join(" ")}
50
50
  `
51
51
  );
52
- if (await paths.paths.resolveTargetRoot("node_modules/.bin/prettier")) {
52
+ if (await fs__default.default.pathExists(cliCommon.targetPaths.resolveRoot("node_modules/.bin/prettier"))) {
53
53
  await exec.exec(`yarn prettier`, ["--write", opticConfigFilePath]);
54
54
  }
55
55
  }
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var node_child_process = require('node:child_process');
6
6
  var node_util = require('node:util');
7
+ var cliCommon = require('@backstage/cli-common');
7
8
  var paths = require('../../lib/paths.cjs.js');
8
9
  var utils = require('./utils.cjs.js');
9
10
  var promises = require('node:fs/promises');
@@ -61,22 +62,22 @@ function getExports(packageJson) {
61
62
  async function generateDocJson(pkg) {
62
63
  const temporaryTsConfigPath = await utils.createTemporaryTsConfig(pkg);
63
64
  const packageJson = JSON.parse(
64
- await promises.readFile(paths.paths.resolveTargetRoot(pkg, "package.json"), "utf-8")
65
+ await promises.readFile(cliCommon.targetPaths.resolveRoot(pkg, "package.json"), "utf-8")
65
66
  );
66
67
  const exports$1 = getExports(packageJson);
67
68
  if (!exports$1.length || !exports$1.some((e) => e.startsWith("src") || e.startsWith("./src"))) {
68
69
  return false;
69
70
  }
70
- await fs$1.mkdirp(paths.paths.resolveTargetRoot(`dist-types`, pkg));
71
+ await fs$1.mkdirp(cliCommon.targetPaths.resolveRoot(`dist-types`, pkg));
71
72
  const { stdout, stderr } = await execAsync(
72
73
  [
73
- paths.paths.resolveTargetRoot("node_modules/.bin/typedoc"),
74
+ cliCommon.targetPaths.resolveRoot("node_modules/.bin/typedoc"),
74
75
  "--json",
75
- paths.paths.resolveTargetRoot(`dist-types`, pkg, "docs.json"),
76
+ cliCommon.targetPaths.resolveRoot(`dist-types`, pkg, "docs.json"),
76
77
  "--tsconfig",
77
78
  temporaryTsConfigPath,
78
79
  "--basePath",
79
- paths.paths.targetRoot,
80
+ cliCommon.targetPaths.rootDir,
80
81
  "--skipErrorChecking",
81
82
  ...getExports(packageJson).flatMap((e) => [
82
83
  "--entryPoints",
@@ -96,7 +97,7 @@ async function generateDocJson(pkg) {
96
97
  async function packageDocs(paths$1 = [], opts) {
97
98
  console.warn("!!! This is an experimental command !!!");
98
99
  const existingDocsJsonPaths = glob.glob.sync(
99
- paths.paths.resolveTargetRoot("dist-types/**/docs.json")
100
+ cliCommon.targetPaths.resolveRoot("dist-types/**/docs.json")
100
101
  );
101
102
  if (existingDocsJsonPaths.length > 0) {
102
103
  console.warn(
@@ -107,7 +108,7 @@ async function packageDocs(paths$1 = [], opts) {
107
108
  }
108
109
  }
109
110
  console.warn("!!! Deleting existing docs output !!!");
110
- await promises.rm(paths.paths.resolveTargetRoot("type-docs"), {
111
+ await promises.rm(cliCommon.targetPaths.resolveRoot("type-docs"), {
111
112
  recursive: true,
112
113
  force: true
113
114
  });
@@ -117,18 +118,15 @@ async function packageDocs(paths$1 = [], opts) {
117
118
  exclude: opts.exclude
118
119
  });
119
120
  const cache = await Cache.PackageDocsCache.loadAsync(
120
- paths.paths.resolveTargetRoot(),
121
- await cliNode.Lockfile.load(paths.paths.resolveTargetRoot("yarn.lock"))
121
+ cliCommon.targetPaths.rootDir,
122
+ await cliNode.Lockfile.load(cliCommon.targetPaths.resolveRoot("yarn.lock"))
122
123
  );
123
124
  console.log(`### Generating docs.`);
124
125
  await Promise.all(
125
126
  selectedPackageDirs.map(
126
127
  (pkg) => limit(async () => {
127
128
  const pkgJson = JSON.parse(
128
- await promises.readFile(
129
- paths.paths.resolveTargetRoot(pkg, "package.json"),
130
- "utf-8"
131
- )
129
+ await promises.readFile(cliCommon.targetPaths.resolveRoot(pkg, "package.json"), "utf-8")
132
130
  );
133
131
  if (EXCLUDE.includes(pkg) || pkgJson.name.startsWith("@internal/")) {
134
132
  return;
@@ -147,10 +145,7 @@ async function packageDocs(paths$1 = [], opts) {
147
145
  console.log(`### Processing ${pkg}`);
148
146
  const success = await generateDocJson(pkg);
149
147
  if (success) {
150
- await cache.write(
151
- pkg,
152
- paths.paths.resolveTargetRoot(`dist-types`, pkg)
153
- );
148
+ await cache.write(pkg, cliCommon.targetPaths.resolveRoot(`dist-types`, pkg));
154
149
  }
155
150
  } catch (e) {
156
151
  console.error("Failed to generate docs for", pkg);
@@ -162,7 +157,7 @@ async function packageDocs(paths$1 = [], opts) {
162
157
  const generatedPackageDirs = [];
163
158
  for (const pkg of selectedPackageDirs) {
164
159
  try {
165
- const docsJsonPath = paths.paths.resolveTargetRoot(
160
+ const docsJsonPath = cliCommon.targetPaths.resolveRoot(
166
161
  `dist-types/${pkg}/docs.json`
167
162
  );
168
163
  const docsJson = JSON.parse(await promises.readFile(docsJsonPath, "utf-8"));
@@ -184,7 +179,7 @@ async function packageDocs(paths$1 = [], opts) {
184
179
  }
185
180
  const { stdout, stderr } = await execAsync(
186
181
  [
187
- paths.paths.resolveTargetRoot("node_modules/.bin/typedoc"),
182
+ cliCommon.targetPaths.resolveRoot("node_modules/.bin/typedoc"),
188
183
  "--entryPointStrategy",
189
184
  "merge",
190
185
  ...generatedPackageDirs.flatMap((pkg) => [
@@ -193,11 +188,11 @@ async function packageDocs(paths$1 = [], opts) {
193
188
  ]),
194
189
  ...HIGHLIGHT_LANGUAGES.flatMap((e) => ["--highlightLanguages", e]),
195
190
  "--out",
196
- paths.paths.resolveTargetRoot("type-docs"),
197
- ...fs.existsSync(paths.paths.resolveTargetRoot("typedoc.json")) ? ["--options", paths.paths.resolveTargetRoot("typedoc.json")] : []
191
+ cliCommon.targetPaths.resolveRoot("type-docs"),
192
+ ...fs.existsSync(cliCommon.targetPaths.resolveRoot("typedoc.json")) ? ["--options", cliCommon.targetPaths.resolveRoot("typedoc.json")] : []
198
193
  ].join(" "),
199
194
  {
200
- cwd: paths.paths.targetRoot
195
+ cwd: cliCommon.targetPaths.rootDir
201
196
  }
202
197
  );
203
198
  console.log(stdout);
@@ -1,14 +1,17 @@
1
1
  'use strict';
2
2
 
3
+ var cliCommon = require('@backstage/cli-common');
3
4
  var fs = require('fs-extra');
4
- var paths = require('../../lib/paths.cjs.js');
5
5
 
6
6
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
7
7
 
8
8
  var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
9
9
 
10
10
  async function createTemporaryTsConfig(dir) {
11
- const path = paths.paths.resolveOwnRoot(dir, "tsconfig.typedoc.tmp.json");
11
+ const path = cliCommon.findOwnPaths(__dirname).resolveRoot(
12
+ dir,
13
+ "tsconfig.typedoc.tmp.json"
14
+ );
12
15
  process.once("exit", () => {
13
16
  fs__default.default.removeSync(path);
14
17
  });
@@ -2,12 +2,12 @@
2
2
 
3
3
  var cliNode = require('@backstage/cli-node');
4
4
  var exec = require('../../../../lib/exec.cjs.js');
5
+ var cliCommon = require('@backstage/cli-common');
5
6
  var helpers = require('../../../../lib/openapi/optic/helpers.cjs.js');
6
- var paths = require('../../../../lib/paths.cjs.js');
7
7
  var constants = require('../../../../lib/openapi/constants.cjs.js');
8
8
 
9
9
  function cleanUpApiName(e) {
10
- e.apiName = e.apiName.replace(paths.paths.targetDir, "").replace(constants.YAML_SCHEMA_PATH, "");
10
+ e.apiName = e.apiName.replace(cliCommon.targetPaths.dir, "").replace(constants.YAML_SCHEMA_PATH, "");
11
11
  }
12
12
  async function command(opts) {
13
13
  let packages = await cliNode.PackageGraph.listTargetPackages();
@@ -21,7 +21,7 @@ async function command(opts) {
21
21
  since
22
22
  ]);
23
23
  const changedFiles = changedFilesRaw.toString().trim();
24
- const changedOpenApiSpecs = changedFiles.split("\n").filter((e) => e.endsWith(constants.YAML_SCHEMA_PATH)).map((e) => paths.paths.resolveTarget(e));
24
+ const changedOpenApiSpecs = changedFiles.split("\n").filter((e) => e.endsWith(constants.YAML_SCHEMA_PATH)).map((e) => cliCommon.targetPaths.resolve(e));
25
25
  packages = packages.filter(
26
26
  (pkg) => changedOpenApiSpecs.some((e) => e.startsWith(`${pkg.dir}/`))
27
27
  );
@@ -3,9 +3,9 @@
3
3
  var fs = require('fs-extra');
4
4
  var path = require('node:path');
5
5
  var chalk = require('chalk');
6
+ var cliCommon = require('@backstage/cli-common');
6
7
  var runner = require('../../../../lib/runner.cjs.js');
7
8
  var constants = require('../../../../lib/openapi/constants.cjs.js');
8
- var paths = require('../../../../lib/paths.cjs.js');
9
9
  var exec = require('../../../../lib/exec.cjs.js');
10
10
  var helpers = require('../../../../lib/openapi/helpers.cjs.js');
11
11
 
@@ -27,7 +27,10 @@ async function test(directoryPath, { port }, options) {
27
27
  }
28
28
  let opticLocation = "";
29
29
  try {
30
- opticLocation = (await exec.exec(`yarn bin optic`, [], { cwd: paths.paths.ownRoot })).stdout;
30
+ opticLocation = (await exec.exec(`yarn bin optic`, [], {
31
+ /* eslint-disable-next-line no-restricted-syntax */
32
+ cwd: cliCommon.findOwnPaths(__dirname).rootDir
33
+ })).stdout;
31
34
  } catch (err) {
32
35
  throw new Error(
33
36
  `Failed to find an Optic CLI installation, ensure that you have @useoptic/optic installed in the root of your repo. If not, run yarn add @useoptic/optic from the root of your repo.`
@@ -55,7 +58,9 @@ async function test(directoryPath, { port }, options) {
55
58
  err.message = err.message.split("\n").map((e) => e.replace(/.{1} Sending requests to server/, "")).filter((e) => !e.includes("PASS")).filter((e) => e.trim()).join("\n");
56
59
  throw err;
57
60
  }
58
- if (await paths.paths.resolveTargetRoot("node_modules/.bin/prettier") && options?.update) {
61
+ if (await fs__default.default.pathExists(
62
+ cliCommon.targetPaths.resolveRoot("node_modules/.bin/prettier")
63
+ ) && options?.update) {
59
64
  await exec.exec(`yarn prettier`, ["--write", openapiPath]);
60
65
  }
61
66
  }
@@ -4,8 +4,8 @@ var fs = require('fs-extra');
4
4
  var lodash = require('lodash');
5
5
  var path = require('node:path');
6
6
  var chalk = require('chalk');
7
+ var cliCommon = require('@backstage/cli-common');
7
8
  var runner = require('../../../../lib/runner.cjs.js');
8
- var paths = require('../../../../lib/paths.cjs.js');
9
9
  var constants = require('../../../../lib/openapi/constants.cjs.js');
10
10
  var helpers = require('../../../../lib/openapi/helpers.cjs.js');
11
11
 
@@ -36,7 +36,7 @@ async function verify(directoryPath) {
36
36
  throw new Error(`\`${constants.TS_SCHEMA_PATH}\` needs to have a 'spec' export.`);
37
37
  }
38
38
  if (!lodash.isEqual(schema.spec, yaml)) {
39
- const path$1 = path.relative(paths.paths.targetRoot, directoryPath);
39
+ const path$1 = path.relative(cliCommon.targetPaths.rootDir, directoryPath);
40
40
  throw new Error(
41
41
  `\`${constants.YAML_SCHEMA_PATH}\` and \`${constants.TS_SCHEMA_PATH}\` do not match. Please run \`yarn backstage-repo-tools package schema openapi generate\` from '${path$1}' to regenerate \`${constants.TS_SCHEMA_PATH}\`.`
42
42
  );
@@ -4,8 +4,8 @@ var Parser = require('@apidevtools/swagger-parser');
4
4
  var fs = require('fs-extra');
5
5
  var YAML = require('js-yaml');
6
6
  var lodash = require('lodash');
7
+ var cliCommon = require('@backstage/cli-common');
7
8
  var path = require('node:path');
8
- var paths = require('../paths.cjs.js');
9
9
  var constants = require('./constants.cjs.js');
10
10
 
11
11
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
@@ -18,7 +18,7 @@ const getPathToFile = async (directory, filename) => {
18
18
  return path.resolve(directory, filename);
19
19
  };
20
20
  const getRelativePathToFile = async (filename) => {
21
- return await getPathToFile(paths.paths.targetDir, filename);
21
+ return await getPathToFile(cliCommon.targetPaths.dir, filename);
22
22
  };
23
23
  const assertExists = async (path) => {
24
24
  if (!await fs.pathExists(path)) {
@@ -5,7 +5,6 @@ var cliNode = require('@backstage/cli-node');
5
5
  var minimatch = require('minimatch');
6
6
  var path = require('node:path');
7
7
 
8
- const paths = cliCommon.findPaths(__dirname);
9
8
  async function resolvePackagePaths(options = {}) {
10
9
  const { paths: providedPaths, include, exclude } = options;
11
10
  let packages = await cliNode.PackageGraph.listTargetPackages();
@@ -13,7 +12,7 @@ async function resolvePackagePaths(options = {}) {
13
12
  const invalidPaths = [];
14
13
  for (const path$1 of providedPaths) {
15
14
  const matches = packages.some(
16
- ({ dir }) => new minimatch.Minimatch(path$1).match(path.relative(paths.targetRoot, dir)) || isChildPath(dir, path$1)
15
+ ({ dir }) => new minimatch.Minimatch(path$1).match(path.relative(cliCommon.targetPaths.rootDir, dir)) || isChildPath(dir, path$1)
17
16
  );
18
17
  if (!matches) {
19
18
  invalidPaths.push(path$1);
@@ -26,14 +25,16 @@ async function resolvePackagePaths(options = {}) {
26
25
  if (providedPaths && providedPaths.length > 0) {
27
26
  packages = packages.filter(
28
27
  ({ dir }) => providedPaths.some(
29
- (path$1) => new minimatch.Minimatch(path$1).match(path.relative(paths.targetRoot, dir)) || isChildPath(dir, path$1)
28
+ (path$1) => new minimatch.Minimatch(path$1).match(path.relative(cliCommon.targetPaths.rootDir, dir)) || isChildPath(dir, path$1)
30
29
  )
31
30
  );
32
31
  }
33
32
  if (include) {
34
33
  packages = packages.filter(
35
34
  (pkg) => include.some(
36
- (pattern) => new minimatch.Minimatch(pattern).match(path.relative(paths.targetRoot, pkg.dir))
35
+ (pattern) => new minimatch.Minimatch(pattern).match(
36
+ path.relative(cliCommon.targetPaths.rootDir, pkg.dir)
37
+ )
37
38
  )
38
39
  );
39
40
  }
@@ -41,12 +42,12 @@ async function resolvePackagePaths(options = {}) {
41
42
  packages = packages.filter(
42
43
  (pkg) => exclude.some(
43
44
  (pattern) => !new minimatch.Minimatch(pattern).match(
44
- path.relative(paths.targetRoot, pkg.dir)
45
+ path.relative(cliCommon.targetPaths.rootDir, pkg.dir)
45
46
  )
46
47
  )
47
48
  );
48
49
  }
49
- return packages.map((pkg) => path.relative(paths.targetRoot, pkg.dir));
50
+ return packages.map((pkg) => path.relative(cliCommon.targetPaths.rootDir, pkg.dir));
50
51
  }
51
52
  function isChildPath(base, path$1) {
52
53
  const relative = path.relative(base, path$1);
@@ -59,6 +60,5 @@ function isChildPath(base, path$1) {
59
60
  }
60
61
 
61
62
  exports.isChildPath = isChildPath;
62
- exports.paths = paths;
63
63
  exports.resolvePackagePaths = resolvePackagePaths;
64
64
  //# sourceMappingURL=paths.cjs.js.map
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var cliCommon = require('@backstage/cli-common');
3
4
  var paths = require('./paths.cjs.js');
4
5
  var pLimit = require('p-limit');
5
6
  var path = require('node:path');
@@ -35,7 +36,7 @@ async function runner(paths$1, command, options) {
35
36
  resultText = err.message;
36
37
  }
37
38
  return {
38
- relativeDir: path.relative(paths.paths.targetRoot, pkg),
39
+ relativeDir: path.relative(cliCommon.targetPaths.rootDir, pkg),
39
40
  resultText
40
41
  };
41
42
  })
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.16.5";
3
+ var version = "0.16.6-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/repo-tools",
3
- "version": "0.16.5",
3
+ "version": "0.16.6-next.0",
4
4
  "description": "CLI for Backstage repo tooling ",
5
5
  "backstage": {
6
6
  "role": "cli"
@@ -43,12 +43,12 @@
43
43
  "dependencies": {
44
44
  "@apidevtools/swagger-parser": "^10.1.0",
45
45
  "@apisyouwonthate/style-guide": "^1.4.0",
46
- "@backstage/backend-plugin-api": "^1.7.0",
47
- "@backstage/catalog-model": "^1.7.6",
48
- "@backstage/cli-common": "^0.1.18",
49
- "@backstage/cli-node": "^0.2.18",
50
- "@backstage/config-loader": "^1.10.8",
51
- "@backstage/errors": "^1.2.7",
46
+ "@backstage/backend-plugin-api": "1.7.1-next.0",
47
+ "@backstage/catalog-model": "1.7.6",
48
+ "@backstage/cli-common": "0.2.0-next.0",
49
+ "@backstage/cli-node": "0.2.19-next.0",
50
+ "@backstage/config-loader": "1.10.9-next.0",
51
+ "@backstage/errors": "1.2.7",
52
52
  "@electric-sql/pglite": "^0.3.0",
53
53
  "@manypkg/get-packages": "^1.1.3",
54
54
  "@microsoft/api-documenter": "^7.28.1",
@@ -67,7 +67,7 @@
67
67
  "chokidar": "^3.5.3",
68
68
  "codeowners-utils": "^1.0.2",
69
69
  "command-exists": "^1.2.9",
70
- "commander": "^12.0.0",
70
+ "commander": "^14.0.3",
71
71
  "fs-extra": "^11.2.0",
72
72
  "glob": "^8.0.3",
73
73
  "globby": "^11.0.0",
@@ -78,7 +78,7 @@
78
78
  "knex-pglite": "^0.11.0",
79
79
  "knip": "^5.42.0",
80
80
  "lodash": "^4.17.21",
81
- "minimatch": "^9.0.0",
81
+ "minimatch": "^10.2.1",
82
82
  "p-limit": "^3.0.2",
83
83
  "portfinder": "^1.0.32",
84
84
  "tar": "^7.5.6",
@@ -87,9 +87,9 @@
87
87
  "zod": "^3.25.76"
88
88
  },
89
89
  "devDependencies": {
90
- "@backstage/backend-test-utils": "^1.11.0",
91
- "@backstage/cli": "^0.35.4",
92
- "@backstage/types": "^1.2.2",
90
+ "@backstage/backend-test-utils": "1.11.1-next.0",
91
+ "@backstage/cli": "0.35.5-next.0",
92
+ "@backstage/types": "1.2.2",
93
93
  "@types/is-glob": "^4.0.2",
94
94
  "@types/node": "^22.13.14",
95
95
  "@types/prettier": "^2.0.0",