@backstage/plugin-scaffolder-backend 1.2.0-next.0 → 1.2.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 +17 -0
- package/dist/index.cjs.js +33 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/migrations/20220129100000_created_by.js +38 -0
- package/package.json +11 -11
package/dist/index.d.ts
CHANGED
|
@@ -67,6 +67,7 @@ declare type SerializedTask = {
|
|
|
67
67
|
status: TaskStatus;
|
|
68
68
|
createdAt: string;
|
|
69
69
|
lastHeartbeatAt?: string;
|
|
70
|
+
createdBy?: string;
|
|
70
71
|
secrets?: TaskSecrets;
|
|
71
72
|
};
|
|
72
73
|
/**
|
|
@@ -112,6 +113,7 @@ declare type TaskBrokerDispatchResult = {
|
|
|
112
113
|
declare type TaskBrokerDispatchOptions = {
|
|
113
114
|
spec: TaskSpec;
|
|
114
115
|
secrets?: TaskSecrets;
|
|
116
|
+
createdBy?: string;
|
|
115
117
|
};
|
|
116
118
|
/**
|
|
117
119
|
* Task
|
|
@@ -121,6 +123,7 @@ declare type TaskBrokerDispatchOptions = {
|
|
|
121
123
|
interface TaskContext {
|
|
122
124
|
spec: TaskSpec;
|
|
123
125
|
secrets?: TaskSecrets;
|
|
126
|
+
createdBy?: string;
|
|
124
127
|
done: boolean;
|
|
125
128
|
emitLog(message: string, logMetadata?: JsonObject): Promise<void>;
|
|
126
129
|
complete(result: TaskCompletionState, metadata?: JsonObject): Promise<void>;
|
|
@@ -169,6 +172,7 @@ declare type TaskStoreListEventsOptions = {
|
|
|
169
172
|
*/
|
|
170
173
|
declare type TaskStoreCreateTaskOptions = {
|
|
171
174
|
spec: TaskSpec;
|
|
175
|
+
createdBy?: string;
|
|
172
176
|
secrets?: TaskSecrets;
|
|
173
177
|
};
|
|
174
178
|
/**
|
|
@@ -709,6 +713,7 @@ declare class TaskManager implements TaskContext {
|
|
|
709
713
|
private constructor();
|
|
710
714
|
get spec(): _backstage_plugin_scaffolder_common.TaskSpecV1beta3;
|
|
711
715
|
get secrets(): TaskSecrets | undefined;
|
|
716
|
+
get createdBy(): string | undefined;
|
|
712
717
|
getWorkspaceName(): Promise<string>;
|
|
713
718
|
get done(): boolean;
|
|
714
719
|
emitLog(message: string, logMetadata?: JsonObject): Promise<void>;
|
|
@@ -733,6 +738,10 @@ interface CurrentClaimedTask {
|
|
|
733
738
|
* The secrets that are stored with the task.
|
|
734
739
|
*/
|
|
735
740
|
secrets?: TaskSecrets;
|
|
741
|
+
/**
|
|
742
|
+
* The creator of the task.
|
|
743
|
+
*/
|
|
744
|
+
createdBy?: string;
|
|
736
745
|
}
|
|
737
746
|
|
|
738
747
|
/**
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 The Backstage Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
// @ts-check
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @param {import('knex').Knex} knex
|
|
21
|
+
*/
|
|
22
|
+
exports.up = async function up(knex) {
|
|
23
|
+
await knex.schema.alterTable('tasks', table => {
|
|
24
|
+
table
|
|
25
|
+
.text('created_by')
|
|
26
|
+
.nullable()
|
|
27
|
+
.comment('An entityRef of the user who created the task');
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @param {import('knex').Knex} knex
|
|
33
|
+
*/
|
|
34
|
+
exports.down = async function down(knex) {
|
|
35
|
+
await knex.schema.alterTable('tasks', table => {
|
|
36
|
+
table.dropColumn('created_by');
|
|
37
|
+
});
|
|
38
|
+
};
|
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.2.0-next.
|
|
4
|
+
"version": "1.2.0-next.1",
|
|
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.13.3-next.
|
|
38
|
-
"@backstage/catalog-client": "^1.0.
|
|
39
|
-
"@backstage/catalog-model": "^1.0.
|
|
40
|
-
"@backstage/config": "^1.0.0",
|
|
37
|
+
"@backstage/backend-common": "^0.13.3-next.2",
|
|
38
|
+
"@backstage/catalog-client": "^1.0.2-next.0",
|
|
39
|
+
"@backstage/catalog-model": "^1.0.2-next.0",
|
|
40
|
+
"@backstage/config": "^1.0.1-next.0",
|
|
41
41
|
"@backstage/errors": "^1.0.0",
|
|
42
|
-
"@backstage/integration": "^1.2.0-next.
|
|
43
|
-
"@backstage/plugin-catalog-backend": "^1.1.2-next.
|
|
44
|
-
"@backstage/plugin-scaffolder-common": "^1.0.
|
|
42
|
+
"@backstage/integration": "^1.2.0-next.1",
|
|
43
|
+
"@backstage/plugin-catalog-backend": "^1.1.2-next.2",
|
|
44
|
+
"@backstage/plugin-scaffolder-common": "^1.1.0-next.0",
|
|
45
45
|
"@backstage/types": "^1.0.0",
|
|
46
46
|
"@gitbeaker/core": "^35.6.0",
|
|
47
47
|
"@gitbeaker/node": "^35.1.0",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"zen-observable": "^0.8.15"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@backstage/backend-test-utils": "^0.1.24-next.
|
|
78
|
-
"@backstage/cli": "^0.17.1-next.
|
|
77
|
+
"@backstage/backend-test-utils": "^0.1.24-next.1",
|
|
78
|
+
"@backstage/cli": "^0.17.1-next.2",
|
|
79
79
|
"@types/command-exists": "^1.2.0",
|
|
80
80
|
"@types/fs-extra": "^9.0.1",
|
|
81
81
|
"@types/git-url-parse": "^9.0.0",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"assets"
|
|
98
98
|
],
|
|
99
99
|
"configSchema": "config.d.ts",
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "cfbf5762d7d91eee18999306b21d63840400ee29"
|
|
101
101
|
}
|