@backstage/cli 0.0.0-nightly-20220724025214 → 0.0.0-nightly-20220727025454

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 (45) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/dist/cjs/{Lockfile-48dc675e.cjs.js → Lockfile-72b7072e.cjs.js} +25 -9
  3. package/dist/cjs/{PackageGraph-8493bd3a.cjs.js → PackageGraph-6e1d4bd4.cjs.js} +17 -9
  4. package/dist/cjs/{build-5a8721eb.cjs.js → build-3b11f7c9.cjs.js} +26 -15
  5. package/dist/cjs/{buildBackend-57d4caef.cjs.js → buildBackend-87996ad4.cjs.js} +61 -36
  6. package/dist/cjs/{buildWorkspace-5de1b0b7.cjs.js → buildWorkspace-425726da.cjs.js} +7 -7
  7. package/dist/cjs/{bump-3a48bfcd.cjs.js → bump-f3c6b3cd.cjs.js} +88 -33
  8. package/dist/cjs/{clean-cc6b16e0.cjs.js → clean-798512b5.cjs.js} +2 -2
  9. package/dist/cjs/{config-7846b979.cjs.js → config-4a59f918.cjs.js} +15 -11
  10. package/dist/cjs/{create-68d975e4.cjs.js → create-a7269bb5.cjs.js} +80 -32
  11. package/dist/cjs/{createDistWorkspace-eb755997.cjs.js → createDistWorkspace-cb9a9a84.cjs.js} +137 -65
  12. package/dist/cjs/{createPlugin-aa21421a.cjs.js → createPlugin-fca2c26e.cjs.js} +69 -30
  13. package/dist/cjs/{diff-a8fae7fc.cjs.js → diff-3dec490d.cjs.js} +68 -16
  14. package/dist/cjs/{docs-492c2ada.cjs.js → docs-e60d4fe7.cjs.js} +9 -5
  15. package/dist/cjs/{fix-c0dbaaa6.cjs.js → fix-b60a5395.cjs.js} +17 -7
  16. package/dist/cjs/{index-33baaa73.cjs.js → index-131467e2.cjs.js} +10 -10
  17. package/dist/cjs/{index-8f7ddece.cjs.js → index-50703ee1.cjs.js} +147 -46
  18. package/dist/cjs/{index-75b07df0.cjs.js → index-71d143d5.cjs.js} +57 -38
  19. package/dist/cjs/{index-8c180b21.cjs.js → index-7efbd23e.cjs.js} +39 -12
  20. package/dist/cjs/{info-12026684.cjs.js → info-04610119.cjs.js} +20 -6
  21. package/dist/cjs/{install-15d7418e.cjs.js → install-589f1c25.cjs.js} +44 -17
  22. package/dist/cjs/{lint-8c117129.cjs.js → lint-41010f96.cjs.js} +37 -11
  23. package/dist/cjs/{lint-7e355f5f.cjs.js → lint-6fcb9a70.cjs.js} +5 -3
  24. package/dist/cjs/{lint-d43c64c2.cjs.js → lint-7f6b0d33.cjs.js} +4 -4
  25. package/dist/cjs/{list-deprecations-fa400a5f.cjs.js → list-deprecations-8aee2123.cjs.js} +3 -3
  26. package/dist/cjs/{pack-45520c93.cjs.js → pack-91881c2f.cjs.js} +17 -11
  27. package/dist/cjs/packageLintConfigs-f9e5fcc6.cjs.js +83 -0
  28. package/dist/cjs/packageRole-16eb6c89.cjs.js +59 -0
  29. package/dist/cjs/{packageRoles-459b027c.cjs.js → packageRoles-96528891.cjs.js} +5 -3
  30. package/dist/cjs/packageScripts-eb2443c2.cjs.js +98 -0
  31. package/dist/cjs/{packages-b58a9650.cjs.js → packages-1b40c101.cjs.js} +17 -12
  32. package/dist/cjs/parallel-a8f6219c.cjs.js +187 -0
  33. package/dist/cjs/{paths-7d932860.cjs.js → paths-b34f135a.cjs.js} +100 -55
  34. package/dist/cjs/{print-db2f2c89.cjs.js → print-e99d7c2e.cjs.js} +4 -4
  35. package/dist/cjs/{run-b41544c4.cjs.js → run-722b1384.cjs.js} +2 -2
  36. package/dist/cjs/{schema-f9516e5d.cjs.js → schema-c636e913.cjs.js} +9 -5
  37. package/dist/cjs/{tasks-adcaca36.cjs.js → tasks-4776baa6.cjs.js} +29 -12
  38. package/dist/cjs/{test-d226acfd.cjs.js → test-76539f57.cjs.js} +3 -3
  39. package/dist/cjs/{validate-61c683b8.cjs.js → validate-f9273594.cjs.js} +4 -4
  40. package/dist/index.cjs.js +1 -1
  41. package/package.json +7 -7
  42. package/dist/cjs/packageLintConfigs-760acc65.cjs.js +0 -74
  43. package/dist/cjs/packageRole-7e9216d7.cjs.js +0 -53
  44. package/dist/cjs/packageScripts-db1393e2.cjs.js +0 -96
  45. package/dist/cjs/parallel-8286d3fa.cjs.js +0 -171
