@backstage/cli 0.29.3 → 0.29.5-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 (43) hide show
  1. package/CHANGELOG.md +75 -21
  2. package/bin/backstage-cli-alpha +19 -0
  3. package/config/nodeTransform.cjs +1 -1
  4. package/config/prettier.json +5 -0
  5. package/dist/commands/build/buildFrontend.cjs.js +8 -5
  6. package/dist/commands/create-github-app/index.cjs.js +1 -3
  7. package/dist/commands/index.cjs.js +34 -72
  8. package/dist/commands/lint.cjs.js +11 -2
  9. package/dist/commands/repo/build.cjs.js +4 -1
  10. package/dist/commands/repo/lint.cjs.js +13 -2
  11. package/dist/commands/start/startFrontend.cjs.js +7 -4
  12. package/dist/commands/versions/bump.cjs.js +14 -0
  13. package/dist/lib/bundler/bundle.cjs.js +5 -0
  14. package/dist/lib/bundler/config.cjs.js +9 -3
  15. package/dist/lib/bundler/moduleFederation.cjs.js +26 -2
  16. package/dist/lib/bundler/server.cjs.js +6 -1
  17. package/dist/lib/lazy.cjs.js +20 -0
  18. package/dist/lib/version.cjs.js +0 -3
  19. package/dist/{commands/config → modules/config/commands}/docs.cjs.js +1 -1
  20. package/dist/{commands/config → modules/config/commands}/print.cjs.js +1 -1
  21. package/dist/{commands/config → modules/config/commands}/schema.cjs.js +1 -1
  22. package/dist/{commands/config → modules/config/commands}/validate.cjs.js +1 -1
  23. package/dist/modules/config/index.cjs.js +43 -0
  24. package/dist/{lib → modules/config/lib}/config.cjs.js +1 -1
  25. package/dist/packages/backend-defaults/package.json.cjs.js +1 -1
  26. package/dist/packages/backend-plugin-api/package.json.cjs.js +1 -1
  27. package/dist/packages/backend-test-utils/package.json.cjs.js +1 -1
  28. package/dist/packages/catalog-client/package.json.cjs.js +1 -1
  29. package/dist/packages/cli/package.json.cjs.js +12 -13
  30. package/dist/packages/config/package.json.cjs.js +1 -1
  31. package/dist/packages/core-app-api/package.json.cjs.js +1 -1
  32. package/dist/packages/core-components/package.json.cjs.js +1 -1
  33. package/dist/packages/core-plugin-api/package.json.cjs.js +1 -1
  34. package/dist/packages/dev-utils/package.json.cjs.js +1 -1
  35. package/dist/packages/errors/package.json.cjs.js +1 -1
  36. package/dist/packages/test-utils/package.json.cjs.js +1 -1
  37. package/dist/packages/theme/package.json.cjs.js +1 -1
  38. package/dist/plugins/auth-backend/package.json.cjs.js +1 -1
  39. package/dist/plugins/auth-backend-module-guest-provider/package.json.cjs.js +1 -1
  40. package/dist/plugins/catalog-node/package.json.cjs.js +1 -1
  41. package/dist/plugins/scaffolder-node/package.json.cjs.js +1 -1
  42. package/dist/plugins/scaffolder-node-test-utils/package.json.cjs.js +1 -1
  43. package/package.json +38 -39
package/CHANGELOG.md CHANGED
@@ -1,55 +1,109 @@
1
1
  # @backstage/cli
2
2
 
3
- ## 0.29.3
3
+ ## 0.29.5-next.0
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - 2c5822c: Revert `css-loader@v7` bump
7
+ - e937ce0: Fixed incompatible `@typescript-eslint` versions with current `eslint@8.x.x`
8
8
  - Updated dependencies
9
- - @backstage/catalog-model@1.7.1
9
+ - @backstage/config-loader@1.9.5-next.0
10
+ - @backstage/catalog-model@1.7.2
10
11
  - @backstage/cli-common@0.1.15
11
- - @backstage/cli-node@0.2.10
12
- - @backstage/config@1.3.0
13
- - @backstage/config-loader@1.9.2
14
- - @backstage/errors@1.2.5
12
+ - @backstage/cli-node@0.2.11
13
+ - @backstage/config@1.3.1
14
+ - @backstage/errors@1.2.6
15
15
  - @backstage/eslint-plugin@0.1.10
16
- - @backstage/integration@1.15.2
17
- - @backstage/release-manifests@0.0.11
16
+ - @backstage/integration@1.16.0
17
+ - @backstage/release-manifests@0.0.12
18
+ - @backstage/types@1.2.0
19
+
20
+ ## 0.29.4
21
+
22
+ ### Patch Changes
23
+
24
+ - 2b6c1ea: If the Backstage yarn plugin is installed, it will now be automatically updated as part of `versions:bump`.
25
+ - 7dcff85: Remove special-casing for `@types` packages when generating dependency entries
26
+ during templating
27
+ - 3c3a7e6: Revert `css-loader@v7` bump
28
+ - 0aff006: Bumped the version range for `html-webpack-plugin` to fix the `htmlPluginExports.getCompilationHooks is not a function` error when using experimental Rspack.
29
+ - 583f3d4: Added `@backstage/cli/config/prettier` as a replacement for `@spotify/prettier-config`, but with the same configuration.
30
+ - 62a9062: Updated dependency `@module-federation/enhanced` to `^0.8.0`.
31
+ - 5f04976: Update `rollup` to avoid issues with build output when running `backstage-cli package build`.
32
+ - 5f04976: Fixed a bug that caused missing code in published packages.
33
+ - a49030a: Add support for `--output-file` option from ESLint to `package lint` and `repo lint` commands.
34
+ - 96331fa: Enhance the behavior of the experimental support for module federation in the backstage CLI,
35
+ by using the `package.json` exports (when present) to complete the list of exposed modules.
36
+ This allows, for example, using exported `alpha` definitions through module federation.
37
+ - 5c9cc05: Use native fetch instead of node-fetch
38
+ - dcd99d2: added experimental RSPack support for build command in the repo scope
39
+ - Updated dependencies
40
+ - @backstage/integration@1.16.0
41
+ - @backstage/release-manifests@0.0.12
42
+ - @backstage/cli-node@0.2.11
43
+ - @backstage/config-loader@1.9.3
44
+ - @backstage/errors@1.2.6
45
+ - @backstage/catalog-model@1.7.2
46
+ - @backstage/cli-common@0.1.15
47
+ - @backstage/config@1.3.1
48
+ - @backstage/eslint-plugin@0.1.10
49
+ - @backstage/types@1.2.0
50
+
51
+ ## 0.29.3-next.2
52
+
53
+ ### Patch Changes
54
+
55
+ - 62a9062: Updated dependency `@module-federation/enhanced` to `^0.8.0`.
56
+ - Updated dependencies
57
+ - @backstage/errors@1.2.6-next.0
58
+ - @backstage/cli-node@0.2.11-next.1
59
+ - @backstage/config-loader@1.9.3-next.1
60
+ - @backstage/catalog-model@1.7.2-next.0
61
+ - @backstage/cli-common@0.1.15
62
+ - @backstage/config@1.3.1-next.0
63
+ - @backstage/eslint-plugin@0.1.10
64
+ - @backstage/integration@1.16.0-next.1
65
+ - @backstage/release-manifests@0.0.12-next.1
18
66
  - @backstage/types@1.2.0
