@backstage/cli 0.32.1 → 0.33.0-next.1

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 (61) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/bin/backstage-cli-alpha +0 -0
  3. package/config/jest.js +5 -4
  4. package/dist/index.cjs.js +14 -29
  5. package/dist/lib/removed.cjs.js +1 -1
  6. package/dist/lib/run.cjs.js +7 -7
  7. package/dist/modules/{start → build}/commands/package/start/startFrontend.cjs.js +6 -6
  8. package/dist/modules/build/index.cjs.js +125 -27
  9. package/dist/modules/build/lib/bundler/config.cjs.js +2 -39
  10. package/dist/modules/config/commands/docs.cjs.js +18 -1
  11. package/dist/modules/config/index.cjs.js +101 -30
  12. package/dist/modules/create-github-app/index.cjs.js +21 -9
  13. package/dist/modules/info/index.cjs.js +23 -5
  14. package/dist/modules/lint/commands/repo/lint.cjs.js +13 -1
  15. package/dist/modules/lint/index.cjs.js +68 -29
  16. package/dist/modules/maintenance/index.cjs.js +80 -18
  17. package/dist/modules/migrate/index.cjs.js +96 -30
  18. package/dist/modules/new/index.cjs.js +57 -28
  19. package/dist/modules/test/index.cjs.js +46 -20
  20. package/dist/packages/backend-defaults/package.json.cjs.js +1 -1
  21. package/dist/packages/backend-plugin-api/package.json.cjs.js +1 -1
  22. package/dist/packages/backend-test-utils/package.json.cjs.js +1 -1
  23. package/dist/packages/catalog-client/package.json.cjs.js +1 -1
  24. package/dist/packages/cli/package.json.cjs.js +1 -1
  25. package/dist/packages/core-components/package.json.cjs.js +1 -1
  26. package/dist/packages/dev-utils/package.json.cjs.js +1 -1
  27. package/dist/packages/frontend-plugin-api/src/routing/describeParentCallSite.cjs.js +26 -0
  28. package/dist/packages/opaque-internal/src/OpaqueType.cjs.js +105 -0
  29. package/dist/plugins/auth-backend/package.json.cjs.js +1 -1
  30. package/dist/plugins/auth-backend-module-guest-provider/package.json.cjs.js +1 -1
  31. package/dist/plugins/catalog-node/package.json.cjs.js +1 -1
  32. package/dist/plugins/scaffolder-node/package.json.cjs.js +1 -1
  33. package/dist/plugins/scaffolder-node-test-utils/package.json.cjs.js +1 -1
  34. package/dist/wiring/CliInitializer.cjs.js +124 -0
  35. package/dist/wiring/CommandGraph.cjs.js +71 -0
  36. package/dist/wiring/CommandRegistry.cjs.js +14 -0
  37. package/dist/wiring/factory.cjs.js +15 -0
  38. package/dist/wiring/types.cjs.js +11 -0
  39. package/package.json +28 -29
  40. package/templates/backend-plugin/package.json.hbs +2 -1
  41. package/templates/backend-plugin-module/package.json.hbs +2 -1
  42. package/templates/frontend-plugin/package.json.hbs +2 -1
  43. package/templates/plugin-common-library/package.json.hbs +2 -1
  44. package/templates/plugin-node-library/package.json.hbs +2 -1
  45. package/templates/plugin-web-library/package.json.hbs +2 -1
  46. package/templates/scaffolder-backend-module/package.json.hbs +2 -1
  47. package/templates/scaffolder-backend-module/src/actions/example.ts +6 -12
  48. package/dist/commands/index.cjs.js +0 -55
  49. package/dist/modules/config/commands/print.cjs.js +0 -53
  50. package/dist/modules/config/commands/validate.cjs.js +0 -19
  51. package/dist/modules/info/commands/info.cjs.js +0 -55
  52. package/dist/modules/start/index.cjs.js +0 -38
  53. /package/dist/modules/{start → build}/commands/package/start/command.cjs.js +0 -0
  54. /package/dist/modules/{start → build}/commands/package/start/index.cjs.js +0 -0
  55. /package/dist/modules/{start → build}/commands/package/start/resolveLinkedWorkspace.cjs.js +0 -0
  56. /package/dist/modules/{start → build}/commands/package/start/startBackend.cjs.js +0 -0
  57. /package/dist/modules/{start → build}/commands/package/start/startPackage.cjs.js +0 -0
  58. /package/dist/modules/{start → build}/commands/repo/start.cjs.js +0 -0
  59. /package/dist/modules/{start → build}/lib/ipc/IpcServer.cjs.js +0 -0
  60. /package/dist/modules/{start → build}/lib/ipc/ServerDataStore.cjs.js +0 -0
  61. /package/dist/modules/{start → build}/lib/runner/runBackend.cjs.js +0 -0
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.5.0";
3
+ var version = "1.6.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 = "1.10.0";
3
+ var version = "1.10.1-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.32.1";
3
+ var version = "0.33.0-next.1";
4
4
  var dependencies = {
5
5
  "@backstage/catalog-model": "workspace:^",
6
6
  "@backstage/cli-common": "workspace:^",
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.17.2";
3
+ var version = "0.17.3-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.1.10";
3
+ var version = "1.1.11-next.2";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ const MESSAGE_MARKER = "eHgtF5hmbrXyiEvo";
4
+ function describeParentCallSite(ErrorConstructor = Error) {
5
+ const { stack } = new ErrorConstructor(MESSAGE_MARKER);
6
+ if (!stack) {
7
+ return "<unknown>";
8
+ }
9
+ const startIndex = stack.includes(MESSAGE_MARKER) ? stack.indexOf("\n") + 1 : 0;
10
+ const secondEntryStart = stack.indexOf("\n", stack.indexOf("\n", startIndex) + 1) + 1;
11
+ const secondEntryEnd = stack.indexOf("\n", secondEntryStart);
12
+ const line = stack.substring(secondEntryStart, secondEntryEnd).trim();
13
+ if (!line) {
14
+ return "unknown";
15
+ }
16
+ if (line.includes("(")) {
17
+ return line.substring(line.indexOf("(") + 1, line.indexOf(")"));
18
+ }
19
+ if (line.includes("@")) {
20
+ return line.substring(line.indexOf("@") + 1);
21
+ }
22
+ return line;
23
+ }
24
+
25
+ exports.describeParentCallSite = describeParentCallSite;
26
+ //# sourceMappingURL=describeParentCallSite.cjs.js.map
@@ -0,0 +1,105 @@
1
+ 'use strict';
2
+
3
+ class OpaqueType {
4
+ /**
5
+ * Creates a new opaque type.
6
+ *
7
+ * @param options.type The type identifier of the opaque type
8
+ * @param options.versions The available versions of the opaque type
9
+ * @returns A new opaque type helper
10
+ */
11
+ static create(options) {
12
+ return new OpaqueType(options.type, new Set(options.versions));
13
+ }
14
+ #type;
15
+ #versions;
16
+ constructor(type, versions) {
17
+ this.#type = type;
18
+ this.#versions = versions;
19
+ }
20
+ /**
21
+ * The internal version of the opaque type, used like this: `typeof MyOpaqueType.TPublic`
22
+ *
23
+ * @remarks
24
+ *
25
+ * This property is only useful for type checking, its runtime value is `undefined`.
26
+ */
27
+ TPublic = void 0;
28
+ /**
29
+ * The internal version of the opaque type, used like this: `typeof MyOpaqueType.TInternal`
30
+ *
31
+ * @remarks
32
+ *
33
+ * This property is only useful for type checking, its runtime value is `undefined`.
34
+ */
35
+ TInternal = void 0;
36
+ /**
37
+ * @param value Input value expected to be an instance of this opaque type
38
+ * @returns True if the value matches this opaque type
39
+ */
40
+ isType = (value) => {
41
+ return this.#isThisInternalType(value);
42
+ };
43
+ /**
44
+ * @param value Input value expected to be an instance of this opaque type
45
+ * @throws If the value is not an instance of this opaque type or is of an unsupported version
46
+ * @returns The internal version of the opaque type
47
+ */
48
+ toInternal = (value) => {
49
+ if (!this.#isThisInternalType(value)) {
50
+ throw new TypeError(
51
+ `Invalid opaque type, expected '${this.#type}', but got '${this.#stringifyUnknown(value)}'`
52
+ );
53
+ }
54
+ if (!this.#versions.has(value.version)) {
55
+ const versions = Array.from(this.#versions).map(this.#stringifyVersion);
56
+ if (versions.length > 1) {
57
+ versions[versions.length - 1] = `or ${versions[versions.length - 1]}`;
58
+ }
59
+ const expected = versions.length > 2 ? versions.join(", ") : versions.join(" ");
60
+ throw new TypeError(
61
+ `Invalid opaque type instance, got version ${this.#stringifyVersion(
62
+ value.version
63
+ )}, expected ${expected}`
64
+ );
65
+ }
66
+ return value;
67
+ };
68
+ /**
69
+ * Creates an instance of the opaque type, returning the public type.
70
+ *
71
+ * @param version The version of the instance to create
72
+ * @param value The remaining public and internal properties of the instance
73
+ * @returns An instance of the opaque type
74
+ */
75
+ createInstance(version, props) {
76
+ return Object.assign(props, {
77
+ $$type: this.#type,
78
+ ...version && { version }
79
+ });
80
+ }
81
+ #isThisInternalType(value) {
82
+ if (value === null || typeof value !== "object") {
83
+ return false;
84
+ }
85
+ return value.$$type === this.#type;
86
+ }
87
+ #stringifyUnknown(value) {
88
+ if (typeof value !== "object") {
89
+ return `<${typeof value}>`;
90
+ }
91
+ if (value === null) {
92
+ return "<null>";
93
+ }
94
+ if ("$$type" in value) {
95
+ return String(value.$$type);
96
+ }
97
+ return String(value);
98
+ }
99
+ #stringifyVersion = (version) => {
100
+ return version ? `'${version}'` : "undefined";
101
+ };
102
+ }
103
+
104
+ exports.OpaqueType = OpaqueType;
105
+ //# sourceMappingURL=OpaqueType.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.25.0";
3
+ var version = "0.25.1-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.2.8";
3
+ var version = "0.2.9-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.17.0";
3
+ var version = "1.17.1-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.8.2";
3
+ var version = "0.9.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.2.2";
3
+ var version = "0.3.0-next.2";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -0,0 +1,124 @@
1
+ 'use strict';
2
+
3
+ var CommandGraph = require('./CommandGraph.cjs.js');
4
+ var types$1 = require('./types.cjs.js');
5
+ var CommandRegistry = require('./CommandRegistry.cjs.js');
6
+ var commander = require('commander');
7
+ var version = require('../lib/version.cjs.js');
8
+ var chalk = require('chalk');
9
+ var errors$1 = require('../lib/errors.cjs.js');
10
+ var errors = require('@backstage/errors');
11
+ var types = require('util/types');
12
+
13
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
14
+
15
+ var chalk__default = /*#__PURE__*/_interopDefaultCompat(chalk);
16
+
17
+ class CliInitializer {
18
+ graph = new CommandGraph.CommandGraph();
19
+ commandRegistry = new CommandRegistry.CommandRegistry(this.graph);
20
+ #uninitiazedFeatures = [];
21
+ add(feature) {
22
+ if (types.isPromise(feature)) {
23
+ this.#uninitiazedFeatures.push(
24
+ feature.then((f) => unwrapFeature(f.default))
25
+ );
26
+ } else {
27
+ this.#uninitiazedFeatures.push(Promise.resolve(feature));
28
+ }
29
+ }
30
+ async #register(feature) {
31
+ if (types$1.OpaqueCliPlugin.isType(feature)) {
32
+ const internal = types$1.OpaqueCliPlugin.toInternal(feature);
33
+ await internal.init(this.commandRegistry);
34
+ } else {
35
+ throw new Error(`Unsupported feature type: ${feature.$$type}`);
36
+ }
37
+ }
38
+ async #doInit() {
39
+ const features = await Promise.all(this.#uninitiazedFeatures);
40
+ for (const feature of features) {
41
+ await this.#register(feature);
42
+ }
43
+ }
44
+ /**
45
+ * Actually parse argv and pass it to the command.
46
+ */
47
+ async run() {
48
+ await this.#doInit();
49
+ const programName = "backstage-cli";
50
+ const program = new commander.Command();
51
+ program.name(programName).version(version.version).allowUnknownOption(true).allowExcessArguments(true);
52
+ const queue = this.graph.atDepth(0).map((node) => ({
53
+ node,
54
+ argParser: program
55
+ }));
56
+ while (queue.length) {
57
+ const { node, argParser } = queue.shift();
58
+ if (node.$$type === "@tree/root") {
59
+ const treeParser = argParser.command(`${node.name} [command]`).description(node.name);
60
+ queue.push(
61
+ ...node.children.map((child) => ({
62
+ node: child,
63
+ argParser: treeParser
64
+ }))
65
+ );
66
+ } else {
67
+ argParser.command(node.name, { hidden: !!node.command.deprecated }).description(node.command.description).helpOption(false).allowUnknownOption(true).allowExcessArguments(true).action(async () => {
68
+ try {
69
+ const args = program.parseOptions(process.argv);
70
+ const nonProcessArgs = args.operands.slice(2);
71
+ const positionalArgs = [];
72
+ let index = 0;
73
+ for (let argIndex = 0; argIndex < nonProcessArgs.length; argIndex++) {
74
+ if (argIndex === index && node.command.path[argIndex] === nonProcessArgs[argIndex]) {
75
+ index += 1;
76
+ continue;
77
+ }
78
+ positionalArgs.push(nonProcessArgs[argIndex]);
79
+ }
80
+ await node.command.execute({
81
+ args: [...positionalArgs, ...args.unknown],
82
+ info: {
83
+ usage: [programName, ...node.command.path].join(" "),
84
+ description: node.command.description
85
+ }
86
+ });
87
+ process.exit(0);
88
+ } catch (error) {
89
+ errors.assertError(error);
90
+ errors$1.exitWithError(error);
91
+ }
92
+ });
93
+ }
94
+ }
95
+ program.on("command:*", () => {
96
+ console.log();
97
+ console.log(chalk__default.default.red(`Invalid command: ${program.args.join(" ")}`));
98
+ console.log();
99
+ program.outputHelp();
100
+ process.exit(1);
101
+ });
102
+ process.on("unhandledRejection", (rejection) => {
103
+ if (rejection instanceof Error) {
104
+ errors$1.exitWithError(rejection);
105
+ } else {
106
+ errors$1.exitWithError(new Error(`Unknown rejection: '${rejection}'`));
107
+ }
108
+ });
109
+ program.parse(process.argv);
110
+ }
111
+ }
112
+ function unwrapFeature(feature) {
113
+ if ("$$type" in feature) {
114
+ return feature;
115
+ }
116
+ if ("default" in feature) {
117
+ return feature.default;
118
+ }
119
+ return feature;
120
+ }
121
+
122
+ exports.CliInitializer = CliInitializer;
123
+ exports.unwrapFeature = unwrapFeature;
124
+ //# sourceMappingURL=CliInitializer.cjs.js.map
@@ -0,0 +1,71 @@
1
+ 'use strict';
2
+
3
+ class CommandGraph {
4
+ graph = [];
5
+ /**
6
+ * Adds a command to the graph. The graph is sparse, so we use the path to determine the nodes
7
+ * to traverse. Only leaf nodes should have a command/action.
8
+ */
9
+ add(command) {
10
+ const path = command.path;
11
+ let current = this.graph;
12
+ for (let i = 0; i < path.length - 1; i++) {
13
+ const name = path[i];
14
+ let next = current.find((n) => n.name === name);
15
+ if (!next) {
16
+ next = { $$type: "@tree/root", name, children: [] };
17
+ current.push(next);
18
+ } else if (next.$$type === "@tree/leaf") {
19
+ throw new Error(
20
+ `Command already exists at path: "${path.slice(0, i).join(" ")}"`
21
+ );
22
+ }
23
+ current = next.children;
24
+ }
25
+ const last = current.find((n) => n.name === path[path.length - 1]);
26
+ if (last && last.$$type === "@tree/leaf") {
27
+ throw new Error(
28
+ `Command already exists at path: "${path.slice(0, -1).join(" ")}"`
29
+ );
30
+ } else {
31
+ current.push({
32
+ $$type: "@tree/leaf",
33
+ name: path[path.length - 1],
34
+ command
35
+ });
36
+ }
37
+ }
38
+ /**
39
+ * Given a path, try to find a command that matches it.
40
+ */
41
+ find(path) {
42
+ let current = this.graph;
43
+ for (let i = 0; i < path.length - 1; i++) {
44
+ const name = path[i];
45
+ const next = current.find((n) => n.name === name);
46
+ if (!next) {
47
+ return void 0;
48
+ } else if (next.$$type === "@tree/leaf") {
49
+ return void 0;
50
+ }
51
+ current = next.children;
52
+ }
53
+ const last = current.find((n) => n.name === path[path.length - 1]);
54
+ if (!last || last.$$type === "@tree/root") {
55
+ return void 0;
56
+ }
57
+ return last?.command;
58
+ }
59
+ atDepth(depth) {
60
+ let current = this.graph;
61
+ for (let i = 0; i < depth; i++) {
62
+ current = current.flatMap(
63
+ (n) => n.$$type === "@tree/root" ? n.children : []
64
+ );
65
+ }
66
+ return current;
67
+ }
68
+ }
69
+
70
+ exports.CommandGraph = CommandGraph;
71
+ //# sourceMappingURL=CommandGraph.cjs.js.map
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ class CommandRegistry {
4
+ graph;
5
+ constructor(graph) {
6
+ this.graph = graph;
7
+ }
8
+ addCommand(command) {
9
+ this.graph.add(command);
10
+ }
11
+ }
12
+
13
+ exports.CommandRegistry = CommandRegistry;
14
+ //# sourceMappingURL=CommandRegistry.cjs.js.map
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ var describeParentCallSite = require('../packages/frontend-plugin-api/src/routing/describeParentCallSite.cjs.js');
4
+ var types = require('./types.cjs.js');
5
+
6
+ function createCliPlugin(options) {
7
+ return types.OpaqueCliPlugin.createInstance("v1", {
8
+ pluginId: options.pluginId,
9
+ init: options.init,
10
+ description: `created at '${describeParentCallSite.describeParentCallSite()}'`
11
+ });
12
+ }
13
+
14
+ exports.createCliPlugin = createCliPlugin;
15
+ //# sourceMappingURL=factory.cjs.js.map
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var OpaqueType = require('../packages/opaque-internal/src/OpaqueType.cjs.js');
4
+
5
+ const OpaqueCliPlugin = OpaqueType.OpaqueType.create({
6
+ type: "@backstage/CliPlugin",
7
+ versions: ["v1"]
8
+ });
9
+
10
+ exports.OpaqueCliPlugin = OpaqueCliPlugin;
11
+ //# sourceMappingURL=types.cjs.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/cli",
3
- "version": "0.32.1",
3
+ "version": "0.33.0-next.1",
4
4
  "description": "CLI for developing Backstage plugins and apps",
