@backstage/cli 0.10.3 → 0.12.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 +120 -0
- package/config/eslint.js +4 -0
- package/dist/cjs/PackageGraph-7a0d3a83.cjs.js +73 -0
- package/dist/cjs/{build-b73c146e.cjs.js → build-41b160e1.cjs.js} +5 -4
- package/dist/cjs/{build-aa750983.cjs.js → build-5e469530.cjs.js} +5 -4
- package/dist/cjs/{build-e5c1f9cd.cjs.js → build-6a564e18.cjs.js} +8 -4
- package/dist/cjs/{build-be0f943d.cjs.js → build-e1cfa92a.cjs.js} +9 -8
- package/dist/cjs/{buildWorkspace-8c1d5134.cjs.js → buildWorkspace-b198351d.cjs.js} +6 -4
- package/dist/cjs/{bump-d6b32625.cjs.js → bump-0d4c7e07.cjs.js} +21 -9
- package/dist/cjs/{bundle-a35469cc.cjs.js → bundle-2cb505f3.cjs.js} +8 -6
- package/dist/cjs/{clean-2294315a.cjs.js → clean-265d3ed5.cjs.js} +2 -2
- package/dist/cjs/{config-956d86a6.cjs.js → config-a790fbee.cjs.js} +23 -28
- package/dist/cjs/{create-cf52e54d.cjs.js → create-8dc87021.cjs.js} +6 -4
- package/dist/cjs/{createPlugin-b87a78f0.cjs.js → createPlugin-f480902b.cjs.js} +6 -4
- package/dist/cjs/{dev-0a2ead14.cjs.js → dev-558ef0c6.cjs.js} +5 -6
- package/dist/cjs/{diff-4789ad9c.cjs.js → diff-7382e071.cjs.js} +2 -2
- package/dist/cjs/{docs-12b2616e.cjs.js → docs-a44be9cd.cjs.js} +5 -3
- package/dist/cjs/{index-a18da53d.cjs.js → index-1f61de85.cjs.js} +21 -38
- package/dist/cjs/{index-451d4133.cjs.js → index-63774350.cjs.js} +2 -2
- package/dist/cjs/{index-dc8e5d2a.cjs.js → index-92454bcd.cjs.js} +62 -61
- package/dist/cjs/{info-c8361946.cjs.js → info-643074cc.cjs.js} +5 -3
- package/dist/cjs/{install-68bbffa5.cjs.js → install-c8b107f7.cjs.js} +6 -4
- package/dist/cjs/{lint-a525caa3.cjs.js → lint-25eb1889.cjs.js} +5 -3
- package/dist/cjs/{lint-4ec38c59.cjs.js → lint-5aa2e47f.cjs.js} +3 -3
- package/dist/cjs/pack-a5e15cdb.cjs.js +69 -0
- package/dist/cjs/{packager-47e5dbe2.cjs.js → packager-052876f4.cjs.js} +101 -8
- package/dist/cjs/{packages-5bd09b6a.cjs.js → packages-435d71fd.cjs.js} +15 -12
- package/dist/cjs/{parallel-a4714c72.cjs.js → parallel-7e32a8d0.cjs.js} +1 -5
- package/dist/cjs/{paths-136b374a.cjs.js → paths-21c29d56.cjs.js} +20 -28
- package/dist/cjs/{print-8d26381a.cjs.js → print-207cc148.cjs.js} +5 -3
- package/dist/cjs/{removePlugin-272a3d37.cjs.js → removePlugin-350b9293.cjs.js} +3 -3
- package/dist/cjs/{run-330d1527.cjs.js → run-ad69ea39.cjs.js} +2 -2
- package/dist/cjs/{schema-ea8ebcbf.cjs.js → schema-aa853b70.cjs.js} +5 -3
- package/dist/cjs/{serve-9b01661e.cjs.js → serve-90512169.cjs.js} +11 -10
- package/dist/cjs/{serve-50b65188.cjs.js → serve-d962519a.cjs.js} +9 -9
- package/dist/cjs/{server-15a54ef2.cjs.js → server-acd52f96.cjs.js} +2 -2
- package/dist/cjs/{tasks-6e261e37.cjs.js → tasks-7bce14e6.cjs.js} +2 -2
- package/dist/cjs/{testCommand-a9f0692f.cjs.js → testCommand-0e57c1d2.cjs.js} +3 -3
- package/dist/cjs/{validate-0a0893b6.cjs.js → validate-878f8022.cjs.js} +7 -4
- package/dist/index.cjs.js +1 -1
- package/package.json +36 -27
- package/templates/default-backend-plugin/src/service/standaloneServer.ts.hbs +1 -1
- package/templates/default-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs +1 -1
- package/templates/serve_index.html +1 -1
- package/dist/cjs/pack-5af390ec.cjs.js +0 -42
|
@@ -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-a790fbee.cjs.js');
|
|
6
6
|
require('@backstage/config');
|
|
7
|
-
require('./index-
|
|
7
|
+
require('./index-92454bcd.cjs.js');
|
|
8
8
|
require('commander');
|
|
9
9
|
require('chalk');
|
|
10
10
|
require('fs-extra');
|
|
@@ -12,6 +12,8 @@ require('semver');
|
|
|
12
12
|
require('@backstage/cli-common');
|
|
13
13
|
require('@backstage/config/package.json');
|
|
14
14
|
require('@backstage/errors');
|
|
15
|
+
require('@manypkg/get-packages');
|
|
16
|
+
require('./PackageGraph-7a0d3a83.cjs.js');
|
|
15
17
|
|
|
16
18
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
19
|
|
|
@@ -29,4 +31,4 @@ var docs = async (cmd) => {
|
|
|
29
31
|
};
|
|
30
32
|
|
|
31
33
|
exports["default"] = docs;
|
|
32
|
-
//# sourceMappingURL=docs-
|
|
34
|
+
//# sourceMappingURL=docs-a44be9cd.cjs.js.map
|
|
@@ -4,8 +4,10 @@ var fs = require('fs-extra');
|
|
|
4
4
|
var path = require('path');
|
|
5
5
|
var os = require('os');
|
|
6
6
|
var tar = require('tar');
|
|
7
|
-
var index = require('./index-
|
|
8
|
-
var run = require('./run-
|
|
7
|
+
var index = require('./index-92454bcd.cjs.js');
|
|
8
|
+
var run = require('./run-ad69ea39.cjs.js');
|
|
9
|
+
var getPackages = require('@manypkg/get-packages');
|
|
10
|
+
var PackageGraph = require('./PackageGraph-7a0d3a83.cjs.js');
|
|
9
11
|
|
|
10
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
13
|
|
|
@@ -19,7 +21,15 @@ const UNSAFE_PACKAGES = [
|
|
|
19
21
|
async function createDistWorkspace(packageNames, options = {}) {
|
|
20
22
|
var _a, _b, _c;
|
|
21
23
|
const targetDir = (_a = options.targetDir) != null ? _a : await fs__default["default"].mkdtemp(path.resolve(os.tmpdir(), "dist-workspace"));
|
|
22
|
-
const
|
|
24
|
+
const { packages } = await getPackages.getPackages(index.paths.targetDir);
|
|
25
|
+
const packageGraph = PackageGraph.PackageGraph.fromPackages(packages);
|
|
26
|
+
const targetNames = packageGraph.collectPackageNames(packageNames, (node) => {
|
|
27
|
+
if (node.packageJson.bundled) {
|
|
28
|
+
return void 0;
|
|
29
|
+
}
|
|
30
|
+
return node.publishedLocalDependencies.keys();
|
|
31
|
+
});
|
|
32
|
+
const targets = Array.from(targetNames).map((name) => packageGraph.get(name));
|
|
23
33
|
if (options.buildDependencies) {
|
|
24
34
|
const exclude = (_b = options.buildExcludes) != null ? _b : [];
|
|
25
35
|
const toBuild = targets.filter((target) => !exclude.includes(target.name));
|
|
@@ -40,7 +50,7 @@ async function createDistWorkspace(packageNames, options = {}) {
|
|
|
40
50
|
}
|
|
41
51
|
if (options.skeleton) {
|
|
42
52
|
const skeletonFiles = targets.map((target) => {
|
|
43
|
-
const dir = path.relative(index.paths.targetRoot, target.
|
|
53
|
+
const dir = path.relative(index.paths.targetRoot, target.dir);
|
|
44
54
|
return path.join(dir, "package.json");
|
|
45
55
|
});
|
|
46
56
|
await tar__default["default"].create({
|
|
@@ -55,15 +65,16 @@ async function createDistWorkspace(packageNames, options = {}) {
|
|
|
55
65
|
}
|
|
56
66
|
async function moveToDistWorkspace(workspaceDir, localPackages) {
|
|
57
67
|
async function pack(target, archive) {
|
|
68
|
+
var _a, _b;
|
|
58
69
|
console.log(`Repacking ${target.name} into dist workspace`);
|
|
59
70
|
const archivePath = path.resolve(workspaceDir, archive);
|
|
60
71
|
await run.run("yarn", ["pack", "--filename", archivePath], {
|
|
61
|
-
cwd: target.
|
|
72
|
+
cwd: target.dir
|
|
62
73
|
});
|
|
63
|
-
if (target.scripts.postpack) {
|
|
64
|
-
await run.run("yarn", ["postpack"], { cwd: target.
|
|
74
|
+
if ((_b = (_a = target.packageJson) == null ? void 0 : _a.scripts) == null ? void 0 : _b.postpack) {
|
|
75
|
+
await run.run("yarn", ["postpack"], { cwd: target.dir });
|
|
65
76
|
}
|
|
66
|
-
const outputDir = path.relative(index.paths.targetRoot, target.
|
|
77
|
+
const outputDir = path.relative(index.paths.targetRoot, target.dir);
|
|
67
78
|
const absoluteOutputPath = path.resolve(workspaceDir, outputDir);
|
|
68
79
|
await fs__default["default"].ensureDir(absoluteOutputPath);
|
|
69
80
|
await tar__default["default"].extract({
|
|
@@ -72,7 +83,7 @@ async function moveToDistWorkspace(workspaceDir, localPackages) {
|
|
|
72
83
|
strip: 1
|
|
73
84
|
});
|
|
74
85
|
await fs__default["default"].remove(archivePath);
|
|
75
|
-
if (target.
|
|
86
|
+
if (target.packageJson.bundled) {
|
|
76
87
|
const pkgJson = await fs__default["default"].readJson(path.resolve(absoluteOutputPath, "package.json"));
|
|
77
88
|
delete pkgJson.dependencies;
|
|
78
89
|
delete pkgJson.devDependencies;
|
|
@@ -90,34 +101,6 @@ async function moveToDistWorkspace(workspaceDir, localPackages) {
|
|
|
90
101
|
}
|
|
91
102
|
await Promise.all(safePackages.map(async (target, index) => pack(target, `temp-package-${index}.tgz`)));
|
|
92
103
|
}
|
|
93
|
-
async function findTargetPackages(pkgNames) {
|
|
94
|
-
var _a;
|
|
95
|
-
const { Project } = require("@lerna/project");
|
|
96
|
-
const { PackageGraph } = require("@lerna/package-graph");
|
|
97
|
-
const project = new Project(index.paths.targetDir);
|
|
98
|
-
const packages = await project.getPackages();
|
|
99
|
-
const graph = new PackageGraph(packages);
|
|
100
|
-
const targets = /* @__PURE__ */ new Map();
|
|
101
|
-
const searchNames = pkgNames.slice();
|
|
102
|
-
while (searchNames.length) {
|
|
103
|
-
const name = searchNames.pop();
|
|
104
|
-
if (targets.has(name)) {
|
|
105
|
-
continue;
|
|
106
|
-
}
|
|
107
|
-
const node = graph.get(name);
|
|
108
|
-
if (!node) {
|
|
109
|
-
throw new Error(`Package '${name}' not found`);
|
|
110
|
-
}
|
|
111
|
-
if (!node.pkg.get("bundled")) {
|
|
112
|
-
const pkgDeps = Object.keys((_a = node.pkg.dependencies) != null ? _a : {});
|
|
113
|
-
const localDeps = Array.from(node.localDependencies.keys());
|
|
114
|
-
const filteredDeps = localDeps.filter((dep) => pkgDeps.includes(dep));
|
|
115
|
-
searchNames.push(...filteredDeps);
|
|
116
|
-
}
|
|
117
|
-
targets.set(name, node.pkg);
|
|
118
|
-
}
|
|
119
|
-
return Array.from(targets.values());
|
|
120
|
-
}
|
|
121
104
|
|
|
122
105
|
exports.createDistWorkspace = createDistWorkspace;
|
|
123
|
-
//# sourceMappingURL=index-
|
|
106
|
+
//# sourceMappingURL=index-1f61de85.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-92454bcd.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-63774350.cjs.js.map
|
|
@@ -46,18 +46,17 @@ class NotFoundError extends CustomError {
|
|
|
46
46
|
|
|
47
47
|
const paths = cliCommon.findPaths(__dirname);
|
|
48
48
|
|
|
49
|
-
var version$9 = "0.10.0";
|
|
49
|
+
var version$9 = "0.10.4-next.0";
|
|
50
50
|
|
|
51
|
-
var version$8 = "0.
|
|
51
|
+
var version$8 = "0.12.0-next.0";
|
|
52
52
|
var dependencies = {
|
|
53
53
|
"@backstage/cli-common": "^0.1.6",
|
|
54
|
-
"@backstage/config": "^0.1.
|
|
55
|
-
"@backstage/config-loader": "^0.9.0",
|
|
56
|
-
"@backstage/errors": "^0.
|
|
54
|
+
"@backstage/config": "^0.1.13-next.0",
|
|
55
|
+
"@backstage/config-loader": "^0.9.3-next.0",
|
|
56
|
+
"@backstage/errors": "^0.2.0",
|
|
57
57
|
"@backstage/types": "^0.1.1",
|
|
58
58
|
"@hot-loader/react-dom": "^16.13.0",
|
|
59
|
-
"@
|
|
60
|
-
"@lerna/project": "^4.0.0",
|
|
59
|
+
"@manypkg/get-packages": "^1.1.3",
|
|
61
60
|
"@octokit/request": "^5.4.12",
|
|
62
61
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
63
62
|
"@rollup/plugin-json": "^4.1.0",
|
|
@@ -68,31 +67,32 @@ var dependencies = {
|
|
|
68
67
|
"@spotify/eslint-config-typescript": "^12.0.0",
|
|
69
68
|
"@sucrase/jest-plugin": "^2.1.1",
|
|
70
69
|
"@sucrase/webpack-loader": "^2.0.0",
|
|
71
|
-
"@svgr/plugin-jsx": "
|
|
72
|
-
"@svgr/plugin-svgo": "
|
|
70
|
+
"@svgr/plugin-jsx": "6.2.x",
|
|
71
|
+
"@svgr/plugin-svgo": "6.2.x",
|
|
73
72
|
"@svgr/rollup": "5.5.x",
|
|
74
73
|
"@svgr/webpack": "5.5.x",
|
|
75
74
|
"@types/webpack-env": "^1.15.2",
|
|
76
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
77
|
-
"@typescript-eslint/parser": "^
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "^5.9.0",
|
|
76
|
+
"@typescript-eslint/parser": "^5.9.0",
|
|
78
77
|
"@yarnpkg/lockfile": "^1.1.0",
|
|
79
78
|
bfj: "^7.0.2",
|
|
80
79
|
buffer: "^6.0.3",
|
|
81
80
|
chalk: "^4.0.0",
|
|
82
81
|
chokidar: "^3.3.1",
|
|
83
82
|
commander: "^6.1.0",
|
|
84
|
-
"css-loader": "^5.
|
|
83
|
+
"css-loader": "^6.5.1",
|
|
85
84
|
diff: "^5.0.0",
|
|
86
|
-
esbuild: "^0.14.
|
|
87
|
-
|
|
85
|
+
esbuild: "^0.14.10",
|
|
86
|
+
"esbuild-loader": "^2.18.0",
|
|
87
|
+
eslint: "^8.6.0",
|
|
88
88
|
"eslint-config-prettier": "^8.3.0",
|
|
89
89
|
"eslint-formatter-friendly": "^7.0.0",
|
|
90
|
-
"eslint-plugin-import": "^2.
|
|
91
|
-
"eslint-plugin-jest": "^
|
|
92
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
90
|
+
"eslint-plugin-import": "^2.25.4",
|
|
91
|
+
"eslint-plugin-jest": "^25.3.4",
|
|
92
|
+
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
93
93
|
"eslint-plugin-monorepo": "^0.3.2",
|
|
94
|
-
"eslint-plugin-react": "^7.
|
|
95
|
-
"eslint-plugin-react-hooks": "^4.
|
|
94
|
+
"eslint-plugin-react": "^7.28.0",
|
|
95
|
+
"eslint-plugin-react-hooks": "^4.3.0",
|
|
96
96
|
express: "^4.17.1",
|
|
97
97
|
"fork-ts-checker-webpack-plugin": "^4.0.5",
|
|
98
98
|
"fs-extra": "9.1.0",
|
|
@@ -105,6 +105,7 @@ var dependencies = {
|
|
|
105
105
|
"json-schema": "^0.4.0",
|
|
106
106
|
"jest-transform-yaml": "^0.1.1",
|
|
107
107
|
lodash: "^4.17.21",
|
|
108
|
+
minimatch: "3.0.4",
|
|
108
109
|
"mini-css-extract-plugin": "^2.4.2",
|
|
109
110
|
"node-libs-browser": "^2.2.1",
|
|
110
111
|
ora: "^5.3.0",
|
|
@@ -126,7 +127,6 @@ var dependencies = {
|
|
|
126
127
|
sucrase: "^3.20.2",
|
|
127
128
|
tar: "^6.1.2",
|
|
128
129
|
"terser-webpack-plugin": "^5.1.3",
|
|
129
|
-
typescript: "^4.0.3",
|
|
130
130
|
util: "^0.12.3",
|
|
131
131
|
webpack: "^5.48.0",
|
|
132
132
|
"webpack-dev-server": "4.3.1",
|
|
@@ -136,19 +136,20 @@ var dependencies = {
|
|
|
136
136
|
yn: "^4.0.0"
|
|
137
137
|
};
|
|
138
138
|
var devDependencies = {
|
|
139
|
-
"@backstage/backend-common": "^0.10.0",
|
|
140
|
-
"@backstage/config": "^0.1.
|
|
141
|
-
"@backstage/core-components": "^0.8.
|
|
142
|
-
"@backstage/core-plugin-api": "^0.
|
|
143
|
-
"@backstage/core-app-api": "^0.
|
|
144
|
-
"@backstage/dev-utils": "^0.2.
|
|
145
|
-
"@backstage/test-utils": "^0.2.0",
|
|
139
|
+
"@backstage/backend-common": "^0.10.4-next.0",
|
|
140
|
+
"@backstage/config": "^0.1.13-next.0",
|
|
141
|
+
"@backstage/core-components": "^0.8.5-next.0",
|
|
142
|
+
"@backstage/core-plugin-api": "^0.6.0-next.0",
|
|
143
|
+
"@backstage/core-app-api": "^0.5.0-next.0",
|
|
144
|
+
"@backstage/dev-utils": "^0.2.18-next.0",
|
|
145
|
+
"@backstage/test-utils": "^0.2.3-next.0",
|
|
146
146
|
"@backstage/theme": "^0.2.14",
|
|
147
147
|
"@types/diff": "^5.0.0",
|
|
148
148
|
"@types/express": "^4.17.6",
|
|
149
149
|
"@types/fs-extra": "^9.0.1",
|
|
150
150
|
"@types/http-proxy": "^1.17.4",
|
|
151
151
|
"@types/inquirer": "^8.1.3",
|
|
152
|
+
"@types/minimatch": "^3.0.5",
|
|
152
153
|
"@types/mock-fs": "^4.13.0",
|
|
153
154
|
"@types/node": "^14.14.32",
|
|
154
155
|
"@types/recursive-readdir": "^2.2.0",
|
|
@@ -165,19 +166,19 @@ var devDependencies = {
|
|
|
165
166
|
"ts-node": "^10.0.0"
|
|
166
167
|
};
|
|
167
168
|
|
|
168
|
-
var version$7 = "0.
|
|
169
|
+
var version$7 = "0.5.0-next.0";
|
|
169
170
|
|
|
170
|
-
var version$6 = "0.8.
|
|
171
|
+
var version$6 = "0.8.5-next.0";
|
|
171
172
|
|
|
172
|
-
var version$5 = "0.
|
|
173
|
+
var version$5 = "0.6.0-next.0";
|
|
173
174
|
|
|
174
|
-
var version$4 = "0.2.
|
|
175
|
+
var version$4 = "0.2.18-next.0";
|
|
175
176
|
|
|
176
|
-
var version$3 = "0.2.0";
|
|
177
|
+
var version$3 = "0.2.3-next.0";
|
|
177
178
|
|
|
178
179
|
var version$2 = "0.2.14";
|
|
179
180
|
|
|
180
|
-
var version$1 = "0.15.
|
|
181
|
+
var version$1 = "0.15.21-next.0";
|
|
181
182
|
|
|
182
183
|
const packageVersions = {
|
|
183
184
|
"@backstage/backend-common": version$9,
|
|
@@ -231,33 +232,33 @@ function registerCommands(program) {
|
|
|
231
232
|
(opt, opts) => [...opts, opt],
|
|
232
233
|
Array()
|
|
233
234
|
];
|
|
234
|
-
program.command("app:build").description("Build an app for a production release").option("--stats", "Write bundle stats to output directory").option("--lax", "[DEPRECATED] - Do not require environment variables to be set").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./build-
|
|
235
|
-
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-
|
|
236
|
-
program.command("backend:build").description("Build a backend plugin").option("--minify", "Minify the generated code").action(lazy(() => Promise.resolve().then(function () { return require('./build-
|
|
237
|
-
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-
|
|
238
|
-
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-
|
|
239
|
-
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-
|
|
240
|
-
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-
|
|
241
|
-
program.command("remove-plugin").description("[DEPRECATED] - Removes plugin in the current repository").action(lazy(() => Promise.resolve().then(function () { return require('./removePlugin-
|
|
242
|
-
program.command("plugin:build").description("Build a plugin").option("--minify", "Minify the generated code").action(lazy(() => Promise.resolve().then(function () { return require('./build-
|
|
243
|
-
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-
|
|
244
|
-
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-
|
|
245
|
-
program.command("build").description("Build a package for publishing").option("--outputs <formats>", "List of formats to output [types,cjs,esm]").action(lazy(() => Promise.resolve().then(function () { return require('./build-
|
|
246
|
-
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-
|
|
247
|
-
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-
|
|
248
|
-
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-
|
|
249
|
-
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-
|
|
250
|
-
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(...configOption).description("Validate that the given configuration loads and matches schema").action(lazy(() => Promise.resolve().then(function () { return require('./validate-
|
|
251
|
-
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-
|
|
252
|
-
program.command("versions:bump").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-
|
|
253
|
-
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-
|
|
254
|
-
program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-
|
|
255
|
-
program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-
|
|
256
|
-
program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-
|
|
257
|
-
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-
|
|
258
|
-
program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-
|
|
259
|
-
program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-
|
|
260
|
-
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-
|
|
235
|
+
program.command("app:build").description("Build an app for a production release").option("--stats", "Write bundle stats to output directory").option("--lax", "[DEPRECATED] - Do not require environment variables to be set").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./build-e1cfa92a.cjs.js'); }).then((m) => m.default)));
|
|
236
|
+
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-90512169.cjs.js'); }).then((m) => m.default)));
|
|
237
|
+
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-5e469530.cjs.js'); }).then((m) => m.default)));
|
|
238
|
+
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-2cb505f3.cjs.js'); }).then((m) => m.default)));
|
|
239
|
+
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-558ef0c6.cjs.js'); }).then((m) => m.default)));
|
|
240
|
+
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-8dc87021.cjs.js'); }).then((m) => m.default)));
|
|
241
|
+
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-f480902b.cjs.js'); }).then((m) => m.default)));
|
|
242
|
+
program.command("remove-plugin").description("[DEPRECATED] - Removes plugin in the current repository").action(lazy(() => Promise.resolve().then(function () { return require('./removePlugin-350b9293.cjs.js'); }).then((m) => m.default)));
|
|
243
|
+
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-41b160e1.cjs.js'); }).then((m) => m.default)));
|
|
244
|
+
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-d962519a.cjs.js'); }).then((m) => m.default)));
|
|
245
|
+
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-7382e071.cjs.js'); }).then((m) => m.default)));
|
|
246
|
+
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('./build-6a564e18.cjs.js'); }).then((m) => m.default)));
|
|
247
|
+
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-5aa2e47f.cjs.js'); }).then((m) => m.default)));
|
|
248
|
+
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-0e57c1d2.cjs.js'); }).then((m) => m.default)));
|
|
249
|
+
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-a44be9cd.cjs.js'); }).then((m) => m.default)));
|
|
250
|
+
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-207cc148.cjs.js'); }).then((m) => m.default)));
|
|
251
|
+
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-878f8022.cjs.js'); }).then((m) => m.default)));
|
|
252
|
+
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-aa853b70.cjs.js'); }).then((m) => m.default)));
|
|
253
|
+
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-0d4c7e07.cjs.js'); }).then((m) => m.default)));
|
|
254
|
+
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-25eb1889.cjs.js'); }).then((m) => m.default)));
|
|
255
|
+
program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-a5e15cdb.cjs.js'); }).then((m) => m.pre)));
|
|
256
|
+
program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-a5e15cdb.cjs.js'); }).then((m) => m.post)));
|
|
257
|
+
program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-265d3ed5.cjs.js'); }).then((m) => m.default)));
|
|
258
|
+
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-b198351d.cjs.js'); }).then((m) => m.default)));
|
|
259
|
+
program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-63774350.cjs.js'); }).then((m) => m.default)));
|
|
260
|
+
program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-643074cc.cjs.js'); }).then((m) => m.default)));
|
|
261
|
+
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-c8b107f7.cjs.js'); }).then((m) => m.default)));
|
|
261
262
|
}
|
|
262
263
|
function lazy(getActionFunc) {
|
|
263
264
|
return async (...args) => {
|
|
@@ -301,4 +302,4 @@ exports.devDependencies = devDependencies;
|
|
|
301
302
|
exports.paths = paths;
|
|
302
303
|
exports.version = version;
|
|
303
304
|
exports.version$1 = version$8;
|
|
304
|
-
//# sourceMappingURL=index-
|
|
305
|
+
//# sourceMappingURL=index-92454bcd.cjs.js.map
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-92454bcd.cjs.js');
|
|
4
4
|
var os = require('os');
|
|
5
|
-
var run = require('./run-
|
|
5
|
+
var run = require('./run-ad69ea39.cjs.js');
|
|
6
6
|
var Lockfile = require('./Lockfile-35661afa.cjs.js');
|
|
7
|
+
require('minimatch');
|
|
8
|
+
require('@manypkg/get-packages');
|
|
7
9
|
require('chalk');
|
|
8
10
|
require('commander');
|
|
9
11
|
require('fs-extra');
|
|
@@ -41,4 +43,4 @@ var info = async () => {
|
|
|
41
43
|
};
|
|
42
44
|
|
|
43
45
|
exports["default"] = info;
|
|
44
|
-
//# sourceMappingURL=info-
|
|
46
|
+
//# sourceMappingURL=info-643074cc.cjs.js.map
|
|
@@ -3,12 +3,14 @@
|
|
|
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-435d71fd.cjs.js');
|
|
7
|
+
var index = require('./index-92454bcd.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-ad69ea39.cjs.js');
|
|
12
|
+
require('minimatch');
|
|
13
|
+
require('@manypkg/get-packages');
|
|
12
14
|
require('commander');
|
|
13
15
|
require('@backstage/cli-common');
|
|
14
16
|
require('@backstage/config/package.json');
|
|
@@ -238,4 +240,4 @@ var install = async (pluginId, cmd) => {
|
|
|
238
240
|
};
|
|
239
241
|
|
|
240
242
|
exports["default"] = install;
|
|
241
|
-
//# sourceMappingURL=install-
|
|
243
|
+
//# sourceMappingURL=install-c8b107f7.cjs.js.map
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var Lockfile = require('./Lockfile-35661afa.cjs.js');
|
|
4
|
-
require('
|
|
4
|
+
require('minimatch');
|
|
5
|
+
require('@manypkg/get-packages');
|
|
6
|
+
require('./run-ad69ea39.cjs.js');
|
|
5
7
|
require('chalk');
|
|
6
|
-
var index = require('./index-
|
|
8
|
+
var index = require('./index-92454bcd.cjs.js');
|
|
7
9
|
var partition = require('lodash/partition');
|
|
8
10
|
require('fs-extra');
|
|
9
11
|
require('semver');
|
|
@@ -74,4 +76,4 @@ function logArray(arr, header, each) {
|
|
|
74
76
|
exports["default"] = lint;
|
|
75
77
|
exports.forbiddenDuplicatesFilter = forbiddenDuplicatesFilter;
|
|
76
78
|
exports.includedFilter = includedFilter;
|
|
77
|
-
//# sourceMappingURL=lint-
|
|
79
|
+
//# sourceMappingURL=lint-25eb1889.cjs.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var run = require('./run-
|
|
4
|
-
var index = require('./index-
|
|
3
|
+
var run = require('./run-ad69ea39.cjs.js');
|
|
4
|
+
var index = require('./index-92454bcd.cjs.js');
|
|
5
5
|
require('child_process');
|
|
6
6
|
require('util');
|
|
7
7
|
require('@backstage/errors');
|
|
@@ -26,4 +26,4 @@ var lint = async (cmd, cmdArgs) => {
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
exports["default"] = lint;
|
|
29
|
-
//# sourceMappingURL=lint-
|
|
29
|
+
//# sourceMappingURL=lint-5aa2e47f.cjs.js.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var fs = require('fs-extra');
|
|
4
|
+
var index = require('./index-92454bcd.cjs.js');
|
|
5
|
+
var path = require('path');
|
|
6
|
+
require('commander');
|
|
7
|
+
require('chalk');
|
|
8
|
+
require('semver');
|
|
9
|
+
require('@backstage/cli-common');
|
|
10
|
+
require('@backstage/config/package.json');
|
|
11
|
+
require('@backstage/errors');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
16
|
+
|
|
17
|
+
const SKIPPED_KEYS = ["access", "registry", "tag", "alphaTypes", "betaTypes"];
|
|
18
|
+
const PKG_PATH = "package.json";
|
|
19
|
+
const PKG_BACKUP_PATH = "package.json-prepack";
|
|
20
|
+
async function writeReleaseStageEntrypoint(pkg, stage) {
|
|
21
|
+
await fs__default["default"].ensureDir(index.paths.resolveTarget(stage));
|
|
22
|
+
await fs__default["default"].writeJson(index.paths.resolveTarget(stage, PKG_PATH), {
|
|
23
|
+
name: pkg.name,
|
|
24
|
+
version: pkg.version,
|
|
25
|
+
main: (pkg.publishConfig.main || pkg.main) && "..",
|
|
26
|
+
module: (pkg.publishConfig.module || pkg.module) && "..",
|
|
27
|
+
browser: (pkg.publishConfig.browser || pkg.browser) && "..",
|
|
28
|
+
types: path.join("..", pkg.publishConfig[`${stage}Types`])
|
|
29
|
+
}, { encoding: "utf8", spaces: 2 });
|
|
30
|
+
}
|
|
31
|
+
const pre = async () => {
|
|
32
|
+
var _a;
|
|
33
|
+
const pkgPath = index.paths.resolveTarget(PKG_PATH);
|
|
34
|
+
const pkgContent = await fs__default["default"].readFile(pkgPath, "utf8");
|
|
35
|
+
const pkg = JSON.parse(pkgContent);
|
|
36
|
+
await fs__default["default"].writeFile(PKG_BACKUP_PATH, pkgContent);
|
|
37
|
+
const publishConfig = (_a = pkg.publishConfig) != null ? _a : {};
|
|
38
|
+
for (const key of Object.keys(publishConfig)) {
|
|
39
|
+
if (!SKIPPED_KEYS.includes(key)) {
|
|
40
|
+
pkg[key] = publishConfig[key];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
await fs__default["default"].writeJson(pkgPath, pkg, { encoding: "utf8", spaces: 2 });
|
|
44
|
+
if (publishConfig.alphaTypes) {
|
|
45
|
+
await writeReleaseStageEntrypoint(pkg, "alpha");
|
|
46
|
+
}
|
|
47
|
+
if (publishConfig.betaTypes) {
|
|
48
|
+
await writeReleaseStageEntrypoint(pkg, "beta");
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const post = async () => {
|
|
52
|
+
var _a, _b;
|
|
53
|
+
try {
|
|
54
|
+
await fs__default["default"].move(PKG_BACKUP_PATH, PKG_PATH, { overwrite: true });
|
|
55
|
+
const pkg = await fs__default["default"].readJson(PKG_PATH);
|
|
56
|
+
if ((_a = pkg.publishConfig) == null ? void 0 : _a.alphaTypes) {
|
|
57
|
+
await fs__default["default"].remove(index.paths.resolveTarget("alpha"));
|
|
58
|
+
}
|
|
59
|
+
if ((_b = pkg.publishConfig) == null ? void 0 : _b.betaTypes) {
|
|
60
|
+
await fs__default["default"].remove(index.paths.resolveTarget("beta"));
|
|
61
|
+
}
|
|
62
|
+
} catch (error) {
|
|
63
|
+
console.warn(`Failed to restore package.json during postpack, ${error}. Your package will be fine but you may have ended up with some garbage in the repo.`);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
exports.post = post;
|
|
68
|
+
exports.pre = pre;
|
|
69
|
+
//# sourceMappingURL=pack-a5e15cdb.cjs.js.map
|