@backstage/cli 0.26.11 → 0.27.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 (48) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/config/eslint-factory.js +1 -0
  3. package/dist/cjs/Lockfile-B4mqBkH6.cjs.js +86 -0
  4. package/dist/cjs/{build-DwlXzIpR.cjs.js → build-CKbg8vDy.cjs.js} +8 -13
  5. package/dist/cjs/{buildBackend-CrncxAY5.cjs.js → buildBackend-CKvZxnhd.cjs.js} +17 -41
  6. package/dist/cjs/{buildWorkspace-D95Cv1QN.cjs.js → buildWorkspace-Bgal1pOb.cjs.js} +4 -4
  7. package/dist/cjs/{bump-b90k9Vrg.cjs.js → bump-CiNV2fUk.cjs.js} +7 -84
  8. package/dist/cjs/{clean-Bev614vS.cjs.js → clean-DWLquyLr.cjs.js} +2 -2
  9. package/dist/cjs/{clean-Cn9pRgoI.cjs.js → clean-zL7jVsU5.cjs.js} +2 -2
  10. package/dist/cjs/{codeowners-C_BzEYI6.cjs.js → codeowners-BrkuyJ8l.cjs.js} +2 -2
  11. package/dist/cjs/{config-EizsMYjy.cjs.js → config-OxHvAWIF.cjs.js} +43 -35
  12. package/dist/cjs/{createDistWorkspace-CqCdLqOV.cjs.js → createDistWorkspace-DwyDvZfi.cjs.js} +3 -3
  13. package/dist/cjs/{createPlugin-Dp_zJ1vU.cjs.js → createPlugin-Ck9TOlnh.cjs.js} +6 -6
  14. package/dist/cjs/{diff-SflPPir6.cjs.js → diff-Dm8uwN3O.cjs.js} +2 -2
  15. package/dist/cjs/{docs-B0MlNQaZ.cjs.js → docs-DiVm3Jyl.cjs.js} +3 -3
  16. package/dist/cjs/{fix-BoMIpogO.cjs.js → fix-D7YmpV2S.cjs.js} +2 -2
  17. package/dist/cjs/{index-D6bTzT6C.cjs.js → index-0ipl86K1.cjs.js} +19 -15
  18. package/dist/cjs/{index-Do6EL2Yb.cjs.js → index-Bv4-PI5M.cjs.js} +4 -4
  19. package/dist/cjs/{index-JoytU5ZM.cjs.js → index-D18yXEOi.cjs.js} +2 -2
  20. package/dist/cjs/{index-nl4fBJN1.cjs.js → index-LFa1qFkm.cjs.js} +49 -63
  21. package/dist/cjs/{index-7vT98W4X.cjs.js → index-bOEMttRt.cjs.js} +47 -47
  22. package/dist/cjs/{info-BRPLyhql.cjs.js → info-D2kXSViM.cjs.js} +4 -4
  23. package/dist/cjs/{install-DBTY3GMv.cjs.js → install-Bps4yUpK.cjs.js} +5 -5
  24. package/dist/cjs/lint-Dkx_fBkS.cjs.js +10 -0
  25. package/dist/cjs/{lint-6Ua9puez.cjs.js → lint-lreWPKDb.cjs.js} +2 -2
  26. package/dist/cjs/{lint-DmKqylEy.cjs.js → lint-sP18LtkH.cjs.js} +2 -2
  27. package/dist/cjs/{list-deprecations-DNYfBnHZ.cjs.js → list-deprecations-DarYxnzb.cjs.js} +2 -2
  28. package/dist/cjs/{packageDetection-DlDcN5Ll.cjs.js → moduleFederation-Ds12A1ny.cjs.js} +94 -25
  29. package/dist/cjs/{new-WebKpNSz.cjs.js → new-D72AQ8YF.cjs.js} +6 -6
  30. package/dist/cjs/{pack-5if7U6_6.cjs.js → pack-BFAsZEaP.cjs.js} +2 -2
  31. package/dist/cjs/{packageExports-Ddqkury2.cjs.js → packageExports-CKvYT5Dd.cjs.js} +3 -3
  32. package/dist/cjs/{packageLintConfigs-CrhcoEVX.cjs.js → packageLintConfigs-BJUnt71U.cjs.js} +3 -3
  33. package/dist/cjs/{packageRole-CBF_rIK0.cjs.js → packageRole-BCFLf-ng.cjs.js} +2 -2
  34. package/dist/cjs/{packages-RRALGdRj.cjs.js → packages-tE0j2nFD.cjs.js} +3 -3
  35. package/dist/cjs/{print-Caq1MMDY.cjs.js → print-CE1QTUoS.cjs.js} +3 -3
  36. package/dist/cjs/{role-DNHddFRX.cjs.js → role-5g8jmQmw.cjs.js} +2 -2
  37. package/dist/cjs/{run-Dyr28990.cjs.js → run-D3KP0xX6.cjs.js} +2 -2
  38. package/dist/cjs/{schema-CXKpYRvf.cjs.js → schema-DhYVPVv8.cjs.js} +3 -3
  39. package/dist/cjs/{tasks-CMO3PrbZ.cjs.js → tasks-CFmZJX_z.cjs.js} +2 -2
  40. package/dist/cjs/{test-CyF0ge7_.cjs.js → test-BqJnIwQq.cjs.js} +3 -3
  41. package/dist/cjs/{test-CTXtMelk.cjs.js → test-CBw6il53.cjs.js} +3 -3
  42. package/dist/cjs/{validate-CPunUthn.cjs.js → validate-CebIxFrQ.cjs.js} +3 -3
  43. package/dist/index.cjs.js +1 -1
  44. package/package.json +10 -10
  45. package/templates/default-backend-plugin/package.json.hbs +0 -1
  46. package/templates/default-backend-plugin/src/service/router.ts +2 -3
  47. package/dist/cjs/Lockfile-BndFvzHc.cjs.js +0 -221
  48. package/dist/cjs/lint-CCzUmZcU.cjs.js +0 -112