5
5
  "backstage": {
6
6
  "role": "cli"
@@ -20,8 +20,7 @@
20
20
  "license": "Apache-2.0",
21
21
  "main": "dist/index.cjs.js",
22
22
  "bin": {
23
- "backstage-cli": "bin/backstage-cli",
24
- "backstage-cli-alpha": "bin/backstage-cli-alpha"
23
+ "backstage-cli": "bin/backstage-cli"
25
24
  },
26
25
  "files": [
27
26
  "asset-types",
@@ -48,16 +47,16 @@
48
47
  ]
49
48
  },
50
49
  "dependencies": {
51
- "@backstage/catalog-model": "^1.7.4",
52
- "@backstage/cli-common": "^0.1.15",
53
- "@backstage/cli-node": "^0.2.13",
54
- "@backstage/config": "^1.3.2",
55
- "@backstage/config-loader": "^1.10.1",
56
- "@backstage/errors": "^1.2.7",
57
- "@backstage/eslint-plugin": "^0.1.10",
58
- "@backstage/integration": "^1.17.0",
59
- "@backstage/release-manifests": "^0.0.13",
60
- "@backstage/types": "^1.2.1",
50
+ "@backstage/catalog-model": "1.7.4",
51
+ "@backstage/cli-common": "0.1.15",
52
+ "@backstage/cli-node": "0.2.13",
53
+ "@backstage/config": "1.3.2",
54
+ "@backstage/config-loader": "1.10.1",
55
+ "@backstage/errors": "1.2.7",
56
+ "@backstage/eslint-plugin": "0.1.10",
57
+ "@backstage/integration": "1.17.0",
58
+ "@backstage/release-manifests": "0.0.13",
59
+ "@backstage/types": "1.2.1",
61
60
  "@manypkg/get-packages": "^1.1.3",
62
61
  "@module-federation/enhanced": "^0.9.0",
63
62
  "@octokit/graphql": "^5.0.0",
@@ -164,22 +163,22 @@
164
163
  "zod-validation-error": "^3.4.0"
165
164
  },
