@backstage/repo-tools 0.9.3 → 0.9.4

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.
package/CHANGELOG.md CHANGED
@@ -1,23 +1,35 @@
1
1
  # @backstage/repo-tools
2
2
 
3
- ## 0.9.3
3
+ ## 0.9.4
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Updated dependencies
8
- - @backstage/backend-plugin-api@0.6.21
8
+ - @backstage/backend-plugin-api@0.7.0
9
+ - @backstage/cli-node@0.2.7
10
+ - @backstage/config-loader@1.8.1
11
+ - @backstage/catalog-model@1.5.0
12
+ - @backstage/cli-common@0.1.14
13
+ - @backstage/errors@1.2.4
14
+
15
+ ## 0.9.4-next.1
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+ - @backstage/backend-plugin-api@0.6.22-next.1
9
21
  - @backstage/catalog-model@1.5.0
10
22
  - @backstage/cli-common@0.1.14
11
23
  - @backstage/cli-node@0.2.6
12
24
  - @backstage/config-loader@1.8.1
13
25
  - @backstage/errors@1.2.4
14
26
 
15
- ## 0.9.2
27
+ ## 0.9.3-next.0
16
28
 
17
29
  ### Patch Changes
18
30
 
19
31
  - Updated dependencies
20
- - @backstage/backend-plugin-api@0.6.20
32
+ - @backstage/backend-plugin-api@0.6.21-next.0
21
33
  - @backstage/catalog-model@1.5.0
22
34
  - @backstage/cli-common@0.1.14
23
35
  - @backstage/cli-node@0.2.6
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var cliNode = require('@backstage/cli-node');
4
- var exec = require('./exec-CZ6yu47S.cjs.js');
4
+ var exec = require('./exec-C0kCNRgF.cjs.js');
5
5
  var openapiUtilities = require('@useoptic/openapi-utilities');
6
6
  var paths = require('./paths-BvbxdT_S.cjs.js');
7
7
  var constants = require('./constants-Dwa51b6l.cjs.js');
@@ -16,14 +16,10 @@ const getChecksLabel = (results, severity) => {
16
16
  let failingChecks = 0;
17
17
  let exemptedFailingChecks = 0;
18
18
  for (const result of results) {
19
- if (result.passed)
20
- continue;
21
- if (result.severity < severity)
22
- continue;
23
- if (result.exempted)
24
- exemptedFailingChecks += 1;
25
- else
26
- failingChecks += 1;
19
+ if (result.passed) continue;
20
+ if (result.severity < severity) continue;
21
+ if (result.exempted) exemptedFailingChecks += 1;
22
+ else failingChecks += 1;
27
23
  }
28
24
  const exemptedChunk = exemptedFailingChecks > 0 ? `, ${exemptedFailingChecks} exempted` : "";
29
25
  return failingChecks > 0 ? `\u26A0\uFE0F **${failingChecks}**/**${totalChecks}** failed${exemptedChunk}` : totalChecks > 0 ? `\u2705 **${totalChecks}** passed${exemptedChunk}` : `\u2139\uFE0F No automated checks have run`;
@@ -66,8 +62,7 @@ const getBreakagesRow = (breakage) => {
66
62
  };
67
63
  const addSummaryLine = (items, label) => {
68
64
  const length = Array.isArray(items) ? items.length : items;
69
- if (!length)
70
- return "";
65
+ if (!length) return "";
71
66
  let text = length === 1 ? `1 API` : `${length} APIs`;
72
67
  text += ` had ${label}`;
73
68
  return text;
@@ -261,4 +256,4 @@ async function command(opts) {
261
256
  }
262
257
 
263
258
  exports.command = command;
264
- //# sourceMappingURL=diff-Bd4yK7bq.cjs.js.map
259
+ //# sourceMappingURL=diff-DDkHPBWC.cjs.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chalk = require('chalk');
4
- var exec = require('./exec-CZ6yu47S.cjs.js');
4
+ var exec = require('./exec-C0kCNRgF.cjs.js');
5
5
  var helpers = require('./helpers-ja_ryoK_.cjs.js');
6
6
  var paths = require('./paths-BvbxdT_S.cjs.js');
7
7
  var process$1 = require('process');
@@ -71,14 +71,12 @@ async function check(opts) {
71
71
  async function command(opts) {
72
72
  try {
73
73
  await check(opts);
74
- if (!opts.json)
75
- console.log(chalk__default.default.green(`All checks passed.`));
74
+ if (!opts.json) console.log(chalk__default.default.green(`All checks passed.`));
76
75
  } catch (err) {
77
- if (!opts.json)
78
- console.log(chalk__default.default.red(err.message));
76
+ if (!opts.json) console.log(chalk__default.default.red(err.message));
79
77
  process.exit(1);
80
78
  }
81
79
  }
82
80
 
83
81
  exports.command = command;
84
- //# sourceMappingURL=diff-CMZh-rYC.cjs.js.map
82
+ //# sourceMappingURL=diff-zt06VUKR.cjs.js.map
@@ -25,14 +25,12 @@ const spawn = (command, args, options) => {
25
25
  error.push(e.toString());
26
26
  });
27
27
  cp.on("close", (exitCode) => {
28
- if (exitCode)
29
- reject(error.join(""));
30
- else
31
- resolve(stdout.join(""));
28
+ if (exitCode) reject(error.join(""));
29
+ else resolve(stdout.join(""));
32
30
  });
33
31
  });
