@backstage/cli 0.18.0-next.3 → 0.18.1-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/dist/cjs/{Lockfile-48dc675e.cjs.js → Lockfile-72b7072e.cjs.js} +25 -9
- package/dist/cjs/{PackageGraph-f0f67c07.cjs.js → PackageGraph-5d948874.cjs.js} +17 -9
- package/dist/cjs/{build-031df87c.cjs.js → build-f78dac97.cjs.js} +26 -15
- package/dist/cjs/{buildBackend-18e7cabd.cjs.js → buildBackend-9ad412b4.cjs.js} +61 -36
- package/dist/cjs/{buildWorkspace-914ae12e.cjs.js → buildWorkspace-14c5555a.cjs.js} +7 -7
- package/dist/cjs/{bump-1f5a64c9.cjs.js → bump-63ce7a78.cjs.js} +88 -33
- package/dist/cjs/{clean-b8299216.cjs.js → clean-5cf1e765.cjs.js} +2 -2
- package/dist/cjs/{config-71a2dcd2.cjs.js → config-c432602b.cjs.js} +15 -11
- package/dist/cjs/{create-a9be7b0e.cjs.js → create-e0bcf927.cjs.js} +80 -32
- package/dist/cjs/{createDistWorkspace-766d0058.cjs.js → createDistWorkspace-8d497122.cjs.js} +137 -65
- package/dist/cjs/{createPlugin-d48693e2.cjs.js → createPlugin-97b1a86c.cjs.js} +69 -30
- package/dist/cjs/{diff-6421f2ce.cjs.js → diff-b5e5becb.cjs.js} +68 -16
- package/dist/cjs/{docs-ec275117.cjs.js → docs-8febf088.cjs.js} +9 -5
- package/dist/cjs/{fix-7895b0b3.cjs.js → fix-59653afd.cjs.js} +17 -7
- package/dist/cjs/{index-6767b145.cjs.js → index-4b5ea23c.cjs.js} +10 -10
- package/dist/cjs/{index-af40a01a.cjs.js → index-64071683.cjs.js} +160 -59
- package/dist/cjs/{index-cd8c20e7.cjs.js → index-7fd003de.cjs.js} +39 -12
- package/dist/cjs/{index-6b0e28e8.cjs.js → index-abf50752.cjs.js} +57 -38
- package/dist/cjs/{info-97caf6c7.cjs.js → info-b7d05969.cjs.js} +20 -6
- package/dist/cjs/{install-790d0667.cjs.js → install-b17550a5.cjs.js} +44 -17
- package/dist/cjs/{lint-41067178.cjs.js → lint-28cd7a0c.cjs.js} +4 -4
- package/dist/cjs/{lint-0206085a.cjs.js → lint-9116fb03.cjs.js} +5 -3
- package/dist/cjs/{lint-1bc2c212.cjs.js → lint-b6a6407d.cjs.js} +37 -11
- package/dist/cjs/{list-deprecations-2337d838.cjs.js → list-deprecations-645ddf66.cjs.js} +3 -3
- package/dist/cjs/{pack-b5ba1570.cjs.js → pack-85bbaf51.cjs.js} +17 -11
- package/dist/cjs/packageLintConfigs-bb58088c.cjs.js +83 -0
- package/dist/cjs/packageRole-295689e7.cjs.js +59 -0
- package/dist/cjs/{packageRoles-b5e829eb.cjs.js → packageRoles-6d4c3119.cjs.js} +5 -3
- package/dist/cjs/packageScripts-21f60a13.cjs.js +98 -0
- package/dist/cjs/{packages-7ca56467.cjs.js → packages-e645702a.cjs.js} +17 -12
- package/dist/cjs/parallel-a8f6219c.cjs.js +187 -0
- package/dist/cjs/{paths-c80fe7ab.cjs.js → paths-61bae2a9.cjs.js} +102 -57
- package/dist/cjs/{print-adfd6764.cjs.js → print-d340f261.cjs.js} +4 -4
- package/dist/cjs/{run-2bb25827.cjs.js → run-25dfd657.cjs.js} +2 -2
- package/dist/cjs/{schema-96221fea.cjs.js → schema-cd2a13c6.cjs.js} +9 -5
- package/dist/cjs/{tasks-79df19e9.cjs.js → tasks-673f06be.cjs.js} +29 -12
- package/dist/cjs/{test-17404205.cjs.js → test-4ea05d08.cjs.js} +3 -3
- package/dist/cjs/{validate-ff679735.cjs.js → validate-25c75473.cjs.js} +4 -4
- package/dist/index.cjs.js +1 -1
- package/package.json +20 -20
- package/templates/default-backend-plugin/package.json.hbs +1 -1
- package/templates/default-plugin/package.json.hbs +1 -1
- package/dist/cjs/packageLintConfigs-41dad1e5.cjs.js +0 -74
- package/dist/cjs/packageRole-41000cdd.cjs.js +0 -53
- package/dist/cjs/packageScripts-bd563024.cjs.js +0 -96
- package/dist/cjs/parallel-8286d3fa.cjs.js +0 -171
|
@@ -20,7 +20,9 @@ class CustomError extends Error {
|
|
|
20
20
|
}
|
|
21
21
|
class ExitCodeError extends CustomError {
|
|
22
22
|
constructor(code, command) {
|
|
23
|
-
super(
|
|
23
|
+
super(
|
|
24
|
+
command ? `Command '${command}' exited with code ${code}` : `Child exited with code ${code}`
|
|
25
|
+
);
|
|
24
26
|
this.code = code;
|
|
25
27
|
}
|
|
26
28
|
}
|
|
@@ -44,15 +46,15 @@ class NotFoundError extends CustomError {
|
|
|
44
46
|
|
|
45
47
|
const paths = cliCommon.findPaths(__dirname);
|
|
46
48
|
|
|
47
|
-
var version$a = "0.
|
|
49
|
+
var version$a = "0.15.0-next.2";
|
|
48
50
|
|
|
49
|
-
var version$9 = "0.18.
|
|
51
|
+
var version$9 = "0.18.1-next.1";
|
|
50
52
|
var dependencies = {
|
|
51
53
|
"@backstage/cli-common": "^0.1.9",
|
|
52
54
|
"@backstage/config": "^1.0.1",
|
|
53
|
-
"@backstage/config-loader": "^1.1.3
|
|
54
|
-
"@backstage/errors": "^1.1.0
|
|
55
|
-
"@backstage/release-manifests": "^0.0.5
|
|
55
|
+
"@backstage/config-loader": "^1.1.3",
|
|
56
|
+
"@backstage/errors": "^1.1.0",
|
|
57
|
+
"@backstage/release-manifests": "^0.0.5",
|
|
56
58
|
"@backstage/types": "^1.0.0",
|
|
57
59
|
"@hot-loader/react-dom-v16": "npm:@hot-loader/react-dom@^16.0.2",
|
|
58
60
|
"@hot-loader/react-dom-v17": "npm:@hot-loader/react-dom@^17.0.2",
|
|
@@ -62,15 +64,15 @@ var dependencies = {
|
|
|
62
64
|
"@rollup/plugin-json": "^4.1.0",
|
|
63
65
|
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
64
66
|
"@rollup/plugin-yaml": "^3.1.0",
|
|
65
|
-
"@spotify/eslint-config-base": "^
|
|
66
|
-
"@spotify/eslint-config-react": "^
|
|
67
|
-
"@spotify/eslint-config-typescript": "^
|
|
67
|
+
"@spotify/eslint-config-base": "^14.0.0",
|
|
68
|
+
"@spotify/eslint-config-react": "^14.0.0",
|
|
69
|
+
"@spotify/eslint-config-typescript": "^14.0.0",
|
|
68
70
|
"@sucrase/jest-plugin": "^2.1.1",
|
|
69
71
|
"@sucrase/webpack-loader": "^2.0.0",
|
|
70
|
-
"@svgr/plugin-jsx": "6.
|
|
71
|
-
"@svgr/plugin-svgo": "6.
|
|
72
|
-
"@svgr/rollup": "6.
|
|
73
|
-
"@svgr/webpack": "6.
|
|
72
|
+
"@svgr/plugin-jsx": "6.3.x",
|
|
73
|
+
"@svgr/plugin-svgo": "6.3.x",
|
|
74
|
+
"@svgr/rollup": "6.3.x",
|
|
75
|
+
"@svgr/webpack": "6.3.x",
|
|
74
76
|
"@types/webpack-env": "^1.15.2",
|
|
75
77
|
"@typescript-eslint/eslint-plugin": "^5.9.0",
|
|
76
78
|
"@typescript-eslint/parser": "^5.9.0",
|
|
@@ -143,14 +145,14 @@ var dependencies = {
|
|
|
143
145
|
zod: "^3.11.6"
|
|
144
146
|
};
|
|
145
147
|
var devDependencies = {
|
|
146
|
-
"@backstage/backend-common": "^0.
|
|
148
|
+
"@backstage/backend-common": "^0.15.0-next.0",
|
|
147
149
|
"@backstage/config": "^1.0.1",
|
|
148
|
-
"@backstage/core-app-api": "^1.0.
|
|
149
|
-
"@backstage/core-components": "^0.
|
|
150
|
-
"@backstage/core-plugin-api": "^1.0.
|
|
151
|
-
"@backstage/dev-utils": "^1.0.
|
|
152
|
-
"@backstage/test-utils": "^1.1.
|
|
153
|
-
"@backstage/theme": "^0.2.16
|
|
150
|
+
"@backstage/core-app-api": "^1.0.5-next.0",
|
|
151
|
+
"@backstage/core-components": "^0.11.0-next.2",
|
|
152
|
+
"@backstage/core-plugin-api": "^1.0.5-next.0",
|
|
153
|
+
"@backstage/dev-utils": "^1.0.5-next.1",
|
|
154
|
+
"@backstage/test-utils": "^1.1.3-next.0",
|
|
155
|
+
"@backstage/theme": "^0.2.16",
|
|
154
156
|
"@types/diff": "^5.0.0",
|
|
155
157
|
"@types/express": "^4.17.6",
|
|
156
158
|
"@types/fs-extra": "^9.0.1",
|
|
@@ -169,26 +171,26 @@ var devDependencies = {
|
|
|
169
171
|
"@types/yarnpkg__lockfile": "^1.1.4",
|
|
170
172
|
del: "^6.0.0",
|
|
171
173
|
"mock-fs": "^5.1.0",
|
|
172
|
-
msw: "^0.
|
|
174
|
+
msw: "^0.44.0",
|
|
173
175
|
nodemon: "^2.0.2",
|
|
174
176
|
"ts-node": "^10.0.0"
|
|
175
177
|
};
|
|
176
178
|
|
|
177
179
|
var version$8 = "1.0.1";
|
|
178
180
|
|
|
179
|
-
var version$7 = "1.0.
|
|
181
|
+
var version$7 = "1.0.5-next.0";
|
|
180
182
|
|
|
181
|
-
var version$6 = "0.
|
|
183
|
+
var version$6 = "0.11.0-next.2";
|
|
182
184
|
|
|
183
|
-
var version$5 = "1.0.
|
|
185
|
+
var version$5 = "1.0.5-next.0";
|
|
184
186
|
|
|
185
|
-
var version$4 = "1.0.
|
|
187
|
+
var version$4 = "1.0.5-next.1";
|
|
186
188
|
|
|
187
|
-
var version$3 = "1.1.
|
|
189
|
+
var version$3 = "1.1.3-next.0";
|
|
188
190
|
|
|
189
|
-
var version$2 = "0.2.16
|
|
191
|
+
var version$2 = "0.2.16";
|
|
190
192
|
|
|
191
|
-
var version$1 = "1.
|
|
193
|
+
var version$1 = "1.5.0-next.2";
|
|
192
194
|
|
|
193
195
|
const packageVersions = {
|
|
194
196
|
"@backstage/backend-common": version$a,
|
|
@@ -220,7 +222,9 @@ function createPackageVersionProvider(lockfile) {
|
|
|
220
222
|
if (name.startsWith("@types/") && (lockfileEntries == null ? void 0 : lockfileEntries.some((entry) => entry.range === "*"))) {
|
|
221
223
|
return "*";
|
|
222
224
|
}
|
|
223
|
-
const validRanges = lockfileEntries == null ? void 0 : lockfileEntries.filter(
|
|
225
|
+
const validRanges = lockfileEntries == null ? void 0 : lockfileEntries.filter(
|
|
226
|
+
(entry) => semver__default["default"].satisfies(targetVersion, entry.range)
|
|
227
|
+
);
|
|
224
228
|
const highestRange = validRanges == null ? void 0 : validRanges.slice(-1)[0];
|
|
225
229
|
if (highestRange == null ? void 0 : highestRange.range) {
|
|
226
230
|
return highestRange == null ? void 0 : highestRange.range;
|
|
@@ -243,46 +247,143 @@ const configOption = [
|
|
|
243
247
|
];
|
|
244
248
|
function registerRepoCommand(program) {
|
|
245
249
|
const command = program.command("repo [command]").description("Command that run across an entire Backstage project");
|
|
246
|
-
command.command("build").description(
|
|
247
|
-
|
|
248
|
-
|
|
250
|
+
command.command("build").description(
|
|
251
|
+
"Build packages in the project, excluding bundled app and backend packages."
|
|
252
|
+
).option(
|
|
253
|
+
"--all",
|
|
254
|
+
"Build all packages, including bundled app and backend packages."
|
|
255
|
+
).option(
|
|
256
|
+
"--since <ref>",
|
|
257
|
+
"Only build packages and their dev dependents that changed since the specified ref"
|
|
258
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./build-f78dac97.cjs.js'); }).then((m) => m.command)));
|
|
259
|
+
command.command("lint").description("Lint all packages in the project").option(
|
|
260
|
+
"--format <format>",
|
|
261
|
+
"Lint report output format",
|
|
262
|
+
"eslint-formatter-friendly"
|
|
263
|
+
).option(
|
|
264
|
+
"--since <ref>",
|
|
265
|
+
"Only lint packages that changed since the specified ref"
|
|
266
|
+
).option("--fix", "Attempt to automatically fix violations").action(lazy(() => Promise.resolve().then(function () { return require('./lint-28cd7a0c.cjs.js'); }).then((m) => m.command)));
|
|
267
|
+
command.command("list-deprecations", { hidden: true }).description("List deprecations. [EXPERIMENTAL]").option("--json", "Output as JSON").action(
|
|
268
|
+
lazy(() => Promise.resolve().then(function () { return require('./list-deprecations-645ddf66.cjs.js'); }).then((m) => m.command))
|
|
269
|
+
);
|
|
249
270
|
}
|
|
250
271
|
function registerScriptCommand(program) {
|
|
251
272
|
const command = program.command("package [command]").description("Lifecycle scripts for individual packages");
|
|
252
|
-
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(
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
command.command("
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
273
|
+
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(
|
|
274
|
+
"--inspect-brk",
|
|
275
|
+
"Enable debugger in Node.js environments, breaking before code starts"
|
|
276
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./index-abf50752.cjs.js'); }).then((m) => m.command)));
|
|
277
|
+
command.command("build").description("Build a package for production deployment or publishing").option("--role <name>", "Run the command with an explicit package role").option(
|
|
278
|
+
"--minify",
|
|
279
|
+
"Minify the generated code. Does not apply to app or backend packages."
|
|
280
|
+
).option(
|
|
281
|
+
"--experimental-type-build",
|
|
282
|
+
"Enable experimental type build. Does not apply to app or backend packages."
|
|
283
|
+
).option(
|
|
284
|
+
"--skip-build-dependencies",
|
|
285
|
+
"Skip the automatic building of local dependencies. Applies to backend packages only."
|
|
286
|
+
).option(
|
|
287
|
+
"--stats",
|
|
288
|
+
"If bundle stats are available, write them to the output directory. Applies to app packages only."
|
|
289
|
+
).option(
|
|
290
|
+
"--config <path>",
|
|
291
|
+
"Config files to load instead of app-config.yaml. Applies to app packages only.",
|
|
292
|
+
(opt, opts) => opts ? [...opts, opt] : [opt],
|
|
293
|
+
Array()
|
|
294
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./index-4b5ea23c.cjs.js'); }).then((m) => m.command)));
|
|
295
|
+
command.command("lint [directories...]").option(
|
|
296
|
+
"--format <format>",
|
|
297
|
+
"Lint report output format",
|
|
298
|
+
"eslint-formatter-friendly"
|
|
299
|
+
).option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-9116fb03.cjs.js'); }).then((m) => m.default)));
|
|
300
|
+
command.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./test-4ea05d08.cjs.js'); }).then((m) => m.default)));
|
|
301
|
+
command.command("fix", { hidden: true }).description("Applies automated fixes to the package. [EXPERIMENTAL]").option("--deps", "Only fix monorepo dependencies in package.json").action(lazy(() => Promise.resolve().then(function () { return require('./fix-59653afd.cjs.js'); }).then((m) => m.command)));
|
|
302
|
+
command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-5cf1e765.cjs.js'); }).then((m) => m.default)));
|
|
303
|
+
command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-85bbaf51.cjs.js'); }).then((m) => m.pre)));
|
|
304
|
+
command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-85bbaf51.cjs.js'); }).then((m) => m.post)));
|
|
260
305
|
}
|
|
261
306
|
function registerMigrateCommand(program) {
|
|
262
307
|
const command = program.command("migrate [command]").description("Migration utilities");
|
|
263
|
-
command.command("package-roles").description(`Add package role field to packages that don't have it`).action(lazy(() => Promise.resolve().then(function () { return require('./packageRole-
|
|
264
|
-
command.command("package-scripts").description("Set package scripts according to each package role").action(
|
|
265
|
-
|
|
308
|
+
command.command("package-roles").description(`Add package role field to packages that don't have it`).action(lazy(() => Promise.resolve().then(function () { return require('./packageRole-295689e7.cjs.js'); }).then((m) => m.default)));
|
|
309
|
+
command.command("package-scripts").description("Set package scripts according to each package role").action(
|
|
310
|
+
lazy(() => Promise.resolve().then(function () { return require('./packageScripts-21f60a13.cjs.js'); }).then((m) => m.command))
|
|
311
|
+
);
|
|
312
|
+
command.command("package-lint-configs").description(
|
|
313
|
+
"Migrates all packages to use @backstage/cli/config/eslint-factory"
|
|
314
|
+
).action(
|
|
315
|
+
lazy(() => Promise.resolve().then(function () { return require('./packageLintConfigs-bb58088c.cjs.js'); }).then((m) => m.command))
|
|
316
|
+
);
|
|
266
317
|
}
|
|
267
318
|
function registerCommands(program) {
|
|
268
|
-
program.command("create").storeOptionsAsProperties(false).description(
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
319
|
+
program.command("create").storeOptionsAsProperties(false).description(
|
|
320
|
+
"Open up an interactive guide to creating new things in your app"
|
|
321
|
+
).option(
|
|
322
|
+
"--select <name>",
|
|
323
|
+
"Select the thing you want to be creating upfront"
|
|
324
|
+
).option(
|
|
325
|
+
"--option <name>=<value>",
|
|
326
|
+
"Pre-fill options for the creation process",
|
|
327
|
+
(opt, arr) => [...arr, opt],
|
|
328
|
+
[]
|
|
329
|
+
).option("--scope <scope>", "The scope to use for new packages").option(
|
|
330
|
+
"--npm-registry <URL>",
|
|
331
|
+
"The package registry to use for new packages"
|
|
332
|
+
).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./create-e0bcf927.cjs.js'); }).then((m) => m.default)));
|
|
333
|
+
program.command("create-plugin").option(
|
|
334
|
+
"--backend",
|
|
335
|
+
"Create plugin with the backend dependencies as default"
|
|
336
|
+
).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(
|
|
337
|
+
lazy(() => Promise.resolve().then(function () { return require('./createPlugin-97b1a86c.cjs.js'); }).then((m) => m.default))
|
|
338
|
+
);
|
|
339
|
+
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-b5e5becb.cjs.js'); }).then((m) => m.default)));
|
|
340
|
+
program.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description(
|
|
341
|
+
"Run tests, forwarding args to Jest, defaulting to watch mode [DEPRECATED]"
|
|
342
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./test-4ea05d08.cjs.js'); }).then((m) => m.default)));
|
|
343
|
+
program.command("config:docs").option(
|
|
344
|
+
"--package <name>",
|
|
345
|
+
"Only include the schema that applies to the given package"
|
|
346
|
+
).description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-8febf088.cjs.js'); }).then((m) => m.default)));
|
|
347
|
+
program.command("config:print").option(
|
|
348
|
+
"--package <name>",
|
|
349
|
+
"Only load config schema that applies to the given package"
|
|
350
|
+
).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(
|
|
351
|
+
"--format <format>",
|
|
352
|
+
"Format to print the configuration in, either json or yaml [yaml]"
|
|
353
|
+
).option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-d340f261.cjs.js'); }).then((m) => m.default)));
|
|
354
|
+
program.command("config:check").option(
|
|
355
|
+
"--package <name>",
|
|
356
|
+
"Only load config schema that applies to the given package"
|
|
357
|
+
).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(
|
|
358
|
+
"Validate that the given configuration loads and matches schema"
|
|
359
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./validate-25c75473.cjs.js'); }).then((m) => m.default)));
|
|
360
|
+
program.command("config:schema").option(
|
|
361
|
+
"--package <name>",
|
|
362
|
+
"Only output config schema that applies to the given package"
|
|
363
|
+
).option(
|
|
364
|
+
"--format <format>",
|
|
365
|
+
"Format to print the schema in, either json or yaml [yaml]"
|
|
366
|
+
).description("Print configuration schema").action(lazy(() => Promise.resolve().then(function () { return require('./schema-cd2a13c6.cjs.js'); }).then((m) => m.default)));
|
|
276
367
|
registerRepoCommand(program);
|
|
277
368
|
registerScriptCommand(program);
|
|
278
369
|
registerMigrateCommand(program);
|
|
279
|
-
program.command("versions:bump").option(
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
370
|
+
program.command("versions:bump").option(
|
|
371
|
+
"--pattern <glob>",
|
|
372
|
+
"Override glob for matching packages to upgrade"
|
|
373
|
+
).option(
|
|
374
|
+
"--release <version|next|main>",
|
|
375
|
+
"Bump to a specific Backstage release line or version",
|
|
376
|
+
"main"
|
|
377
|
+
).description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-63ce7a78.cjs.js'); }).then((m) => m.default)));
|
|
378
|
+
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-b6a6407d.cjs.js'); }).then((m) => m.default)));
|
|
379
|
+
program.command("clean").description("Delete cache directories [DEPRECATED]").action(lazy(() => Promise.resolve().then(function () { return require('./clean-5cf1e765.cjs.js'); }).then((m) => m.default)));
|
|
380
|
+
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-14c5555a.cjs.js'); }).then((m) => m.default)));
|
|
381
|
+
program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-7fd003de.cjs.js'); }).then((m) => m.default)));
|
|
382
|
+
program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-b7d05969.cjs.js'); }).then((m) => m.default)));
|
|
383
|
+
program.command("install [plugin-id]", { hidden: true }).option(
|
|
384
|
+
"--from <packageJsonFilePath>",
|
|
385
|
+
"Install from a local package.json containing the installation recipe"
|
|
386
|
+
).description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-b17550a5.cjs.js'); }).then((m) => m.default)));
|
|
286
387
|
}
|
|
287
388
|
function lazy(getActionFunc) {
|
|
288
389
|
return async (...args) => {
|
|
@@ -326,4 +427,4 @@ exports.devDependencies = devDependencies;
|
|
|
326
427
|
exports.paths = paths;
|
|
327
428
|
exports.version = version;
|
|
328
429
|
exports.version$1 = version$9;
|
|
329
|
-
//# sourceMappingURL=index-
|
|
430
|
+
//# sourceMappingURL=index-64071683.cjs.js.map
|
|
@@ -4,7 +4,7 @@ var fs = require('fs-extra');
|
|
|
4
4
|
var chalk = require('chalk');
|
|
5
5
|
var yaml = require('yaml');
|
|
6
6
|
var inquirer = require('inquirer');
|
|
7
|
-
var index$1 = require('./index-
|
|
7
|
+
var index$1 = require('./index-64071683.cjs.js');
|
|
8
8
|
var crypto = require('crypto');
|
|
9
9
|
var openBrowser = require('react-dev-utils/openBrowser');
|
|
10
10
|
var request = require('@octokit/request');
|
|
@@ -89,7 +89,11 @@ class GithubCreateAppServer {
|
|
|
89
89
|
app.get("/", this.formHandler);
|
|
90
90
|
const callPromise = new Promise((resolve, reject) => {
|
|
91
91
|
app.get("/callback", (req, res) => {
|
|
92
|
-
request.request(
|
|
92
|
+
request.request(
|
|
93
|
+
`POST /app-manifests/${encodeURIComponent(
|
|
94
|
+
req.query.code
|
|
95
|
+
)}/conversions`
|
|
96
|
+
).then(({ data }) => {
|
|
93
97
|
resolve({
|
|
94
98
|
name: data.name,
|
|
95
99
|
slug: data.slug,
|
|
@@ -159,40 +163,63 @@ var index = async (org) => {
|
|
|
159
163
|
${yaml.stringify(config)}`;
|
|
160
164
|
await fs__default["default"].writeFile(index$1.paths.resolveTargetRoot(fileName), content);
|
|
161
165
|
console.log(`GitHub App configuration written to ${chalk__default["default"].cyan(fileName)}`);
|
|
162
|
-
console.log(
|
|
163
|
-
|
|
164
|
-
|
|
166
|
+
console.log(
|
|
167
|
+
chalk__default["default"].yellow(
|
|
168
|
+
"This file contains sensitive credentials, it should not be committed to version control and handled with care!"
|
|
169
|
+
)
|
|
170
|
+
);
|
|
171
|
+
console.log(
|
|
172
|
+
"Here's an example on how to update the integrations section in app-config.yaml"
|
|
173
|
+
);
|
|
174
|
+
console.log(
|
|
175
|
+
chalk__default["default"].green(`
|
|
165
176
|
integrations:
|
|
166
177
|
github:
|
|
167
178
|
- host: github.com
|
|
168
179
|
apps:
|
|
169
|
-
- $include: ${fileName}`)
|
|
180
|
+
- $include: ${fileName}`)
|
|
181
|
+
);
|
|
170
182
|
};
|
|
171
183
|
async function verifyGithubOrg(org) {
|
|
172
184
|
let response;
|
|
173
185
|
try {
|
|
174
|
-
response = await fetch__default["default"](
|
|
186
|
+
response = await fetch__default["default"](
|
|
187
|
+
`https://api.github.com/orgs/${encodeURIComponent(org)}`
|
|
188
|
+
);
|
|
175
189
|
} catch (e) {
|
|
176
|
-
console.log(
|
|
190
|
+
console.log(
|
|
191
|
+
chalk__default["default"].yellow(
|
|
192
|
+
"Warning: Unable to verify existence of GitHub organization. ",
|
|
193
|
+
e
|
|
194
|
+
)
|
|
195
|
+
);
|
|
177
196
|
}
|
|
178
197
|
if ((response == null ? void 0 : response.status) === 404) {
|
|
179
198
|
const questions = [
|
|
180
199
|
{
|
|
181
200
|
type: "confirm",
|
|
182
201
|
name: "shouldCreateOrg",
|
|
183
|
-
message: `GitHub organization ${chalk__default["default"].cyan(
|
|
202
|
+
message: `GitHub organization ${chalk__default["default"].cyan(
|
|
203
|
+
org
|
|
204
|
+
)} does not exist. Would you like to create a new Organization instead?`
|
|
184
205
|
}
|
|
185
206
|
];
|
|
186
207
|
const answers = await inquirer__default["default"].prompt(questions);
|
|
187
208
|
if (!answers.shouldCreateOrg) {
|
|
188
|
-
console.log(
|
|
209
|
+
console.log(
|
|
210
|
+
chalk__default["default"].yellow("GitHub organization must exist to create GitHub app")
|
|
211
|
+
);
|
|
189
212
|
process.exit(1);
|
|
190
213
|
}
|
|
191
214
|
openBrowser__default["default"]("https://github.com/account/organizations/new");
|
|
192
|
-
console.log(
|
|
215
|
+
console.log(
|
|
216
|
+
chalk__default["default"].yellow(
|
|
217
|
+
"Please re-run this command when you have created your new organization"
|
|
218
|
+
)
|
|
219
|
+
);
|
|
193
220
|
process.exit(0);
|
|
194
221
|
}
|
|
195
222
|
}
|
|
196
223
|
|
|
197
224
|
exports["default"] = index;
|
|
198
|
-
//# sourceMappingURL=index-
|
|
225
|
+
//# sourceMappingURL=index-7fd003de.cjs.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var fs = require('fs-extra');
|
|
4
|
-
var index = require('./index-
|
|
4
|
+
var index = require('./index-64071683.cjs.js');
|
|
5
5
|
var webpack = require('webpack');
|
|
6
|
-
var paths = require('./paths-
|
|
6
|
+
var paths = require('./paths-61bae2a9.cjs.js');
|
|
7
7
|
require('yn');
|
|
8
8
|
require('path');
|
|
9
9
|
require('react-dev-utils/FileSizeReporter');
|
|
@@ -16,18 +16,18 @@ require('webpack-node-externals');
|
|
|
16
16
|
require('@backstage/cli-common');
|
|
17
17
|
require('@manypkg/get-packages');
|
|
18
18
|
require('mini-css-extract-plugin');
|
|
19
|
-
require('./run-
|
|
19
|
+
require('./run-25dfd657.cjs.js');
|
|
20
20
|
require('eslint-webpack-plugin');
|
|
21
21
|
require('lodash/pickBy');
|
|
22
22
|
var chalk = require('chalk');
|
|
23
23
|
var WebpackDevServer = require('webpack-dev-server');
|
|
24
24
|
var openBrowser = require('react-dev-utils/openBrowser');
|
|
25
25
|
var uniq = require('lodash/uniq');
|
|
26
|
-
var config = require('./config-
|
|
27
|
-
var Lockfile = require('./Lockfile-
|
|
26
|
+
var config = require('./config-c432602b.cjs.js');
|
|
27
|
+
var Lockfile = require('./Lockfile-72b7072e.cjs.js');
|
|
28
28
|
require('minimatch');
|
|
29
|
-
var lint = require('./lint-
|
|
30
|
-
var packageRoles = require('./packageRoles-
|
|
29
|
+
var lint = require('./lint-b6a6407d.cjs.js');
|
|
30
|
+
var packageRoles = require('./packageRoles-6d4c3119.cjs.js');
|
|
31
31
|
require('commander');
|
|
32
32
|
require('semver');
|
|
33
33
|
require('@backstage/errors');
|
|
@@ -36,7 +36,7 @@ require('child_process');
|
|
|
36
36
|
require('util');
|
|
37
37
|
require('@backstage/config-loader');
|
|
38
38
|
require('@backstage/config');
|
|
39
|
-
require('./PackageGraph-
|
|
39
|
+
require('./PackageGraph-5d948874.cjs.js');
|
|
40
40
|
require('@yarnpkg/parsers');
|
|
41
41
|
require('@yarnpkg/lockfile');
|
|
42
42
|
require('lodash/partition');
|
|
@@ -89,28 +89,31 @@ async function serveBundle(options) {
|
|
|
89
89
|
baseUrl: url
|
|
90
90
|
});
|
|
91
91
|
const compiler = webpack__default["default"](config);
|
|
92
|
-
const server = new WebpackDevServer__default["default"](
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
92
|
+
const server = new WebpackDevServer__default["default"](
|
|
93
|
+
{
|
|
94
|
+
hot: !process.env.CI,
|
|
95
|
+
devMiddleware: {
|
|
96
|
+
publicPath: (_a = config.output) == null ? void 0 : _a.publicPath,
|
|
97
|
+
stats: "errors-warnings"
|
|
98
|
+
},
|
|
99
|
+
static: paths$1.targetPublic ? {
|
|
100
|
+
publicPath: (_b = config.output) == null ? void 0 : _b.publicPath,
|
|
101
|
+
directory: paths$1.targetPublic
|
|
102
|
+
} : void 0,
|
|
103
|
+
historyApiFallback: {
|
|
104
|
+
disableDotRule: true
|
|
105
|
+
},
|
|
106
|
+
https: url.protocol === "https:",
|
|
107
|
+
host,
|
|
108
|
+
port,
|
|
109
|
+
proxy: pkg.proxy,
|
|
110
|
+
allowedHosts: [url.hostname],
|
|
111
|
+
client: {
|
|
112
|
+
webSocketURL: "auto://0.0.0.0:0/ws"
|
|
113
|
+
}
|
|
104
114
|
},
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
port,
|
|
108
|
-
proxy: pkg.proxy,
|
|
109
|
-
allowedHosts: [url.hostname],
|
|
110
|
-
client: {
|
|
111
|
-
webSocketURL: "auto://0.0.0.0:0/ws"
|
|
112
|
-
}
|
|
113
|
-
}, compiler);
|
|
115
|
+
compiler
|
|
116
|
+
);
|
|
114
117
|
await new Promise((resolve, reject) => {
|
|
115
118
|
server.startCallback((err) => {
|
|
116
119
|
if (err) {
|
|
@@ -151,16 +154,26 @@ async function startFrontend(options) {
|
|
|
151
154
|
const result = lockfile.analyze({
|
|
152
155
|
filter: lint.includedFilter
|
|
153
156
|
});
|
|
154
|
-
const problemPackages = [...result.newVersions, ...result.newRanges].map(
|
|
157
|
+
const problemPackages = [...result.newVersions, ...result.newRanges].map(
|
|
158
|
+
({ name: name2 }) => name2
|
|
159
|
+
);
|
|
155
160
|
if (problemPackages.length > 1) {
|
|
156
|
-
console.log(
|
|
161
|
+
console.log(
|
|
162
|
+
chalk__default["default"].yellow(
|
|
163
|
+
`\u26A0\uFE0F Some of the following packages may be outdated or have duplicate installations:
|
|
157
164
|
|
|
158
165
|
${uniq__default["default"](problemPackages).join(", ")}
|
|
159
|
-
`
|
|
160
|
-
|
|
166
|
+
`
|
|
167
|
+
)
|
|
168
|
+
);
|
|
169
|
+
console.log(
|
|
170
|
+
chalk__default["default"].yellow(
|
|
171
|
+
`\u26A0\uFE0F This can be resolved using the following command:
|
|
161
172
|
|
|
162
173
|
yarn backstage-cli versions:check --fix
|
|
163
|
-
`
|
|
174
|
+
`
|
|
175
|
+
)
|
|
176
|
+
);
|
|
164
177
|
}
|
|
165
178
|
}
|
|
166
179
|
const { name } = await fs__default["default"].readJson(index.paths.resolveTarget("package.json"));
|
|
@@ -172,7 +185,9 @@ async function startFrontend(options) {
|
|
|
172
185
|
const appBaseUrl = config$1.frontendConfig.getString("app.baseUrl");
|
|
173
186
|
const backendBaseUrl = config$1.frontendConfig.getString("backend.baseUrl");
|
|
174
187
|
if (appBaseUrl === backendBaseUrl) {
|
|
175
|
-
console.log(
|
|
188
|
+
console.log(
|
|
189
|
+
chalk__default["default"].yellow(
|
|
190
|
+
`\u26A0\uFE0F Conflict between app baseUrl and backend baseUrl:
|
|
176
191
|
|
|
177
192
|
app.baseUrl: ${appBaseUrl}
|
|
178
193
|
backend.baseUrl: ${appBaseUrl}
|
|
@@ -180,7 +195,9 @@ async function startFrontend(options) {
|
|
|
180
195
|
Must have unique hostname and/or ports.
|
|
181
196
|
|
|
182
197
|
This can be resolved by changing app.baseUrl and backend.baseUrl to point to their respective local development ports.
|
|
183
|
-
`
|
|
198
|
+
`
|
|
199
|
+
)
|
|
200
|
+
);
|
|
184
201
|
}
|
|
185
202
|
const waitForExit = await serveBundle({
|
|
186
203
|
entry: options.entry,
|
|
@@ -215,9 +232,11 @@ async function command(opts) {
|
|
|
215
232
|
case "frontend-plugin-module":
|
|
216
233
|
return startFrontend({ entry: "dev/index", ...options });
|
|
217
234
|
default:
|
|
218
|
-
throw new Error(
|
|
235
|
+
throw new Error(
|
|
236
|
+
`Start command is not supported for package role '${role}'`
|
|
237
|
+
);
|
|
219
238
|
}
|
|
220
239
|
}
|
|
221
240
|
|
|
222
241
|
exports.command = command;
|
|
223
|
-
//# sourceMappingURL=index-
|
|
242
|
+
//# sourceMappingURL=index-abf50752.cjs.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-64071683.cjs.js');
|
|
4
4
|
var os = require('os');
|
|
5
|
-
var run = require('./run-
|
|
6
|
-
var Lockfile = require('./Lockfile-
|
|
5
|
+
var run = require('./run-25dfd657.cjs.js');
|
|
6
|
+
var Lockfile = require('./Lockfile-72b7072e.cjs.js');
|
|
7
7
|
require('minimatch');
|
|
8
8
|
require('@manypkg/get-packages');
|
|
9
9
|
require('chalk');
|
|
10
|
+
var fs = require('fs-extra');
|
|
10
11
|
require('commander');
|
|
11
|
-
require('fs-extra');
|
|
12
12
|
require('semver');
|
|
13
13
|
require('@backstage/cli-common');
|
|
14
14
|
require('@backstage/errors');
|
|
@@ -20,15 +20,29 @@ require('@yarnpkg/lockfile');
|
|
|
20
20
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
21
|
|
|
22
22
|
var os__default = /*#__PURE__*/_interopDefaultLegacy(os);
|
|
23
|
+
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
23
24
|
|
|
24
25
|
var info = async () => {
|
|
25
26
|
await new Promise(async () => {
|
|
27
|
+
var _a;
|
|
26
28
|
const yarnVersion = await run.runPlain("yarn --version");
|
|
27
|
-
const isLocal =
|
|
29
|
+
const isLocal = fs__default["default"].existsSync(index.paths.resolveOwn("./src"));
|
|
30
|
+
const backstageFile = index.paths.resolveTargetRoot("backstage.json");
|
|
31
|
+
let backstageVersion = "N/A";
|
|
32
|
+
if (fs__default["default"].existsSync(backstageFile)) {
|
|
33
|
+
try {
|
|
34
|
+
const backstageJson = await fs__default["default"].readJSON(backstageFile);
|
|
35
|
+
backstageVersion = (_a = backstageJson.version) != null ? _a : "N/A";
|
|
36
|
+
} catch (error) {
|
|
37
|
+
console.warn('The "backstage.json" file is not in the expected format');
|
|
38
|
+
console.log();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
28
41
|
console.log(`OS: ${os__default["default"].type} ${os__default["default"].release} - ${os__default["default"].platform}/${os__default["default"].arch}`);
|
|
29
42
|
console.log(`node: ${process.version}`);
|
|
30
43
|
console.log(`yarn: ${yarnVersion}`);
|
|
31
44
|
console.log(`cli: ${index.version$1} (${isLocal ? "local" : "installed"})`);
|
|
45
|
+
console.log(`backstage: ${backstageVersion}`);
|
|
32
46
|
console.log();
|
|
33
47
|
console.log("Dependencies:");
|
|
34
48
|
const lockfilePath = index.paths.resolveTargetRoot("yarn.lock");
|
|
@@ -43,4 +57,4 @@ var info = async () => {
|
|
|
43
57
|
};
|
|
44
58
|
|
|
45
59
|
exports["default"] = info;
|
|
46
|
-
//# sourceMappingURL=info-
|
|
60
|
+
//# sourceMappingURL=info-b7d05969.cjs.js.map
|