@backstage/cli 0.7.15 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/config/eslint.backend.js +11 -6
  3. package/config/jest.js +45 -16
  4. package/config/jestEsmTransform.js +4 -21
  5. package/config/jestSucraseTransform.js +66 -0
  6. package/dist/cjs/{build-6991f114.cjs.js → build-1cbb9e7d.cjs.js} +6 -5
  7. package/dist/cjs/{build-e9d00839.cjs.js → build-70dd213a.cjs.js} +4 -3
  8. package/dist/cjs/{build-584089b4.cjs.js → build-b25b29ed.cjs.js} +4 -3
  9. package/dist/cjs/{build-6303ed2c.cjs.js → build-bae5a019.cjs.js} +4 -3
  10. package/dist/cjs/{buildImage-40785c7b.cjs.js → buildImage-6b35526c.cjs.js} +5 -4
  11. package/dist/cjs/{buildWorkspace-54f31886.cjs.js → buildWorkspace-424d4929.cjs.js} +5 -4
  12. package/dist/cjs/{bump-f1bd882f.cjs.js → bump-bce7f9c2.cjs.js} +10 -50
  13. package/dist/cjs/{bundle-82c252ba.cjs.js → bundle-cc6870fb.cjs.js} +6 -5
  14. package/dist/cjs/{clean-d37f05f1.cjs.js → clean-7a981ea7.cjs.js} +3 -2
  15. package/dist/cjs/{config-25f9b58b.cjs.js → config-24fce3c1.cjs.js} +20 -5
  16. package/dist/cjs/{createPlugin-066b2211.cjs.js → createPlugin-2c2b30fc.cjs.js} +7 -4
  17. package/dist/cjs/{dev-267f8c50.cjs.js → dev-efe399b8.cjs.js} +5 -4
  18. package/dist/cjs/{diff-23290f53.cjs.js → diff-e3661054.cjs.js} +3 -2
  19. package/dist/cjs/{docs-16e1a114.cjs.js → docs-ceb404a3.cjs.js} +4 -3
  20. package/dist/cjs/{index-595dd01c.cjs.js → index-26bec8ac.cjs.js} +5 -6
  21. package/dist/cjs/{index-74ba6239.cjs.js → index-6fee1c9a.cjs.js} +159 -41
  22. package/dist/cjs/{index-06502eb1.cjs.js → index-fbff7b78.cjs.js} +3 -2
  23. package/dist/cjs/{info-60e7921f.cjs.js → info-5e7c2679.cjs.js} +4 -3
  24. package/dist/cjs/install-5920b5df.cjs.js +214 -0
  25. package/dist/cjs/{lint-30f44ea5.cjs.js → lint-306bb8fe.cjs.js} +4 -3
  26. package/dist/cjs/{lint-a76f6ca5.cjs.js → lint-6175d471.cjs.js} +4 -3
  27. package/dist/cjs/{pack-cd0b0812.cjs.js → pack-32228ad6.cjs.js} +3 -2
  28. package/dist/cjs/{packager-c2a87e1f.cjs.js → packager-1ad7272f.cjs.js} +2 -2
  29. package/dist/cjs/packages-a5b6a3df.cjs.js +50 -0
  30. package/dist/cjs/{paths-a0eb9f40.cjs.js → paths-09202a46.cjs.js} +8 -5
  31. package/dist/cjs/{print-81bff161.cjs.js → print-806676fe.cjs.js} +6 -4
  32. package/dist/cjs/{removePlugin-3ad49c8c.cjs.js → removePlugin-f82ac16a.cjs.js} +11 -3
  33. package/dist/cjs/{run-7e2d4777.cjs.js → run-59c4395e.cjs.js} +9 -4
  34. package/dist/cjs/{schema-48dd9498.cjs.js → schema-398d8593.cjs.js} +4 -3
  35. package/dist/cjs/{serve-7f18ef8d.cjs.js → serve-708fbf98.cjs.js} +8 -7
  36. package/dist/cjs/{serve-4d9dbf1e.cjs.js → serve-f4bb3cb0.cjs.js} +7 -6
  37. package/dist/cjs/{server-433545bf.cjs.js → server-107d9cc0.cjs.js} +2 -2
  38. package/dist/cjs/{tasks-fbc2dd76.cjs.js → tasks-9bd3e946.cjs.js} +2 -2
  39. package/dist/cjs/{testCommand-749220a2.cjs.js → testCommand-e32fbd45.cjs.js} +4 -3
  40. package/dist/cjs/{validate-5a9fa99d.cjs.js → validate-9523a11e.cjs.js} +6 -4
  41. package/dist/index.cjs.js +2 -1
  42. package/package.json +21 -22
  43. package/templates/default-backend-plugin/package.json.hbs +1 -1
  44. package/templates/default-plugin/package.json.hbs +1 -1
  45. package/templates/default-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs +5 -2
  46. package/templates/default-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs +2 -2
  47. package/templates/default-plugin/src/setupTests.ts +1 -1