166
165
  "devDependencies": {
167
- "@backstage/backend-plugin-api": "^1.3.1",
168
- "@backstage/backend-test-utils": "^1.5.0",
169
- "@backstage/catalog-client": "^1.10.0",
170
- "@backstage/config": "^1.3.2",
171
- "@backstage/core-app-api": "^1.17.0",
172
- "@backstage/core-components": "^0.17.2",
173
- "@backstage/core-plugin-api": "^1.10.7",
174
- "@backstage/dev-utils": "^1.1.10",
175
- "@backstage/errors": "^1.2.7",
176
- "@backstage/plugin-auth-backend": "^0.25.0",
177
- "@backstage/plugin-auth-backend-module-guest-provider": "^0.2.8",
178
- "@backstage/plugin-catalog-node": "^1.17.0",
179
- "@backstage/plugin-scaffolder-node": "^0.8.2",
180
- "@backstage/plugin-scaffolder-node-test-utils": "^0.2.2",
181
- "@backstage/test-utils": "^1.7.8",
182
- "@backstage/theme": "^0.6.6",
166
+ "@backstage/backend-plugin-api": "1.4.0-next.1",
167
+ "@backstage/backend-test-utils": "1.6.0-next.2",
168
+ "@backstage/catalog-client": "1.10.1-next.0",
169
+ "@backstage/config": "1.3.2",
170
+ "@backstage/core-app-api": "1.17.0",
171
+ "@backstage/core-components": "0.17.3-next.0",
172
+ "@backstage/core-plugin-api": "1.10.7",
173
+ "@backstage/dev-utils": "1.1.11-next.2",
174
+ "@backstage/errors": "1.2.7",
175
+ "@backstage/plugin-auth-backend": "0.25.1-next.1",
176
+ "@backstage/plugin-auth-backend-module-guest-provider": "0.2.9-next.1",
177
+ "@backstage/plugin-catalog-node": "1.17.1-next.1",
178
+ "@backstage/plugin-scaffolder-node": "0.9.0-next.2",
179
+ "@backstage/plugin-scaffolder-node-test-utils": "0.3.0-next.2",
180
+ "@backstage/test-utils": "1.7.8",
181
+ "@backstage/theme": "0.6.6",
183
182
  "@rspack/core": "^1.3.9",
184
183
  "@rspack/dev-server": "^1.1.1",
185
184
  "@rspack/plugin-react-refresh": "^1.4.2",
@@ -8,7 +8,8 @@
8
8
  "types": "dist/index.d.ts"
9
9
  },
