@backstage/repo-tools 0.6.0-next.3 → 0.6.1

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,5 +1,62 @@
1
1
  # @backstage/repo-tools
2
2
 
3
+ ## 0.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/backend-common@0.21.1
9
+ - @backstage/cli-node@0.2.3
10
+
11
+ ## 0.6.0
12
+
13
+ ### Minor Changes
14
+
15
+ - 04907c3: Updates the OpenAPI client template to support the new format for identifying plugin ID. You should now use `info.title` like so,
16
+
17
+ ```diff
18
+ info:
19
+ + title: yourPluginId
20
+ - title: @internal/plugin-*-backend
21
+
22
+ servers:
23
+ - /
24
+ - - yourPluginId
25
+ ```
26
+
27
+ - b10c603: Add support for `oneOf` in client generated by `schema openapi generate-client`.
28
+ - 4c62935: **BREAKING**: The `schema openapi *` commands are now renamed into `package schema openapi *` and `repo schema openapi *`. The aim is to make it more clear what the command is operating on, the entire repo or just a single package.
29
+
30
+ The following commands now live under the `package` namespace,
31
+
32
+ - `schema openapi generate` is now `package schema openapi generate --server`
33
+ - `schema openapi generate-client` is now `package schema openapi generate --client-package`
34
+ - `schema openapi init` is now `package schema openapi init`
35
+
36
+ And these commands live under the new `repo` namespace,
37
+
38
+ - `schema openapi lint` is now `repo schema openapi lint`
39
+ - `schema openapi test` is now `repo schema openapi test`
40
+ - `schema openapi verify` is now `repo schema openapi verify`
41
+
42
+ The `package schema openapi generate` now supports defining both `--server` and `--client-package` to generate both at once.This update also reworks the `--client-package` flag to accept only an output directory as the input directory can now be inferred.
43
+
44
+ ### Patch Changes
45
+
46
+ - aa91cd6: Resolved an issue with generate-catalog-info where it was replacing upper case characters with -.
47
+ - 60a68f1: Introduced `knip` to the `knip-reports` command, which generates a `knip-report.md` file for your packages with dependency warnings, if any.
48
+ - ec16093: Add an internal limiter on concurrency when launching processes
49
+ - 6bb6f3e: Updated dependency `fs-extra` to `^11.2.0`.
50
+ Updated dependency `@types/fs-extra` to `^11.0.0`.
51
+ - 6ba64c4: Updated dependency `commander` to `^12.0.0`.
52
+ - c04c42b: Fixes an issue where comments would be duplicated in the template. Also, removes a header with the title and version of the OpenAPI spec from generated code.
53
+ - Updated dependencies
54
+ - @backstage/backend-common@0.21.0
55
+ - @backstage/cli-node@0.2.3
56
+ - @backstage/catalog-model@1.4.4
57
+ - @backstage/cli-common@0.1.13
58
+ - @backstage/errors@1.2.3
59
+
3
60
  ## 0.6.0-next.3
4
61
 
5
62
  ### Patch Changes
@@ -15,10 +15,12 @@ var CustomMarkdownEmitter = require('@microsoft/api-documenter/lib/markdown/Cust
15
15
  var paths = require('./paths-9ab9b8a8.cjs.js');
16
16
  var minimatch = require('minimatch');
17
17
  var entryPoints = require('./entryPoints-c9b88245.cjs.js');
18
- var util = require('./util-40303646.cjs.js');
18
+ var util = require('./util-bfc74a41.cjs.js');
19
19
  var child_process = require('child_process');
20
20
  require('@backstage/cli-common');
21
21
  require('@backstage/cli-node');
22
+ require('os');
23
+ require('p-limit');
22
24
 
23
25
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
24
26
 
@@ -1155,4 +1157,4 @@ function parseArrayOption(value) {
1155
1157
  }
1156
1158
 
1157
1159
  exports.buildApiReports = buildApiReports;
1158
- //# sourceMappingURL=api-reports-ebc5b5dd.cjs.js.map
1160
+ //# sourceMappingURL=api-reports-4f93d814.cjs.js.map
@@ -5,7 +5,7 @@ var pLimit = require('p-limit');
5
5
  var os = require('os');
6
6
  var path = require('path');
7
7
  var fs = require('fs-extra');
8
- var util = require('./util-40303646.cjs.js');
8
+ var util = require('./util-bfc74a41.cjs.js');
9
9
  require('@backstage/cli-common');
10
10
  require('@backstage/cli-node');
11
11
  require('minimatch');
@@ -182,4 +182,4 @@ const buildKnipReports = async (paths$1 = [], opts) => {
182
182
  };
183
183
 
184
184
  exports.buildKnipReports = buildKnipReports;
185
- //# sourceMappingURL=knip-reports-1871d475.cjs.js.map
185
+ //# sourceMappingURL=knip-reports-7309d5ae.cjs.js.map
@@ -0,0 +1,41 @@
1
+ 'use strict';
2
+
3
+ var child_process = require('child_process');
4
+ var os = require('os');
5
+ var pLimit = require('p-limit');
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var os__default = /*#__PURE__*/_interopDefaultLegacy(os);
10
+ var pLimit__default = /*#__PURE__*/_interopDefaultLegacy(pLimit);
11
+
12
+ const limiter = pLimit__default["default"](os__default["default"].cpus().length);
13
+ function createBinRunner(cwd, path) {
14
+ return async (...command) => limiter(
15
+ () => new Promise((resolve, reject) => {
16
+ child_process.execFile(
17
+ "node",
18
+ [path, ...command],
19
+ {
20
+ cwd,
21
+ shell: true,
22
+ timeout: 6e4,
23
+ maxBuffer: 1024 * 1024
24
+ },
25
+ (err, stdout, stderr) => {
26
+ if (err) {
27
+ reject(new Error(`${err.message}
28
+ ${stderr}`));
29
+ } else if (stderr) {
30
+ reject(new Error(`Command printed error output: ${stderr}`));
31
+ } else {
32
+ resolve(stdout);
33
+ }
34
+ }
35
+ );
36
+ })
37
+ );
38
+ }
39
+
40
+ exports.createBinRunner = createBinRunner;
41
+ //# sourceMappingURL=util-bfc74a41.cjs.js.map
package/dist/index.cjs.js CHANGED
@@ -113,7 +113,7 @@ function registerCommands(program) {
113
113
  "Turn on release tag validation for the public, beta, and alpha APIs"
114
114
  ).description("Generate an API report for selected packages").action(
115
115
  lazy(
116
- () => Promise.resolve().then(function () { return require('./cjs/api-reports-ebc5b5dd.cjs.js'); }).then((m) => m.buildApiReports)
116
+ () => Promise.resolve().then(function () { return require('./cjs/api-reports-4f93d814.cjs.js'); }).then((m) => m.buildApiReports)
117
117
  )
118
118
  );
119
119
  program.command("type-deps").description("Find inconsistencies in types of all packages and plugins").action(lazy(() => Promise.resolve().then(function () { return require('./cjs/type-deps-5eacd931.cjs.js'); }).then((m) => m.default)));
@@ -132,7 +132,7 @@ function registerCommands(program) {
132
132
  );
133
133
  program.command("knip-reports [paths...]").option("--ci", "CI run checks that there is no changes on knip reports").description("Generate a knip report for selected packages").action(
134
134
  lazy(
135
- () => Promise.resolve().then(function () { return require('./cjs/knip-reports-1871d475.cjs.js'); }).then((m) => m.buildKnipReports)
135
+ () => Promise.resolve().then(function () { return require('./cjs/knip-reports-7309d5ae.cjs.js'); }).then((m) => m.buildKnipReports)
136
136
  )
137
137
  );
138
138
  registerPackageCommand(program);
@@ -151,7 +151,7 @@ function lazy(getActionFunc) {
151
151
  };
152
152
  }
