@backstage/plugin-scaffolder-backend 1.18.1 → 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 +53 -11
- package/alpha/package.json +1 -1
- package/dist/alpha.cjs.js +1 -1
- package/dist/cjs/{router-d7df4c2b.cjs.js → router-b3ae7270.cjs.js} +442 -37
- package/dist/cjs/router-b3ae7270.cjs.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +14 -14
- package/dist/cjs/router-d7df4c2b.cjs.js.map +0 -1
|
@@ -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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
2478
|
+
examples: examples$8,
|
|
2479
2479
|
schema: {
|
|
2480
2480
|
input: {
|
|
2481
2481
|
type: "object",
|
|
@@ -2577,12 +2577,116 @@ function createGithubRepoPushAction(options) {
|
|
|
2577
2577
|
});
|
|
2578
2578
|
}
|
|
2579
2579
|
|
|
2580
|
+
const examples$7 = [
|
|
2581
|
+
{
|
|
2582
|
+
description: "Create a GitHub webhook for a repository",
|
|
2583
|
+
example: yaml__default["default"].stringify({
|
|
2584
|
+
steps: [
|
|
2585
|
+
{
|
|
2586
|
+
action: "github:webhook",
|
|
2587
|
+
name: "Create GitHub Webhook",
|
|
2588
|
+
input: {
|
|
2589
|
+
repoUrl: "github.com?repo=repo&owner=owner",
|
|
2590
|
+
webhookUrl: "https://example.com/my-webhook",
|
|
2591
|
+
webhookSecret: "mysecret",
|
|
2592
|
+
events: ["push"],
|
|
2593
|
+
active: true,
|
|
2594
|
+
contentType: "json",
|
|
2595
|
+
insecureSsl: false,
|
|
2596
|
+
token: "my-github-token"
|
|
2597
|
+
}
|
|
2598
|
+
}
|
|
2599
|
+
]
|
|
2600
|
+
})
|
|
2601
|
+
},
|
|
2602
|
+
{
|
|
2603
|
+
description: "Create a GitHub webhook with minimal configuration",
|
|
2604
|
+
example: yaml__default["default"].stringify({
|
|
2605
|
+
steps: [
|
|
2606
|
+
{
|
|
2607
|
+
action: "github:webhook",
|
|
2608
|
+
name: "Create GitHub Webhook",
|
|
2609
|
+
input: {
|
|
2610
|
+
repoUrl: "github.com?repo=repo&owner=owner",
|
|
2611
|
+
webhookUrl: "https://example.com/my-webhook"
|
|
2612
|
+
}
|
|
2613
|
+
}
|
|
2614
|
+
]
|
|
2615
|
+
})
|
|
2616
|
+
},
|
|
2617
|
+
{
|
|
2618
|
+
description: "Create a GitHub webhook with custom events",
|
|
2619
|
+
example: yaml__default["default"].stringify({
|
|
2620
|
+
steps: [
|
|
2621
|
+
{
|
|
2622
|
+
action: "github:webhook",
|
|
2623
|
+
name: "Create GitHub Webhook",
|
|
2624
|
+
input: {
|
|
2625
|
+
repoUrl: "github.com?repo=repo&owner=owner",
|
|
2626
|
+
webhookUrl: "https://example.com/my-webhook",
|
|
2627
|
+
events: ["push", "pull_request"]
|
|
2628
|
+
}
|
|
2629
|
+
}
|
|
2630
|
+
]
|
|
2631
|
+
})
|
|
2632
|
+
},
|
|
2633
|
+
{
|
|
2634
|
+
description: "Create a GitHub webhook with JSON content type",
|
|
2635
|
+
example: yaml__default["default"].stringify({
|
|
2636
|
+
steps: [
|
|
2637
|
+
{
|
|
2638
|
+
action: "github:webhook",
|
|
2639
|
+
name: "Create GitHub Webhook",
|
|
2640
|
+
input: {
|
|
2641
|
+
repoUrl: "github.com?repo=repo&owner=owner",
|
|
2642
|
+
webhookUrl: "https://example.com/my-webhook",
|
|
2643
|
+
contentType: "json"
|
|
2644
|
+
}
|
|
2645
|
+
}
|
|
2646
|
+
]
|
|
2647
|
+
})
|
|
2648
|
+
},
|
|
2649
|
+
{
|
|
2650
|
+
description: "Create a GitHub webhook with insecure SSL",
|
|
2651
|
+
example: yaml__default["default"].stringify({
|
|
2652
|
+
steps: [
|
|
2653
|
+
{
|
|
2654
|
+
action: "github:webhook",
|
|
2655
|
+
name: "Create GitHub Webhook",
|
|
2656
|
+
input: {
|
|
2657
|
+
repoUrl: "github.com?repo=repo&owner=owner",
|
|
2658
|
+
webhookUrl: "https://example.com/my-webhook",
|
|
2659
|
+
insecureSsl: true
|
|
2660
|
+
}
|
|
2661
|
+
}
|
|
2662
|
+
]
|
|
2663
|
+
})
|
|
2664
|
+
},
|
|
2665
|
+
{
|
|
2666
|
+
description: "Create an inactive GitHub webhook",
|
|
2667
|
+
example: yaml__default["default"].stringify({
|
|
2668
|
+
steps: [
|
|
2669
|
+
{
|
|
2670
|
+
action: "github:webhook",
|
|
2671
|
+
name: "Create GitHub Webhook",
|
|
2672
|
+
input: {
|
|
2673
|
+
repoUrl: "github.com?repo=repo&owner=owner",
|
|
2674
|
+
webhookUrl: "https://example.com/my-webhook",
|
|
2675
|
+
active: false
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2678
|
+
]
|
|
2679
|
+
})
|
|
2680
|
+
}
|
|
2681
|
+
];
|
|
2682
|
+
|
|
2580
2683
|
function createGithubWebhookAction(options) {
|
|
2581
2684
|
const { integrations, defaultWebhookSecret, githubCredentialsProvider } = options;
|
|
2582
2685
|
const eventNames = webhooks.emitterEventNames.filter((event) => !event.includes("."));
|
|
2583
2686
|
return pluginScaffolderNode.createTemplateAction({
|
|
2584
2687
|
id: "github:webhook",
|
|
2585
2688
|
description: "Creates webhook for a repository on GitHub.",
|
|
2689
|
+
examples: examples$7,
|
|
2586
2690
|
schema: {
|
|
2587
2691
|
input: {
|
|
2588
2692
|
type: "object",
|
|
@@ -2695,11 +2799,32 @@ function createGithubWebhookAction(options) {
|
|
|
2695
2799
|
});
|
|
2696
2800
|
}
|
|
2697
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
|
+
|
|
2698
2822
|
function createGithubDeployKeyAction(options) {
|
|
2699
2823
|
const { integrations } = options;
|
|
2700
2824
|
return pluginScaffolderNode.createTemplateAction({
|
|
2701
2825
|
id: "github:deployKey:create",
|
|
2702
2826
|
description: "Creates and stores Deploy Keys",
|
|
2827
|
+
examples: examples$6,
|
|
2703
2828
|
schema: {
|
|
2704
2829
|
input: {
|
|
2705
2830
|
type: "object",
|
|
@@ -2802,11 +2927,92 @@ function createGithubDeployKeyAction(options) {
|
|
|
2802
2927
|
});
|
|
2803
2928
|
}
|
|
2804
2929
|
|
|
2930
|
+
const examples$5 = [
|
|
2931
|
+
{
|
|
2932
|
+
description: "Create a GitHub Environment (No Policies, No Variables, No Secrets)",
|
|
2933
|
+
example: yaml__default["default"].stringify({
|
|
2934
|
+
steps: [
|
|
2935
|
+
{
|
|
2936
|
+
action: "github:environment:create",
|
|
2937
|
+
name: "Create Environment",
|
|
2938
|
+
input: {
|
|
2939
|
+
repoUrl: "github.com?repo=repository&owner=owner",
|
|
2940
|
+
name: "envname"
|
|
2941
|
+
}
|
|
2942
|
+
}
|
|
2943
|
+
]
|
|
2944
|
+
})
|
|
2945
|
+
},
|
|
2946
|
+
{
|
|
2947
|
+
description: "Create a GitHub Environment with Protected Branch Policy",
|
|
2948
|
+
example: yaml__default["default"].stringify({
|
|
2949
|
+
steps: [
|
|
2950
|
+
{
|
|
2951
|
+
action: "github:environment:create",
|
|
2952
|
+
name: "Create Environment",
|
|
2953
|
+
input: {
|
|
2954
|
+
repoUrl: "github.com?repo=repository&owner=owner",
|
|
2955
|
+
name: "envname",
|
|
2956
|
+
deploymentBranchPolicy: {
|
|
2957
|
+
protected_branches: true,
|
|
2958
|
+
custom_branch_policies: false
|
|
2959
|
+
}
|
|
2960
|
+
}
|
|
2961
|
+
}
|
|
2962
|
+
]
|
|
2963
|
+
})
|
|
2964
|
+
},
|
|
2965
|
+
{
|
|
2966
|
+
description: "Create a GitHub Environment with Custom Branch Policies",
|
|
2967
|
+
example: yaml__default["default"].stringify({
|
|
2968
|
+
steps: [
|
|
2969
|
+
{
|
|
2970
|
+
action: "github:environment:create",
|
|
2971
|
+
name: "Create Environment",
|
|
2972
|
+
input: {
|
|
2973
|
+
repoUrl: "github.com?repo=repository&owner=owner",
|
|
2974
|
+
name: "envname",
|
|
2975
|
+
deploymentBranchPolicy: {
|
|
2976
|
+
protected_branches: false,
|
|
2977
|
+
custom_branch_policies: true
|
|
2978
|
+
},
|
|
2979
|
+
customBranchPolicyNames: ["main", "*.*.*"]
|
|
2980
|
+
}
|
|
2981
|
+
}
|
|
2982
|
+
]
|
|
2983
|
+
})
|
|
2984
|
+
},
|
|
2985
|
+
{
|
|
2986
|
+
description: "Create a GitHub Environment with Environment Variables and Secrets",
|
|
2987
|
+
example: yaml__default["default"].stringify({
|
|
2988
|
+
steps: [
|
|
2989
|
+
{
|
|
2990
|
+
action: "github:environment:create",
|
|
2991
|
+
name: "Create Environment",
|
|
2992
|
+
input: {
|
|
2993
|
+
repoUrl: "github.com?repo=repository&owner=owner",
|
|
2994
|
+
name: "envname",
|
|
2995
|
+
environmentVariables: {
|
|
2996
|
+
key1: "val1",
|
|
2997
|
+
key2: "val2"
|
|
2998
|
+
},
|
|
2999
|
+
secrets: {
|
|
3000
|
+
secret1: "supersecret1",
|
|
3001
|
+
secret2: "supersecret2"
|
|
3002
|
+
}
|
|
3003
|
+
}
|
|
3004
|
+
}
|
|
3005
|
+
]
|
|
3006
|
+
})
|
|
3007
|
+
}
|
|
3008
|
+
];
|
|
3009
|
+
|
|
2805
3010
|
function createGithubEnvironmentAction(options) {
|
|
2806
3011
|
const { integrations } = options;
|
|
2807
3012
|
return pluginScaffolderNode.createTemplateAction({
|
|
2808
3013
|
id: "github:environment:create",
|
|
2809
3014
|
description: "Creates Deployment Environments",
|
|
3015
|
+
examples: examples$5,
|
|
2810
3016
|
schema: {
|
|
2811
3017
|
input: {
|
|
2812
3018
|
type: "object",
|
|
@@ -2949,7 +3155,7 @@ function createGithubEnvironmentAction(options) {
|
|
|
2949
3155
|
});
|
|
2950
3156
|
}
|
|
2951
3157
|
|
|
2952
|
-
const examples$
|
|
3158
|
+
const examples$4 = [
|
|
2953
3159
|
{
|
|
2954
3160
|
description: "Initializes a git repository of the content in the workspace, and publishes it to Azure.",
|
|
2955
3161
|
example: yaml__default["default"].stringify({
|
|
@@ -3004,7 +3210,7 @@ function createPublishAzureAction(options) {
|
|
|
3004
3210
|
const { integrations, config } = options;
|
|
3005
3211
|
return pluginScaffolderNode.createTemplateAction({
|
|
3006
3212
|
id: "publish:azure",
|
|
3007
|
-
examples: examples$
|
|
3213
|
+
examples: examples$4,
|
|
3008
3214
|
description: "Initializes a git repository of the content in the workspace, and publishes it to Azure.",
|
|
3009
3215
|
schema: {
|
|
3010
3216
|
input: {
|
|
@@ -3146,7 +3352,7 @@ function createPublishAzureAction(options) {
|
|
|
3146
3352
|
});
|
|
3147
3353
|
}
|
|
3148
3354
|
|
|
3149
|
-
const examples$
|
|
3355
|
+
const examples$3 = [
|
|
3150
3356
|
{
|
|
3151
3357
|
description: "Initializes a git repository of contents in workspace and publish it to Bitbucket with default configuration.",
|
|
3152
3358
|
example: yaml__default["default"].stringify({
|
|
@@ -3442,7 +3648,7 @@ function createPublishBitbucketAction(options) {
|
|
|
3442
3648
|
return pluginScaffolderNode.createTemplateAction({
|
|
3443
3649
|
id: "publish:bitbucket",
|
|
3444
3650
|
description: "Initializes a git repository of the content in the workspace, and publishes it to Bitbucket.",
|
|
3445
|
-
examples: examples$
|
|
3651
|
+
examples: examples$3,
|
|
3446
3652
|
schema: {
|
|
3447
3653
|
input: {
|
|
3448
3654
|
type: "object",
|
|
@@ -4480,7 +4686,7 @@ Change-Id: ${changeId}`;
|
|
|
4480
4686
|
});
|
|
4481
4687
|
}
|
|
4482
4688
|
|
|
4483
|
-
const examples$
|
|
4689
|
+
const examples$2 = [
|
|
4484
4690
|
{
|
|
4485
4691
|
description: "Initializes a git repository of contents in workspace and publish it to GitHub with default configuration.",
|
|
4486
4692
|
example: yaml__default["default"].stringify({
|
|
@@ -4536,7 +4742,7 @@ function createPublishGithubAction(options) {
|
|
|
4536
4742
|
return pluginScaffolderNode.createTemplateAction({
|
|
4537
4743
|
id: "publish:github",
|
|
4538
4744
|
description: "Initializes a git repository of contents in workspace and publishes it to GitHub.",
|
|
4539
|
-
examples: examples$
|
|
4745
|
+
examples: examples$2,
|
|
4540
4746
|
schema: {
|
|
4541
4747
|
input: {
|
|
4542
4748
|
type: "object",
|
|
@@ -4761,6 +4967,195 @@ async function deserializeDirectoryContents(targetPath, files) {
|
|
|
4761
4967
|
}
|
|
4762
4968
|
}
|
|
4763
4969
|
|
|
4970
|
+
const examples$1 = [
|
|
4971
|
+
{
|
|
4972
|
+
description: "Create a pull request",
|
|
4973
|
+
example: yaml__default["default"].stringify({
|
|
4974
|
+
steps: [
|
|
4975
|
+
{
|
|
4976
|
+
action: "publish:github:pull-request",
|
|
4977
|
+
name: "Create a pull reuqest",
|
|
4978
|
+
input: {
|
|
4979
|
+
repoUrl: "github.com?repo=repo&owner=owner",
|
|
4980
|
+
branchName: "new-app",
|
|
4981
|
+
title: "Create my new app",
|
|
4982
|
+
description: "This PR is really good"
|
|
4983
|
+
}
|
|
4984
|
+
}
|
|
4985
|
+
]
|
|
4986
|
+
})
|
|
4987
|
+
},
|
|
4988
|
+
{
|
|
4989
|
+
description: "Create a pull request with target branch name",
|
|
4990
|
+
example: yaml__default["default"].stringify({
|
|
4991
|
+
steps: [
|
|
4992
|
+
{
|
|
4993
|
+
action: "publish:github:pull-request",
|
|
4994
|
+
name: "Create a pull reuqest with target branch name",
|
|
4995
|
+
input: {
|
|
4996
|
+
repoUrl: "github.com?repo=repo&owner=owner",
|
|
4997
|
+
branchName: "new-app",
|
|
4998
|
+
title: "Create my new app",
|
|
4999
|
+
description: "This PR is really good",
|
|
5000
|
+
targetBranchName: "test"
|
|
5001
|
+
}
|
|
5002
|
+
}
|
|
5003
|
+
]
|
|
5004
|
+
})
|
|
5005
|
+
},
|
|
5006
|
+
{
|
|
5007
|
+
description: "Create a pull request as draft",
|
|
5008
|
+
example: yaml__default["default"].stringify({
|
|
5009
|
+
steps: [
|
|
5010
|
+
{
|
|
5011
|
+
action: "publish:github:pull-request",
|
|
5012
|
+
name: "Create a pull reuqest as draft",
|
|
5013
|
+
input: {
|
|
5014
|
+
repoUrl: "github.com?repo=repo&owner=owner",
|
|
5015
|
+
branchName: "new-app",
|
|
5016
|
+
title: "Create my new app",
|
|
5017
|
+
description: "This PR is really good",
|
|
5018
|
+
draft: true
|
|
5019
|
+
}
|
|
5020
|
+
}
|
|
5021
|
+
]
|
|
5022
|
+
})
|
|
5023
|
+
},
|
|
5024
|
+
{
|
|
5025
|
+
description: "Create a pull request with target path",
|
|
5026
|
+
example: yaml__default["default"].stringify({
|
|
5027
|
+
steps: [
|
|
5028
|
+
{
|
|
5029
|
+
action: "publish:github:pull-request",
|
|
5030
|
+
name: "Create a pull reuqest with target path",
|
|
5031
|
+
input: {
|
|
5032
|
+
repoUrl: "github.com?repo=repo&owner=owner",
|
|
5033
|
+
branchName: "new-app",
|
|
5034
|
+
title: "Create my new app",
|
|
5035
|
+
description: "This PR is really good",
|
|
5036
|
+
targetPath: "targetPath"
|
|
5037
|
+
}
|
|
5038
|
+
}
|
|
5039
|
+
]
|
|
5040
|
+
})
|
|
5041
|
+
},
|
|
5042
|
+
{
|
|
5043
|
+
description: "Create a pull request with source path",
|
|
5044
|
+
example: yaml__default["default"].stringify({
|
|
5045
|
+
steps: [
|
|
5046
|
+
{
|
|
5047
|
+
action: "publish:github:pull-request",
|
|
5048
|
+
name: "Create a pull reuqest with source path",
|
|
5049
|
+
input: {
|
|
5050
|
+
repoUrl: "github.com?repo=repo&owner=owner",
|
|
5051
|
+
branchName: "new-app",
|
|
5052
|
+
title: "Create my new app",
|
|
5053
|
+
description: "This PR is really good",
|
|
5054
|
+
sourcePath: "source"
|
|
5055
|
+
}
|
|
5056
|
+
}
|
|
5057
|
+
]
|
|
5058
|
+
})
|
|
5059
|
+
},
|
|
5060
|
+
{
|
|
5061
|
+
description: "Create a pull request with token",
|
|
5062
|
+
example: yaml__default["default"].stringify({
|
|
5063
|
+
steps: [
|
|
5064
|
+
{
|
|
5065
|
+
action: "publish:github:pull-request",
|
|
5066
|
+
name: "Create a pull reuqest",
|
|
5067
|
+
input: {
|
|
5068
|
+
repoUrl: "github.com?repo=repo&owner=owner",
|
|
5069
|
+
branchName: "new-app",
|
|
5070
|
+
title: "Create my new app",
|
|
5071
|
+
description: "This PR is really good",
|
|
5072
|
+
token: "gph_YourGitHubToken"
|
|
5073
|
+
}
|
|
5074
|
+
}
|
|
5075
|
+
]
|
|
5076
|
+
})
|
|
5077
|
+
},
|
|
5078
|
+
{
|
|
5079
|
+
description: "Create a pull request with reviewers",
|
|
5080
|
+
example: yaml__default["default"].stringify({
|
|
5081
|
+
steps: [
|
|
5082
|
+
{
|
|
5083
|
+
action: "publish:github:pull-request",
|
|
5084
|
+
name: "Create a pull reuqest with reviewers",
|
|
5085
|
+
input: {
|
|
5086
|
+
repoUrl: "github.com?repo=repo&owner=owner",
|
|
5087
|
+
branchName: "new-app",
|
|
5088
|
+
title: "Create my new app",
|
|
5089
|
+
description: "This PR is really good",
|
|
5090
|
+
reviewers: ["foobar"]
|
|
5091
|
+
}
|
|
5092
|
+
}
|
|
5093
|
+
]
|
|
5094
|
+
})
|
|
5095
|
+
},
|
|
5096
|
+
{
|
|
5097
|
+
description: "Create a pull request with team reviewers",
|
|
5098
|
+
example: yaml__default["default"].stringify({
|
|
5099
|
+
steps: [
|
|
5100
|
+
{
|
|
5101
|
+
action: "publish:github:pull-request",
|
|
5102
|
+
name: "Create a pull reuqest with team reviewers",
|
|
5103
|
+
input: {
|
|
5104
|
+
repoUrl: "github.com?repo=repo&owner=owner",
|
|
5105
|
+
branchName: "new-app",
|
|
5106
|
+
title: "Create my new app",
|
|
5107
|
+
description: "This PR is really good",
|
|
5108
|
+
teamReviewers: ["team-foo"]
|
|
5109
|
+
}
|
|
5110
|
+
}
|
|
5111
|
+
]
|
|
5112
|
+
})
|
|
5113
|
+
},
|
|
5114
|
+
{
|
|
5115
|
+
description: "Create a pull request with commit message",
|
|
5116
|
+
example: yaml__default["default"].stringify({
|
|
5117
|
+
steps: [
|
|
5118
|
+
{
|
|
5119
|
+
action: "publish:github:pull-request",
|
|
5120
|
+
name: "Create a pull reuqest",
|
|
5121
|
+
input: {
|
|
5122
|
+
repoUrl: "github.com?repo=repo&owner=owner",
|
|
5123
|
+
branchName: "new-app",
|
|
5124
|
+
title: "Create my new app",
|
|
5125
|
+
description: "This PR is really good",
|
|
5126
|
+
commitMessage: "Custom commit message"
|
|
5127
|
+
}
|
|
5128
|
+
}
|
|
5129
|
+
]
|
|
5130
|
+
})
|
|
5131
|
+
},
|
|
5132
|
+
{
|
|
5133
|
+
description: "Create a pull request with all parameters",
|
|
5134
|
+
example: yaml__default["default"].stringify({
|
|
5135
|
+
steps: [
|
|
5136
|
+
{
|
|
5137
|
+
action: "publish:github:pull-request",
|
|
5138
|
+
name: "Create a pull reuqest",
|
|
5139
|
+
input: {
|
|
5140
|
+
repoUrl: "github.com?repo=repo&owner=owner",
|
|
5141
|
+
branchName: "new-app",
|
|
5142
|
+
title: "Create my new app",
|
|
5143
|
+
description: "This PR is really good",
|
|
5144
|
+
targetBranchName: "test",
|
|
5145
|
+
draft: true,
|
|
5146
|
+
targetPath: "targetPath",
|
|
5147
|
+
sourcePath: "source",
|
|
5148
|
+
token: "gph_YourGitHubToken",
|
|
5149
|
+
reviewers: ["foobar"],
|
|
5150
|
+
teamReviewers: ["team-foo"],
|
|
5151
|
+
commitMessage: "Commit for foo changes"
|
|
5152
|
+
}
|
|
5153
|
+
}
|
|
5154
|
+
]
|
|
5155
|
+
})
|
|
5156
|
+
}
|
|
5157
|
+
];
|
|
5158
|
+
|
|
4764
5159
|
class GithubResponseError extends errors.CustomErrorBase {
|
|
4765
5160
|
}
|
|
4766
5161
|
const defaultClientFactory = async ({
|
|
@@ -4794,6 +5189,7 @@ const createPublishGithubPullRequestAction = (options) => {
|
|
|
4794
5189
|
} = options;
|
|
4795
5190
|
return pluginScaffolderNode.createTemplateAction({
|
|
4796
5191
|
id: "publish:github:pull-request",
|
|
5192
|
+
examples: examples$1,
|
|
4797
5193
|
schema: {
|
|
4798
5194
|
input: {
|
|
4799
5195
|
required: ["repoUrl", "title", "description", "branchName"],
|
|
@@ -4864,6 +5260,11 @@ const createPublishGithubPullRequestAction = (options) => {
|
|
|
4864
5260
|
type: "string",
|
|
4865
5261
|
title: "Commit Message",
|
|
4866
5262
|
description: "The commit message for the pull request commit"
|
|
5263
|
+
},
|
|
5264
|
+
update: {
|
|
5265
|
+
type: "boolean",
|
|
5266
|
+
title: "Update",
|
|
5267
|
+
description: "Update pull request if already exists"
|
|
4867
5268
|
}
|
|
4868
5269
|
}
|
|
4869
5270
|
},
|
|
@@ -4901,7 +5302,8 @@ const createPublishGithubPullRequestAction = (options) => {
|
|
|
4901
5302
|
token: providedToken,
|
|
4902
5303
|
reviewers,
|
|
4903
5304
|
teamReviewers,
|
|
4904
|
-
commitMessage
|
|
5305
|
+
commitMessage,
|
|
5306
|
+
update
|
|
4905
5307
|
} = ctx.input;
|
|
4906
5308
|
const { owner, repo, host } = parseRepoUrl(repoUrl, integrations);
|
|
4907
5309
|
if (!owner) {
|
|
@@ -4961,7 +5363,8 @@ const createPublishGithubPullRequestAction = (options) => {
|
|
|
4961
5363
|
],
|
|
4962
5364
|
body: description,
|
|
4963
5365
|
head: branchName,
|
|
4964
|
-
draft
|
|
5366
|
+
draft,
|
|
5367
|
+
update
|
|
4965
5368
|
};
|
|
4966
5369
|
if (targetBranchName) {
|
|
4967
5370
|
createOptions.base = targetBranchName;
|
|
@@ -7317,8 +7720,10 @@ async function createRouter(options) {
|
|
|
7317
7720
|
const token = userIdentity == null ? void 0 : userIdentity.token;
|
|
7318
7721
|
const template = await authorizeTemplate(req.params, token);
|
|
7319
7722
|
const parameters = [(_a2 = template.spec.parameters) != null ? _a2 : []].flat();
|
|
7723
|
+
const presentation = template.spec.presentation;
|
|
7320
7724
|
res.json({
|
|
7321
7725
|
title: (_b = template.metadata.title) != null ? _b : template.metadata.name,
|
|
7726
|
+
...presentation ? { presentation } : {},
|
|
7322
7727
|
description: template.metadata.description,
|
|
7323
7728
|
"ui:options": template.metadata["ui:options"],
|
|
7324
7729
|
steps: parameters.map((schema) => {
|
|
@@ -7630,4 +8035,4 @@ exports.createRouter = createRouter;
|
|
|
7630
8035
|
exports.createWaitAction = createWaitAction;
|
|
7631
8036
|
exports.scaffolderActionRules = scaffolderActionRules;
|
|
7632
8037
|
exports.scaffolderTemplateRules = scaffolderTemplateRules;
|
|
7633
|
-
//# sourceMappingURL=router-
|
|
8038
|
+
//# sourceMappingURL=router-b3ae7270.cjs.js.map
|