10
10
  "backstage": {
11
- "role": "backend-plugin"
11
+ "role": "backend-plugin",
12
+ "pluginId": "{{pluginId}}"
12
13
  },
13
14
  "scripts": {
14
15
  "start": "backstage-cli package start",
@@ -9,7 +9,8 @@
9
9
  "types": "dist/index.d.ts"
10
10
  },
11
11
  "backstage": {
12
- "role": "backend-plugin-module"
12
+ "role": "backend-plugin-module",
13
+ "pluginId": "{{pluginId}}"
13
14
  },
14
15
  "scripts": {
15
16
  "start": "backstage-cli package start",
@@ -8,7 +8,8 @@
8
8
  "types": "dist/index.d.ts"
9
9
  },
10
10
  "backstage": {
11
- "role": "frontend-plugin"
11
+ "role": "frontend-plugin",
12
+ "pluginId": "{{pluginId}}"
12
13
  },
13
14
  "sideEffects": false,
14
15
  "scripts": {
@@ -10,7 +10,8 @@
10
10
  "types": "dist/index.d.ts"
11
11
  },
12
12
  "backstage": {
13
- "role": "common-library"
13
+ "role": "common-library",
14
+ "pluginId": "{{pluginId}}"
14
15
  },
15
16
  "sideEffects": false,
