@backstage/plugin-scaffolder-backend 1.19.0-next.0 → 1.19.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @backstage/plugin-scaffolder-backend
2
2
 
3
+ ## 1.19.0-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 2be3922eb8: Add examples for `github:deployKey:create` scaffolder action & improve related tests
8
+ - 76d07da66a: Make it possible to define control buttons text (Back, Create, Review) per template
9
+ - Updated dependencies
10
+ - @backstage/plugin-catalog-backend@1.15.0-next.1
11
+ - @backstage/plugin-catalog-node@1.5.0-next.1
12
+ - @backstage/integration@1.7.2-next.0
13
+ - @backstage/plugin-scaffolder-common@1.4.3-next.1
14
+ - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.4-next.1
15
+ - @backstage/backend-common@0.19.9-next.1
16
+ - @backstage/plugin-scaffolder-node@0.2.8-next.1
17
+ - @backstage/backend-tasks@0.5.12-next.1
18
+ - @backstage/plugin-auth-node@0.4.1-next.1
19
+ - @backstage/plugin-permission-node@0.7.18-next.1
20
+ - @backstage/backend-plugin-api@0.6.7-next.1
21
+ - @backstage/catalog-client@1.4.5
22
+ - @backstage/catalog-model@1.4.3
23
+ - @backstage/config@1.1.1
24
+ - @backstage/errors@1.2.3
25
+ - @backstage/types@1.1.1
26
+ - @backstage/plugin-catalog-common@1.0.17
27
+ - @backstage/plugin-permission-common@0.7.9
28
+
3
29
  ## 1.19.0-next.0
4
30
 
5
31
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-scaffolder-backend",
3
- "version": "1.19.0-next.0",
3
+ "version": "1.19.0-next.1",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/dist/alpha.cjs.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var alpha = require('@backstage/plugin-scaffolder-common/alpha');
6
6
  var pluginPermissionNode = require('@backstage/plugin-permission-node');
7
- var router = require('./cjs/router-9c2e178f.cjs.js');
7
+ var router = require('./cjs/router-b3ae7270.cjs.js');
8
8
  var backendPluginApi = require('@backstage/backend-plugin-api');
9
9
  var backendCommon = require('@backstage/backend-common');
10
10
  var integration = require('@backstage/integration');
@@ -80,7 +80,7 @@ var winston__namespace = /*#__PURE__*/_interopNamespace(winston);
80
80
  var nunjucks__default = /*#__PURE__*/_interopDefaultLegacy(nunjucks);
81
81
  var os__default = /*#__PURE__*/_interopDefaultLegacy(os);
82
82
 
