@backstage/cli 0.22.13-next.3 → 0.23.0-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 +55 -0
  2. package/dist/cjs/{build-78388961.cjs.js → build-b11c65d1.cjs.js} +10 -10
  3. package/dist/cjs/{buildBackend-8736c629.cjs.js → buildBackend-3f73978c.cjs.js} +10 -10
  4. package/dist/cjs/{buildWorkspace-a2607a91.cjs.js → buildWorkspace-4c09e59c.cjs.js} +4 -4
  5. package/dist/cjs/{bump-c5d60f43.cjs.js → bump-e926e1ad.cjs.js} +5 -5
  6. package/dist/cjs/{clean-9950e487.cjs.js → clean-05674016.cjs.js} +2 -2
  7. package/dist/cjs/{clean-91ae62e6.cjs.js → clean-f691e0c1.cjs.js} +2 -2
  8. package/dist/cjs/{codeowners-8362998c.cjs.js → codeowners-fc0adefa.cjs.js} +2 -2
  9. package/dist/cjs/{config-55bfc714.cjs.js → config-0c70a290.cjs.js} +2 -2
  10. package/dist/cjs/{createDistWorkspace-1ba1fe48.cjs.js → createDistWorkspace-2042d873.cjs.js} +5 -4
  11. package/dist/cjs/{createPlugin-2f17e093.cjs.js → createPlugin-905fb77b.cjs.js} +4 -4
  12. package/dist/cjs/{diff-cac578d9.cjs.js → diff-f44cf8a3.cjs.js} +2 -2
  13. package/dist/cjs/{docs-48000b62.cjs.js → docs-65409dc4.cjs.js} +3 -3
  14. package/dist/cjs/{fix-2f2dbbb0.cjs.js → fix-8fafa54c.cjs.js} +2 -2
  15. package/dist/cjs/{index-a2e2cf2f.cjs.js → index-209a2496.cjs.js} +3 -3
  16. package/dist/cjs/{index-94a03a2f.cjs.js → index-3032c10e.cjs.js} +22 -19
  17. package/dist/cjs/{index-b0c49033.cjs.js → index-4345ea90.cjs.js} +2 -2
  18. package/dist/cjs/{index-bbe1f825.cjs.js → index-7b2ed229.cjs.js} +11 -11
  19. package/dist/cjs/{index-7e5b10f7.cjs.js → index-f79cae6f.cjs.js} +50 -50
  20. package/dist/cjs/{info-13b7e688.cjs.js → info-5e76708f.cjs.js} +3 -3
  21. package/dist/cjs/{install-48fd5304.cjs.js → install-cd7197aa.cjs.js} +4 -4
  22. package/dist/cjs/{lint-0b781ed2.cjs.js → lint-36e31d9f.cjs.js} +3 -3
  23. package/dist/cjs/{lint-56fc5cb1.cjs.js → lint-7a913dc4.cjs.js} +2 -2
  24. package/dist/cjs/{lint-8f9213c3.cjs.js → lint-b4f24207.cjs.js} +2 -2
  25. package/dist/cjs/{list-deprecations-80b0c602.cjs.js → list-deprecations-516aa4cf.cjs.js} +2 -2
  26. package/dist/cjs/{new-fdce3244.cjs.js → new-1ab2f2cb.cjs.js} +40 -4
  27. package/dist/cjs/{pack-264b3d20.cjs.js → pack-3eb5fbe1.cjs.js} +2 -2
  28. package/dist/cjs/{packageDetection-016e697b.cjs.js → packageDetection-b2255ac0.cjs.js} +63 -57
  29. package/dist/cjs/{packageExports-5463bc0b.cjs.js → packageExports-1a325643.cjs.js} +3 -3
  30. package/dist/cjs/{packageLintConfigs-900ce7db.cjs.js → packageLintConfigs-d9199148.cjs.js} +3 -3
  31. package/dist/cjs/{packageRole-80c1fea2.cjs.js → packageRole-c8c9f708.cjs.js} +2 -2
  32. package/dist/cjs/{packages-765a06af.cjs.js → packages-baa5ce50.cjs.js} +3 -3
  33. package/dist/cjs/{print-fefdb61a.cjs.js → print-77a00cb6.cjs.js} +3 -3
  34. package/dist/cjs/{role-fdcbbb6d.cjs.js → role-f07bac01.cjs.js} +2 -2
  35. package/dist/cjs/{run-45053fbf.cjs.js → run-50dd84ea.cjs.js} +2 -2
  36. package/dist/cjs/{schema-afd42266.cjs.js → schema-eea52e14.cjs.js} +3 -3
  37. package/dist/cjs/{test-b4317534.cjs.js → test-cf5c76e7.cjs.js} +3 -3
  38. package/dist/cjs/{test-67368ae8.cjs.js → test-d4144cba.cjs.js} +3 -3
  39. package/dist/cjs/{validate-c3642673.cjs.js → validate-0b28d182.cjs.js} +3 -3
  40. package/dist/index.cjs.js +1 -1
  41. package/package.json +22 -22
  42. package/templates/node-library-package/.eslintrc.js +1 -0
  43. package/templates/node-library-package/README.md.hbs +12 -0
  44. package/templates/node-library-package/package.json.hbs +36 -0
  45. package/templates/node-library-package/src/index.ts.hbs +1 -0
  46. package/templates/node-library-package/src/setupTests.ts +1 -0
  47. package/templates/node-library-package/tsconfig.json +11 -0