19
67
 
20
- ## 0.29.2
68
+ ## 0.29.3-next.1
21
69
 
22
70
  ### Patch Changes
23
71
 
24
- - a9fc871: Update `rollup` to avoid issues with build output when running `backstage-cli package build`.
25
- - a9fc871: Fixed a bug that caused missing code in published packages.
72
+ - a49030a: Add support for `--output-file` option from ESLint to `package lint` and `repo lint` commands.
73
+ - 5c9cc05: Use native fetch instead of node-fetch
26
74
  - Updated dependencies
75
+ - @backstage/config-loader@1.9.3-next.0
76
+ - @backstage/release-manifests@0.0.12-next.1
27
77
  - @backstage/catalog-model@1.7.1
28
78
  - @backstage/cli-common@0.1.15
29
- - @backstage/cli-node@0.2.10
79
+ - @backstage/cli-node@0.2.11-next.0
30
80
  - @backstage/config@1.3.0
31
- - @backstage/config-loader@1.9.2
32
81
  - @backstage/errors@1.2.5
33
82
  - @backstage/eslint-plugin@0.1.10
34
- - @backstage/integration@1.15.2
35
- - @backstage/release-manifests@0.0.11
83
+ - @backstage/integration@1.16.0-next.0
36
84
  - @backstage/types@1.2.0
37
85
 
38
- ## 0.29.1
86
+ ## 0.29.3-next.0
39
87
 
40
88
  ### Patch Changes
41
89
 
42
- - 0121b32: Bumped the version range for `html-webpack-plugin` to fix the `htmlPluginExports.getCompilationHooks is not a function` error when using experimental Rspack.
90
+ - 2b6c1ea: If the Backstage yarn plugin is installed, it will now be automatically updated as part of `versions:bump`.
91
+ - 7dcff85: Remove special-casing for `@types` packages when generating dependency entries
92
+ during templating
93
+ - 0aff006: Bumped the version range for `html-webpack-plugin` to fix the `htmlPluginExports.getCompilationHooks is not a function` error when using experimental Rspack.
94
+ - 583f3d4: Added `@backstage/cli/config/prettier` as a replacement for `@spotify/prettier-config`, but with the same configuration.
95
+ - 5f04976: Update `rollup` to avoid issues with build output when running `backstage-cli package build`.
96
+ - 5f04976: Fixed a bug that caused missing code in published packages.
43
97
  - Updated dependencies
98
+ - @backstage/integration@1.16.0-next.0
99
+ - @backstage/release-manifests@0.0.12-next.0
100
+ - @backstage/cli-node@0.2.11-next.0
44
101
  - @backstage/catalog-model@1.7.1
45
102
  - @backstage/cli-common@0.1.15
46
- - @backstage/cli-node@0.2.10
47
103
  - @backstage/config@1.3.0
48
104
  - @backstage/config-loader@1.9.2
49
105
  - @backstage/errors@1.2.5
50
106
  - @backstage/eslint-plugin@0.1.10
51
- - @backstage/integration@1.15.2
52
- - @backstage/release-manifests@0.0.11
53
107
  - @backstage/types@1.2.0
54
108
 
55
109
  ## 0.29.0
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+ /*
3
+ * Copyright 2020 The Backstage Authors
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ require('@backstage/cli/config/nodeTransform.cjs');
19
+ require('../src/alpha');
@@ -41,7 +41,7 @@ if (process.env.BACKSTAGE_CLI_LINKED_WORKSPACE) {
41
41
  }
42
42
 
43
43
  // The package import that we're overriding will always existing in the root
44
- // node_modules of the linked workspace, so it's enough to override the the
44
+ // node_modules of the linked workspace, so it's enough to override the
45
45
  // parent paths with that single entry
46
46
  return origLoad.call(this, request, {
47
47
  ...parent,
@@ -0,0 +1,5 @@
1
+ {
2
+ "singleQuote": true,
3
+ "trailingComma": "all",
4
+ "arrowParens": "avoid"
5
+ }
@@ -9,7 +9,7 @@ require('react-dev-utils/openBrowser');
9
9
  require('webpack');
10
10
  require('webpack-dev-server');
11
11
  require('../../lib/paths.cjs.js');
12
- var config = require('../../lib/config.cjs.js');
12
+ var config = require('../../modules/config/lib/config.cjs.js');
13
13
  require('eslint-webpack-plugin');
14
14
  require('fork-ts-checker-webpack-plugin');
15
15
  require('html-webpack-plugin');
@@ -32,19 +32,22 @@ var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
32
32
 
33
33
  async function buildFrontend(options) {
34
34
  const { targetDir, writeStats, configPaths, rspack } = options;
35
- const { name } = await fs__default.default.readJson(path.resolve(targetDir, "package.json"));
35
+ const packageJson = await fs__default.default.readJson(
36
+ path.resolve(targetDir, "package.json")
37
+ );
36
38
  await bundle.buildBundle({
37
39
  targetDir,
38
40
  entry: "src/index",
39
41
  parallelism: parallel.getEnvironmentParallelism(),
40
42
  statsJsonEnabled: writeStats,
41
- moduleFederation: moduleFederation.getModuleFederationOptions(
42
- name,
43
+ moduleFederation: await moduleFederation.getModuleFederationOptions(
44
+ packageJson,
45
+ path.resolve(targetDir),
43
46
  options.isModuleFederationRemote
44
47
  ),
45
48
  ...await config.loadCliConfig({
46
49
  args: configPaths,
47
- fromPackage: name
50
+ fromPackage: packageJson.name
48
51
  }),
49
52
  rspack
50
53
  });
@@ -8,7 +8,6 @@ var yaml = require('yaml');
8
8
  var inquirer = require('inquirer');
9
9
  var paths = require('../../lib/paths.cjs.js');
10
10
  var GithubCreateAppServer = require('./GithubCreateAppServer.cjs.js');
11
- var fetch = require('node-fetch');
12
11
  var openBrowser = require('react-dev-utils/openBrowser');
13
12
 
14
13
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
@@ -16,7 +15,6 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
16
15
  var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
17
16
  var chalk__default = /*#__PURE__*/_interopDefaultCompat(chalk);
18
17
  var inquirer__default = /*#__PURE__*/_interopDefaultCompat(inquirer);
19
- var fetch__default = /*#__PURE__*/_interopDefaultCompat(fetch);
20
18
  var openBrowser__default = /*#__PURE__*/_interopDefaultCompat(openBrowser);
21
19
 
