@backstage/plugin-scaffolder-backend 1.33.1-next.0 → 2.0.0-next.2
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 +171 -0
- package/dist/ScaffolderPlugin.cjs.js +7 -19
- package/dist/ScaffolderPlugin.cjs.js.map +1 -1
- package/dist/alpha.cjs.js +5 -9
- package/dist/alpha.cjs.js.map +1 -1
- package/dist/alpha.d.ts +1 -5
- package/dist/index.cjs.js +0 -28
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +120 -450
- package/dist/lib/templating/SecureTemplater.cjs.js.map +1 -1
- package/dist/scaffolder/actions/TemplateActionRegistry.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/catalog/fetch.cjs.js +5 -11
- package/dist/scaffolder/actions/builtin/catalog/fetch.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/catalog/register.cjs.js +26 -62
- package/dist/scaffolder/actions/builtin/catalog/register.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/catalog/write.cjs.js +4 -5
- package/dist/scaffolder/actions/builtin/catalog/write.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/debug/log.cjs.js +4 -5
- package/dist/scaffolder/actions/builtin/debug/log.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/debug/wait.cjs.js +9 -15
- package/dist/scaffolder/actions/builtin/debug/wait.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/fetch/plain.cjs.js +9 -19
- package/dist/scaffolder/actions/builtin/fetch/plain.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/fetch/plainFile.cjs.js +9 -19
- package/dist/scaffolder/actions/builtin/fetch/plainFile.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/fetch/template.cjs.js +33 -55
- package/dist/scaffolder/actions/builtin/fetch/template.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/fetch/templateActionHandler.cjs.js +4 -19
- package/dist/scaffolder/actions/builtin/fetch/templateActionHandler.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/fetch/templateFile.cjs.js +24 -34
- package/dist/scaffolder/actions/builtin/fetch/templateFile.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/filesystem/delete.cjs.js +3 -12
- package/dist/scaffolder/actions/builtin/filesystem/delete.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/filesystem/read.cjs.js +14 -14
- package/dist/scaffolder/actions/builtin/filesystem/read.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/filesystem/rename.cjs.js +16 -27
- package/dist/scaffolder/actions/builtin/filesystem/rename.cjs.js.map +1 -1
- package/dist/scaffolder/dryrun/DecoratedActionsRegistry.cjs.js +2 -11
- package/dist/scaffolder/dryrun/DecoratedActionsRegistry.cjs.js.map +1 -1
- package/dist/scaffolder/dryrun/createDryRunner.cjs.js.map +1 -1
- package/dist/scaffolder/tasks/DatabaseTaskStore.cjs.js.map +1 -1
- package/dist/scaffolder/tasks/NunjucksWorkflowRunner.cjs.js +8 -15
- package/dist/scaffolder/tasks/NunjucksWorkflowRunner.cjs.js.map +1 -1
- package/dist/scaffolder/tasks/StorageTaskBroker.cjs.js.map +1 -1
- package/dist/scaffolder/tasks/TaskWorker.cjs.js.map +1 -1
- package/dist/service/{conditionExports.cjs.js → alpha.cjs.js} +1 -1
- package/dist/service/alpha.cjs.js.map +1 -0
- package/dist/service/helpers.cjs.js +4 -2
- package/dist/service/helpers.cjs.js.map +1 -1
- package/dist/service/permissions.cjs.js +14 -0
- package/dist/service/permissions.cjs.js.map +1 -0
- package/dist/service/router.cjs.js +48 -140
- package/dist/service/router.cjs.js.map +1 -1
- package/dist/service/rules.cjs.js +11 -11
- package/dist/service/rules.cjs.js.map +1 -1
- package/dist/util/templating.cjs.js +3 -3
- package/dist/util/templating.cjs.js.map +1 -1
- package/package.json +24 -27
- package/dist/deprecated.cjs.js +0 -15
- package/dist/deprecated.cjs.js.map +0 -1
- package/dist/scaffolder/actions/builtin/createBuiltinActions.cjs.js +0 -158
- package/dist/scaffolder/actions/builtin/createBuiltinActions.cjs.js.map +0 -1
- package/dist/scaffolder/actions/deprecated.cjs.js +0 -48
- package/dist/scaffolder/actions/deprecated.cjs.js.map +0 -1
- package/dist/service/conditionExports.cjs.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,33 +1,20 @@
|
|
|
1
1
|
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
|
-
import {
|
|
2
|
+
import { UrlReaderService, DatabaseService, LoggerService, AuthService, BackstageCredentials, AuditorService } from '@backstage/backend-plugin-api';
|
|
3
3
|
import * as _backstage_plugin_scaffolder_node from '@backstage/plugin-scaffolder-node';
|
|
4
|
-
import { TemplateFilter
|
|
5
|
-
import * as _backstage_types from '@backstage/types';
|
|
6
|
-
import { HumanDuration, JsonObject, JsonValue } from '@backstage/types';
|
|
7
|
-
import * as _backstage_integration from '@backstage/integration';
|
|
4
|
+
import { TemplateFilter, TemplateGlobal, TemplateAction, TaskSecrets, SerializedTask, TaskStatus, SerializedTaskEvent, TaskContext, TaskCompletionState, TaskBroker } from '@backstage/plugin-scaffolder-node';
|
|
8
5
|
import { ScmIntegrations } from '@backstage/integration';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
6
|
+
import { CatalogService } from '@backstage/plugin-catalog-node';
|
|
7
|
+
import { HumanDuration, JsonObject, JsonValue } from '@backstage/types';
|
|
11
8
|
import { Duration } from 'luxon';
|
|
12
|
-
import { createGithubActionsDispatchAction as createGithubActionsDispatchAction$1, createGithubDeployKeyAction as createGithubDeployKeyAction$1, createGithubEnvironmentAction as createGithubEnvironmentAction$1, createGithubIssuesLabelAction as createGithubIssuesLabelAction$1, CreateGithubPullRequestActionOptions as CreateGithubPullRequestActionOptions$1, createGithubRepoCreateAction as createGithubRepoCreateAction$1, createGithubRepoPushAction as createGithubRepoPushAction$1, createGithubWebhookAction as createGithubWebhookAction$1, createPublishGithubAction as createPublishGithubAction$1 } from '@backstage/plugin-scaffolder-backend-module-github';
|
|
13
|
-
import { createPublishGitlabAction as createPublishGitlabAction$1 } from '@backstage/plugin-scaffolder-backend-module-gitlab';
|
|
14
|
-
import { createPublishAzureAction as createPublishAzureAction$1 } from '@backstage/plugin-scaffolder-backend-module-azure';
|
|
15
|
-
import { createPublishBitbucketAction as createPublishBitbucketAction$1 } from '@backstage/plugin-scaffolder-backend-module-bitbucket';
|
|
16
|
-
import { createPublishBitbucketCloudAction as createPublishBitbucketCloudAction$1 } from '@backstage/plugin-scaffolder-backend-module-bitbucket-cloud';
|
|
17
|
-
import { createPublishBitbucketServerAction as createPublishBitbucketServerAction$1, createPublishBitbucketServerPullRequestAction as createPublishBitbucketServerPullRequestAction$1 } from '@backstage/plugin-scaffolder-backend-module-bitbucket-server';
|
|
18
|
-
import { createPublishGerritAction as createPublishGerritAction$1, createPublishGerritReviewAction as createPublishGerritReviewAction$1 } from '@backstage/plugin-scaffolder-backend-module-gerrit';
|
|
19
9
|
import { Knex } from 'knex';
|
|
20
10
|
import * as _backstage_plugin_scaffolder_common from '@backstage/plugin-scaffolder-common';
|
|
21
11
|
import { TaskSpec, TaskRecovery, TemplateEntityStepV1beta3, TemplateParametersV1beta3 } from '@backstage/plugin-scaffolder-common';
|
|
22
12
|
import { EventsService } from '@backstage/plugin-events-node';
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
13
|
+
import { Config } from '@backstage/config';
|
|
14
|
+
import { WorkspaceProvider } from '@backstage/plugin-scaffolder-node/alpha';
|
|
25
15
|
import { PermissionEvaluator, PermissionRuleParams } from '@backstage/plugin-permission-common';
|
|
26
|
-
import { IdentityApi } from '@backstage/plugin-auth-node';
|
|
27
16
|
import { PermissionRule } from '@backstage/plugin-permission-node';
|
|
28
17
|
import { RESOURCE_TYPE_SCAFFOLDER_TEMPLATE, RESOURCE_TYPE_SCAFFOLDER_ACTION } from '@backstage/plugin-scaffolder-common/alpha';
|
|
29
|
-
import express from 'express';
|
|
30
|
-
import { ScaffolderEntitiesProcessor as ScaffolderEntitiesProcessor$1 } from '@backstage/plugin-catalog-backend-module-scaffolder-entity-model';
|
|
31
18
|
|
|
32
19
|
/**
|
|
33
20
|
* Scaffolder plugin
|
|
@@ -41,17 +28,25 @@ declare const scaffolderPlugin: _backstage_backend_plugin_api.BackendFeature;
|
|
|
41
28
|
* @public
|
|
42
29
|
*/
|
|
43
30
|
declare function createCatalogRegisterAction(options: {
|
|
44
|
-
|
|
31
|
+
catalog: CatalogService;
|
|
45
32
|
integrations: ScmIntegrations;
|
|
46
|
-
auth?: AuthService;
|
|
47
33
|
}): _backstage_plugin_scaffolder_node.TemplateAction<{
|
|
48
34
|
catalogInfoUrl: string;
|
|
49
|
-
optional?: boolean;
|
|
35
|
+
optional?: boolean | undefined;
|
|
36
|
+
} | {
|
|
37
|
+
catalogInfoUrl: string;
|
|
38
|
+
optional?: boolean | undefined;
|
|
39
|
+
catalogInfoPath?: string | undefined;
|
|
50
40
|
} | {
|
|
51
41
|
repoContentsUrl: string;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
42
|
+
optional?: boolean | undefined;
|
|
43
|
+
} | {
|
|
44
|
+
repoContentsUrl: string;
|
|
45
|
+
optional?: boolean | undefined;
|
|
46
|
+
catalogInfoPath?: string | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
[x: string]: any;
|
|
49
|
+
}, "v2">;
|
|
55
50
|
|
|
56
51
|
/**
|
|
57
52
|
* Writes a catalog descriptor file containing the provided entity to a path in the workspace.
|
|
@@ -60,7 +55,9 @@ declare function createCatalogRegisterAction(options: {
|
|
|
60
55
|
declare function createCatalogWriteAction(): _backstage_plugin_scaffolder_node.TemplateAction<{
|
|
61
56
|
entity: Record<string, any>;
|
|
62
57
|
filePath?: string | undefined;
|
|
63
|
-
},
|
|
58
|
+
}, {
|
|
59
|
+
[x: string]: any;
|
|
60
|
+
}, "v2">;
|
|
64
61
|
|
|
65
62
|
/**
|
|
66
63
|
* Returns entity or entities from the catalog by entity reference(s).
|
|
@@ -68,8 +65,7 @@ declare function createCatalogWriteAction(): _backstage_plugin_scaffolder_node.T
|
|
|
68
65
|
* @public
|
|
69
66
|
*/
|
|
70
67
|
declare function createFetchCatalogEntityAction(options: {
|
|
71
|
-
|
|
72
|
-
auth?: AuthService;
|
|
68
|
+
catalog: CatalogService;
|
|
73
69
|
}): _backstage_plugin_scaffolder_node.TemplateAction<{
|
|
74
70
|
entityRef?: string | undefined;
|
|
75
71
|
entityRefs?: string[] | undefined;
|
|
@@ -81,50 +77,6 @@ declare function createFetchCatalogEntityAction(options: {
|
|
|
81
77
|
entities?: any[] | undefined;
|
|
82
78
|
}, "v2">;
|
|
83
79
|
|
|
84
|
-
/**
|
|
85
|
-
* The options passed to {@link createBuiltinActions}
|
|
86
|
-
* @public
|
|
87
|
-
*/
|
|
88
|
-
interface CreateBuiltInActionsOptions {
|
|
89
|
-
/**
|
|
90
|
-
* The {@link @backstage/backend-plugin-api#UrlReaderService} interface that will be used in the default actions.
|
|
91
|
-
*/
|
|
92
|
-
reader: UrlReaderService;
|
|
93
|
-
/**
|
|
94
|
-
* The {@link @backstage/integrations#ScmIntegrations} that will be used in the default actions.
|
|
95
|
-
*/
|
|
96
|
-
integrations: ScmIntegrations;
|
|
97
|
-
/**
|
|
98
|
-
* The {@link @backstage/catalog-client#CatalogApi} that will be used in the default actions.
|
|
99
|
-
*/
|
|
100
|
-
catalogClient: CatalogApi;
|
|
101
|
-
/**
|
|
102
|
-
* The {@link @backstage/backend-plugin-api#AuthService} that will be used in the default actions.
|
|
103
|
-
*/
|
|
104
|
-
auth?: AuthService;
|
|
105
|
-
/**
|
|
106
|
-
* The {@link @backstage/config#Config} that will be used in the default actions.
|
|
107
|
-
*/
|
|
108
|
-
config: Config;
|
|
109
|
-
/**
|
|
110
|
-
* Additional custom filters that will be passed to the nunjucks template engine for use in
|
|
111
|
-
* Template Manifests and also template skeleton files when using `fetch:template`.
|
|
112
|
-
*/
|
|
113
|
-
additionalTemplateFilters?: Record<string, TemplateFilter$1>;
|
|
114
|
-
additionalTemplateGlobals?: Record<string, TemplateGlobal$1>;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* A function to generate create a list of default actions that the scaffolder provides.
|
|
118
|
-
* Is called internally in the default setup, but can be used when adding your own actions or overriding the default ones
|
|
119
|
-
*
|
|
120
|
-
* TODO(blam): version 2 of the scaffolder shouldn't ship with the additional modules. We should ship the basics, and let people install
|
|
121
|
-
* modules for the providers they want to use.
|
|
122
|
-
* @public
|
|
123
|
-
* @returns A list of actions that can be used in the scaffolder
|
|
124
|
-
*
|
|
125
|
-
*/
|
|
126
|
-
declare const createBuiltinActions: (options: CreateBuiltInActionsOptions) => TemplateAction$1[];
|
|
127
|
-
|
|
128
80
|
/**
|
|
129
81
|
* Writes a message into the log or lists all files in the workspace
|
|
130
82
|
*
|
|
@@ -135,7 +87,12 @@ declare const createBuiltinActions: (options: CreateBuiltInActionsOptions) => Te
|
|
|
135
87
|
*
|
|
136
88
|
* @public
|
|
137
89
|
*/
|
|
138
|
-
declare function createDebugLogAction(): _backstage_plugin_scaffolder_node.TemplateAction<
|
|
90
|
+
declare function createDebugLogAction(): _backstage_plugin_scaffolder_node.TemplateAction<{
|
|
91
|
+
message?: string | undefined;
|
|
92
|
+
listWorkspace?: boolean | "with-contents" | "with-filenames" | undefined;
|
|
93
|
+
}, {
|
|
94
|
+
[x: string]: any;
|
|
95
|
+
}, "v2">;
|
|
139
96
|
|
|
140
97
|
/**
|
|
141
98
|
* Waits for a certain period of time.
|
|
@@ -149,7 +106,13 @@ declare function createDebugLogAction(): _backstage_plugin_scaffolder_node.Templ
|
|
|
149
106
|
*/
|
|
150
107
|
declare function createWaitAction(options?: {
|
|
151
108
|
maxWaitTime?: Duration | HumanDuration;
|
|
152
|
-
}): _backstage_plugin_scaffolder_node.TemplateAction<
|
|
109
|
+
}): _backstage_plugin_scaffolder_node.TemplateAction<{
|
|
110
|
+
minutes?: number | undefined;
|
|
111
|
+
seconds?: number | undefined;
|
|
112
|
+
milliseconds?: number | undefined;
|
|
113
|
+
}, {
|
|
114
|
+
[x: string]: any;
|
|
115
|
+
}, "v2">;
|
|
153
116
|
|
|
154
117
|
/**
|
|
155
118
|
* Downloads content and places it in the workspace, or optionally
|
|
@@ -161,13 +124,14 @@ declare function createFetchPlainAction(options: {
|
|
|
161
124
|
integrations: ScmIntegrations;
|
|
162
125
|
}): _backstage_plugin_scaffolder_node.TemplateAction<{
|
|
163
126
|
url: string;
|
|
164
|
-
targetPath?: string;
|
|
165
|
-
token?: string;
|
|
166
|
-
},
|
|
127
|
+
targetPath?: string | undefined;
|
|
128
|
+
token?: string | undefined;
|
|
129
|
+
}, {
|
|
130
|
+
[x: string]: any;
|
|
131
|
+
}, "v2">;
|
|
167
132
|
|
|
168
133
|
/**
|
|
169
|
-
* Downloads
|
|
170
|
-
* in a subdirectory specified by the 'targetPath' input option.
|
|
134
|
+
* Downloads a single file and places it in the workspace.
|
|
171
135
|
* @public
|
|
172
136
|
*/
|
|
173
137
|
declare function createFetchPlainFileAction(options: {
|
|
@@ -176,8 +140,10 @@ declare function createFetchPlainFileAction(options: {
|
|
|
176
140
|
}): _backstage_plugin_scaffolder_node.TemplateAction<{
|
|
177
141
|
url: string;
|
|
178
142
|
targetPath: string;
|
|
179
|
-
token?: string;
|
|
180
|
-
},
|
|
143
|
+
token?: string | undefined;
|
|
144
|
+
}, {
|
|
145
|
+
[x: string]: any;
|
|
146
|
+
}, "v2">;
|
|
181
147
|
|
|
182
148
|
/**
|
|
183
149
|
* Downloads a skeleton, templates variables into file and directory names and content.
|
|
@@ -189,24 +155,23 @@ declare function createFetchPlainFileAction(options: {
|
|
|
189
155
|
declare function createFetchTemplateAction(options: {
|
|
190
156
|
reader: UrlReaderService;
|
|
191
157
|
integrations: ScmIntegrations;
|
|
192
|
-
additionalTemplateFilters?: Record<string, TemplateFilter
|
|
193
|
-
additionalTemplateGlobals?: Record<string, TemplateGlobal
|
|
158
|
+
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
|
159
|
+
additionalTemplateGlobals?: Record<string, TemplateGlobal>;
|
|
194
160
|
}): _backstage_plugin_scaffolder_node.TemplateAction<{
|
|
195
161
|
url: string;
|
|
196
|
-
targetPath?: string;
|
|
197
|
-
values
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}, _backstage_types.JsonObject, "v1">;
|
|
162
|
+
targetPath?: string | undefined;
|
|
163
|
+
values?: Record<string, any> | undefined;
|
|
164
|
+
copyWithoutRender?: string[] | undefined;
|
|
165
|
+
copyWithoutTemplating?: string[] | undefined;
|
|
166
|
+
cookiecutterCompat?: boolean | undefined;
|
|
167
|
+
templateFileExtension?: string | boolean | undefined;
|
|
168
|
+
replace?: boolean | undefined;
|
|
169
|
+
trimBlocks?: boolean | undefined;
|
|
170
|
+
lstripBlocks?: boolean | undefined;
|
|
171
|
+
token?: string | undefined;
|
|
172
|
+
}, {
|
|
173
|
+
[x: string]: any;
|
|
174
|
+
}, "v2">;
|
|
210
175
|
|
|
211
176
|
/**
|
|
212
177
|
* Downloads a single file and templates variables into file.
|
|
@@ -217,18 +182,20 @@ declare function createFetchTemplateAction(options: {
|
|
|
217
182
|
declare function createFetchTemplateFileAction(options: {
|
|
218
183
|
reader: UrlReaderService;
|
|
219
184
|
integrations: ScmIntegrations;
|
|
220
|
-
additionalTemplateFilters?: Record<string, TemplateFilter
|
|
221
|
-
additionalTemplateGlobals?: Record<string, TemplateGlobal
|
|
185
|
+
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
|
186
|
+
additionalTemplateGlobals?: Record<string, TemplateGlobal>;
|
|
222
187
|
}): _backstage_plugin_scaffolder_node.TemplateAction<{
|
|
223
188
|
url: string;
|
|
224
189
|
targetPath: string;
|
|
225
|
-
values
|
|
226
|
-
cookiecutterCompat?: boolean;
|
|
227
|
-
replace?: boolean;
|
|
228
|
-
trimBlocks?: boolean;
|
|
229
|
-
lstripBlocks?: boolean;
|
|
230
|
-
token?: string;
|
|
231
|
-
},
|
|
190
|
+
values?: Record<string, any> | undefined;
|
|
191
|
+
cookiecutterCompat?: boolean | undefined;
|
|
192
|
+
replace?: boolean | undefined;
|
|
193
|
+
trimBlocks?: boolean | undefined;
|
|
194
|
+
lstripBlocks?: boolean | undefined;
|
|
195
|
+
token?: string | undefined;
|
|
196
|
+
}, {
|
|
197
|
+
[x: string]: any;
|
|
198
|
+
}, "v2">;
|
|
232
199
|
|
|
233
200
|
/**
|
|
234
201
|
* Creates new action that enables deletion of files and directories in the workspace.
|
|
@@ -236,27 +203,31 @@ declare function createFetchTemplateFileAction(options: {
|
|
|
236
203
|
*/
|
|
237
204
|
declare const createFilesystemDeleteAction: () => _backstage_plugin_scaffolder_node.TemplateAction<{
|
|
238
205
|
files: string[];
|
|
239
|
-
},
|
|
206
|
+
}, {
|
|
207
|
+
[x: string]: any;
|
|
208
|
+
}, "v2">;
|
|
240
209
|
|
|
241
210
|
/**
|
|
242
211
|
* Creates a new action that allows renames of files and directories in the workspace.
|
|
243
212
|
* @public
|
|
244
213
|
*/
|
|
245
214
|
declare const createFilesystemRenameAction: () => _backstage_plugin_scaffolder_node.TemplateAction<{
|
|
246
|
-
files:
|
|
215
|
+
files: {
|
|
247
216
|
from: string;
|
|
248
217
|
to: string;
|
|
249
|
-
overwrite?: boolean;
|
|
250
|
-
}
|
|
251
|
-
},
|
|
218
|
+
overwrite?: boolean | undefined;
|
|
219
|
+
}[];
|
|
220
|
+
}, {
|
|
221
|
+
[x: string]: any;
|
|
222
|
+
}, "v2">;
|
|
252
223
|
|
|
253
224
|
/**
|
|
254
225
|
* Creates new action that enables reading directories in the workspace.
|
|
255
226
|
* @public
|
|
256
227
|
*/
|
|
257
228
|
declare const createFilesystemReadDirAction: () => _backstage_plugin_scaffolder_node.TemplateAction<{
|
|
258
|
-
recursive: boolean;
|
|
259
229
|
paths: string[];
|
|
230
|
+
recursive: boolean;
|
|
260
231
|
}, {
|
|
261
232
|
files: {
|
|
262
233
|
name: string;
|
|
@@ -268,225 +239,25 @@ declare const createFilesystemReadDirAction: () => _backstage_plugin_scaffolder_
|
|
|
268
239
|
path: string;
|
|
269
240
|
fullPath: string;
|
|
270
241
|
}[];
|
|
271
|
-
}, "v1">;
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* @public
|
|
275
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead
|
|
276
|
-
*/
|
|
277
|
-
declare const createGithubActionsDispatchAction: typeof createGithubActionsDispatchAction$1;
|
|
278
|
-
/**
|
|
279
|
-
* @public
|
|
280
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead
|
|
281
|
-
*/
|
|
282
|
-
declare const createGithubDeployKeyAction: typeof createGithubDeployKeyAction$1;
|
|
283
|
-
/**
|
|
284
|
-
* @public
|
|
285
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead
|
|
286
|
-
*/
|
|
287
|
-
declare const createGithubEnvironmentAction: typeof createGithubEnvironmentAction$1;
|
|
288
|
-
/**
|
|
289
|
-
* @public
|
|
290
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead
|
|
291
|
-
*/
|
|
292
|
-
declare const createGithubIssuesLabelAction: typeof createGithubIssuesLabelAction$1;
|
|
293
|
-
/**
|
|
294
|
-
* @public
|
|
295
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead
|
|
296
|
-
*/
|
|
297
|
-
type CreateGithubPullRequestActionOptions = CreateGithubPullRequestActionOptions$1;
|
|
298
|
-
/**
|
|
299
|
-
* @public
|
|
300
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead
|
|
301
|
-
*/
|
|
302
|
-
declare const createGithubRepoCreateAction: typeof createGithubRepoCreateAction$1;
|
|
303
|
-
/**
|
|
304
|
-
* @public
|
|
305
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead
|
|
306
|
-
*/
|
|
307
|
-
declare const createGithubRepoPushAction: typeof createGithubRepoPushAction$1;
|
|
308
|
-
/**
|
|
309
|
-
* @public
|
|
310
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead
|
|
311
|
-
*/
|
|
312
|
-
declare const createGithubWebhookAction: typeof createGithubWebhookAction$1;
|
|
313
|
-
/**
|
|
314
|
-
* @public
|
|
315
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead
|
|
316
|
-
*/
|
|
317
|
-
declare const createPublishGithubAction: typeof createPublishGithubAction$1;
|
|
318
|
-
/**
|
|
319
|
-
* @public
|
|
320
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead
|
|
321
|
-
*/
|
|
322
|
-
declare const createPublishGithubPullRequestAction: (options: CreateGithubPullRequestActionOptions$1) => _backstage_plugin_scaffolder_node.TemplateAction<{
|
|
323
|
-
title: string;
|
|
324
|
-
branchName: string;
|
|
325
|
-
targetBranchName?: string;
|
|
326
|
-
description: string;
|
|
327
|
-
repoUrl: string;
|
|
328
|
-
draft?: boolean;
|
|
329
|
-
targetPath?: string;
|
|
330
|
-
sourcePath?: string;
|
|
331
|
-
token?: string;
|
|
332
|
-
reviewers?: string[];
|
|
333
|
-
assignees?: string[];
|
|
334
|
-
teamReviewers?: string[];
|
|
335
|
-
commitMessage?: string;
|
|
336
|
-
update?: boolean;
|
|
337
|
-
forceFork?: boolean;
|
|
338
|
-
gitAuthorName?: string;
|
|
339
|
-
gitAuthorEmail?: string;
|
|
340
|
-
forceEmptyGitAuthor?: boolean;
|
|
341
|
-
createWhenEmpty?: boolean;
|
|
342
|
-
}, _backstage_types.JsonObject, "v1">;
|
|
343
|
-
/**
|
|
344
|
-
* @public @deprecated use "createPublishBitbucketCloudAction" from \@backstage/plugin-scaffolder-backend-module-bitbucket-cloud or "createPublishBitbucketServerAction" from \@backstage/plugin-scaffolder-backend-module-bitbucket-server instead
|
|
345
|
-
*/
|
|
346
|
-
declare const createPublishBitbucketAction: typeof createPublishBitbucketAction$1;
|
|
347
|
-
/**
|
|
348
|
-
* @public
|
|
349
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-bitbucket-cloud` instead
|
|
350
|
-
*/
|
|
351
|
-
declare const createPublishBitbucketCloudAction: typeof createPublishBitbucketCloudAction$1;
|
|
352
|
-
/**
|
|
353
|
-
* @public
|
|
354
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-bitbucket-server` instead
|
|
355
|
-
*/
|
|
356
|
-
declare const createPublishBitbucketServerAction: typeof createPublishBitbucketServerAction$1;
|
|
357
|
-
/**
|
|
358
|
-
* @public
|
|
359
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-bitbucket-server` instead
|
|
360
|
-
*/
|
|
361
|
-
declare const createPublishBitbucketServerPullRequestAction: typeof createPublishBitbucketServerPullRequestAction$1;
|
|
362
|
-
/**
|
|
363
|
-
* @public
|
|
364
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-azure` instead
|
|
365
|
-
*/
|
|
366
|
-
declare const createPublishAzureAction: typeof createPublishAzureAction$1;
|
|
367
|
-
/**
|
|
368
|
-
* @public
|
|
369
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-gerrit` instead
|
|
370
|
-
*/
|
|
371
|
-
declare const createPublishGerritAction: typeof createPublishGerritAction$1;
|
|
372
|
-
/**
|
|
373
|
-
* @public
|
|
374
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-gerrit` instead
|
|
375
|
-
*/
|
|
376
|
-
declare const createPublishGerritReviewAction: typeof createPublishGerritReviewAction$1;
|
|
377
|
-
/**
|
|
378
|
-
* @public
|
|
379
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-gitlab` instead
|
|
380
|
-
*/
|
|
381
|
-
declare const createPublishGitlabAction: typeof createPublishGitlabAction$1;
|
|
382
|
-
/**
|
|
383
|
-
* @public
|
|
384
|
-
* @deprecated use import from `@backstage/plugin-scaffolder-backend-module-gitlab` instead
|
|
385
|
-
*/
|
|
386
|
-
declare const createPublishGitlabMergeRequestAction: (options: {
|
|
387
|
-
integrations: _backstage_integration.ScmIntegrationRegistry;
|
|
388
|
-
}) => _backstage_plugin_scaffolder_node.TemplateAction<{
|
|
389
|
-
repoUrl: string;
|
|
390
|
-
title: string;
|
|
391
|
-
description: string;
|
|
392
|
-
branchName: string;
|
|
393
|
-
targetBranchName?: string | undefined;
|
|
394
|
-
sourcePath?: string | undefined;
|
|
395
|
-
targetPath?: string | undefined;
|
|
396
|
-
token?: string | undefined;
|
|
397
|
-
commitAction?: "auto" | "update" | "delete" | "create" | "skip" | undefined;
|
|
398
|
-
projectid?: string | undefined;
|
|
399
|
-
removeSourceBranch?: boolean | undefined;
|
|
400
|
-
assignee?: string | undefined;
|
|
401
|
-
reviewers?: string[] | undefined;
|
|
402
|
-
assignReviewersFromApprovalRules?: boolean | undefined;
|
|
403
|
-
labels?: string | string[] | undefined;
|
|
404
|
-
}, {
|
|
405
|
-
targetBranchName: string;
|
|
406
|
-
projectid: string;
|
|
407
|
-
projectPath: string;
|
|
408
|
-
mergeRequestUrl: string;
|
|
409
242
|
}, "v2">;
|
|
410
243
|
|
|
411
244
|
/**
|
|
412
245
|
* Registry of all registered template actions.
|
|
413
246
|
* @public
|
|
247
|
+
* @deprecated this type is deprecated, and there will be a new way to create Workers in the next major version.
|
|
414
248
|
*/
|
|
415
249
|
declare class TemplateActionRegistry {
|
|
416
250
|
private readonly actions;
|
|
417
|
-
register(action: TemplateAction
|
|
418
|
-
get(actionId: string): TemplateAction
|
|
419
|
-
list(): TemplateAction
|
|
251
|
+
register(action: TemplateAction<any, any, any>): void;
|
|
252
|
+
get(actionId: string): TemplateAction<any, any, any>;
|
|
253
|
+
list(): TemplateAction<any, any, any>[];
|
|
420
254
|
}
|
|
421
255
|
|
|
422
|
-
/**
|
|
423
|
-
* The status of each step of the Task
|
|
424
|
-
*
|
|
425
|
-
* @public
|
|
426
|
-
* @deprecated Import from `@backstage/plugin-scaffolder-node` instead.
|
|
427
|
-
*/
|
|
428
|
-
type TaskStatus = TaskStatus$1;
|
|
429
|
-
/**
|
|
430
|
-
* The state of a completed task.
|
|
431
|
-
*
|
|
432
|
-
* @public
|
|
433
|
-
* @deprecated Import from `@backstage/plugin-scaffolder-node` instead.
|
|
434
|
-
*/
|
|
435
|
-
type TaskCompletionState = TaskCompletionState$1;
|
|
436
|
-
/**
|
|
437
|
-
* SerializedTask
|
|
438
|
-
*
|
|
439
|
-
* @public
|
|
440
|
-
* @deprecated Import from `@backstage/plugin-scaffolder-node` instead.
|
|
441
|
-
*/
|
|
442
|
-
type SerializedTask = SerializedTask$1;
|
|
443
|
-
/**
|
|
444
|
-
* TaskEventType
|
|
445
|
-
*
|
|
446
|
-
* @public
|
|
447
|
-
* @deprecated Import from `@backstage/plugin-scaffolder-node` instead.
|
|
448
|
-
*/
|
|
449
|
-
type TaskEventType = TaskEventType$1;
|
|
450
|
-
/**
|
|
451
|
-
* SerializedTaskEvent
|
|
452
|
-
*
|
|
453
|
-
* @public
|
|
454
|
-
* @deprecated Import from `@backstage/plugin-scaffolder-node` instead.
|
|
455
|
-
*/
|
|
456
|
-
type SerializedTaskEvent = SerializedTaskEvent$1;
|
|
457
|
-
/**
|
|
458
|
-
* The result of `TaskBroker.dispatch`.
|
|
459
|
-
*
|
|
460
|
-
* @public
|
|
461
|
-
* @deprecated Import from `@backstage/plugin-scaffolder-node` instead.
|
|
462
|
-
*/
|
|
463
|
-
type TaskBrokerDispatchResult = TaskBrokerDispatchResult$1;
|
|
464
|
-
/**
|
|
465
|
-
* The options passed to `TaskBroker.dispatch`.
|
|
466
|
-
* Currently a spec and optional secrets
|
|
467
|
-
*
|
|
468
|
-
* @public
|
|
469
|
-
* @deprecated Import from `@backstage/plugin-scaffolder-node` instead.
|
|
470
|
-
*/
|
|
471
|
-
type TaskBrokerDispatchOptions = TaskBrokerDispatchOptions$1;
|
|
472
|
-
/**
|
|
473
|
-
* Task
|
|
474
|
-
*
|
|
475
|
-
* @public
|
|
476
|
-
* @deprecated Import from `@backstage/plugin-scaffolder-node` instead.
|
|
477
|
-
*/
|
|
478
|
-
type TaskContext = TaskContext$1;
|
|
479
|
-
/**
|
|
480
|
-
* TaskBroker
|
|
481
|
-
*
|
|
482
|
-
* @public
|
|
483
|
-
* @deprecated Import from `@backstage/plugin-scaffolder-node` instead.
|
|
484
|
-
*/
|
|
485
|
-
type TaskBroker = TaskBroker$1;
|
|
486
256
|
/**
|
|
487
257
|
* TaskStoreEmitOptions
|
|
488
258
|
*
|
|
489
259
|
* @public
|
|
260
|
+
* @deprecated this type is deprecated, and there will be a new way to create Workers in the next major version.
|
|
490
261
|
*/
|
|
491
262
|
type TaskStoreEmitOptions<TBody = JsonObject> = {
|
|
492
263
|
taskId: string;
|
|
@@ -496,6 +267,7 @@ type TaskStoreEmitOptions<TBody = JsonObject> = {
|
|
|
496
267
|
* TaskStoreListEventsOptions
|
|
497
268
|
*
|
|
498
269
|
* @public
|
|
270
|
+
* @deprecated this type is deprecated, and there will be a new way to create Workers in the next major version.
|
|
499
271
|
*/
|
|
500
272
|
type TaskStoreListEventsOptions = {
|
|
501
273
|
isTaskRecoverable?: boolean;
|
|
@@ -506,6 +278,7 @@ type TaskStoreListEventsOptions = {
|
|
|
506
278
|
* TaskStoreShutDownTaskOptions
|
|
507
279
|
*
|
|
508
280
|
* @public
|
|
281
|
+
* @deprecated this type is deprecated, and there will be a new way to create Workers in the next major version.
|
|
509
282
|
*/
|
|
510
283
|
type TaskStoreShutDownTaskOptions = {
|
|
511
284
|
taskId: string;
|
|
@@ -513,15 +286,17 @@ type TaskStoreShutDownTaskOptions = {
|
|
|
513
286
|
/**
|
|
514
287
|
* The options passed to {@link TaskStore.createTask}
|
|
515
288
|
* @public
|
|
289
|
+
* @deprecated this type is deprecated, and there will be a new way to create Workers in the next major version.
|
|
516
290
|
*/
|
|
517
291
|
type TaskStoreCreateTaskOptions = {
|
|
518
292
|
spec: TaskSpec;
|
|
519
293
|
createdBy?: string;
|
|
520
|
-
secrets?: TaskSecrets
|
|
294
|
+
secrets?: TaskSecrets;
|
|
521
295
|
};
|
|
522
296
|
/**
|
|
523
297
|
* The options passed to {@link TaskStore.recoverTasks}
|
|
524
298
|
* @public
|
|
299
|
+
* @deprecated this type is deprecated, and there will be a new way to create Workers in the next major version.
|
|
525
300
|
*/
|
|
526
301
|
type TaskStoreRecoverTaskOptions = {
|
|
527
302
|
timeout: HumanDuration;
|
|
@@ -529,6 +304,7 @@ type TaskStoreRecoverTaskOptions = {
|
|
|
529
304
|
/**
|
|
530
305
|
* The response from {@link TaskStore.createTask}
|
|
531
306
|
* @public
|
|
307
|
+
* @deprecated this type is deprecated, and there will be a new way to create Workers in the next major version.
|
|
532
308
|
*/
|
|
533
309
|
type TaskStoreCreateTaskResult = {
|
|
534
310
|
taskId: string;
|
|
@@ -537,12 +313,13 @@ type TaskStoreCreateTaskResult = {
|
|
|
537
313
|
* TaskStore
|
|
538
314
|
*
|
|
539
315
|
* @public
|
|
316
|
+
* @deprecated this type is deprecated, and there will be a new way to create Workers in the next major version.
|
|
540
317
|
*/
|
|
541
318
|
interface TaskStore {
|
|
542
319
|
cancelTask?(options: TaskStoreEmitOptions): Promise<void>;
|
|
543
320
|
createTask(options: TaskStoreCreateTaskOptions): Promise<TaskStoreCreateTaskResult>;
|
|
544
321
|
retryTask?(options: {
|
|
545
|
-
secrets?: TaskSecrets
|
|
322
|
+
secrets?: TaskSecrets;
|
|
546
323
|
taskId: string;
|
|
547
324
|
}): Promise<void>;
|
|
548
325
|
recoverTasks?(options: TaskStoreRecoverTaskOptions): Promise<{
|
|
@@ -631,7 +408,7 @@ interface TaskStore {
|
|
|
631
408
|
|
|
632
409
|
/**
|
|
633
410
|
* DatabaseTaskStore
|
|
634
|
-
*
|
|
411
|
+
* @deprecated this type is deprecated, and there will be a new way to create Workers in the next major version.
|
|
635
412
|
* @public
|
|
636
413
|
*/
|
|
637
414
|
type DatabaseTaskStoreOptions = {
|
|
@@ -640,7 +417,7 @@ type DatabaseTaskStoreOptions = {
|
|
|
640
417
|
};
|
|
641
418
|
/**
|
|
642
419
|
* DatabaseTaskStore
|
|
643
|
-
*
|
|
420
|
+
* @deprecated this type is deprecated, and there will be a new way to create Workers in the next major version.
|
|
644
421
|
* @public
|
|
645
422
|
*/
|
|
646
423
|
declare class DatabaseTaskStore implements TaskStore {
|
|
@@ -656,10 +433,10 @@ declare class DatabaseTaskStore implements TaskStore {
|
|
|
656
433
|
private getState;
|
|
657
434
|
list(options: {
|
|
658
435
|
createdBy?: string;
|
|
659
|
-
status?: TaskStatus
|
|
436
|
+
status?: TaskStatus;
|
|
660
437
|
filters?: {
|
|
661
438
|
createdBy?: string | string[];
|
|
662
|
-
status?: TaskStatus
|
|
439
|
+
status?: TaskStatus | TaskStatus[];
|
|
663
440
|
};
|
|
664
441
|
pagination?: {
|
|
665
442
|
limit?: number;
|
|
@@ -670,12 +447,12 @@ declare class DatabaseTaskStore implements TaskStore {
|
|
|
670
447
|
field: string;
|
|
671
448
|
}[];
|
|
672
449
|
}): Promise<{
|
|
673
|
-
tasks: SerializedTask
|
|
450
|
+
tasks: SerializedTask[];
|
|
674
451
|
totalTasks?: number;
|
|
675
452
|
}>;
|
|
676
|
-
getTask(taskId: string): Promise<SerializedTask
|
|
453
|
+
getTask(taskId: string): Promise<SerializedTask>;
|
|
677
454
|
createTask(options: TaskStoreCreateTaskOptions): Promise<TaskStoreCreateTaskResult>;
|
|
678
|
-
claimTask(): Promise<SerializedTask
|
|
455
|
+
claimTask(): Promise<SerializedTask | undefined>;
|
|
679
456
|
heartbeatTask(taskId: string): Promise<void>;
|
|
680
457
|
listStaleTasks(options: {
|
|
681
458
|
timeoutS: number;
|
|
@@ -687,7 +464,7 @@ declare class DatabaseTaskStore implements TaskStore {
|
|
|
687
464
|
}>;
|
|
688
465
|
completeTask(options: {
|
|
689
466
|
taskId: string;
|
|
690
|
-
status: TaskStatus
|
|
467
|
+
status: TaskStatus;
|
|
691
468
|
eventBody: JsonObject;
|
|
692
469
|
}): Promise<void>;
|
|
693
470
|
emitLogEvent(options: TaskStoreEmitOptions<{
|
|
@@ -703,7 +480,7 @@ declare class DatabaseTaskStore implements TaskStore {
|
|
|
703
480
|
state?: JsonObject;
|
|
704
481
|
}): Promise<void>;
|
|
705
482
|
listEvents(options: TaskStoreListEventsOptions): Promise<{
|
|
706
|
-
events: SerializedTaskEvent
|
|
483
|
+
events: SerializedTaskEvent[];
|
|
707
484
|
}>;
|
|
708
485
|
shutdownTask(options: TaskStoreShutDownTaskOptions): Promise<void>;
|
|
709
486
|
rehydrateWorkspace(options: {
|
|
@@ -721,7 +498,7 @@ declare class DatabaseTaskStore implements TaskStore {
|
|
|
721
498
|
message: string;
|
|
722
499
|
} & JsonObject>): Promise<void>;
|
|
723
500
|
retryTask?(options: {
|
|
724
|
-
secrets?: TaskSecrets
|
|
501
|
+
secrets?: TaskSecrets;
|
|
725
502
|
taskId: string;
|
|
726
503
|
}): Promise<void>;
|
|
727
504
|
recoverTasks(options: TaskStoreRecoverTaskOptions): Promise<{
|
|
@@ -731,10 +508,10 @@ declare class DatabaseTaskStore implements TaskStore {
|
|
|
731
508
|
|
|
732
509
|
/**
|
|
733
510
|
* TaskManager
|
|
734
|
-
*
|
|
511
|
+
* @deprecated this type is deprecated, and there will be a new way to create Workers in the next major version.
|
|
735
512
|
* @public
|
|
736
513
|
*/
|
|
737
|
-
declare class TaskManager implements TaskContext
|
|
514
|
+
declare class TaskManager implements TaskContext {
|
|
738
515
|
private readonly task;
|
|
739
516
|
private readonly storage;
|
|
740
517
|
private readonly signal;
|
|
@@ -743,11 +520,11 @@ declare class TaskManager implements TaskContext$1 {
|
|
|
743
520
|
private readonly auth?;
|
|
744
521
|
private isDone;
|
|
745
522
|
private heartbeatTimeoutId?;
|
|
746
|
-
static create(task: CurrentClaimedTask, storage: TaskStore, abortSignal: AbortSignal, logger:
|
|
523
|
+
static create(task: CurrentClaimedTask, storage: TaskStore, abortSignal: AbortSignal, logger: LoggerService, auth?: AuthService, config?: Config, additionalWorkspaceProviders?: Record<string, WorkspaceProvider>): TaskManager;
|
|
747
524
|
private constructor();
|
|
748
525
|
get spec(): _backstage_plugin_scaffolder_common.TaskSpecV1beta3;
|
|
749
526
|
get cancelSignal(): AbortSignal;
|
|
750
|
-
get secrets(): TaskSecrets
|
|
527
|
+
get secrets(): TaskSecrets | undefined;
|
|
751
528
|
get createdBy(): string | undefined;
|
|
752
529
|
getWorkspaceName(): Promise<string>;
|
|
753
530
|
rehydrateWorkspace?(options: {
|
|
@@ -772,7 +549,7 @@ declare class TaskManager implements TaskContext$1 {
|
|
|
772
549
|
path: string;
|
|
773
550
|
}): Promise<void>;
|
|
774
551
|
cleanWorkspace?(): Promise<void>;
|
|
775
|
-
complete(result: TaskCompletionState
|
|
552
|
+
complete(result: TaskCompletionState, metadata?: JsonObject): Promise<void>;
|
|
776
553
|
private startTimeout;
|
|
777
554
|
getInitiatorCredentials(): Promise<BackstageCredentials>;
|
|
778
555
|
}
|
|
@@ -793,7 +570,7 @@ interface CurrentClaimedTask {
|
|
|
793
570
|
/**
|
|
794
571
|
* The secrets that are stored with the task.
|
|
795
572
|
*/
|
|
796
|
-
secrets?: TaskSecrets
|
|
573
|
+
secrets?: TaskSecrets;
|
|
797
574
|
/**
|
|
798
575
|
* The state of checkpoints of the task.
|
|
799
576
|
*/
|
|
@@ -810,17 +587,17 @@ interface CurrentClaimedTask {
|
|
|
810
587
|
|
|
811
588
|
/**
|
|
812
589
|
* CreateWorkerOptions
|
|
813
|
-
*
|
|
590
|
+
* @deprecated this type is deprecated, and there will be a new way to create Workers in the next major version.
|
|
814
591
|
* @public
|
|
815
592
|
*/
|
|
816
593
|
type CreateWorkerOptions = {
|
|
817
|
-
taskBroker: TaskBroker
|
|
594
|
+
taskBroker: TaskBroker;
|
|
818
595
|
actionRegistry: TemplateActionRegistry;
|
|
819
596
|
integrations: ScmIntegrations;
|
|
820
597
|
workingDirectory: string;
|
|
821
|
-
logger:
|
|
598
|
+
logger: LoggerService;
|
|
822
599
|
auditor?: AuditorService;
|
|
823
|
-
additionalTemplateFilters?: Record<string, TemplateFilter
|
|
600
|
+
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
|
824
601
|
/**
|
|
825
602
|
* The number of tasks that can be executed at the same time by the worker
|
|
826
603
|
* @defaultValue 10
|
|
@@ -834,13 +611,13 @@ type CreateWorkerOptions = {
|
|
|
834
611
|
* ```
|
|
835
612
|
*/
|
|
836
613
|
concurrentTasksLimit?: number;
|
|
837
|
-
additionalTemplateGlobals?: Record<string, TemplateGlobal
|
|
614
|
+
additionalTemplateGlobals?: Record<string, TemplateGlobal>;
|
|
838
615
|
permissions?: PermissionEvaluator;
|
|
839
616
|
gracefulShutdown?: boolean;
|
|
840
617
|
};
|
|
841
618
|
/**
|
|
842
619
|
* TaskWorker
|
|
843
|
-
*
|
|
620
|
+
* @deprecated this type is deprecated, and there will be a new way to create Workers in the next major version.
|
|
844
621
|
* @public
|
|
845
622
|
*/
|
|
846
623
|
declare class TaskWorker {
|
|
@@ -855,11 +632,10 @@ declare class TaskWorker {
|
|
|
855
632
|
start(): void;
|
|
856
633
|
stop(): Promise<void>;
|
|
857
634
|
protected onReadyToClaimTask(): Promise<void>;
|
|
858
|
-
runOneTask(task: TaskContext
|
|
635
|
+
runOneTask(task: TaskContext): Promise<void>;
|
|
859
636
|
}
|
|
860
637
|
|
|
861
638
|
/**
|
|
862
|
-
*
|
|
863
639
|
* @public
|
|
864
640
|
*/
|
|
865
641
|
type TemplatePermissionRuleInput<TParams extends PermissionRuleParams = PermissionRuleParams> = PermissionRule<TemplateEntityStepV1beta3 | TemplateParametersV1beta3, {}, typeof RESOURCE_TYPE_SCAFFOLDER_TEMPLATE, TParams>;
|
|
@@ -868,111 +644,5 @@ type TemplatePermissionRuleInput<TParams extends PermissionRuleParams = Permissi
|
|
|
868
644
|
* @public
|
|
869
645
|
*/
|
|
870
646
|
type ActionPermissionRuleInput<TParams extends PermissionRuleParams = PermissionRuleParams> = PermissionRule<TemplateEntityStepV1beta3 | TemplateParametersV1beta3, {}, typeof RESOURCE_TYPE_SCAFFOLDER_ACTION, TParams>;
|
|
871
|
-
/**
|
|
872
|
-
* RouterOptions
|
|
873
|
-
*
|
|
874
|
-
* @public
|
|
875
|
-
* @deprecated Please migrate to the new backend system as this will be removed in the future.
|
|
876
|
-
*/
|
|
877
|
-
interface RouterOptions {
|
|
878
|
-
logger: Logger;
|
|
879
|
-
config: Config;
|
|
880
|
-
reader: UrlReaderService;
|
|
881
|
-
lifecycle?: LifecycleService;
|
|
882
|
-
database: DatabaseService;
|
|
883
|
-
catalogClient: CatalogApi;
|
|
884
|
-
scheduler?: SchedulerService;
|
|
885
|
-
actions?: TemplateAction$1<any, any, any>[];
|
|
886
|
-
/**
|
|
887
|
-
* @deprecated taskWorkers is deprecated in favor of concurrentTasksLimit option with a single TaskWorker
|
|
888
|
-
* @defaultValue 1
|
|
889
|
-
*/
|
|
890
|
-
taskWorkers?: number;
|
|
891
|
-
/**
|
|
892
|
-
* Sets the number of concurrent tasks that can be run at any given time on the TaskWorker
|
|
893
|
-
* @defaultValue 10
|
|
894
|
-
*/
|
|
895
|
-
concurrentTasksLimit?: number;
|
|
896
|
-
taskBroker?: TaskBroker$1;
|
|
897
|
-
additionalTemplateFilters?: Record<string, TemplateFilter$1> | CreatedTemplateFilter<any, any>[];
|
|
898
|
-
additionalTemplateGlobals?: Record<string, TemplateGlobal$1> | CreatedTemplateGlobal[];
|
|
899
|
-
additionalWorkspaceProviders?: Record<string, WorkspaceProvider>;
|
|
900
|
-
permissions?: PermissionsService;
|
|
901
|
-
permissionRules?: Array<TemplatePermissionRuleInput | ActionPermissionRuleInput>;
|
|
902
|
-
auth?: AuthService;
|
|
903
|
-
httpAuth?: HttpAuthService;
|
|
904
|
-
identity?: IdentityApi;
|
|
905
|
-
discovery?: DiscoveryService;
|
|
906
|
-
events?: EventsService;
|
|
907
|
-
auditor?: AuditorService;
|
|
908
|
-
autocompleteHandlers?: Record<string, AutocompleteHandler>;
|
|
909
|
-
}
|
|
910
|
-
/**
|
|
911
|
-
* A method to create a router for the scaffolder backend plugin.
|
|
912
|
-
* @public
|
|
913
|
-
* @deprecated Please migrate to the new backend system as this will be removed in the future.
|
|
914
|
-
*/
|
|
915
|
-
declare function createRouter(options: RouterOptions): Promise<express.Router>;
|
|
916
|
-
|
|
917
|
-
/**
|
|
918
|
-
* @public
|
|
919
|
-
* @deprecated Import from `@backstage/plugin-scaffolder-node` instead.
|
|
920
|
-
*/
|
|
921
|
-
type TemplateFilter = TemplateFilter$1;
|
|
922
|
-
/**
|
|
923
|
-
* @public
|
|
924
|
-
* @deprecated Import from `@backstage/plugin-scaffolder-node` instead.
|
|
925
|
-
*/
|
|
926
|
-
type TemplateGlobal = TemplateGlobal$1;
|
|
927
|
-
|
|
928
|
-
/**
|
|
929
|
-
* @public
|
|
930
|
-
* @deprecated Import from {@link @backstage/plugin-scaffolder-node#ActionContext} instead
|
|
931
|
-
*/
|
|
932
|
-
type ActionContext<TInput extends JsonObject> = ActionContext$1<TInput>;
|
|
933
|
-
/**
|
|
934
|
-
* @public
|
|
935
|
-
* @deprecated Use `createTemplateAction` from `@backstage/plugin-scaffolder-node` instead
|
|
936
|
-
*/
|
|
937
|
-
declare const createTemplateAction: typeof createTemplateAction$1;
|
|
938
|
-
/**
|
|
939
|
-
* @public
|
|
940
|
-
* @deprecated Use `TaskSecrets` from `@backstage/plugin-scaffolder-node` instead
|
|
941
|
-
*/
|
|
942
|
-
type TaskSecrets = TaskSecrets$1;
|
|
943
|
-
/**
|
|
944
|
-
* @public
|
|
945
|
-
* @deprecated Use `TemplateAction` from `@backstage/plugin-scaffolder-node` instead
|
|
946
|
-
*/
|
|
947
|
-
type TemplateAction<TInput extends JsonObject> = TemplateAction$1<TInput>;
|
|
948
|
-
/**
|
|
949
|
-
* Options for {@link executeShellCommand}.
|
|
950
|
-
*
|
|
951
|
-
* @public
|
|
952
|
-
* @deprecated Use `ExecuteShellCommandOptions` from `@backstage/plugin-scaffolder-node` instead
|
|
953
|
-
*/
|
|
954
|
-
type RunCommandOptions = ExecuteShellCommandOptions;
|
|
955
|
-
/**
|
|
956
|
-
* Run a command in a sub-process, normally a shell command.
|
|
957
|
-
*
|
|
958
|
-
* @public
|
|
959
|
-
* @deprecated Use `executeShellCommand` from `@backstage/plugin-scaffolder-node` instead
|
|
960
|
-
*/
|
|
961
|
-
declare const executeShellCommand: typeof executeShellCommand$1;
|
|
962
|
-
/**
|
|
963
|
-
* A helper function that reads the contents of a directory from the given URL.
|
|
964
|
-
* Can be used in your own actions, and also used behind fetch:template and fetch:plain
|
|
965
|
-
*
|
|
966
|
-
* @public
|
|
967
|
-
* @deprecated Use `fetchContents` from `@backstage/plugin-scaffolder-node` instead
|
|
968
|
-
*/
|
|
969
|
-
declare const fetchContents: typeof fetchContents$1;
|
|
970
|
-
/**
|
|
971
|
-
* Adds support for scaffolder specific entity kinds to the catalog.
|
|
972
|
-
*
|
|
973
|
-
* @public
|
|
974
|
-
* @deprecated Import from `@backstage/plugin-catalog-backend-module-scaffolder-entity-model` instead
|
|
975
|
-
*/
|
|
976
|
-
declare const ScaffolderEntitiesProcessor: typeof ScaffolderEntitiesProcessor$1;
|
|
977
647
|
|
|
978
|
-
export { type
|
|
648
|
+
export { type ActionPermissionRuleInput, type CreateWorkerOptions, type CurrentClaimedTask, DatabaseTaskStore, type DatabaseTaskStoreOptions, TaskManager, type TaskStore, type TaskStoreCreateTaskOptions, type TaskStoreCreateTaskResult, type TaskStoreEmitOptions, type TaskStoreListEventsOptions, type TaskStoreRecoverTaskOptions, type TaskStoreShutDownTaskOptions, TaskWorker, TemplateActionRegistry, type TemplatePermissionRuleInput, createCatalogRegisterAction, createCatalogWriteAction, createDebugLogAction, createFetchCatalogEntityAction, createFetchPlainAction, createFetchPlainFileAction, createFetchTemplateAction, createFetchTemplateFileAction, createFilesystemDeleteAction, createFilesystemReadDirAction, createFilesystemRenameAction, createWaitAction, scaffolderPlugin as default };
|