@@ -47,13 +47,13 @@ class NotFoundError extends CustomError {
47
47
 
48
48
  const paths = cliCommon.findPaths(__dirname);
49
49
 
50
- var version$f = "0.23.3";
50
+ var version$f = "0.23.4-next.1";
51
51
 
52
- var version$e = "0.7.0";
52
+ var version$e = "0.7.1-next.1";
53
53
 
54
- var version$d = "0.4.4";
54
+ var version$d = "0.4.5-next.1";
55
55
 
56
- var version$c = "0.26.11";
56
+ var version$c = "0.27.0-next.1";
57
57
  var dependencies = {
58
58
  "@backstage/catalog-model": "workspace:^",
59
59
  "@backstage/cli-common": "workspace:^",
@@ -206,25 +206,25 @@ var devDependencies = {
206
206
 
207
207
  var version$b = "1.2.0";
208
208
 
209
- var version$a = "1.14.0";
209
+ var version$a = "1.14.2-next.0";
210
210
 
211
- var version$9 = "0.14.9";
211
+ var version$9 = "0.14.10-next.0";
212
212
 
213
213
  var version$8 = "1.9.3";
214
214
 
215
- var version$7 = "1.0.35";
215
+ var version$7 = "1.0.37-next.1";
216
216
 
217
- var version$6 = "1.5.8";
217
+ var version$6 = "1.5.10-next.1";
218
218
 
219
- var version$5 = "0.4.8";
219
+ var version$5 = "0.4.9-next.1";
220
220
 
221
- var version$4 = "0.22.9";
221
+ var version$4 = "0.22.10-next.1";
222
222
 
223
- var version$3 = "0.1.8";
223
+ var version$3 = "0.1.9-next.1";
224
224
 
225
225
  var version$2 = "0.5.6";
226
226
 
227
- var version$1 = "0.4.0";
227
+ var version$1 = "0.4.2-next.1";
228
228
 
229
229
  const packageVersions = {
230
230
  "@backstage/backend-common": version$f,
@@ -290,7 +290,7 @@ const configOption = [
290
290
  Array()
291
291
  ];
292
292
  function registerOnboardCommand(program) {
293
- program.command("onboard", { hidden: true }).description("Get help setting up your Backstage App.").action(lazy(() => Promise.resolve().then(function () { return require('./index-Do6EL2Yb.cjs.js'); }).then((m) => m.command)));
293
+ program.command("onboard", { hidden: true }).description("Get help setting up your Backstage App.").action(lazy(() => Promise.resolve().then(function () { return require('./index-Bv4-PI5M.cjs.js'); }).then((m) => m.command)));
294
294
  }
295
295
  function registerRepoCommand(program) {
296
296
  const command = program.command("repo [command]").description("Command that run across an entire Backstage project");
@@ -302,7 +302,7 @@ function registerRepoCommand(program) {
302
302
  ).option(
303
303
  "--since <ref>",
304
304
  "Only build packages and their dev dependents that changed since the specified ref"
305
- ).action(lazy(() => Promise.resolve().then(function () { return require('./build-DwlXzIpR.cjs.js'); }).then((m) => m.command)));
305
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./build-CKbg8vDy.cjs.js'); }).then((m) => m.command)));
306
306
  command.command("lint").description("Lint all packages in the project").option(
307
307
  "--format <format>",
308
308
  "Lint report output format",
@@ -310,17 +310,17 @@ function registerRepoCommand(program) {
310
310
  ).option(
311
311
  "--since <ref>",
312
312
  "Only lint packages that changed since the specified ref"
313
- ).option("--fix", "Attempt to automatically fix violations").action(lazy(() => Promise.resolve().then(function () { return require('./lint-6Ua9puez.cjs.js'); }).then((m) => m.command)));
313
+ ).option("--fix", "Attempt to automatically fix violations").action(lazy(() => Promise.resolve().then(function () { return require('./lint-lreWPKDb.cjs.js'); }).then((m) => m.command)));
314
314
  command.command("fix").description("Automatically fix packages in the project").option(
315
315
  "--publish",
316
316
  "Enable additional fixes that only apply when publishing packages"
317
317
  ).option(
318
318
  "--check",
319
319
  "Fail if any packages would have been changed by the command"
320
- ).action(lazy(() => Promise.resolve().then(function () { return require('./fix-BoMIpogO.cjs.js'); }).then((m) => m.command)));
321
- command.command("clean").description("Delete cache and output directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-Cn9pRgoI.cjs.js'); }).then((m) => m.command)));
320
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./fix-D7YmpV2S.cjs.js'); }).then((m) => m.command)));
321
+ command.command("clean").description("Delete cache and output directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-zL7jVsU5.cjs.js'); }).then((m) => m.command)));
322
322
  command.command("list-deprecations").description("List deprecations").option("--json", "Output as JSON").action(
323
- lazy(() => Promise.resolve().then(function () { return require('./list-deprecations-DNYfBnHZ.cjs.js'); }).then((m) => m.command))
323
+ lazy(() => Promise.resolve().then(function () { return require('./list-deprecations-DarYxnzb.cjs.js'); }).then((m) => m.command))
324
324
  );
325
325
  command.command("test").allowUnknownOption(true).option(
326
326
  "--since <ref>",
@@ -328,14 +328,14 @@ function registerRepoCommand(program) {
328
328
  ).option(
329
329
  "--jest-help",
330
330
  "Show help for Jest CLI options, which are passed through"
331
- ).description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./test-CyF0ge7_.cjs.js'); }).then((m) => m.command)));
331
+ ).description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./test-BqJnIwQq.cjs.js'); }).then((m) => m.command)));
332
332
  }
333
333
  function registerScriptCommand(program) {
334
334
  const command = program.command("package [command]").description("Lifecycle scripts for individual packages");
335
335
  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(
336
336
  "--inspect-brk [host]",
337
337
  "Enable debugger in Node.js environments, breaking before code starts"
338
- ).option("--require <path>", "Add a --require argument to the node process").action(lazy(() => Promise.resolve().then(function () { return require('./index-nl4fBJN1.cjs.js'); }).then((m) => m.command)));
338
+ ).option("--require <path>", "Add a --require argument to the node process").action(lazy(() => Promise.resolve().then(function () { return require('./index-LFa1qFkm.cjs.js'); }).then((m) => m.command)));
339
339
  command.command("build").description("Build a package for production deployment or publishing").option("--role <name>", "Run the command with an explicit package role").option(
340
340
  "--minify",
341
341
  "Minify the generated code. Does not apply to app package (app is minified by default)."
@@ -350,30 +350,30 @@ function registerScriptCommand(program) {
350
350
  "Config files to load instead of app-config.yaml. Applies to app packages only.",
351
351
  (opt, opts) => opts ? [...opts, opt] : [opt],
352
352
  Array()
353
- ).action(lazy(() => Promise.resolve().then(function () { return require('./index-D6bTzT6C.cjs.js'); }).then((m) => m.command)));
353
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./index-0ipl86K1.cjs.js'); }).then((m) => m.command)));
354
354
  command.command("lint [directories...]").option(
355
355
  "--format <format>",
356
356
  "Lint report output format",
357
357
  "eslint-formatter-friendly"
358
- ).option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-DmKqylEy.cjs.js'); }).then((m) => m.default)));
359
- 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-CTXtMelk.cjs.js'); }).then((m) => m.default)));
360
- command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-Bev614vS.cjs.js'); }).then((m) => m.default)));
361
- command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-5if7U6_6.cjs.js'); }).then((m) => m.pre)));
362
- command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-5if7U6_6.cjs.js'); }).then((m) => m.post)));
358
+ ).option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-sP18LtkH.cjs.js'); }).then((m) => m.default)));
359
+ 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-CBw6il53.cjs.js'); }).then((m) => m.default)));
360
+ command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-DWLquyLr.cjs.js'); }).then((m) => m.default)));
361
+ command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-BFAsZEaP.cjs.js'); }).then((m) => m.pre)));
362
+ command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-BFAsZEaP.cjs.js'); }).then((m) => m.post)));
363
363
  }
364
364
  function registerMigrateCommand(program) {
365
365
  const command = program.command("migrate [command]").description("Migration utilities");
366
- 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-CBF_rIK0.cjs.js'); }).then((m) => m.default)));
366
+ 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-BCFLf-ng.cjs.js'); }).then((m) => m.default)));
367
367
  command.command("package-scripts").description("Set package scripts according to each package role").action(
368
368
  lazy(() => Promise.resolve().then(function () { return require('./packageScripts-DX6dilK6.cjs.js'); }).then((m) => m.command))
369
369
  );
370
370
  command.command("package-exports").description("Synchronize package subpath export definitions").action(
371
- lazy(() => Promise.resolve().then(function () { return require('./packageExports-Ddqkury2.cjs.js'); }).then((m) => m.command))
371
+ lazy(() => Promise.resolve().then(function () { return require('./packageExports-CKvYT5Dd.cjs.js'); }).then((m) => m.command))
372
372
  );
373
373
  command.command("package-lint-configs").description(
374
374
  "Migrates all packages to use @backstage/cli/config/eslint-factory"
375
375
  ).action(
376
- lazy(() => Promise.resolve().then(function () { return require('./packageLintConfigs-CrhcoEVX.cjs.js'); }).then((m) => m.command))
376
+ lazy(() => Promise.resolve().then(function () { return require('./packageLintConfigs-BJUnt71U.cjs.js'); }).then((m) => m.command))
377
377
  );
378
378
  command.command("react-router-deps").description(
379
379
  "Migrates the react-router dependencies for all packages to be peer dependencies"
@@ -398,7 +398,7 @@ function registerCommands(program) {
398
398
  ).option(
399
399
  "--baseVersion <version>",
400
400
  "The version to use for any new packages (default: 0.1.0)"
401
- ).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-WebKpNSz.cjs.js'); }).then((m) => m.default)));
401
+ ).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-D72AQ8YF.cjs.js'); }).then((m) => m.default)));
402
402
  program.command("create", { hidden: true }).storeOptionsAsProperties(false).description(
403
403
  "Open up an interactive guide to creating new things in your app [DEPRECATED]"
404
404
  ).option(
@@ -412,30 +412,30 @@ function registerCommands(program) {
412
412
  ).option("--scope <scope>", "The scope to use for new packages").option(
413
413
  "--npm-registry <URL>",
414
414
  "The package registry to use for new packages"
415
- ).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-WebKpNSz.cjs.js'); }).then((m) => m.default)));
415
+ ).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-D72AQ8YF.cjs.js'); }).then((m) => m.default)));
416
416
  program.command("create-plugin", { hidden: true }).option(
417
417
  "--backend",
418
418
  "Create plugin with the backend dependencies as default"
419
419
  ).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(
420
- lazy(() => Promise.resolve().then(function () { return require('./createPlugin-Dp_zJ1vU.cjs.js'); }).then((m) => m.default))
420
+ lazy(() => Promise.resolve().then(function () { return require('./createPlugin-Ck9TOlnh.cjs.js'); }).then((m) => m.default))
421
421
  );
422
422
  program.command("plugin:diff", { hidden: true }).option("--check", "Fail if changes are required").option("--yes", "Apply all changes").description(
423
423
  "Diff an existing plugin with the creation template [DEPRECATED]"
424
- ).action(lazy(() => Promise.resolve().then(function () { return require('./diff-SflPPir6.cjs.js'); }).then((m) => m.default)));
424
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./diff-Dm8uwN3O.cjs.js'); }).then((m) => m.default)));
425
425
  program.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description(
426
426
  "Run tests, forwarding args to Jest, defaulting to watch mode [DEPRECATED]"
427
- ).action(lazy(() => Promise.resolve().then(function () { return require('./test-CTXtMelk.cjs.js'); }).then((m) => m.default)));
427
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./test-CBw6il53.cjs.js'); }).then((m) => m.default)));
428
428
  program.command("config:docs").option(
429
429
  "--package <name>",
430
430
  "Only include the schema that applies to the given package"
431
- ).description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-B0MlNQaZ.cjs.js'); }).then((m) => m.default)));
431
+ ).description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-DiVm3Jyl.cjs.js'); }).then((m) => m.default)));
432
432
  program.command("config:print").option(
433
433
  "--package <name>",
434
434
  "Only load config schema that applies to the given package"
435
435
  ).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(
436
436
  "--format <format>",
437
437
  "Format to print the configuration in, either json or yaml [yaml]"
438
- ).option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-Caq1MMDY.cjs.js'); }).then((m) => m.default)));
438
+ ).option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-CE1QTUoS.cjs.js'); }).then((m) => m.default)));
439
439
  program.command("config:check").option(
440
440
  "--package <name>",
441
441
  "Only load config schema that applies to the given package"
@@ -444,14 +444,14 @@ function registerCommands(program) {
444
444
  "Enable strict config validation, forbidding errors and unknown keys"
445
445
  ).option(...configOption).description(
446
446
  "Validate that the given configuration loads and matches schema"
447
- ).action(lazy(() => Promise.resolve().then(function () { return require('./validate-CPunUthn.cjs.js'); }).then((m) => m.default)));
447
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./validate-CebIxFrQ.cjs.js'); }).then((m) => m.default)));
448
448
  program.command("config:schema").option(
449
449
  "--package <name>",
450
450
  "Only output config schema that applies to the given package"
451
451
  ).option(
452
452
  "--format <format>",
453
453
  "Format to print the schema in, either json or yaml [yaml]"
454
- ).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-CXKpYRvf.cjs.js'); }).then((m) => m.default)));
454
+ ).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-DhYVPVv8.cjs.js'); }).then((m) => m.default)));
455
455
  registerRepoCommand(program);
456
456
  registerScriptCommand(program);
457
457
  registerMigrateCommand(program);
@@ -463,8 +463,8 @@ function registerCommands(program) {
463
463
  "--release <version|next|main>",
464
464
  "Bump to a specific Backstage release line or version",
465
465
  "main"
466
- ).option("--skip-install", "Skips yarn install step").option("--skip-migrate", "Skips migration of any moved packages").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-b90k9Vrg.cjs.js'); }).then(function (n) { return n.bump; }).then((m) => m.default)));
467
- 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-CCzUmZcU.cjs.js'); }).then((m) => m.default)));
466
+ ).option("--skip-install", "Skips yarn install step").option("--skip-migrate", "Skips migration of any moved packages").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-CiNV2fUk.cjs.js'); }).then(function (n) { return n.bump; }).then((m) => m.default)));
467
+ program.command("versions:check", { hidden: true }).option("--fix", "Fix any auto-fixable versioning problems").description("Check Backstage package versioning").action(lazy(() => Promise.resolve().then(function () { return require('./lint-Dkx_fBkS.cjs.js'); }).then((m) => m.default)));
468
468
  program.command("versions:migrate").option(
469
469
  "--pattern <glob>",
470
470
  "Override glob for matching packages to upgrade"
@@ -473,18 +473,18 @@ function registerCommands(program) {
473
473
  "Skip code changes and only update package.json files"
474
474
  ).description(
475
475
  "Migrate any plugins that have been moved to the @backstage-community namespace automatically"
476
- ).action(lazy(() => Promise.resolve().then(function () { return require('./bump-b90k9Vrg.cjs.js'); }).then(function (n) { return n.migrate; }).then((m) => m.default)));
477
- program.command("clean").description("Delete cache directories [DEPRECATED]").action(lazy(() => Promise.resolve().then(function () { return require('./clean-Bev614vS.cjs.js'); }).then((m) => m.default)));
476
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./bump-CiNV2fUk.cjs.js'); }).then(function (n) { return n.migrate; }).then((m) => m.default)));
477
+ program.command("clean").description("Delete cache directories [DEPRECATED]").action(lazy(() => Promise.resolve().then(function () { return require('./clean-DWLquyLr.cjs.js'); }).then((m) => m.default)));
478
478
  program.command("build-workspace <workspace-dir> [packages...]").option(
479
479
  "--alwaysYarnPack",
480
480
  "Force workspace output to be a result of running `yarn pack` on each package (warning: very slow)"
481
- ).description("Builds a temporary dist workspace from the provided packages").action(lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace-D95Cv1QN.cjs.js'); }).then((m) => m.default)));
482
- program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-JoytU5ZM.cjs.js'); }).then((m) => m.default)));
483
- program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-BRPLyhql.cjs.js'); }).then((m) => m.default)));
481
+ ).description("Builds a temporary dist workspace from the provided packages").action(lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace-Bgal1pOb.cjs.js'); }).then((m) => m.default)));
482
+ program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-D18yXEOi.cjs.js'); }).then((m) => m.default)));
483
+ program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-D2kXSViM.cjs.js'); }).then((m) => m.default)));
484
484
  program.command("install [plugin-id]", { hidden: true }).option(
485
485
  "--from <packageJsonFilePath>",
486
486
  "Install from a local package.json containing the installation recipe"
487
- ).description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-DBTY3GMv.cjs.js'); }).then((m) => m.default)));
487
+ ).description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-Bps4yUpK.cjs.js'); }).then((m) => m.default)));
488
488
  }
489
489
  function lazy(getActionFunc) {
490
490
  return async (...args) => {
@@ -528,4 +528,4 @@ exports.devDependencies = devDependencies;
528
528
  exports.paths = paths;
529
529
  exports.version = version;
530
530
  exports.version$1 = version$c;
531
- //# sourceMappingURL=index-7vT98W4X.cjs.js.map
531
+ //# sourceMappingURL=index-bOEMttRt.cjs.js.map
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-7vT98W4X.cjs.js');
3
+ var index = require('./index-bOEMttRt.cjs.js');
4
4
  var os = require('os');
5
- var run = require('./run-Dyr28990.cjs.js');
6
- var Lockfile = require('./Lockfile-BndFvzHc.cjs.js');
5
+ var run = require('./run-D3KP0xX6.cjs.js');
6
+ var Lockfile = require('./Lockfile-B4mqBkH6.cjs.js');
7
7
  require('minimatch');
8
8
  require('@manypkg/get-packages');
9
9
  require('chalk');
@@ -57,4 +57,4 @@ var info = async () => {
57
57
  };
58
58
 
59
59
  exports.default = info;
60
- //# sourceMappingURL=info-BRPLyhql.cjs.js.map
60
+ //# sourceMappingURL=info-D2kXSViM.cjs.js.map
@@ -1,15 +1,14 @@
1
1
  'use strict';
2
2
 
3
3
  var fs = require('fs-extra');
4
- require('semver');
5
4
  require('@yarnpkg/parsers');
6
5
  require('@yarnpkg/lockfile');
7
- var packages = require('./packages-RRALGdRj.cjs.js');
8
- var index = require('./index-7vT98W4X.cjs.js');
6
+ var packages = require('./packages-tE0j2nFD.cjs.js');
7
+ var index = require('./index-bOEMttRt.cjs.js');
9
8
  var chalk = require('chalk');
10
9
  var sortBy = require('lodash/sortBy');
11
10
  var groupBy = require('lodash/groupBy');
12
- var run = require('./run-Dyr28990.cjs.js');
11
+ var run = require('./run-D3KP0xX6.cjs.js');
13
12
  require('minimatch');
14
13
  require('@manypkg/get-packages');
15
14
  require('./yarn-Ukl9MOS0.cjs.js');
@@ -17,6 +16,7 @@ require('@backstage/errors');
17
16
  require('child_process');
18
17
  require('util');
19
18
  require('commander');
19
+ require('semver');
20
20
  require('@backstage/cli-common');
21
21
 
22
22
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
@@ -265,4 +265,4 @@ var install = async (pluginId, cmd) => {
265
265
  };
266
266
 
267
267
  exports.default = install;
268
- //# sourceMappingURL=install-DBTY3GMv.cjs.js.map
268
+ //# sourceMappingURL=install-Bps4yUpK.cjs.js.map
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var lint = async () => {
4
+ throw new Error(
5
+ "This command has been removed, please consider alternatives such as `yarn dedupe` instead."
6
+ );
7
+ };
8
+
9
+ exports.default = lint;
10
+ //# sourceMappingURL=lint-Dkx_fBkS.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-7vT98W4X.cjs.js');
6
+ var index = require('./index-bOEMttRt.cjs.js');
7
7
  var parallel = require('./parallel-BszNaKyc.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-6Ua9puez.cjs.js.map
91
+ //# sourceMappingURL=lint-lreWPKDb.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-7vT98W4X.cjs.js');
3
+ var index = require('./index-bOEMttRt.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-DmKqylEy.cjs.js.map
36
+ //# sourceMappingURL=lint-sP18LtkH.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-7vT98W4X.cjs.js');
7
+ var index = require('./index-bOEMttRt.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-DNYfBnHZ.cjs.js.map
79
+ //# sourceMappingURL=list-deprecations-DarYxnzb.cjs.js.map
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var path = require('path');
4
+ var chalk = require('chalk');
4
5
  var webpack = require('webpack');
5
6
  var ESLintPlugin = require('eslint-webpack-plugin');
6
7
  var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
@@ -9,16 +10,16 @@ var webpack$1 = require('@module-federation/enhanced/webpack');
9
10
  var cliCommon = require('@backstage/cli-common');
10
11
  var ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
11
12
  var runScriptWebpackPlugin = require('run-script-webpack-plugin');
12
- var index = require('./index-7vT98W4X.cjs.js');
13
+ var ReactRefreshPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
14
+ var index = require('./index-bOEMttRt.cjs.js');
13
15
  var fs = require('fs-extra');
14
16
  var getPackages = require('@manypkg/get-packages');
15
17
  var nodeExternals = require('webpack-node-externals');
16
18
  var pickBy = require('lodash/pickBy');
17
19
  var entryPoints = require('./entryPoints-CoHH4lBA.cjs.js');
18
- var run = require('./run-Dyr28990.cjs.js');
20
+ var run = require('./run-D3KP0xX6.cjs.js');
19
21
  var MiniCssExtractPlugin = require('mini-css-extract-plugin');
20
22
  var svgrTemplate = require('./svgrTemplate-BTjBQ3by.cjs.js');
21
- var ReactRefreshPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
22
23
  var yn = require('yn');
23
24
  var config = require('@backstage/config');
24
25
  var chokidar = require('chokidar');
@@ -26,16 +27,17 @@ var PQueue = require('p-queue');
26
27
 
27
28
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
28
29
 
30
+ var chalk__default = /*#__PURE__*/_interopDefaultCompat(chalk);
29
31
  var webpack__default = /*#__PURE__*/_interopDefaultCompat(webpack);
30
32
  var ESLintPlugin__default = /*#__PURE__*/_interopDefaultCompat(ESLintPlugin);
31
33
  var ForkTsCheckerWebpackPlugin__default = /*#__PURE__*/_interopDefaultCompat(ForkTsCheckerWebpackPlugin);
32
34
  var HtmlWebpackPlugin__default = /*#__PURE__*/_interopDefaultCompat(HtmlWebpackPlugin);
33
35
  var ModuleScopePlugin__default = /*#__PURE__*/_interopDefaultCompat(ModuleScopePlugin);
36
+ var ReactRefreshPlugin__default = /*#__PURE__*/_interopDefaultCompat(ReactRefreshPlugin);
34
37
  var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
35
38
  var nodeExternals__default = /*#__PURE__*/_interopDefaultCompat(nodeExternals);
36
39
  var pickBy__default = /*#__PURE__*/_interopDefaultCompat(pickBy);
37
40
  var MiniCssExtractPlugin__default = /*#__PURE__*/_interopDefaultCompat(MiniCssExtractPlugin);
38
- var ReactRefreshPlugin__default = /*#__PURE__*/_interopDefaultCompat(ReactRefreshPlugin);
39
41
  var yn__default = /*#__PURE__*/_interopDefaultCompat(yn);
40
42
  var chokidar__default = /*#__PURE__*/_interopDefaultCompat(chokidar);
41
43
  var PQueue__default = /*#__PURE__*/_interopDefaultCompat(PQueue);
@@ -87,13 +89,13 @@ const optimization = (options) => {
87
89
  minimize: !isDev,
88
90
  minimizer: [
89
91
  new EsbuildPlugin({
90
- target: "es2019",
92
+ target: "ES2022",
91
93
  format: "iife",
92
94
  exclude: "remoteEntry.js"
93
95
  }),
94
96
  // Avoid iife wrapping of module federation remote entry as it breaks the variable assignment
95
97
  new EsbuildPlugin({
96
- target: "es2019",
98
+ target: "ES2022",
97
99
  format: void 0,
98
100
  include: "remoteEntry.js"
99
101
  })
@@ -159,7 +161,7 @@ const transforms = (options) => {
159
161
  loader: require.resolve("swc-loader"),
160
162
  options: {
161
163
  jsc: {
162
- target: "es2019",
164
+ target: "es2022",
163
165
  externalHelpers: !isBackend,
164
166
  parser: {
165
167
  syntax: "typescript",
@@ -185,7 +187,7 @@ const transforms = (options) => {
185
187
  loader: require.resolve("swc-loader"),
186
188
  options: {
187
189
  jsc: {
188
- target: "es2019",
190
+ target: "es2022",
189
191
  externalHelpers: !isBackend,
190
192
  parser: {
191
193
  syntax: "ecmascript",
@@ -216,7 +218,7 @@ const transforms = (options) => {
216
218
  loader: require.resolve("swc-loader"),
217
219
  options: {
218
220
  jsc: {
219
- target: "es2019",
221
+ target: "es2022",
220
222
  externalHelpers: !isBackend,
221
223
  parser: {
222
224
  syntax: "ecmascript",
@@ -286,15 +288,7 @@ const transforms = (options) => {
286
288
  }
287
289
  ];
288
290
  const plugins = new Array();
289
- if (isDev) {
290
- if (!isBackend) {
291
- plugins.push(
292
- new ReactRefreshPlugin__default.default({
293
- overlay: { sockProtocol: "ws" }
294
- })
295
- );
296
- }
297
- } else {
291
+ if (!isDev) {
298
292
  plugins.push(
299
293
  new MiniCssExtractPlugin__default.default({
300
294
  filename: "static/[name].[contenthash:8].css",
@@ -317,14 +311,22 @@ function hasReactDomClient() {
317
311
  }
318
312
 
319
313
  const BUILD_CACHE_ENV_VAR = "BACKSTAGE_CLI_EXPERIMENTAL_BUILD_CACHE";
320
- function resolveBaseUrl(config) {
314
+ function resolveBaseUrl(config, moduleFederation) {
321
315
  const baseUrl = config.getOptionalString("app.baseUrl");
316
+ const defaultBaseUrl = moduleFederation?.mode === "remote" ? `http://localhost:${process.env.PORT ?? "3000"}` : "http://localhost:3000";
322
317
  try {
323
- return new URL(baseUrl ?? "/", "http://localhost:3000");
318
+ return new URL(baseUrl ?? "/", defaultBaseUrl);
324
319
  } catch (error) {
325
320
  throw new Error(`Invalid app.baseUrl, ${error}`);
326
321
  }
327
322
  }
323
+ function resolveEndpoint(config, moduleFederation) {
324
+ const url = resolveBaseUrl(config, moduleFederation);
325
+ return {
326
+ host: config.getOptionalString("app.listen.host") ?? url.hostname,
327
+ port: config.getOptionalNumber("app.listen.port") ?? Number(url.port) ?? (url.protocol === "https:" ? 443 : 80)
328
+ };
329
+ }
328
330
  async function readBuildInfo() {
329
331
  const timestamp = Date.now();
330
332
  let commit;
@@ -354,15 +356,36 @@ async function readBuildInfo() {
354
356
  };
355
357
  }
356
358
  async function createConfig(paths, options) {
357
- const { checksEnabled, isDev, frontendConfig, publicSubPath = "" } = options;
359
+ const {
360
+ checksEnabled,
361
+ isDev,
362
+ frontendConfig,
363
+ moduleFederation,
364
+ publicSubPath = ""
365
+ } = options;
358
366
  const { plugins, loaders } = transforms(options);
359
367
  const { packages } = await getPackages.getPackages(index.paths.targetDir);
360
368
  const externalPkgs = packages.filter((p) => !cliCommon.isChildPath(paths.root, p.dir));
361
- const validBaseUrl = resolveBaseUrl(frontendConfig);
369
+ const validBaseUrl = resolveBaseUrl(frontendConfig, moduleFederation);
362
370
  let publicPath = validBaseUrl.pathname.replace(/\/$/, "");
363
371
  if (publicSubPath) {
364
372
  publicPath = `${publicPath}${publicSubPath}`.replace("//", "/");
365
373
  }
374
+ if (isDev) {
375
+ const { host, port } = resolveEndpoint(
376
+ options.frontendConfig,
377
+ options.moduleFederation
378
+ );
379
+ plugins.push(
380
+ new ReactRefreshPlugin__default.default({
381
+ overlay: {
382
+ sockProtocol: "ws",
383
+ sockHost: host,
384
+ sockPort: port
385
+ }
386
+ })
387
+ );
388
+ }
366
389
  if (checksEnabled) {
367
390
  plugins.push(
368
391
  new ForkTsCheckerWebpackPlugin__default.default({
@@ -475,11 +498,37 @@ async function createConfig(paths, options) {
475
498
  require.resolve("@pmmmwh/react-refresh-webpack-plugin/overlay/index.js"),
476
499
  require.resolve("react-refresh")
477
500
  ];
501
+ const mode = isDev ? "development" : "production";
502
+ const optimization$1 = optimization(options);
503
+ if (mode === "production" && process.env.EXPERIMENTAL_MODULE_FEDERATION && process.env.FORCE_REACT_DEVELOPMENT) {
504
+ console.log(
505
+ chalk__default.default.yellow(
506
+ `\u26A0\uFE0F WARNING: Forcing react and react-dom into development mode. This build should not be used in production.`
507
+ )
508
+ );
509
+ const reactPackageDirs = [
510
+ `${path.dirname(require.resolve("react/package.json"))}/`,
511
+ `${path.dirname(require.resolve("react-dom/package.json"))}/`
512
+ ];
513
+ optimization$1.nodeEnv = false;
514
+ plugins.push(
515
+ new webpack__default.default.DefinePlugin({
516
+ "process.env.NODE_ENV": webpack__default.default.DefinePlugin.runtimeValue(
517
+ ({ module }) => {
518
+ if (reactPackageDirs.some((val) => module.resource.startsWith(val))) {
519
+ return '"development"';
520
+ }
521
+ return `"${mode}"`;
522
+ }
523
+ )
524
+ })
525
+ );
526
+ }
478
527
  const withCache = yn__default.default(process.env[BUILD_CACHE_ENV_VAR], { default: false });
479
528
  return {
480
- mode: isDev ? "development" : "production",
529
+ mode,
481
530
  profile: false,
482
- optimization: optimization(options),
531
+ optimization: optimization$1,
483
532
  bail: false,
484
533
  performance: {
485
534
  hints: false
@@ -809,11 +858,31 @@ async function createDetectedModulesEntryPoint(options) {
809
858
  return [DETECTED_MODULES_MODULE_NAME];
810
859
  }
811
860
 
861
+ function getModuleFederationOptions(name, isModuleFederationRemote) {
862
+ if (!isModuleFederationRemote && !process.env.EXPERIMENTAL_MODULE_FEDERATION) {
863
+ return void 0;
864
+ }
865
+ console.log(
866
+ chalk__default.default.yellow(
867
+ `\u26A0\uFE0F WARNING: Module federation is experimental and will receive immediate breaking changes in the future.`
868
+ )
869
+ );
870
+ return {
871
+ mode: isModuleFederationRemote ? "remote" : "host",
872
+ // The default output mode requires the name to be a usable as a code
873
+ // symbol, there might be better options here but for now we need to
874
+ // sanitize the name.
875
+ name: name.replaceAll("@", "").replaceAll("/", "__").replaceAll("-", "_")
876
+ };
877
+ }
878
+
812
879
  exports.createBackendConfig = createBackendConfig;
813
880
  exports.createConfig = createConfig;
814
881
  exports.createDetectedModulesEntryPoint = createDetectedModulesEntryPoint;
882
+ exports.getModuleFederationOptions = getModuleFederationOptions;
815
883
  exports.hasReactDomClient = hasReactDomClient;
816
884
  exports.resolveBaseUrl = resolveBaseUrl;
817
885
  exports.resolveBundlingPaths = resolveBundlingPaths;
886
+ exports.resolveEndpoint = resolveEndpoint;
818
887
  exports.resolveOptionalBundlingPaths = resolveOptionalBundlingPaths;
819
- //# sourceMappingURL=packageDetection-DlDcN5Ll.cjs.js.map
888
+ //# sourceMappingURL=moduleFederation-Ds12A1ny.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-7vT98W4X.cjs.js');
11
- var codeowners = require('./codeowners-C_BzEYI6.cjs.js');
12
- var tasks = require('./tasks-CMO3PrbZ.cjs.js');
13
- var Lockfile = require('./Lockfile-BndFvzHc.cjs.js');
10
+ var index = require('./index-bOEMttRt.cjs.js');
11
+ var codeowners = require('./codeowners-BrkuyJ8l.cjs.js');
12
+ var tasks = require('./tasks-CFmZJX_z.cjs.js');
13
+ var Lockfile = require('./Lockfile-B4mqBkH6.cjs.js');
14
14
  require('minimatch');
15
15
  require('@manypkg/get-packages');
16
16
  require('./yarn-Ukl9MOS0.cjs.js');
17
- require('./run-Dyr28990.cjs.js');
17
+ require('./run-D3KP0xX6.cjs.js');
18
18
  var partition = require('lodash/partition');
19
19
  var cliNode = require('@backstage/cli-node');
20
20
  var errors = require('@backstage/errors');
@@ -775,4 +775,4 @@ var _new = async (opts) => {
775
775
  };
776
776
 
777
777
  exports.default = _new;
778
- //# sourceMappingURL=new-WebKpNSz.cjs.js.map
778
+ //# sourceMappingURL=new-D72AQ8YF.cjs.js.map