22
20
  var index = async (org) => {
@@ -75,7 +73,7 @@ integrations:
75
73
  async function verifyGithubOrg(org) {
76
74
  let response;
77
75
  try {
78
- response = await fetch__default.default(
76
+ response = await fetch(
79
77
  `https://api.github.com/orgs/${encodeURIComponent(org)}`
80
78
  );
81
79
  } catch (e) {
@@ -1,15 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var commander = require('commander');
4
- var errors = require('@backstage/errors');
5
- var errors$1 = require('../lib/errors.cjs.js');
4
+ var lazy = require('../lib/lazy.cjs.js');
5
+ var index = require('../modules/config/index.cjs.js');
6
6
 
7
- const configOption = [
8
- "--config <path>",
9
- "Config files to load instead of app-config.yaml",
10
- (opt, opts) => opts ? [...opts, opt] : [opt],
11
- Array()
12
- ];
13
7
  function registerRepoCommand(program) {
14
8
  const command = program.command("repo [command]").description("Command that run across an entire Backstage project");
15
9
  command.command("build").description(
@@ -23,11 +17,14 @@ function registerRepoCommand(program) {
23
17
  ).option(
24
18
  "--minify",
25
19
  "Minify the generated code. Does not apply to app package (app is minified by default)."
26
- ).action(lazy(() => Promise.resolve().then(function () { return require('./repo/build.cjs.js'); }).then((m) => m.command)));
20
+ ).action(lazy.lazy(() => Promise.resolve().then(function () { return require('./repo/build.cjs.js'); }).then((m) => m.command)));
27
21
  command.command("lint").description("Lint all packages in the project").option(
28
22
  "--format <format>",
29
23
  "Lint report output format",
30
24
  "eslint-formatter-friendly"
25
+ ).option(
26
+ "--output-file <path>",
27
+ "Write the lint report to a file instead of stdout"
31
28
  ).option(
32
29
  "--since <ref>",
33
30
  "Only lint packages that changed since the specified ref"
@@ -37,17 +34,17 @@ function registerRepoCommand(program) {
37
34
  ).option(
38
35
  "--successCacheDir <path>",
39
36
  "Set the success cache location, (default: node_modules/.cache/backstage-cli)"
40
- ).option("--fix", "Attempt to automatically fix violations").action(lazy(() => Promise.resolve().then(function () { return require('./repo/lint.cjs.js'); }).then((m) => m.command)));
37
+ ).option("--fix", "Attempt to automatically fix violations").action(lazy.lazy(() => Promise.resolve().then(function () { return require('./repo/lint.cjs.js'); }).then((m) => m.command)));
41
38
  command.command("fix").description("Automatically fix packages in the project").option(
42
39
  "--publish",
43
40
  "Enable additional fixes that only apply when publishing packages"
44
41
  ).option(
45
42
  "--check",
46
43
  "Fail if any packages would have been changed by the command"
47
- ).action(lazy(() => Promise.resolve().then(function () { return require('./repo/fix.cjs.js'); }).then((m) => m.command)));
48
- command.command("clean").description("Delete cache and output directories").action(lazy(() => Promise.resolve().then(function () { return require('./repo/clean.cjs.js'); }).then((m) => m.command)));
44
+ ).action(lazy.lazy(() => Promise.resolve().then(function () { return require('./repo/fix.cjs.js'); }).then((m) => m.command)));
45
+ command.command("clean").description("Delete cache and output directories").action(lazy.lazy(() => Promise.resolve().then(function () { return require('./repo/clean.cjs.js'); }).then((m) => m.command)));
49
46
  command.command("list-deprecations").description("List deprecations").option("--json", "Output as JSON").action(
50
- lazy(() => Promise.resolve().then(function () { return require('./repo/list-deprecations.cjs.js'); }).then((m) => m.command))
47
+ lazy.lazy(() => Promise.resolve().then(function () { return require('./repo/list-deprecations.cjs.js'); }).then((m) => m.command))
51
48
  );
52
49
  command.command("test").allowUnknownOption(true).option(
53
50
  "--since <ref>",
@@ -61,14 +58,14 @@ function registerRepoCommand(program) {
61
58
  ).option(
62
59
  "--jest-help",
63
60
  "Show help for Jest CLI options, which are passed through"
64
- ).description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./repo/test.cjs.js'); }).then((m) => m.command)));
61
+ ).description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy.lazy(() => Promise.resolve().then(function () { return require('./repo/test.cjs.js'); }).then((m) => m.command)));
65
62
  }
66
63
  function registerScriptCommand(program) {
67
64
  const command = program.command("package [command]").description("Lifecycle scripts for individual packages");
68
- 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(
65
+ command.command("start").description("Start a package for local development").option(...index.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(
69
66
  "--inspect-brk [host]",
70
67
  "Enable debugger in Node.js environments, breaking before code starts"
71
- ).option("--require <path>", "Add a --require argument to the node process").option("--link <path>", "Link an external workspace for module resolution").action(lazy(() => Promise.resolve().then(function () { return require('./start/index.cjs.js'); }).then((m) => m.command)));
68
+ ).option("--require <path>", "Add a --require argument to the node process").option("--link <path>", "Link an external workspace for module resolution").action(lazy.lazy(() => Promise.resolve().then(function () { return require('./start/index.cjs.js'); }).then((m) => m.command)));
72
69
  command.command("build").description("Build a package for production deployment or publishing").option("--role <name>", "Run the command with an explicit package role").option(
73
70
  "--minify",
74
71
  "Minify the generated code. Does not apply to app package (app is minified by default)."
@@ -83,38 +80,41 @@ function registerScriptCommand(program) {
83
80
  "Config files to load instead of app-config.yaml. Applies to app packages only.",
84
81
  (opt, opts) => opts ? [...opts, opt] : [opt],
85
82
  Array()
86
- ).action(lazy(() => Promise.resolve().then(function () { return require('./build/index.cjs.js'); }).then((m) => m.command)));
83
+ ).action(lazy.lazy(() => Promise.resolve().then(function () { return require('./build/index.cjs.js'); }).then((m) => m.command)));
87
84
  command.command("lint [directories...]").option(
88
85
  "--format <format>",
89
86
  "Lint report output format",
90
87
  "eslint-formatter-friendly"
88
+ ).option(
89
+ "--output-file <path>",
90
+ "Write the lint report to a file instead of stdout"
91
91
  ).option("--fix", "Attempt to automatically fix violations").option(
92
92
  "--max-warnings <number>",
93
93
  "Fail if more than this number of warnings. -1 allows warnings. (default: 0)"
94
- ).description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint.cjs.js'); }).then((m) => m.default)));
95
- 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.cjs.js'); }).then((m) => m.default)));
96
- command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean/clean.cjs.js'); }).then((m) => m.default)));
97
- command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack.cjs.js'); }).then((m) => m.pre)));
98
- command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack.cjs.js'); }).then((m) => m.post)));
94
+ ).description("Lint a package").action(lazy.lazy(() => Promise.resolve().then(function () { return require('./lint.cjs.js'); }).then((m) => m.default)));
95
+ command.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy.lazy(() => Promise.resolve().then(function () { return require('./test.cjs.js'); }).then((m) => m.default)));
96
+ command.command("clean").description("Delete cache directories").action(lazy.lazy(() => Promise.resolve().then(function () { return require('./clean/clean.cjs.js'); }).then((m) => m.default)));
97
+ command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy.lazy(() => Promise.resolve().then(function () { return require('./pack.cjs.js'); }).then((m) => m.pre)));
98
+ command.command("postpack").description("Restores the changes made by the prepack command").action(lazy.lazy(() => Promise.resolve().then(function () { return require('./pack.cjs.js'); }).then((m) => m.post)));
99
99
  }