34
32
  };
35
33
 
36
34
  exports.exec = exec;
37
35
  exports.spawn = spawn;
38
- //# sourceMappingURL=exec-CZ6yu47S.cjs.js.map
36
+ //# sourceMappingURL=exec-C0kCNRgF.cjs.js.map
@@ -3,7 +3,7 @@
3
3
  var fs = require('fs-extra');
4
4
  var paths = require('./paths-BvbxdT_S.cjs.js');
5
5
  var chalk = require('chalk');
6
- var exec = require('./exec-CZ6yu47S.cjs.js');
6
+ var exec = require('./exec-C0kCNRgF.cjs.js');
7
7
  var helpers = require('./helpers-ja_ryoK_.cjs.js');
8
8
  var configLoader = require('@backstage/config-loader');
9
9
  var YAML = require('js-yaml');
@@ -85,4 +85,4 @@ async function command(opts) {
85
85
  }
86
86
 
87
87
  exports.command = command;
88
- //# sourceMappingURL=fuzz-BoxTBzQz.cjs.js.map
88
+ //# sourceMappingURL=fuzz-BGbvHwkB.cjs.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var cliNode = require('@backstage/cli-node');
4
- var exec = require('./exec-CZ6yu47S.cjs.js');
4
+ var exec = require('./exec-C0kCNRgF.cjs.js');
5
5
  var chalk = require('chalk');
6
6
  require('util');
7
7
  require('child_process');
@@ -39,4 +39,4 @@ async function command(opts) {
39
39
  }
40
40
 
41
41
  exports.command = command;
42
- //# sourceMappingURL=fuzz-D2aOy9yo.cjs.js.map
42
+ //# sourceMappingURL=fuzz-CRe0ewrD.cjs.js.map
@@ -5,7 +5,7 @@ var path = require('path');
5
5
  var constants = require('./constants-Dwa51b6l.cjs.js');
6
6
  var paths = require('./paths-BvbxdT_S.cjs.js');
7
7
  var fs = require('fs-extra');
8
- var exec$1 = require('./exec-CZ6yu47S.cjs.js');
8
+ var exec$1 = require('./exec-C0kCNRgF.cjs.js');
9
9
  var backendPluginApi = require('@backstage/backend-plugin-api');
10
10
  var helpers = require('./helpers-ja_ryoK_.cjs.js');
11
11
  var YAML = require('js-yaml');
@@ -142,4 +142,4 @@ async function command(opts) {
142
142
  }
143
143
 
144
144
  exports.command = command;
