@backstage/cli 0.0.0-nightly-202111122525 → 0.0.0-nightly-202111522632
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 +17 -2
- package/dist/cjs/{Lockfile-80f0eec4.cjs.js → Lockfile-35661afa.cjs.js} +18 -18
- package/dist/cjs/{build-eb2cf759.cjs.js → build-260d2d44.cjs.js} +8 -7
- package/dist/cjs/{build-1d728575.cjs.js → build-3339df44.cjs.js} +8 -7
- package/dist/cjs/{build-09424217.cjs.js → build-7c19fd36.cjs.js} +9 -9
- package/dist/cjs/{build-ca462c60.cjs.js → build-aa8594a1.cjs.js} +23 -20
- package/dist/cjs/{buildWorkspace-8fd4362c.cjs.js → buildWorkspace-bd71f4f8.cjs.js} +6 -6
- package/dist/cjs/{bump-f241db88.cjs.js → bump-47534b09.cjs.js} +36 -36
- package/dist/cjs/{bundle-69ade4a2.cjs.js → bundle-14e07ead.cjs.js} +15 -15
- package/dist/cjs/{clean-c2ebca6c.cjs.js → clean-282521b8.cjs.js} +6 -6
- package/dist/cjs/{config-fa4023b6.cjs.js → config-c4212ad4.cjs.js} +7 -7
- package/dist/cjs/{create-925525a5.cjs.js → create-629193c5.cjs.js} +41 -41
- package/dist/cjs/{createPlugin-8d7d5c72.cjs.js → createPlugin-756c48b5.cjs.js} +31 -31
- package/dist/cjs/{dev-9a412f98.cjs.js → dev-beba26fd.cjs.js} +8 -8
- package/dist/cjs/{diff-374e5498.cjs.js → diff-2d5b026c.cjs.js} +29 -29
- package/dist/cjs/{docs-9760c79f.cjs.js → docs-f42ce084.cjs.js} +6 -6
- package/dist/cjs/{index-462e82fd.cjs.js → index-406e364f.cjs.js} +15 -15
- package/dist/cjs/{index-de12df0a.cjs.js → index-8977a33d.cjs.js} +14 -14
- package/dist/cjs/{index-263ce09a.cjs.js → index-a2419466.cjs.js} +59 -60
- package/dist/cjs/{info-fd99caac.cjs.js → info-d0d35bb2.cjs.js} +6 -6
- package/dist/cjs/{install-a8077771.cjs.js → install-f7db6355.cjs.js} +23 -23
- package/dist/cjs/{lint-f3c0b5ca.cjs.js → lint-5dc7638f.cjs.js} +4 -4
- package/dist/cjs/{lint-d5a32c96.cjs.js → lint-7f529079.cjs.js} +7 -7
- package/dist/cjs/{pack-26636507.cjs.js → pack-bd87bc11.cjs.js} +6 -6
- package/dist/cjs/{packager-28e4c8a5.cjs.js → packager-9551d9e0.cjs.js} +37 -35
- package/dist/cjs/{packages-6980d6f5.cjs.js → packages-209c7334.cjs.js} +5 -5
- package/dist/cjs/{paths-4c0bc9f5.cjs.js → paths-2bc1bd1d.cjs.js} +35 -35
- package/dist/cjs/{print-bdd9e923.cjs.js → print-fa8d75d6.cjs.js} +5 -5
- package/dist/cjs/{removePlugin-047e4f1f.cjs.js → removePlugin-81121573.cjs.js} +30 -29
- package/dist/cjs/{run-7653c0ef.cjs.js → run-16b1d94a.cjs.js} +5 -5
- package/dist/cjs/{schema-99ae4564.cjs.js → schema-6a0a3ebe.cjs.js} +5 -5
- package/dist/cjs/{serve-bf155c6f.cjs.js → serve-76c00365.cjs.js} +9 -9
- package/dist/cjs/{serve-dbb9d6d4.cjs.js → serve-8dbaff94.cjs.js} +15 -15
- package/dist/cjs/{server-b61dffa4.cjs.js → server-7ec696f8.cjs.js} +6 -6
- package/dist/cjs/{svgrTemplate-2d0d15cf.cjs.js → svgrTemplate-f19e974c.cjs.js} +3 -3
- package/dist/cjs/{tasks-5659b245.cjs.js → tasks-7e7c8493.cjs.js} +29 -29
- package/dist/cjs/{testCommand-71f96879.cjs.js → testCommand-d50fbf63.cjs.js} +4 -4
- package/dist/cjs/{validate-1810d6b4.cjs.js → validate-f5c5dc39.cjs.js} +4 -4
- package/dist/index.cjs.js +1 -1
- package/package.json +13 -13
- package/dist/cjs/buildImage-fcf2ae63.cjs.js +0 -77
|
@@ -29,13 +29,13 @@ class ExitCodeError extends CustomError {
|
|
|
29
29
|
function exitWithError(error) {
|
|
30
30
|
if (error instanceof ExitCodeError) {
|
|
31
31
|
process.stderr.write(`
|
|
32
|
-
${chalk__default[
|
|
32
|
+
${chalk__default["default"].red(error.message)}
|
|
33
33
|
|
|
34
34
|
`);
|
|
35
35
|
process.exit(error.code);
|
|
36
36
|
} else {
|
|
37
37
|
process.stderr.write(`
|
|
38
|
-
${chalk__default[
|
|
38
|
+
${chalk__default["default"].red(`${error}`)}
|
|
39
39
|
|
|
40
40
|
`);
|
|
41
41
|
process.exit(1);
|
|
@@ -46,13 +46,13 @@ class NotFoundError extends CustomError {
|
|
|
46
46
|
|
|
47
47
|
const paths = cliCommon.findPaths(__dirname);
|
|
48
48
|
|
|
49
|
-
var version$9 = "0.9.
|
|
49
|
+
var version$9 = "0.9.12";
|
|
50
50
|
|
|
51
|
-
var version$8 = "0.
|
|
51
|
+
var version$8 = "0.10.0";
|
|
52
52
|
var dependencies = {
|
|
53
53
|
"@backstage/cli-common": "^0.1.6",
|
|
54
54
|
"@backstage/config": "^0.1.11",
|
|
55
|
-
"@backstage/config-loader": "^0.8.
|
|
55
|
+
"@backstage/config-loader": "^0.8.1",
|
|
56
56
|
"@backstage/errors": "^0.1.5",
|
|
57
57
|
"@backstage/types": "^0.1.1",
|
|
58
58
|
"@hot-loader/react-dom": "^16.13.0",
|
|
@@ -60,9 +60,9 @@ var dependencies = {
|
|
|
60
60
|
"@lerna/project": "^4.0.0",
|
|
61
61
|
"@octokit/request": "^5.4.12",
|
|
62
62
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
63
|
-
"@rollup/plugin-json": "^4.0
|
|
63
|
+
"@rollup/plugin-json": "^4.1.0",
|
|
64
64
|
"@rollup/plugin-node-resolve": "^13.0.0",
|
|
65
|
-
"@rollup/plugin-yaml": "^3.
|
|
65
|
+
"@rollup/plugin-yaml": "^3.1.0",
|
|
66
66
|
"@spotify/eslint-config-base": "^12.0.0",
|
|
67
67
|
"@spotify/eslint-config-react": "^12.0.0",
|
|
68
68
|
"@spotify/eslint-config-typescript": "^12.0.0",
|
|
@@ -84,7 +84,7 @@ var dependencies = {
|
|
|
84
84
|
"css-loader": "^5.2.6",
|
|
85
85
|
dashify: "^2.0.0",
|
|
86
86
|
diff: "^5.0.0",
|
|
87
|
-
esbuild: "^0.
|
|
87
|
+
esbuild: "^0.14.1",
|
|
88
88
|
eslint: "^7.30.0",
|
|
89
89
|
"eslint-config-prettier": "^8.3.0",
|
|
90
90
|
"eslint-formatter-friendly": "^7.0.0",
|
|
@@ -116,9 +116,9 @@ var dependencies = {
|
|
|
116
116
|
"react-hot-loader": "^4.12.21",
|
|
117
117
|
"recursive-readdir": "^2.2.2",
|
|
118
118
|
"replace-in-file": "^6.0.0",
|
|
119
|
-
rollup: "2.
|
|
120
|
-
"rollup-plugin-dts": "^
|
|
121
|
-
"rollup-plugin-esbuild": "
|
|
119
|
+
rollup: "^2.60.2",
|
|
120
|
+
"rollup-plugin-dts": "^4.0.1",
|
|
121
|
+
"rollup-plugin-esbuild": "^4.7.2",
|
|
122
122
|
"rollup-plugin-peer-deps-external": "^2.2.2",
|
|
123
123
|
"rollup-plugin-postcss": "^4.0.0",
|
|
124
124
|
"rollup-pluginutils": "^2.8.2",
|
|
@@ -139,14 +139,14 @@ var dependencies = {
|
|
|
139
139
|
yn: "^4.0.0"
|
|
140
140
|
};
|
|
141
141
|
var devDependencies = {
|
|
142
|
-
"@backstage/backend-common": "^0.9.
|
|
142
|
+
"@backstage/backend-common": "^0.9.12",
|
|
143
143
|
"@backstage/config": "^0.1.11",
|
|
144
|
-
"@backstage/core-components": "^0.7.
|
|
145
|
-
"@backstage/core-plugin-api": "^0.2.
|
|
146
|
-
"@backstage/core-app-api": "^0.1.
|
|
144
|
+
"@backstage/core-components": "^0.7.6",
|
|
145
|
+
"@backstage/core-plugin-api": "^0.2.2",
|
|
146
|
+
"@backstage/core-app-api": "^0.1.24",
|
|
147
147
|
"@backstage/dev-utils": "^0.2.13",
|
|
148
148
|
"@backstage/test-utils": "^0.1.23",
|
|
149
|
-
"@backstage/theme": "^0.2.
|
|
149
|
+
"@backstage/theme": "^0.2.14",
|
|
150
150
|
"@types/diff": "^5.0.0",
|
|
151
151
|
"@types/express": "^4.17.6",
|
|
152
152
|
"@types/fs-extra": "^9.0.1",
|
|
@@ -168,19 +168,19 @@ var devDependencies = {
|
|
|
168
168
|
"ts-node": "^10.0.0"
|
|
169
169
|
};
|
|
170
170
|
|
|
171
|
-
var version$7 = "0.1.
|
|
171
|
+
var version$7 = "0.1.24";
|
|
172
172
|
|
|
173
|
-
var version$6 = "0.7.
|
|
173
|
+
var version$6 = "0.7.6";
|
|
174
174
|
|
|
175
|
-
var version$5 = "0.2.
|
|
175
|
+
var version$5 = "0.2.2";
|
|
176
176
|
|
|
177
177
|
var version$4 = "0.2.13";
|
|
178
178
|
|
|
179
179
|
var version$3 = "0.1.23";
|
|
180
180
|
|
|
181
|
-
var version$2 = "0.2.
|
|
181
|
+
var version$2 = "0.2.14";
|
|
182
182
|
|
|
183
|
-
var version$1 = "0.15.
|
|
183
|
+
var version$1 = "0.15.15";
|
|
184
184
|
|
|
185
185
|
const packageVersions = {
|
|
186
186
|
"@backstage/backend-common": version$9,
|
|
@@ -195,11 +195,11 @@ const packageVersions = {
|
|
|
195
195
|
"@backstage/plugin-scaffolder-backend": version$1
|
|
196
196
|
};
|
|
197
197
|
function findVersion() {
|
|
198
|
-
const pkgContent = fs__default[
|
|
198
|
+
const pkgContent = fs__default["default"].readFileSync(paths.resolveOwn("package.json"), "utf8");
|
|
199
199
|
return JSON.parse(pkgContent).version;
|
|
200
200
|
}
|
|
201
201
|
const version = findVersion();
|
|
202
|
-
fs__default[
|
|
202
|
+
fs__default["default"].pathExistsSync(paths.resolveOwn("src"));
|
|
203
203
|
function createPackageVersionProvider(lockfile) {
|
|
204
204
|
return (name, versionHint) => {
|
|
205
205
|
var _a;
|
|
@@ -212,7 +212,7 @@ function createPackageVersionProvider(lockfile) {
|
|
|
212
212
|
if (name.startsWith("@types/") && (lockfileEntries == null ? void 0 : lockfileEntries.some((entry) => entry.range === "*"))) {
|
|
213
213
|
return "*";
|
|
214
214
|
}
|
|
215
|
-
const validRanges = lockfileEntries == null ? void 0 : lockfileEntries.filter((entry) => semver__default[
|
|
215
|
+
const validRanges = lockfileEntries == null ? void 0 : lockfileEntries.filter((entry) => semver__default["default"].satisfies(targetVersion, entry.range));
|
|
216
216
|
const highestRange = validRanges == null ? void 0 : validRanges.slice(-1)[0];
|
|
217
217
|
if (highestRange == null ? void 0 : highestRange.range) {
|
|
218
218
|
return highestRange == null ? void 0 : highestRange.range;
|
|
@@ -220,7 +220,7 @@ function createPackageVersionProvider(lockfile) {
|
|
|
220
220
|
if (packageVersion) {
|
|
221
221
|
return `^${packageVersion}`;
|
|
222
222
|
}
|
|
223
|
-
if ((_a = semver__default[
|
|
223
|
+
if ((_a = semver__default["default"].parse(versionHint)) == null ? void 0 : _a.prerelease.length) {
|
|
224
224
|
return versionHint;
|
|
225
225
|
}
|
|
226
226
|
return `^${versionHint}`;
|
|
@@ -234,34 +234,33 @@ function registerCommands(program) {
|
|
|
234
234
|
(opt, opts) => [...opts, opt],
|
|
235
235
|
Array()
|
|
236
236
|
];
|
|
237
|
-
program.command("app:build").description("Build an app for a production release").option("--stats", "Write bundle stats to output directory").option("--lax", "Do not require environment variables to be set").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./build-
|
|
238
|
-
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-
|
|
239
|
-
program.command("backend:build").description("Build a backend plugin").action(lazy(() => Promise.resolve().then(function () { return require('./build-
|
|
240
|
-
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-
|
|
241
|
-
program.command("backend:
|
|
242
|
-
program.command("
|
|
243
|
-
program.command("create").
|
|
244
|
-
program.command("
|
|
245
|
-
program.command("
|
|
246
|
-
program.command("plugin:
|
|
247
|
-
program.command("plugin:
|
|
248
|
-
program.command("
|
|
249
|
-
program.command("
|
|
250
|
-
program.command("
|
|
251
|
-
program.command("
|
|
252
|
-
program.command("config:
|
|
253
|
-
program.command("config:
|
|
254
|
-
program.command("config:
|
|
255
|
-
program.command("
|
|
256
|
-
program.command("versions:
|
|
257
|
-
program.command("
|
|
258
|
-
program.command("
|
|
259
|
-
program.command("
|
|
260
|
-
program.command("
|
|
261
|
-
program.command("
|
|
262
|
-
program.command("
|
|
263
|
-
program.command("
|
|
264
|
-
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-a8077771.cjs.js'); }).then((m) => m.default)));
|
|
237
|
+
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-aa8594a1.cjs.js'); }).then((m) => m.default)));
|
|
238
|
+
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-8dbaff94.cjs.js'); }).then((m) => m.default)));
|
|
239
|
+
program.command("backend:build").description("Build a backend plugin").option("--minify", "Minify the generated code").action(lazy(() => Promise.resolve().then(function () { return require('./build-3339df44.cjs.js'); }).then((m) => m.default)));
|
|
240
|
+
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-14e07ead.cjs.js'); }).then((m) => m.default)));
|
|
241
|
+
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-beba26fd.cjs.js'); }).then((m) => m.default)));
|
|
242
|
+
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-629193c5.cjs.js'); }).then((m) => m.default)));
|
|
243
|
+
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-756c48b5.cjs.js'); }).then((m) => m.default)));
|
|
244
|
+
program.command("remove-plugin").description("[DEPRECATED] - Removes plugin in the current repository").action(lazy(() => Promise.resolve().then(function () { return require('./removePlugin-81121573.cjs.js'); }).then((m) => m.default)));
|
|
245
|
+
program.command("plugin:build").description("Build a plugin").option("--minify", "Minify the generated code").action(lazy(() => Promise.resolve().then(function () { return require('./build-260d2d44.cjs.js'); }).then((m) => m.default)));
|
|
246
|
+
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-76c00365.cjs.js'); }).then((m) => m.default)));
|
|
247
|
+
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-2d5b026c.cjs.js'); }).then((m) => m.default)));
|
|
248
|
+
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-7c19fd36.cjs.js'); }).then((m) => m.default)));
|
|
249
|
+
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-5dc7638f.cjs.js'); }).then((m) => m.default)));
|
|
250
|
+
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-d50fbf63.cjs.js'); }).then((m) => m.default)));
|
|
251
|
+
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-f42ce084.cjs.js'); }).then((m) => m.default)));
|
|
252
|
+
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-fa8d75d6.cjs.js'); }).then((m) => m.default)));
|
|
253
|
+
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-f5c5dc39.cjs.js'); }).then((m) => m.default)));
|
|
254
|
+
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-6a0a3ebe.cjs.js'); }).then((m) => m.default)));
|
|
255
|
+
program.command("versions:bump").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-47534b09.cjs.js'); }).then((m) => m.default)));
|
|
256
|
+
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-7f529079.cjs.js'); }).then((m) => m.default)));
|
|
257
|
+
program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-bd87bc11.cjs.js'); }).then((m) => m.pre)));
|
|
258
|
+
program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-bd87bc11.cjs.js'); }).then((m) => m.post)));
|
|
259
|
+
program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-282521b8.cjs.js'); }).then((m) => m.default)));
|
|
260
|
+
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-bd71f4f8.cjs.js'); }).then((m) => m.default)));
|
|
261
|
+
program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-8977a33d.cjs.js'); }).then((m) => m.default)));
|
|
262
|
+
program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-d0d35bb2.cjs.js'); }).then((m) => m.default)));
|
|
263
|
+
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-f7db6355.cjs.js'); }).then((m) => m.default)));
|
|
265
264
|
}
|
|
266
265
|
function lazy(getActionFunc) {
|
|
267
266
|
return async (...args) => {
|
|
@@ -277,16 +276,16 @@ function lazy(getActionFunc) {
|
|
|
277
276
|
}
|
|
278
277
|
|
|
279
278
|
const main = (argv) => {
|
|
280
|
-
program__default[
|
|
281
|
-
registerCommands(program__default[
|
|
282
|
-
program__default[
|
|
279
|
+
program__default["default"].name("backstage-cli").version(version);
|
|
280
|
+
registerCommands(program__default["default"]);
|
|
281
|
+
program__default["default"].on("command:*", () => {
|
|
283
282
|
console.log();
|
|
284
|
-
console.log(chalk__default[
|
|
283
|
+
console.log(chalk__default["default"].red(`Invalid command: ${program__default["default"].args.join(" ")}`));
|
|
285
284
|
console.log();
|
|
286
|
-
program__default[
|
|
285
|
+
program__default["default"].outputHelp();
|
|
287
286
|
process.exit(1);
|
|
288
287
|
});
|
|
289
|
-
program__default[
|
|
288
|
+
program__default["default"].parse(argv);
|
|
290
289
|
};
|
|
291
290
|
process.on("unhandledRejection", (rejection) => {
|
|
292
291
|
if (rejection instanceof Error) {
|
|
@@ -305,4 +304,4 @@ exports.devDependencies = devDependencies;
|
|
|
305
304
|
exports.paths = paths;
|
|
306
305
|
exports.version = version;
|
|
307
306
|
exports.version$1 = version$8;
|
|
308
|
-
//# sourceMappingURL=index-
|
|
307
|
+
//# sourceMappingURL=index-a2419466.cjs.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-a2419466.cjs.js');
|
|
4
4
|
var os = require('os');
|
|
5
|
-
var run = require('./run-
|
|
6
|
-
var Lockfile = require('./Lockfile-
|
|
5
|
+
var run = require('./run-16b1d94a.cjs.js');
|
|
6
|
+
var Lockfile = require('./Lockfile-35661afa.cjs.js');
|
|
7
7
|
require('chalk');
|
|
8
8
|
require('commander');
|
|
9
9
|
require('fs-extra');
|
|
@@ -23,7 +23,7 @@ var info = async () => {
|
|
|
23
23
|
await new Promise(async () => {
|
|
24
24
|
const yarnVersion = await run.runPlain("yarn --version");
|
|
25
25
|
const isLocal = require("fs").existsSync(index.paths.resolveOwn("./src"));
|
|
26
|
-
console.log(`OS: ${os__default[
|
|
26
|
+
console.log(`OS: ${os__default["default"].type} ${os__default["default"].release} - ${os__default["default"].platform}/${os__default["default"].arch}`);
|
|
27
27
|
console.log(`node: ${process.version}`);
|
|
28
28
|
console.log(`yarn: ${yarnVersion}`);
|
|
29
29
|
console.log(`cli: ${index.version$1} (${isLocal ? "local" : "installed"})`);
|
|
@@ -40,5 +40,5 @@ var info = async () => {
|
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
exports
|
|
44
|
-
//# sourceMappingURL=info-
|
|
43
|
+
exports["default"] = info;
|
|
44
|
+
//# sourceMappingURL=info-d0d35bb2.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-209c7334.cjs.js');
|
|
7
|
+
var index = require('./index-a2419466.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-16b1d94a.cjs.js');
|
|
12
12
|
require('commander');
|
|
13
13
|
require('@backstage/cli-common');
|
|
14
14
|
require('@backstage/config/package.json');
|
|
@@ -33,9 +33,9 @@ class AppRouteStep {
|
|
|
33
33
|
}
|
|
34
34
|
async run() {
|
|
35
35
|
var _a;
|
|
36
|
-
const {path, element, packageName} = this.data;
|
|
36
|
+
const { path, element, packageName } = this.data;
|
|
37
37
|
const appTsxPath = index.paths.resolveTargetRoot("packages/app/src/App.tsx");
|
|
38
|
-
const contents = await fs__default[
|
|
38
|
+
const contents = await fs__default["default"].readFile(appTsxPath, "utf-8");
|
|
39
39
|
let failed = false;
|
|
40
40
|
const contentsWithRoute = contents.replace(/(\s*)<\/FlatRoutes>/, `$1 <Route path="${path}" element={${element}} />$1</FlatRoutes>`);
|
|
41
41
|
if (contentsWithRoute === contents) {
|
|
@@ -56,21 +56,21 @@ import `);
|
|
|
56
56
|
console.log(`1. import { ${componentName} } from '${packageName}';`);
|
|
57
57
|
console.log(`2. <Route path="${path}" element={${element}} />`);
|
|
58
58
|
} else {
|
|
59
|
-
await fs__default[
|
|
59
|
+
await fs__default["default"].writeFile(appTsxPath, contentsWithImport);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
const appRoute = createStepDefinition({
|
|
64
64
|
type: "app-route",
|
|
65
65
|
deserialize(obj, pkg) {
|
|
66
|
-
const {path, element} = obj;
|
|
66
|
+
const { path, element } = obj;
|
|
67
67
|
if (!path || typeof path !== "string") {
|
|
68
68
|
throw new Error("Invalid install step, 'path' must be a string");
|
|
69
69
|
}
|
|
70
70
|
if (!element || typeof element !== "string") {
|
|
71
71
|
throw new Error("Invalid install step, 'element' must be a string");
|
|
72
72
|
}
|
|
73
|
-
return new AppRouteStep({path, element, packageName: pkg.name});
|
|
73
|
+
return new AppRouteStep({ path, element, packageName: pkg.name });
|
|
74
74
|
},
|
|
75
75
|
create(data) {
|
|
76
76
|
return new AppRouteStep(data);
|
|
@@ -82,23 +82,23 @@ class DependenciesStep {
|
|
|
82
82
|
this.data = data;
|
|
83
83
|
}
|
|
84
84
|
async run() {
|
|
85
|
-
const {dependencies: dependencies2} = this.data;
|
|
86
|
-
const byTarget = groupBy__default[
|
|
85
|
+
const { dependencies: dependencies2 } = this.data;
|
|
86
|
+
const byTarget = groupBy__default["default"](dependencies2, "target");
|
|
87
87
|
for (const [target, deps] of Object.entries(byTarget)) {
|
|
88
88
|
const pkgPath = index.paths.resolveTargetRoot(target, "package.json");
|
|
89
|
-
const pkgJson = await fs__default[
|
|
90
|
-
const depTypes = new Set();
|
|
89
|
+
const pkgJson = await fs__default["default"].readJson(pkgPath);
|
|
90
|
+
const depTypes = /* @__PURE__ */ new Set();
|
|
91
91
|
for (const dep of deps) {
|
|
92
92
|
depTypes.add(dep.type);
|
|
93
93
|
pkgJson[dep.type][dep.name] = dep.query;
|
|
94
94
|
}
|
|
95
95
|
for (const depType of depTypes) {
|
|
96
|
-
pkgJson[depType] = Object.fromEntries(sortBy__default[
|
|
96
|
+
pkgJson[depType] = Object.fromEntries(sortBy__default["default"](Object.entries(pkgJson[depType]), ([key]) => key));
|
|
97
97
|
}
|
|
98
|
-
await fs__default[
|
|
98
|
+
await fs__default["default"].writeJson(pkgPath, pkgJson, { spaces: 2 });
|
|
99
99
|
}
|
|
100
100
|
console.log();
|
|
101
|
-
console.log(`Running ${chalk__default[
|
|
101
|
+
console.log(`Running ${chalk__default["default"].blue("yarn install")} to install new versions`);
|
|
102
102
|
console.log();
|
|
103
103
|
await run.run("yarn", ["install"]);
|
|
104
104
|
}
|
|
@@ -124,11 +124,11 @@ class MessageStep {
|
|
|
124
124
|
const message = createStepDefinition({
|
|
125
125
|
type: "message",
|
|
126
126
|
deserialize(obj) {
|
|
127
|
-
const {message: msg} = obj;
|
|
127
|
+
const { message: msg } = obj;
|
|
128
128
|
if (!msg || typeof msg !== "string" && !Array.isArray(msg)) {
|
|
129
129
|
throw new Error("Invalid install step, 'message' must be a string or array");
|
|
130
130
|
}
|
|
131
|
-
return new MessageStep({message: [msg].flat().join("")});
|
|
131
|
+
return new MessageStep({ message: [msg].flat().join("") });
|
|
132
132
|
},
|
|
133
133
|
create(data) {
|
|
134
134
|
return new MessageStep(data);
|
|
@@ -173,10 +173,10 @@ class PluginInstaller {
|
|
|
173
173
|
});
|
|
174
174
|
steps.push({
|
|
175
175
|
type: "dependencies",
|
|
176
|
-
step: dependencies.create({dependencies: dependencies$1})
|
|
176
|
+
step: dependencies.create({ dependencies: dependencies$1 })
|
|
177
177
|
});
|
|
178
178
|
for (const step of (_b = (_a = pkg.experimentalInstallationRecipe) == null ? void 0 : _a.steps) != null ? _b : []) {
|
|
179
|
-
const {type} = step;
|
|
179
|
+
const { type } = step;
|
|
180
180
|
const definition = stepDefinitions.find((d) => d.type === type);
|
|
181
181
|
if (definition) {
|
|
182
182
|
steps.push({
|
|
@@ -190,7 +190,7 @@ class PluginInstaller {
|
|
|
190
190
|
return steps;
|
|
191
191
|
}
|
|
192
192
|
async run() {
|
|
193
|
-
for (const {type, step} of this.steps) {
|
|
193
|
+
for (const { type, step } of this.steps) {
|
|
194
194
|
console.log(`Running step ${type}`);
|
|
195
195
|
await step.run();
|
|
196
196
|
}
|
|
@@ -201,7 +201,7 @@ var install = async (pluginId, cmd) => {
|
|
|
201
201
|
if (pluginId) {
|
|
202
202
|
pkg = await fetchPluginPackage(pluginId);
|
|
203
203
|
} else if (cmd == null ? void 0 : cmd.from) {
|
|
204
|
-
pkg = await fs__default[
|
|
204
|
+
pkg = await fs__default["default"].readJson(cmd.from);
|
|
205
205
|
} else {
|
|
206
206
|
throw new Error("Missing both <plugin-id> or a package.json file path in the --from flag.");
|
|
207
207
|
}
|
|
@@ -210,5 +210,5 @@ var install = async (pluginId, cmd) => {
|
|
|
210
210
|
await installer.run();
|
|
211
211
|
};
|
|
212
212
|
|
|
213
|
-
exports
|
|
214
|
-
//# sourceMappingURL=install-
|
|
213
|
+
exports["default"] = install;
|
|
214
|
+
//# sourceMappingURL=install-f7db6355.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-16b1d94a.cjs.js');
|
|
4
|
+
var index = require('./index-a2419466.cjs.js');
|
|
5
5
|
require('child_process');
|
|
6
6
|
require('util');
|
|
7
7
|
require('@backstage/errors');
|
|
@@ -25,5 +25,5 @@ var lint = async (cmd, cmdArgs) => {
|
|
|
25
25
|
await run.run("eslint", args);
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
exports
|
|
29
|
-
//# sourceMappingURL=lint-
|
|
28
|
+
exports["default"] = lint;
|
|
29
|
+
//# sourceMappingURL=lint-5dc7638f.cjs.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var Lockfile = require('./Lockfile-
|
|
4
|
-
require('./run-
|
|
3
|
+
var Lockfile = require('./Lockfile-35661afa.cjs.js');
|
|
4
|
+
require('./run-16b1d94a.cjs.js');
|
|
5
5
|
require('chalk');
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-a2419466.cjs.js');
|
|
7
7
|
var partition = require('lodash/partition');
|
|
8
8
|
require('fs-extra');
|
|
9
9
|
require('semver');
|
|
@@ -42,14 +42,14 @@ var lint = async (cmd) => {
|
|
|
42
42
|
lockfile.replaceVersions(result.newVersions);
|
|
43
43
|
await lockfile.save();
|
|
44
44
|
} else {
|
|
45
|
-
const [newVersionsForbidden, newVersionsAllowed] = partition__default[
|
|
45
|
+
const [newVersionsForbidden, newVersionsAllowed] = partition__default["default"](result.newVersions, ({ name }) => forbiddenDuplicatesFilter(name));
|
|
46
46
|
if (newVersionsForbidden.length && !fix) {
|
|
47
47
|
success = false;
|
|
48
48
|
}
|
|
49
49
|
logArray(newVersionsForbidden, "The following packages must be deduplicated, this can be done automatically with --fix", (e) => ` ${e.name} @ ${e.range} bumped from ${e.oldVersion} to ${e.newVersion}`);
|
|
50
50
|
logArray(newVersionsAllowed, "The following packages can be deduplicated, this can be done automatically with --fix", (e) => ` ${e.name} @ ${e.range} bumped from ${e.oldVersion} to ${e.newVersion}`);
|
|
51
51
|
}
|
|
52
|
-
const [newRangesForbidden, newRangesAllowed] = partition__default[
|
|
52
|
+
const [newRangesForbidden, newRangesAllowed] = partition__default["default"](result.newRanges, ({ name }) => forbiddenDuplicatesFilter(name));
|
|
53
53
|
if (newRangesForbidden.length) {
|
|
54
54
|
success = false;
|
|
55
55
|
}
|
|
@@ -71,7 +71,7 @@ function logArray(arr, header, each) {
|
|
|
71
71
|
console.log();
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
exports
|
|
74
|
+
exports["default"] = lint;
|
|
75
75
|
exports.forbiddenDuplicatesFilter = forbiddenDuplicatesFilter;
|
|
76
76
|
exports.includedFilter = includedFilter;
|
|
77
|
-
//# sourceMappingURL=lint-
|
|
77
|
+
//# sourceMappingURL=lint-7f529079.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-a2419466.cjs.js');
|
|
5
5
|
require('commander');
|
|
6
6
|
require('chalk');
|
|
7
7
|
require('semver');
|
|
@@ -19,19 +19,19 @@ const PKG_BACKUP_PATH = "package.json-prepack";
|
|
|
19
19
|
const pre = async () => {
|
|
20
20
|
var _a;
|
|
21
21
|
const pkgPath = index.paths.resolveTarget(PKG_PATH);
|
|
22
|
-
const pkgContent = await fs__default[
|
|
22
|
+
const pkgContent = await fs__default["default"].readFile(pkgPath, "utf8");
|
|
23
23
|
const pkg = JSON.parse(pkgContent);
|
|
24
|
-
await fs__default[
|
|
24
|
+
await fs__default["default"].writeFile(PKG_BACKUP_PATH, pkgContent);
|
|
25
25
|
for (const key of Object.keys((_a = pkg.publishConfig) != null ? _a : {})) {
|
|
26
26
|
if (!SKIPPED_KEYS.includes(key)) {
|
|
27
27
|
pkg[key] = pkg.publishConfig[key];
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
await fs__default[
|
|
30
|
+
await fs__default["default"].writeJson(pkgPath, pkg, { encoding: "utf8", spaces: 2 });
|
|
31
31
|
};
|
|
32
32
|
const post = async () => {
|
|
33
33
|
try {
|
|
34
|
-
await fs__default[
|
|
34
|
+
await fs__default["default"].move(PKG_BACKUP_PATH, PKG_PATH, { overwrite: true });
|
|
35
35
|
} catch (error) {
|
|
36
36
|
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.`);
|
|
37
37
|
}
|
|
@@ -39,4 +39,4 @@ const post = async () => {
|
|
|
39
39
|
|
|
40
40
|
exports.post = post;
|
|
41
41
|
exports.pre = pre;
|
|
42
|
-
//# sourceMappingURL=pack-
|
|
42
|
+
//# sourceMappingURL=pack-bd87bc11.cjs.js.map
|