100
100
  function registerMigrateCommand(program) {
101
101
  const command = program.command("migrate [command]").description("Migration utilities");
102
- command.command("package-roles").description(`Add package role field to packages that don't have it`).action(lazy(() => Promise.resolve().then(function () { return require('./migrate/packageRole.cjs.js'); }).then((m) => m.default)));
102
+ command.command("package-roles").description(`Add package role field to packages that don't have it`).action(lazy.lazy(() => Promise.resolve().then(function () { return require('./migrate/packageRole.cjs.js'); }).then((m) => m.default)));
103
103
  command.command("package-scripts").description("Set package scripts according to each package role").action(
104
- lazy(() => Promise.resolve().then(function () { return require('./migrate/packageScripts.cjs.js'); }).then((m) => m.command))
104
+ lazy.lazy(() => Promise.resolve().then(function () { return require('./migrate/packageScripts.cjs.js'); }).then((m) => m.command))
105
105
  );
106
106
  command.command("package-exports").description("Synchronize package subpath export definitions").action(
107
- lazy(() => Promise.resolve().then(function () { return require('./migrate/packageExports.cjs.js'); }).then((m) => m.command))
107
+ lazy.lazy(() => Promise.resolve().then(function () { return require('./migrate/packageExports.cjs.js'); }).then((m) => m.command))
108
108
  );
109
109
  command.command("package-lint-configs").description(
110
110
  "Migrates all packages to use @backstage/cli/config/eslint-factory"
111
111
  ).action(
112
- lazy(() => Promise.resolve().then(function () { return require('./migrate/packageLintConfigs.cjs.js'); }).then((m) => m.command))
112
+ lazy.lazy(() => Promise.resolve().then(function () { return require('./migrate/packageLintConfigs.cjs.js'); }).then((m) => m.command))
113
113
  );
114
114
  command.command("react-router-deps").description(
115
115
  "Migrates the react-router dependencies for all packages to be peer dependencies"
116
116
  ).action(
117
- lazy(() => Promise.resolve().then(function () { return require('./migrate/reactRouterDeps.cjs.js'); }).then((m) => m.command))
117
+ lazy.lazy(() => Promise.resolve().then(function () { return require('./migrate/reactRouterDeps.cjs.js'); }).then((m) => m.command))
118
118
  );
119
119
  }
120
120
  function registerCommands(program) {
@@ -137,34 +137,8 @@ function registerCommands(program) {
137
137
  ).option(
138
138
  "--license <license>",
139
139
  "The license to use for any new packages (default: Apache-2.0)"
140
- ).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new/new.cjs.js'); }).then((m) => m.default)));
141
- program.command("config:docs").option(
142
- "--package <name>",
143
- "Only include the schema that applies to the given package"
144
- ).description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./config/docs.cjs.js'); }).then((m) => m.default)));
145
- program.command("config:print").option(
146
- "--package <name>",
147
- "Only load config schema that applies to the given package"
148
- ).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(
149
- "--format <format>",
150
- "Format to print the configuration in, either json or yaml [yaml]"
151
- ).option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./config/print.cjs.js'); }).then((m) => m.default)));
152
- program.command("config:check").option(
153
- "--package <name>",
154
- "Only load config schema that applies to the given package"
155
- ).option("--lax", "Do not require environment variables to be set").option("--frontend", "Only validate the frontend configuration").option("--deprecated", "Output deprecated configuration settings").option(
156
- "--strict",
157
- "Enable strict config validation, forbidding errors and unknown keys"
158
- ).option(...configOption).description(
159
- "Validate that the given configuration loads and matches schema"
160
- ).action(lazy(() => Promise.resolve().then(function () { return require('./config/validate.cjs.js'); }).then((m) => m.default)));
161
- program.command("config:schema").option(
162
- "--package <name>",
163
- "Only output config schema that applies to the given package"
164
- ).option(
165
- "--format <format>",
166
- "Format to print the schema in, either json or yaml [yaml]"
167
- ).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('./config/schema.cjs.js'); }).then((m) => m.default)));
140
+ ).option("--no-private", "Do not mark new packages as private").action(lazy.lazy(() => Promise.resolve().then(function () { return require('./new/new.cjs.js'); }).then((m) => m.default)));
141
+ index.registerCommands(program);
168
142
  registerRepoCommand(program);
169
143
  registerScriptCommand(program);
170
144
  registerMigrateCommand(program);
@@ -175,7 +149,7 @@ function registerCommands(program) {
175
149
  "--release <version|next|main>",
176
150
  "Bump to a specific Backstage release line or version",
177
151
  "main"
178
- ).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('./versions/bump.cjs.js'); }).then((m) => m.default)));
152
+ ).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.lazy(() => Promise.resolve().then(function () { return require('./versions/bump.cjs.js'); }).then((m) => m.default)));
179
153
  program.command("versions:migrate").option(
180
154
  "--pattern <glob>",
181
155
  "Override glob for matching packages to upgrade"
@@ -184,7 +158,7 @@ function registerCommands(program) {
184
158
  "Skip code changes and only update package.json files"
185
159
  ).description(
186
160
  "Migrate any plugins that have been moved to the @backstage-community namespace automatically"
187
- ).action(lazy(() => Promise.resolve().then(function () { return require('./versions/migrate.cjs.js'); }).then((m) => m.default)));
161
+ ).action(lazy.lazy(() => Promise.resolve().then(function () { return require('./versions/migrate.cjs.js'); }).then((m) => m.default)));
188
162
  program.command("build-workspace <workspace-dir> [packages...]").addOption(
189
163
  new commander.Option(
190
164
  "--alwaysYarnPack",
@@ -193,9 +167,9 @@ function registerCommands(program) {
193
167
  ).option(
194
168
  "--alwaysPack",
195
169
  "Force workspace output to be a result of running `yarn pack` on each package (warning: very slow)"
196
- ).description("Builds a temporary dist workspace from the provided packages").action(lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace.cjs.js'); }).then((m) => m.default)));
197
- program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./create-github-app/index.cjs.js'); }).then((m) => m.default)));
198
- program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info.cjs.js'); }).then((m) => m.default)));
170
+ ).description("Builds a temporary dist workspace from the provided packages").action(lazy.lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace.cjs.js'); }).then((m) => m.default)));
171
+ program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy.lazy(() => Promise.resolve().then(function () { return require('./create-github-app/index.cjs.js'); }).then((m) => m.default)));
172
+ program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy.lazy(() => Promise.resolve().then(function () { return require('./info.cjs.js'); }).then((m) => m.default)));
199
173
  program.command("create").allowUnknownOption(true).action(removed("use 'backstage-cli new' instead"));
200
174
  program.command("create-plugin").allowUnknownOption(true).action(removed("use 'backstage-cli new' instead"));
201
175
  program.command("plugin:diff").allowUnknownOption(true).action(removed("use 'backstage-cli fix' instead"));
@@ -217,18 +191,6 @@ function removed(message) {
217
191
  process.exit(1);
218
192
  };
219
193
  }
