@backstage/cli 0.13.2-next.0 → 0.14.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 +80 -0
- package/config/eslint.js +2 -2
- package/config/jest.js +8 -4
- package/config/jestSucraseTransform.js +60 -39
- package/dist/cjs/{PackageGraph-96b2e6ef.cjs.js → PackageGraph-452ec2ff.cjs.js} +65 -2
- package/dist/cjs/{backend-fb6d6170.cjs.js → backend-f623f925.cjs.js} +2 -2
- package/dist/cjs/{build-b3c69eff.cjs.js → build-c6587a6a.cjs.js} +11 -9
- package/dist/cjs/{build-8fd28a6d.cjs.js → build-d22951cc.cjs.js} +7 -6
- package/dist/cjs/{build-93f627fc.cjs.js → build-d555ae41.cjs.js} +7 -6
- package/dist/cjs/{build-9db9aaaf.cjs.js → build-dde37a4d.cjs.js} +22 -22
- package/dist/cjs/{buildBackend-08cefb3c.cjs.js → buildBackend-4890a3fb.cjs.js} +20 -16
- package/dist/cjs/{buildWorkspace-1323bee2.cjs.js → buildWorkspace-464c5a99.cjs.js} +9 -9
- package/dist/cjs/{bump-a85eb7bb.cjs.js → bump-a4f9d634.cjs.js} +132 -25
- package/dist/cjs/{bundle-b3d9e5ab.cjs.js → bundle-102f5596.cjs.js} +11 -11
- package/dist/cjs/{bundle-4ce79bce.cjs.js → bundle-bcefdcef.cjs.js} +2 -2
- package/dist/cjs/{clean-c50d4782.cjs.js → clean-dbc9a5ef.cjs.js} +2 -2
- package/dist/cjs/{config-f2365900.cjs.js → config-7c2e1f5a.cjs.js} +3 -3
- package/dist/cjs/{create-7ad905e4.cjs.js → create-7e122e43.cjs.js} +4 -4
- package/dist/cjs/{createDistWorkspace-f4c0276b.cjs.js → createDistWorkspace-7dc77457.cjs.js} +15 -9
- package/dist/cjs/{createPlugin-ba8c6df0.cjs.js → createPlugin-98e97774.cjs.js} +4 -4
- package/dist/cjs/{dev-e8f4294f.cjs.js → dev-1fa4ec4d.cjs.js} +6 -6
- package/dist/cjs/{diff-7c3a6378.cjs.js → diff-75846872.cjs.js} +6 -2
- package/dist/cjs/{docs-f72a2ec8.cjs.js → docs-1d4c7d02.cjs.js} +7 -4
- package/dist/cjs/{index-c953b562.cjs.js → index-76945a16.cjs.js} +2 -2
- package/dist/cjs/{index-526e4dc9.cjs.js → index-a90b183a.cjs.js} +18 -18
- package/dist/cjs/{index-d7ee78c4.cjs.js → index-b314a967.cjs.js} +16 -16
- package/dist/cjs/{index-8b03e1f7.cjs.js → index-f4a6cd4f.cjs.js} +70 -66
- package/dist/cjs/{info-92d051f2.cjs.js → info-01180b4a.cjs.js} +3 -3
- package/dist/cjs/{install-1f10c477.cjs.js → install-6fae05de.cjs.js} +4 -4
- package/dist/cjs/{lint-a49b0261.cjs.js → lint-9575a50e.cjs.js} +2 -2
- package/dist/cjs/lint-b454be94.cjs.js +92 -0
- package/dist/cjs/{lint-cc10c98e.cjs.js → lint-e84f4da1.cjs.js} +3 -3
- package/dist/cjs/{oldBuild-e0886590.cjs.js → oldBuild-5662c63f.cjs.js} +7 -6
- package/dist/cjs/{pack-7da7f03b.cjs.js → pack-4a819ab8.cjs.js} +2 -2
- package/dist/cjs/{packageRole-7bb8a760.cjs.js → packageRole-b9f3f4c2.cjs.js} +3 -3
- package/dist/cjs/{packageRoles-f4b169a7.cjs.js → packageRoles-be5cc4e7.cjs.js} +12 -12
- package/dist/cjs/packageScripts-98e13921.cjs.js +97 -0
- package/dist/cjs/{packager-3bddd88f.cjs.js → packager-3c7ef6f2.cjs.js} +34 -58
- package/dist/cjs/{packages-08c02af1.cjs.js → packages-6d20da58.cjs.js} +5 -4
- package/dist/cjs/parallel-d8e5bcbf.cjs.js +171 -0
- package/dist/cjs/{paths-f6ca70df.cjs.js → paths-67855a60.cjs.js} +4 -4
- package/dist/cjs/{print-43232f19.cjs.js → print-d0729b40.cjs.js} +7 -4
- package/dist/cjs/{run-8da8f918.cjs.js → run-b09132d3.cjs.js} +2 -2
- package/dist/cjs/{schema-2c7e9598.cjs.js → schema-2f989737.cjs.js} +7 -4
- package/dist/cjs/{serve-9c68f54d.cjs.js → serve-474204d0.cjs.js} +8 -8
- package/dist/cjs/{serve-01190cc4.cjs.js → serve-9f86fead.cjs.js} +9 -9
- package/dist/cjs/{server-937c32b4.cjs.js → server-525b32bf.cjs.js} +2 -2
- package/dist/cjs/svgrTemplate-b7a4ee52.cjs.js +21 -0
- package/dist/cjs/{tasks-3a7eba1b.cjs.js → tasks-0ade17b2.cjs.js} +2 -2
- package/dist/cjs/{testCommand-5cdbf69c.cjs.js → testCommand-afcd8cac.cjs.js} +11 -4
- package/dist/cjs/{validate-697fd284.cjs.js → validate-2f3a3c93.cjs.js} +7 -4
- package/dist/index.cjs.js +1 -1
- package/package.json +30 -24
- package/templates/default-backend-plugin/package.json.hbs +1 -1
- package/templates/default-plugin/package.json.hbs +1 -1
- package/dist/cjs/packageScripts-23016b48.cjs.js +0 -61
- package/dist/cjs/parallel-e73a4058.cjs.js +0 -48
- package/dist/cjs/svgrTemplate-f19e974c.cjs.js +0 -25
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var packager = require('./packager-
|
|
4
|
-
var packageRoles = require('./packageRoles-
|
|
5
|
-
var index = require('./index-
|
|
6
|
-
var buildBackend = require('./buildBackend-
|
|
3
|
+
var packager = require('./packager-3c7ef6f2.cjs.js');
|
|
4
|
+
var packageRoles = require('./packageRoles-be5cc4e7.cjs.js');
|
|
5
|
+
var index = require('./index-f4a6cd4f.cjs.js');
|
|
6
|
+
var buildBackend = require('./buildBackend-4890a3fb.cjs.js');
|
|
7
7
|
require('fs-extra');
|
|
8
8
|
require('rollup');
|
|
9
9
|
require('chalk');
|
|
@@ -18,9 +18,10 @@ require('rollup-plugin-dts');
|
|
|
18
18
|
require('@rollup/plugin-json');
|
|
19
19
|
require('@rollup/plugin-yaml');
|
|
20
20
|
require('rollup-pluginutils');
|
|
21
|
-
require('./svgrTemplate-
|
|
21
|
+
require('./svgrTemplate-b7a4ee52.cjs.js');
|
|
22
|
+
require('./parallel-d8e5bcbf.cjs.js');
|
|
23
|
+
require('os');
|
|
22
24
|
require('worker_threads');
|
|
23
|
-
require('./parallel-e73a4058.cjs.js');
|
|
24
25
|
require('zod');
|
|
25
26
|
require('commander');
|
|
26
27
|
require('semver');
|
|
@@ -34,41 +35,40 @@ require('react-dev-utils/ModuleScopePlugin');
|
|
|
34
35
|
require('run-script-webpack-plugin');
|
|
35
36
|
require('webpack-node-externals');
|
|
36
37
|
require('@manypkg/get-packages');
|
|
37
|
-
require('./paths-
|
|
38
|
+
require('./paths-67855a60.cjs.js');
|
|
38
39
|
require('mini-css-extract-plugin');
|
|
39
|
-
require('./run-
|
|
40
|
+
require('./run-b09132d3.cjs.js');
|
|
40
41
|
require('child_process');
|
|
41
42
|
require('util');
|
|
42
43
|
require('eslint-webpack-plugin');
|
|
43
44
|
require('lodash/pickBy');
|
|
44
|
-
require('./bundle-
|
|
45
|
+
require('./bundle-bcefdcef.cjs.js');
|
|
45
46
|
require('yn');
|
|
46
47
|
require('react-dev-utils/FileSizeReporter');
|
|
47
48
|
require('react-dev-utils/formatWebpackMessages');
|
|
48
49
|
require('webpack-dev-server');
|
|
49
50
|
require('react-dev-utils/openBrowser');
|
|
50
|
-
require('./config-
|
|
51
|
+
require('./config-7c2e1f5a.cjs.js');
|
|
51
52
|
require('@backstage/config-loader');
|
|
52
53
|
require('@backstage/config');
|
|
53
|
-
require('./PackageGraph-
|
|
54
|
-
require('os');
|
|
54
|
+
require('./PackageGraph-452ec2ff.cjs.js');
|
|
55
55
|
require('tar');
|
|
56
|
-
require('./createDistWorkspace-
|
|
56
|
+
require('./createDistWorkspace-7dc77457.cjs.js');
|
|
57
57
|
require('lodash/partition');
|
|
58
58
|
require('npm-packlist');
|
|
59
59
|
|
|
60
60
|
async function command(cmd) {
|
|
61
61
|
const role = await packageRoles.findRoleFromCommand(cmd);
|
|
62
|
-
if (role === "
|
|
63
|
-
return buildBackend.
|
|
64
|
-
targetDir: index.paths.
|
|
62
|
+
if (role === "frontend") {
|
|
63
|
+
return buildBackend.buildFrontend({
|
|
64
|
+
targetDir: index.paths.targetDir,
|
|
65
65
|
configPaths: cmd.config,
|
|
66
66
|
writeStats: Boolean(cmd.stats)
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
if (role === "backend") {
|
|
70
70
|
return buildBackend.buildBackend({
|
|
71
|
-
targetDir: index.paths.
|
|
71
|
+
targetDir: index.paths.targetDir,
|
|
72
72
|
skipBuildDependencies: Boolean(cmd.skipBuildDependencies)
|
|
73
73
|
});
|
|
74
74
|
}
|
|
@@ -91,4 +91,4 @@ async function command(cmd) {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
exports.command = command;
|
|
94
|
-
//# sourceMappingURL=index-
|
|
94
|
+
//# sourceMappingURL=index-a90b183a.cjs.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var fs = require('fs-extra');
|
|
4
|
-
var index = require('./index-
|
|
5
|
-
var backend = require('./backend-
|
|
4
|
+
var index = require('./index-f4a6cd4f.cjs.js');
|
|
5
|
+
var backend = require('./backend-f623f925.cjs.js');
|
|
6
6
|
require('yn');
|
|
7
7
|
require('path');
|
|
8
8
|
require('webpack');
|
|
@@ -16,30 +16,30 @@ require('run-script-webpack-plugin');
|
|
|
16
16
|
require('webpack-node-externals');
|
|
17
17
|
require('@backstage/cli-common');
|
|
18
18
|
require('@manypkg/get-packages');
|
|
19
|
-
require('./paths-
|
|
19
|
+
require('./paths-67855a60.cjs.js');
|
|
20
20
|
require('mini-css-extract-plugin');
|
|
21
|
-
require('./run-
|
|
21
|
+
require('./run-b09132d3.cjs.js');
|
|
22
22
|
require('eslint-webpack-plugin');
|
|
23
23
|
require('lodash/pickBy');
|
|
24
24
|
require('webpack-dev-server');
|
|
25
25
|
require('react-dev-utils/openBrowser');
|
|
26
26
|
var uniq = require('lodash/uniq');
|
|
27
|
-
var server = require('./server-
|
|
28
|
-
var config = require('./config-
|
|
27
|
+
var server = require('./server-525b32bf.cjs.js');
|
|
28
|
+
var config = require('./config-7c2e1f5a.cjs.js');
|
|
29
29
|
var Lockfile = require('./Lockfile-35661afa.cjs.js');
|
|
30
30
|
require('minimatch');
|
|
31
|
-
var lint = require('./lint-
|
|
32
|
-
var packageRoles = require('./packageRoles-
|
|
31
|
+
var lint = require('./lint-e84f4da1.cjs.js');
|
|
32
|
+
var packageRoles = require('./packageRoles-be5cc4e7.cjs.js');
|
|
33
33
|
require('commander');
|
|
34
34
|
require('semver');
|
|
35
35
|
require('@backstage/config/package.json');
|
|
36
36
|
require('@backstage/errors');
|
|
37
|
-
require('./svgrTemplate-
|
|
37
|
+
require('./svgrTemplate-b7a4ee52.cjs.js');
|
|
38
38
|
require('child_process');
|
|
39
39
|
require('util');
|
|
40
40
|
require('@backstage/config-loader');
|
|
41
41
|
require('@backstage/config');
|
|
42
|
-
require('./PackageGraph-
|
|
42
|
+
require('./PackageGraph-452ec2ff.cjs.js');
|
|
43
43
|
require('@yarnpkg/lockfile');
|
|
44
44
|
require('lodash/partition');
|
|
45
45
|
require('zod');
|
|
@@ -102,19 +102,19 @@ async function command(cmd) {
|
|
|
102
102
|
};
|
|
103
103
|
switch (role) {
|
|
104
104
|
case "backend":
|
|
105
|
-
case "plugin
|
|
106
|
-
case "plugin-
|
|
105
|
+
case "backend-plugin":
|
|
106
|
+
case "backend-plugin-module":
|
|
107
107
|
case "node-library":
|
|
108
108
|
return startBackend(options);
|
|
109
|
-
case "
|
|
109
|
+
case "frontend":
|
|
110
110
|
return startFrontend({
|
|
111
111
|
...options,
|
|
112
112
|
entry: "src/index",
|
|
113
113
|
verifyVersions: true
|
|
114
114
|
});
|
|
115
115
|
case "web-library":
|
|
116
|
-
case "plugin
|
|
117
|
-
case "plugin-
|
|
116
|
+
case "frontend-plugin":
|
|
117
|
+
case "frontend-plugin-module":
|
|
118
118
|
return startFrontend({ entry: "dev/index", ...options });
|
|
119
119
|
default:
|
|
120
120
|
throw new Error(`Start command is not supported for package role '${role}'`);
|
|
@@ -122,4 +122,4 @@ async function command(cmd) {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
exports.command = command;
|
|
125
|
-
//# sourceMappingURL=index-
|
|
125
|
+
//# sourceMappingURL=index-b314a967.cjs.js.map
|
|
@@ -46,16 +46,17 @@ class NotFoundError extends CustomError {
|
|
|
46
46
|
|
|
47
47
|
const paths = cliCommon.findPaths(__dirname);
|
|
48
48
|
|
|
49
|
-
var version$9 = "0.
|
|
49
|
+
var version$9 = "0.11.0";
|
|
50
50
|
|
|
51
|
-
var version$8 = "0.
|
|
51
|
+
var version$8 = "0.14.1";
|
|
52
52
|
var dependencies = {
|
|
53
|
-
"@backstage/cli-common": "^0.1.
|
|
54
|
-
"@backstage/config": "^0.1.
|
|
55
|
-
"@backstage/config-loader": "^0.9.
|
|
56
|
-
"@backstage/errors": "^0.2.
|
|
57
|
-
"@backstage/
|
|
58
|
-
"@
|
|
53
|
+
"@backstage/cli-common": "^0.1.8",
|
|
54
|
+
"@backstage/config": "^0.1.15",
|
|
55
|
+
"@backstage/config-loader": "^0.9.6",
|
|
56
|
+
"@backstage/errors": "^0.2.2",
|
|
57
|
+
"@backstage/release-manifests": "^0.0.2",
|
|
58
|
+
"@backstage/types": "^0.1.3",
|
|
59
|
+
"@hot-loader/react-dom": "^17.0.2",
|
|
59
60
|
"@manypkg/get-packages": "^1.1.3",
|
|
60
61
|
"@octokit/request": "^5.4.12",
|
|
61
62
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
@@ -69,8 +70,8 @@ var dependencies = {
|
|
|
69
70
|
"@sucrase/webpack-loader": "^2.0.0",
|
|
70
71
|
"@svgr/plugin-jsx": "6.2.x",
|
|
71
72
|
"@svgr/plugin-svgo": "6.2.x",
|
|
72
|
-
"@svgr/rollup": "
|
|
73
|
-
"@svgr/webpack": "
|
|
73
|
+
"@svgr/rollup": "6.2.x",
|
|
74
|
+
"@svgr/webpack": "6.2.x",
|
|
74
75
|
"@types/webpack-env": "^1.15.2",
|
|
75
76
|
"@typescript-eslint/eslint-plugin": "^5.9.0",
|
|
76
77
|
"@typescript-eslint/parser": "^5.9.0",
|
|
@@ -106,7 +107,7 @@ var dependencies = {
|
|
|
106
107
|
"json-schema": "^0.4.0",
|
|
107
108
|
"jest-transform-yaml": "^1.0.0",
|
|
108
109
|
lodash: "^4.17.21",
|
|
109
|
-
minimatch: "
|
|
110
|
+
minimatch: "5.0.0",
|
|
110
111
|
"mini-css-extract-plugin": "^2.4.2",
|
|
111
112
|
"npm-packlist": "^3.0.0",
|
|
112
113
|
"node-libs-browser": "^2.2.1",
|
|
@@ -139,14 +140,14 @@ var dependencies = {
|
|
|
139
140
|
zod: "^3.11.6"
|
|
140
141
|
};
|
|
141
142
|
var devDependencies = {
|
|
142
|
-
"@backstage/backend-common": "^0.
|
|
143
|
-
"@backstage/config": "^0.1.
|
|
144
|
-
"@backstage/core-components": "^0.8.
|
|
145
|
-
"@backstage/core-plugin-api": "^0.
|
|
146
|
-
"@backstage/core-app-api": "^0.5.
|
|
147
|
-
"@backstage/dev-utils": "^0.2.
|
|
148
|
-
"@backstage/test-utils": "^0.2.
|
|
149
|
-
"@backstage/theme": "^0.2.
|
|
143
|
+
"@backstage/backend-common": "^0.11.0",
|
|
144
|
+
"@backstage/config": "^0.1.15",
|
|
145
|
+
"@backstage/core-components": "^0.8.10",
|
|
146
|
+
"@backstage/core-plugin-api": "^0.7.0",
|
|
147
|
+
"@backstage/core-app-api": "^0.5.4",
|
|
148
|
+
"@backstage/dev-utils": "^0.2.23",
|
|
149
|
+
"@backstage/test-utils": "^0.2.6",
|
|
150
|
+
"@backstage/theme": "^0.2.15",
|
|
150
151
|
"@types/diff": "^5.0.0",
|
|
151
152
|
"@types/express": "^4.17.6",
|
|
152
153
|
"@types/fs-extra": "^9.0.1",
|
|
@@ -158,29 +159,31 @@ var devDependencies = {
|
|
|
158
159
|
"@types/npm-packlist": "^1.1.2",
|
|
159
160
|
"@types/recursive-readdir": "^2.2.0",
|
|
160
161
|
"@types/rollup-plugin-peer-deps-external": "^2.2.0",
|
|
161
|
-
"@types/rollup-plugin-postcss": "^
|
|
162
|
+
"@types/rollup-plugin-postcss": "^3.1.4",
|
|
163
|
+
"@types/svgo": "^2.6.2",
|
|
162
164
|
"@types/tar": "^6.1.1",
|
|
163
165
|
"@types/terser-webpack-plugin": "^5.0.4",
|
|
164
166
|
"@types/yarnpkg__lockfile": "^1.1.4",
|
|
165
167
|
del: "^6.0.0",
|
|
166
168
|
"mock-fs": "^5.1.0",
|
|
167
169
|
nodemon: "^2.0.2",
|
|
168
|
-
"ts-node": "^10.0.0"
|
|
170
|
+
"ts-node": "^10.0.0",
|
|
171
|
+
msw: "^0.35.0"
|
|
169
172
|
};
|
|
170
173
|
|
|
171
|
-
var version$7 = "0.5.
|
|
174
|
+
var version$7 = "0.5.4";
|
|
172
175
|
|
|
173
|
-
var version$6 = "0.8.
|
|
176
|
+
var version$6 = "0.8.10";
|
|
174
177
|
|
|
175
|
-
var version$5 = "0.
|
|
178
|
+
var version$5 = "0.7.0";
|
|
176
179
|
|
|
177
|
-
var version$4 = "0.2.
|
|
180
|
+
var version$4 = "0.2.23";
|
|
178
181
|
|
|
179
|
-
var version$3 = "0.2.
|
|
182
|
+
var version$3 = "0.2.6";
|
|
180
183
|
|
|
181
|
-
var version$2 = "0.2.
|
|
184
|
+
var version$2 = "0.2.15";
|
|
182
185
|
|
|
183
|
-
var version$1 = "0.
|
|
186
|
+
var version$1 = "0.17.0";
|
|
184
187
|
|
|
185
188
|
const packageVersions = {
|
|
186
189
|
"@backstage/backend-common": version$9,
|
|
@@ -235,53 +238,54 @@ const configOption = [
|
|
|
235
238
|
];
|
|
236
239
|
function registerRepoCommand(program) {
|
|
237
240
|
const command = program.command("repo [command]", { hidden: true }).description("Command that run across an entire Backstage project [EXPERIMENTAL]");
|
|
238
|
-
command.command("build").description("Build packages in the project, excluding bundled app and backend packages.").option("--all", "Build all packages, including bundled app and backend packages.").action(lazy(() => Promise.resolve().then(function () { return require('./build-
|
|
241
|
+
command.command("build").description("Build packages in the project, excluding bundled app and backend packages.").option("--all", "Build all packages, including bundled app and backend packages.").action(lazy(() => Promise.resolve().then(function () { return require('./build-dde37a4d.cjs.js'); }).then((m) => m.command)));
|
|
242
|
+
command.command("lint").description("Lint all packages in the project").option("--format <format>", "Lint report output format", "eslint-formatter-friendly").option("--since <ref>", "Only lint packages that changed since the specified ref").option("--fix", "Attempt to automatically fix violations").action(lazy(() => Promise.resolve().then(function () { return require('./lint-b454be94.cjs.js'); }).then((m) => m.command)));
|
|
239
243
|
}
|
|
240
244
|
function registerScriptCommand(program) {
|
|
241
|
-
const command = program.command("
|
|
242
|
-
command.command("start").description("Start a package for local development").option(...configOption).option("--role <name>", "Run the command with an explicit package role").option("--check", "Enable type checking and linting if available").option("--inspect", "Enable debugger in Node.js environments").option("--inspect-brk", "Enable debugger in Node.js environments, breaking before code starts").action(lazy(() => Promise.resolve().then(function () { return require('./index-
|
|
243
|
-
command.command("build").description("Build a package for production deployment or publishing").option("--minify", "Minify the generated code. Does not apply to app or backend packages.").option("--experimental-type-build", "Enable experimental type build. Does not apply to app or backend packages.").option("--skip-build-dependencies", "Skip the automatic building of local dependencies. Applies to backend packages only.").option("--stats", "If bundle stats are available, write them to the output directory. Applies to app packages only.").option("--config <path>", "Config files to load instead of app-config.yaml. Applies to app packages only.", (opt, opts) => [...opts, opt], Array()).action(lazy(() => Promise.resolve().then(function () { return require('./index-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-
|
|
247
|
-
command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-
|
|
248
|
-
command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-
|
|
245
|
+
const command = program.command("package [command]", { hidden: true }).description("Lifecycle scripts for individual packages [EXPERIMENTAL]");
|
|
246
|
+
command.command("start").description("Start a package for local development").option(...configOption).option("--role <name>", "Run the command with an explicit package role [EXPERIMENTAL]").option("--check", "Enable type checking and linting if available").option("--inspect", "Enable debugger in Node.js environments").option("--inspect-brk", "Enable debugger in Node.js environments, breaking before code starts").action(lazy(() => Promise.resolve().then(function () { return require('./index-b314a967.cjs.js'); }).then((m) => m.command)));
|
|
247
|
+
command.command("build").description("Build a package for production deployment or publishing").option("--role <name>", "Run the command with an explicit package role [EXPERIMENTAL]").option("--minify", "Minify the generated code. Does not apply to app or backend packages.").option("--experimental-type-build", "Enable experimental type build. Does not apply to app or backend packages.").option("--skip-build-dependencies", "Skip the automatic building of local dependencies. Applies to backend packages only.").option("--stats", "If bundle stats are available, write them to the output directory. Applies to app packages only.").option("--config <path>", "Config files to load instead of app-config.yaml. Applies to app packages only.", (opt, opts) => [...opts, opt], Array()).action(lazy(() => Promise.resolve().then(function () { return require('./index-a90b183a.cjs.js'); }).then((m) => m.command)));
|
|
248
|
+
command.command("lint").option("--format <format>", "Lint report output format", "eslint-formatter-friendly").option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-9575a50e.cjs.js'); }).then((m) => m.default)));
|
|
249
|
+
command.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./testCommand-afcd8cac.cjs.js'); }).then((m) => m.default)));
|
|
250
|
+
command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-dbc9a5ef.cjs.js'); }).then((m) => m.default)));
|
|
251
|
+
command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-4a819ab8.cjs.js'); }).then((m) => m.pre)));
|
|
252
|
+
command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-4a819ab8.cjs.js'); }).then((m) => m.post)));
|
|
249
253
|
}
|
|
250
254
|
function registerMigrateCommand(program) {
|
|
251
255
|
const command = program.command("migrate [command]", { hidden: true }).description("Migration utilities [EXPERIMENTAL]");
|
|
252
|
-
command.command("package-
|
|
253
|
-
command.command("package-scripts").description("Set package scripts according to each package role").action(lazy(() => Promise.resolve().then(function () { return require('./packageScripts-
|
|
256
|
+
command.command("package-roles").description(`Add package role field to packages that don't have it`).action(lazy(() => Promise.resolve().then(function () { return require('./packageRole-b9f3f4c2.cjs.js'); }).then((m) => m.default)));
|
|
257
|
+
command.command("package-scripts").description("Set package scripts according to each package role").action(lazy(() => Promise.resolve().then(function () { return require('./packageScripts-98e13921.cjs.js'); }).then((m) => m.command)));
|
|
254
258
|
}
|
|
255
259
|
function registerCommands(program) {
|
|
256
|
-
program.command("app:build").description("Build an app for a production release").option("--stats", "Write bundle stats to output directory").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./build-
|
|
257
|
-
program.command("app:serve").description("Serve an app for local development").option("--check", "Enable type checking and linting").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./serve-
|
|
258
|
-
program.command("backend:build").description("Build a backend plugin").option("--minify", "Minify the generated code").option("--experimental-type-build", "Enable experimental type build").action(lazy(() => Promise.resolve().then(function () { return require('./build-
|
|
259
|
-
program.command("backend:bundle").description("Bundle the backend into a deployment archive").option("--build-dependencies", "Build all local package dependencies before bundling the backend").action(lazy(() => Promise.resolve().then(function () { return require('./bundle-
|
|
260
|
-
program.command("backend:dev").description("Start local development server with HMR for the backend").option("--check", "Enable type checking and linting").option("--inspect", "Enable debugger").option("--inspect-brk", "Enable debugger with await to attach debugger").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./dev-
|
|
261
|
-
program.command("create").storeOptionsAsProperties(false).description("Open up an interactive guide to creating new things in your app").option("--select <name>", "Select the thing you want to be creating upfront").option("--option <name>=<value>", "Pre-fill options for the creation process", (opt, arr) => [...arr, opt], []).option("--scope <scope>", "The scope to use for new packages").option("--npm-registry <URL>", "The package registry to use for new packages").option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./create-
|
|
262
|
-
program.command("create-plugin").option("--backend", "Create plugin with the backend dependencies as default").description("Creates a new plugin in the current repository").option("--scope <scope>", "npm scope").option("--npm-registry <URL>", "npm registry URL").option("--no-private", "Public npm package").action(lazy(() => Promise.resolve().then(function () { return require('./createPlugin-
|
|
263
|
-
program.command("plugin:build").description("Build a plugin").option("--minify", "Minify the generated code").option("--experimental-type-build", "Enable experimental type build").action(lazy(() => Promise.resolve().then(function () { return require('./build-
|
|
264
|
-
program.command("plugin:serve").description("Serves the dev/ folder of a plugin").option("--check", "Enable type checking and linting").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./serve-
|
|
265
|
-
program.command("plugin:diff").option("--check", "Fail if changes are required").option("--yes", "Apply all changes").description("Diff an existing plugin with the creation template").action(lazy(() => Promise.resolve().then(function () { return require('./diff-
|
|
266
|
-
program.command("build").description("Build a package for publishing").option("--outputs <formats>", "List of formats to output [types,cjs,esm]").option("--minify", "Minify the generated code").option("--experimental-type-build", "Enable experimental type build").action(lazy(() => Promise.resolve().then(function () { return require('./oldBuild-
|
|
267
|
-
program.command("lint").option("--format <format>", "Lint report output format", "eslint-formatter-friendly").option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-
|
|
268
|
-
program.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./testCommand-
|
|
269
|
-
program.command("config:docs").option("--package <name>", "Only include the schema that applies to the given package").description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-
|
|
270
|
-
program.command("config:print").option("--package <name>", "Only load config schema that applies to the given package").option("--lax", "Do not require environment variables to be set").option("--frontend", "Print only the frontend configuration").option("--with-secrets", "Include secrets in the printed configuration").option("--format <format>", "Format to print the configuration in, either json or yaml [yaml]").option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-
|
|
271
|
-
program.command("config:check").option("--package <name>", "Only load config schema that applies to the given package").option("--lax", "Do not require environment variables to be set").option("--frontend", "Only validate the frontend configuration").option("--deprecated", "Output deprecated configuration settings").option(...configOption).description("Validate that the given configuration loads and matches schema").action(lazy(() => Promise.resolve().then(function () { return require('./validate-
|
|
272
|
-
program.command("config:schema").option("--package <name>", "Only output config schema that applies to the given package").option("--format <format>", "Format to print the schema in, either json or yaml [yaml]").description("Print configuration schema").action(lazy(() => Promise.resolve().then(function () { return require('./schema-
|
|
260
|
+
program.command("app:build").description("Build an app for a production release").option("--stats", "Write bundle stats to output directory").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./build-c6587a6a.cjs.js'); }).then((m) => m.default)));
|
|
261
|
+
program.command("app:serve").description("Serve an app for local development").option("--check", "Enable type checking and linting").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./serve-9f86fead.cjs.js'); }).then((m) => m.default)));
|
|
262
|
+
program.command("backend:build").description("Build a backend plugin").option("--minify", "Minify the generated code").option("--experimental-type-build", "Enable experimental type build").action(lazy(() => Promise.resolve().then(function () { return require('./build-d555ae41.cjs.js'); }).then((m) => m.default)));
|
|
263
|
+
program.command("backend:bundle").description("Bundle the backend into a deployment archive").option("--build-dependencies", "Build all local package dependencies before bundling the backend").action(lazy(() => Promise.resolve().then(function () { return require('./bundle-102f5596.cjs.js'); }).then((m) => m.default)));
|
|
264
|
+
program.command("backend:dev").description("Start local development server with HMR for the backend").option("--check", "Enable type checking and linting").option("--inspect", "Enable debugger").option("--inspect-brk", "Enable debugger with await to attach debugger").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./dev-1fa4ec4d.cjs.js'); }).then((m) => m.default)));
|
|
265
|
+
program.command("create").storeOptionsAsProperties(false).description("Open up an interactive guide to creating new things in your app").option("--select <name>", "Select the thing you want to be creating upfront").option("--option <name>=<value>", "Pre-fill options for the creation process", (opt, arr) => [...arr, opt], []).option("--scope <scope>", "The scope to use for new packages").option("--npm-registry <URL>", "The package registry to use for new packages").option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./create-7e122e43.cjs.js'); }).then((m) => m.default)));
|
|
266
|
+
program.command("create-plugin").option("--backend", "Create plugin with the backend dependencies as default").description("Creates a new plugin in the current repository").option("--scope <scope>", "npm scope").option("--npm-registry <URL>", "npm registry URL").option("--no-private", "Public npm package").action(lazy(() => Promise.resolve().then(function () { return require('./createPlugin-98e97774.cjs.js'); }).then((m) => m.default)));
|
|
267
|
+
program.command("plugin:build").description("Build a plugin").option("--minify", "Minify the generated code").option("--experimental-type-build", "Enable experimental type build").action(lazy(() => Promise.resolve().then(function () { return require('./build-d22951cc.cjs.js'); }).then((m) => m.default)));
|
|
268
|
+
program.command("plugin:serve").description("Serves the dev/ folder of a plugin").option("--check", "Enable type checking and linting").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./serve-474204d0.cjs.js'); }).then((m) => m.default)));
|
|
269
|
+
program.command("plugin:diff").option("--check", "Fail if changes are required").option("--yes", "Apply all changes").description("Diff an existing plugin with the creation template").action(lazy(() => Promise.resolve().then(function () { return require('./diff-75846872.cjs.js'); }).then((m) => m.default)));
|
|
270
|
+
program.command("build").description("Build a package for publishing").option("--outputs <formats>", "List of formats to output [types,cjs,esm]").option("--minify", "Minify the generated code").option("--experimental-type-build", "Enable experimental type build").action(lazy(() => Promise.resolve().then(function () { return require('./oldBuild-5662c63f.cjs.js'); }).then((m) => m.default)));
|
|
271
|
+
program.command("lint").option("--format <format>", "Lint report output format", "eslint-formatter-friendly").option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-9575a50e.cjs.js'); }).then((m) => m.default)));
|
|
272
|
+
program.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./testCommand-afcd8cac.cjs.js'); }).then((m) => m.default)));
|
|
273
|
+
program.command("config:docs").option("--package <name>", "Only include the schema that applies to the given package").description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-1d4c7d02.cjs.js'); }).then((m) => m.default)));
|
|
274
|
+
program.command("config:print").option("--package <name>", "Only load config schema that applies to the given package").option("--lax", "Do not require environment variables to be set").option("--frontend", "Print only the frontend configuration").option("--with-secrets", "Include secrets in the printed configuration").option("--format <format>", "Format to print the configuration in, either json or yaml [yaml]").option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-d0729b40.cjs.js'); }).then((m) => m.default)));
|
|
275
|
+
program.command("config:check").option("--package <name>", "Only load config schema that applies to the given package").option("--lax", "Do not require environment variables to be set").option("--frontend", "Only validate the frontend configuration").option("--deprecated", "Output deprecated configuration settings").option(...configOption).description("Validate that the given configuration loads and matches schema").action(lazy(() => Promise.resolve().then(function () { return require('./validate-2f3a3c93.cjs.js'); }).then((m) => m.default)));
|
|
276
|
+
program.command("config:schema").option("--package <name>", "Only output config schema that applies to the given package").option("--format <format>", "Format to print the schema in, either json or yaml [yaml]").description("Print configuration schema").action(lazy(() => Promise.resolve().then(function () { return require('./schema-2f989737.cjs.js'); }).then((m) => m.default)));
|
|
273
277
|
registerRepoCommand(program);
|
|
274
278
|
registerScriptCommand(program);
|
|
275
279
|
registerMigrateCommand(program);
|
|
276
|
-
program.command("versions:bump").option("--pattern <glob>", "Override glob for matching packages to upgrade").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-
|
|
277
|
-
program.command("versions:check").option("--fix", "Fix any auto-fixable versioning problems").description("Check Backstage package versioning").action(lazy(() => Promise.resolve().then(function () { return require('./lint-
|
|
278
|
-
program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-
|
|
279
|
-
program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-
|
|
280
|
-
program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-
|
|
281
|
-
program.command("build-workspace <workspace-dir> ...<packages>").description("Builds a temporary dist workspace from the provided packages").action(lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace-
|
|
282
|
-
program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-
|
|
283
|
-
program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-
|
|
284
|
-
program.command("install [plugin-id]", { hidden: true }).option("--from <packageJsonFilePath>", "Install from a local package.json containing the installation recipe").description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-
|
|
280
|
+
program.command("versions:bump").option("--pattern <glob>", "Override glob for matching packages to upgrade").option("--release <version|next|main>", "Bump to a specific Backstage release line or version", "main").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-a4f9d634.cjs.js'); }).then((m) => m.default)));
|
|
281
|
+
program.command("versions:check").option("--fix", "Fix any auto-fixable versioning problems").description("Check Backstage package versioning").action(lazy(() => Promise.resolve().then(function () { return require('./lint-e84f4da1.cjs.js'); }).then((m) => m.default)));
|
|
282
|
+
program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-4a819ab8.cjs.js'); }).then((m) => m.pre)));
|
|
283
|
+
program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-4a819ab8.cjs.js'); }).then((m) => m.post)));
|
|
284
|
+
program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-dbc9a5ef.cjs.js'); }).then((m) => m.default)));
|
|
285
|
+
program.command("build-workspace <workspace-dir> ...<packages>").description("Builds a temporary dist workspace from the provided packages").action(lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace-464c5a99.cjs.js'); }).then((m) => m.default)));
|
|
286
|
+
program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-76945a16.cjs.js'); }).then((m) => m.default)));
|
|
287
|
+
program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-01180b4a.cjs.js'); }).then((m) => m.default)));
|
|
288
|
+
program.command("install [plugin-id]", { hidden: true }).option("--from <packageJsonFilePath>", "Install from a local package.json containing the installation recipe").description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-6fae05de.cjs.js'); }).then((m) => m.default)));
|
|
285
289
|
}
|
|
286
290
|
function lazy(getActionFunc) {
|
|
287
291
|
return async (...args) => {
|
|
@@ -325,4 +329,4 @@ exports.devDependencies = devDependencies;
|
|
|
325
329
|
exports.paths = paths;
|
|
326
330
|
exports.version = version;
|
|
327
331
|
exports.version$1 = version$8;
|
|
328
|
-
//# sourceMappingURL=index-
|
|
332
|
+
//# sourceMappingURL=index-f4a6cd4f.cjs.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-f4a6cd4f.cjs.js');
|
|
4
4
|
var os = require('os');
|
|
5
|
-
var run = require('./run-
|
|
5
|
+
var run = require('./run-b09132d3.cjs.js');
|
|
6
6
|
var Lockfile = require('./Lockfile-35661afa.cjs.js');
|
|
7
7
|
require('minimatch');
|
|
8
8
|
require('@manypkg/get-packages');
|
|
@@ -43,4 +43,4 @@ var info = async () => {
|
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
exports["default"] = info;
|
|
46
|
-
//# sourceMappingURL=info-
|
|
46
|
+
//# sourceMappingURL=info-01180b4a.cjs.js.map
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
var fs = require('fs-extra');
|
|
4
4
|
require('semver');
|
|
5
5
|
require('@yarnpkg/lockfile');
|
|
6
|
-
var packages = require('./packages-
|
|
7
|
-
var index = require('./index-
|
|
6
|
+
var packages = require('./packages-6d20da58.cjs.js');
|
|
7
|
+
var index = require('./index-f4a6cd4f.cjs.js');
|
|
8
8
|
var chalk = require('chalk');
|
|
9
9
|
var sortBy = require('lodash/sortBy');
|
|
10
10
|
var groupBy = require('lodash/groupBy');
|
|
11
|
-
var run = require('./run-
|
|
11
|
+
var run = require('./run-b09132d3.cjs.js');
|
|
12
12
|
require('minimatch');
|
|
13
13
|
require('@manypkg/get-packages');
|
|
14
14
|
require('commander');
|
|
@@ -240,4 +240,4 @@ var install = async (pluginId, cmd) => {
|
|
|
240
240
|
};
|
|
241
241
|
|
|
242
242
|
exports["default"] = install;
|
|
243
|
-
//# sourceMappingURL=install-
|
|
243
|
+
//# sourceMappingURL=install-6fae05de.cjs.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-f4a6cd4f.cjs.js');
|
|
4
4
|
var eslint = require('eslint');
|
|
5
5
|
require('commander');
|
|
6
6
|
require('chalk');
|
|
@@ -32,4 +32,4 @@ var lint = async (cmd, cmdArgs) => {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
exports["default"] = lint;
|
|
35
|
-
//# sourceMappingURL=lint-
|
|
35
|
+
//# sourceMappingURL=lint-9575a50e.cjs.js.map
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chalk = require('chalk');
|
|
4
|
+
var path = require('path');
|
|
5
|
+
var PackageGraph = require('./PackageGraph-452ec2ff.cjs.js');
|
|
6
|
+
var parallel = require('./parallel-d8e5bcbf.cjs.js');
|
|
7
|
+
var index = require('./index-f4a6cd4f.cjs.js');
|
|
8
|
+
require('@manypkg/get-packages');
|
|
9
|
+
require('@backstage/errors');
|
|
10
|
+
require('child_process');
|
|
11
|
+
require('util');
|
|
12
|
+
require('os');
|
|
13
|
+
require('worker_threads');
|
|
14
|
+
require('commander');
|
|
15
|
+
require('fs-extra');
|
|
16
|
+
require('semver');
|
|
17
|
+
require('@backstage/cli-common');
|
|
18
|
+
require('@backstage/config/package.json');
|
|
19
|
+
|
|
20
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
|
+
|
|
22
|
+
var chalk__default = /*#__PURE__*/_interopDefaultLegacy(chalk);
|
|
23
|
+
|
|
24
|
+
function depCount(pkg) {
|
|
25
|
+
const deps = pkg.dependencies ? Object.keys(pkg.dependencies).length : 0;
|
|
26
|
+
const devDeps = pkg.devDependencies ? Object.keys(pkg.devDependencies).length : 0;
|
|
27
|
+
return deps + devDeps;
|
|
28
|
+
}
|
|
29
|
+
async function command(cmd) {
|
|
30
|
+
let packages = await PackageGraph.PackageGraph.listTargetPackages();
|
|
31
|
+
if (cmd.since) {
|
|
32
|
+
const graph = PackageGraph.PackageGraph.fromPackages(packages);
|
|
33
|
+
packages = await graph.listChangedPackages({ ref: cmd.since });
|
|
34
|
+
}
|
|
35
|
+
packages.sort((a, b) => depCount(b.packageJson) - depCount(a.packageJson));
|
|
36
|
+
if (cmd.format === "eslint-formatter-friendly") {
|
|
37
|
+
process.chdir(index.paths.targetRoot);
|
|
38
|
+
}
|
|
39
|
+
if (!process.env.FORCE_COLOR) {
|
|
40
|
+
process.env.FORCE_COLOR = "1";
|
|
41
|
+
}
|
|
42
|
+
const resultsList = await parallel.runWorkerQueueThreads({
|
|
43
|
+
items: packages.map((pkg) => ({
|
|
44
|
+
fullDir: pkg.dir,
|
|
45
|
+
relativeDir: path.relative(index.paths.targetRoot, pkg.dir)
|
|
46
|
+
})),
|
|
47
|
+
workerData: {
|
|
48
|
+
fix: Boolean(cmd.fix),
|
|
49
|
+
format: cmd.format
|
|
50
|
+
},
|
|
51
|
+
workerFactory: async ({ fix, format }) => {
|
|
52
|
+
const { ESLint } = require("eslint");
|
|
53
|
+
return async ({
|
|
54
|
+
fullDir,
|
|
55
|
+
relativeDir
|
|
56
|
+
}) => {
|
|
57
|
+
process.cwd = () => fullDir;
|
|
58
|
+
const start = Date.now();
|
|
59
|
+
const eslint = new ESLint({
|
|
60
|
+
cwd: fullDir,
|
|
61
|
+
fix,
|
|
62
|
+
extensions: ["js", "jsx", "ts", "tsx", "mjs", "cjs"]
|
|
63
|
+
});
|
|
64
|
+
const formatter = await eslint.loadFormatter(format);
|
|
65
|
+
const results = await eslint.lintFiles(["."]);
|
|
66
|
+
const count = String(results.length).padStart(3);
|
|
67
|
+
const time = ((Date.now() - start) / 1e3).toFixed(2);
|
|
68
|
+
console.log(`Checked ${count} files in ${relativeDir} ${time}s`);
|
|
69
|
+
if (fix) {
|
|
70
|
+
await ESLint.outputFixes(results);
|
|
71
|
+
}
|
|
72
|
+
const resultText = formatter.format(results);
|
|
73
|
+
return { relativeDir, resultText };
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
let failed = false;
|
|
78
|
+
for (const { relativeDir, resultText } of resultsList) {
|
|
79
|
+
if (resultText) {
|
|
80
|
+
console.log();
|
|
81
|
+
console.log(chalk__default["default"].red(`Lint failed in ${relativeDir}:`));
|
|
82
|
+
console.log(resultText.trimLeft());
|
|
83
|
+
failed = true;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (failed) {
|
|
87
|
+
process.exit(1);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
exports.command = command;
|
|
92
|
+
//# sourceMappingURL=lint-b454be94.cjs.js.map
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
var Lockfile = require('./Lockfile-35661afa.cjs.js');
|
|
4
4
|
require('minimatch');
|
|
5
5
|
require('@manypkg/get-packages');
|
|
6
|
-
require('./run-
|
|
6
|
+
require('./run-b09132d3.cjs.js');
|
|
7
7
|
require('chalk');
|
|
8
|
-
var index = require('./index-
|
|
8
|
+
var index = require('./index-f4a6cd4f.cjs.js');
|
|
9
9
|
var partition = require('lodash/partition');
|
|
10
10
|
require('fs-extra');
|
|
11
11
|
require('semver');
|
|
@@ -76,4 +76,4 @@ function logArray(arr, header, each) {
|
|
|
76
76
|
exports["default"] = lint;
|
|
77
77
|
exports.forbiddenDuplicatesFilter = forbiddenDuplicatesFilter;
|
|
78
78
|
exports.includedFilter = includedFilter;
|
|
79
|
-
//# sourceMappingURL=lint-
|
|
79
|
+
//# sourceMappingURL=lint-e84f4da1.cjs.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var packager = require('./packager-
|
|
3
|
+
var packager = require('./packager-3c7ef6f2.cjs.js');
|
|
4
4
|
require('fs-extra');
|
|
5
5
|
require('rollup');
|
|
6
6
|
require('chalk');
|
|
7
7
|
require('path');
|
|
8
|
-
require('./index-
|
|
8
|
+
require('./index-f4a6cd4f.cjs.js');
|
|
9
9
|
require('commander');
|
|
10
10
|
require('semver');
|
|
11
11
|
require('@backstage/cli-common');
|
|
@@ -21,11 +21,12 @@ require('rollup-plugin-dts');
|
|
|
21
21
|
require('@rollup/plugin-json');
|
|
22
22
|
require('@rollup/plugin-yaml');
|
|
23
23
|
require('rollup-pluginutils');
|
|
24
|
-
require('./svgrTemplate-
|
|
24
|
+
require('./svgrTemplate-b7a4ee52.cjs.js');
|
|
25
|
+
require('./parallel-d8e5bcbf.cjs.js');
|
|
26
|
+
require('os');
|
|
25
27
|
require('worker_threads');
|
|
26
|
-
require('./packageRoles-
|
|
28
|
+
require('./packageRoles-be5cc4e7.cjs.js');
|
|
27
29
|
require('zod');
|
|
28
|
-
require('./parallel-e73a4058.cjs.js');
|
|
29
30
|
|
|
30
31
|
var oldBuild = async (cmd) => {
|
|
31
32
|
let outputs = /* @__PURE__ */ new Set();
|
|
@@ -49,4 +50,4 @@ var oldBuild = async (cmd) => {
|
|
|
49
50
|
};
|
|
50
51
|
|
|
51
52
|
exports["default"] = oldBuild;
|
|
52
|
-
//# sourceMappingURL=oldBuild-
|
|
53
|
+
//# sourceMappingURL=oldBuild-5662c63f.cjs.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var fs = require('fs-extra');
|
|
4
|
-
var index = require('./index-
|
|
4
|
+
var index = require('./index-f4a6cd4f.cjs.js');
|
|
5
5
|
var path = require('path');
|
|
6
6
|
require('commander');
|
|
7
7
|
require('chalk');
|
|
@@ -66,4 +66,4 @@ const post = async () => {
|
|
|
66
66
|
|
|
67
67
|
exports.post = post;
|
|
68
68
|
exports.pre = pre;
|
|
69
|
-
//# sourceMappingURL=pack-
|
|
69
|
+
//# sourceMappingURL=pack-4a819ab8.cjs.js.map
|