@backstage/cli 0.13.1 → 0.13.2-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 +19 -0
- package/config/eslint.backend.js +1 -12
- package/config/eslint.js +6 -17
- package/dist/cjs/{PackageGraph-7a0d3a83.cjs.js → PackageGraph-96b2e6ef.cjs.js} +8 -1
- package/dist/cjs/backend-fb6d6170.cjs.js +36 -0
- package/dist/cjs/{build-13a4b7bd.cjs.js → build-8fd28a6d.cjs.js} +7 -3
- package/dist/cjs/{build-e1971801.cjs.js → build-93f627fc.cjs.js} +7 -3
- package/dist/cjs/build-9db9aaaf.cjs.js +173 -0
- package/dist/cjs/build-b3c69eff.cjs.js +57 -0
- package/dist/cjs/buildBackend-08cefb3c.cjs.js +83 -0
- package/dist/cjs/buildWorkspace-1323bee2.cjs.js +54 -0
- package/dist/cjs/{bump-89dd948d.cjs.js → bump-a85eb7bb.cjs.js} +74 -73
- package/dist/cjs/{build-7ef7f5f9.cjs.js → bundle-4ce79bce.cjs.js} +10 -49
- package/dist/cjs/{bundle-37417344.cjs.js → bundle-b3d9e5ab.cjs.js} +15 -10
- package/dist/cjs/{clean-4b42d722.cjs.js → clean-c50d4782.cjs.js} +2 -2
- package/dist/cjs/{config-994b1bfd.cjs.js → config-f2365900.cjs.js} +3 -3
- package/dist/cjs/{create-dcedc988.cjs.js → create-7ad905e4.cjs.js} +4 -4
- package/dist/cjs/createDistWorkspace-f4c0276b.cjs.js +205 -0
- package/dist/cjs/{createPlugin-6a69e42a.cjs.js → createPlugin-ba8c6df0.cjs.js} +4 -4
- package/dist/cjs/{dev-e999907a.cjs.js → dev-e8f4294f.cjs.js} +7 -32
- package/dist/cjs/{diff-28f4f458.cjs.js → diff-7c3a6378.cjs.js} +4 -8
- package/dist/cjs/{docs-58816f75.cjs.js → docs-f72a2ec8.cjs.js} +4 -4
- package/dist/cjs/index-526e4dc9.cjs.js +94 -0
- package/dist/cjs/{index-16b6f41d.cjs.js → index-8b03e1f7.cjs.js} +67 -42
- package/dist/cjs/{index-ebeed7eb.cjs.js → index-c953b562.cjs.js} +2 -2
- package/dist/cjs/index-d7ee78c4.cjs.js +125 -0
- package/dist/cjs/{info-85d98cb4.cjs.js → info-92d051f2.cjs.js} +3 -3
- package/dist/cjs/{install-a23596a5.cjs.js → install-1f10c477.cjs.js} +4 -4
- package/dist/cjs/lint-a49b0261.cjs.js +35 -0
- package/dist/cjs/{lint-40168339.cjs.js → lint-cc10c98e.cjs.js} +3 -3
- package/dist/cjs/{build-0546efb7.cjs.js → oldBuild-e0886590.cjs.js} +9 -5
- package/dist/cjs/{pack-71b12bff.cjs.js → pack-7da7f03b.cjs.js} +2 -2
- package/dist/cjs/packageRole-7bb8a760.cjs.js +54 -0
- package/dist/cjs/packageRoles-f4b169a7.cjs.js +158 -0
- package/dist/cjs/packageScripts-23016b48.cjs.js +61 -0
- package/dist/cjs/{packager-4d2c58d1.cjs.js → packager-3bddd88f.cjs.js} +181 -74
- package/dist/cjs/{packages-ad8ea6d7.cjs.js → packages-08c02af1.cjs.js} +3 -3
- package/dist/cjs/parallel-e73a4058.cjs.js +48 -0
- package/dist/cjs/{paths-5b29b704.cjs.js → paths-f6ca70df.cjs.js} +19 -18
- package/dist/cjs/{print-946963ae.cjs.js → print-43232f19.cjs.js} +4 -4
- package/dist/cjs/{run-c686c70b.cjs.js → run-8da8f918.cjs.js} +2 -2
- package/dist/cjs/{schema-12fa6113.cjs.js → schema-2c7e9598.cjs.js} +4 -4
- package/dist/cjs/{serve-2fbcc44e.cjs.js → serve-01190cc4.cjs.js} +8 -8
- package/dist/cjs/{serve-8da3cb63.cjs.js → serve-9c68f54d.cjs.js} +7 -7
- package/dist/cjs/{server-4ed19c62.cjs.js → server-937c32b4.cjs.js} +2 -2
- package/dist/cjs/{tasks-12cc7c7b.cjs.js → tasks-3a7eba1b.cjs.js} +2 -2
- package/dist/cjs/{testCommand-01ec5173.cjs.js → testCommand-5cdbf69c.cjs.js} +3 -3
- package/dist/cjs/{validate-07fd5d94.cjs.js → validate-697fd284.cjs.js} +4 -4
- package/dist/index.cjs.js +1 -1
- package/package.json +9 -6
- package/dist/cjs/buildWorkspace-e9feb879.cjs.js +0 -35
- package/dist/cjs/index-c4147846.cjs.js +0 -106
- package/dist/cjs/lint-f8292a5c.cjs.js +0 -29
- package/dist/cjs/parallel-7e32a8d0.cjs.js +0 -25
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var fs = require('fs-extra');
|
|
4
|
-
var index = require('./index-
|
|
5
|
-
var
|
|
6
|
-
var paths = require('./paths-5b29b704.cjs.js');
|
|
4
|
+
var index = require('./index-8b03e1f7.cjs.js');
|
|
5
|
+
var backend = require('./backend-fb6d6170.cjs.js');
|
|
7
6
|
require('commander');
|
|
8
7
|
require('chalk');
|
|
9
8
|
require('semver');
|
|
10
9
|
require('@backstage/cli-common');
|
|
11
10
|
require('@backstage/config/package.json');
|
|
12
11
|
require('@backstage/errors');
|
|
12
|
+
require('webpack');
|
|
13
|
+
require('./paths-f6ca70df.cjs.js');
|
|
13
14
|
require('path');
|
|
14
15
|
require('fork-ts-checker-webpack-plugin');
|
|
15
16
|
require('html-webpack-plugin');
|
|
@@ -19,7 +20,7 @@ require('webpack-node-externals');
|
|
|
19
20
|
require('@manypkg/get-packages');
|
|
20
21
|
require('mini-css-extract-plugin');
|
|
21
22
|
require('./svgrTemplate-f19e974c.cjs.js');
|
|
22
|
-
require('./run-
|
|
23
|
+
require('./run-8da8f918.cjs.js');
|
|
23
24
|
require('child_process');
|
|
24
25
|
require('util');
|
|
25
26
|
require('eslint-webpack-plugin');
|
|
@@ -28,36 +29,10 @@ require('lodash/pickBy');
|
|
|
28
29
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
29
30
|
|
|
30
31
|
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
31
|
-
var webpack__default = /*#__PURE__*/_interopDefaultLegacy(webpack);
|
|
32
|
-
|
|
33
|
-
async function serveBackend(options) {
|
|
34
|
-
const paths$1 = paths.resolveBundlingPaths(options);
|
|
35
|
-
const config = await paths.createBackendConfig(paths$1, {
|
|
36
|
-
...options,
|
|
37
|
-
isDev: true
|
|
38
|
-
});
|
|
39
|
-
const compiler = webpack__default["default"](config, (err) => {
|
|
40
|
-
if (err) {
|
|
41
|
-
console.error(err);
|
|
42
|
-
} else
|
|
43
|
-
console.log("Build succeeded");
|
|
44
|
-
});
|
|
45
|
-
const waitForExit = async () => {
|
|
46
|
-
for (const signal of ["SIGINT", "SIGTERM"]) {
|
|
47
|
-
process.on(signal, () => {
|
|
48
|
-
compiler.close(() => console.log("Stopped watcher"));
|
|
49
|
-
process.exit();
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
return new Promise(() => {
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
return waitForExit;
|
|
56
|
-
}
|
|
57
32
|
|
|
58
33
|
var dev = async (cmd) => {
|
|
59
34
|
await fs__default["default"].remove(index.paths.resolveTarget("dist"));
|
|
60
|
-
const waitForExit = await serveBackend({
|
|
35
|
+
const waitForExit = await backend.serveBackend({
|
|
61
36
|
entry: "src/index",
|
|
62
37
|
checksEnabled: cmd.check,
|
|
63
38
|
inspectEnabled: cmd.inspect,
|
|
@@ -67,4 +42,4 @@ var dev = async (cmd) => {
|
|
|
67
42
|
};
|
|
68
43
|
|
|
69
44
|
exports["default"] = dev;
|
|
70
|
-
//# sourceMappingURL=dev-
|
|
45
|
+
//# sourceMappingURL=dev-e8f4294f.cjs.js.map
|
|
@@ -7,7 +7,7 @@ var path = require('path');
|
|
|
7
7
|
var inquirer = require('inquirer');
|
|
8
8
|
var handlebars = require('handlebars');
|
|
9
9
|
var recursive = require('recursive-readdir');
|
|
10
|
-
var index = require('./index-
|
|
10
|
+
var index = require('./index-8b03e1f7.cjs.js');
|
|
11
11
|
require('commander');
|
|
12
12
|
require('semver');
|
|
13
13
|
require('@backstage/cli-common');
|
|
@@ -326,15 +326,11 @@ const fileHandlers = [
|
|
|
326
326
|
handler: handlers.packageJson
|
|
327
327
|
},
|
|
328
328
|
{
|
|
329
|
-
patterns: ["
|
|
330
|
-
handler: handlers.skip
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
patterns: [".eslintrc.js", /^(src|dev)\/[^/]+$/],
|
|
329
|
+
patterns: [".eslintrc.js"],
|
|
334
330
|
handler: handlers.exists
|
|
335
331
|
},
|
|
336
332
|
{
|
|
337
|
-
patterns: ["README.md", "tsconfig.json", /^src\//],
|
|
333
|
+
patterns: ["README.md", "tsconfig.json", /^src\//, /^dev\//],
|
|
338
334
|
handler: handlers.skip
|
|
339
335
|
}
|
|
340
336
|
];
|
|
@@ -381,4 +377,4 @@ async function readPluginData() {
|
|
|
381
377
|
}
|
|
382
378
|
|
|
383
379
|
exports["default"] = diff;
|
|
384
|
-
//# sourceMappingURL=diff-
|
|
380
|
+
//# sourceMappingURL=diff-7c3a6378.cjs.js.map
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var configLoader = require('@backstage/config-loader');
|
|
4
4
|
var openBrowser = require('react-dev-utils/openBrowser');
|
|
5
|
-
var config = require('./config-
|
|
5
|
+
var config = require('./config-f2365900.cjs.js');
|
|
6
6
|
require('@backstage/config');
|
|
7
|
-
require('./index-
|
|
7
|
+
require('./index-8b03e1f7.cjs.js');
|
|
8
8
|
require('commander');
|
|
9
9
|
require('chalk');
|
|
10
10
|
require('fs-extra');
|
|
@@ -13,7 +13,7 @@ require('@backstage/cli-common');
|
|
|
13
13
|
require('@backstage/config/package.json');
|
|
14
14
|
require('@backstage/errors');
|
|
15
15
|
require('@manypkg/get-packages');
|
|
16
|
-
require('./PackageGraph-
|
|
16
|
+
require('./PackageGraph-96b2e6ef.cjs.js');
|
|
17
17
|
|
|
18
18
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
19
|
|
|
@@ -31,4 +31,4 @@ var docs = async (cmd) => {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
exports["default"] = docs;
|
|
34
|
-
//# sourceMappingURL=docs-
|
|
34
|
+
//# sourceMappingURL=docs-f72a2ec8.cjs.js.map
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var packager = require('./packager-3bddd88f.cjs.js');
|
|
4
|
+
var packageRoles = require('./packageRoles-f4b169a7.cjs.js');
|
|
5
|
+
var index = require('./index-8b03e1f7.cjs.js');
|
|
6
|
+
var buildBackend = require('./buildBackend-08cefb3c.cjs.js');
|
|
7
|
+
require('fs-extra');
|
|
8
|
+
require('rollup');
|
|
9
|
+
require('chalk');
|
|
10
|
+
require('path');
|
|
11
|
+
require('rollup-plugin-peer-deps-external');
|
|
12
|
+
require('@rollup/plugin-commonjs');
|
|
13
|
+
require('@rollup/plugin-node-resolve');
|
|
14
|
+
require('rollup-plugin-postcss');
|
|
15
|
+
require('rollup-plugin-esbuild');
|
|
16
|
+
require('@svgr/rollup');
|
|
17
|
+
require('rollup-plugin-dts');
|
|
18
|
+
require('@rollup/plugin-json');
|
|
19
|
+
require('@rollup/plugin-yaml');
|
|
20
|
+
require('rollup-pluginutils');
|
|
21
|
+
require('./svgrTemplate-f19e974c.cjs.js');
|
|
22
|
+
require('worker_threads');
|
|
23
|
+
require('./parallel-e73a4058.cjs.js');
|
|
24
|
+
require('zod');
|
|
25
|
+
require('commander');
|
|
26
|
+
require('semver');
|
|
27
|
+
require('@backstage/cli-common');
|
|
28
|
+
require('@backstage/config/package.json');
|
|
29
|
+
require('@backstage/errors');
|
|
30
|
+
require('webpack');
|
|
31
|
+
require('fork-ts-checker-webpack-plugin');
|
|
32
|
+
require('html-webpack-plugin');
|
|
33
|
+
require('react-dev-utils/ModuleScopePlugin');
|
|
34
|
+
require('run-script-webpack-plugin');
|
|
35
|
+
require('webpack-node-externals');
|
|
36
|
+
require('@manypkg/get-packages');
|
|
37
|
+
require('./paths-f6ca70df.cjs.js');
|
|
38
|
+
require('mini-css-extract-plugin');
|
|
39
|
+
require('./run-8da8f918.cjs.js');
|
|
40
|
+
require('child_process');
|
|
41
|
+
require('util');
|
|
42
|
+
require('eslint-webpack-plugin');
|
|
43
|
+
require('lodash/pickBy');
|
|
44
|
+
require('./bundle-4ce79bce.cjs.js');
|
|
45
|
+
require('yn');
|
|
46
|
+
require('react-dev-utils/FileSizeReporter');
|
|
47
|
+
require('react-dev-utils/formatWebpackMessages');
|
|
48
|
+
require('webpack-dev-server');
|
|
49
|
+
require('react-dev-utils/openBrowser');
|
|
50
|
+
require('./config-f2365900.cjs.js');
|
|
51
|
+
require('@backstage/config-loader');
|
|
52
|
+
require('@backstage/config');
|
|
53
|
+
require('./PackageGraph-96b2e6ef.cjs.js');
|
|
54
|
+
require('os');
|
|
55
|
+
require('tar');
|
|
56
|
+
require('./createDistWorkspace-f4c0276b.cjs.js');
|
|
57
|
+
require('lodash/partition');
|
|
58
|
+
require('npm-packlist');
|
|
59
|
+
|
|
60
|
+
async function command(cmd) {
|
|
61
|
+
const role = await packageRoles.findRoleFromCommand(cmd);
|
|
62
|
+
if (role === "app") {
|
|
63
|
+
return buildBackend.buildApp({
|
|
64
|
+
targetDir: index.paths.resolveTarget("dist"),
|
|
65
|
+
configPaths: cmd.config,
|
|
66
|
+
writeStats: Boolean(cmd.stats)
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
if (role === "backend") {
|
|
70
|
+
return buildBackend.buildBackend({
|
|
71
|
+
targetDir: index.paths.resolveTarget("dist"),
|
|
72
|
+
skipBuildDependencies: Boolean(cmd.skipBuildDependencies)
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
const roleInfo = packageRoles.getRoleInfo(role);
|
|
76
|
+
const outputs = /* @__PURE__ */ new Set();
|
|
77
|
+
if (roleInfo.output.includes("cjs")) {
|
|
78
|
+
outputs.add(packager.Output.cjs);
|
|
79
|
+
}
|
|
80
|
+
if (roleInfo.output.includes("esm")) {
|
|
81
|
+
outputs.add(packager.Output.esm);
|
|
82
|
+
}
|
|
83
|
+
if (roleInfo.output.includes("types")) {
|
|
84
|
+
outputs.add(packager.Output.types);
|
|
85
|
+
}
|
|
86
|
+
return packager.buildPackage({
|
|
87
|
+
outputs,
|
|
88
|
+
minify: Boolean(cmd.minify),
|
|
89
|
+
useApiExtractor: Boolean(cmd.experimentalTypeBuild)
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
exports.command = command;
|
|
94
|
+
//# sourceMappingURL=index-526e4dc9.cjs.js.map
|
|
@@ -46,9 +46,9 @@ class NotFoundError extends CustomError {
|
|
|
46
46
|
|
|
47
47
|
const paths = cliCommon.findPaths(__dirname);
|
|
48
48
|
|
|
49
|
-
var version$9 = "0.10.
|
|
49
|
+
var version$9 = "0.10.7-next.0";
|
|
50
50
|
|
|
51
|
-
var version$8 = "0.13.
|
|
51
|
+
var version$8 = "0.13.2-next.0";
|
|
52
52
|
var dependencies = {
|
|
53
53
|
"@backstage/cli-common": "^0.1.6",
|
|
54
54
|
"@backstage/config": "^0.1.13",
|
|
@@ -108,6 +108,7 @@ var dependencies = {
|
|
|
108
108
|
lodash: "^4.17.21",
|
|
109
109
|
minimatch: "3.0.4",
|
|
110
110
|
"mini-css-extract-plugin": "^2.4.2",
|
|
111
|
+
"npm-packlist": "^3.0.0",
|
|
111
112
|
"node-libs-browser": "^2.2.1",
|
|
112
113
|
ora: "^5.3.0",
|
|
113
114
|
postcss: "^8.1.0",
|
|
@@ -134,15 +135,16 @@ var dependencies = {
|
|
|
134
135
|
"webpack-node-externals": "^3.0.0",
|
|
135
136
|
yaml: "^1.10.0",
|
|
136
137
|
"yml-loader": "^2.1.0",
|
|
137
|
-
yn: "^4.0.0"
|
|
138
|
+
yn: "^4.0.0",
|
|
139
|
+
zod: "^3.11.6"
|
|
138
140
|
};
|
|
139
141
|
var devDependencies = {
|
|
140
|
-
"@backstage/backend-common": "^0.10.
|
|
142
|
+
"@backstage/backend-common": "^0.10.7-next.0",
|
|
141
143
|
"@backstage/config": "^0.1.13",
|
|
142
|
-
"@backstage/core-components": "^0.8.
|
|
144
|
+
"@backstage/core-components": "^0.8.8-next.0",
|
|
143
145
|
"@backstage/core-plugin-api": "^0.6.0",
|
|
144
146
|
"@backstage/core-app-api": "^0.5.2",
|
|
145
|
-
"@backstage/dev-utils": "^0.2.
|
|
147
|
+
"@backstage/dev-utils": "^0.2.21-next.0",
|
|
146
148
|
"@backstage/test-utils": "^0.2.4",
|
|
147
149
|
"@backstage/theme": "^0.2.14",
|
|
148
150
|
"@types/diff": "^5.0.0",
|
|
@@ -153,6 +155,7 @@ var devDependencies = {
|
|
|
153
155
|
"@types/minimatch": "^3.0.5",
|
|
154
156
|
"@types/mock-fs": "^4.13.0",
|
|
155
157
|
"@types/node": "^14.14.32",
|
|
158
|
+
"@types/npm-packlist": "^1.1.2",
|
|
156
159
|
"@types/recursive-readdir": "^2.2.0",
|
|
157
160
|
"@types/rollup-plugin-peer-deps-external": "^2.2.0",
|
|
158
161
|
"@types/rollup-plugin-postcss": "^2.0.0",
|
|
@@ -167,17 +170,17 @@ var devDependencies = {
|
|
|
167
170
|
|
|
168
171
|
var version$7 = "0.5.2";
|
|
169
172
|
|
|
170
|
-
var version$6 = "0.8.
|
|
173
|
+
var version$6 = "0.8.8-next.0";
|
|
171
174
|
|
|
172
175
|
var version$5 = "0.6.0";
|
|
173
176
|
|
|
174
|
-
var version$4 = "0.2.
|
|
177
|
+
var version$4 = "0.2.21-next.0";
|
|
175
178
|
|
|
176
179
|
var version$3 = "0.2.4";
|
|
177
180
|
|
|
178
181
|
var version$2 = "0.2.14";
|
|
179
182
|
|
|
180
|
-
var version$1 = "0.15.
|
|
183
|
+
var version$1 = "0.15.24-next.0";
|
|
181
184
|
|
|
182
185
|
const packageVersions = {
|
|
183
186
|
"@backstage/backend-common": version$9,
|
|
@@ -224,39 +227,61 @@ function createPackageVersionProvider(lockfile) {
|
|
|
224
227
|
};
|
|
225
228
|
}
|
|
226
229
|
|
|
230
|
+
const configOption = [
|
|
231
|
+
"--config <path>",
|
|
232
|
+
"Config files to load instead of app-config.yaml",
|
|
233
|
+
(opt, opts) => [...opts, opt],
|
|
234
|
+
Array()
|
|
235
|
+
];
|
|
236
|
+
function registerRepoCommand(program) {
|
|
237
|
+
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-9db9aaaf.cjs.js'); }).then((m) => m.command)));
|
|
239
|
+
}
|
|
240
|
+
function registerScriptCommand(program) {
|
|
241
|
+
const command = program.command("script [command]", { hidden: true }).description("Lifecycle scripts for Backstage packages [EXPERIMENTAL]");
|
|
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-d7ee78c4.cjs.js'); }).then((m) => m.command)));
|
|
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-526e4dc9.cjs.js'); }).then((m) => m.command)));
|
|
244
|
+
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-a49b0261.cjs.js'); }).then((m) => m.default)));
|
|
245
|
+
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-5cdbf69c.cjs.js'); }).then((m) => m.default)));
|
|
246
|
+
command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-c50d4782.cjs.js'); }).then((m) => m.default)));
|
|
247
|
+
command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-7da7f03b.cjs.js'); }).then((m) => m.pre)));
|
|
248
|
+
command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-7da7f03b.cjs.js'); }).then((m) => m.post)));
|
|
249
|
+
}
|
|
250
|
+
function registerMigrateCommand(program) {
|
|
251
|
+
const command = program.command("migrate [command]", { hidden: true }).description("Migration utilities [EXPERIMENTAL]");
|
|
252
|
+
command.command("package-role").description(`Add package role field to packages that don't have it`).action(lazy(() => Promise.resolve().then(function () { return require('./packageRole-7bb8a760.cjs.js'); }).then((m) => m.default)));
|
|
253
|
+
command.command("package-scripts").description("Set package scripts according to each package role").action(lazy(() => Promise.resolve().then(function () { return require('./packageScripts-23016b48.cjs.js'); }).then((m) => m.command)));
|
|
254
|
+
}
|
|
227
255
|
function registerCommands(program) {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
];
|
|
234
|
-
program.command("
|
|
235
|
-
program.command("
|
|
236
|
-
program.command("
|
|
237
|
-
program.command("
|
|
238
|
-
program.command("
|
|
239
|
-
program.command("
|
|
240
|
-
program.command("
|
|
241
|
-
program.command("
|
|
242
|
-
program.command("
|
|
243
|
-
program.command("
|
|
244
|
-
program.command("
|
|
245
|
-
program
|
|
246
|
-
program
|
|
247
|
-
program
|
|
248
|
-
program.command("
|
|
249
|
-
program.command("
|
|
250
|
-
program.command("
|
|
251
|
-
program.command("
|
|
252
|
-
program.command("
|
|
253
|
-
program.command("
|
|
254
|
-
program.command("
|
|
255
|
-
program.command("
|
|
256
|
-
program.command("
|
|
257
|
-
program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-ebeed7eb.cjs.js'); }).then((m) => m.default)));
|
|
258
|
-
program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-85d98cb4.cjs.js'); }).then((m) => m.default)));
|
|
259
|
-
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-a23596a5.cjs.js'); }).then((m) => m.default)));
|
|
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-b3c69eff.cjs.js'); }).then((m) => m.default)));
|
|
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-01190cc4.cjs.js'); }).then((m) => m.default)));
|
|
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-93f627fc.cjs.js'); }).then((m) => m.default)));
|
|
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-b3d9e5ab.cjs.js'); }).then((m) => m.default)));
|
|
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-e8f4294f.cjs.js'); }).then((m) => m.default)));
|
|
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-7ad905e4.cjs.js'); }).then((m) => m.default)));
|
|
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-ba8c6df0.cjs.js'); }).then((m) => m.default)));
|
|
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-8fd28a6d.cjs.js'); }).then((m) => m.default)));
|
|
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-9c68f54d.cjs.js'); }).then((m) => m.default)));
|
|
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-7c3a6378.cjs.js'); }).then((m) => m.default)));
|
|
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-e0886590.cjs.js'); }).then((m) => m.default)));
|
|
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-a49b0261.cjs.js'); }).then((m) => m.default)));
|
|
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-5cdbf69c.cjs.js'); }).then((m) => m.default)));
|
|
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-f72a2ec8.cjs.js'); }).then((m) => m.default)));
|
|
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-43232f19.cjs.js'); }).then((m) => m.default)));
|
|
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-697fd284.cjs.js'); }).then((m) => m.default)));
|
|
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-2c7e9598.cjs.js'); }).then((m) => m.default)));
|
|
273
|
+
registerRepoCommand(program);
|
|
274
|
+
registerScriptCommand(program);
|
|
275
|
+
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-a85eb7bb.cjs.js'); }).then((m) => m.default)));
|
|
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-cc10c98e.cjs.js'); }).then((m) => m.default)));
|
|
278
|
+
program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-7da7f03b.cjs.js'); }).then((m) => m.pre)));
|
|
279
|
+
program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-7da7f03b.cjs.js'); }).then((m) => m.post)));
|
|
280
|
+
program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-c50d4782.cjs.js'); }).then((m) => m.default)));
|
|
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-1323bee2.cjs.js'); }).then((m) => m.default)));
|
|
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-c953b562.cjs.js'); }).then((m) => m.default)));
|
|
283
|
+
program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-92d051f2.cjs.js'); }).then((m) => m.default)));
|
|
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-1f10c477.cjs.js'); }).then((m) => m.default)));
|
|
260
285
|
}
|
|
261
286
|
function lazy(getActionFunc) {
|
|
262
287
|
return async (...args) => {
|
|
@@ -300,4 +325,4 @@ exports.devDependencies = devDependencies;
|
|
|
300
325
|
exports.paths = paths;
|
|
301
326
|
exports.version = version;
|
|
302
327
|
exports.version$1 = version$8;
|
|
303
|
-
//# sourceMappingURL=index-
|
|
328
|
+
//# sourceMappingURL=index-8b03e1f7.cjs.js.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var fs = require('fs-extra');
|
|
4
4
|
var chalk = require('chalk');
|
|
5
5
|
var yaml = require('yaml');
|
|
6
|
-
var index$1 = require('./index-
|
|
6
|
+
var index$1 = require('./index-8b03e1f7.cjs.js');
|
|
7
7
|
var crypto = require('crypto');
|
|
8
8
|
var openBrowser = require('react-dev-utils/openBrowser');
|
|
9
9
|
var request = require('@octokit/request');
|
|
@@ -128,4 +128,4 @@ ${yaml.stringify(config)}`;
|
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
exports["default"] = index;
|
|
131
|
-
//# sourceMappingURL=index-
|
|
131
|
+
//# sourceMappingURL=index-c953b562.cjs.js.map
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var fs = require('fs-extra');
|
|
4
|
+
var index = require('./index-8b03e1f7.cjs.js');
|
|
5
|
+
var backend = require('./backend-fb6d6170.cjs.js');
|
|
6
|
+
require('yn');
|
|
7
|
+
require('path');
|
|
8
|
+
require('webpack');
|
|
9
|
+
require('react-dev-utils/FileSizeReporter');
|
|
10
|
+
require('react-dev-utils/formatWebpackMessages');
|
|
11
|
+
var chalk = require('chalk');
|
|
12
|
+
require('fork-ts-checker-webpack-plugin');
|
|
13
|
+
require('html-webpack-plugin');
|
|
14
|
+
require('react-dev-utils/ModuleScopePlugin');
|
|
15
|
+
require('run-script-webpack-plugin');
|
|
16
|
+
require('webpack-node-externals');
|
|
17
|
+
require('@backstage/cli-common');
|
|
18
|
+
require('@manypkg/get-packages');
|
|
19
|
+
require('./paths-f6ca70df.cjs.js');
|
|
20
|
+
require('mini-css-extract-plugin');
|
|
21
|
+
require('./run-8da8f918.cjs.js');
|
|
22
|
+
require('eslint-webpack-plugin');
|
|
23
|
+
require('lodash/pickBy');
|
|
24
|
+
require('webpack-dev-server');
|
|
25
|
+
require('react-dev-utils/openBrowser');
|
|
26
|
+
var uniq = require('lodash/uniq');
|
|
27
|
+
var server = require('./server-937c32b4.cjs.js');
|
|
28
|
+
var config = require('./config-f2365900.cjs.js');
|
|
29
|
+
var Lockfile = require('./Lockfile-35661afa.cjs.js');
|
|
30
|
+
require('minimatch');
|
|
31
|
+
var lint = require('./lint-cc10c98e.cjs.js');
|
|
32
|
+
var packageRoles = require('./packageRoles-f4b169a7.cjs.js');
|
|
33
|
+
require('commander');
|
|
34
|
+
require('semver');
|
|
35
|
+
require('@backstage/config/package.json');
|
|
36
|
+
require('@backstage/errors');
|
|
37
|
+
require('./svgrTemplate-f19e974c.cjs.js');
|
|
38
|
+
require('child_process');
|
|
39
|
+
require('util');
|
|
40
|
+
require('@backstage/config-loader');
|
|
41
|
+
require('@backstage/config');
|
|
42
|
+
require('./PackageGraph-96b2e6ef.cjs.js');
|
|
43
|
+
require('@yarnpkg/lockfile');
|
|
44
|
+
require('lodash/partition');
|
|
45
|
+
require('zod');
|
|
46
|
+
|
|
47
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
48
|
+
|
|
49
|
+
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
50
|
+
var chalk__default = /*#__PURE__*/_interopDefaultLegacy(chalk);
|
|
51
|
+
var uniq__default = /*#__PURE__*/_interopDefaultLegacy(uniq);
|
|
52
|
+
|
|
53
|
+
async function startBackend(options) {
|
|
54
|
+
await fs__default["default"].remove(index.paths.resolveTarget("dist"));
|
|
55
|
+
const waitForExit = await backend.serveBackend({
|
|
56
|
+
entry: "src/index",
|
|
57
|
+
checksEnabled: options.checksEnabled,
|
|
58
|
+
inspectEnabled: options.inspectEnabled,
|
|
59
|
+
inspectBrkEnabled: options.inspectBrkEnabled
|
|
60
|
+
});
|
|
61
|
+
await waitForExit();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async function startFrontend(options) {
|
|
65
|
+
if (options.verifyVersions) {
|
|
66
|
+
const lockfile = await Lockfile.Lockfile.load(index.paths.resolveTargetRoot("yarn.lock"));
|
|
67
|
+
const result = lockfile.analyze({
|
|
68
|
+
filter: lint.includedFilter
|
|
69
|
+
});
|
|
70
|
+
const problemPackages = [...result.newVersions, ...result.newRanges].map(({ name: name2 }) => name2);
|
|
71
|
+
if (problemPackages.length > 1) {
|
|
72
|
+
console.log(chalk__default["default"].yellow(`\u26A0\uFE0F Some of the following packages may be outdated or have duplicate installations:
|
|
73
|
+
|
|
74
|
+
${uniq__default["default"](problemPackages).join(", ")}
|
|
75
|
+
`));
|
|
76
|
+
console.log(chalk__default["default"].yellow(`\u26A0\uFE0F This can be resolved using the following command:
|
|
77
|
+
|
|
78
|
+
yarn backstage-cli versions:check --fix
|
|
79
|
+
`));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const { name } = await fs__default["default"].readJson(index.paths.resolveTarget("package.json"));
|
|
83
|
+
const waitForExit = await server.serveBundle({
|
|
84
|
+
entry: options.entry,
|
|
85
|
+
checksEnabled: options.checksEnabled,
|
|
86
|
+
...await config.loadCliConfig({
|
|
87
|
+
args: options.configPaths,
|
|
88
|
+
fromPackage: name,
|
|
89
|
+
withFilteredKeys: true
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
await waitForExit();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
async function command(cmd) {
|
|
96
|
+
const role = await packageRoles.findRoleFromCommand(cmd);
|
|
97
|
+
const options = {
|
|
98
|
+
configPaths: cmd.config,
|
|
99
|
+
checksEnabled: Boolean(cmd.check),
|
|
100
|
+
inspectEnabled: Boolean(cmd.inspect),
|
|
101
|
+
inspectBrkEnabled: Boolean(cmd.inspectBrk)
|
|
102
|
+
};
|
|
103
|
+
switch (role) {
|
|
104
|
+
case "backend":
|
|
105
|
+
case "plugin-backend":
|
|
106
|
+
case "plugin-backend-module":
|
|
107
|
+
case "node-library":
|
|
108
|
+
return startBackend(options);
|
|
109
|
+
case "app":
|
|
110
|
+
return startFrontend({
|
|
111
|
+
...options,
|
|
112
|
+
entry: "src/index",
|
|
113
|
+
verifyVersions: true
|
|
114
|
+
});
|
|
115
|
+
case "web-library":
|
|
116
|
+
case "plugin-frontend":
|
|
117
|
+
case "plugin-frontend-module":
|
|
118
|
+
return startFrontend({ entry: "dev/index", ...options });
|
|
119
|
+
default:
|
|
120
|
+
throw new Error(`Start command is not supported for package role '${role}'`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
exports.command = command;
|
|
125
|
+
//# sourceMappingURL=index-d7ee78c4.cjs.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-8b03e1f7.cjs.js');
|
|
4
4
|
var os = require('os');
|
|
5
|
-
var run = require('./run-
|
|
5
|
+
var run = require('./run-8da8f918.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-92d051f2.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-08c02af1.cjs.js');
|
|
7
|
+
var index = require('./index-8b03e1f7.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-8da8f918.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-1f10c477.cjs.js.map
|