@backstage/cli 0.13.2 → 0.14.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 (57) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/config/jest.js +4 -3
  3. package/config/jestSucraseTransform.js +60 -39
  4. package/dist/cjs/{PackageGraph-f7218931.cjs.js → PackageGraph-d7b9d768.cjs.js} +65 -2
  5. package/dist/cjs/{backend-93c17f0a.cjs.js → backend-7919a693.cjs.js} +2 -2
  6. package/dist/cjs/{build-ba38de45.cjs.js → build-29fe454d.cjs.js} +11 -9
  7. package/dist/cjs/{build-36589e8a.cjs.js → build-30d6e823.cjs.js} +7 -6
  8. package/dist/cjs/{build-8188b3a4.cjs.js → build-8fe538f0.cjs.js} +22 -22
  9. package/dist/cjs/{build-009e73a3.cjs.js → build-ef788e26.cjs.js} +7 -6
  10. package/dist/cjs/{buildBackend-85df229c.cjs.js → buildBackend-1727e26d.cjs.js} +16 -15
  11. package/dist/cjs/{buildWorkspace-44672ad9.cjs.js → buildWorkspace-cdb5a92d.cjs.js} +9 -9
  12. package/dist/cjs/{bump-9aca460c.cjs.js → bump-3e73eb63.cjs.js} +61 -15
  13. package/dist/cjs/{bundle-c36a33a5.cjs.js → bundle-cfe3be2c.cjs.js} +2 -2
  14. package/dist/cjs/{bundle-c676710a.cjs.js → bundle-f5e5afd4.cjs.js} +11 -11
  15. package/dist/cjs/{clean-fb5eabab.cjs.js → clean-677131a4.cjs.js} +2 -2
  16. package/dist/cjs/{config-2045332a.cjs.js → config-147bac17.cjs.js} +3 -3
  17. package/dist/cjs/{create-d576afd6.cjs.js → create-95febe68.cjs.js} +4 -4
  18. package/dist/cjs/{createDistWorkspace-1949b495.cjs.js → createDistWorkspace-59a08943.cjs.js} +15 -9
  19. package/dist/cjs/{createPlugin-6b9a37d7.cjs.js → createPlugin-fd799616.cjs.js} +4 -4
  20. package/dist/cjs/{dev-a43bf6c5.cjs.js → dev-70024fd0.cjs.js} +6 -6
  21. package/dist/cjs/{diff-8090cb39.cjs.js → diff-4cf33d7e.cjs.js} +6 -2
  22. package/dist/cjs/{docs-8134e3d2.cjs.js → docs-1ce5cd6c.cjs.js} +7 -4
  23. package/dist/cjs/{index-0c3a82e2.cjs.js → index-1823ab16.cjs.js} +18 -18
  24. package/dist/cjs/{index-4605496f.cjs.js → index-2b8588e8.cjs.js} +65 -63
  25. package/dist/cjs/{index-a932d832.cjs.js → index-9879526e.cjs.js} +2 -2
  26. package/dist/cjs/{index-603a246b.cjs.js → index-ba0436fb.cjs.js} +16 -16
  27. package/dist/cjs/{info-9187be16.cjs.js → info-da6c4aef.cjs.js} +3 -3
  28. package/dist/cjs/{install-30028f72.cjs.js → install-28e7640d.cjs.js} +4 -4
  29. package/dist/cjs/lint-985567f6.cjs.js +92 -0
  30. package/dist/cjs/{lint-753ca24f.cjs.js → lint-a9e3c169.cjs.js} +3 -3
  31. package/dist/cjs/{lint-d863cb88.cjs.js → lint-ad2a1c74.cjs.js} +2 -2
  32. package/dist/cjs/{oldBuild-f1abef0d.cjs.js → oldBuild-a88f7903.cjs.js} +7 -6
  33. package/dist/cjs/{pack-a51c7cf8.cjs.js → pack-b252bbb6.cjs.js} +2 -2
  34. package/dist/cjs/{packageRole-6f48a89c.cjs.js → packageRole-5f116d95.cjs.js} +3 -3
  35. package/dist/cjs/{packageRoles-a2eecabc.cjs.js → packageRoles-f375a99e.cjs.js} +12 -12
  36. package/dist/cjs/packageScripts-890cd7af.cjs.js +97 -0
  37. package/dist/cjs/{packager-57263112.cjs.js → packager-8f82846e.cjs.js} +34 -58
  38. package/dist/cjs/{packages-ef539958.cjs.js → packages-572642d7.cjs.js} +5 -4
  39. package/dist/cjs/parallel-d8e5bcbf.cjs.js +171 -0
  40. package/dist/cjs/{paths-2db88422.cjs.js → paths-8e0b151d.cjs.js} +4 -4
  41. package/dist/cjs/{print-0be864a4.cjs.js → print-b7e68297.cjs.js} +7 -4
  42. package/dist/cjs/{run-43a2e0bb.cjs.js → run-d3528c59.cjs.js} +2 -2
  43. package/dist/cjs/{schema-899242a2.cjs.js → schema-0d43bb71.cjs.js} +7 -4
  44. package/dist/cjs/{serve-b5a89a22.cjs.js → serve-b7ae013f.cjs.js} +8 -8
  45. package/dist/cjs/{serve-b69389e9.cjs.js → serve-cd62a6bb.cjs.js} +9 -9
  46. package/dist/cjs/{server-d8c1f8fd.cjs.js → server-894abd58.cjs.js} +2 -2
  47. package/dist/cjs/svgrTemplate-b7a4ee52.cjs.js +21 -0
  48. package/dist/cjs/{tasks-096c80eb.cjs.js → tasks-f55f3d7e.cjs.js} +2 -2
  49. package/dist/cjs/{testCommand-1bd885b0.cjs.js → testCommand-f9b311fb.cjs.js} +11 -4
  50. package/dist/cjs/{validate-e670ef09.cjs.js → validate-cff0ae61.cjs.js} +7 -4
  51. package/dist/index.cjs.js +1 -1
  52. package/package.json +26 -22
  53. package/templates/default-backend-plugin/package.json.hbs +1 -1
  54. package/templates/default-plugin/package.json.hbs +1 -1
  55. package/dist/cjs/packageScripts-69fbc72e.cjs.js +0 -61
  56. package/dist/cjs/parallel-e73a4058.cjs.js +0 -48
  57. package/dist/cjs/svgrTemplate-f19e974c.cjs.js +0 -25