@@ -7,7 +7,7 @@ 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-8f7ddece.cjs.js');
10
+ var index = require('./index-50703ee1.cjs.js');
11
11
  require('commander');
12
12
  require('semver');
13
13
  require('@backstage/cli-common');
@@ -44,7 +44,13 @@ class PackageJsonHandler {
44
44
  }
45
45
  const pkg = JSON.parse(templateContents);
46
46
  const targetPkg = JSON.parse(targetContents);
47
- const handler = new PackageJsonHandler(write, prompt, pkg, targetPkg, variant);
47
+ const handler = new PackageJsonHandler(
48
+ write,
49
+ prompt,
50
+ pkg,
51
+ targetPkg,
52
+ variant
53
+ );
48
54
  await handler.handle();
49
55
  }
50
56
  static async appHandler(file, prompt) {
@@ -65,7 +71,9 @@ class PackageJsonHandler {
65
71
  await this.syncReactDeps();
66
72
  }
67
73
  async syncField(fieldName, obj = this.pkg, targetObj = this.targetPkg, prefix, sort, optional) {
68
- const fullFieldName = chalk__default["default"].cyan(prefix ? `${prefix}[${fieldName}]` : fieldName);
74
+ const fullFieldName = chalk__default["default"].cyan(
75
+ prefix ? `${prefix}[${fieldName}]` : fieldName
76
+ );
69
77
  const newValue = obj[fieldName];
70
78
  const coloredNewValue = chalk__default["default"].cyan(JSON.stringify(newValue));
71
79
  if (fieldName in targetObj) {
@@ -83,7 +91,9 @@ class PackageJsonHandler {
83
91
  await this.write();
84
92
  }
85
93
  } else if (fieldName in obj && optional !== true) {
86
- if (await this.prompt(`package.json is missing field ${fullFieldName}, set to ${coloredNewValue}?`)) {
94
+ if (await this.prompt(
95
+ `package.json is missing field ${fullFieldName}, set to ${coloredNewValue}?`
96
+ )) {
87
97
  targetObj[fieldName] = newValue;
88
98
  if (sort) {
89
99
  sortObjectKeys(targetObj);
@@ -97,7 +107,11 @@ class PackageJsonHandler {
97
107
  const hasSchemaFile = typeof configSchema === "string";
98
108
  if (!this.targetPkg.files) {
99
109
  const expected = hasSchemaFile ? ["dist", configSchema] : ["dist"];
100
- if (await this.prompt(`package.json is missing field "files", set to ${JSON.stringify(expected)}?`)) {
110
+ if (await this.prompt(
111
+ `package.json is missing field "files", set to ${JSON.stringify(
112
+ expected
113
+ )}?`
114
+ )) {
101
115
  this.targetPkg.files = expected;
102
116
  await this.write();
103
117
  }
@@ -110,7 +124,11 @@ class PackageJsonHandler {
110
124
  missing.push(configSchema);
111
125
  }
112
126
  if (missing.length) {
113
- if (await this.prompt(`package.json is missing ${JSON.stringify(missing)} in the "files" field, add?`)) {
127
+ if (await this.prompt(
128
+ `package.json is missing ${JSON.stringify(
129
+ missing
130
+ )} in the "files" field, add?`
131
+ )) {
114
132
  this.targetPkg.files.push(...missing);
115
133
  await this.write();
116
134
  }
@@ -123,7 +141,9 @@ class PackageJsonHandler {
123
141
  if (!pkgScripts) {
124
142
  return;
125
143
  }
126
- const hasNewScript = Object.values(targetScripts).some((script) => String(script).includes("backstage-cli package "));
144
+ const hasNewScript = Object.values(targetScripts).some(
145
+ (script) => String(script).includes("backstage-cli package ")
146
+ );
127
147
  if (hasNewScript) {
128
148
  return;
129
149
  }
@@ -146,7 +166,12 @@ class PackageJsonHandler {
146
166
  }
147
167
  for (const key of Object.keys(pkgPublishConf)) {
148
168
  if (!["access", "registry"].includes(key)) {
149
- await this.syncField(key, pkgPublishConf, targetPublishConf, "publishConfig");
169
+ await this.syncField(
170
+ key,
171
+ pkgPublishConf,
172
+ targetPublishConf,
173
+ "publishConfig"
174
+ );
150
175
  }
151
176
  }
152
177
  }
@@ -157,12 +182,25 @@ class PackageJsonHandler {
157
182
  return;
158
183
  }
159
184
  await this.syncField("@backstage/core", {}, targetDeps, fieldName, true);
160
- await this.syncField("@backstage/core-api", {}, targetDeps, fieldName, true);
185
+ await this.syncField(
186
+ "@backstage/core-api",
187
+ {},
188
+ targetDeps,
189
+ fieldName,
190
+ true
191
+ );
161
192
  for (const key of Object.keys(pkgDeps)) {
162
193
  if (this.variant === "app" && key.startsWith("plugin-")) {
163
194
  continue;
164
195
  }
165
- await this.syncField(key, pkgDeps, targetDeps, fieldName, true, !required);
196
+ await this.syncField(
197
+ key,
198
+ pkgDeps,
199
+ targetDeps,
200
+ fieldName,
201
+ true,
202
+ !required
203
+ );
166
204
  }
167
205
  }
168
206
  async syncReactDeps() {
@@ -197,7 +235,9 @@ async function exactMatchHandler({ path, write, missing, targetContents, templat
197
235
  process.stdout.write(` ${diff.value}`);
198
236
  }
199
237
  }
200
- if (await prompt(`Outdated ${coloredPath}, do you want to apply the above patch?`)) {
238
+ if (await prompt(
239
+ `Outdated ${coloredPath}, do you want to apply the above patch?`
240
+ )) {
201
241
  await write(templateContents);
202
242
  }
203
243
  }
@@ -224,7 +264,11 @@ const handlers = {
224
264
  async function handleAllFiles(fileHandlers, files, promptFunc) {
225
265
  for (const file of files) {
226
266
  const path$1 = file.path.split(path.sep).join(path.posix.sep);
227
- const fileHandler = fileHandlers.find((handler) => handler.patterns.some((pattern) => typeof pattern === "string" ? pattern === path$1 : pattern.test(path$1)));
267
+ const fileHandler = fileHandlers.find(
268
+ (handler) => handler.patterns.some(
269
+ (pattern) => typeof pattern === "string" ? pattern === path$1 : pattern.test(path$1)
270
+ )
271
+ );
228
272
  if (fileHandler) {
229
273
  await fileHandler.handler(file, promptFunc);
230
274
  } else {
@@ -250,7 +294,9 @@ const makeCheckPromptFunc = () => {
250
294
  };
251
295
  const finalize = () => {
252
296
  if (failed) {
253
- throw new Error("Check failed, the plugin is not in sync with the latest template");
297
+ throw new Error(
298
+ "Check failed, the plugin is not in sync with the latest template"
299
+ );
254
300
  }
255
301
  };
256
302
  return [promptFunc, finalize];
@@ -269,7 +315,10 @@ async function readTemplateFile(templateFile, templateVars) {
269
315
  return handlebars__default["default"].compile(contents)(templateVars, {
270
316
  helpers: {
271
317
  versionQuery(name, hint) {
272
- return packageVersionProvider(name, typeof hint === "string" ? hint : void 0);
318
+ return packageVersionProvider(
319
+ name,
320
+ typeof hint === "string" ? hint : void 0
321
+ );
273
322
  }
274
323
  }
275
324
  });
@@ -370,7 +419,10 @@ async function readPluginData() {
370
419
  } catch (error) {
371
420
  throw new Error(`Failed to read target package, ${error}`);
372
421
  }
373
- const pluginTsContents = await fs__default["default"].readFile(index.paths.resolveTarget("src/plugin.ts"), "utf8");
422
+ const pluginTsContents = await fs__default["default"].readFile(
423
+ index.paths.resolveTarget("src/plugin.ts"),
424
+ "utf8"
425
+ );
374
426
  const pluginIdMatch = pluginTsContents.match(/id: ['"`](.+?)['"`]/);
375
427
  if (!pluginIdMatch) {
376
428
  throw new Error(`Failed to parse plugin.ts, no plugin ID found`);
@@ -380,4 +432,4 @@ async function readPluginData() {
380
432
  }
381
433
 
382
434
  exports["default"] = diff;
383
- //# sourceMappingURL=diff-a8fae7fc.cjs.js.map
435
+ //# sourceMappingURL=diff-3dec490d.cjs.js.map
@@ -2,9 +2,9 @@
2
2
 
3
3
  var configLoader = require('@backstage/config-loader');
4
4
  var openBrowser = require('react-dev-utils/openBrowser');
5
- var config = require('./config-7846b979.cjs.js');
5
+ var config = require('./config-4a59f918.cjs.js');
6
6
  require('@backstage/config');
7
- require('./index-8f7ddece.cjs.js');
7
+ require('./index-50703ee1.cjs.js');
8
8
  require('commander');
9
9
  require('chalk');
10
10
  require('fs-extra');
@@ -12,7 +12,7 @@ require('semver');
12
12
  require('@backstage/cli-common');
13
13
  require('@backstage/errors');
14
14
  require('@manypkg/get-packages');
15
- require('./PackageGraph-8493bd3a.cjs.js');
15
+ require('./PackageGraph-6e1d4bd4.cjs.js');
16
16
  require('path');
17
17
  require('child_process');
18
18
  require('util');
@@ -28,9 +28,13 @@ var docs = async (opts) => {
28
28
  fromPackage: opts.package,
29
29
  mockEnv: true
30
30
  });
31
- const schema = configLoader.mergeConfigSchemas(appSchemas.serialize().schemas.map((_) => _.value));
31
+ const schema = configLoader.mergeConfigSchemas(
32
+ appSchemas.serialize().schemas.map(
33
+ (_) => _.value
34
+ )
35
+ );
32
36
  openBrowser__default["default"](`${DOCS_URL}#schema=${JSON.stringify(schema)}`);
33
37
  };
34
38
 
35
39
  exports["default"] = docs;
36
- //# sourceMappingURL=docs-492c2ada.cjs.js.map
40
+ //# sourceMappingURL=docs-e60d4fe7.cjs.js.map
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-8f7ddece.cjs.js');
3
+ var index = require('./index-50703ee1.cjs.js');
4
4
  var eslint = require('eslint');
5
5
  var path = require('path');
6
6
  var fs = require('fs-extra');
7
7
  var cliCommon = require('@backstage/cli-common');
8
- var PackageGraph = require('./PackageGraph-8493bd3a.cjs.js');
8
+ var PackageGraph = require('./PackageGraph-6e1d4bd4.cjs.js');
9
9
  require('commander');
10
10
  require('chalk');
11
11
  require('semver');
@@ -29,10 +29,14 @@ async function command() {
29
29
  const pkgJsonPath = index.paths.resolveTarget("package.json");
30
30
  const pkg = await fs__default["default"].readJson(pkgJsonPath);
31
31
  if (pkg.workspaces) {
32
- throw new Error("Adding dependencies to the workspace root is not supported");
32
+ throw new Error(
33
+ "Adding dependencies to the workspace root is not supported"
34
+ );
33
35
  }
34
36
  const packages = await PackageGraph.PackageGraph.listTargetPackages();
35
- const localPackageVersions = new Map(packages.map((p) => [p.packageJson.name, p.packageJson.version]));
37
+ const localPackageVersions = new Map(
38
+ packages.map((p) => [p.packageJson.name, p.packageJson.version])
39
+ );
36
40
  const eslint$1 = new eslint.ESLint({
37
41
  cwd: index.paths.targetDir,
38
42
  overrideConfig: {
@@ -103,14 +107,20 @@ async function command() {
103
107
  delete pkg.devDependencies;
104
108
  }
105
109
  if (pkg.dependencies) {
106
- pkg.dependencies = Object.fromEntries(Object.entries(pkg.dependencies).sort(([a], [b]) => a.localeCompare(b)));
110
+ pkg.dependencies = Object.fromEntries(
111
+ Object.entries(pkg.dependencies).sort(([a], [b]) => a.localeCompare(b))
112
+ );
107
113
  }
108
114
  if (pkg.devDependencies) {
109
- pkg.devDependencies = Object.fromEntries(Object.entries(pkg.devDependencies).sort(([a], [b]) => a.localeCompare(b)));
115
+ pkg.devDependencies = Object.fromEntries(
116
+ Object.entries(pkg.devDependencies).sort(
117
+ ([a], [b]) => a.localeCompare(b)
118
+ )
119
+ );
110
120
  }
111
121
  await fs__default["default"].writeJson(pkgJsonPath, pkg, { spaces: 2 });
112
122
  }
113
123
  }
114
124
 
115
125
  exports.command = command;
116
- //# sourceMappingURL=fix-c0dbaaa6.cjs.js.map
126
+ //# sourceMappingURL=fix-b60a5395.cjs.js.map
@@ -1,20 +1,20 @@
1
1
  'use strict';
2
2
 
3
- var createDistWorkspace = require('./createDistWorkspace-eb755997.cjs.js');
4
- var packageRoles = require('./packageRoles-459b027c.cjs.js');
5
- var index = require('./index-8f7ddece.cjs.js');
6
- var buildBackend = require('./buildBackend-57d4caef.cjs.js');
3
+ var createDistWorkspace = require('./createDistWorkspace-cb9a9a84.cjs.js');
4
+ var packageRoles = require('./packageRoles-96528891.cjs.js');
5
+ var index = require('./index-50703ee1.cjs.js');
6
+ var buildBackend = require('./buildBackend-87996ad4.cjs.js');
7
7
  require('chalk');
8
8
  require('fs-extra');
9
9
  require('path');
10
10
  require('os');
11
11
  require('tar');
12
12
  require('lodash/partition');
13
- require('./run-b41544c4.cjs.js');
13
+ require('./run-722b1384.cjs.js');
14
14
  require('child_process');
15
15
  require('util');
16
16
  require('@backstage/errors');
17
- require('./PackageGraph-8493bd3a.cjs.js');
17
+ require('./PackageGraph-6e1d4bd4.cjs.js');
18
18
  require('@manypkg/get-packages');
19
19
  require('rollup');
20
20
  require('@rollup/plugin-commonjs');
@@ -27,7 +27,7 @@ require('@rollup/plugin-json');
27
27
  require('@rollup/plugin-yaml');
28
28
  require('rollup-pluginutils');
29
29
  require('./svgrTemplate-550efce6.cjs.js');
30
- require('./parallel-8286d3fa.cjs.js');
30
+ require('./parallel-a8f6219c.cjs.js');
31
31
  require('worker_threads');
32
32
  require('npm-packlist');
33
33
  require('zod');
@@ -40,7 +40,7 @@ require('html-webpack-plugin');
40
40
  require('react-dev-utils/ModuleScopePlugin');
41
41
  require('run-script-webpack-plugin');
42
42
  require('webpack-node-externals');
43
- require('./paths-7d932860.cjs.js');
43
+ require('./paths-b34f135a.cjs.js');
44
44
  require('mini-css-extract-plugin');
45
45
  require('eslint-webpack-plugin');
46
46
  require('lodash/pickBy');
@@ -49,7 +49,7 @@ require('react-dev-utils/FileSizeReporter');
49
49
  require('react-dev-utils/formatWebpackMessages');
50
50
  require('webpack-dev-server');
51
51
  require('react-dev-utils/openBrowser');
52
- require('./config-7846b979.cjs.js');
52
+ require('./config-4a59f918.cjs.js');
53
53
  require('@backstage/config-loader');
54
54
  require('@backstage/config');
55
55
 
@@ -87,4 +87,4 @@ async function command(opts) {
87
87
  }
88
88
 
89
89
  exports.command = command;
90
- //# sourceMappingURL=index-33baaa73.cjs.js.map
90
+ //# sourceMappingURL=index-131467e2.cjs.js.map
@@ -20,7 +20,9 @@ class CustomError extends Error {
20
20
  }
21
21
  class ExitCodeError extends CustomError {
22
22
  constructor(code, command) {
23
- super(command ? `Command '${command}' exited with code ${code}` : `Child exited with code ${code}`);
23
+ super(
24
+ command ? `Command '${command}' exited with code ${code}` : `Child exited with code ${code}`
25
+ );
24
26
  this.code = code;
25
27
  }
26
28
  }
@@ -44,9 +46,9 @@ class NotFoundError extends CustomError {
44
46
 
45
47
  const paths = cliCommon.findPaths(__dirname);
46
48
 
47
- var version$a = "0.14.1";
49
+ var version$a = "0.15.0-next.0";
48
50
 
49
- var version$9 = "0.18.0";
51
+ var version$9 = "0.18.1-next.0";
50
52
  var dependencies = {
51
53
  "@backstage/cli-common": "^0.1.9",
52
54
  "@backstage/config": "^1.0.1",
@@ -143,13 +145,13 @@ var dependencies = {
143
145
  zod: "^3.11.6"
144
146
  };
145
147
  var devDependencies = {
146
- "@backstage/backend-common": "^0.14.1",
148
+ "@backstage/backend-common": "^0.15.0-next.0",
147
149
  "@backstage/config": "^1.0.1",
148
- "@backstage/core-app-api": "^1.0.4",
149
- "@backstage/core-components": "^0.10.0",
150
- "@backstage/core-plugin-api": "^1.0.4",
151
- "@backstage/dev-utils": "^1.0.4",
152
- "@backstage/test-utils": "^1.1.2",
150
+ "@backstage/core-app-api": "^1.0.5-next.0",
151
+ "@backstage/core-components": "^0.10.1-next.0",
152
+ "@backstage/core-plugin-api": "^1.0.5-next.0",
153
+ "@backstage/dev-utils": "^1.0.5-next.0",
154
+ "@backstage/test-utils": "^1.1.3-next.0",
153
155
  "@backstage/theme": "^0.2.16",
154
156
  "@types/diff": "^5.0.0",
155
157
  "@types/express": "^4.17.6",
@@ -176,19 +178,19 @@ var devDependencies = {
176
178
 
177
179
  var version$8 = "1.0.1";
178
180
 
179
- var version$7 = "1.0.4";
181
+ var version$7 = "1.0.5-next.0";
180
182
 
181
- var version$6 = "0.10.0";
183
+ var version$6 = "0.10.1-next.0";
182
184
 
183
- var version$5 = "1.0.4";
185
+ var version$5 = "1.0.5-next.0";
184
186
 
185
- var version$4 = "1.0.4";
187
+ var version$4 = "1.0.5-next.0";
186
188
 
187
- var version$3 = "1.1.2";
189
+ var version$3 = "1.1.3-next.0";
188
190
 
189
191
  var version$2 = "0.2.16";
190
192
 
191
- var version$1 = "1.4.0";
193
+ var version$1 = "1.5.0-next.0";
192
194
 
193
195
  const packageVersions = {
194
196
  "@backstage/backend-common": version$a,
@@ -220,7 +222,9 @@ function createPackageVersionProvider(lockfile) {
220
222
  if (name.startsWith("@types/") && (lockfileEntries == null ? void 0 : lockfileEntries.some((entry) => entry.range === "*"))) {
221
223
  return "*";
222
224
  }
223
- const validRanges = lockfileEntries == null ? void 0 : lockfileEntries.filter((entry) => semver__default["default"].satisfies(targetVersion, entry.range));
225
+ const validRanges = lockfileEntries == null ? void 0 : lockfileEntries.filter(
226
+ (entry) => semver__default["default"].satisfies(targetVersion, entry.range)
227
+ );
224
228
  const highestRange = validRanges == null ? void 0 : validRanges.slice(-1)[0];
225
229
  if (highestRange == null ? void 0 : highestRange.range) {
226
230
  return highestRange == null ? void 0 : highestRange.range;
@@ -243,46 +247,143 @@ const configOption = [
243
247
  ];
244
248
  function registerRepoCommand(program) {
245
249
  const command = program.command("repo [command]").description("Command that run across an entire Backstage project");
246
- command.command("build").description("Build packages in the project, excluding bundled app and backend packages.").option("--all", "Build all packages, including bundled app and backend packages.").option("--since <ref>", "Only build packages and their dev dependents that changed since the specified ref").action(lazy(() => Promise.resolve().then(function () { return require('./build-5a8721eb.cjs.js'); }).then((m) => m.command)));
247
- command.command("lint").description("Lint all packages in the project").option("--format <format>", "Lint report output format", "eslint-formatter-friendly").option("--since <ref>", "Only lint packages that changed since the specified ref").option("--fix", "Attempt to automatically fix violations").action(lazy(() => Promise.resolve().then(function () { return require('./lint-d43c64c2.cjs.js'); }).then((m) => m.command)));
248
- command.command("list-deprecations", { hidden: true }).description("List deprecations. [EXPERIMENTAL]").option("--json", "Output as JSON").action(lazy(() => Promise.resolve().then(function () { return require('./list-deprecations-fa400a5f.cjs.js'); }).then((m) => m.command)));
250
+ command.command("build").description(
251
+ "Build packages in the project, excluding bundled app and backend packages."
252
+ ).option(
253
+ "--all",
254
+ "Build all packages, including bundled app and backend packages."
255
+ ).option(
256
+ "--since <ref>",
257
+ "Only build packages and their dev dependents that changed since the specified ref"
258
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./build-3b11f7c9.cjs.js'); }).then((m) => m.command)));
259
+ command.command("lint").description("Lint all packages in the project").option(
260
+ "--format <format>",
261
+ "Lint report output format",
262
+ "eslint-formatter-friendly"
263
+ ).option(
264
+ "--since <ref>",
265
+ "Only lint packages that changed since the specified ref"
266
+ ).option("--fix", "Attempt to automatically fix violations").action(lazy(() => Promise.resolve().then(function () { return require('./lint-7f6b0d33.cjs.js'); }).then((m) => m.command)));
267
+ command.command("list-deprecations", { hidden: true }).description("List deprecations. [EXPERIMENTAL]").option("--json", "Output as JSON").action(
268
+ lazy(() => Promise.resolve().then(function () { return require('./list-deprecations-8aee2123.cjs.js'); }).then((m) => m.command))
269
+ );
249
270
  }
250
271
  function registerScriptCommand(program) {
251
272
  const command = program.command("package [command]").description("Lifecycle scripts for individual packages");
252
- command.command("start").description("Start a package for local development").option(...configOption).option("--role <name>", "Run the command with an explicit package role").option("--check", "Enable type checking and linting if available").option("--inspect", "Enable debugger in Node.js environments").option("--inspect-brk", "Enable debugger in Node.js environments, breaking before code starts").action(lazy(() => Promise.resolve().then(function () { return require('./index-75b07df0.cjs.js'); }).then((m) => m.command)));
253
- command.command("build").description("Build a package for production deployment or publishing").option("--role <name>", "Run the command with an explicit package role").option("--minify", "Minify the generated code. Does not apply to app or backend packages.").option("--experimental-type-build", "Enable experimental type build. Does not apply to app or backend packages.").option("--skip-build-dependencies", "Skip the automatic building of local dependencies. Applies to backend packages only.").option("--stats", "If bundle stats are available, write them to the output directory. Applies to app packages only.").option("--config <path>", "Config files to load instead of app-config.yaml. Applies to app packages only.", (opt, opts) => opts ? [...opts, opt] : [opt], Array()).action(lazy(() => Promise.resolve().then(function () { return require('./index-33baaa73.cjs.js'); }).then((m) => m.command)));
254
- command.command("lint [directories...]").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-7e355f5f.cjs.js'); }).then((m) => m.default)));
255
- 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-d226acfd.cjs.js'); }).then((m) => m.default)));
256
- command.command("fix", { hidden: true }).description("Applies automated fixes to the package. [EXPERIMENTAL]").option("--deps", "Only fix monorepo dependencies in package.json").action(lazy(() => Promise.resolve().then(function () { return require('./fix-c0dbaaa6.cjs.js'); }).then((m) => m.command)));
257
- command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-cc6b16e0.cjs.js'); }).then((m) => m.default)));
258
- command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-45520c93.cjs.js'); }).then((m) => m.pre)));
259
- command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-45520c93.cjs.js'); }).then((m) => m.post)));
273
+ command.command("start").description("Start a package for local development").option(...configOption).option("--role <name>", "Run the command with an explicit package role").option("--check", "Enable type checking and linting if available").option("--inspect", "Enable debugger in Node.js environments").option(
274
+ "--inspect-brk",
275
+ "Enable debugger in Node.js environments, breaking before code starts"
276
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./index-71d143d5.cjs.js'); }).then((m) => m.command)));
277
+ command.command("build").description("Build a package for production deployment or publishing").option("--role <name>", "Run the command with an explicit package role").option(
278
+ "--minify",
279
+ "Minify the generated code. Does not apply to app or backend packages."
280
+ ).option(
281
+ "--experimental-type-build",
282
+ "Enable experimental type build. Does not apply to app or backend packages."
283
+ ).option(
284
+ "--skip-build-dependencies",
285
+ "Skip the automatic building of local dependencies. Applies to backend packages only."
286
+ ).option(
287
+ "--stats",
288
+ "If bundle stats are available, write them to the output directory. Applies to app packages only."
289
+ ).option(
290
+ "--config <path>",
291
+ "Config files to load instead of app-config.yaml. Applies to app packages only.",
292
+ (opt, opts) => opts ? [...opts, opt] : [opt],
293
+ Array()
294
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./index-131467e2.cjs.js'); }).then((m) => m.command)));
295
+ command.command("lint [directories...]").option(
296
+ "--format <format>",
297
+ "Lint report output format",
298
+ "eslint-formatter-friendly"
299
+ ).option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-6fcb9a70.cjs.js'); }).then((m) => m.default)));
300
+ 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-76539f57.cjs.js'); }).then((m) => m.default)));
301
+ command.command("fix", { hidden: true }).description("Applies automated fixes to the package. [EXPERIMENTAL]").option("--deps", "Only fix monorepo dependencies in package.json").action(lazy(() => Promise.resolve().then(function () { return require('./fix-b60a5395.cjs.js'); }).then((m) => m.command)));
302
+ command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-798512b5.cjs.js'); }).then((m) => m.default)));
303
+ command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-91881c2f.cjs.js'); }).then((m) => m.pre)));
304
+ command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-91881c2f.cjs.js'); }).then((m) => m.post)));
260
305
  }
261
306
  function registerMigrateCommand(program) {
262
307
  const command = program.command("migrate [command]").description("Migration utilities");
263
- command.command("package-roles").description(`Add package role field to packages that don't have it`).action(lazy(() => Promise.resolve().then(function () { return require('./packageRole-7e9216d7.cjs.js'); }).then((m) => m.default)));
264
- command.command("package-scripts").description("Set package scripts according to each package role").action(lazy(() => Promise.resolve().then(function () { return require('./packageScripts-db1393e2.cjs.js'); }).then((m) => m.command)));
265
- command.command("package-lint-configs").description("Migrates all packages to use @backstage/cli/config/eslint-factory").action(lazy(() => Promise.resolve().then(function () { return require('./packageLintConfigs-760acc65.cjs.js'); }).then((m) => m.command)));
308
+ command.command("package-roles").description(`Add package role field to packages that don't have it`).action(lazy(() => Promise.resolve().then(function () { return require('./packageRole-16eb6c89.cjs.js'); }).then((m) => m.default)));
309
+ command.command("package-scripts").description("Set package scripts according to each package role").action(
310
+ lazy(() => Promise.resolve().then(function () { return require('./packageScripts-eb2443c2.cjs.js'); }).then((m) => m.command))
311
+ );
312
+ command.command("package-lint-configs").description(
313
+ "Migrates all packages to use @backstage/cli/config/eslint-factory"
314
+ ).action(
315
+ lazy(() => Promise.resolve().then(function () { return require('./packageLintConfigs-f9e5fcc6.cjs.js'); }).then((m) => m.command))
316
+ );
266
317
  }
267
318
  function registerCommands(program) {
268
- program.command("create").storeOptionsAsProperties(false).description("Open up an interactive guide to creating new things in your app").option("--select <name>", "Select the thing you want to be creating upfront").option("--option <name>=<value>", "Pre-fill options for the creation process", (opt, arr) => [...arr, opt], []).option("--scope <scope>", "The scope to use for new packages").option("--npm-registry <URL>", "The package registry to use for new packages").option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./create-68d975e4.cjs.js'); }).then((m) => m.default)));
269
- 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-aa21421a.cjs.js'); }).then((m) => m.default)));
270
- 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-a8fae7fc.cjs.js'); }).then((m) => m.default)));
271
- program.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description("Run tests, forwarding args to Jest, defaulting to watch mode [DEPRECATED]").action(lazy(() => Promise.resolve().then(function () { return require('./test-d226acfd.cjs.js'); }).then((m) => m.default)));
272
- 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-492c2ada.cjs.js'); }).then((m) => m.default)));
273
- 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-db2f2c89.cjs.js'); }).then((m) => m.default)));
274
- program.command("config:check").option("--package <name>", "Only load config schema that applies to the given package").option("--lax", "Do not require environment variables to be set").option("--frontend", "Only validate the frontend configuration").option("--deprecated", "Output deprecated configuration settings").option(...configOption).description("Validate that the given configuration loads and matches schema").action(lazy(() => Promise.resolve().then(function () { return require('./validate-61c683b8.cjs.js'); }).then((m) => m.default)));
275
- 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-f9516e5d.cjs.js'); }).then((m) => m.default)));
319
+ program.command("create").storeOptionsAsProperties(false).description(
320
+ "Open up an interactive guide to creating new things in your app"
321
+ ).option(
322
+ "--select <name>",
323
+ "Select the thing you want to be creating upfront"
324
+ ).option(
325
+ "--option <name>=<value>",
326
+ "Pre-fill options for the creation process",
327
+ (opt, arr) => [...arr, opt],
328
+ []
329
+ ).option("--scope <scope>", "The scope to use for new packages").option(
330
+ "--npm-registry <URL>",
331
+ "The package registry to use for new packages"
332
+ ).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./create-a7269bb5.cjs.js'); }).then((m) => m.default)));
333
+ program.command("create-plugin").option(
334
+ "--backend",
335
+ "Create plugin with the backend dependencies as default"
336
+ ).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(
337
+ lazy(() => Promise.resolve().then(function () { return require('./createPlugin-fca2c26e.cjs.js'); }).then((m) => m.default))
338
+ );
339
+ 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-3dec490d.cjs.js'); }).then((m) => m.default)));
340
+ program.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description(
341
+ "Run tests, forwarding args to Jest, defaulting to watch mode [DEPRECATED]"
342
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./test-76539f57.cjs.js'); }).then((m) => m.default)));
343
+ program.command("config:docs").option(
344
+ "--package <name>",
345
+ "Only include the schema that applies to the given package"
346
+ ).description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-e60d4fe7.cjs.js'); }).then((m) => m.default)));
347
+ program.command("config:print").option(
348
+ "--package <name>",
349
+ "Only load config schema that applies to the given package"
350
+ ).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(
351
+ "--format <format>",
352
+ "Format to print the configuration in, either json or yaml [yaml]"
353
+ ).option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-e99d7c2e.cjs.js'); }).then((m) => m.default)));
354
+ program.command("config:check").option(
355
+ "--package <name>",
356
+ "Only load config schema that applies to the given package"
357
+ ).option("--lax", "Do not require environment variables to be set").option("--frontend", "Only validate the frontend configuration").option("--deprecated", "Output deprecated configuration settings").option(...configOption).description(
358
+ "Validate that the given configuration loads and matches schema"
359
+ ).action(lazy(() => Promise.resolve().then(function () { return require('./validate-f9273594.cjs.js'); }).then((m) => m.default)));
360
+ program.command("config:schema").option(
361
+ "--package <name>",
362
+ "Only output config schema that applies to the given package"
363
+ ).option(
364
+ "--format <format>",
365
+ "Format to print the schema in, either json or yaml [yaml]"
366
+ ).description("Print configuration schema").action(lazy(() => Promise.resolve().then(function () { return require('./schema-c636e913.cjs.js'); }).then((m) => m.default)));
276
367
  registerRepoCommand(program);
277
368
  registerScriptCommand(program);
278
369
  registerMigrateCommand(program);
279
- program.command("versions:bump").option("--pattern <glob>", "Override glob for matching packages to upgrade").option("--release <version|next|main>", "Bump to a specific Backstage release line or version", "main").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-3a48bfcd.cjs.js'); }).then((m) => m.default)));
280
- 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-8c117129.cjs.js'); }).then((m) => m.default)));
281
- program.command("clean").description("Delete cache directories [DEPRECATED]").action(lazy(() => Promise.resolve().then(function () { return require('./clean-cc6b16e0.cjs.js'); }).then((m) => m.default)));
282
- 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-5de1b0b7.cjs.js'); }).then((m) => m.default)));
283
- program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-8c180b21.cjs.js'); }).then((m) => m.default)));
284
- program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-12026684.cjs.js'); }).then((m) => m.default)));
285
- 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-15d7418e.cjs.js'); }).then((m) => m.default)));
370
+ program.command("versions:bump").option(
371
+ "--pattern <glob>",
372
+ "Override glob for matching packages to upgrade"
373
+ ).option(
374
+ "--release <version|next|main>",
375
+ "Bump to a specific Backstage release line or version",
376
+ "main"
377
+ ).description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-f3c6b3cd.cjs.js'); }).then((m) => m.default)));
378
+ 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-41010f96.cjs.js'); }).then((m) => m.default)));
379
+ program.command("clean").description("Delete cache directories [DEPRECATED]").action(lazy(() => Promise.resolve().then(function () { return require('./clean-798512b5.cjs.js'); }).then((m) => m.default)));
380
+ 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-425726da.cjs.js'); }).then((m) => m.default)));
381
+ program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-7efbd23e.cjs.js'); }).then((m) => m.default)));
382
+ program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-04610119.cjs.js'); }).then((m) => m.default)));
383
+ program.command("install [plugin-id]", { hidden: true }).option(
384
+ "--from <packageJsonFilePath>",
385
+ "Install from a local package.json containing the installation recipe"
386
+ ).description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-589f1c25.cjs.js'); }).then((m) => m.default)));
286
387
  }
287
388
  function lazy(getActionFunc) {
288
389
  return async (...args) => {
@@ -326,4 +427,4 @@ exports.devDependencies = devDependencies;
326
427
  exports.paths = paths;
327
428
  exports.version = version;
328
429
  exports.version$1 = version$9;
329
- //# sourceMappingURL=index-8f7ddece.cjs.js.map
430
+ //# sourceMappingURL=index-50703ee1.cjs.js.map