83
- const examples$k = [
83
+ const examples$l = [
84
84
  {
85
85
  description: "Register with the catalog",
86
86
  example: yaml__default["default"].stringify({
@@ -104,7 +104,7 @@ function createCatalogRegisterAction(options) {
104
104
  return pluginScaffolderNode.createTemplateAction({
105
105
  id: id$4,
106
106
  description: "Registers entities from a catalog descriptor file in the workspace into the software catalog.",
107
- examples: examples$k,
107
+ examples: examples$l,
108
108
  schema: {
109
109
  input: {
110
110
  oneOf: [
@@ -228,7 +228,7 @@ function createCatalogRegisterAction(options) {
228
228
  });
229
229
  }
230
230
 
231
- const examples$j = [
231
+ const examples$k = [
232
232
  {
233
233
  description: "Write a catalog yaml file",
234
234
  example: yaml__namespace.stringify({
@@ -272,7 +272,7 @@ function createCatalogWriteAction() {
272
272
  )
273
273
  })
274
274
  },
275
- examples: examples$j,
275
+ examples: examples$k,
276
276
  supportsDryRun: true,
277
277
  async handler(ctx) {
278
278
  ctx.logStream.write(`Writing catalog-info.yaml`);
@@ -286,7 +286,7 @@ function createCatalogWriteAction() {
286
286
  });
287
287
  }
288
288
 
289
- const examples$i = [
289
+ const examples$j = [
290
290
  {
291
291
  description: "Fetch entity by reference",
292
292
  example: yaml__default["default"].stringify({
@@ -325,7 +325,7 @@ function createFetchCatalogEntityAction(options) {
325
325
  return pluginScaffolderNode.createTemplateAction({
326
326
  id: id$2,
327
327
  description: "Returns entity or entities from the catalog by entity reference(s)",
328
- examples: examples$i,
328
+ examples: examples$j,
329
329
  supportsDryRun: true,
330
330
  schema: {
331
331
  input: zod.z.object({
@@ -400,7 +400,7 @@ function createFetchCatalogEntityAction(options) {
400
400
  });
401
401
  }
402
402
 
403
- const examples$h = [
403
+ const examples$i = [
404
404
  {
405
405
  description: "Write a debug message",
406
406
  example: yaml__default["default"].stringify({
@@ -438,7 +438,7 @@ function createDebugLogAction() {
438
438
  return pluginScaffolderNode.createTemplateAction({
439
439
  id: id$1,
440
440
  description: "Writes a message into the log or lists all files in the workspace.",
441
- examples: examples$h,
441
+ examples: examples$i,
442
442
  schema: {
443
443
  input: {
444
444
  type: "object",
@@ -485,7 +485,7 @@ async function recursiveReadDir(dir) {
485
485
  return files.reduce((a, f) => a.concat(f), []);
486
486
  }
487
487
 
488
- const examples$g = [
488
+ const examples$h = [
489
489
  {
490
490
  description: "Waiting for 50 milliseconds",
491
491
  example: yaml__default["default"].stringify({
@@ -548,7 +548,7 @@ function createWaitAction(options) {
548
548
  return pluginScaffolderNode.createTemplateAction({
549
549
  id,
550
550
  description: "Waits for a certain period of time.",
551
- examples: examples$g,
551
+ examples: examples$h,
552
552
  schema: {
553
553
  input: {
554
554
  type: "object",
@@ -593,7 +593,7 @@ function createWaitAction(options) {
593
593
  });
594
594
  }
595
595
 
596
- const examples$f = [
596
+ const examples$g = [
597
597
  {
598
598
  description: "Downloads content and places it in the workspace.",
599
599
  example: yaml__default["default"].stringify({
@@ -632,7 +632,7 @@ function createFetchPlainAction(options) {
632
632
  const { reader, integrations } = options;
633
633
  return pluginScaffolderNode.createTemplateAction({
634
634
  id: ACTION_ID,
635
- examples: examples$f,
635
+ examples: examples$g,
636
636
  description: "Downloads content and places it in the workspace, or optionally in a subdirectory specified by the `targetPath` input option.",
637
637
  schema: {
638
638
  input: {
@@ -669,7 +669,7 @@ function createFetchPlainAction(options) {
669
669
  });
670
670
  }
671
671
 
672
- const examples$e = [
672
+ const examples$f = [
673
673
  {
674
674
  description: "Downloads a file and places it in the workspace.",
675
675
  example: yaml__default["default"].stringify({
@@ -693,7 +693,7 @@ function createFetchPlainFileAction(options) {
693
693
  return pluginScaffolderNode.createTemplateAction({
694
694
  id: "fetch:plain:file",
695
695
  description: "Downloads single file and places it in the workspace.",
696
- examples: examples$e,
696
+ examples: examples$f,
697
697
  schema: {
698
698
  input: {
699
699
  type: "object",
@@ -961,7 +961,7 @@ const createDefaultFilters = ({
961
961
  };
962
962
  };
963
963
 
964
- const examples$d = [
964
+ const examples$e = [
965
965
  {
966
966
  description: "Downloads a skelaton directory that lives alongside the template file and fill it out with values.",
967
967
  example: yaml__default["default"].stringify({
@@ -997,7 +997,7 @@ function createFetchTemplateAction(options) {
997
997
  return pluginScaffolderNode.createTemplateAction({
998
998
  id: "fetch:template",
999
999
  description: "Downloads a skeleton, templates variables into file and directory names and content, and places the result in the workspace, or optionally in a subdirectory specified by the `targetPath` input option.",
1000
- examples: examples$d,
1000
+ examples: examples$e,
1001
1001
  schema: {
1002
1002
  input: {
1003
1003
  type: "object",
@@ -1202,7 +1202,7 @@ function containsSkippedContent(localOutputPath) {
1202
1202
  return localOutputPath === "" || localOutputPath.startsWith("/") || localOutputPath.includes("//");
1203
1203
  }
1204
1204
 
1205
- const examples$c = [
1205
+ const examples$d = [
1206
1206
  {
1207
1207
  description: "Delete specified files",
1208
1208
  example: yaml__namespace.stringify({
@@ -1224,7 +1224,7 @@ const createFilesystemDeleteAction = () => {
1224
1224
  return pluginScaffolderNode.createTemplateAction({
1225
1225
  id: "fs:delete",
1226
1226
  description: "Deletes files and directories from the workspace",
1227
- examples: examples$c,
1227
+ examples: examples$d,
1228
1228
  schema: {
1229
1229
  input: {
1230
1230
  required: ["files"],
@@ -1261,7 +1261,7 @@ const createFilesystemDeleteAction = () => {
1261
1261
  });
1262
1262
  };
1263
1263
 
1264
- const examples$b = [
1264
+ const examples$c = [
1265
1265
  {
1266
1266
  description: "Rename specified files ",
1267
1267
  example: yaml__namespace.stringify({
@@ -1287,7 +1287,7 @@ const createFilesystemRenameAction = () => {
1287
1287
  return pluginScaffolderNode.createTemplateAction({
1288
1288
  id: "fs:rename",
1289
1289
  description: "Renames files and directories within the workspace",
1290
- examples: examples$b,
1290
+ examples: examples$c,
1291
1291
  schema: {
1292
1292
  input: {
1293
1293
  required: ["files"],
@@ -1769,7 +1769,7 @@ async function validateAccessTeam(client, access) {
1769
1769
  }
1770
1770
  }
1771
1771
 
1772
- const examples$a = [
1772
+ const examples$b = [
1773
1773
  {
1774
1774
  description: "GitHub Action Workflow Without Inputs.",
1775
1775
  example: yaml__default["default"].stringify({
@@ -1830,7 +1830,7 @@ function createGithubActionsDispatchAction(options) {
1830
1830
  return pluginScaffolderNode.createTemplateAction({
1831
1831
  id: "github:actions:dispatch",
1832
1832
  description: "Dispatches a GitHub Action workflow for a given branch or tag",
1833
- examples: examples$a,
1833
+ examples: examples$b,
1834
1834
  schema: {
1835
1835
  input: {
1836
1836
  type: "object",
@@ -1899,7 +1899,7 @@ function createGithubActionsDispatchAction(options) {
1899
1899
  });
1900
1900
  }
1901
1901
 
1902
- const examples$9 = [
1902
+ const examples$a = [
1903
1903
  {
1904
1904
  description: "Add labels to pull request or issue",
1905
1905
  example: yaml__default["default"].stringify({
@@ -1940,7 +1940,7 @@ function createGithubIssuesLabelAction(options) {
1940
1940
  return pluginScaffolderNode.createTemplateAction({
1941
1941
  id: "github:issues:label",
1942
1942
  description: "Adds labels to a pull request or issue on GitHub.",
1943
- examples: examples$9,
1943
+ examples: examples$a,
1944
1944
  schema: {
1945
1945
  input: {
1946
1946
  type: "object",
@@ -2263,7 +2263,7 @@ const commitHash = {
2263
2263
  type: "string"
2264
2264
  };
2265
2265
 
2266
- const examples$8 = [
2266
+ const examples$9 = [
2267
2267
  {
2268
2268
  description: "Creates a GitHub repository with default configuration.",
2269
2269
  example: yaml__default["default"].stringify({
@@ -2316,7 +2316,7 @@ function createGithubRepoCreateAction(options) {
2316
2316
  return pluginScaffolderNode.createTemplateAction({
2317
2317
  id: "github:repo:create",
2318
2318
  description: "Creates a GitHub repository.",
2319
- examples: examples$8,
2319
+ examples: examples$9,
2320
2320
  schema: {
2321
2321
  input: {
2322
2322
  type: "object",
@@ -2423,7 +2423,7 @@ function createGithubRepoCreateAction(options) {
2423
2423
  });
2424
2424
  }
2425
2425
 
2426
- const examples$7 = [
2426
+ const examples$8 = [
2427
2427
  {
2428
2428
  description: "Setup repo with no modifications to branch protection rules",
2429
2429
  example: yaml__default["default"].stringify({
@@ -2475,7 +2475,7 @@ function createGithubRepoPushAction(options) {
2475
2475
  return pluginScaffolderNode.createTemplateAction({
2476
2476
  id: "github:repo:push",
2477
2477
  description: "Initializes a git repository of contents in workspace and publishes it to GitHub.",
2478
- examples: examples$7,
2478
+ examples: examples$8,
2479
2479
  schema: {
2480
2480
  input: {
2481
2481
  type: "object",
@@ -2577,7 +2577,7 @@ function createGithubRepoPushAction(options) {
2577
2577
  });
2578
2578
  }
2579
2579
 
2580
- const examples$6 = [
2580
+ const examples$7 = [
2581
2581
  {
2582
2582
  description: "Create a GitHub webhook for a repository",
2583
2583
  example: yaml__default["default"].stringify({
@@ -2686,7 +2686,7 @@ function createGithubWebhookAction(options) {
2686
2686
  return pluginScaffolderNode.createTemplateAction({
2687
2687
  id: "github:webhook",
2688
2688
  description: "Creates webhook for a repository on GitHub.",
2689
- examples: examples$6,
2689
+ examples: examples$7,
2690
2690
  schema: {
2691
2691
  input: {
2692
2692
  type: "object",
@@ -2799,11 +2799,32 @@ function createGithubWebhookAction(options) {
2799
2799
  });
2800
2800
  }
2801
2801
 
2802
+ const examples$6 = [
2803
+ {
2804
+ description: "Example 1: Create and store a Deploy Key",
2805
+ example: yaml__default["default"].stringify({
2806
+ steps: [
2807
+ {
2808
+ action: "github:deployKey:create",
2809
+ name: "Create and store a Deploy Key",
2810
+ input: {
2811
+ repoUrl: "github.com?repo=repository&owner=owner",
2812
+ publicKey: "pubkey",
2813
+ privateKey: "privkey",
2814
+ deployKeyName: "Push Tags"
2815
+ }
2816
+ }
2817
+ ]
2818
+ })
2819
+ }
2820
+ ];
2821
+
2802
2822
  function createGithubDeployKeyAction(options) {
2803
2823
  const { integrations } = options;
2804
2824
  return pluginScaffolderNode.createTemplateAction({
2805
2825
  id: "github:deployKey:create",
2806
2826
  description: "Creates and stores Deploy Keys",
2827
+ examples: examples$6,
2807
2828
  schema: {
2808
2829
  input: {
2809
2830
  type: "object",
@@ -7699,8 +7720,10 @@ async function createRouter(options) {
7699
7720
  const token = userIdentity == null ? void 0 : userIdentity.token;
7700
7721
  const template = await authorizeTemplate(req.params, token);
7701
7722
  const parameters = [(_a2 = template.spec.parameters) != null ? _a2 : []].flat();
7723
+ const presentation = template.spec.presentation;
7702
7724
  res.json({
7703
7725
  title: (_b = template.metadata.title) != null ? _b : template.metadata.name,
7726
+ ...presentation ? { presentation } : {},
7704
7727
  description: template.metadata.description,
7705
7728
  "ui:options": template.metadata["ui:options"],
7706
7729
  steps: parameters.map((schema) => {
@@ -8012,4 +8035,4 @@ exports.createRouter = createRouter;
8012
8035
  exports.createWaitAction = createWaitAction;
8013
8036
  exports.scaffolderActionRules = scaffolderActionRules;
8014
8037
  exports.scaffolderTemplateRules = scaffolderTemplateRules;
8015
- //# sourceMappingURL=router-9c2e178f.cjs.js.map
8038
+ //# sourceMappingURL=router-b3ae7270.cjs.js.map