153
153
 
154
- var version = "0.6.0-next.3";
154
+ var version = "0.6.1";
155
155
 
156
156
  const main = (argv) => {
157
157
  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.6.0-next.3",
4
+ "version": "0.6.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -32,10 +32,10 @@
32
32
  "dependencies": {
33
33
  "@apidevtools/swagger-parser": "^10.1.0",
34
34
  "@apisyouwonthate/style-guide": "^1.4.0",
35
- "@backstage/backend-common": "^0.21.0-next.3",
36
- "@backstage/catalog-model": "^1.4.4-next.0",
35
+ "@backstage/backend-common": "^0.21.1",
36
+ "@backstage/catalog-model": "^1.4.4",
37
37
  "@backstage/cli-common": "^0.1.13",
38
- "@backstage/cli-node": "^0.2.3-next.0",
38
+ "@backstage/cli-node": "^0.2.3",
39
39
  "@backstage/errors": "^1.2.3",
40
40
  "@manypkg/get-packages": "^1.1.3",
41
41
  "@microsoft/api-documenter": "^7.22.33",
@@ -50,8 +50,8 @@
50
50
  "@stoplight/types": "^14.0.0",
51
51
  "chalk": "^4.0.0",
52
52
  "codeowners-utils": "^1.0.2",
53
- "commander": "^9.1.0",
54
- "fs-extra": "10.1.0",
53
+ "commander": "^12.0.0",
54
+ "fs-extra": "^11.2.0",
55
55
  "glob": "^8.0.3",
56
56
  "is-glob": "^4.0.3",
57
57
  "js-yaml": "^4.1.0",
@@ -63,8 +63,8 @@
63
63
  "yaml-diff-patch": "^2.0.0"
64
64
  },
65
65
  "devDependencies": {
66
- "@backstage/backend-test-utils": "^0.3.0-next.3",
67
- "@backstage/cli": "^0.25.2-next.3",
66
+ "@backstage/backend-test-utils": "^0.3.1",
67
+ "@backstage/cli": "^0.25.2",
68
68
  "@backstage/types": "^1.1.1",
69
69
  "@types/is-glob": "^4.0.2",
70
70
  "@types/node": "^18.17.8",
@@ -1,31 +0,0 @@
1
- 'use strict';
2
-
3
- var child_process = require('child_process');
4
-
5
- function createBinRunner(cwd, path) {
6
- return async (...command) => new Promise((resolve, reject) => {
7
- child_process.execFile(
8
- "node",
9
- [path, ...command],
10
- {
11
- cwd,
12
- shell: true,
13
- timeout: 6e4,
14
- maxBuffer: 1024 * 1024
15
- },
16
- (err, stdout, stderr) => {
17
- if (err) {
18
- reject(new Error(`${err.message}
19
- ${stderr}`));
20
- } else if (stderr) {
21
- reject(new Error(`Command printed error output: ${stderr}`));
22
- } else {
23
- resolve(stdout);
24
- }
25
- }
26
- );
27
- });
28
- }
29
-
30
- exports.createBinRunner = createBinRunner;
31
- //# sourceMappingURL=util-40303646.cjs.js.map