@backstage/cli 0.36.0-next.1 → 0.36.0-next.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 (80) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/index.cjs.js +1 -0
  3. package/dist/modules/auth/commands/list.cjs.js +23 -0
  4. package/dist/modules/auth/commands/login.cjs.js +316 -0
  5. package/dist/modules/auth/commands/logout.cjs.js +55 -0
  6. package/dist/modules/auth/commands/printToken.cjs.js +41 -0
  7. package/dist/modules/auth/commands/select.cjs.js +32 -0
  8. package/dist/modules/auth/commands/show.cjs.js +59 -0
  9. package/dist/modules/auth/index.cjs.js +44 -0
  10. package/dist/modules/auth/lib/auth.cjs.js +60 -0
  11. package/dist/modules/auth/lib/http.cjs.js +26 -0
  12. package/dist/modules/auth/lib/localServer.cjs.js +80 -0
  13. package/dist/modules/auth/lib/pkce.cjs.js +23 -0
  14. package/dist/modules/auth/lib/prompt.cjs.js +44 -0
  15. package/dist/modules/auth/lib/secretStore.cjs.js +81 -0
  16. package/dist/modules/auth/lib/storage.cjs.js +152 -0
  17. package/dist/modules/build/commands/buildWorkspace.cjs.js +31 -2
  18. package/dist/modules/build/commands/package/build/command.cjs.js +62 -15
  19. package/dist/modules/build/commands/package/build/index.cjs.js +3 -1
  20. package/dist/modules/build/commands/package/clean.cjs.js +1 -1
  21. package/dist/modules/build/commands/package/postpack.cjs.js +1 -1
  22. package/dist/modules/build/commands/package/prepack.cjs.js +1 -1
  23. package/dist/modules/build/commands/package/start/command.cjs.js +68 -11
  24. package/dist/modules/build/commands/package/start/index.cjs.js +3 -1
  25. package/dist/modules/build/commands/repo/build.cjs.js +45 -10
  26. package/dist/modules/build/commands/repo/clean.cjs.js +1 -1
  27. package/dist/modules/build/commands/repo/start.cjs.js +54 -5
  28. package/dist/modules/build/index.cjs.js +5 -129
  29. package/dist/modules/build/lib/optionsParser.cjs.js +9 -24
  30. package/dist/modules/build/lib/role.cjs.js +1 -1
  31. package/dist/modules/config/commands/docs.cjs.js +1 -0
  32. package/dist/modules/config/commands/print.cjs.js +3 -2
  33. package/dist/modules/config/commands/schema.cjs.js +3 -2
  34. package/dist/modules/config/commands/validate.cjs.js +1 -0
  35. package/dist/modules/create-github-app/commands/create-github-app/index.cjs.js +14 -3
  36. package/dist/modules/create-github-app/index.cjs.js +1 -9
  37. package/dist/modules/info/commands/info.cjs.js +1 -0
  38. package/dist/modules/lint/commands/package/lint.cjs.js +42 -10
  39. package/dist/modules/lint/commands/repo/lint.cjs.js +95 -25
  40. package/dist/modules/lint/index.cjs.js +2 -60
  41. package/dist/modules/lint/lib/optionsParser.cjs.js +9 -24
  42. package/dist/modules/maintenance/commands/repo/fix.cjs.js +31 -5
  43. package/dist/modules/maintenance/commands/repo/list-deprecations.cjs.js +20 -4
  44. package/dist/modules/maintenance/index.cjs.js +2 -20
  45. package/dist/modules/migrate/commands/packageExports.cjs.js +1 -1
  46. package/dist/modules/migrate/commands/packageLintConfigs.cjs.js +1 -1
  47. package/dist/modules/migrate/commands/packageRole.cjs.js +1 -1
  48. package/dist/modules/migrate/commands/packageScripts.cjs.js +1 -1
  49. package/dist/modules/migrate/commands/reactRouterDeps.cjs.js +1 -1
  50. package/dist/modules/migrate/commands/versions/bump.cjs.js +41 -11
  51. package/dist/modules/migrate/commands/versions/migrate.cjs.js +24 -3
  52. package/dist/modules/migrate/index.cjs.js +2 -25
  53. package/dist/modules/new/commands/new.cjs.js +70 -15
  54. package/dist/modules/new/index.cjs.js +1 -29
  55. package/dist/modules/new/lib/preparation/loadPortableTemplate.cjs.js +2 -2
  56. package/dist/modules/new/lib/preparation/loadPortableTemplateConfig.cjs.js +2 -2
  57. package/dist/modules/test/commands/package/test.cjs.js +1 -7
  58. package/dist/modules/test/commands/repo/test.cjs.js +45 -34
  59. package/dist/modules/test/index.cjs.js +2 -32
  60. package/dist/modules/translations/commands/export.cjs.js +1 -0
  61. package/dist/modules/translations/commands/import.cjs.js +1 -0
  62. package/dist/packages/backend-defaults/package.json.cjs.js +1 -1
  63. package/dist/packages/backend-plugin-api/package.json.cjs.js +1 -1
  64. package/dist/packages/backend-test-utils/package.json.cjs.js +1 -1
  65. package/dist/packages/catalog-client/package.json.cjs.js +1 -1
  66. package/dist/packages/cli/package.json.cjs.js +7 -4
  67. package/dist/packages/core-app-api/package.json.cjs.js +1 -1
  68. package/dist/packages/core-components/package.json.cjs.js +1 -1
  69. package/dist/packages/core-plugin-api/package.json.cjs.js +1 -1
  70. package/dist/packages/frontend-defaults/package.json.cjs.js +1 -1
  71. package/dist/packages/frontend-plugin-api/package.json.cjs.js +1 -1
  72. package/dist/packages/frontend-test-utils/package.json.cjs.js +1 -1
  73. package/dist/plugins/auth-backend/package.json.cjs.js +1 -1
  74. package/dist/plugins/auth-backend-module-guest-provider/package.json.cjs.js +1 -1
  75. package/dist/plugins/catalog-node/package.json.cjs.js +1 -1
  76. package/dist/plugins/scaffolder-node/package.json.cjs.js +1 -1
  77. package/dist/plugins/scaffolder-node-test-utils/package.json.cjs.js +1 -1
  78. package/dist/wiring/CliInitializer.cjs.js +12 -2
  79. package/package.json +23 -17
  80. package/dist/wiring/lazy.cjs.js +0 -22
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.36.0-next.1";
3
+ var version = "0.36.0-next.2";
4
4
  var dependencies = {
5
5
  "@backstage/catalog-model": "workspace:^",
6
6
  "@backstage/cli-common": "workspace:^",
@@ -36,7 +36,7 @@ var dependencies = {
36
36
  buffer: "^6.0.3",
37
37
  chalk: "^4.0.0",
38
38
  chokidar: "^3.3.1",
39
- cleye: "^2.2.1",
39
+ cleye: "^2.3.0",
40
40
  commander: "^14.0.3",
41
41
  "cross-fetch": "^4.0.0",
42
42
  "cross-spawn": "^7.0.3",
@@ -75,9 +75,10 @@ var dependencies = {
75
75
  postcss: "^8.1.0",
76
76
  "postcss-import": "^16.1.0",
77
77
  process: "^0.11.10",
78
+ "proper-lockfile": "^4.1.2",
78
79
  "raw-loader": "^4.0.2",
79
80
  "react-dev-utils": "^12.0.0-next.60",
80
- "react-refresh": "^0.17.0",
81
+ "react-refresh": "^0.18.0",
81
82
  "recursive-readdir": "^2.2.2",
82
83
  "replace-in-file": "^7.1.0",
83
84
  rollup: "^4.27.3",
@@ -86,6 +87,7 @@ var dependencies = {
86
87
  "rollup-plugin-postcss": "^4.0.0",
87
88
  "rollup-pluginutils": "^2.8.2",
88
89
  semver: "^7.5.3",
90
+ "shell-quote": "^1.8.1",
89
91
  "style-loader": "^3.3.1",
90
92
  sucrase: "^3.20.2",
91
93
  "swc-loader": "^0.2.3",
@@ -129,11 +131,12 @@ var devDependencies = {
129
131
  "@types/jest": "^30.0.0",
130
132
  "@types/node": "^22.13.14",
131
133
  "@types/npm-packlist": "^3.0.0",
134
+ "@types/proper-lockfile": "^4",
132
135
  "@types/recursive-readdir": "^2.2.0",
133
136
  "@types/rollup-plugin-peer-deps-external": "^2.2.0",
134
137
  "@types/rollup-plugin-postcss": "^3.1.4",
138
+ "@types/shell-quote": "^1.7.5",
135
139
  "@types/svgo": "^2.6.2",
136
- "@types/tar": "^6.1.1",
137
140
  "@types/terser-webpack-plugin": "^5.0.4",
138
141
  "@types/webpack-sources": "^3.2.3",
139
142
  del: "^8.0.0",
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.19.6-next.0";
3
+ var version = "1.19.6-next.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 = "0.18.8-next.0";
3
+ var version = "0.18.8-next.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.12.4-next.0";
3
+ var version = "1.12.4-next.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 = "0.4.1-next.0";
3
+ var version = "0.5.0-next.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 = "0.14.2-next.0";
3
+ var version = "0.15.0-next.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 = "0.5.1-next.1";
3
+ var version = "0.5.1-next.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 = "0.27.1-next.1";
3
+ var version = "0.27.1-next.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 = "0.2.17-next.0";
3
+ var version = "0.2.17-next.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 = "2.1.0-next.1";
3
+ var version = "2.1.0-next.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 = "0.13.0-next.1";
3
+ var version = "0.13.0-next.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 = "0.3.9-next.1";
3
+ var version = "0.3.9-next.2";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -14,6 +14,12 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
14
14
 
15
15
  var chalk__default = /*#__PURE__*/_interopDefaultCompat(chalk);
16
16
 
17
+ function isNodeHidden(node) {
18
+ if (node.$$type === "@tree/leaf") {
19
+ return !!node.command.deprecated || !!node.command.experimental;
20
+ }
21
+ return node.children.every((child) => isNodeHidden(child));
22
+ }
17
23
  class CliInitializer {
18
24
  graph = new CommandGraph.CommandGraph();
19
25
  commandRegistry = new CommandRegistry.CommandRegistry(this.graph);
@@ -56,7 +62,9 @@ class CliInitializer {
56
62
  while (queue.length) {
57
63
  const { node, argParser } = queue.shift();
58
64
  if (node.$$type === "@tree/root") {
59
- const treeParser = argParser.command(`${node.name} [command]`).description(node.name);
65
+ const treeParser = argParser.command(`${node.name} [command]`, {
66
+ hidden: isNodeHidden(node)
67
+ }).description(node.name);
60
68
  queue.push(
61
69
  ...node.children.map((child) => ({
62
70
  node: child,
@@ -64,7 +72,9 @@ class CliInitializer {
64
72
  }))
65
73
  );
66
74
  } else {
67
- argParser.command(node.name, { hidden: !!node.command.deprecated }).description(node.command.description).helpOption(false).allowUnknownOption(true).allowExcessArguments(true).action(async () => {
75
+ argParser.command(node.name, {
76
+ hidden: !!node.command.deprecated || !!node.command.experimental
77
+ }).description(node.command.description).helpOption(false).allowUnknownOption(true).allowExcessArguments(true).action(async () => {
68
78
  try {
69
79
  const args = program.parseOptions(process.argv);
70
80
  const nonProcessArgs = args.operands.slice(2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/cli",
3
- "version": "0.36.0-next.1",
3
+ "version": "0.36.0-next.2",
4
4
  "description": "CLI for developing Backstage plugins and apps",
5
5
  "backstage": {
6
6
  "role": "cli"
@@ -48,13 +48,13 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@backstage/catalog-model": "1.7.6",
51
- "@backstage/cli-common": "0.2.0-next.1",
51
+ "@backstage/cli-common": "0.2.0-next.2",
52
52
  "@backstage/cli-node": "0.2.19-next.1",
53
53
  "@backstage/config": "1.3.6",
54
54
  "@backstage/config-loader": "1.10.9-next.0",
55
55
  "@backstage/errors": "1.2.7",
56
56
  "@backstage/eslint-plugin": "0.2.2-next.0",
57
- "@backstage/integration": "2.0.0-next.1",
57
+ "@backstage/integration": "2.0.0-next.2",
58
58
  "@backstage/module-federation-common": "0.1.2-next.0",
59
59
  "@backstage/release-manifests": "0.0.13",
60
60
  "@backstage/types": "1.2.2",
@@ -81,7 +81,7 @@
81
81
  "buffer": "^6.0.3",
82
82
  "chalk": "^4.0.0",
83
83
  "chokidar": "^3.3.1",
84
- "cleye": "^2.2.1",
84
+ "cleye": "^2.3.0",
85
85
  "commander": "^14.0.3",
86
86
  "cross-fetch": "^4.0.0",
87
87
  "cross-spawn": "^7.0.3",
@@ -120,9 +120,10 @@
120
120
  "postcss": "^8.1.0",
121
121
  "postcss-import": "^16.1.0",
122
122
  "process": "^0.11.10",
123
+ "proper-lockfile": "^4.1.2",
123
124
  "raw-loader": "^4.0.2",
124
125
  "react-dev-utils": "^12.0.0-next.60",
125
- "react-refresh": "^0.17.0",
126
+ "react-refresh": "^0.18.0",
126
127
  "recursive-readdir": "^2.2.2",
127
128
  "replace-in-file": "^7.1.0",
128
129
  "rollup": "^4.27.3",
@@ -131,6 +132,7 @@
131
132
  "rollup-plugin-postcss": "^4.0.0",
132
133
  "rollup-pluginutils": "^2.8.2",
133
134
  "semver": "^7.5.3",
135
+ "shell-quote": "^1.8.1",
134
136
  "style-loader": "^3.3.1",
135
137
  "sucrase": "^3.20.2",
136
138
  "swc-loader": "^0.2.3",
@@ -147,20 +149,20 @@
147
149
  "zod-validation-error": "^4.0.2"
148
150
  },
149
151
  "devDependencies": {
150
- "@backstage/backend-plugin-api": "1.7.1-next.0",
151
- "@backstage/backend-test-utils": "1.11.1-next.1",
152
- "@backstage/catalog-client": "1.14.0-next.1",
152
+ "@backstage/backend-plugin-api": "1.8.0-next.1",
153
+ "@backstage/backend-test-utils": "1.11.1-next.2",
154
+ "@backstage/catalog-client": "1.14.0-next.2",
153
155
  "@backstage/config": "1.3.6",
154
- "@backstage/core-app-api": "1.19.6-next.0",
155
- "@backstage/core-components": "0.18.8-next.0",
156
- "@backstage/core-plugin-api": "1.12.4-next.0",
156
+ "@backstage/core-app-api": "1.19.6-next.1",
157
+ "@backstage/core-components": "0.18.8-next.1",
158
+ "@backstage/core-plugin-api": "1.12.4-next.1",
157
159
  "@backstage/dev-utils": "1.1.21-next.1",
158
160
  "@backstage/errors": "1.2.7",
159
- "@backstage/plugin-auth-backend": "0.27.1-next.1",
160
- "@backstage/plugin-auth-backend-module-guest-provider": "0.2.17-next.0",
161
- "@backstage/plugin-catalog-node": "2.1.0-next.1",
162
- "@backstage/plugin-scaffolder-node": "0.13.0-next.1",
163
- "@backstage/plugin-scaffolder-node-test-utils": "0.3.9-next.1",
161
+ "@backstage/plugin-auth-backend": "0.27.1-next.2",
162
+ "@backstage/plugin-auth-backend-module-guest-provider": "0.2.17-next.1",
163
+ "@backstage/plugin-catalog-node": "2.1.0-next.2",
164
+ "@backstage/plugin-scaffolder-node": "0.13.0-next.2",
165
+ "@backstage/plugin-scaffolder-node-test-utils": "0.3.9-next.2",
164
166
  "@backstage/test-utils": "1.7.16-next.0",
165
167
  "@backstage/theme": "0.7.2",
166
168
  "@jest/environment-jsdom-abstract": "^30.0.0",
@@ -174,11 +176,12 @@
174
176
  "@types/jest": "^30.0.0",
175
177
  "@types/node": "^22.13.14",
176
178
  "@types/npm-packlist": "^3.0.0",
179
+ "@types/proper-lockfile": "^4",
177
180
  "@types/recursive-readdir": "^2.2.0",
178
181
  "@types/rollup-plugin-peer-deps-external": "^2.2.0",
179
182
  "@types/rollup-plugin-postcss": "^3.1.4",
183
+ "@types/shell-quote": "^1.7.5",
180
184
  "@types/svgo": "^2.6.2",
181
- "@types/tar": "^6.1.1",
182
185
  "@types/terser-webpack-plugin": "^5.0.4",
183
186
  "@types/webpack-sources": "^3.2.3",
184
187
  "del": "^8.0.0",
@@ -194,6 +197,9 @@
194
197
  "webpack": "~5.105.0",
195
198
  "webpack-dev-server": "^5.0.0"
196
199
  },
200
+ "optionalDependencies": {
201
+ "keytar": "^7.9.0"
202
+ },
197
203
  "peerDependencies": {
198
204
  "@jest/environment-jsdom-abstract": "^30.0.0",
199
205
  "@module-federation/enhanced": "^0.21.6",
@@ -1,22 +0,0 @@
1
- 'use strict';
2
-
3
- var errors = require('@backstage/errors');
4
- var errors$1 = require('./errors.cjs.js');
5
-
6
- function lazy(moduleLoader, exportName) {
7
- return async (...args) => {
8
- try {
9
- const mod = await moduleLoader();
10
- const actualModule = mod.default;
11
- const actionFunc = actualModule[exportName];
12
- await actionFunc(...args);
13
- process.exit(0);
14
- } catch (error) {
15
- errors.assertError(error);
16
- errors$1.exitWithError(error);
17
- }
18
- };
19
- }
20
-
21
- exports.lazy = lazy;
22
- //# sourceMappingURL=lazy.cjs.js.map