@backstage/plugin-scaffolder-backend 1.3.0-next.0 → 1.3.0
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 +97 -0
- package/dist/index.cjs.js +424 -96
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +34 -3
- package/package.json +14 -12
package/dist/index.d.ts
CHANGED
|
@@ -125,6 +125,7 @@ interface TaskContext {
|
|
|
125
125
|
secrets?: TaskSecrets;
|
|
126
126
|
createdBy?: string;
|
|
127
127
|
done: boolean;
|
|
128
|
+
isDryRun?: boolean;
|
|
128
129
|
emitLog(message: string, logMetadata?: JsonObject): Promise<void>;
|
|
129
130
|
complete(result: TaskCompletionState, metadata?: JsonObject): Promise<void>;
|
|
130
131
|
getWorkspaceName(): Promise<string>;
|
|
@@ -147,6 +148,11 @@ interface TaskBroker {
|
|
|
147
148
|
events: SerializedTaskEvent[];
|
|
148
149
|
}>;
|
|
149
150
|
get(taskId: string): Promise<SerializedTask>;
|
|
151
|
+
list?(options?: {
|
|
152
|
+
createdBy?: string;
|
|
153
|
+
}): Promise<{
|
|
154
|
+
tasks: SerializedTask[];
|
|
155
|
+
}>;
|
|
150
156
|
}
|
|
151
157
|
/**
|
|
152
158
|
* TaskStoreEmitOptions
|
|
@@ -204,6 +210,11 @@ interface TaskStore {
|
|
|
204
210
|
taskId: string;
|
|
205
211
|
}[];
|
|
206
212
|
}>;
|
|
213
|
+
list?(options: {
|
|
214
|
+
createdBy?: string;
|
|
215
|
+
}): Promise<{
|
|
216
|
+
tasks: SerializedTask[];
|
|
217
|
+
}>;
|
|
207
218
|
emitLogEvent({ taskId, body }: TaskStoreEmitOptions): Promise<void>;
|
|
208
219
|
listEvents({ taskId, after, }: TaskStoreListEventsOptions): Promise<{
|
|
209
220
|
events: SerializedTaskEvent[];
|
|
@@ -226,11 +237,17 @@ declare type ActionContext<Input extends JsonObject> = {
|
|
|
226
237
|
*/
|
|
227
238
|
createTemporaryDirectory(): Promise<string>;
|
|
228
239
|
templateInfo?: TemplateInfo;
|
|
240
|
+
/**
|
|
241
|
+
* Whether this action invocation is a dry-run or not.
|
|
242
|
+
* This will only ever be true if the actions as marked as supporting dry-runs.
|
|
243
|
+
*/
|
|
244
|
+
isDryRun?: boolean;
|
|
229
245
|
};
|
|
230
246
|
/** @public */
|
|
231
247
|
declare type TemplateAction<Input extends JsonObject> = {
|
|
232
248
|
id: string;
|
|
233
249
|
description?: string;
|
|
250
|
+
supportsDryRun?: boolean;
|
|
234
251
|
schema?: {
|
|
235
252
|
input?: Schema;
|
|
236
253
|
output?: Schema;
|
|
@@ -479,6 +496,7 @@ declare function createPublishGithubAction(options: {
|
|
|
479
496
|
description?: string | undefined;
|
|
480
497
|
access?: string | undefined;
|
|
481
498
|
defaultBranch?: string | undefined;
|
|
499
|
+
protectDefaultBranch?: boolean | undefined;
|
|
482
500
|
deleteBranchOnMerge?: boolean | undefined;
|
|
483
501
|
gitCommitMessage?: string | undefined;
|
|
484
502
|
gitAuthorName?: string | undefined;
|
|
@@ -490,10 +508,17 @@ declare function createPublishGithubAction(options: {
|
|
|
490
508
|
requireCodeOwnerReviews?: boolean | undefined;
|
|
491
509
|
requiredStatusCheckContexts?: string[] | undefined;
|
|
492
510
|
repoVisibility?: "internal" | "private" | "public" | undefined;
|
|
493
|
-
collaborators?: {
|
|
511
|
+
collaborators?: ({
|
|
512
|
+
user: string;
|
|
513
|
+
access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
|
|
514
|
+
} | {
|
|
515
|
+
team: string;
|
|
516
|
+
access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
|
|
517
|
+
} | {
|
|
518
|
+
/** @deprecated This field is deprecated in favor of team */
|
|
494
519
|
username: string;
|
|
495
520
|
access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
|
|
496
|
-
}[] | undefined;
|
|
521
|
+
})[] | undefined;
|
|
497
522
|
token?: string | undefined;
|
|
498
523
|
topics?: string[] | undefined;
|
|
499
524
|
}>;
|
|
@@ -580,13 +605,14 @@ declare function createPublishGitlabAction(options: {
|
|
|
580
605
|
declare const createPublishGitlabMergeRequestAction: (options: {
|
|
581
606
|
integrations: ScmIntegrationRegistry;
|
|
582
607
|
}) => TemplateAction<{
|
|
583
|
-
projectid: string;
|
|
584
608
|
repoUrl: string;
|
|
585
609
|
title: string;
|
|
586
610
|
description: string;
|
|
587
611
|
branchName: string;
|
|
588
612
|
targetPath: string;
|
|
589
613
|
token?: string | undefined;
|
|
614
|
+
/** @deprecated Use projectPath instead */
|
|
615
|
+
projectid?: string | undefined;
|
|
590
616
|
}>;
|
|
591
617
|
|
|
592
618
|
/**
|
|
@@ -691,6 +717,11 @@ declare class DatabaseTaskStore implements TaskStore {
|
|
|
691
717
|
private readonly db;
|
|
692
718
|
static create(options: DatabaseTaskStoreOptions): Promise<DatabaseTaskStore>;
|
|
693
719
|
private constructor();
|
|
720
|
+
list(options: {
|
|
721
|
+
createdBy?: string;
|
|
722
|
+
}): Promise<{
|
|
723
|
+
tasks: SerializedTask[];
|
|
724
|
+
}>;
|
|
694
725
|
getTask(taskId: string): Promise<SerializedTask>;
|
|
695
726
|
createTask(options: TaskStoreCreateTaskOptions): Promise<TaskStoreCreateTaskResult>;
|
|
696
727
|
claimTask(): Promise<SerializedTask | undefined>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-scaffolder-backend",
|
|
3
3
|
"description": "The Backstage backend plugin that helps you create new things",
|
|
4
|
-
"version": "1.3.0
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"build:assets": "node scripts/build-nunjucks.js"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@backstage/backend-common": "^0.
|
|
38
|
-
"@backstage/catalog-client": "^1.0.
|
|
39
|
-
"@backstage/catalog-model": "^1.0.
|
|
37
|
+
"@backstage/backend-common": "^0.14.0",
|
|
38
|
+
"@backstage/catalog-client": "^1.0.3",
|
|
39
|
+
"@backstage/catalog-model": "^1.0.3",
|
|
40
40
|
"@backstage/config": "^1.0.1",
|
|
41
41
|
"@backstage/errors": "^1.0.0",
|
|
42
|
-
"@backstage/integration": "^1.2.1
|
|
43
|
-
"@backstage/plugin-catalog-backend": "^1.2.0
|
|
44
|
-
"@backstage/plugin-scaffolder-common": "^1.1.
|
|
42
|
+
"@backstage/integration": "^1.2.1",
|
|
43
|
+
"@backstage/plugin-catalog-backend": "^1.2.0",
|
|
44
|
+
"@backstage/plugin-scaffolder-common": "^1.1.1",
|
|
45
45
|
"@backstage/types": "^1.0.0",
|
|
46
46
|
"@gitbeaker/core": "^35.6.0",
|
|
47
47
|
"@gitbeaker/node": "^35.1.0",
|
|
@@ -67,15 +67,17 @@
|
|
|
67
67
|
"nunjucks": "^3.2.3",
|
|
68
68
|
"octokit": "^1.7.1",
|
|
69
69
|
"octokit-plugin-create-pull-request": "^3.10.0",
|
|
70
|
+
"p-limit": "^3.1.0",
|
|
70
71
|
"uuid": "^8.2.0",
|
|
71
72
|
"vm2": "^3.9.6",
|
|
72
73
|
"winston": "^3.2.1",
|
|
73
74
|
"yaml": "^1.10.0",
|
|
74
|
-
"zen-observable": "^0.8.15"
|
|
75
|
+
"zen-observable": "^0.8.15",
|
|
76
|
+
"zod": "^3.11.6"
|
|
75
77
|
},
|
|
76
78
|
"devDependencies": {
|
|
77
|
-
"@backstage/backend-test-utils": "^0.1.25
|
|
78
|
-
"@backstage/cli": "^0.17.2
|
|
79
|
+
"@backstage/backend-test-utils": "^0.1.25",
|
|
80
|
+
"@backstage/cli": "^0.17.2",
|
|
79
81
|
"@types/command-exists": "^1.2.0",
|
|
80
82
|
"@types/fs-extra": "^9.0.1",
|
|
81
83
|
"@types/git-url-parse": "^9.0.0",
|
|
@@ -86,7 +88,7 @@
|
|
|
86
88
|
"esbuild": "^0.14.1",
|
|
87
89
|
"jest-when": "^3.1.0",
|
|
88
90
|
"mock-fs": "^5.1.0",
|
|
89
|
-
"msw": "^0.
|
|
91
|
+
"msw": "^0.42.0",
|
|
90
92
|
"supertest": "^6.1.3",
|
|
91
93
|
"yaml": "^1.10.0"
|
|
92
94
|
},
|
|
@@ -97,5 +99,5 @@
|
|
|
97
99
|
"assets"
|
|
98
100
|
],
|
|
99
101
|
"configSchema": "config.d.ts",
|
|
100
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "e42cb3887e41f756c16380d757d93feda27f40ee"
|
|
101
103
|
}
|