@@ -46,16 +46,16 @@ class NotFoundError extends CustomError {
46
46
 
47
47
  const paths = cliCommon.findPaths(__dirname);
48
48
 
49
- var version$9 = "0.10.7";
49
+ var version$9 = "0.10.8";
50
50
 
51
- var version$8 = "0.13.2";
51
+ var version$8 = "0.14.0";
52
52
  var dependencies = {
53
- "@backstage/cli-common": "^0.1.6",
54
- "@backstage/config": "^0.1.13",
55
- "@backstage/config-loader": "^0.9.3",
56
- "@backstage/errors": "^0.2.0",
57
- "@backstage/release-manifests": "^0.0.1",
58
- "@backstage/types": "^0.1.1",
53
+ "@backstage/cli-common": "^0.1.7",
54
+ "@backstage/config": "^0.1.14",
55
+ "@backstage/config-loader": "^0.9.4",
56
+ "@backstage/errors": "^0.2.1",
57
+ "@backstage/release-manifests": "^0.0.2",
58
+ "@backstage/types": "^0.1.2",
59
59
  "@hot-loader/react-dom": "^16.13.0",
60
60
  "@manypkg/get-packages": "^1.1.3",
61
61
  "@octokit/request": "^5.4.12",
@@ -70,8 +70,8 @@ var dependencies = {
70
70
  "@sucrase/webpack-loader": "^2.0.0",
71
71
  "@svgr/plugin-jsx": "6.2.x",
72
72
  "@svgr/plugin-svgo": "6.2.x",
73
- "@svgr/rollup": "5.5.x",
74
- "@svgr/webpack": "5.5.x",
73
+ "@svgr/rollup": "6.2.x",
74
+ "@svgr/webpack": "6.2.x",
75
75
  "@types/webpack-env": "^1.15.2",
76
76
  "@typescript-eslint/eslint-plugin": "^5.9.0",
77
77
  "@typescript-eslint/parser": "^5.9.0",
@@ -140,14 +140,14 @@ var dependencies = {
140
140
  zod: "^3.11.6"
141
141
  };
142
142
  var devDependencies = {
143
- "@backstage/backend-common": "^0.10.7",
144
- "@backstage/config": "^0.1.13",
145
- "@backstage/core-components": "^0.8.8",
146
- "@backstage/core-plugin-api": "^0.6.0",
147
- "@backstage/core-app-api": "^0.5.2",
148
- "@backstage/dev-utils": "^0.2.21",
149
- "@backstage/test-utils": "^0.2.4",
150
- "@backstage/theme": "^0.2.14",
143
+ "@backstage/backend-common": "^0.10.8",
144
+ "@backstage/config": "^0.1.14",
145
+ "@backstage/core-components": "^0.8.9",
146
+ "@backstage/core-plugin-api": "^0.6.1",
147
+ "@backstage/core-app-api": "^0.5.3",
148
+ "@backstage/dev-utils": "^0.2.22",
149
+ "@backstage/test-utils": "^0.2.5",
150
+ "@backstage/theme": "^0.2.15",
151
151
  "@types/diff": "^5.0.0",
152
152
  "@types/express": "^4.17.6",
153
153
  "@types/fs-extra": "^9.0.1",
@@ -160,6 +160,7 @@ var devDependencies = {
160
160
  "@types/recursive-readdir": "^2.2.0",
161
161
  "@types/rollup-plugin-peer-deps-external": "^2.2.0",
162
162
  "@types/rollup-plugin-postcss": "^2.0.0",
163
+ "@types/svgo": "^2.6.2",
163
164
  "@types/tar": "^6.1.1",
164
165
  "@types/terser-webpack-plugin": "^5.0.4",
165
166
  "@types/yarnpkg__lockfile": "^1.1.4",
@@ -170,19 +171,19 @@ var devDependencies = {
170
171
  msw: "^0.35.0"
171
172
  };
172
173
 
173
- var version$7 = "0.5.2";
174
+ var version$7 = "0.5.3";
174
175
 
175
- var version$6 = "0.8.8";
176
+ var version$6 = "0.8.9";
176
177
 
177
- var version$5 = "0.6.0";
178
+ var version$5 = "0.6.1";
178
179
 
179
- var version$4 = "0.2.21";
180
+ var version$4 = "0.2.22";
180
181
 
181
- var version$3 = "0.2.4";
182
+ var version$3 = "0.2.5";
182
183
 
183
- var version$2 = "0.2.14";
184
+ var version$2 = "0.2.15";
184
185
 
185
- var version$1 = "0.15.24";
186
+ var version$1 = "0.16.0";
186
187
 
187
188
  const packageVersions = {
188
189
  "@backstage/backend-common": version$9,
@@ -237,53 +238,54 @@ const configOption = [
237
238
  ];
238
239
  function registerRepoCommand(program) {
239
240
  const command = program.command("repo [command]", { hidden: true }).description("Command that run across an entire Backstage project [EXPERIMENTAL]");
240
- command.command("build").description("Build packages in the project, excluding bundled app and backend packages.").option("--all", "Build all packages, including bundled app and backend packages.").action(lazy(() => Promise.resolve().then(function () { return require('./build-8188b3a4.cjs.js'); }).then((m) => m.command)));
241
+ command.command("build").description("Build packages in the project, excluding bundled app and backend packages.").option("--all", "Build all packages, including bundled app and backend packages.").action(lazy(() => Promise.resolve().then(function () { return require('./build-8fe538f0.cjs.js'); }).then((m) => m.command)));
242
+ command.command("lint").description("Lint all packages in the project").option("--format <format>", "Lint report output format", "eslint-formatter-friendly").option("--since <ref>", "Only lint packages that changed since the specified ref").option("--fix", "Attempt to automatically fix violations").action(lazy(() => Promise.resolve().then(function () { return require('./lint-985567f6.cjs.js'); }).then((m) => m.command)));
241
243
  }
242
244
  function registerScriptCommand(program) {
243
- const command = program.command("script [command]", { hidden: true }).description("Lifecycle scripts for Backstage packages [EXPERIMENTAL]");
244
- command.command("start").description("Start a package for local development").option(...configOption).option("--role <name>", "Run the command with an explicit package role").option("--check", "Enable type checking and linting if available").option("--inspect", "Enable debugger in Node.js environments").option("--inspect-brk", "Enable debugger in Node.js environments, breaking before code starts").action(lazy(() => Promise.resolve().then(function () { return require('./index-603a246b.cjs.js'); }).then((m) => m.command)));
245
- command.command("build").description("Build a package for production deployment or publishing").option("--minify", "Minify the generated code. Does not apply to app or backend packages.").option("--experimental-type-build", "Enable experimental type build. Does not apply to app or backend packages.").option("--skip-build-dependencies", "Skip the automatic building of local dependencies. Applies to backend packages only.").option("--stats", "If bundle stats are available, write them to the output directory. Applies to app packages only.").option("--config <path>", "Config files to load instead of app-config.yaml. Applies to app packages only.", (opt, opts) => [...opts, opt], Array()).action(lazy(() => Promise.resolve().then(function () { return require('./index-0c3a82e2.cjs.js'); }).then((m) => m.command)));
246
- program.command("lint").option("--format <format>", "Lint report output format", "eslint-formatter-friendly").option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-d863cb88.cjs.js'); }).then((m) => m.default)));
247
- program.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('./testCommand-1bd885b0.cjs.js'); }).then((m) => m.default)));
248
- command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-fb5eabab.cjs.js'); }).then((m) => m.default)));
249
- command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-a51c7cf8.cjs.js'); }).then((m) => m.pre)));
250
- command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-a51c7cf8.cjs.js'); }).then((m) => m.post)));
245
+ const command = program.command("package [command]", { hidden: true }).description("Lifecycle scripts for individual packages [EXPERIMENTAL]");
246
+ command.command("start").description("Start a package for local development").option(...configOption).option("--role <name>", "Run the command with an explicit package role [EXPERIMENTAL]").option("--check", "Enable type checking and linting if available").option("--inspect", "Enable debugger in Node.js environments").option("--inspect-brk", "Enable debugger in Node.js environments, breaking before code starts").action(lazy(() => Promise.resolve().then(function () { return require('./index-ba0436fb.cjs.js'); }).then((m) => m.command)));
247
+ command.command("build").description("Build a package for production deployment or publishing").option("--role <name>", "Run the command with an explicit package role [EXPERIMENTAL]").option("--minify", "Minify the generated code. Does not apply to app or backend packages.").option("--experimental-type-build", "Enable experimental type build. Does not apply to app or backend packages.").option("--skip-build-dependencies", "Skip the automatic building of local dependencies. Applies to backend packages only.").option("--stats", "If bundle stats are available, write them to the output directory. Applies to app packages only.").option("--config <path>", "Config files to load instead of app-config.yaml. Applies to app packages only.", (opt, opts) => [...opts, opt], Array()).action(lazy(() => Promise.resolve().then(function () { return require('./index-1823ab16.cjs.js'); }).then((m) => m.command)));
248
+ command.command("lint").option("--format <format>", "Lint report output format", "eslint-formatter-friendly").option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-ad2a1c74.cjs.js'); }).then((m) => m.default)));
249
+ 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('./testCommand-f9b311fb.cjs.js'); }).then((m) => m.default)));
250
+ command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-677131a4.cjs.js'); }).then((m) => m.default)));
251
+ command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-b252bbb6.cjs.js'); }).then((m) => m.pre)));
252
+ command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-b252bbb6.cjs.js'); }).then((m) => m.post)));
251
253
  }