@@ -2,10 +2,24 @@
2
2
 
3
3
  var configLoader = require('@backstage/config-loader');
4
4
  var config = require('@backstage/config');
5
- var index = require('./index-74ba6239.cjs.js');
5
+ var index = require('./index-6fee1c9a.cjs.js');
6
+
7
+ function isValidUrl(url) {
8
+ try {
9
+ new URL(url);
10
+ return true;
11
+ } catch {
12
+ return false;
13
+ }
14
+ }
6
15
 
7
16
  async function loadCliConfig(options) {
8
- const configPaths = options.args.map((arg) => index.paths.resolveTarget(arg));
17
+ const configTargets = [];
18
+ options.args.forEach((arg) => {
19
+ if (!isValidUrl(arg)) {
20
+ configTargets.push({path: index.paths.resolveTarget(arg)});
21
+ }
22
+ });
9
23
  const {Project} = require("@lerna/project");
10
24
  const project = new Project(index.paths.targetDir);
11
25
  const packages = await project.getPackages();
@@ -17,13 +31,14 @@ async function loadCliConfig(options) {
17
31
  const appConfigs = await configLoader.loadConfig({
18
32
  experimentalEnvFunc: options.mockEnv ? async (name) => process.env[name] || "x" : void 0,
19
33
  configRoot: index.paths.targetRoot,
20
- configPaths
34
+ configPaths: [],
35
+ configTargets
21
36
  });
22
37
  process.stderr.write(`Loaded config from ${appConfigs.map((c) => c.context).join(", ")}
23
38
  `);
24
39
  try {
25
40
  const frontendAppConfigs = schema.process(appConfigs, {
26
- visibility: ["frontend"],
41
+ visibility: options.fullVisibility ? ["frontend", "backend", "secret"] : ["frontend"],
27
42
  withFilteredKeys: options.withFilteredKeys
28
43
  });
29
44
  const frontendConfig = config.ConfigReader.fromConfigs(frontendAppConfigs);
@@ -67,4 +82,4 @@ function findPackages(packages, fromPackage) {
67
82
  }
68
83
 
69
84
  exports.loadCliConfig = loadCliConfig;
70
- //# sourceMappingURL=config-25f9b58b.cjs.js.map
85
+ //# sourceMappingURL=config-24fce3c1.cjs.js.map
@@ -9,10 +9,11 @@ var path = require('path');
9
9
  var camelCase = require('lodash/camelCase');
10
10
  var upperFirst = require('lodash/upperFirst');
11
11
  var os = require('os');
12
- var tasks = require('./tasks-fbc2dd76.cjs.js');
13
- var index = require('./index-74ba6239.cjs.js');
12
+ var errors = require('@backstage/errors');
13
+ var tasks = require('./tasks-9bd3e946.cjs.js');
14
+ var index = require('./index-6fee1c9a.cjs.js');
14
15
  var Lockfile = require('./Lockfile-80f0eec4.cjs.js');
15
- require('./run-7e2d4777.cjs.js');
16
+ require('./run-59c4395e.cjs.js');
16
17
  require('handlebars');
17
18
  require('ora');
18
19
  require('recursive-readdir');
@@ -114,6 +115,7 @@ async function buildPlugin(pluginFolder) {
114
115
  throw new Error(`Warning: Could not execute command ${chalk__default['default'].cyan(command)}`);
115
116
  });
116
117
  } catch (error) {
118
+ errors.assertError(error);
117
119
  tasks.Task.error(error.message);
118
120
  break;
119
121
  }
@@ -214,6 +216,7 @@ var createPlugin = async (cmd) => {
214
216
  tasks.Task.log();
215
217
  tasks.Task.exit();
216
218
  } catch (error) {
219
+ errors.assertError(error);
217
220
  tasks.Task.error(error.message);
218
221
  tasks.Task.log("It seems that something went wrong when creating the plugin \u{1F914}");
219
222
  tasks.Task.log("We are going to clean up, and then you can try again.");
@@ -230,4 +233,4 @@ exports.addPluginExtensionToApp = addPluginExtensionToApp;
230
233
  exports.capitalize = capitalize;
231
234
  exports.default = createPlugin;
232
235
  exports.movePlugin = movePlugin;
233
- //# sourceMappingURL=createPlugin-066b2211.cjs.js.map
236
+ //# sourceMappingURL=createPlugin-2c2b30fc.cjs.js.map
@@ -1,14 +1,15 @@
1
1
  'use strict';
2
2
 
3
3
  var fs = require('fs-extra');
4
- var index = require('./index-74ba6239.cjs.js');
4
+ var index = require('./index-6fee1c9a.cjs.js');
5
5
  var webpack = require('webpack');
6
- var paths = require('./paths-a0eb9f40.cjs.js');
6
+ var paths = require('./paths-09202a46.cjs.js');
7
7
  require('commander');
8
8
  require('chalk');
9
9
  require('semver');
10
10
  require('@backstage/cli-common');
11
11
  require('@backstage/config/package.json');
12
+ require('@backstage/errors');
12
13
  require('path');
13
14
  require('fork-ts-checker-webpack-plugin');
14
15
  require('html-webpack-plugin');
@@ -19,7 +20,7 @@ require('terser-webpack-plugin');
19
20
  require('./parallel-a4714c72.cjs.js');
20
21
  require('mini-css-extract-plugin');
21
22
  require('./svgrTemplate-2d0d15cf.cjs.js');
22
- require('./run-7e2d4777.cjs.js');
23
+ require('./run-59c4395e.cjs.js');
23
24
  require('child_process');
24
25
  require('util');
25
26
  require('lodash/pickBy');
@@ -66,4 +67,4 @@ var dev = async (cmd) => {
66
67
  };
67
68
 
68
69
  exports.default = dev;
69
- //# sourceMappingURL=dev-267f8c50.cjs.js.map
70
+ //# sourceMappingURL=dev-efe399b8.cjs.js.map
@@ -7,11 +7,12 @@ var path = require('path');
7
7
  var inquirer = require('inquirer');
8
8
  var handlebars = require('handlebars');
9
9
  var recursive = require('recursive-readdir');
10
- var index = require('./index-74ba6239.cjs.js');
10
+ var index = require('./index-6fee1c9a.cjs.js');
11
11
  require('commander');
12
12
  require('semver');
13
13
  require('@backstage/cli-common');
14
14
  require('@backstage/config/package.json');
15
+ require('@backstage/errors');
15
16
 
16
17
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
17
18
 
@@ -373,4 +374,4 @@ async function readPluginData() {
373
374
  }
374
375
 
375
376
  exports.default = diff;
376
- //# sourceMappingURL=diff-23290f53.cjs.js.map
377
+ //# sourceMappingURL=diff-e3661054.cjs.js.map
@@ -2,15 +2,16 @@
2
2
 
3
3
  var configLoader = require('@backstage/config-loader');
4
4
  var openBrowser = require('react-dev-utils/openBrowser');
5
- var config = require('./config-25f9b58b.cjs.js');
5
+ var config = require('./config-24fce3c1.cjs.js');
6
6
  require('@backstage/config');
7
- require('./index-74ba6239.cjs.js');
7
+ require('./index-6fee1c9a.cjs.js');
8
8
  require('commander');
9
9
  require('chalk');
10
10
  require('fs-extra');
11
11
  require('semver');
12
12
  require('@backstage/cli-common');
13
13
  require('@backstage/config/package.json');
14
+ require('@backstage/errors');
14
15
 
15
16
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
16
17
 
@@ -28,4 +29,4 @@ var docs = async (cmd) => {
28
29
  };
29
30
 
30
31
  exports.default = docs;
31
- //# sourceMappingURL=docs-16e1a114.cjs.js.map
32
+ //# sourceMappingURL=docs-ceb404a3.cjs.js.map
@@ -4,8 +4,8 @@ var fs = require('fs-extra');
4
4
  var path = require('path');
5
5
  var os = require('os');
6
6
  var tar = require('tar');
7
- var index = require('./index-74ba6239.cjs.js');
8
- var run = require('./run-7e2d4777.cjs.js');
7
+ var index = require('./index-6fee1c9a.cjs.js');
8
+ var run = require('./run-59c4395e.cjs.js');
9
9
 
10
10
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
11
 
@@ -13,9 +13,8 @@ var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
13
13
  var tar__default = /*#__PURE__*/_interopDefaultLegacy(tar);
14
14
 
15
15
  const UNSAFE_PACKAGES = [
16
- ...Object.keys(index.packageVersions),
17
- "@backstage/cli-common",
18
- "@backstage/config-loader"
16
+ ...Object.keys(index.dependencies),
17
+ ...Object.keys(index.devDependencies)
19
18
  ];
20
19
  async function createDistWorkspace(packageNames, options = {}) {
21
20
  var _a, _b, _c;
@@ -118,4 +117,4 @@ async function findTargetPackages(pkgNames) {
118
117
  }
119
118
 
120
119
  exports.createDistWorkspace = createDistWorkspace;
121
- //# sourceMappingURL=index-595dd01c.cjs.js.map
120
+ //# sourceMappingURL=index-26bec8ac.cjs.js.map
@@ -6,6 +6,7 @@ var fs = require('fs-extra');
6
6
  var semver = require('semver');
7
7
  var cliCommon = require('@backstage/cli-common');
8
8
  var package_json = require('@backstage/config/package.json');
9
+ var errors = require('@backstage/errors');
9
10
 
10
11
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
12
 
@@ -21,11 +22,7 @@ class CustomError extends Error {
21
22
  }
22
23
  class ExitCodeError extends CustomError {
23
24
  constructor(code, command) {
24
- if (command) {
25
- super(`Command '${command}' exited with code ${code}`);
26
- } else {
27
- super(`Child exited with code ${code}`);
28
- }
25
+ super(command ? `Command '${command}' exited with code ${code}` : `Child exited with code ${code}`);
29
26
  this.code = code;
30
27
  }
31
28
  }
@@ -49,21 +46,139 @@ class NotFoundError extends CustomError {
49
46
 
50
47
  const paths = cliCommon.findPaths(__dirname);
51
48
 
52
- var version$8 = "0.9.6";
49
+ var version$8 = "0.9.9";
53
50
 
54
- var version$7 = "0.7.15";
51
+ var version$7 = "0.8.2";
52
+ var dependencies = {
53
+ "@backstage/cli-common": "^0.1.5",
54
+ "@backstage/config": "^0.1.11",
55
+ "@backstage/config-loader": "^0.7.2",
56
+ "@backstage/errors": "^0.1.4",
57
+ "@backstage/types": "^0.1.1",
58
+ "@hot-loader/react-dom": "^16.13.0",
59
+ "@lerna/package-graph": "^4.0.0",
60
+ "@lerna/project": "^4.0.0",
61
+ "@octokit/request": "^5.4.12",
62
+ "@rollup/plugin-commonjs": "^17.1.0",
63
+ "@rollup/plugin-json": "^4.0.2",
64
+ "@rollup/plugin-node-resolve": "^13.0.0",
65
+ "@rollup/plugin-yaml": "^3.0.0",
66
+ "@spotify/eslint-config-base": "^12.0.0",
67
+ "@spotify/eslint-config-react": "^12.0.0",
68
+ "@spotify/eslint-config-typescript": "^12.0.0",
69
+ "@sucrase/jest-plugin": "^2.1.1",
70
+ "@sucrase/webpack-loader": "^2.0.0",
71
+ "@svgr/plugin-jsx": "5.5.x",
72
+ "@svgr/plugin-svgo": "5.4.x",
73
+ "@svgr/rollup": "5.5.x",
74
+ "@svgr/webpack": "5.5.x",
75
+ "@types/webpack-env": "^1.15.2",
76
+ "@typescript-eslint/eslint-plugin": "^v4.30.0",
77
+ "@typescript-eslint/parser": "^v4.28.3",
78
+ "@yarnpkg/lockfile": "^1.1.0",
79
+ bfj: "^7.0.2",
80
+ buffer: "^6.0.3",
81
+ chalk: "^4.0.0",
82
+ chokidar: "^3.3.1",
83
+ commander: "^6.1.0",
84
+ "css-loader": "^5.2.6",
85
+ dashify: "^2.0.0",
86
+ diff: "^5.0.0",
87
+ esbuild: "^0.8.56",
88
+ eslint: "^7.30.0",
89
+ "eslint-config-prettier": "^8.3.0",
90
+ "eslint-formatter-friendly": "^7.0.0",
91
+ "eslint-plugin-import": "^2.20.2",
92
+ "eslint-plugin-jest": "^24.1.0",
93
+ "eslint-plugin-jsx-a11y": "^6.2.1",
94
+ "eslint-plugin-monorepo": "^0.3.2",
95
+ "eslint-plugin-react": "^7.12.4",
96
+ "eslint-plugin-react-hooks": "^4.0.0",
97
+ express: "^4.17.1",
98
+ "fork-ts-checker-webpack-plugin": "^4.0.5",
99
+ "fs-extra": "9.1.0",
100
+ glob: "^7.1.7",
101
+ handlebars: "^4.7.3",
102
+ "html-webpack-plugin": "^5.3.1",
103
+ inquirer: "^7.0.4",
104
+ jest: "^26.0.1",
105
+ "jest-css-modules": "^2.1.0",
106
+ "json-schema": "^0.3.0",
107
+ "jest-transform-yaml": "^0.1.1",
108
+ lodash: "^4.17.21",
109
+ "mini-css-extract-plugin": "^2.4.2",
110
+ "node-libs-browser": "^2.2.1",
111
+ ora: "^5.3.0",
112
+ postcss: "^8.1.0",
113
+ process: "^0.11.10",
114
+ react: "^16.0.0",
115
+ "react-dev-utils": "^11.0.4",
116
+ "react-hot-loader": "^4.12.21",
117
+ "recursive-readdir": "^2.2.2",
118
+ "replace-in-file": "^6.0.0",
119
+ rollup: "2.44.x",
120
+ "rollup-plugin-dts": "^3.0.1",
121
+ "rollup-plugin-esbuild": "2.6.x",
122
+ "rollup-plugin-peer-deps-external": "^2.2.2",
123
+ "rollup-plugin-postcss": "^4.0.0",
124
+ "rollup-pluginutils": "^2.8.2",
125
+ "run-script-webpack-plugin": "^0.0.11",
126
+ semver: "^7.3.2",
127
+ "style-loader": "^1.2.1",
128
+ sucrase: "^3.20.2",
129
+ tar: "^6.1.2",
130
+ "terser-webpack-plugin": "^5.1.3",
131
+ "ts-loader": "^8.0.17",
132
+ typescript: "^4.0.3",
133
+ util: "^0.12.3",
134
+ webpack: "^5.48.0",
135
+ "webpack-dev-server": "4.3.1",
136
+ "webpack-node-externals": "^3.0.0",
137
+ yaml: "^1.10.0",
138
+ "yml-loader": "^2.1.0",
139
+ yn: "^4.0.0"
140
+ };
141
+ var devDependencies = {
142
+ "@backstage/backend-common": "^0.9.9",
143
+ "@backstage/config": "^0.1.11",
144
+ "@backstage/core-components": "^0.7.3",
145
+ "@backstage/core-plugin-api": "^0.1.13",
146
+ "@backstage/core-app-api": "^0.1.20",
147
+ "@backstage/dev-utils": "^0.2.12",
148
+ "@backstage/test-utils": "^0.1.21",
149
+ "@backstage/theme": "^0.2.13",
150
+ "@types/diff": "^5.0.0",
151
+ "@types/express": "^4.17.6",
152
+ "@types/fs-extra": "^9.0.1",
153
+ "@types/http-proxy": "^1.17.4",
154
+ "@types/inquirer": "^7.3.1",
155
+ "@types/mock-fs": "^4.13.0",
156
+ "@types/node": "^14.14.32",
157
+ "@types/recursive-readdir": "^2.2.0",
158
+ "@types/rollup-plugin-peer-deps-external": "^2.2.0",
159
+ "@types/rollup-plugin-postcss": "^2.0.0",
160
+ "@types/tar": "^4.0.3",
161
+ "@types/terser-webpack-plugin": "^5.0.4",
162
+ "@types/webpack": "^5.28.0",
163
+ "@types/webpack-dev-server": "^3.11.5",
164
+ "@types/yarnpkg__lockfile": "^1.1.4",
165
+ del: "^6.0.0",
166
+ "mock-fs": "^5.1.0",
167
+ nodemon: "^2.0.2",
168
+ "ts-node": "^10.0.0"
169
+ };
55
170
 
56
- var version$6 = "0.1.16";
171
+ var version$6 = "0.1.20";
57
172
 
58
- var version$5 = "0.6.1";
173
+ var version$5 = "0.7.3";
59
174
 
60
- var version$4 = "0.1.10";
175
+ var version$4 = "0.1.13";
61
176
 
62
- var version$3 = "0.2.11";
177
+ var version$3 = "0.2.12";
63
178
 
64
- var version$2 = "0.1.18";
179
+ var version$2 = "0.1.21";
65
180
 
66
- var version$1 = "0.2.10";
181
+ var version$1 = "0.2.13";
67
182
 
68
183
  const packageVersions = {
69
184
  "@backstage/backend-common": version$8,
@@ -116,32 +231,33 @@ function registerCommands(program) {
116
231
  (opt, opts) => [...opts, opt],
117
232
  Array()
118
233
  ];
119
- program.command("app:build").description("Build an app for a production release").option("--stats", "Write bundle stats to output directory").option("--lax", "Do not require environment variables to be set").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./build-6991f114.cjs.js'); }).then((m) => m.default)));
120
- 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-7f18ef8d.cjs.js'); }).then((m) => m.default)));
121
- program.command("backend:build").description("Build a backend plugin").action(lazy(() => Promise.resolve().then(function () { return require('./build-584089b4.cjs.js'); }).then((m) => m.default)));
122
- 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-82c252ba.cjs.js'); }).then((m) => m.default)));
123
- program.command("backend:build-image").allowUnknownOption(true).helpOption(", --backstage-cli-help").option("--build", "Build packages before packing them into the image").description("Bundles the package into a docker image. This command is deprecated and will be removed.").action(lazy(() => Promise.resolve().then(function () { return require('./buildImage-40785c7b.cjs.js'); }).then((m) => m.default)));
124
- 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-267f8c50.cjs.js'); }).then((m) => m.default)));
125
- 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-066b2211.cjs.js'); }).then((m) => m.default)));
126
- program.command("remove-plugin").description("Removes plugin in the current repository").action(lazy(() => Promise.resolve().then(function () { return require('./removePlugin-3ad49c8c.cjs.js'); }).then((m) => m.default)));
127
- program.command("plugin:build").description("Build a plugin").action(lazy(() => Promise.resolve().then(function () { return require('./build-e9d00839.cjs.js'); }).then((m) => m.default)));
128
- 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-4d9dbf1e.cjs.js'); }).then((m) => m.default)));
129
- 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-23290f53.cjs.js'); }).then((m) => m.default)));
130
- program.command("build").description("Build a package for publishing").option("--outputs <formats>", "List of formats to output [types,cjs,esm]").action(lazy(() => Promise.resolve().then(function () { return require('./build-6303ed2c.cjs.js'); }).then((m) => m.default)));
131
- 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-30f44ea5.cjs.js'); }).then((m) => m.default)));
132
- 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-749220a2.cjs.js'); }).then((m) => m.default)));
133
- 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-16e1a114.cjs.js'); }).then((m) => m.default)));
134
- 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-81bff161.cjs.js'); }).then((m) => m.default)));
135
- 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(...configOption).description("Validate that the given configuration loads and matches schema").action(lazy(() => Promise.resolve().then(function () { return require('./validate-5a9fa99d.cjs.js'); }).then((m) => m.default)));
136
- 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-48dd9498.cjs.js'); }).then((m) => m.default)));
137
- program.command("versions:bump").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-f1bd882f.cjs.js'); }).then((m) => m.default)));
138
- 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-a76f6ca5.cjs.js'); }).then((m) => m.default)));
139
- program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-cd0b0812.cjs.js'); }).then((m) => m.pre)));
140
- program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-cd0b0812.cjs.js'); }).then((m) => m.post)));
141
- program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-d37f05f1.cjs.js'); }).then((m) => m.default)));
142
- 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-54f31886.cjs.js'); }).then((m) => m.default)));
143
- program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-06502eb1.cjs.js'); }).then((m) => m.default)));
144
- program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-60e7921f.cjs.js'); }).then((m) => m.default)));
234
+ program.command("app:build").description("Build an app for a production release").option("--stats", "Write bundle stats to output directory").option("--lax", "Do not require environment variables to be set").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./build-1cbb9e7d.cjs.js'); }).then((m) => m.default)));
235
+ 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-708fbf98.cjs.js'); }).then((m) => m.default)));
236
+ program.command("backend:build").description("Build a backend plugin").action(lazy(() => Promise.resolve().then(function () { return require('./build-b25b29ed.cjs.js'); }).then((m) => m.default)));
237
+ 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-cc6870fb.cjs.js'); }).then((m) => m.default)));
238
+ program.command("backend:build-image").allowUnknownOption(true).helpOption(", --backstage-cli-help").option("--build", "Build packages before packing them into the image").description("Bundles the package into a docker image. This command is deprecated and will be removed.").action(lazy(() => Promise.resolve().then(function () { return require('./buildImage-6b35526c.cjs.js'); }).then((m) => m.default)));
239
+ 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-efe399b8.cjs.js'); }).then((m) => m.default)));
240
+ 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-2c2b30fc.cjs.js'); }).then((m) => m.default)));
241
+ program.command("remove-plugin").description("Removes plugin in the current repository").action(lazy(() => Promise.resolve().then(function () { return require('./removePlugin-f82ac16a.cjs.js'); }).then((m) => m.default)));
242
+ program.command("plugin:build").description("Build a plugin").action(lazy(() => Promise.resolve().then(function () { return require('./build-70dd213a.cjs.js'); }).then((m) => m.default)));
243
+ 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-f4bb3cb0.cjs.js'); }).then((m) => m.default)));
244
+ 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-e3661054.cjs.js'); }).then((m) => m.default)));
245
+ program.command("build").description("Build a package for publishing").option("--outputs <formats>", "List of formats to output [types,cjs,esm]").action(lazy(() => Promise.resolve().then(function () { return require('./build-bae5a019.cjs.js'); }).then((m) => m.default)));
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-306bb8fe.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-e32fbd45.cjs.js'); }).then((m) => m.default)));
248
+ 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-ceb404a3.cjs.js'); }).then((m) => m.default)));
249
+ 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-806676fe.cjs.js'); }).then((m) => m.default)));
250
+ 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(...configOption).description("Validate that the given configuration loads and matches schema").action(lazy(() => Promise.resolve().then(function () { return require('./validate-9523a11e.cjs.js'); }).then((m) => m.default)));
251
+ 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-398d8593.cjs.js'); }).then((m) => m.default)));
252
+ program.command("versions:bump").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-bce7f9c2.cjs.js'); }).then((m) => m.default)));
253
+ 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-6175d471.cjs.js'); }).then((m) => m.default)));
254
+ program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-32228ad6.cjs.js'); }).then((m) => m.pre)));
255
+ program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-32228ad6.cjs.js'); }).then((m) => m.post)));
256
+ program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-7a981ea7.cjs.js'); }).then((m) => m.default)));
257
+ 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-424d4929.cjs.js'); }).then((m) => m.default)));
258
+ program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-fbff7b78.cjs.js'); }).then((m) => m.default)));
259
+ program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-5e7c2679.cjs.js'); }).then((m) => m.default)));
260
+ 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-5920b5df.cjs.js'); }).then((m) => m.default)));
145
261
  }
146
262
  function lazy(getActionFunc) {
147
263
  return async (...args) => {
@@ -150,6 +266,7 @@ function lazy(getActionFunc) {
150
266
  await actionFunc(...args);
151
267
  process.exit(0);
152
268
  } catch (error) {
269
+ errors.assertError(error);
153
270
  exitWithError(error);
154
271
  }
155
272
  };
@@ -179,8 +296,9 @@ main(process.argv);
179
296
  exports.ExitCodeError = ExitCodeError;
180
297
  exports.NotFoundError = NotFoundError;
181
298
  exports.createPackageVersionProvider = createPackageVersionProvider;
182
- exports.packageVersions = packageVersions;
299
+ exports.dependencies = dependencies;
300
+ exports.devDependencies = devDependencies;
183
301
  exports.paths = paths;
184
302
  exports.version = version;
185
303
  exports.version$1 = version$7;
186
- //# sourceMappingURL=index-74ba6239.cjs.js.map
304
+ //# sourceMappingURL=index-6fee1c9a.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-74ba6239.cjs.js');
6
+ var index$1 = require('./index-6fee1c9a.cjs.js');
7
7
  var crypto = require('crypto');
8
8
  var openBrowser = require('react-dev-utils/openBrowser');
9
9
  var request = require('@octokit/request');
@@ -12,6 +12,7 @@ require('commander');
12
12
  require('semver');
13
13
  require('@backstage/cli-common');
14
14
  require('@backstage/config/package.json');
15
+ require('@backstage/errors');
15
16
 
16
17
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
17
18
 
@@ -127,4 +128,4 @@ ${yaml.stringify(config)}`;
127
128
  };
128
129
 
129
130
  exports.default = index;
130
- //# sourceMappingURL=index-06502eb1.cjs.js.map
131
+ //# sourceMappingURL=index-fbff7b78.cjs.js.map
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-74ba6239.cjs.js');
3
+ var index = require('./index-6fee1c9a.cjs.js');
4
4
  var os = require('os');
5
- var run = require('./run-7e2d4777.cjs.js');
5
+ var run = require('./run-59c4395e.cjs.js');
6
6
  var Lockfile = require('./Lockfile-80f0eec4.cjs.js');
7
7
  require('chalk');
8
8
  require('commander');
@@ -10,6 +10,7 @@ require('fs-extra');
10
10
  require('semver');
11
11
  require('@backstage/cli-common');
12
12
  require('@backstage/config/package.json');
13
+ require('@backstage/errors');
13
14
  require('child_process');
14
15
  require('util');
15
16
  require('@yarnpkg/lockfile');
@@ -40,4 +41,4 @@ var info = async () => {
40
41
  };
41
42
 
42
43
  exports.default = info;
43
- //# sourceMappingURL=info-60e7921f.cjs.js.map
44
+ //# sourceMappingURL=info-5e7c2679.cjs.js.map