@backstage/cli 0.31.0 → 0.32.0-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.
- package/CHANGELOG.md +23 -0
- package/dist/commands/index.cjs.js +7 -13
- package/dist/lib/runner/runBackend.cjs.js +4 -1
- package/dist/modules/lint/commands/repo/lint.cjs.js +3 -3
- package/dist/modules/lint/index.cjs.js +4 -1
- package/dist/{commands/clean → modules/maintenance/commands/package}/clean.cjs.js +1 -1
- package/dist/{commands → modules/maintenance/commands/package}/pack.cjs.js +4 -4
- package/dist/{commands → modules/maintenance/commands}/repo/clean.cjs.js +1 -1
- package/dist/{commands → modules/maintenance/commands}/repo/fix.cjs.js +2 -2
- package/dist/{commands → modules/maintenance/commands}/repo/list-deprecations.cjs.js +1 -1
- package/dist/modules/maintenance/index.cjs.js +24 -0
- package/dist/modules/migrate/commands/packageExports.cjs.js +1 -1
- package/dist/packages/backend-defaults/package.json.cjs.js +1 -1
- package/dist/packages/backend-test-utils/package.json.cjs.js +1 -1
- package/dist/packages/cli/package.json.cjs.js +2 -2
- package/dist/packages/dev-utils/package.json.cjs.js +1 -1
- package/dist/plugins/auth-backend/package.json.cjs.js +1 -1
- package/dist/plugins/scaffolder-node/package.json.cjs.js +1 -1
- package/dist/plugins/scaffolder-node-test-utils/package.json.cjs.js +1 -1
- package/package.json +28 -28
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @backstage/cli
|
|
2
2
|
|
|
3
|
+
## 0.32.0-next.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c7254ae: Internal update to move the `clean`, `pre/postpack` and `fix` commands into their own separate module.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 4ea76f7: Bump @module-federation/enhanced ^0.9.0 to fix GHSA-593f-38f6-jp5m
|
|
12
|
+
- 87a5cb4: Fixed an issue causing the `repo lint` command to fail when the `--max-warnings` option was used.
|
|
13
|
+
- d83f3f4: Resolved a problem where the `start` command did not correctly handle multiple `--require` flags, ensuring all specified modules are now properly loaded.
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- @backstage/catalog-model@1.7.3
|
|
16
|
+
- @backstage/cli-common@0.1.15
|
|
17
|
+
- @backstage/cli-node@0.2.13
|
|
18
|
+
- @backstage/config@1.3.2
|
|
19
|
+
- @backstage/config-loader@1.10.0
|
|
20
|
+
- @backstage/errors@1.2.7
|
|
21
|
+
- @backstage/eslint-plugin@0.1.10
|
|
22
|
+
- @backstage/integration@1.16.2
|
|
23
|
+
- @backstage/release-manifests@0.0.12
|
|
24
|
+
- @backstage/types@1.2.1
|
|
25
|
+
|
|
3
26
|
## 0.31.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
|
@@ -7,34 +7,28 @@ var index$3 = require('../modules/info/index.cjs.js');
|
|
|
7
7
|
var index$1 = require('../modules/migrate/index.cjs.js');
|
|
8
8
|
var index$4 = require('../modules/test/index.cjs.js');
|
|
9
9
|
var index$5 = require('../modules/lint/index.cjs.js');
|
|
10
|
+
var index$6 = require('../modules/maintenance/index.cjs.js');
|
|
10
11
|
|
|
11
12
|
function registerRepoCommand(program) {
|
|
12
13
|
const command = program.command("repo [command]").description("Command that run across an entire Backstage project");
|
|
13
14
|
index$2.registerRepoCommands(command);
|
|
14
15
|
index$4.registerRepoCommands(command);
|
|
15
16
|
index$5.registerRepoCommands(command);
|
|
16
|
-
|
|
17
|
-
"--publish",
|
|
18
|
-
"Enable additional fixes that only apply when publishing packages"
|
|
19
|
-
).option(
|
|
20
|
-
"--check",
|
|
21
|
-
"Fail if any packages would have been changed by the command"
|
|
22
|
-
).action(lazy.lazy(() => import('./repo/fix.cjs.js'), "command"));
|
|
23
|
-
command.command("clean").description("Delete cache and output directories").action(lazy.lazy(() => import('./repo/clean.cjs.js'), "command"));
|
|
24
|
-
command.command("list-deprecations").description("List deprecations").option("--json", "Output as JSON").action(lazy.lazy(() => import('./repo/list-deprecations.cjs.js'), "command"));
|
|
17
|
+
index$6.registerRepoCommands(command);
|
|
25
18
|
}
|
|
26
19
|
function registerScriptCommand(program) {
|
|
27
20
|
const command = program.command("package [command]").description("Lifecycle scripts for individual packages");
|
|
28
21
|
command.command("start").description("Start a package for local development").option(...index.configOption).option("--role <name>", "Run the command with an explicit package role").option("--check", "Enable type checking and linting if available").option("--inspect [host]", "Enable debugger in Node.js environments").option(
|
|
29
22
|
"--inspect-brk [host]",
|
|
30
23
|
"Enable debugger in Node.js environments, breaking before code starts"
|
|
31
|
-
).option(
|
|
24
|
+
).option(
|
|
25
|
+
"--require <path...>",
|
|
26
|
+
"Add a --require argument to the node process"
|
|
27
|
+
).option("--link <path>", "Link an external workspace for module resolution").action(lazy.lazy(() => import('./start/index.cjs.js'), "command"));
|
|
32
28
|
index$2.registerPackageCommands(command);
|
|
33
29
|
index$4.registerPackageCommands(command);
|
|
30
|
+
index$6.registerPackageCommands(command);
|
|
34
31
|
index$5.registerPackageCommands(command);
|
|
35
|
-
command.command("clean").description("Delete cache directories").action(lazy.lazy(() => import('./clean/clean.cjs.js'), "default"));
|
|
36
|
-
command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy.lazy(() => import('./pack.cjs.js'), "pre"));
|
|
37
|
-
command.command("postpack").description("Restores the changes made by the prepack command").action(lazy.lazy(() => import('./pack.cjs.js'), "post"));
|
|
38
32
|
}
|
|
39
33
|
function registerCommands(program) {
|
|
40
34
|
program.command("new").storeOptionsAsProperties(false).description(
|
|
@@ -67,7 +67,10 @@ async function runBackend(options) {
|
|
|
67
67
|
optionArgs.push(inspect);
|
|
68
68
|
}
|
|
69
69
|
if (options.require) {
|
|
70
|
-
|
|
70
|
+
const requires = [options.require].flat();
|
|
71
|
+
for (const r of requires) {
|
|
72
|
+
optionArgs.push(`--require=${r}`);
|
|
73
|
+
}
|
|
71
74
|
}
|
|
72
75
|
const userArgs = process.argv.slice(["node", "backstage-cli", "package", "start"].length).filter((arg) => !optionArgs.includes(arg));
|
|
73
76
|
child = spawn__default.default(
|
|
@@ -77,6 +77,7 @@ async function command(opts, cmd) {
|
|
|
77
77
|
fix: Boolean(opts.fix),
|
|
78
78
|
format: opts.format,
|
|
79
79
|
shouldCache: Boolean(cacheContext),
|
|
80
|
+
maxWarnings: opts.maxWarnings ?? -1,
|
|
80
81
|
successCache: cacheContext?.entries,
|
|
81
82
|
rootDir: paths.paths.targetRoot
|
|
82
83
|
},
|
|
@@ -85,7 +86,8 @@ async function command(opts, cmd) {
|
|
|
85
86
|
format,
|
|
86
87
|
shouldCache,
|
|
87
88
|
successCache,
|
|
88
|
-
rootDir
|
|
89
|
+
rootDir,
|
|
90
|
+
maxWarnings
|
|
89
91
|
}) => {
|
|
90
92
|
const { ESLint } = require("eslint");
|
|
91
93
|
const crypto = require("crypto");
|
|
@@ -95,7 +97,6 @@ async function command(opts, cmd) {
|
|
|
95
97
|
return async ({
|
|
96
98
|
fullDir,
|
|
97
99
|
relativeDir,
|
|
98
|
-
lintOptions,
|
|
99
100
|
parentHash
|
|
100
101
|
}) => {
|
|
101
102
|
process.cwd = () => fullDir;
|
|
@@ -146,7 +147,6 @@ async function command(opts, cmd) {
|
|
|
146
147
|
if (fix) {
|
|
147
148
|
await ESLint.outputFixes(results);
|
|
148
149
|
}
|
|
149
|
-
const maxWarnings = lintOptions?.maxWarnings ?? 0;
|
|
150
150
|
const ignoreWarnings = +maxWarnings === -1;
|
|
151
151
|
const resultText = formatter.format(results);
|
|
152
152
|
const failed2 = results.some((r) => r.errorCount > 0) || !ignoreWarnings && results.reduce((current, next) => current + next.warningCount, 0) > maxWarnings;
|
|
@@ -12,7 +12,7 @@ function registerPackageCommands(command) {
|
|
|
12
12
|
"Write the lint report to a file instead of stdout"
|
|
13
13
|
).option("--fix", "Attempt to automatically fix violations").option(
|
|
14
14
|
"--max-warnings <number>",
|
|
15
|
-
"Fail if more than this number of warnings. -1 allows warnings. (default:
|
|
15
|
+
"Fail if more than this number of warnings. -1 allows warnings. (default: -1)"
|
|
16
16
|
).description("Lint a package").action(lazy.lazy(() => import('./commands/package/lint.cjs.js'), "default"));
|
|
17
17
|
}
|
|
18
18
|
function registerRepoCommands(command) {
|
|
@@ -32,6 +32,9 @@ function registerRepoCommands(command) {
|
|
|
32
32
|
).option(
|
|
33
33
|
"--successCacheDir <path>",
|
|
34
34
|
"Set the success cache location, (default: node_modules/.cache/backstage-cli)"
|
|
35
|
+
).option(
|
|
36
|
+
"--max-warnings <number>",
|
|
37
|
+
"Fail if more than this number of warnings. -1 allows warnings. (default: -1)"
|
|
35
38
|
).option("--fix", "Attempt to automatically fix violations").action(lazy.lazy(() => import('./commands/repo/lint.cjs.js'), "command"));
|
|
36
39
|
}
|
|
37
40
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var fs = require('fs-extra');
|
|
6
|
-
var paths = require('
|
|
6
|
+
var paths = require('../../../../lib/paths.cjs.js');
|
|
7
7
|
|
|
8
8
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
9
9
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var productionPack = require('
|
|
4
|
-
var paths = require('
|
|
3
|
+
var productionPack = require('../../../build/lib/packager/productionPack.cjs.js');
|
|
4
|
+
var paths = require('../../../../lib/paths.cjs.js');
|
|
5
5
|
var fs = require('fs-extra');
|
|
6
|
-
var publishing = require('
|
|
7
|
-
var typeDistProject = require('
|
|
6
|
+
var publishing = require('../../../../lib/publishing.cjs.js');
|
|
7
|
+
var typeDistProject = require('../../../../lib/typeDistProject.cjs.js');
|
|
8
8
|
|
|
9
9
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
10
|
|
|
@@ -5,7 +5,7 @@ var fs = require('fs-extra');
|
|
|
5
5
|
var path = require('path');
|
|
6
6
|
var util = require('util');
|
|
7
7
|
var cliNode = require('@backstage/cli-node');
|
|
8
|
-
var paths = require('
|
|
8
|
+
var paths = require('../../../../lib/paths.cjs.js');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
11
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var cliNode = require('@backstage/cli-node');
|
|
4
4
|
var fs = require('fs-extra');
|
|
5
5
|
var path = require('path');
|
|
6
|
-
var paths = require('
|
|
7
|
-
var publishing = require('
|
|
6
|
+
var paths = require('../../../../lib/paths.cjs.js');
|
|
7
|
+
var publishing = require('../../../../lib/publishing.cjs.js');
|
|
8
8
|
|
|
9
9
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ var chalk = require('chalk');
|
|
|
4
4
|
var eslint = require('eslint');
|
|
5
5
|
var path = require('path');
|
|
6
6
|
var cliNode = require('@backstage/cli-node');
|
|
7
|
-
var paths = require('
|
|
7
|
+
var paths = require('../../../../lib/paths.cjs.js');
|
|
8
8
|
|
|
9
9
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
10
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var lazy = require('../../lib/lazy.cjs.js');
|
|
4
|
+
|
|
5
|
+
function registerPackageCommands(command) {
|
|
6
|
+
command.command("clean").description("Delete cache directories").action(lazy.lazy(() => import('./commands/package/clean.cjs.js'), "default"));
|
|
7
|
+
command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy.lazy(() => import('./commands/package/pack.cjs.js'), "pre"));
|
|
8
|
+
command.command("postpack").description("Restores the changes made by the prepack command").action(lazy.lazy(() => import('./commands/package/pack.cjs.js'), "post"));
|
|
9
|
+
}
|
|
10
|
+
function registerRepoCommands(command) {
|
|
11
|
+
command.command("fix").description("Automatically fix packages in the project").option(
|
|
12
|
+
"--publish",
|
|
13
|
+
"Enable additional fixes that only apply when publishing packages"
|
|
14
|
+
).option(
|
|
15
|
+
"--check",
|
|
16
|
+
"Fail if any packages would have been changed by the command"
|
|
17
|
+
).action(lazy.lazy(() => import('./commands/repo/fix.cjs.js'), "command"));
|
|
18
|
+
command.command("clean").description("Delete cache and output directories").action(lazy.lazy(() => import('./commands/repo/clean.cjs.js'), "command"));
|
|
19
|
+
command.command("list-deprecations").description("List deprecations").option("--json", "Output as JSON").action(lazy.lazy(() => import('./commands/repo/list-deprecations.cjs.js'), "command"));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
exports.registerPackageCommands = registerPackageCommands;
|
|
23
|
+
exports.registerRepoCommands = registerRepoCommands;
|
|
24
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var version = "0.
|
|
3
|
+
var version = "0.32.0-next.0";
|
|
4
4
|
var dependencies = {
|
|
5
5
|
"@backstage/catalog-model": "workspace:^",
|
|
6
6
|
"@backstage/cli-common": "workspace:^",
|
|
@@ -13,7 +13,7 @@ var dependencies = {
|
|
|
13
13
|
"@backstage/release-manifests": "workspace:^",
|
|
14
14
|
"@backstage/types": "workspace:^",
|
|
15
15
|
"@manypkg/get-packages": "^1.1.3",
|
|
16
|
-
"@module-federation/enhanced": "^0.
|
|
16
|
+
"@module-federation/enhanced": "^0.9.0",
|
|
17
17
|
"@octokit/graphql": "^5.0.0",
|
|
18
18
|
"@octokit/graphql-schema": "^13.7.0",
|
|
19
19
|
"@octokit/oauth-app": "^4.2.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0-next.0",
|
|
4
4
|
"description": "CLI for developing Backstage plugins and apps",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "cli"
|
|
@@ -47,18 +47,18 @@
|
|
|
47
47
|
]
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@backstage/catalog-model": "
|
|
51
|
-
"@backstage/cli-common": "
|
|
52
|
-
"@backstage/cli-node": "
|
|
53
|
-
"@backstage/config": "
|
|
54
|
-
"@backstage/config-loader": "
|
|
55
|
-
"@backstage/errors": "
|
|
56
|
-
"@backstage/eslint-plugin": "
|
|
57
|
-
"@backstage/integration": "
|
|
58
|
-
"@backstage/release-manifests": "
|
|
59
|
-
"@backstage/types": "
|
|
50
|
+
"@backstage/catalog-model": "1.7.3",
|
|
51
|
+
"@backstage/cli-common": "0.1.15",
|
|
52
|
+
"@backstage/cli-node": "0.2.13",
|
|
53
|
+
"@backstage/config": "1.3.2",
|
|
54
|
+
"@backstage/config-loader": "1.10.0",
|
|
55
|
+
"@backstage/errors": "1.2.7",
|
|
56
|
+
"@backstage/eslint-plugin": "0.1.10",
|
|
57
|
+
"@backstage/integration": "1.16.2",
|
|
58
|
+
"@backstage/release-manifests": "0.0.12",
|
|
59
|
+
"@backstage/types": "1.2.1",
|
|
60
60
|
"@manypkg/get-packages": "^1.1.3",
|
|
61
|
-
"@module-federation/enhanced": "^0.
|
|
61
|
+
"@module-federation/enhanced": "^0.9.0",
|
|
62
62
|
"@octokit/graphql": "^5.0.0",
|
|
63
63
|
"@octokit/graphql-schema": "^13.7.0",
|
|
64
64
|
"@octokit/oauth-app": "^4.2.0",
|
|
@@ -163,22 +163,22 @@
|
|
|
163
163
|
"zod-validation-error": "^3.4.0"
|
|
164
164
|
},
|
|
165
165
|
"devDependencies": {
|
|
166
|
-
"@backstage/backend-plugin-api": "
|
|
167
|
-
"@backstage/backend-test-utils": "
|
|
168
|
-
"@backstage/catalog-client": "
|
|
169
|
-
"@backstage/config": "
|
|
170
|
-
"@backstage/core-app-api": "
|
|
171
|
-
"@backstage/core-components": "
|
|
172
|
-
"@backstage/core-plugin-api": "
|
|
173
|
-
"@backstage/dev-utils": "
|
|
174
|
-
"@backstage/errors": "
|
|
175
|
-
"@backstage/plugin-auth-backend": "
|
|
176
|
-
"@backstage/plugin-auth-backend-module-guest-provider": "
|
|
177
|
-
"@backstage/plugin-catalog-node": "
|
|
178
|
-
"@backstage/plugin-scaffolder-node": "
|
|
179
|
-
"@backstage/plugin-scaffolder-node-test-utils": "
|
|
180
|
-
"@backstage/test-utils": "
|
|
181
|
-
"@backstage/theme": "
|
|
166
|
+
"@backstage/backend-plugin-api": "1.2.1",
|
|
167
|
+
"@backstage/backend-test-utils": "1.3.2-next.0",
|
|
168
|
+
"@backstage/catalog-client": "1.9.1",
|
|
169
|
+
"@backstage/config": "1.3.2",
|
|
170
|
+
"@backstage/core-app-api": "1.16.0",
|
|
171
|
+
"@backstage/core-components": "0.17.0",
|
|
172
|
+
"@backstage/core-plugin-api": "1.10.5",
|
|
173
|
+
"@backstage/dev-utils": "1.1.9-next.0",
|
|
174
|
+
"@backstage/errors": "1.2.7",
|
|
175
|
+
"@backstage/plugin-auth-backend": "0.24.5-next.0",
|
|
176
|
+
"@backstage/plugin-auth-backend-module-guest-provider": "0.2.6",
|
|
177
|
+
"@backstage/plugin-catalog-node": "1.16.1",
|
|
178
|
+
"@backstage/plugin-scaffolder-node": "0.8.1-next.0",
|
|
179
|
+
"@backstage/plugin-scaffolder-node-test-utils": "0.2.1-next.0",
|
|
180
|
+
"@backstage/test-utils": "1.7.6",
|
|
181
|
+
"@backstage/theme": "0.6.4",
|
|
182
182
|
"@rspack/core": "^1.0.10",
|
|
183
183
|
"@rspack/dev-server": "^1.0.9",
|
|
184
184
|
"@rspack/plugin-react-refresh": "^1.0.0",
|