@backstage/cli 0.18.0-next.2 → 0.18.1-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.
Files changed (47) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/cjs/{Lockfile-48dc675e.cjs.js → Lockfile-72b7072e.cjs.js} +25 -9
  3. package/dist/cjs/{PackageGraph-eed8a266.cjs.js → PackageGraph-6e1d4bd4.cjs.js} +17 -9
  4. package/dist/cjs/{build-90333828.cjs.js → build-3b11f7c9.cjs.js} +26 -15
  5. package/dist/cjs/{buildBackend-15dcc9d1.cjs.js → buildBackend-87996ad4.cjs.js} +61 -36
  6. package/dist/cjs/{buildWorkspace-09b15e59.cjs.js → buildWorkspace-425726da.cjs.js} +7 -7
  7. package/dist/cjs/{bump-19eae695.cjs.js → bump-f3c6b3cd.cjs.js} +88 -33
  8. package/dist/cjs/{clean-1999125e.cjs.js → clean-798512b5.cjs.js} +2 -2
  9. package/dist/cjs/{config-1ed90d1b.cjs.js → config-4a59f918.cjs.js} +15 -11
  10. package/dist/cjs/{create-75806130.cjs.js → create-a7269bb5.cjs.js} +80 -32
  11. package/dist/cjs/{createDistWorkspace-df9a4512.cjs.js → createDistWorkspace-cb9a9a84.cjs.js} +137 -65
  12. package/dist/cjs/{createPlugin-ef3ded6f.cjs.js → createPlugin-fca2c26e.cjs.js} +69 -30
  13. package/dist/cjs/{diff-50c4c806.cjs.js → diff-3dec490d.cjs.js} +68 -16
  14. package/dist/cjs/{docs-a206c58a.cjs.js → docs-e60d4fe7.cjs.js} +9 -5
  15. package/dist/cjs/{fix-c1a9161a.cjs.js → fix-b60a5395.cjs.js} +17 -7
  16. package/dist/cjs/{index-fb1178a3.cjs.js → index-131467e2.cjs.js} +10 -10
  17. package/dist/cjs/{index-5eb1b9d1.cjs.js → index-50703ee1.cjs.js} +162 -61
  18. package/dist/cjs/{index-f360881b.cjs.js → index-71d143d5.cjs.js} +57 -38
  19. package/dist/cjs/{index-c4f237a6.cjs.js → index-7efbd23e.cjs.js} +39 -12
  20. package/dist/cjs/{info-a38fff05.cjs.js → info-04610119.cjs.js} +20 -6
  21. package/dist/cjs/{install-9b4107af.cjs.js → install-589f1c25.cjs.js} +44 -17
  22. package/dist/cjs/{lint-3f8ff7a2.cjs.js → lint-41010f96.cjs.js} +37 -11
  23. package/dist/cjs/{lint-31ebf6d6.cjs.js → lint-6fcb9a70.cjs.js} +5 -3
  24. package/dist/cjs/{lint-1940d48c.cjs.js → lint-7f6b0d33.cjs.js} +4 -4
  25. package/dist/cjs/{list-deprecations-4f164324.cjs.js → list-deprecations-8aee2123.cjs.js} +3 -3
  26. package/dist/cjs/{pack-3c75d41f.cjs.js → pack-91881c2f.cjs.js} +17 -11
  27. package/dist/cjs/packageLintConfigs-f9e5fcc6.cjs.js +83 -0
  28. package/dist/cjs/packageRole-16eb6c89.cjs.js +59 -0
  29. package/dist/cjs/{packageRoles-55976918.cjs.js → packageRoles-96528891.cjs.js} +5 -3
  30. package/dist/cjs/packageScripts-eb2443c2.cjs.js +98 -0
  31. package/dist/cjs/{packages-afc2547c.cjs.js → packages-1b40c101.cjs.js} +17 -12
  32. package/dist/cjs/parallel-a8f6219c.cjs.js +187 -0
  33. package/dist/cjs/{paths-ed6a0ed3.cjs.js → paths-b34f135a.cjs.js} +100 -55
  34. package/dist/cjs/{print-79b2229c.cjs.js → print-e99d7c2e.cjs.js} +4 -4
  35. package/dist/cjs/{run-93365c94.cjs.js → run-722b1384.cjs.js} +2 -2
  36. package/dist/cjs/{schema-986415f5.cjs.js → schema-c636e913.cjs.js} +9 -5
  37. package/dist/cjs/{tasks-45f84735.cjs.js → tasks-4776baa6.cjs.js} +29 -12
  38. package/dist/cjs/{test-efcb2e7f.cjs.js → test-76539f57.cjs.js} +3 -3
  39. package/dist/cjs/{validate-79d8747b.cjs.js → validate-f9273594.cjs.js} +4 -4
  40. package/dist/index.cjs.js +1 -1
  41. package/package.json +22 -22
  42. package/templates/default-backend-plugin/package.json.hbs +1 -1
  43. package/templates/default-plugin/package.json.hbs +1 -1
  44. package/dist/cjs/packageLintConfigs-1ca98735.cjs.js +0 -74
  45. package/dist/cjs/packageRole-c532301f.cjs.js +0 -53
  46. package/dist/cjs/packageScripts-c1adcc9a.cjs.js +0 -96
  47. 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(command ? `Command '${command}' exited with code ${code}` : `Child exited with code ${code}`);
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,33 +46,33 @@ class NotFoundError extends CustomError {
44
46
 
45
47
  const paths = cliCommon.findPaths(__dirname);
46
48
 
47
- var version$a = "0.14.1-next.2";
49
+ var version$a = "0.15.0-next.0";
48
50
 
49
- var version$9 = "0.18.0-next.2";
51
+ var version$9 = "0.18.1-next.0";
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-next.0",
54
- "@backstage/errors": "^1.1.0-next.0",
55
- "@backstage/release-manifests": "^0.0.4",
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",
59
61
  "@manypkg/get-packages": "^1.1.3",
60
- "@octokit/request": "^5.4.12",
62
+ "@octokit/request": "^6.0.0",
61
63
  "@rollup/plugin-commonjs": "^22.0.0",
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": "^13.0.0",
66
- "@spotify/eslint-config-react": "^13.0.0",
67
- "@spotify/eslint-config-typescript": "^13.0.0",
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.2.x",
71
- "@svgr/plugin-svgo": "6.2.x",
72
- "@svgr/rollup": "6.2.x",
73
- "@svgr/webpack": "6.2.x",
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",
@@ -137,20 +139,20 @@ var dependencies = {
137
139
  webpack: "^5.66.0",
138
140
  "webpack-dev-server": "^4.7.3",
139
141
  "webpack-node-externals": "^3.0.0",
140
- yaml: "^1.10.0",
142
+ yaml: "^2.0.0",
141
143
  "yml-loader": "^2.1.0",
142
144
  yn: "^4.0.0",
143
145
  zod: "^3.11.6"
144
146
  };
145
147
  var devDependencies = {
146
- "@backstage/backend-common": "^0.14.1-next.2",
148
+ "@backstage/backend-common": "^0.15.0-next.0",
147
149
  "@backstage/config": "^1.0.1",
148
- "@backstage/core-app-api": "^1.0.4-next.0",
149
- "@backstage/core-components": "^0.10.0-next.2",
150
- "@backstage/core-plugin-api": "^1.0.3",
151
- "@backstage/dev-utils": "^1.0.4-next.2",
152
- "@backstage/test-utils": "^1.1.2-next.1",
153
- "@backstage/theme": "^0.2.16-next.1",
150
+ "@backstage/core-app-api": "^1.0.5-next.0",
151
+ "@backstage/core-components": "^0.10.1-next.0",
152
+ "@backstage/core-plugin-api": "^1.0.5-next.0",
153
+ "@backstage/dev-utils": "^1.0.5-next.0",
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.42.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.4-next.0";
181
+ var version$7 = "1.0.5-next.0";
180
182
 
181
- var version$6 = "0.10.0-next.2";
183
+ var version$6 = "0.10.1-next.0";
182
184
 
183
- var version$5 = "1.0.3";
185
+ var version$5 = "1.0.5-next.0";
184
186
 
185
- var version$4 = "1.0.4-next.2";
187
+ var version$4 = "1.0.5-next.0";
186
188
 
187
- var version$3 = "1.1.2-next.1";
189
+ var version$3 = "1.1.3-next.0";
188
190
 
189
- var version$2 = "0.2.16-next.1";
191
+ var version$2 = "0.2.16";
190
192
 
191
- var version$1 = "1.4.0-next.2";
193
+ var version$1 = "1.5.0-next.0";
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((entry) => semver__default["default"].satisfies(targetVersion, entry.range));
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("Build packages in the project, excluding bundled app and backend packages.").option("--all", "Build all packages, including bundled app and backend packages.").option("--since <ref>", "Only build packages and their dev dependents that changed since the specified ref").action(lazy(() => Promise.resolve().then(function () { return require('./build-90333828.cjs.js'); }).then((m) => m.command)));
247
- command.command("lint").description("Lint all packages in the project").option("--format <format>", "Lint report output format", "eslint-formatter-friendly").option("--since <ref>", "Only lint packages that changed since the specified ref").option("--fix", "Attempt to automatically fix violations").action(lazy(() => Promise.resolve().then(function () { return require('./lint-1940d48c.cjs.js'); }).then((m) => m.command)));
248
- command.command("list-deprecations", { hidden: true }).description("List deprecations. [EXPERIMENTAL]").option("--json", "Output as JSON").action(lazy(() => Promise.resolve().then(function () { return require('./list-deprecations-4f164324.cjs.js'); }).then((m) => m.command)));
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-3b11f7c9.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-7f6b0d33.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-8aee2123.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("--inspect-brk", "Enable debugger in Node.js environments, breaking before code starts").action(lazy(() => Promise.resolve().then(function () { return require('./index-f360881b.cjs.js'); }).then((m) => m.command)));
253
- command.command("build").description("Build a package for production deployment or publishing").option("--role <name>", "Run the command with an explicit package role").option("--minify", "Minify the generated code. Does not apply to app or backend packages.").option("--experimental-type-build", "Enable experimental type build. Does not apply to app or backend packages.").option("--skip-build-dependencies", "Skip the automatic building of local dependencies. Applies to backend packages only.").option("--stats", "If bundle stats are available, write them to the output directory. Applies to app packages only.").option("--config <path>", "Config files to load instead of app-config.yaml. Applies to app packages only.", (opt, opts) => opts ? [...opts, opt] : [opt], Array()).action(lazy(() => Promise.resolve().then(function () { return require('./index-fb1178a3.cjs.js'); }).then((m) => m.command)));
254
- command.command("lint [directories...]").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-31ebf6d6.cjs.js'); }).then((m) => m.default)));
255
- 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-efcb2e7f.cjs.js'); }).then((m) => m.default)));
256
- 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-c1a9161a.cjs.js'); }).then((m) => m.command)));
257
- command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-1999125e.cjs.js'); }).then((m) => m.default)));
258
- command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-3c75d41f.cjs.js'); }).then((m) => m.pre)));
259
- command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-3c75d41f.cjs.js'); }).then((m) => m.post)));
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-71d143d5.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-131467e2.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-6fcb9a70.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-76539f57.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-b60a5395.cjs.js'); }).then((m) => m.command)));
302
+ command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-798512b5.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-91881c2f.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-91881c2f.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-c532301f.cjs.js'); }).then((m) => m.default)));
264
- command.command("package-scripts").description("Set package scripts according to each package role").action(lazy(() => Promise.resolve().then(function () { return require('./packageScripts-c1adcc9a.cjs.js'); }).then((m) => m.command)));
265
- command.command("package-lint-configs").description("Migrates all packages to use @backstage/cli/config/eslint-factory").action(lazy(() => Promise.resolve().then(function () { return require('./packageLintConfigs-1ca98735.cjs.js'); }).then((m) => m.command)));
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-16eb6c89.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-eb2443c2.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-f9e5fcc6.cjs.js'); }).then((m) => m.command))
316
+ );
266
317
  }