145
- //# sourceMappingURL=index-C5SnL4Ah.cjs.js.map
145
+ //# sourceMappingURL=index-zZtTyIMm.cjs.js.map
@@ -4,7 +4,7 @@ var fs = require('fs-extra');
4
4
  var constants = require('./constants-Dwa51b6l.cjs.js');
5
5
  var paths = require('./paths-BvbxdT_S.cjs.js');
6
6
  var chalk = require('chalk');
7
- var exec = require('./exec-CZ6yu47S.cjs.js');
7
+ var exec = require('./exec-C0kCNRgF.cjs.js');
8
8
  var helpers = require('./helpers-ja_ryoK_.cjs.js');
9
9
  require('@backstage/cli-common');
10
10
  require('@backstage/cli-node');
@@ -71,4 +71,4 @@ async function singleCommand() {
71
71
  }
72
72
 
73
73
  exports.singleCommand = singleCommand;
74
- //# sourceMappingURL=init-CspVKpxN.cjs.js.map
74
+ //# sourceMappingURL=init-wsIZc-Ys.cjs.js.map
@@ -6,7 +6,7 @@ var chalk = require('chalk');
6
6
  var runner = require('./runner-DMC006Gs.cjs.js');
7
7
  var constants = require('./constants-Dwa51b6l.cjs.js');
8
8
  var paths = require('./paths-BvbxdT_S.cjs.js');
9
- var exec = require('./exec-CZ6yu47S.cjs.js');
9
+ var exec = require('./exec-C0kCNRgF.cjs.js');
10
10
  var helpers = require('./helpers-ja_ryoK_.cjs.js');
11
11
  require('p-limit');
12
12
  require('portfinder');
@@ -96,4 +96,4 @@ async function bulkCommand(paths = [], options) {
96
96
  }
97
97
 
98
98
  exports.bulkCommand = bulkCommand;
99
- //# sourceMappingURL=test-DVGFVBAP.cjs.js.map
99
+ //# sourceMappingURL=test-5XE2uhir.cjs.js.map
package/dist/index.cjs.js CHANGED
@@ -48,7 +48,7 @@ function registerPackageCommand(program) {
48
48
  "Initialize any required files to use the OpenAPI tooling for this package."
49
49
  ).action(
50
50
  lazy(
51
- () => Promise.resolve().then(function () { return require('./cjs/init-CspVKpxN.cjs.js'); }).then((m) => m.singleCommand)
51
+ () => Promise.resolve().then(function () { return require('./cjs/init-wsIZc-Ys.cjs.js'); }).then((m) => m.singleCommand)
52
52
  )
53
53
  );