220
- function lazy(getActionFunc) {
221
- return async (...args) => {
222
- try {
223
- const actionFunc = await getActionFunc();
224
- await actionFunc(...args);
225
- process.exit(0);
226
- } catch (error) {
227
- errors.assertError(error);
228
- errors$1.exitWithError(error);
229
- }
230
- };
231
- }
232
194
 
233
195
  exports.registerCommands = registerCommands;
234
196
  exports.registerMigrateCommand = registerMigrateCommand;
@@ -2,9 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var fs = require('fs-extra');
5
6
  var paths = require('../lib/paths.cjs.js');
6
7
  var eslint = require('eslint');
7
8
 
9
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
10
+
11
+ var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
12
+
8
13
  var lint = async (directories, opts) => {
9
14
  const eslint$1 = new eslint.ESLint({
10
15
  cwd: paths.paths.targetDir,
@@ -24,9 +29,13 @@ var lint = async (directories, opts) => {
24
29
  if (opts.format === "eslint-formatter-friendly") {
25
30
  process.chdir(paths.paths.targetRoot);
26
31
  }
27
- const resultText = formatter.format(results);
32
+ const resultText = await formatter.format(results);
28
33
  if (resultText) {
29
- console.log(resultText);
34
+ if (opts.outputFile) {
35
+ await fs__default.default.writeFile(paths.paths.resolveTarget(opts.outputFile), resultText);
36
+ } else {
37
+ console.log(resultText);
38
+ }
30
39
  }
31
40
  if (failed) {
32
41
  process.exit(1);
@@ -16,6 +16,8 @@ var chalk__default = /*#__PURE__*/_interopDefaultCompat(chalk);
16
16
 
17
17
  async function command(opts, cmd) {
18
18
  let packages = await cliNode.PackageGraph.listTargetPackages();
19
+ const shouldUseRspack = Boolean(process.env.EXPERIMENTAL_RSPACK);
20
+ const rspack = shouldUseRspack ? require("@rspack/core") : void 0;
19
21
  if (opts.since) {
20
22
  const graph = cliNode.PackageGraph.fromPackages(packages);
21
23
  const changedPackages = await graph.listChangedPackages({
@@ -83,7 +85,8 @@ async function command(opts, cmd) {
83
85
  await buildFrontend.buildFrontend({
84
86
  targetDir: pkg.dir,
85
87
  configPaths: buildOptions.config ?? [],
86
- writeStats: Boolean(buildOptions.stats)
88
+ writeStats: Boolean(buildOptions.stats),
89
+ rspack
87
90
  });
88
91
  }
89
92
  });
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chalk = require('chalk');
4
+ var fs = require('fs-extra');
4
5
  var crypto = require('crypto');
5
6
  var path = require('path');
6
7
  var cliNode = require('@backstage/cli-node');
@@ -12,6 +13,7 @@ var SuccessCache = require('../../lib/cache/SuccessCache.cjs.js');
12
13
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
13
14
 
14
15
  var chalk__default = /*#__PURE__*/_interopDefaultCompat(chalk);
16
+ var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
15
17
 
16
18
  function depCount(pkg) {
17
19
  const deps = pkg.dependencies ? Object.keys(pkg.dependencies).length : 0;
@@ -158,6 +160,7 @@ async function command(opts, cmd) {
158
160
  }
159
161
  });
160
162
  const outputSuccessCache = [];
163
+ let errorOutput = "";
161
164
  let failed = false;
162
165
  for (const {
163
166
  relativeDir,
@@ -169,13 +172,21 @@ async function command(opts, cmd) {
169
172
  console.log(chalk__default.default.red(`Lint failed in ${relativeDir}`));
170
173
  failed = true;
171
174
  if (resultText) {
172
- console.log();
173
- console.log(resultText.trimStart());
175
+ if (opts.outputFile) {
176
+ errorOutput += `${resultText}
177
+ `;
178
+ } else {
179
+ console.log();
180
+ console.log(resultText.trimStart());
181
+ }
174
182
  }
175
183
  } else if (sha) {
176
184
  outputSuccessCache.push(sha);
177
185
  }
178
186
  }
187
+ if (opts.outputFile && errorOutput) {
188
+ await fs__default.default.writeFile(paths.paths.resolveTargetRoot(opts.outputFile), errorOutput);
189
+ }
179
190
  if (cacheContext) {
180
191
  await cache.write(outputSuccessCache);
181
192
  }
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var fs = require('fs-extra');
4
+ var path = require('path');
4
5
  require('yn');
5
- require('path');
6
6
  require('webpack');
7
7
  require('react-dev-utils/FileSizeReporter');
8
8
  require('react-dev-utils/formatWebpackMessages');
@@ -25,7 +25,9 @@ var moduleFederation = require('../../lib/bundler/moduleFederation.cjs.js');
25
25
  var server = require('../../lib/bundler/server.cjs.js');
26
26
 
27
27
  async function startFrontend(options) {
28
- const { name } = await fs.readJson(paths.paths.resolveTarget("package.json"));
28
+ const packageJson = await fs.readJson(
29
+ paths.paths.resolveTarget("package.json")
30
+ );
29
31
  const waitForExit = await server.serveBundle({
30
32
  entry: options.entry,
31
33
  checksEnabled: options.checksEnabled,
@@ -33,8 +35,9 @@ async function startFrontend(options) {
33
35
  verifyVersions: options.verifyVersions,
34
36
  skipOpenBrowser: options.skipOpenBrowser,
35
37
  linkedWorkspace: options.linkedWorkspace,
36
- moduleFederation: moduleFederation.getModuleFederationOptions(
37
- name,
38
+ moduleFederation: await moduleFederation.getModuleFederationOptions(
39
+ packageJson,
40
+ path.resolve(paths.paths.targetDir),
38
41
  options.isModuleFederationRemote
39
42
  )
40
43
  });
@@ -18,6 +18,7 @@ var parallel = require('../../lib/parallel.cjs.js');
18
18
  var releaseManifests = require('@backstage/release-manifests');
19
19
  var migrate = require('./migrate.cjs.js');
20
20
  var utils = require('./utils.cjs.js');
21
+ var run = require('../../lib/run.cjs.js');
21
22
 
22
23
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
23
24
 
@@ -81,6 +82,19 @@ var bump = async (opts) => {
81
82
  releaseManifest
82
83
  });
83
84
  }
85
+ if (hasYarnPlugin) {
86
+ console.log();
87
+ console.log(
88
+ `Updating yarn plugin to v${releaseManifest.releaseVersion}...`
89
+ );
90
+ console.log();
91
+ await run.run("yarn", [
92
+ "plugin",
93
+ "import",
94
+ `https://versions.backstage.io/v1/releases/${releaseManifest.releaseVersion}/yarn-plugin`
95
+ ]);
96
+ console.log();
97
+ }
84
98
  const dependencyMap = await packages.mapDependencies(paths.paths.targetDir, pattern);
85
99
  const versionBumps = /* @__PURE__ */ new Map();
86
100
  await parallel.runParallelWorkers({
@@ -91,6 +91,11 @@ async function buildBundle(options) {
91
91
  { spaces: 2 }
92
92
  );
93
93
  }
94
+ if (rspack) {
95
+ console.log(
96
+ chalk__default.default.yellow(`\u26A0\uFE0F WARNING: Using experimental RSPack bundler.`)
97
+ );
98
+ }
94
99
  const { stats } = await build(configs, isCi, rspack);
95
100
  if (!stats) {
96
101
  throw new Error("No stats returned");
@@ -170,13 +170,19 @@ async function createConfig(paths, options) {
170
170
  if (options.moduleFederation) {
171
171
  const isRemote = options.moduleFederation?.mode === "remote";
172
172
  const AdaptedModuleFederationPlugin = rspack ? rspack.container.ModuleFederationPlugin : webpack.ModuleFederationPlugin;
173
+ const exposes = options.moduleFederation?.exposes ? Object.fromEntries(
174
+ Object.entries(options.moduleFederation?.exposes).map(([k, v]) => [
175
+ k,
176
+ path.resolve(paths.targetPath, v)
177
+ ])
178
+ ) : {
179
+ ".": paths.targetEntry
180
+ };
173
181
  plugins.push(
174
182
  new AdaptedModuleFederationPlugin({
175
183
  ...isRemote && {
176
184
  filename: "remoteEntry.js",
177
- exposes: {
178
- ".": paths.targetEntry
179
- }
185
+ exposes
180
186
  },
181
187
  name: options.moduleFederation.name,
182
188
  runtime: false,
@@ -1,12 +1,14 @@
1
1
  'use strict';
2
2
 
3
3
  var chalk = require('chalk');
4
+ var entryPoints = require('../entryPoints.cjs.js');
5
+ var typeDistProject = require('../typeDistProject.cjs.js');
4
6
 
5
7
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
6
8
 
7
9
  var chalk__default = /*#__PURE__*/_interopDefaultCompat(chalk);
8
10
 
9
- function getModuleFederationOptions(name, isModuleFederationRemote) {
11
+ async function getModuleFederationOptions(packageJson, packageDir, isModuleFederationRemote) {
10
12
  if (!isModuleFederationRemote && !process.env.EXPERIMENTAL_MODULE_FEDERATION) {
11
13
  return void 0;
12
14
  }
@@ -15,12 +17,34 @@ function getModuleFederationOptions(name, isModuleFederationRemote) {
15
17
  `\u26A0\uFE0F WARNING: Module federation is experimental and will receive immediate breaking changes in the future.`
16
18
  )
17
19
  );
20
+ let exposes;
21
+ const packageRole = packageJson.backstage?.role;
22
+ if (isModuleFederationRemote && packageJson.exports && packageRole) {
23
+ const project = await typeDistProject.createTypeDistProject();
24
+ exposes = Object.fromEntries(
25
+ entryPoints.readEntryPoints(packageJson).filter((ep) => {
26
+ if (ep.mount === "./package.json") {
27
+ return false;
28
+ }
29
+ if (ep.mount === ".") {
30
+ return true;
31
+ }
32
+ return typeDistProject.getEntryPointDefaultFeatureType(
33
+ packageRole,
34
+ packageDir,
35
+ project,
36
+ ep.path
37
+ ) !== null;
38
+ }).map((ep) => [ep.mount, ep.path])
39
+ );
40
+ }
18
41
  return {
19
42
  mode: isModuleFederationRemote ? "remote" : "host",
20
43
  // The default output mode requires the name to be a usable as a code
21
44
  // symbol, there might be better options here but for now we need to
22
45
  // sanitize the name.
23
- name: name.replaceAll("@", "").replaceAll("/", "__").replaceAll("-", "_")
46
+ name: packageJson.name.replaceAll("@", "").replaceAll("/", "__").replaceAll("-", "_"),
47
+ exposes
24
48
  };
25
49
  }
26
50
 
@@ -6,7 +6,7 @@ var openBrowser = require('react-dev-utils/openBrowser');
6
6
  var webpack = require('webpack');
7
7
  var WebpackDevServer = require('webpack-dev-server');
8
8
  var paths$1 = require('../paths.cjs.js');
9
- var config = require('../config.cjs.js');
9
+ var config = require('../../modules/config/lib/config.cjs.js');
10
10
  var config$1 = require('./config.cjs.js');
11
11
  var packageDetection = require('./packageDetection.cjs.js');
12
12
  var paths = require('./paths.cjs.js');
@@ -188,6 +188,11 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
188
188
  } else {
189
189
  const bundler = rspack ?? webpack__default.default;
190
190
  const DevServer = rspack ? require("@rspack/dev-server").RspackDevServer : WebpackDevServer__default.default;
191
+ if (rspack) {
192
+ console.log(
193
+ chalk__default.default.yellow(`\u26A0\uFE0F WARNING: Using experimental RSPack dev server.`)
194
+ );
195
+ }
191
196
  const publicPaths = await paths.resolveOptionalBundlingPaths({
192
197
  entry: "src/index-public-experimental",
193
198
  dist: "dist/public"
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ var errors = require('@backstage/errors');
4
+ var errors$1 = require('./errors.cjs.js');
5
+
6
+ function lazy(getActionFunc) {
7
+ return async (...args) => {
8
+ try {
9
+ const actionFunc = await getActionFunc();
10
+ await actionFunc(...args);
11
+ process.exit(0);
12
+ } catch (error) {
13
+ errors.assertError(error);
14
+ errors$1.exitWithError(error);
15
+ }
16
+ };
17
+ }
18
+
19
+ exports.lazy = lazy;
20
+ //# sourceMappingURL=lazy.cjs.js.map
@@ -61,9 +61,6 @@ function createPackageVersionProvider(lockfile) {
61
61
  throw new Error(`No version available for package ${name}`);
62
62
  }
63
63
  const lockfileEntries = lockfile?.get(name);
64
- if (name.startsWith("@types/") && lockfileEntries?.some((entry) => entry.range === "*")) {
65
- return "*";
66
- }
67
64
  for (const specifier of ["^", "~", "*"]) {
68
65
  const range = `workspace:${specifier}`;
69
66
  if (lockfileEntries?.some((entry) => entry.range === range)) {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var configLoader = require('@backstage/config-loader');
6
6
  var openBrowser = require('react-dev-utils/openBrowser');
7
- var config = require('../../lib/config.cjs.js');
7
+ var config = require('../lib/config.cjs.js');
8
8
 
9
9
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
10
10
 
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var yaml = require('yaml');
6
6
  var config$1 = require('@backstage/config');
7
- var config = require('../../lib/config.cjs.js');
7
+ var config = require('../lib/config.cjs.js');
8
8
 
9
9
  var print = async (opts) => {
10
10
  const { schema, appConfigs } = await config.loadCliConfig({
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var yaml = require('yaml');
6
- var config = require('../../lib/config.cjs.js');
6
+ var config = require('../lib/config.cjs.js');
7
7
  var configLoader = require('@backstage/config-loader');
8
8
 
9
9
  var schema = async (opts) => {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var config = require('../../lib/config.cjs.js');
5
+ var config = require('../lib/config.cjs.js');
6
6
 
7
7
  var validate = async (opts) => {
8
8
  await config.loadCliConfig({
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+
3
+ var lazy = require('../../lib/lazy.cjs.js');
4
+
5
+ const configOption = [
6
+ "--config <path>",
7
+ "Config files to load instead of app-config.yaml",
8
+ (opt, opts) => opts ? [...opts, opt] : [opt],
9
+ Array()
10
+ ];
11
+ function registerCommands(program) {
12
+ program.command("config:docs").option(
13
+ "--package <name>",
14
+ "Only include the schema that applies to the given package"
15
+ ).description("Browse the configuration reference documentation").action(lazy.lazy(() => Promise.resolve().then(function () { return require('./commands/docs.cjs.js'); }).then((m) => m.default)));
16
+ program.command("config:print").option(
17
+ "--package <name>",
18
+ "Only load config schema that applies to the given package"
19
+ ).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(
20
+ "--format <format>",
21
+ "Format to print the configuration in, either json or yaml [yaml]"
22
+ ).option(...configOption).description("Print the app configuration for the current package").action(lazy.lazy(() => Promise.resolve().then(function () { return require('./commands/print.cjs.js'); }).then((m) => m.default)));
23
+ program.command("config:check").option(
24
+ "--package <name>",
25
+ "Only load config schema that applies to the given package"
26
+ ).option("--lax", "Do not require environment variables to be set").option("--frontend", "Only validate the frontend configuration").option("--deprecated", "Output deprecated configuration settings").option(
27
+ "--strict",
28
+ "Enable strict config validation, forbidding errors and unknown keys"
29
+ ).option(...configOption).description(
30
+ "Validate that the given configuration loads and matches schema"
31
+ ).action(lazy.lazy(() => Promise.resolve().then(function () { return require('./commands/validate.cjs.js'); }).then((m) => m.default)));
32
+ program.command("config:schema").option(
33
+ "--package <name>",
34
+ "Only output config schema that applies to the given package"
35
+ ).option(
36
+ "--format <format>",
37
+ "Format to print the schema in, either json or yaml [yaml]"
38
+ ).option("--merge", "Print the config schemas merged", true).option("--no-merge", "Print the config schemas not merged").description("Print configuration schema").action(lazy.lazy(() => Promise.resolve().then(function () { return require('./commands/schema.cjs.js'); }).then((m) => m.default)));
39
+ }
40
+
41
+ exports.configOption = configOption;
42
+ exports.registerCommands = registerCommands;
43
+ //# sourceMappingURL=index.cjs.js.map
@@ -2,7 +2,7 @@
2
2
 
3
3
  var configLoader = require('@backstage/config-loader');
4
4
  var config = require('@backstage/config');
5
- var paths = require('./paths.cjs.js');
5
+ var paths = require('../../../lib/paths.cjs.js');
6
6
  var getPackages = require('@manypkg/get-packages');
7
7
  var cliNode = require('@backstage/cli-node');
8
8
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.5.3";
3
+ var version = "0.7.0-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.0.2";
3
+ var version = "1.1.1-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.1.0";
3
+ var version = "1.2.1-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.8.0";
3
+ var version = "1.9.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.29.3";
3
+ var version = "0.29.5-next.0";
4
4
  var dependencies = {
5
5
  "@backstage/catalog-model": "workspace:^",
6
6
  "@backstage/cli-common": "workspace:^",
@@ -13,7 +13,7 @@ var dependencies = {
13
13
  "@backstage/release-manifests": "workspace:^",
14
14
  "@backstage/types": "workspace:^",
15
15
  "@manypkg/get-packages": "^1.1.3",
16
- "@module-federation/enhanced": "^0.7.0",
16
+ "@module-federation/enhanced": "^0.8.0",
17
17
  "@octokit/graphql": "^5.0.0",
18
18
  "@octokit/graphql-schema": "^13.7.0",
19
19
  "@octokit/oauth-app": "^4.2.0",
@@ -37,8 +37,8 @@ var dependencies = {
37
37
  "@swc/jest": "^0.2.22",
38
38
  "@types/jest": "^29.5.11",
39
39
  "@types/webpack-env": "^1.15.2",
40
- "@typescript-eslint/eslint-plugin": "^6.12.0",
41
- "@typescript-eslint/parser": "^6.7.2",
40
+ "@typescript-eslint/eslint-plugin": "^8.17.0",
41
+ "@typescript-eslint/parser": "^8.16.0",
42
42
  "@yarnpkg/lockfile": "^1.1.0",
43
43
  "@yarnpkg/parsers": "^3.0.0",
44
44
  bfj: "^8.0.0",
@@ -55,14 +55,14 @@ var dependencies = {
55
55
  eslint: "^8.6.0",
56
56
  "eslint-config-prettier": "^9.0.0",
57
57
  "eslint-formatter-friendly": "^7.0.0",
58
- "eslint-plugin-deprecation": "^2.0.0",
59
- "eslint-plugin-import": "^2.25.4",
60
- "eslint-plugin-jest": "^28.0.0",
61
- "eslint-plugin-jsx-a11y": "^6.5.1",
62
- "eslint-plugin-react": "^7.28.0",
63
- "eslint-plugin-react-hooks": "^4.3.0",
64
- "eslint-plugin-unused-imports": "^3.0.0",
65
- "eslint-webpack-plugin": "^4.0.0",
58
+ "eslint-plugin-deprecation": "^3.0.0",
59
+ "eslint-plugin-import": "^2.31.0",
60
+ "eslint-plugin-jest": "^28.9.0",
61
+ "eslint-plugin-jsx-a11y": "^6.10.2",
62
+ "eslint-plugin-react": "^7.37.2",
63
+ "eslint-plugin-react-hooks": "^5.0.0",
64
+ "eslint-plugin-unused-imports": "^4.1.4",
65
+ "eslint-webpack-plugin": "^4.2.0",
66
66
  express: "^4.17.1",
67
67
  "fork-ts-checker-webpack-plugin": "^9.0.0",
68
68
  "fs-extra": "^11.2.0",
@@ -82,7 +82,6 @@ var dependencies = {
82
82
  lodash: "^4.17.21",
83
83
  "mini-css-extract-plugin": "^2.4.2",
84
84
  minimatch: "^9.0.0",
85
- "node-fetch": "^2.7.0",
86
85
  "node-libs-browser": "^2.2.1",
87
86
  "npm-packlist": "^5.0.0",
88
87
  ora: "^5.3.0",
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.3.0";
3
+ var version = "1.3.1";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.15.2";
3
+ var version = "1.15.3";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.16.1";
3
+ var version = "0.16.2";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.10.1";
3
+ var version = "1.10.2";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.1.4";
3
+ var version = "1.1.5";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.2.5";
3
+ var version = "1.2.6";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.7.2";
3
+ var version = "1.7.3";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.6.2";
3
+ var version = "0.6.3";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.24.0";
3
+ var version = "0.24.2-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.2.2";
3
+ var version = "0.2.4-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.14.0";
3
+ var version = "1.15.1-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.6.1";
3
+ var version = "0.6.3-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.1.16";
3
+ var version = "0.1.18-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/cli",
3
- "version": "0.29.3",
3
+ "version": "0.29.5-next.0",
4
4
  "description": "CLI for developing Backstage plugins and apps",
5
5
  "backstage": {
6
6
  "role": "cli"
@@ -42,18 +42,18 @@
42
42
  "watch": "./src"
43
43
  },
44
44
  "dependencies": {
45
- "@backstage/catalog-model": "^1.7.1",
46
- "@backstage/cli-common": "^0.1.15",
47
- "@backstage/cli-node": "^0.2.10",
48
- "@backstage/config": "^1.3.0",
49
- "@backstage/config-loader": "^1.9.2",
50
- "@backstage/errors": "^1.2.5",
51
- "@backstage/eslint-plugin": "^0.1.10",
52
- "@backstage/integration": "^1.15.2",
53
- "@backstage/release-manifests": "^0.0.11",
54
- "@backstage/types": "^1.2.0",
45
+ "@backstage/catalog-model": "1.7.2",
46
+ "@backstage/cli-common": "0.1.15",
47
+ "@backstage/cli-node": "0.2.11",
48
+ "@backstage/config": "1.3.1",
49
+ "@backstage/config-loader": "1.9.5-next.0",
50
+ "@backstage/errors": "1.2.6",
51
+ "@backstage/eslint-plugin": "0.1.10",
52
+ "@backstage/integration": "1.16.0",
53
+ "@backstage/release-manifests": "0.0.12",
54
+ "@backstage/types": "1.2.0",
55
55
  "@manypkg/get-packages": "^1.1.3",
56
- "@module-federation/enhanced": "^0.7.0",
56
+ "@module-federation/enhanced": "^0.8.0",
57
57
  "@octokit/graphql": "^5.0.0",
58
58
  "@octokit/graphql-schema": "^13.7.0",
59
59
  "@octokit/oauth-app": "^4.2.0",
@@ -77,8 +77,8 @@
77
77
  "@swc/jest": "^0.2.22",
78
78
  "@types/jest": "^29.5.11",
79
79
  "@types/webpack-env": "^1.15.2",
80
- "@typescript-eslint/eslint-plugin": "^6.12.0",
81
- "@typescript-eslint/parser": "^6.7.2",
80
+ "@typescript-eslint/eslint-plugin": "^8.17.0",
81
+ "@typescript-eslint/parser": "^8.16.0",
82
82
  "@yarnpkg/lockfile": "^1.1.0",
83
83
  "@yarnpkg/parsers": "^3.0.0",
84
84
  "bfj": "^8.0.0",
@@ -95,14 +95,14 @@
95
95
  "eslint": "^8.6.0",
96
96
  "eslint-config-prettier": "^9.0.0",
97
97
  "eslint-formatter-friendly": "^7.0.0",
98
- "eslint-plugin-deprecation": "^2.0.0",
99
- "eslint-plugin-import": "^2.25.4",
100
- "eslint-plugin-jest": "^28.0.0",
101
- "eslint-plugin-jsx-a11y": "^6.5.1",
102
- "eslint-plugin-react": "^7.28.0",
103
- "eslint-plugin-react-hooks": "^4.3.0",
104
- "eslint-plugin-unused-imports": "^3.0.0",
105
- "eslint-webpack-plugin": "^4.0.0",
98
+ "eslint-plugin-deprecation": "^3.0.0",
99
+ "eslint-plugin-import": "^2.31.0",
100
+ "eslint-plugin-jest": "^28.9.0",
101
+ "eslint-plugin-jsx-a11y": "^6.10.2",
102
+ "eslint-plugin-react": "^7.37.2",
103
+ "eslint-plugin-react-hooks": "^5.0.0",
104
+ "eslint-plugin-unused-imports": "^4.1.4",
105
+ "eslint-webpack-plugin": "^4.2.0",
106
106
  "express": "^4.17.1",
107
107
  "fork-ts-checker-webpack-plugin": "^9.0.0",
108
108
  "fs-extra": "^11.2.0",
@@ -122,7 +122,6 @@
122
122
  "lodash": "^4.17.21",
123
123
  "mini-css-extract-plugin": "^2.4.2",
124
124
  "minimatch": "^9.0.0",
125
- "node-fetch": "^2.7.0",
126
125
  "node-libs-browser": "^2.2.1",
127
126
  "npm-packlist": "^5.0.0",
128
127
  "ora": "^5.3.0",
@@ -158,22 +157,22 @@
158
157
  "zod": "^3.22.4"
159
158
  },
160
159
  "devDependencies": {
161
- "@backstage/backend-plugin-api": "^1.0.2",
162
- "@backstage/backend-test-utils": "^1.1.0",
163
- "@backstage/catalog-client": "^1.8.0",
164
- "@backstage/config": "^1.3.0",
165
- "@backstage/core-app-api": "^1.15.2",
166
- "@backstage/core-components": "^0.16.1",
167
- "@backstage/core-plugin-api": "^1.10.1",
168
- "@backstage/dev-utils": "^1.1.4",
169
- "@backstage/errors": "^1.2.5",
170
- "@backstage/plugin-auth-backend": "^0.24.0",
171
- "@backstage/plugin-auth-backend-module-guest-provider": "^0.2.2",
172
- "@backstage/plugin-catalog-node": "^1.14.0",
173
- "@backstage/plugin-scaffolder-node": "^0.6.1",
174
- "@backstage/plugin-scaffolder-node-test-utils": "^0.1.16",
175
- "@backstage/test-utils": "^1.7.2",
176
- "@backstage/theme": "^0.6.2",
160
+ "@backstage/backend-plugin-api": "1.1.1-next.0",
161
+ "@backstage/backend-test-utils": "1.2.1-next.0",
162
+ "@backstage/catalog-client": "1.9.0",
163
+ "@backstage/config": "1.3.1",
164
+ "@backstage/core-app-api": "1.15.3",
165
+ "@backstage/core-components": "0.16.2",
166
+ "@backstage/core-plugin-api": "1.10.2",
167
+ "@backstage/dev-utils": "1.1.5",
168
+ "@backstage/errors": "1.2.6",
169
+ "@backstage/plugin-auth-backend": "0.24.2-next.0",
170
+ "@backstage/plugin-auth-backend-module-guest-provider": "0.2.4-next.0",
171
+ "@backstage/plugin-catalog-node": "1.15.1-next.0",
172
+ "@backstage/plugin-scaffolder-node": "0.6.3-next.0",
173
+ "@backstage/plugin-scaffolder-node-test-utils": "0.1.18-next.0",
174
+ "@backstage/test-utils": "1.7.3",
175
+ "@backstage/theme": "0.6.3",
177
176
  "@rspack/core": "^1.0.10",
178
177
  "@rspack/dev-server": "^1.0.9",
179
178
  "@rspack/plugin-react-refresh": "^1.0.0",