252
254
  function registerMigrateCommand(program) {
253
255
  const command = program.command("migrate [command]", { hidden: true }).description("Migration utilities [EXPERIMENTAL]");
254
- command.command("package-role").description(`Add package role field to packages that don't have it`).action(lazy(() => Promise.resolve().then(function () { return require('./packageRole-6f48a89c.cjs.js'); }).then((m) => m.default)));
255
- command.command("package-scripts").description("Set package scripts according to each package role").action(lazy(() => Promise.resolve().then(function () { return require('./packageScripts-69fbc72e.cjs.js'); }).then((m) => m.command)));
256
+ 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-5f116d95.cjs.js'); }).then((m) => m.default)));
257
+ command.command("package-scripts").description("Set package scripts according to each package role").action(lazy(() => Promise.resolve().then(function () { return require('./packageScripts-890cd7af.cjs.js'); }).then((m) => m.command)));
256
258
  }
257
259
  function registerCommands(program) {
258
- program.command("app:build").description("Build an app for a production release").option("--stats", "Write bundle stats to output directory").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./build-ba38de45.cjs.js'); }).then((m) => m.default)));
259
- program.command("app:serve").description("Serve an app for local development").option("--check", "Enable type checking and linting").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./serve-b69389e9.cjs.js'); }).then((m) => m.default)));
260
- program.command("backend:build").description("Build a backend plugin").option("--minify", "Minify the generated code").option("--experimental-type-build", "Enable experimental type build").action(lazy(() => Promise.resolve().then(function () { return require('./build-36589e8a.cjs.js'); }).then((m) => m.default)));
261
- program.command("backend:bundle").description("Bundle the backend into a deployment archive").option("--build-dependencies", "Build all local package dependencies before bundling the backend").action(lazy(() => Promise.resolve().then(function () { return require('./bundle-c676710a.cjs.js'); }).then((m) => m.default)));
262
- program.command("backend:dev").description("Start local development server with HMR for the backend").option("--check", "Enable type checking and linting").option("--inspect", "Enable debugger").option("--inspect-brk", "Enable debugger with await to attach debugger").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./dev-a43bf6c5.cjs.js'); }).then((m) => m.default)));
263
- program.command("create").storeOptionsAsProperties(false).description("Open up an interactive guide to creating new things in your app").option("--select <name>", "Select the thing you want to be creating upfront").option("--option <name>=<value>", "Pre-fill options for the creation process", (opt, arr) => [...arr, opt], []).option("--scope <scope>", "The scope to use for new packages").option("--npm-registry <URL>", "The package registry to use for new packages").option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./create-d576afd6.cjs.js'); }).then((m) => m.default)));
264
- program.command("create-plugin").option("--backend", "Create plugin with the backend dependencies as default").description("Creates a new plugin in the current repository").option("--scope <scope>", "npm scope").option("--npm-registry <URL>", "npm registry URL").option("--no-private", "Public npm package").action(lazy(() => Promise.resolve().then(function () { return require('./createPlugin-6b9a37d7.cjs.js'); }).then((m) => m.default)));
265
- program.command("plugin:build").description("Build a plugin").option("--minify", "Minify the generated code").option("--experimental-type-build", "Enable experimental type build").action(lazy(() => Promise.resolve().then(function () { return require('./build-009e73a3.cjs.js'); }).then((m) => m.default)));
266
- program.command("plugin:serve").description("Serves the dev/ folder of a plugin").option("--check", "Enable type checking and linting").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./serve-b5a89a22.cjs.js'); }).then((m) => m.default)));
267
- program.command("plugin:diff").option("--check", "Fail if changes are required").option("--yes", "Apply all changes").description("Diff an existing plugin with the creation template").action(lazy(() => Promise.resolve().then(function () { return require('./diff-8090cb39.cjs.js'); }).then((m) => m.default)));
268
- program.command("build").description("Build a package for publishing").option("--outputs <formats>", "List of formats to output [types,cjs,esm]").option("--minify", "Minify the generated code").option("--experimental-type-build", "Enable experimental type build").action(lazy(() => Promise.resolve().then(function () { return require('./oldBuild-f1abef0d.cjs.js'); }).then((m) => m.default)));
269
- program.command("lint").option("--format <format>", "Lint report output format", "eslint-formatter-friendly").option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-d863cb88.cjs.js'); }).then((m) => m.default)));
270
- program.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('./testCommand-1bd885b0.cjs.js'); }).then((m) => m.default)));
271
- program.command("config:docs").option("--package <name>", "Only include the schema that applies to the given package").description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-8134e3d2.cjs.js'); }).then((m) => m.default)));
272
- program.command("config:print").option("--package <name>", "Only load config schema that applies to the given package").option("--lax", "Do not require environment variables to be set").option("--frontend", "Print only the frontend configuration").option("--with-secrets", "Include secrets in the printed configuration").option("--format <format>", "Format to print the configuration in, either json or yaml [yaml]").option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-0be864a4.cjs.js'); }).then((m) => m.default)));
273
- program.command("config:check").option("--package <name>", "Only load config schema that applies to the given package").option("--lax", "Do not require environment variables to be set").option("--frontend", "Only validate the frontend configuration").option("--deprecated", "Output deprecated configuration settings").option(...configOption).description("Validate that the given configuration loads and matches schema").action(lazy(() => Promise.resolve().then(function () { return require('./validate-e670ef09.cjs.js'); }).then((m) => m.default)));
274
- program.command("config:schema").option("--package <name>", "Only output config schema that applies to the given package").option("--format <format>", "Format to print the schema in, either json or yaml [yaml]").description("Print configuration schema").action(lazy(() => Promise.resolve().then(function () { return require('./schema-899242a2.cjs.js'); }).then((m) => m.default)));
260
+ program.command("app:build").description("Build an app for a production release").option("--stats", "Write bundle stats to output directory").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./build-29fe454d.cjs.js'); }).then((m) => m.default)));
261
+ program.command("app:serve").description("Serve an app for local development").option("--check", "Enable type checking and linting").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./serve-cd62a6bb.cjs.js'); }).then((m) => m.default)));
262
+ program.command("backend:build").description("Build a backend plugin").option("--minify", "Minify the generated code").option("--experimental-type-build", "Enable experimental type build").action(lazy(() => Promise.resolve().then(function () { return require('./build-30d6e823.cjs.js'); }).then((m) => m.default)));
263
+ program.command("backend:bundle").description("Bundle the backend into a deployment archive").option("--build-dependencies", "Build all local package dependencies before bundling the backend").action(lazy(() => Promise.resolve().then(function () { return require('./bundle-f5e5afd4.cjs.js'); }).then((m) => m.default)));
264
+ program.command("backend:dev").description("Start local development server with HMR for the backend").option("--check", "Enable type checking and linting").option("--inspect", "Enable debugger").option("--inspect-brk", "Enable debugger with await to attach debugger").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./dev-70024fd0.cjs.js'); }).then((m) => m.default)));
265
+ program.command("create").storeOptionsAsProperties(false).description("Open up an interactive guide to creating new things in your app").option("--select <name>", "Select the thing you want to be creating upfront").option("--option <name>=<value>", "Pre-fill options for the creation process", (opt, arr) => [...arr, opt], []).option("--scope <scope>", "The scope to use for new packages").option("--npm-registry <URL>", "The package registry to use for new packages").option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./create-95febe68.cjs.js'); }).then((m) => m.default)));
266
+ program.command("create-plugin").option("--backend", "Create plugin with the backend dependencies as default").description("Creates a new plugin in the current repository").option("--scope <scope>", "npm scope").option("--npm-registry <URL>", "npm registry URL").option("--no-private", "Public npm package").action(lazy(() => Promise.resolve().then(function () { return require('./createPlugin-fd799616.cjs.js'); }).then((m) => m.default)));
267
+ program.command("plugin:build").description("Build a plugin").option("--minify", "Minify the generated code").option("--experimental-type-build", "Enable experimental type build").action(lazy(() => Promise.resolve().then(function () { return require('./build-ef788e26.cjs.js'); }).then((m) => m.default)));
268
+ program.command("plugin:serve").description("Serves the dev/ folder of a plugin").option("--check", "Enable type checking and linting").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./serve-b7ae013f.cjs.js'); }).then((m) => m.default)));
269
+ program.command("plugin:diff").option("--check", "Fail if changes are required").option("--yes", "Apply all changes").description("Diff an existing plugin with the creation template").action(lazy(() => Promise.resolve().then(function () { return require('./diff-4cf33d7e.cjs.js'); }).then((m) => m.default)));
270
+ program.command("build").description("Build a package for publishing").option("--outputs <formats>", "List of formats to output [types,cjs,esm]").option("--minify", "Minify the generated code").option("--experimental-type-build", "Enable experimental type build").action(lazy(() => Promise.resolve().then(function () { return require('./oldBuild-a88f7903.cjs.js'); }).then((m) => m.default)));
271
+ program.command("lint").option("--format <format>", "Lint report output format", "eslint-formatter-friendly").option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-ad2a1c74.cjs.js'); }).then((m) => m.default)));
272
+ program.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('./testCommand-f9b311fb.cjs.js'); }).then((m) => m.default)));
273
+ program.command("config:docs").option("--package <name>", "Only include the schema that applies to the given package").description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-1ce5cd6c.cjs.js'); }).then((m) => m.default)));
274
+ program.command("config:print").option("--package <name>", "Only load config schema that applies to the given package").option("--lax", "Do not require environment variables to be set").option("--frontend", "Print only the frontend configuration").option("--with-secrets", "Include secrets in the printed configuration").option("--format <format>", "Format to print the configuration in, either json or yaml [yaml]").option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-b7e68297.cjs.js'); }).then((m) => m.default)));
275
+ program.command("config:check").option("--package <name>", "Only load config schema that applies to the given package").option("--lax", "Do not require environment variables to be set").option("--frontend", "Only validate the frontend configuration").option("--deprecated", "Output deprecated configuration settings").option(...configOption).description("Validate that the given configuration loads and matches schema").action(lazy(() => Promise.resolve().then(function () { return require('./validate-cff0ae61.cjs.js'); }).then((m) => m.default)));
276
+ program.command("config:schema").option("--package <name>", "Only output config schema that applies to the given package").option("--format <format>", "Format to print the schema in, either json or yaml [yaml]").description("Print configuration schema").action(lazy(() => Promise.resolve().then(function () { return require('./schema-0d43bb71.cjs.js'); }).then((m) => m.default)));
275
277
  registerRepoCommand(program);
