@backstage/cli 0.24.1-next.0 → 0.25.0-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.
Files changed (42) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/config/eslint-factory.js +18 -1
  3. package/dist/cjs/{build-2e41650d.cjs.js → build-e50d43f4.cjs.js} +7 -7
  4. package/dist/cjs/{buildBackend-94b4641a.cjs.js → buildBackend-15cda3e2.cjs.js} +6 -6
  5. package/dist/cjs/{buildWorkspace-70825191.cjs.js → buildWorkspace-f361048e.cjs.js} +4 -4
  6. package/dist/cjs/{bump-56080659.cjs.js → bump-1af426da.cjs.js} +5 -5
  7. package/dist/cjs/{clean-12eef9c9.cjs.js → clean-6707d1d7.cjs.js} +2 -2
  8. package/dist/cjs/{clean-77bd889d.cjs.js → clean-e012b077.cjs.js} +2 -2
  9. package/dist/cjs/{codeowners-16eb4018.cjs.js → codeowners-b924e3ee.cjs.js} +2 -2
  10. package/dist/cjs/{config-01750680.cjs.js → config-a5a109a4.cjs.js} +2 -2
  11. package/dist/cjs/{createDistWorkspace-14476d36.cjs.js → createDistWorkspace-fe786c7e.cjs.js} +3 -3
  12. package/dist/cjs/{createPlugin-97f2a180.cjs.js → createPlugin-4b17294c.cjs.js} +4 -4
  13. package/dist/cjs/{diff-01e0a7c9.cjs.js → diff-35f59383.cjs.js} +2 -2
  14. package/dist/cjs/{docs-64aa62b0.cjs.js → docs-8a7682b8.cjs.js} +3 -3
  15. package/dist/cjs/{fix-f91708ce.cjs.js → fix-c4a9979a.cjs.js} +2 -2
  16. package/dist/cjs/{index-ce7d7dc2.cjs.js → index-329b7d85.cjs.js} +3 -3
  17. package/dist/cjs/{index-88584734.cjs.js → index-3fd8f2ff.cjs.js} +46 -45
  18. package/dist/cjs/{index-2d79a61d.cjs.js → index-526375ec.cjs.js} +2 -2
  19. package/dist/cjs/{index-bafa31f0.cjs.js → index-b504bcc5.cjs.js} +63 -21
  20. package/dist/cjs/{index-1408af7a.cjs.js → index-ceba6efe.cjs.js} +8 -8
  21. package/dist/cjs/{info-95650de2.cjs.js → info-e2b46541.cjs.js} +3 -3
  22. package/dist/cjs/{install-dca97473.cjs.js → install-b6aeeb29.cjs.js} +4 -4
  23. package/dist/cjs/{lint-158ab32b.cjs.js → lint-192ddd60.cjs.js} +3 -3
  24. package/dist/cjs/{lint-228b09f1.cjs.js → lint-a862c305.cjs.js} +2 -2
  25. package/dist/cjs/{lint-b934eb50.cjs.js → lint-af7ca329.cjs.js} +2 -2
  26. package/dist/cjs/{list-deprecations-544b189a.cjs.js → list-deprecations-eb6d1502.cjs.js} +2 -2
  27. package/dist/cjs/{new-9c1ce4b2.cjs.js → new-e4ceb87b.cjs.js} +4 -4
  28. package/dist/cjs/{pack-f674b4e5.cjs.js → pack-91de1c7c.cjs.js} +2 -2
  29. package/dist/cjs/{packageDetection-40cb2007.cjs.js → packageDetection-3fde5ce9.cjs.js} +12 -9
  30. package/dist/cjs/{packageExports-9211adf3.cjs.js → packageExports-547363d8.cjs.js} +3 -3
  31. package/dist/cjs/{packageLintConfigs-62da1147.cjs.js → packageLintConfigs-16c6e2ed.cjs.js} +3 -3
  32. package/dist/cjs/{packageRole-06bfbb50.cjs.js → packageRole-e73a2616.cjs.js} +2 -2
  33. package/dist/cjs/{packages-94b58fbe.cjs.js → packages-3f3615fe.cjs.js} +3 -3
  34. package/dist/cjs/{print-0611d364.cjs.js → print-178d2b5e.cjs.js} +3 -3
  35. package/dist/cjs/{role-c039866f.cjs.js → role-07a83e82.cjs.js} +2 -2
  36. package/dist/cjs/{run-c78187b8.cjs.js → run-877b0a9e.cjs.js} +2 -2
  37. package/dist/cjs/{schema-2a466a32.cjs.js → schema-8e1a257a.cjs.js} +3 -3
  38. package/dist/cjs/{test-163cdfab.cjs.js → test-5dda367f.cjs.js} +3 -3
  39. package/dist/cjs/{test-0462b3a8.cjs.js → test-e5056035.cjs.js} +3 -3
  40. package/dist/cjs/{validate-4c6e309f.cjs.js → validate-81521e31.cjs.js} +3 -3
  41. package/dist/index.cjs.js +1 -1
  42. package/package.json +13 -12