54
54
  openApiCommand.command("generate").option(
@@ -60,7 +60,7 @@ function registerPackageCommand(program) {
60
60
  "Additional properties that can be passed to @openapitools/openapi-generator-cli"
61
61
  ).action(
62
62
  lazy(
63
- () => Promise.resolve().then(function () { return require('./cjs/index-C5SnL4Ah.cjs.js'); }).then((m) => m.command)
63
+ () => Promise.resolve().then(function () { return require('./cjs/index-zZtTyIMm.cjs.js'); }).then((m) => m.command)
64
64
  )
65
65
  );
66
66
  openApiCommand.command("fuzz").description(
@@ -72,10 +72,10 @@ function registerPackageCommand(program) {
72
72
  "--exclude-checks <excludeChecks>",
73
73
  "Exclude checks from schemathesis run"
74
74
  ).action(
75
- lazy(() => Promise.resolve().then(function () { return require('./cjs/fuzz-BoxTBzQz.cjs.js'); }).then((m) => m.command))
75
+ lazy(() => Promise.resolve().then(function () { return require('./cjs/fuzz-BGbvHwkB.cjs.js'); }).then((m) => m.command))
76
76
  );
77
77
  openApiCommand.command("diff").option("--ignore", "Ignore linting failures and only log the results.").option("--json", "Output the results as JSON").option("--since <ref>", "Diff the API against a specific ref").action(
78
- lazy(() => Promise.resolve().then(function () { return require('./cjs/diff-CMZh-rYC.cjs.js'); }).then((m) => m.command))
78
+ lazy(() => Promise.resolve().then(function () { return require('./cjs/diff-zt06VUKR.cjs.js'); }).then((m) => m.command))
79
79
  );
80
80
  }
81
81
  function registerRepoCommand(program) {
@@ -96,13 +96,13 @@ function registerRepoCommand(program) {
96
96
  lazy(() => Promise.resolve().then(function () { return require('./cjs/lint-DqMp4VN_.cjs.js'); }).then((m) => m.bulkCommand))
97
97
  );
98
98
  openApiCommand.command("test [paths...]").description("Test OpenAPI schemas against written tests").option("--update", "Update the spec on failure.").action(
99
- lazy(() => Promise.resolve().then(function () { return require('./cjs/test-DVGFVBAP.cjs.js'); }).then((m) => m.bulkCommand))
99
+ lazy(() => Promise.resolve().then(function () { return require('./cjs/test-5XE2uhir.cjs.js'); }).then((m) => m.bulkCommand))
100
100
  );
101
101
  openApiCommand.command("fuzz").description("Fuzz all packages").option(
102
102
  "--since <ref>",
103
103
  "Only fuzz packages that have changed since the given ref"
104
104
  ).action(
105
- lazy(() => Promise.resolve().then(function () { return require('./cjs/fuzz-D2aOy9yo.cjs.js'); }).then((m) => m.command))
105
+ lazy(() => Promise.resolve().then(function () { return require('./cjs/fuzz-CRe0ewrD.cjs.js'); }).then((m) => m.command))
106
106
  );
107
107
  openApiCommand.command("diff").description(
108
108
  "Diff the repository against a specific ref, will run all package `diff` scripts."
@@ -111,7 +111,7 @@ function registerRepoCommand(program) {
111
111
  "Diff the API against a specific ref",
112
112
  "origin/master"
113
113
  ).action(
114
- lazy(() => Promise.resolve().then(function () { return require('./cjs/diff-Bd4yK7bq.cjs.js'); }).then((m) => m.command))
114
+ lazy(() => Promise.resolve().then(function () { return require('./cjs/diff-DDkHPBWC.cjs.js'); }).then((m) => m.command))
115
115
  );
116
116
  }
117
117
  function registerCommands(program) {
@@ -176,7 +176,7 @@ function lazy(getActionFunc) {
176
176
  };
177
177
  }
178
178
 
179
- var version = "0.9.3";
179
+ var version = "0.9.4";
180
180
 
181
181
  const main = (argv) => {
182
182
  commander.program.name("backstage-repo-tools").version(version);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/repo-tools",
3
3
  "description": "CLI for Backstage repo tooling ",
4
- "version": "0.9.3",
4
+ "version": "0.9.4",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -43,10 +43,10 @@
43
43
  "dependencies": {
44
44
  "@apidevtools/swagger-parser": "^10.1.0",
45
45
  "@apisyouwonthate/style-guide": "^1.4.0",
46
- "@backstage/backend-plugin-api": "^0.6.21",
46
+ "@backstage/backend-plugin-api": "^0.7.0",
47
47
  "@backstage/catalog-model": "^1.5.0",
48
48
  "@backstage/cli-common": "^0.1.14",
49
- "@backstage/cli-node": "^0.2.6",
49
+ "@backstage/cli-node": "^0.2.7",
50
50
  "@backstage/config-loader": "^1.8.1",
51
51
  "@backstage/errors": "^1.2.4",
52
52
  "@manypkg/get-packages": "^1.1.3",
@@ -76,8 +76,8 @@
76
76
  "yaml-diff-patch": "^2.0.0"
77
77
  },
78
78
  "devDependencies": {
79
- "@backstage/backend-test-utils": "^0.4.3",
80
- "@backstage/cli": "^0.26.10",
79
+ "@backstage/backend-test-utils": "^0.4.4",
80
+ "@backstage/cli": "^0.26.11",
81
81
  "@backstage/types": "^1.1.1",
82
82
  "@types/is-glob": "^4.0.2",
83
83
  "@types/node": "^18.17.8",