@@ -53,13 +53,13 @@ class NotFoundError extends CustomError {
53
53
 
54
54
  const paths = cliCommon.findPaths(__dirname);
55
55
 
56
- var version$c = "0.19.5-next.3";
56
+ var version$c = "0.19.7-next.0";
57
57
 
58
- var version$b = "0.6.3-next.3";
58
+ var version$b = "0.6.5-next.0";
59
59
 
60
- var version$a = "0.2.3-next.3";
60
+ var version$a = "0.2.6-next.0";
61
61
 
62
- var version$9 = "0.22.13-next.3";
62
+ var version$9 = "0.23.0-next.0";
63
63
  var dependencies = {
64
64
  "@backstage/catalog-model": "workspace:^",
65
65
  "@backstage/cli-common": "workspace:^",
@@ -189,7 +189,7 @@ var devDependencies = {
189
189
  "@types/inquirer": "^8.1.3",
190
190
  "@types/minimatch": "^5.0.0",
191
191
  "@types/mock-fs": "^4.13.0",
192
- "@types/node": "^16.11.26",
192
+ "@types/node": "^18.17.8",
193
193
  "@types/npm-packlist": "^3.0.0",
194
194
  "@types/recursive-readdir": "^2.2.0",
195
195
  "@types/rollup-plugin-peer-deps-external": "^2.2.0",
@@ -199,28 +199,28 @@ var devDependencies = {
199
199
  "@types/terser-webpack-plugin": "^5.0.4",
200
200
  "@types/yarnpkg__lockfile": "^1.1.4",
201
201
  del: "^7.0.0",
202
- "mock-fs": "^5.1.0",
202
+ "mock-fs": "^5.2.0",
203
203
  msw: "^1.0.0",
204
204
  nodemon: "^3.0.1",
205
205
  "ts-node": "^10.0.0",
206
206
  "type-fest": "^2.19.0"
207
207
  };
208
208
 
209
- var version$8 = "1.1.0-next.2";
209
+ var version$8 = "1.1.0";
210
210
 
211
- var version$7 = "1.10.0-next.3";
211
+ var version$7 = "1.10.1-next.0";
212
212
 
213
- var version$6 = "0.13.5-next.3";
213
+ var version$6 = "0.13.6-next.0";
214
214
 
215
- var version$5 = "1.6.0-next.3";
215
+ var version$5 = "1.7.0-next.0";
216
216
 
217
- var version$4 = "1.0.21-next.3";
217
+ var version$4 = "1.0.22-next.0";
218
218
 
219
- var version$3 = "1.4.3-next.3";
219
+ var version$3 = "1.4.4-next.0";
220
220
 
221
- var version$2 = "0.4.2-next.0";
221
+ var version$2 = "0.4.2";
222
222
 
223
- var version$1 = "1.17.0-next.3";
223
+ var version$1 = "1.17.3-next.0";
224
224
 
225
225
  const packageVersions = {
226
226
  "@backstage/backend-common": version$c,
@@ -284,7 +284,7 @@ const configOption = [
284
284
  Array()
285
285
  ];
286
286
  function registerOnboardCommand(program) {
287
- program.command("onboard", { hidden: true }).description("Get help setting up your Backstage App.").action(lazy(() => Promise.resolve().then(function () { return require('./index-a2e2cf2f.cjs.js'); }).then((m) => m.command)));
287
+ program.command("onboard", { hidden: true }).description("Get help setting up your Backstage App.").action(lazy(() => Promise.resolve().then(function () { return require('./index-209a2496.cjs.js'); }).then((m) => m.command)));
288
288
  }
289
289
  function registerRepoCommand(program) {
290
290
  const command = program.command("repo [command]").description("Command that run across an entire Backstage project");
@@ -296,7 +296,7 @@ function registerRepoCommand(program) {
296
296
  ).option(
297
297
  "--since <ref>",
298
298
  "Only build packages and their dev dependents that changed since the specified ref"
299
- ).action(lazy(() => Promise.resolve().then(function () { return require('./build-78388961.cjs.js'); }).then((m) => m.command)));
299
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./build-b11c65d1.cjs.js'); }).then((m) => m.command)));
300
300
  command.command("lint").description("Lint all packages in the project").option(
301
301
  "--format <format>",
302
302
  "Lint report output format",
@@ -304,14 +304,14 @@ function registerRepoCommand(program) {
304
304
  ).option(
305
305
  "--since <ref>",
306
306
  "Only lint packages that changed since the specified ref"
307
- ).option("--fix", "Attempt to automatically fix violations").action(lazy(() => Promise.resolve().then(function () { return require('./lint-8f9213c3.cjs.js'); }).then((m) => m.command)));
307
+ ).option("--fix", "Attempt to automatically fix violations").action(lazy(() => Promise.resolve().then(function () { return require('./lint-b4f24207.cjs.js'); }).then((m) => m.command)));
308
308
  command.command("fix").description("Automatically fix packages in the project").option(
309
309
  "--check",
310
310
  "Fail if any packages would have been changed by the command"
311
- ).action(lazy(() => Promise.resolve().then(function () { return require('./fix-2f2dbbb0.cjs.js'); }).then((m) => m.command)));
312
- command.command("clean").description("Delete cache and output directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-91ae62e6.cjs.js'); }).then((m) => m.command)));
311
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./fix-8fafa54c.cjs.js'); }).then((m) => m.command)));
312
+ command.command("clean").description("Delete cache and output directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-f691e0c1.cjs.js'); }).then((m) => m.command)));
313
313
  command.command("list-deprecations").description("List deprecations").option("--json", "Output as JSON").action(
314
- lazy(() => Promise.resolve().then(function () { return require('./list-deprecations-80b0c602.cjs.js'); }).then((m) => m.command))
314
+ lazy(() => Promise.resolve().then(function () { return require('./list-deprecations-516aa4cf.cjs.js'); }).then((m) => m.command))
315
315
  );
316
316
  command.command("test").allowUnknownOption(true).option(
317
317
  "--since <ref>",
@@ -319,14 +319,14 @@ function registerRepoCommand(program) {
319
319
  ).option(
320
320
  "--jest-help",
321
321
  "Show help for Jest CLI options, which are passed through"
322
- ).description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./test-b4317534.cjs.js'); }).then((m) => m.command)));
322
+ ).description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./test-cf5c76e7.cjs.js'); }).then((m) => m.command)));
323
323
  }
324
324
  function registerScriptCommand(program) {
325
325
  const command = program.command("package [command]").description("Lifecycle scripts for individual packages");
326
- 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(
327
- "--inspect-brk",
326
+ 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(
327
+ "--inspect-brk [host]",
328
328
  "Enable debugger in Node.js environments, breaking before code starts"
329
- ).action(lazy(() => Promise.resolve().then(function () { return require('./index-94a03a2f.cjs.js'); }).then((m) => m.command)));
329
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./index-3032c10e.cjs.js'); }).then((m) => m.command)));
330
330
  command.command("build").description("Build a package for production deployment or publishing").option("--role <name>", "Run the command with an explicit package role").option(
331
331
  "--minify",
332
332
  "Minify the generated code. Does not apply to app or backend packages."
@@ -344,30 +344,30 @@ function registerScriptCommand(program) {
344
344
  "Config files to load instead of app-config.yaml. Applies to app packages only.",
345
345
  (opt, opts) => opts ? [...opts, opt] : [opt],
346
346
  Array()
347
- ).action(lazy(() => Promise.resolve().then(function () { return require('./index-bbe1f825.cjs.js'); }).then((m) => m.command)));
347
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./index-7b2ed229.cjs.js'); }).then((m) => m.command)));
348
348
  command.command("lint [directories...]").option(
349
349
  "--format <format>",
350
350
  "Lint report output format",
351
351
  "eslint-formatter-friendly"
352
- ).option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-56fc5cb1.cjs.js'); }).then((m) => m.default)));
353
- 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-67368ae8.cjs.js'); }).then((m) => m.default)));
354
- command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-9950e487.cjs.js'); }).then((m) => m.default)));
355
- command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-264b3d20.cjs.js'); }).then((m) => m.pre)));
356
- command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-264b3d20.cjs.js'); }).then((m) => m.post)));
352
+ ).option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-7a913dc4.cjs.js'); }).then((m) => m.default)));
353
+ 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-d4144cba.cjs.js'); }).then((m) => m.default)));
354
+ command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-05674016.cjs.js'); }).then((m) => m.default)));
355
+ command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-3eb5fbe1.cjs.js'); }).then((m) => m.pre)));
356
+ command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-3eb5fbe1.cjs.js'); }).then((m) => m.post)));
357
357
  }
358
358
  function registerMigrateCommand(program) {
359
359
  const command = program.command("migrate [command]").description("Migration utilities");
360
- 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-80c1fea2.cjs.js'); }).then((m) => m.default)));
360
+ 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-c8c9f708.cjs.js'); }).then((m) => m.default)));
361
361
  command.command("package-scripts").description("Set package scripts according to each package role").action(
362
362
  lazy(() => Promise.resolve().then(function () { return require('./packageScripts-c6721fac.cjs.js'); }).then((m) => m.command))
363
363
  );
364
364
  command.command("package-exports").description("Synchronize package subpath export definitions").action(
365
- lazy(() => Promise.resolve().then(function () { return require('./packageExports-5463bc0b.cjs.js'); }).then((m) => m.command))
365
+ lazy(() => Promise.resolve().then(function () { return require('./packageExports-1a325643.cjs.js'); }).then((m) => m.command))
366
366
  );
367
367
  command.command("package-lint-configs").description(
368
368
  "Migrates all packages to use @backstage/cli/config/eslint-factory"
369
369
  ).action(
370
- lazy(() => Promise.resolve().then(function () { return require('./packageLintConfigs-900ce7db.cjs.js'); }).then((m) => m.command))
370
+ lazy(() => Promise.resolve().then(function () { return require('./packageLintConfigs-d9199148.cjs.js'); }).then((m) => m.command))
371
371
  );
372
372
  command.command("react-router-deps").description(
373
373
  "Migrates the react-router dependencies for all packages to be peer dependencies"
@@ -392,7 +392,7 @@ function registerCommands(program) {
392
392
  ).option(
393
393
  "--baseVersion <version>",
394
394
  "The version to use for any new packages (default: 0.1.0)"
395
- ).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-fdce3244.cjs.js'); }).then((m) => m.default)));
395
+ ).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-1ab2f2cb.cjs.js'); }).then((m) => m.default)));
396
396
  program.command("create", { hidden: true }).storeOptionsAsProperties(false).description(
397
397
  "Open up an interactive guide to creating new things in your app [DEPRECATED]"
398
398
  ).option(
@@ -406,30 +406,30 @@ function registerCommands(program) {
406
406
  ).option("--scope <scope>", "The scope to use for new packages").option(
407
407
  "--npm-registry <URL>",
408
408
  "The package registry to use for new packages"
409
- ).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-fdce3244.cjs.js'); }).then((m) => m.default)));
409
+ ).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-1ab2f2cb.cjs.js'); }).then((m) => m.default)));
410
410
  program.command("create-plugin", { hidden: true }).option(
411
411
  "--backend",
412
412
  "Create plugin with the backend dependencies as default"
413
413
  ).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(
414
- lazy(() => Promise.resolve().then(function () { return require('./createPlugin-2f17e093.cjs.js'); }).then((m) => m.default))
414
+ lazy(() => Promise.resolve().then(function () { return require('./createPlugin-905fb77b.cjs.js'); }).then((m) => m.default))
415
415
  );
416
416
  program.command("plugin:diff", { hidden: true }).option("--check", "Fail if changes are required").option("--yes", "Apply all changes").description(
417
417
  "Diff an existing plugin with the creation template [DEPRECATED]"
418
- ).action(lazy(() => Promise.resolve().then(function () { return require('./diff-cac578d9.cjs.js'); }).then((m) => m.default)));
418
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./diff-f44cf8a3.cjs.js'); }).then((m) => m.default)));
419
419
  program.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description(
420
420
  "Run tests, forwarding args to Jest, defaulting to watch mode [DEPRECATED]"
421
- ).action(lazy(() => Promise.resolve().then(function () { return require('./test-67368ae8.cjs.js'); }).then((m) => m.default)));
421
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./test-d4144cba.cjs.js'); }).then((m) => m.default)));
422
422
  program.command("config:docs").option(
423
423
  "--package <name>",
424
424
  "Only include the schema that applies to the given package"
425
- ).description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-48000b62.cjs.js'); }).then((m) => m.default)));
425
+ ).description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-65409dc4.cjs.js'); }).then((m) => m.default)));
426
426
  program.command("config:print").option(
427
427
  "--package <name>",
428
428
  "Only load config schema that applies to the given package"
429
429
  ).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(
430
430
  "--format <format>",
431
431
  "Format to print the configuration in, either json or yaml [yaml]"
432
- ).option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-fefdb61a.cjs.js'); }).then((m) => m.default)));
432
+ ).option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-77a00cb6.cjs.js'); }).then((m) => m.default)));
433
433
  program.command("config:check").option(
434
434
  "--package <name>",
435
435
  "Only load config schema that applies to the given package"
@@ -438,14 +438,14 @@ function registerCommands(program) {
438
438
  "Enable strict config validation, forbidding errors and unknown keys"
439
439
  ).option(...configOption).description(
440
440
  "Validate that the given configuration loads and matches schema"
441
- ).action(lazy(() => Promise.resolve().then(function () { return require('./validate-c3642673.cjs.js'); }).then((m) => m.default)));
441
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./validate-0b28d182.cjs.js'); }).then((m) => m.default)));
442
442
  program.command("config:schema").option(
443
443
  "--package <name>",
444
444
  "Only output config schema that applies to the given package"
445
445
  ).option(
446
446
  "--format <format>",
447
447
  "Format to print the schema in, either json or yaml [yaml]"
448
- ).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-afd42266.cjs.js'); }).then((m) => m.default)));
448
+ ).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-eea52e14.cjs.js'); }).then((m) => m.default)));
449
449
  registerRepoCommand(program);
450
450
  registerScriptCommand(program);
451
451
  registerMigrateCommand(program);
@@ -457,19 +457,19 @@ function registerCommands(program) {
457
457
  "--release <version|next|main>",
458
458
  "Bump to a specific Backstage release line or version",
459
459
  "main"
460
- ).option("--skip-install", "Skips yarn install step").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-c5d60f43.cjs.js'); }).then((m) => m.default)));
461
- 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-0b781ed2.cjs.js'); }).then((m) => m.default)));
462
- program.command("clean").description("Delete cache directories [DEPRECATED]").action(lazy(() => Promise.resolve().then(function () { return require('./clean-9950e487.cjs.js'); }).then((m) => m.default)));
460
+ ).option("--skip-install", "Skips yarn install step").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-e926e1ad.cjs.js'); }).then((m) => m.default)));
461
+ 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-36e31d9f.cjs.js'); }).then((m) => m.default)));
462
+ program.command("clean").description("Delete cache directories [DEPRECATED]").action(lazy(() => Promise.resolve().then(function () { return require('./clean-05674016.cjs.js'); }).then((m) => m.default)));
463
463
  program.command("build-workspace <workspace-dir> [packages...]").option(
464
464
  "--alwaysYarnPack",
465
465
  "Force workspace output to be a result of running `yarn pack` on each package (warning: very slow)"
466
- ).description("Builds a temporary dist workspace from the provided packages").action(lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace-a2607a91.cjs.js'); }).then((m) => m.default)));
467
- program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-b0c49033.cjs.js'); }).then((m) => m.default)));
468
- program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-13b7e688.cjs.js'); }).then((m) => m.default)));
466
+ ).description("Builds a temporary dist workspace from the provided packages").action(lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace-4c09e59c.cjs.js'); }).then((m) => m.default)));
467
+ program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-4345ea90.cjs.js'); }).then((m) => m.default)));
468
+ program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-5e76708f.cjs.js'); }).then((m) => m.default)));
469
469
  program.command("install [plugin-id]", { hidden: true }).option(
470
470
  "--from <packageJsonFilePath>",
471
471
  "Install from a local package.json containing the installation recipe"
472
- ).description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-48fd5304.cjs.js'); }).then((m) => m.default)));
472
+ ).description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-cd7197aa.cjs.js'); }).then((m) => m.default)));
473
473
  }
474
474
  function lazy(getActionFunc) {
475
475
  return async (...args) => {
@@ -513,4 +513,4 @@ exports.devDependencies = devDependencies;
513
513
  exports.paths = paths;
514
514
  exports.version = version;
515
515
  exports.version$1 = version$9;
516
- //# sourceMappingURL=index-7e5b10f7.cjs.js.map
516
+ //# sourceMappingURL=index-f79cae6f.cjs.js.map
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-7e5b10f7.cjs.js');
3
+ var index = require('./index-f79cae6f.cjs.js');
4
4
  var os = require('os');
5
- var run = require('./run-45053fbf.cjs.js');
5
+ var run = require('./run-50dd84ea.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-13b7e688.cjs.js.map
61
+ //# sourceMappingURL=info-5e76708f.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-765a06af.cjs.js');
8
- var index = require('./index-7e5b10f7.cjs.js');
7
+ var packages = require('./packages-baa5ce50.cjs.js');
8
+ var index = require('./index-f79cae6f.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-45053fbf.cjs.js');
12
+ var run = require('./run-50dd84ea.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-48fd5304.cjs.js.map
271
+ //# sourceMappingURL=install-cd7197aa.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-45053fbf.cjs.js');
9
- var index = require('./index-7e5b10f7.cjs.js');
8
+ require('./run-50dd84ea.cjs.js');
9
+ var index = require('./index-f79cae6f.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-0b781ed2.cjs.js.map
115
+ //# sourceMappingURL=lint-36e31d9f.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-7e5b10f7.cjs.js');
3
+ var index = require('./index-f79cae6f.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-56fc5cb1.cjs.js.map
36
+ //# sourceMappingURL=lint-7a913dc4.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-7e5b10f7.cjs.js');
6
+ var index = require('./index-f79cae6f.cjs.js');
7
7
  var parallel = require('./parallel-a8f6219c.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-8f9213c3.cjs.js.map
91
+ //# sourceMappingURL=lint-b4f24207.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-7e5b10f7.cjs.js');
7
+ var index = require('./index-f79cae6f.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-80b0c602.cjs.js.map
79
+ //# sourceMappingURL=list-deprecations-516aa4cf.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-7e5b10f7.cjs.js');
11
- var codeowners = require('./codeowners-8362998c.cjs.js');
10
+ var index = require('./index-f79cae6f.cjs.js');
11
+ var codeowners = require('./codeowners-fc0adefa.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-45053fbf.cjs.js');
17
+ require('./run-50dd84ea.cjs.js');
18
18
  var partition = require('lodash/partition');
19
19
  var cliNode = require('@backstage/cli-node');
20
20
  var errors = require('@backstage/errors');
@@ -319,6 +319,41 @@ const backendModule = createFactory({
319
319
  }
320
320
  });
321
321
 
322
+ const nodeLibraryPackage = createFactory({
323
+ name: "node-library",
324
+ description: "A new node-library package",
325
+ optionsDiscovery: async () => ({
326
+ codeOwnersPath: await codeowners.getCodeownersFilePath(index.paths.targetRoot)
327
+ }),
328
+ optionsPrompts: [pluginIdPrompt(), ownerPrompt()],
329
+ async create(options, ctx) {
330
+ const { id } = options;
331
+ const name = ctx.scope ? `@${ctx.scope}/${id}` : `${id}`;
332
+ tasks.Task.log();
333
+ tasks.Task.log(`Creating node-library package ${chalk__default["default"].cyan(name)}`);
334
+ const targetDir = ctx.isMonoRepo ? index.paths.resolveTargetRoot("packages", id) : index.paths.resolveTargetRoot(`${id}`);
335
+ await executePluginPackageTemplate(ctx, {
336
+ targetDir,
337
+ templateName: "node-library-package",
338
+ values: {
339
+ id,
340
+ name,
341
+ pluginVersion: ctx.defaultVersion,
342
+ privatePackage: ctx.private,
343
+ npmRegistry: ctx.npmRegistry
344
+ }
345
+ });
346
+ if (options.owner) {
347
+ await codeowners.addCodeownersEntry(`/packages/${id}`, options.owner);
348
+ }
349
+ await tasks.Task.forCommand("yarn install", { cwd: targetDir, optional: true });
350
+ await tasks.Task.forCommand("yarn lint --fix", {
351
+ cwd: targetDir,
352
+ optional: true
353
+ });
354
+ }
355
+ });
356
+
322
357
  const webLibraryPackage = createFactory({
323
358
  name: "web-library",
324
359
  description: "A new web-library package",
@@ -525,6 +560,7 @@ var factories = /*#__PURE__*/Object.freeze({
525
560
  frontendPlugin: frontendPlugin,
526
561
  backendPlugin: backendPlugin,
527
562
  backendModule: backendModule,
563
+ nodeLibraryPackage: nodeLibraryPackage,
528
564
  webLibraryPackage: webLibraryPackage,
529
565
  pluginCommon: pluginCommon,
530
566
  pluginNode: pluginNode,
@@ -700,4 +736,4 @@ var _new = async (opts) => {
700
736
  };
701
737
 
702
738
  exports["default"] = _new;
703
- //# sourceMappingURL=new-fdce3244.cjs.js.map
739
+ //# sourceMappingURL=new-1ab2f2cb.cjs.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var productionPack = require('./productionPack-d569941a.cjs.js');
4
- var index = require('./index-7e5b10f7.cjs.js');
4
+ var index = require('./index-f79cae6f.cjs.js');
5
5
  require('fs-extra');
6
6
  require('npm-packlist');
7
7
  require('path');
@@ -21,4 +21,4 @@ const post = async () => {
21
21
 
22
22
  exports.post = post;
23
23
  exports.pre = pre;
24
- //# sourceMappingURL=pack-264b3d20.cjs.js.map
24
+ //# sourceMappingURL=pack-3eb5fbe1.cjs.js.map
@@ -1,41 +1,82 @@
1
1
  'use strict';
2
2
 
3
- var fs = require('fs-extra');
4
3
  var path = require('path');
4
+ var webpack = require('webpack');
5
+ var ESLintPlugin = require('eslint-webpack-plugin');
5
6
  var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
6
7
  var HtmlWebpackPlugin = require('html-webpack-plugin');
8
+ var cliCommon = require('@backstage/cli-common');
7
9
  var ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
8
10
  var runScriptWebpackPlugin = require('run-script-webpack-plugin');
9
- var webpack = require('webpack');
10
- var nodeExternals = require('webpack-node-externals');
11
- var cliCommon = require('@backstage/cli-common');
11
+ var index = require('./index-f79cae6f.cjs.js');
12
+ var fs = require('fs-extra');
12
13
  var getPackages = require('@manypkg/get-packages');
14
+ var nodeExternals = require('webpack-node-externals');
15
+ var pickBy = require('lodash/pickBy');
16
+ var entryPoints = require('./entryPoints-0cc55995.cjs.js');
17
+ var run = require('./run-50dd84ea.cjs.js');
13
18
  var MiniCssExtractPlugin = require('mini-css-extract-plugin');
14
19
  var svgrTemplate = require('./svgrTemplate-550efce6.cjs.js');
15
20
  var ReactRefreshPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
16
- var index = require('./index-7e5b10f7.cjs.js');
17
- var run = require('./run-45053fbf.cjs.js');
18
- var ESLintPlugin = require('eslint-webpack-plugin');
19
- var pickBy = require('lodash/pickBy');
20
21
  var yn = require('yn');
21
- var entryPoints = require('./entryPoints-0cc55995.cjs.js');
22
22
  var chokidar = require('chokidar');
23
23
 
24
24
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
25
25
 
26
- var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
26
+ var webpack__default = /*#__PURE__*/_interopDefaultLegacy(webpack);
27
+ var ESLintPlugin__default = /*#__PURE__*/_interopDefaultLegacy(ESLintPlugin);
27
28
  var ForkTsCheckerWebpackPlugin__default = /*#__PURE__*/_interopDefaultLegacy(ForkTsCheckerWebpackPlugin);
28
29
  var HtmlWebpackPlugin__default = /*#__PURE__*/_interopDefaultLegacy(HtmlWebpackPlugin);
29
30
  var ModuleScopePlugin__default = /*#__PURE__*/_interopDefaultLegacy(ModuleScopePlugin);
30
- var webpack__default = /*#__PURE__*/_interopDefaultLegacy(webpack);
31
+ var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
31
32
  var nodeExternals__default = /*#__PURE__*/_interopDefaultLegacy(nodeExternals);
33
+ var pickBy__default = /*#__PURE__*/_interopDefaultLegacy(pickBy);
32
34
  var MiniCssExtractPlugin__default = /*#__PURE__*/_interopDefaultLegacy(MiniCssExtractPlugin);
33
35
  var ReactRefreshPlugin__default = /*#__PURE__*/_interopDefaultLegacy(ReactRefreshPlugin);
34
- var ESLintPlugin__default = /*#__PURE__*/_interopDefaultLegacy(ESLintPlugin);
35
- var pickBy__default = /*#__PURE__*/_interopDefaultLegacy(pickBy);
36
36
  var yn__default = /*#__PURE__*/_interopDefaultLegacy(yn);
37
37
  var chokidar__default = /*#__PURE__*/_interopDefaultLegacy(chokidar);
38
38
 
39
+ class LinkedPackageResolvePlugin {
40
+ constructor(targetModules, packages) {
41
+ this.targetModules = targetModules;
42
+ this.packages = packages;
43
+ }
44
+ apply(resolver) {
45
+ resolver.hooks.resolve.tapAsync(
46
+ "LinkedPackageResolvePlugin",
47
+ (data, context, callback) => {
48
+ var _a;
49
+ const pkg = this.packages.find(
50
+ (pkge) => data.path && cliCommon.isChildPath(pkge.dir, data.path)
51
+ );
52
+ if (!pkg) {
53
+ callback();
54
+ return;
55
+ }
56
+ const modulesLocation = path.resolve(
57
+ this.targetModules,
58
+ pkg.packageJson.name
59
+ );
60
+ const newContext = ((_a = data.context) == null ? void 0 : _a.issuer) ? {
61
+ ...data.context,
62
+ issuer: data.context.issuer.replace(pkg.dir, modulesLocation)
63
+ } : data.context;
64
+ resolver.doResolve(
65
+ resolver.hooks.resolve,
66
+ {
67
+ ...data,
68
+ context: newContext,
69
+ path: data.path && data.path.replace(pkg.dir, modulesLocation)
70
+ },
71
+ `resolve ${data.request} in ${modulesLocation}`,
72
+ context,
73
+ callback
74
+ );
75
+ }
76
+ );
77
+ }
78
+ }
79
+
39
80
  const { ESBuildMinifyPlugin } = require("esbuild-loader");
40
81
  const optimization = (options) => {
41
82
  const { isDev } = options;
@@ -256,47 +297,6 @@ const transforms = (options) => {
256
297
  return { loaders, plugins };
257
298
  };
258
299
 
259
- class LinkedPackageResolvePlugin {
260
- constructor(targetModules, packages) {
261
- this.targetModules = targetModules;
262
- this.packages = packages;
263
- }
264
- apply(resolver) {
265
- resolver.hooks.resolve.tapAsync(
266
- "LinkedPackageResolvePlugin",
267
- (data, context, callback) => {
268
- var _a;
269
- const pkg = this.packages.find(
270
- (pkge) => data.path && cliCommon.isChildPath(pkge.dir, data.path)
271
- );
272
- if (!pkg) {
273
- callback();
274
- return;
275
- }
276
- const modulesLocation = path.resolve(
277
- this.targetModules,
278
- pkg.packageJson.name
279
- );
280
- const newContext = ((_a = data.context) == null ? void 0 : _a.issuer) ? {
281
- ...data.context,
282
- issuer: data.context.issuer.replace(pkg.dir, modulesLocation)
283
- } : data.context;
284
- resolver.doResolve(
285
- resolver.hooks.resolve,
286
- {
287
- ...data,
288
- context: newContext,
289
- path: data.path && data.path.replace(pkg.dir, modulesLocation)
290
- },
291
- `resolve ${data.request} in ${modulesLocation}`,
292
- context,
293
- callback
294
- );
295
- }
296
- );
297
- }
298
- }
299
-
300
300
  const BUILD_CACHE_ENV_VAR = "BACKSTAGE_CLI_EXPERIMENTAL_BUILD_CACHE";
301
301
  function resolveBaseUrl(config) {
302
302
  const baseUrl = config.getString("app.baseUrl");
@@ -461,9 +461,11 @@ async function createBackendConfig(paths, options) {
461
461
  const { loaders } = transforms({ ...options, isBackend: true });
462
462
  const runScriptNodeArgs = new Array();
463
463
  if (options.inspectEnabled) {
464
- runScriptNodeArgs.push("--inspect");
464
+ const inspect = typeof options.inspectEnabled === "string" ? `--inspect=${options.inspectEnabled}` : "--inspect";
465
+ runScriptNodeArgs.push(inspect);
465
466
  } else if (options.inspectBrkEnabled) {
466
- runScriptNodeArgs.push("--inspect-brk");
467
+ const inspect = typeof options.inspectBrkEnabled === "string" ? `--inspect-brk=${options.inspectBrkEnabled}` : "--inspect-brk";
468
+ runScriptNodeArgs.push(inspect);
467
469
  }
468
470
  return {
469
471
  mode: isDev ? "development" : "production",
@@ -634,6 +636,10 @@ async function detectPackages(targetPath, { include, exclude }) {
634
636
  if (["frontend-plugin", "frontend-plugin-module"].includes(
635
637
  (_b = (_a2 = depPackageJson.backstage) == null ? void 0 : _a2.role) != null ? _b : ""
636
638
  )) {
639
+ const exp = depPackageJson.exports;
640
+ if (exp && typeof exp === "object" && "./alpha" in exp) {
641
+ return [depName, `${depName}/alpha`];
642
+ }
637
643
  return [depName];
638
644
  }
639
645
  return [];
@@ -684,4 +690,4 @@ exports.createConfig = createConfig;
684
690
  exports.createDetectedModulesEntryPoint = createDetectedModulesEntryPoint;
685
691
  exports.resolveBaseUrl = resolveBaseUrl;
686
692
  exports.resolveBundlingPaths = resolveBundlingPaths;
687
- //# sourceMappingURL=packageDetection-016e697b.cjs.js.map
693
+ //# sourceMappingURL=packageDetection-b2255ac0.cjs.js.map