@@ -53,13 +53,13 @@ class NotFoundError extends CustomError {
53
53
 
54
54
  const paths = cliCommon.findPaths(__dirname);
55
55
 
56
- var version$c = "0.20.0-next.0";
56
+ var version$c = "0.20.0-next.1";
57
57
 
58
- var version$b = "0.6.8-next.0";
58
+ var version$b = "0.6.8-next.1";
59
59
 
60
- var version$a = "0.2.9-next.0";
60
+ var version$a = "0.2.9-next.1";
61
61
 
62
- var version$9 = "0.24.1-next.0";
62
+ var version$9 = "0.25.0-next.1";
63
63
  var dependencies = {
64
64
  "@backstage/catalog-model": "workspace:^",
65
65
  "@backstage/cli-common": "workspace:^",
@@ -95,7 +95,7 @@ var dependencies = {
95
95
  "@swc/jest": "^0.2.22",
96
96
  "@types/jest": "^29.0.0",
97
97
  "@types/webpack-env": "^1.15.2",
98
- "@typescript-eslint/eslint-plugin": "6.11.0",
98
+ "@typescript-eslint/eslint-plugin": "^6.12.0",
99
99
  "@typescript-eslint/parser": "^6.7.2",
100
100
  "@yarnpkg/lockfile": "^1.1.0",
101
101
  "@yarnpkg/parsers": "^3.0.0-rc.4",
@@ -120,6 +120,7 @@ var dependencies = {
120
120
  "eslint-plugin-jsx-a11y": "^6.5.1",
121
121
  "eslint-plugin-react": "^7.28.0",
122
122
  "eslint-plugin-react-hooks": "^4.3.0",
123
+ "eslint-plugin-unused-imports": "^3.0.0",
123
124
  "eslint-webpack-plugin": "^3.1.1",
124
125
  express: "^4.17.1",
125
126
  "fork-ts-checker-webpack-plugin": "^7.0.0-alpha.8",
@@ -206,19 +207,19 @@ var devDependencies = {
206
207
 
207
208
  var version$8 = "1.1.1";
208
209
 
209
- var version$7 = "1.11.2-next.0";
210
+ var version$7 = "1.11.2-next.1";
210
211
 
211
- var version$6 = "0.13.9-next.0";
212
+ var version$6 = "0.13.9-next.1";
212
213
 
213
- var version$5 = "1.8.1-next.0";
214
+ var version$5 = "1.8.1-next.1";
214
215
 
215
- var version$4 = "1.0.25-next.0";
216
+ var version$4 = "1.0.25-next.1";
216
217
 
217
- var version$3 = "1.4.6-next.0";
218
+ var version$3 = "1.4.6-next.1";
218
219
 
219
220
  var version$2 = "0.5.0-next.0";
220
221
 
221
- var version$1 = "1.19.2-next.0";
222
+ var version$1 = "1.19.2-next.1";
222
223
 
223
224
  const packageVersions = {
224
225
  "@backstage/backend-common": version$c,
@@ -282,7 +283,7 @@ const configOption = [
282
283
  Array()
283
284
  ];
284
285
  function registerOnboardCommand(program) {
285
- program.command("onboard", { hidden: true }).description("Get help setting up your Backstage App.").action(lazy(() => Promise.resolve().then(function () { return require('./index-ce7d7dc2.cjs.js'); }).then((m) => m.command)));
286
+ program.command("onboard", { hidden: true }).description("Get help setting up your Backstage App.").action(lazy(() => Promise.resolve().then(function () { return require('./index-329b7d85.cjs.js'); }).then((m) => m.command)));
286
287
  }
287
288
  function registerRepoCommand(program) {
288
289
  const command = program.command("repo [command]").description("Command that run across an entire Backstage project");
@@ -294,7 +295,7 @@ function registerRepoCommand(program) {
294
295
  ).option(
295
296
  "--since <ref>",
296
297
  "Only build packages and their dev dependents that changed since the specified ref"
297
- ).action(lazy(() => Promise.resolve().then(function () { return require('./build-2e41650d.cjs.js'); }).then((m) => m.command)));
298
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./build-e50d43f4.cjs.js'); }).then((m) => m.command)));
298
299
  command.command("lint").description("Lint all packages in the project").option(
299
300
  "--format <format>",
300
301
  "Lint report output format",
@@ -302,14 +303,14 @@ function registerRepoCommand(program) {
302
303
  ).option(
303
304
  "--since <ref>",
304
305
  "Only lint packages that changed since the specified ref"
305
- ).option("--fix", "Attempt to automatically fix violations").action(lazy(() => Promise.resolve().then(function () { return require('./lint-b934eb50.cjs.js'); }).then((m) => m.command)));
306
+ ).option("--fix", "Attempt to automatically fix violations").action(lazy(() => Promise.resolve().then(function () { return require('./lint-af7ca329.cjs.js'); }).then((m) => m.command)));
306
307
  command.command("fix").description("Automatically fix packages in the project").option(
307
308
  "--check",
308
309
  "Fail if any packages would have been changed by the command"
309
- ).action(lazy(() => Promise.resolve().then(function () { return require('./fix-f91708ce.cjs.js'); }).then((m) => m.command)));
310
- command.command("clean").description("Delete cache and output directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-12eef9c9.cjs.js'); }).then((m) => m.command)));
310
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./fix-c4a9979a.cjs.js'); }).then((m) => m.command)));
311
+ command.command("clean").description("Delete cache and output directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-6707d1d7.cjs.js'); }).then((m) => m.command)));
311
312
  command.command("list-deprecations").description("List deprecations").option("--json", "Output as JSON").action(
312
- lazy(() => Promise.resolve().then(function () { return require('./list-deprecations-544b189a.cjs.js'); }).then((m) => m.command))
313
+ lazy(() => Promise.resolve().then(function () { return require('./list-deprecations-eb6d1502.cjs.js'); }).then((m) => m.command))
313
314
  );
314
315
  command.command("test").allowUnknownOption(true).option(
315
316
  "--since <ref>",
@@ -317,14 +318,14 @@ function registerRepoCommand(program) {
317
318
  ).option(
318
319
  "--jest-help",
319
320
  "Show help for Jest CLI options, which are passed through"
320
- ).description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./test-0462b3a8.cjs.js'); }).then((m) => m.command)));
321
+ ).description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./test-e5056035.cjs.js'); }).then((m) => m.command)));
321
322
  }
322
323
  function registerScriptCommand(program) {
323
324
  const command = program.command("package [command]").description("Lifecycle scripts for individual packages");
324
325
  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 [host]", "Enable debugger in Node.js environments").option(
325
326
  "--inspect-brk [host]",
326
327
  "Enable debugger in Node.js environments, breaking before code starts"
327
- ).action(lazy(() => Promise.resolve().then(function () { return require('./index-bafa31f0.cjs.js'); }).then((m) => m.command)));
328
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./index-b504bcc5.cjs.js'); }).then((m) => m.command)));
328
329
  command.command("build").description("Build a package for production deployment or publishing").option("--role <name>", "Run the command with an explicit package role").option(
329
330
  "--minify",
330
331
  "Minify the generated code. Does not apply to app or backend packages."
@@ -339,30 +340,30 @@ function registerScriptCommand(program) {
339
340
  "Config files to load instead of app-config.yaml. Applies to app packages only.",
340
341
  (opt, opts) => opts ? [...opts, opt] : [opt],
341
342
  Array()
342
- ).action(lazy(() => Promise.resolve().then(function () { return require('./index-1408af7a.cjs.js'); }).then((m) => m.command)));
343
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./index-ceba6efe.cjs.js'); }).then((m) => m.command)));
343
344
  command.command("lint [directories...]").option(
344
345
  "--format <format>",
345
346
  "Lint report output format",
346
347
  "eslint-formatter-friendly"
347
- ).option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-228b09f1.cjs.js'); }).then((m) => m.default)));
348
- 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-163cdfab.cjs.js'); }).then((m) => m.default)));
349
- command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-77bd889d.cjs.js'); }).then((m) => m.default)));
350
- command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-f674b4e5.cjs.js'); }).then((m) => m.pre)));
351
- command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-f674b4e5.cjs.js'); }).then((m) => m.post)));
348
+ ).option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-a862c305.cjs.js'); }).then((m) => m.default)));
349
+ 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-5dda367f.cjs.js'); }).then((m) => m.default)));
350
+ command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-e012b077.cjs.js'); }).then((m) => m.default)));
351
+ command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-91de1c7c.cjs.js'); }).then((m) => m.pre)));
352
+ command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-91de1c7c.cjs.js'); }).then((m) => m.post)));
352
353
  }
353
354
  function registerMigrateCommand(program) {
354
355
  const command = program.command("migrate [command]").description("Migration utilities");
355
- 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-06bfbb50.cjs.js'); }).then((m) => m.default)));
356
+ 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-e73a2616.cjs.js'); }).then((m) => m.default)));
356
357
  command.command("package-scripts").description("Set package scripts according to each package role").action(
357
358
  lazy(() => Promise.resolve().then(function () { return require('./packageScripts-bb7b6de2.cjs.js'); }).then((m) => m.command))
358
359
  );
359
360
  command.command("package-exports").description("Synchronize package subpath export definitions").action(
360
- lazy(() => Promise.resolve().then(function () { return require('./packageExports-9211adf3.cjs.js'); }).then((m) => m.command))
361
+ lazy(() => Promise.resolve().then(function () { return require('./packageExports-547363d8.cjs.js'); }).then((m) => m.command))
361
362
  );
362
363
  command.command("package-lint-configs").description(
363
364
  "Migrates all packages to use @backstage/cli/config/eslint-factory"
364
365
  ).action(
365
- lazy(() => Promise.resolve().then(function () { return require('./packageLintConfigs-62da1147.cjs.js'); }).then((m) => m.command))
366
+ lazy(() => Promise.resolve().then(function () { return require('./packageLintConfigs-16c6e2ed.cjs.js'); }).then((m) => m.command))
366
367
  );
367
368
  command.command("react-router-deps").description(
368
369
  "Migrates the react-router dependencies for all packages to be peer dependencies"
@@ -387,7 +388,7 @@ function registerCommands(program) {
387
388
  ).option(
388
389
  "--baseVersion <version>",
389
390
  "The version to use for any new packages (default: 0.1.0)"
390
- ).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-9c1ce4b2.cjs.js'); }).then((m) => m.default)));
391
+ ).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-e4ceb87b.cjs.js'); }).then((m) => m.default)));
391
392
  program.command("create", { hidden: true }).storeOptionsAsProperties(false).description(
392
393
  "Open up an interactive guide to creating new things in your app [DEPRECATED]"
393
394
  ).option(
@@ -401,30 +402,30 @@ function registerCommands(program) {
401
402
  ).option("--scope <scope>", "The scope to use for new packages").option(
402
403
  "--npm-registry <URL>",
403
404
  "The package registry to use for new packages"
404
- ).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-9c1ce4b2.cjs.js'); }).then((m) => m.default)));
405
+ ).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-e4ceb87b.cjs.js'); }).then((m) => m.default)));
405
406
  program.command("create-plugin", { hidden: true }).option(
406
407
  "--backend",
407
408
  "Create plugin with the backend dependencies as default"
408
409
  ).description("Creates a new plugin in the current repository [DEPRECATED]").option("--scope <scope>", "npm scope").option("--npm-registry <URL>", "npm registry URL").option("--no-private", "Public npm package").action(
409
- lazy(() => Promise.resolve().then(function () { return require('./createPlugin-97f2a180.cjs.js'); }).then((m) => m.default))
410
+ lazy(() => Promise.resolve().then(function () { return require('./createPlugin-4b17294c.cjs.js'); }).then((m) => m.default))
410
411
  );
411
412
  program.command("plugin:diff", { hidden: true }).option("--check", "Fail if changes are required").option("--yes", "Apply all changes").description(
412
413
  "Diff an existing plugin with the creation template [DEPRECATED]"
413
- ).action(lazy(() => Promise.resolve().then(function () { return require('./diff-01e0a7c9.cjs.js'); }).then((m) => m.default)));
414
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./diff-35f59383.cjs.js'); }).then((m) => m.default)));
414
415
  program.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description(
415
416
  "Run tests, forwarding args to Jest, defaulting to watch mode [DEPRECATED]"
416
- ).action(lazy(() => Promise.resolve().then(function () { return require('./test-163cdfab.cjs.js'); }).then((m) => m.default)));
417
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./test-5dda367f.cjs.js'); }).then((m) => m.default)));
417
418
  program.command("config:docs").option(
418
419
  "--package <name>",
419
420
  "Only include the schema that applies to the given package"
420
- ).description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-64aa62b0.cjs.js'); }).then((m) => m.default)));
421
+ ).description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-8a7682b8.cjs.js'); }).then((m) => m.default)));
421
422
  program.command("config:print").option(
422
423
  "--package <name>",
423
424
  "Only load config schema that applies to the given package"
424
425
  ).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(
425
426
  "--format <format>",
426
427
  "Format to print the configuration in, either json or yaml [yaml]"
427
- ).option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-0611d364.cjs.js'); }).then((m) => m.default)));
428
+ ).option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-178d2b5e.cjs.js'); }).then((m) => m.default)));
428
429
  program.command("config:check").option(
429
430
  "--package <name>",
430
431
  "Only load config schema that applies to the given package"
@@ -433,14 +434,14 @@ function registerCommands(program) {
433
434
  "Enable strict config validation, forbidding errors and unknown keys"
434
435
  ).option(...configOption).description(
435
436
  "Validate that the given configuration loads and matches schema"
436
- ).action(lazy(() => Promise.resolve().then(function () { return require('./validate-4c6e309f.cjs.js'); }).then((m) => m.default)));
437
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./validate-81521e31.cjs.js'); }).then((m) => m.default)));
437
438
  program.command("config:schema").option(
438
439
  "--package <name>",
439
440
  "Only output config schema that applies to the given package"
440
441
  ).option(
441
442
  "--format <format>",
442
443
  "Format to print the schema in, either json or yaml [yaml]"
443
- ).option("--merge", "Print the config schemas merged", true).option("--no-merge", "Print the config schemas not merged").description("Print configuration schema").action(lazy(() => Promise.resolve().then(function () { return require('./schema-2a466a32.cjs.js'); }).then((m) => m.default)));
444
+ ).option("--merge", "Print the config schemas merged", true).option("--no-merge", "Print the config schemas not merged").description("Print configuration schema").action(lazy(() => Promise.resolve().then(function () { return require('./schema-8e1a257a.cjs.js'); }).then((m) => m.default)));
444
445
  registerRepoCommand(program);
445
446
  registerScriptCommand(program);
446
447
  registerMigrateCommand(program);
@@ -452,19 +453,19 @@ function registerCommands(program) {
452
453
  "--release <version|next|main>",
453
454
  "Bump to a specific Backstage release line or version",
454
455
  "main"
455
- ).option("--skip-install", "Skips yarn install step").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-56080659.cjs.js'); }).then((m) => m.default)));
456
- 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-158ab32b.cjs.js'); }).then((m) => m.default)));
457
- program.command("clean").description("Delete cache directories [DEPRECATED]").action(lazy(() => Promise.resolve().then(function () { return require('./clean-77bd889d.cjs.js'); }).then((m) => m.default)));
456
+ ).option("--skip-install", "Skips yarn install step").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-1af426da.cjs.js'); }).then((m) => m.default)));
457
+ 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-192ddd60.cjs.js'); }).then((m) => m.default)));
458
+ program.command("clean").description("Delete cache directories [DEPRECATED]").action(lazy(() => Promise.resolve().then(function () { return require('./clean-e012b077.cjs.js'); }).then((m) => m.default)));
458
459
  program.command("build-workspace <workspace-dir> [packages...]").option(
459
460
  "--alwaysYarnPack",
460
461
  "Force workspace output to be a result of running `yarn pack` on each package (warning: very slow)"
461
- ).description("Builds a temporary dist workspace from the provided packages").action(lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace-70825191.cjs.js'); }).then((m) => m.default)));
462
- program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-2d79a61d.cjs.js'); }).then((m) => m.default)));
463
- program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-95650de2.cjs.js'); }).then((m) => m.default)));
462
+ ).description("Builds a temporary dist workspace from the provided packages").action(lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace-f361048e.cjs.js'); }).then((m) => m.default)));
463
+ program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-526375ec.cjs.js'); }).then((m) => m.default)));
464
+ program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-e2b46541.cjs.js'); }).then((m) => m.default)));
464
465
  program.command("install [plugin-id]", { hidden: true }).option(
465
466
  "--from <packageJsonFilePath>",
466
467
  "Install from a local package.json containing the installation recipe"
467
- ).description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-dca97473.cjs.js'); }).then((m) => m.default)));
468
+ ).description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-b6aeeb29.cjs.js'); }).then((m) => m.default)));
468
469
  }
469
470
  function lazy(getActionFunc) {
470
471
  return async (...args) => {
@@ -508,4 +509,4 @@ exports.devDependencies = devDependencies;
508
509
  exports.paths = paths;
509
510
  exports.version = version;
510
511
  exports.version$1 = version$9;
511
- //# sourceMappingURL=index-88584734.cjs.js.map
512
+ //# sourceMappingURL=index-3fd8f2ff.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-88584734.cjs.js');
7
+ var index$1 = require('./index-3fd8f2ff.cjs.js');
8
8
  var crypto = require('crypto');
9
9
  var openBrowser = require('react-dev-utils/openBrowser');
10
10
  var request = require('@octokit/request');
@@ -230,4 +230,4 @@ async function verifyGithubOrg(org) {
230
230
  }
231
231
 
232
232
  exports["default"] = index;
233
- //# sourceMappingURL=index-2d79a61d.cjs.js.map
233
+ //# sourceMappingURL=index-526375ec.cjs.js.map
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var role = require('./role-c039866f.cjs.js');
3
+ var role = require('./role-07a83e82.cjs.js');
4
4
  var fs = require('fs-extra');
5
- var index = require('./index-88584734.cjs.js');
5
+ var index = require('./index-3fd8f2ff.cjs.js');
6
6
  var webpack = require('webpack');
7
- var packageDetection = require('./packageDetection-40cb2007.cjs.js');
7
+ var packageDetection = require('./packageDetection-3fde5ce9.cjs.js');
8
8
  require('yn');
9
9
  var path = require('path');
10
10
  require('react-dev-utils/FileSizeReporter');
@@ -18,7 +18,7 @@ require('run-script-webpack-plugin');
18
18
  require('@manypkg/get-packages');
19
19
  require('webpack-node-externals');
20
20
  require('lodash/pickBy');
21
- require('./run-c78187b8.cjs.js');
21
+ require('./run-877b0a9e.cjs.js');
22
22
  require('mini-css-extract-plugin');
23
23
  require('@pmmmwh/react-refresh-webpack-plugin');
24
24
  var chalk = require('chalk');
@@ -40,8 +40,8 @@ var errors = require('@backstage/errors');
40
40
  var debounce = require('lodash/debounce');
41
41
  var url = require('url');
42
42
  var spawn = require('cross-spawn');
43
- var lint = require('./lint-158ab32b.cjs.js');
44
- var config = require('./config-01750680.cjs.js');
43
+ var lint = require('./lint-192ddd60.cjs.js');
44
+ var config = require('./config-a5a109a4.cjs.js');
45
45
  var Lockfile = require('./Lockfile-eced6070.cjs.js');
46
46
  require('commander');
47
47
  require('./entryPoints-0cc55995.cjs.js');
@@ -104,7 +104,7 @@ async function serveBackend(options) {
104
104
  }
105
105
 
106
106
  async function serveBundle(options) {
107
- var _a, _b, _c, _d;
107
+ var _a, _b, _c, _d, _e, _f, _g, _h;
108
108
  const paths = packageDetection.resolveBundlingPaths(options);
109
109
  const targetPkg = await fs__default["default"].readJson(paths.targetPackageJson);
110
110
  if (options.verifyVersions) {
@@ -136,6 +136,15 @@ async function serveBundle(options) {
136
136
  )
137
137
  );
138
138
  }
139
+ if (((_b = (_a = targetPkg.dependencies) == null ? void 0 : _a["react-router"]) == null ? void 0 : _b.includes("beta")) || ((_d = (_c = targetPkg.dependencies) == null ? void 0 : _c["react-router-dom"]) == null ? void 0 : _d.includes("beta"))) {
140
+ console.warn(
141
+ chalk__default["default"].yellow(`
142
+ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be removed in a future release.
143
+ Please migrate to use React Router v6 stable.
144
+ See https://backstage.io/docs/tutorials/react-router-stable-migration
145
+ `)
146
+ );
147
+ }
139
148
  }
140
149
  checkReactVersion();
141
150
  const { name } = await fs__default["default"].readJson(index.paths.resolveTarget("package.json"));
@@ -218,7 +227,7 @@ async function serveBundle(options) {
218
227
  inject: {
219
228
  data: {
220
229
  config: frontendConfig,
221
- publicPath: (_a = config$1.output) == null ? void 0 : _a.publicPath
230
+ publicPath: (_e = config$1.output) == null ? void 0 : _e.publicPath
222
231
  }
223
232
  }
224
233
  })
@@ -236,11 +245,11 @@ async function serveBundle(options) {
236
245
  {
237
246
  hot: !process.env.CI,
238
247
  devMiddleware: {
239
- publicPath: (_b = config$1.output) == null ? void 0 : _b.publicPath,
248
+ publicPath: (_f = config$1.output) == null ? void 0 : _f.publicPath,
240
249
  stats: "errors-warnings"
241
250
  },
242
251
  static: paths.targetPublic ? {
243
- publicPath: (_c = config$1.output) == null ? void 0 : _c.publicPath,
252
+ publicPath: (_g = config$1.output) == null ? void 0 : _g.publicPath,
244
253
  directory: paths.targetPublic
245
254
  } : void 0,
246
255
  historyApiFallback: {
@@ -248,7 +257,7 @@ async function serveBundle(options) {
248
257
  // See https://github.com/facebookincubator/create-react-app/issues/387.
249
258
  disableDotRule: true,
250
259
  // The index needs to be rewritten relative to the new public path, including subroutes.
251
- index: `${(_d = config$1.output) == null ? void 0 : _d.publicPath}index.html`
260
+ index: `${(_h = config$1.output) == null ? void 0 : _h.publicPath}index.html`
252
261
  },
253
262
  https: url.protocol === "https:" ? {
254
263
  cert: fullConfig.getString("app.https.certificate.cert"),
@@ -531,19 +540,41 @@ async function startBackendExperimental(options) {
531
540
  }
532
541
 
533
542
  async function startBackend(options) {
534
- const hasDev = await fs__default["default"].pathExists(index.paths.resolveTarget("dev"));
535
- if (hasDev) {
543
+ if (!process.env.LEGACY_BACKEND_START) {
536
544
  const waitForExit = await startBackendExperimental({
537
- entry: "dev/index",
545
+ entry: "src/index",
538
546
  checksEnabled: false,
539
547
  // not supported
540
548
  inspectEnabled: options.inspectEnabled,
541
549
  inspectBrkEnabled: options.inspectBrkEnabled
542
550
  });
543
551
  await waitForExit();
544
- } else if (!process.env.LEGACY_BACKEND_START) {
545
- const waitForExit = await startBackendExperimental({
552
+ } else {
553
+ const waitForExit = await cleanDistAndServeBackend({
546
554
  entry: "src/index",
555
+ checksEnabled: options.checksEnabled,
556
+ inspectEnabled: options.inspectEnabled,
557
+ inspectBrkEnabled: options.inspectBrkEnabled
558
+ });
559
+ await waitForExit();
560
+ }
561
+ }
562
+ async function startBackendPlugin(options) {
563
+ if (!process.env.LEGACY_BACKEND_START) {
564
+ const hasDevIndexEntry = await fs__default["default"].pathExists(
565
+ index.paths.resolveTarget("dev", "index.ts")
566
+ );
567
+ const hasSrcIndexEntry = await fs__default["default"].pathExists(
568
+ index.paths.resolveTarget("src", "run.ts")
569
+ );
570
+ if (!hasDevIndexEntry && !hasSrcIndexEntry) {
571
+ console.warn(
572
+ hasSrcIndexEntry ? `The 'dev' directory is missing. The plugin might not be updated for the new backend system. To run, use "LEGACY_BACKEND_START=1 yarn start".` : `The 'dev' directory is missing. Please create a proper dev/index.ts in order to start the plugin.`
573
+ );
574
+ return;
575
+ }
576
+ const waitForExit = await startBackendExperimental({
577
+ entry: "dev/index",
547
578
  checksEnabled: false,
548
579
  // not supported
549
580
  inspectEnabled: options.inspectEnabled,
@@ -551,9 +582,15 @@ async function startBackend(options) {
551
582
  });
552
583
  await waitForExit();
553
584
  } else {
554
- await fs__default["default"].remove(index.paths.resolveTarget("dist"));
555
- const waitForExit = await serveBackend({
556
- entry: "src/index",
585
+ const hasEntry = await fs__default["default"].pathExists(index.paths.resolveTarget("src", "run.ts"));
586
+ if (!hasEntry) {
587
+ console.warn(
588
+ `src/run.ts is missing. Please create the file or run the command without LEGACY_BACKEND_START`
589
+ );
590
+ return;
591
+ }
592
+ const waitForExit = await cleanDistAndServeBackend({
593
+ entry: "src/run",
557
594
  checksEnabled: options.checksEnabled,
558
595
  inspectEnabled: options.inspectEnabled,
559
596
  inspectBrkEnabled: options.inspectBrkEnabled
@@ -561,6 +598,10 @@ async function startBackend(options) {
561
598
  await waitForExit();
562
599
  }
563
600
  }
601
+ async function cleanDistAndServeBackend(options) {
602
+ await fs__default["default"].remove(index.paths.resolveTarget("dist"));
603
+ return serveBackend(options);
604
+ }
564
605
 
565
606
  async function startFrontend(options) {
566
607
  const waitForExit = await serveBundle({
@@ -582,10 +623,11 @@ async function command(opts) {
582
623
  };
583
624
  switch (role$1) {
584
625
  case "backend":
626
+ return startBackend(options);
585
627
  case "backend-plugin":
586
628
  case "backend-plugin-module":
587
629
  case "node-library":
588
- return startBackend(options);
630
+ return startBackendPlugin(options);
589
631
  case "frontend":
590
632
  return startFrontend({
591
633
  ...options,
@@ -604,4 +646,4 @@ async function command(opts) {
604
646
  }
605
647
 
606
648
  exports.command = command;
607
- //# sourceMappingURL=index-bafa31f0.cjs.js.map
649
+ //# sourceMappingURL=index-b504bcc5.cjs.js.map
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var createDistWorkspace = require('./createDistWorkspace-14476d36.cjs.js');
4
- var role = require('./role-c039866f.cjs.js');
3
+ var createDistWorkspace = require('./createDistWorkspace-fe786c7e.cjs.js');
4
+ var role = require('./role-07a83e82.cjs.js');
5
5
  var cliNode = require('@backstage/cli-node');
6
- var index = require('./index-88584734.cjs.js');
7
- var buildBackend = require('./buildBackend-94b4641a.cjs.js');
8
- var config = require('./config-01750680.cjs.js');
6
+ var index = require('./index-3fd8f2ff.cjs.js');
7
+ var buildBackend = require('./buildBackend-15cda3e2.cjs.js');
8
+ var config = require('./config-a5a109a4.cjs.js');
9
9
  require('chalk');
10
10
  require('fs-extra');
11
11
  require('path');
12
12
  require('os');
13
13
  require('tar');
14
14
  require('lodash/partition');
15
- require('./run-c78187b8.cjs.js');
15
+ require('./run-877b0a9e.cjs.js');
16
16
  require('child_process');
17
17
  require('util');
18
18
  require('@backstage/errors');
@@ -43,7 +43,7 @@ require('react-dev-utils/ModuleScopePlugin');
43
43
  require('run-script-webpack-plugin');
44
44
  require('@manypkg/get-packages');
45
45
  require('webpack-node-externals');
46
- require('./packageDetection-40cb2007.cjs.js');
46
+ require('./packageDetection-3fde5ce9.cjs.js');
47
47
  require('lodash/pickBy');
48
48
  require('mini-css-extract-plugin');
49
49
  require('@pmmmwh/react-refresh-webpack-plugin');
@@ -101,4 +101,4 @@ async function command(opts) {
101
101
  }
102
102
 
103
103
  exports.command = command;
104
- //# sourceMappingURL=index-1408af7a.cjs.js.map
104
+ //# sourceMappingURL=index-ceba6efe.cjs.js.map
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-88584734.cjs.js');
3
+ var index = require('./index-3fd8f2ff.cjs.js');
4
4
  var os = require('os');
5
- var run = require('./run-c78187b8.cjs.js');
5
+ var run = require('./run-877b0a9e.cjs.js');
6
6
  var Lockfile = require('./Lockfile-eced6070.cjs.js');
7
7
  require('minimatch');
8
8
  require('@manypkg/get-packages');
@@ -58,4 +58,4 @@ var info = async () => {
58
58
  };
59
59
 
60
60
  exports["default"] = info;
61
- //# sourceMappingURL=info-95650de2.cjs.js.map
61
+ //# sourceMappingURL=info-e2b46541.cjs.js.map
@@ -4,12 +4,12 @@ var fs = require('fs-extra');
4
4
  require('semver');
5
5
  require('@yarnpkg/parsers');
6
6
  require('@yarnpkg/lockfile');
7
- var packages = require('./packages-94b58fbe.cjs.js');
8
- var index = require('./index-88584734.cjs.js');
7
+ var packages = require('./packages-3f3615fe.cjs.js');
8
+ var index = require('./index-3fd8f2ff.cjs.js');
9
9
  var chalk = require('chalk');
10
10
  var sortBy = require('lodash/sortBy');
11
11
  var groupBy = require('lodash/groupBy');
12
- var run = require('./run-c78187b8.cjs.js');
12
+ var run = require('./run-877b0a9e.cjs.js');
13
13
  require('minimatch');
14
14
  require('@manypkg/get-packages');
15
15
  require('./yarn-6cd89e16.cjs.js');
@@ -268,4 +268,4 @@ var install = async (pluginId, cmd) => {
268
268
  };
269
269
 
270
270
  exports["default"] = install;
271
- //# sourceMappingURL=install-dca97473.cjs.js.map
271
+ //# sourceMappingURL=install-b6aeeb29.cjs.js.map
@@ -5,8 +5,8 @@ require('minimatch');
5
5
  require('@manypkg/get-packages');
6
6
  require('chalk');
7
7
  require('./yarn-6cd89e16.cjs.js');
8
- require('./run-c78187b8.cjs.js');
9
- var index = require('./index-88584734.cjs.js');
8
+ require('./run-877b0a9e.cjs.js');
9
+ var index = require('./index-3fd8f2ff.cjs.js');
10
10
  var partition = require('lodash/partition');
11
11
  var cliNode = require('@backstage/cli-node');
12
12
  require('fs-extra');
@@ -112,4 +112,4 @@ function logArray(arr, header, each) {
112
112
  exports["default"] = lint;
113
113
  exports.forbiddenDuplicatesFilter = forbiddenDuplicatesFilter;
114
114
  exports.includedFilter = includedFilter;
115
- //# sourceMappingURL=lint-158ab32b.cjs.js.map
115
+ //# sourceMappingURL=lint-192ddd60.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-88584734.cjs.js');
3
+ var index = require('./index-3fd8f2ff.cjs.js');
4
4
  var eslint = require('eslint');
5
5
  require('commander');
6
6
  require('chalk');
@@ -33,4 +33,4 @@ var lint = async (directories, opts) => {
33
33
  };
34
34
 
35
35
  exports["default"] = lint;
36
- //# sourceMappingURL=lint-228b09f1.cjs.js.map
36
+ //# sourceMappingURL=lint-a862c305.cjs.js.map
@@ -3,7 +3,7 @@
3
3
  var chalk = require('chalk');
4
4
  var path = require('path');
5
5
  var cliNode = require('@backstage/cli-node');
6
- var index = require('./index-88584734.cjs.js');
6
+ var index = require('./index-3fd8f2ff.cjs.js');
7
7
  var parallel = require('./parallel-2d9d247e.cjs.js');
8
8
  require('commander');
9
9
  require('fs-extra');
@@ -88,4 +88,4 @@ async function command(opts) {
88
88
  }
89
89
 
90
90
  exports.command = command;
91
- //# sourceMappingURL=lint-b934eb50.cjs.js.map
91
+ //# sourceMappingURL=lint-af7ca329.cjs.js.map
@@ -4,7 +4,7 @@ var chalk = require('chalk');
4
4
  var eslint = require('eslint');
5
5
  var path = require('path');
6
6
  var cliNode = require('@backstage/cli-node');
7
- var index = require('./index-88584734.cjs.js');
7
+ var index = require('./index-3fd8f2ff.cjs.js');
8
8
  require('commander');
9
9
  require('fs-extra');
10
10
  require('semver');
@@ -76,4 +76,4 @@ async function command(opts) {
76
76
  }
77
77
 
78
78
  exports.command = command;
79
- //# sourceMappingURL=list-deprecations-544b189a.cjs.js.map
79
+ //# sourceMappingURL=list-deprecations-eb6d1502.cjs.js.map
@@ -7,14 +7,14 @@ var chalk = require('chalk');
7
7
  var inquirer = require('inquirer');
8
8
  var camelCase = require('lodash/camelCase');
9
9
  var upperFirst = require('lodash/upperFirst');
10
- var index = require('./index-88584734.cjs.js');
11
- var codeowners = require('./codeowners-16eb4018.cjs.js');
10
+ var index = require('./index-3fd8f2ff.cjs.js');
11
+ var codeowners = require('./codeowners-b924e3ee.cjs.js');
12
12
  var tasks = require('./tasks-84de240c.cjs.js');
13
13
  var Lockfile = require('./Lockfile-eced6070.cjs.js');
14
14
  require('minimatch');
15
15
  require('@manypkg/get-packages');
16
16
  require('./yarn-6cd89e16.cjs.js');
17
- require('./run-c78187b8.cjs.js');
17
+ require('./run-877b0a9e.cjs.js');
18
18
  var partition = require('lodash/partition');
19
19
  var cliNode = require('@backstage/cli-node');
20
20
  var errors = require('@backstage/errors');
@@ -736,4 +736,4 @@ var _new = async (opts) => {
736
736
  };
737
737
 
738
738
  exports["default"] = _new;
739
- //# sourceMappingURL=new-9c1ce4b2.cjs.js.map
739
+ //# sourceMappingURL=new-e4ceb87b.cjs.js.map