16
17
  "scripts": {
@@ -9,7 +9,8 @@
9
9
  "types": "dist/index.d.ts"
10
10
  },
11
11
  "backstage": {
12
- "role": "node-library"
12
+ "role": "node-library",
13
+ "pluginId": "{{pluginId}}"
13
14
  },
14
15
  "scripts": {
15
16
  "build": "backstage-cli package build",
@@ -9,7 +9,8 @@
9
9
  "types": "dist/index.d.ts"
10
10
  },
11
11
  "backstage": {
12
- "role": "web-library"
12
+ "role": "web-library",
13
+ "pluginId": "{{pluginId}}"
13
14
  },
14
15
  "sideEffects": false,
15
16
  "scripts": {
@@ -9,7 +9,8 @@
9
9
  "types": "dist/index.d.ts"
10
10
  },
11
11
  "backstage": {
12
- "role": "backend-plugin-module"
12
+ "role": "backend-plugin-module",
13
+ "pluginId": "scaffolder"
13
14
  },
14
15
  "scripts": {
15
16
  "start": "backstage-cli package start",
@@ -12,22 +12,16 @@ import { createTemplateAction } from '@backstage/plugin-scaffolder-node';
12
12
  export function createExampleAction() {
13
13
  // For more information on how to define custom actions, see
14
14
  // https://backstage.io/docs/features/software-templates/writing-custom-actions
15
- return createTemplateAction<{
16
- myParameter: string;
17
- }>({
15
+ return createTemplateAction({
18
16
  id: 'acme:example',
19
17
  description: 'Runs an example action',
20
18
  schema: {
21
19
  input: {
22
- type: 'object',
23
- required: ['myParameter'],
24
- properties: {
25
- myParameter: {
26
- title: 'An example parameter',
27
- description: "This is an example parameter, don't set it to foo",
28
- type: 'string',
29
- },
30
- },
20
+ myParameter: z =>
21
+ z.string({
22
+ description:
23
+ "This is an example parameter, don't set it to foo",
24
+ }),
31
25
  },
32
26
  },
33
27
  async handler(ctx) {