267
318
  function registerCommands(program) {
268
- 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-75806130.cjs.js'); }).then((m) => m.default)));
269
- 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-ef3ded6f.cjs.js'); }).then((m) => m.default)));
270
- 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-50c4c806.cjs.js'); }).then((m) => m.default)));
271
- program.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description("Run tests, forwarding args to Jest, defaulting to watch mode [DEPRECATED]").action(lazy(() => Promise.resolve().then(function () { return require('./test-efcb2e7f.cjs.js'); }).then((m) => m.default)));
272
- 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-a206c58a.cjs.js'); }).then((m) => m.default)));
273
- 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-79b2229c.cjs.js'); }).then((m) => m.default)));
274
- 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-79d8747b.cjs.js'); }).then((m) => m.default)));
275
- 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-986415f5.cjs.js'); }).then((m) => m.default)));
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-a7269bb5.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-fca2c26e.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-3dec490d.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-76539f57.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-e60d4fe7.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-e99d7c2e.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-f9273594.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-c636e913.cjs.js'); }).then((m) => m.default)));
276
367
  registerRepoCommand(program);
277
368
  registerScriptCommand(program);
278
369
  registerMigrateCommand(program);
279
- program.command("versions:bump").option("--pattern <glob>", "Override glob for matching packages to upgrade").option("--release <version|next|main>", "Bump to a specific Backstage release line or version", "main").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-19eae695.cjs.js'); }).then((m) => m.default)));
280
- 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-3f8ff7a2.cjs.js'); }).then((m) => m.default)));
281
- program.command("clean").description("Delete cache directories [DEPRECATED]").action(lazy(() => Promise.resolve().then(function () { return require('./clean-1999125e.cjs.js'); }).then((m) => m.default)));
282
- 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-09b15e59.cjs.js'); }).then((m) => m.default)));
283
- program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-c4f237a6.cjs.js'); }).then((m) => m.default)));
284
- program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-a38fff05.cjs.js'); }).then((m) => m.default)));
285
- 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-9b4107af.cjs.js'); }).then((m) => m.default)));
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-f3c6b3cd.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-41010f96.cjs.js'); }).then((m) => m.default)));
379
+ program.command("clean").description("Delete cache directories [DEPRECATED]").action(lazy(() => Promise.resolve().then(function () { return require('./clean-798512b5.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-425726da.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-7efbd23e.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-04610119.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-589f1c25.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-5eb1b9d1.cjs.js.map
430
+ //# sourceMappingURL=index-50703ee1.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-5eb1b9d1.cjs.js');
4
+ var index = require('./index-50703ee1.cjs.js');
5
5
  var webpack = require('webpack');
6
- var paths = require('./paths-ed6a0ed3.cjs.js');
6
+ var paths = require('./paths-b34f135a.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-93365c94.cjs.js');
19
+ require('./run-722b1384.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-1ed90d1b.cjs.js');
27
- var Lockfile = require('./Lockfile-48dc675e.cjs.js');
26
+ var config = require('./config-4a59f918.cjs.js');
27
+ var Lockfile = require('./Lockfile-72b7072e.cjs.js');
28
28
  require('minimatch');
29
- var lint = require('./lint-3f8ff7a2.cjs.js');
30
- var packageRoles = require('./packageRoles-55976918.cjs.js');
29
+ var lint = require('./lint-41010f96.cjs.js');
30
+ var packageRoles = require('./packageRoles-96528891.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-eed8a266.cjs.js');
39
+ require('./PackageGraph-6e1d4bd4.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
- hot: !process.env.CI,
94
- devMiddleware: {
95
- publicPath: (_a = config.output) == null ? void 0 : _a.publicPath,
96
- stats: "errors-warnings"
97
- },
98
- static: paths$1.targetPublic ? {
99
- publicPath: (_b = config.output) == null ? void 0 : _b.publicPath,
100
- directory: paths$1.targetPublic
101
- } : void 0,
102
- historyApiFallback: {
103
- disableDotRule: true
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
- https: url.protocol === "https:",
106
- host,
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(({ name: name2 }) => name2);
157
+ const problemPackages = [...result.newVersions, ...result.newRanges].map(
158
+ ({ name: name2 }) => name2
159
+ );
155
160
  if (problemPackages.length > 1) {
156
- console.log(chalk__default["default"].yellow(`\u26A0\uFE0F Some of the following packages may be outdated or have duplicate installations:
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
- console.log(chalk__default["default"].yellow(`\u26A0\uFE0F This can be resolved using the following command:
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(chalk__default["default"].yellow(`\u26A0\uFE0F Conflict between app baseUrl and backend baseUrl:
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(`Start command is not supported for package role '${role}'`);
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-f360881b.cjs.js.map
242
+ //# sourceMappingURL=index-71d143d5.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-5eb1b9d1.cjs.js');
7
+ var index$1 = require('./index-50703ee1.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(`POST /app-manifests/${encodeURIComponent(req.query.code)}/conversions`).then(({ data }) => {
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(chalk__default["default"].yellow("This file contains sensitive credentials, it should not be committed to version control and handled with care!"));
163
- console.log("Here's an example on how to update the integrations section in app-config.yaml");
164
- console.log(chalk__default["default"].green(`
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"](`https://api.github.com/orgs/${encodeURIComponent(org)}`);
186
+ response = await fetch__default["default"](
187
+ `https://api.github.com/orgs/${encodeURIComponent(org)}`
188
+ );
175
189
  } catch (e) {
176
- console.log(chalk__default["default"].yellow("Warning: Unable to verify existence of GitHub organization. ", e));
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(org)} does not exist. Would you like to create a new Organization instead?`
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(chalk__default["default"].yellow("GitHub organization must exist to create GitHub app"));
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(chalk__default["default"].yellow("Please re-run this command when you have created your new organization"));
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-c4f237a6.cjs.js.map
225
+ //# sourceMappingURL=index-7efbd23e.cjs.js.map