276
278
  registerScriptCommand(program);
277
279
  registerMigrateCommand(program);
278
- program.command("versions:bump").option("--pattern <glob>", "Override glob for matching packages to upgrade").option("--release <version|next|main>", "Bump to a specific Backstage release line or version", "main").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-9aca460c.cjs.js'); }).then((m) => m.default)));
279
- 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-753ca24f.cjs.js'); }).then((m) => m.default)));
280
- program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-a51c7cf8.cjs.js'); }).then((m) => m.pre)));
281
- program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-a51c7cf8.cjs.js'); }).then((m) => m.post)));
282
- program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-fb5eabab.cjs.js'); }).then((m) => m.default)));
283
- program.command("build-workspace <workspace-dir> ...<packages>").description("Builds a temporary dist workspace from the provided packages").action(lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace-44672ad9.cjs.js'); }).then((m) => m.default)));
284
- program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-a932d832.cjs.js'); }).then((m) => m.default)));
285
- program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-9187be16.cjs.js'); }).then((m) => m.default)));
286
- program.command("install [plugin-id]", { hidden: true }).option("--from <packageJsonFilePath>", "Install from a local package.json containing the installation recipe").description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-30028f72.cjs.js'); }).then((m) => m.default)));
280
+ program.command("versions:bump").option("--pattern <glob>", "Override glob for matching packages to upgrade").option("--release <version|next|main>", "Bump to a specific Backstage release line or version", "main").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-3e73eb63.cjs.js'); }).then((m) => m.default)));
281
+ 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-a9e3c169.cjs.js'); }).then((m) => m.default)));
282
+ program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-b252bbb6.cjs.js'); }).then((m) => m.pre)));
283
+ program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-b252bbb6.cjs.js'); }).then((m) => m.post)));
284
+ program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-677131a4.cjs.js'); }).then((m) => m.default)));
285
+ program.command("build-workspace <workspace-dir> ...<packages>").description("Builds a temporary dist workspace from the provided packages").action(lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace-cdb5a92d.cjs.js'); }).then((m) => m.default)));
286
+ program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-9879526e.cjs.js'); }).then((m) => m.default)));
287
+ program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-da6c4aef.cjs.js'); }).then((m) => m.default)));
288
+ program.command("install [plugin-id]", { hidden: true }).option("--from <packageJsonFilePath>", "Install from a local package.json containing the installation recipe").description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-28e7640d.cjs.js'); }).then((m) => m.default)));
287
289
  }
288
290
  function lazy(getActionFunc) {
289
291
  return async (...args) => {
@@ -327,4 +329,4 @@ exports.devDependencies = devDependencies;
327
329
  exports.paths = paths;
328
330
  exports.version = version;
329
331
  exports.version$1 = version$8;
330
- //# sourceMappingURL=index-4605496f.cjs.js.map
332
+ //# sourceMappingURL=index-2b8588e8.cjs.js.map
@@ -3,7 +3,7 @@
3
3
  var fs = require('fs-extra');
4
4
  var chalk = require('chalk');
5
5
  var yaml = require('yaml');
6
- var index$1 = require('./index-4605496f.cjs.js');
6
+ var index$1 = require('./index-2b8588e8.cjs.js');
7
7
  var crypto = require('crypto');
8
8
  var openBrowser = require('react-dev-utils/openBrowser');
9
9
  var request = require('@octokit/request');
@@ -128,4 +128,4 @@ ${yaml.stringify(config)}`;
128
128
  };
129
129
 
130
130
  exports["default"] = index;
131
- //# sourceMappingURL=index-a932d832.cjs.js.map
131
+ //# sourceMappingURL=index-9879526e.cjs.js.map
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var fs = require('fs-extra');
4
- var index = require('./index-4605496f.cjs.js');
5
- var backend = require('./backend-93c17f0a.cjs.js');
4
+ var index = require('./index-2b8588e8.cjs.js');
5
+ var backend = require('./backend-7919a693.cjs.js');
6
6
  require('yn');
7
7
  require('path');
8
8
  require('webpack');
@@ -16,30 +16,30 @@ require('run-script-webpack-plugin');
16
16
  require('webpack-node-externals');
17
17
  require('@backstage/cli-common');
18
18
  require('@manypkg/get-packages');
19
- require('./paths-2db88422.cjs.js');
19
+ require('./paths-8e0b151d.cjs.js');
20
20
  require('mini-css-extract-plugin');
21
- require('./run-43a2e0bb.cjs.js');
21
+ require('./run-d3528c59.cjs.js');
22
22
  require('eslint-webpack-plugin');
23
23
  require('lodash/pickBy');
24
24
  require('webpack-dev-server');
25
25
  require('react-dev-utils/openBrowser');
26
26
  var uniq = require('lodash/uniq');
27
- var server = require('./server-d8c1f8fd.cjs.js');
28
- var config = require('./config-2045332a.cjs.js');
27
+ var server = require('./server-894abd58.cjs.js');
28
+ var config = require('./config-147bac17.cjs.js');
29
29
  var Lockfile = require('./Lockfile-35661afa.cjs.js');
30
30
  require('minimatch');
31
- var lint = require('./lint-753ca24f.cjs.js');
32
- var packageRoles = require('./packageRoles-a2eecabc.cjs.js');
31
+ var lint = require('./lint-a9e3c169.cjs.js');
32
+ var packageRoles = require('./packageRoles-f375a99e.cjs.js');
33
33
  require('commander');
34
34
  require('semver');
35
35
  require('@backstage/config/package.json');
36
36
  require('@backstage/errors');
37
- require('./svgrTemplate-f19e974c.cjs.js');
37
+ require('./svgrTemplate-b7a4ee52.cjs.js');
38
38
  require('child_process');
39
39
  require('util');
40
40
  require('@backstage/config-loader');
41
41
  require('@backstage/config');
42
- require('./PackageGraph-f7218931.cjs.js');
42
+ require('./PackageGraph-d7b9d768.cjs.js');
43
43
  require('@yarnpkg/lockfile');
44
44
  require('lodash/partition');
45
45
  require('zod');
@@ -102,19 +102,19 @@ async function command(cmd) {
102
102
  };
103
103
  switch (role) {
104
104
  case "backend":
105
- case "plugin-backend":
106
- case "plugin-backend-module":
105
+ case "backend-plugin":
106
+ case "backend-plugin-module":
107
107
  case "node-library":
108
108
  return startBackend(options);
109
- case "app":
109
+ case "frontend":
110
110
  return startFrontend({
111
111
  ...options,
112
112
  entry: "src/index",
113
113
  verifyVersions: true
114
114
  });
115
115
  case "web-library":
116
- case "plugin-frontend":
117
- case "plugin-frontend-module":
116
+ case "frontend-plugin":
117
+ case "frontend-plugin-module":
118
118
  return startFrontend({ entry: "dev/index", ...options });
119
119
  default:
120
120
  throw new Error(`Start command is not supported for package role '${role}'`);
@@ -122,4 +122,4 @@ async function command(cmd) {
122
122
  }
123
123
 
124
124
  exports.command = command;
125
- //# sourceMappingURL=index-603a246b.cjs.js.map
125
+ //# sourceMappingURL=index-ba0436fb.cjs.js.map
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-4605496f.cjs.js');
3
+ var index = require('./index-2b8588e8.cjs.js');
4
4
  var os = require('os');
5
- var run = require('./run-43a2e0bb.cjs.js');
5
+ var run = require('./run-d3528c59.cjs.js');
6
6
  var Lockfile = require('./Lockfile-35661afa.cjs.js');
7
7
  require('minimatch');
8
8
  require('@manypkg/get-packages');
@@ -43,4 +43,4 @@ var info = async () => {
43
43
  };
44
44
 
45
45
  exports["default"] = info;
46
- //# sourceMappingURL=info-9187be16.cjs.js.map
46
+ //# sourceMappingURL=info-da6c4aef.cjs.js.map
@@ -3,12 +3,12 @@
3
3
  var fs = require('fs-extra');
4
4
  require('semver');
5
5
  require('@yarnpkg/lockfile');
6
- var packages = require('./packages-ef539958.cjs.js');
7
- var index = require('./index-4605496f.cjs.js');
6
+ var packages = require('./packages-572642d7.cjs.js');
7
+ var index = require('./index-2b8588e8.cjs.js');
8
8
  var chalk = require('chalk');
9
9
  var sortBy = require('lodash/sortBy');
10
10
  var groupBy = require('lodash/groupBy');
11
- var run = require('./run-43a2e0bb.cjs.js');
11
+ var run = require('./run-d3528c59.cjs.js');
12
12
  require('minimatch');
13
13
  require('@manypkg/get-packages');
14
14
  require('commander');
@@ -240,4 +240,4 @@ var install = async (pluginId, cmd) => {
240
240
  };
241
241
 
242
242
  exports["default"] = install;
243
- //# sourceMappingURL=install-30028f72.cjs.js.map
243
+ //# sourceMappingURL=install-28e7640d.cjs.js.map
@@ -0,0 +1,92 @@
1
+ 'use strict';
2
+
3
+ var chalk = require('chalk');
4
+ var path = require('path');
5
+ var PackageGraph = require('./PackageGraph-d7b9d768.cjs.js');
6
+ var parallel = require('./parallel-d8e5bcbf.cjs.js');
7
+ var index = require('./index-2b8588e8.cjs.js');
8
+ require('@manypkg/get-packages');
9
+ require('@backstage/errors');
10
+ require('child_process');
11
+ require('util');
12
+ require('os');
13
+ require('worker_threads');
14
+ require('commander');
15
+ require('fs-extra');
16
+ require('semver');
17
+ require('@backstage/cli-common');
18
+ require('@backstage/config/package.json');
19
+
20
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
21
+
22
+ var chalk__default = /*#__PURE__*/_interopDefaultLegacy(chalk);
23
+
24
+ function depCount(pkg) {
25
+ const deps = pkg.dependencies ? Object.keys(pkg.dependencies).length : 0;
26
+ const devDeps = pkg.devDependencies ? Object.keys(pkg.devDependencies).length : 0;
27
+ return deps + devDeps;
28
+ }
29
+ async function command(cmd) {
30
+ let packages = await PackageGraph.PackageGraph.listTargetPackages();
31
+ if (cmd.since) {
32
+ const graph = PackageGraph.PackageGraph.fromPackages(packages);
33
+ packages = await graph.listChangedPackages({ ref: cmd.since });
34
+ }
35
+ packages.sort((a, b) => depCount(b.packageJson) - depCount(a.packageJson));
36
+ if (cmd.format === "eslint-formatter-friendly") {
37
+ process.chdir(index.paths.targetRoot);
38
+ }
39
+ if (!process.env.FORCE_COLOR) {
40
+ process.env.FORCE_COLOR = "1";
41
+ }
42
+ const resultsList = await parallel.runWorkerQueueThreads({
43
+ items: packages.map((pkg) => ({
44
+ fullDir: pkg.dir,
45
+ relativeDir: path.relative(index.paths.targetRoot, pkg.dir)
46
+ })),
47
+ workerData: {
48
+ fix: Boolean(cmd.fix),
49
+ format: cmd.format
50
+ },
51
+ workerFactory: async ({ fix, format }) => {
52
+ const { ESLint } = require("eslint");
53
+ return async ({
54
+ fullDir,
55
+ relativeDir
56
+ }) => {
57
+ process.cwd = () => fullDir;
58
+ const start = Date.now();
59
+ const eslint = new ESLint({
60
+ cwd: fullDir,
61
+ fix,
62
+ extensions: ["js", "jsx", "ts", "tsx", "mjs", "cjs"]
63
+ });
64
+ const formatter = await eslint.loadFormatter(format);
65
+ const results = await eslint.lintFiles(["."]);
66
+ const count = String(results.length).padStart(3);
67
+ const time = ((Date.now() - start) / 1e3).toFixed(2);
68
+ console.log(`Checked ${count} files in ${relativeDir} ${time}s`);
69
+ if (fix) {
70
+ await ESLint.outputFixes(results);
71
+ }
72
+ const resultText = formatter.format(results);
73
+ return { relativeDir, resultText };
74
+ };
75
+ }
76
+ });
77
+ let failed = false;
78
+ for (const { relativeDir, resultText } of resultsList) {
79
+ if (resultText) {
80
+ console.log();
81
+ console.log(chalk__default["default"].red(`Lint failed in ${relativeDir}:`));
82
+ console.log(resultText.trimLeft());
83
+ failed = true;
84
+ }
85
+ }
86
+ if (failed) {
87
+ process.exit(1);
88
+ }
89
+ }
90
+
91
+ exports.command = command;
92
+ //# sourceMappingURL=lint-985567f6.cjs.js.map
@@ -3,9 +3,9 @@
3
3
  var Lockfile = require('./Lockfile-35661afa.cjs.js');
4
4
  require('minimatch');
5
5
  require('@manypkg/get-packages');
6
- require('./run-43a2e0bb.cjs.js');
6
+ require('./run-d3528c59.cjs.js');
7
7
  require('chalk');
8
- var index = require('./index-4605496f.cjs.js');
8
+ var index = require('./index-2b8588e8.cjs.js');
9
9
  var partition = require('lodash/partition');
10
10
  require('fs-extra');
11
11
  require('semver');
@@ -76,4 +76,4 @@ function logArray(arr, header, each) {
76
76
  exports["default"] = lint;
77
77
  exports.forbiddenDuplicatesFilter = forbiddenDuplicatesFilter;
78
78
  exports.includedFilter = includedFilter;
79
- //# sourceMappingURL=lint-753ca24f.cjs.js.map
79
+ //# sourceMappingURL=lint-a9e3c169.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-4605496f.cjs.js');
3
+ var index = require('./index-2b8588e8.cjs.js');
4
4
  var eslint = require('eslint');
5
5
  require('commander');
6
6
  require('chalk');
@@ -32,4 +32,4 @@ var lint = async (cmd, cmdArgs) => {
32
32
  };
33
33
 
34
34
  exports["default"] = lint;
35
- //# sourceMappingURL=lint-d863cb88.cjs.js.map
35
+ //# sourceMappingURL=lint-ad2a1c74.cjs.js.map
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var packager = require('./packager-57263112.cjs.js');
3
+ var packager = require('./packager-8f82846e.cjs.js');
4
4
  require('fs-extra');
5
5
  require('rollup');
6
6
  require('chalk');
7
7
  require('path');
8
- require('./index-4605496f.cjs.js');
8
+ require('./index-2b8588e8.cjs.js');
9
9
  require('commander');
10
10
  require('semver');
11
11
  require('@backstage/cli-common');
@@ -21,11 +21,12 @@ require('rollup-plugin-dts');
21
21
  require('@rollup/plugin-json');
22
22
  require('@rollup/plugin-yaml');
23
23
  require('rollup-pluginutils');
24
- require('./svgrTemplate-f19e974c.cjs.js');
24
+ require('./svgrTemplate-b7a4ee52.cjs.js');
25
+ require('./parallel-d8e5bcbf.cjs.js');
26
+ require('os');
25
27
  require('worker_threads');
26
- require('./packageRoles-a2eecabc.cjs.js');
28
+ require('./packageRoles-f375a99e.cjs.js');
27
29
  require('zod');
28
- require('./parallel-e73a4058.cjs.js');
29
30
 
30
31
  var oldBuild = async (cmd) => {
31
32
  let outputs = /* @__PURE__ */ new Set();
@@ -49,4 +50,4 @@ var oldBuild = async (cmd) => {
49
50
  };
50
51
 
51
52
  exports["default"] = oldBuild;
52
- //# sourceMappingURL=oldBuild-f1abef0d.cjs.js.map
53
+ //# sourceMappingURL=oldBuild-a88f7903.cjs.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var fs = require('fs-extra');
4
- var index = require('./index-4605496f.cjs.js');
4
+ var index = require('./index-2b8588e8.cjs.js');
5
5
  var path = require('path');
6
6
  require('commander');
7
7
  require('chalk');
@@ -66,4 +66,4 @@ const post = async () => {
66
66
 
67
67
  exports.post = post;
68
68
  exports.pre = pre;
69
- //# sourceMappingURL=pack-a51c7cf8.cjs.js.map
69
+ //# sourceMappingURL=pack-b252bbb6.cjs.js.map
@@ -3,8 +3,8 @@
3
3
  var fs = require('fs-extra');
4
4
  var path = require('path');
5
5
  var getPackages = require('@manypkg/get-packages');
6
- var index = require('./index-4605496f.cjs.js');
7
- var packageRoles = require('./packageRoles-a2eecabc.cjs.js');
6
+ var index = require('./index-2b8588e8.cjs.js');
7
+ var packageRoles = require('./packageRoles-f375a99e.cjs.js');
8
8
  require('commander');
9
9
  require('chalk');
10
10
  require('semver');
@@ -51,4 +51,4 @@ var packageRole = async () => {
51
51
  };
52
52
 
53
53
  exports["default"] = packageRole;
54
- //# sourceMappingURL=packageRole-6f48a89c.cjs.js.map
54
+ //# sourceMappingURL=packageRole-5f116d95.cjs.js.map