@backstage/plugin-scaffolder-node 0.11.1 → 0.12.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 +47 -0
- package/dist/alpha.cjs.js +0 -4
- package/dist/alpha.cjs.js.map +1 -1
- package/dist/alpha.d.ts +4 -16
- package/dist/extensions.cjs.js +10 -0
- package/dist/extensions.cjs.js.map +1 -0
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +45 -16
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-node
|
|
2
2
|
|
|
3
|
+
## 0.12.0-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/integration@1.18.1-next.1
|
|
9
|
+
- @backstage/backend-plugin-api@1.4.4-next.0
|
|
10
|
+
- @backstage/plugin-permission-common@0.9.2-next.0
|
|
11
|
+
- @backstage/plugin-scaffolder-common@1.7.2-next.1
|
|
12
|
+
|
|
13
|
+
## 0.12.0-next.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- 9b81a90: **BREAKING** - Marking optional fields as required in the `TaskBroker`, these can be fixed with a no-op `() => void` if you don't want to implement the functions.
|
|
18
|
+
|
|
19
|
+
- `cancel`, `recoverTasks` and `retry` are the required methods on the `TaskBroker` interface.
|
|
20
|
+
|
|
21
|
+
**NOTE**: If you're affected by this breaking change, please reach out to us in an issue as we're thinking about completely removing the `TaskBroker` extension point soon and would like to hear your use cases for the upcoming re-architecture of the `scaffolder-backend` plugin.
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- c8aa210: **BREAKING ALPHA**: We've moved the `scaffolderActionsExtensionPoint` from `/alpha` to the main export.
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
// before
|
|
29
|
+
import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha';
|
|
30
|
+
|
|
31
|
+
// after
|
|
32
|
+
import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- 6e2bda7: **DEPRECATION**: We're going to be working on refactoring a lot of the internals of the Scaffolder backend plugin, and with that comes a lot of deprecations and removals for public types that are making these things hard.
|
|
36
|
+
|
|
37
|
+
If you're using these types, please reach out to us either on Discord or a GitHub issue with your use cases.
|
|
38
|
+
|
|
39
|
+
- `SerializedTask`, `SerializedTaskEvent`, `TaskBroker`, `TaskContext`, `TaskBrokerDispatchOptions`, `TaskBrokerDispatchResult`, `TaskCompletionState`, `TaskEventType`, `TaskFilter`, `TaskFilters`, `TaskStatus` are the types that have now been marked as deprecated, and will be removed in a future release.
|
|
40
|
+
|
|
41
|
+
- Updated dependencies
|
|
42
|
+
- @backstage/integration@1.18.1-next.0
|
|
43
|
+
- @backstage/plugin-scaffolder-common@1.7.2-next.0
|
|
44
|
+
- @backstage/backend-plugin-api@1.4.3
|
|
45
|
+
- @backstage/catalog-model@1.7.5
|
|
46
|
+
- @backstage/errors@1.2.7
|
|
47
|
+
- @backstage/types@1.2.2
|
|
48
|
+
- @backstage/plugin-permission-common@0.9.1
|
|
49
|
+
|
|
3
50
|
## 0.11.1
|
|
4
51
|
|
|
5
52
|
### Patch Changes
|
package/dist/alpha.cjs.js
CHANGED
|
@@ -5,9 +5,6 @@ var serializer = require('./tasks/serializer.cjs.js');
|
|
|
5
5
|
var createTemplateFilter = require('./alpha/filters/createTemplateFilter.cjs.js');
|
|
6
6
|
var createTemplateGlobal = require('./alpha/globals/createTemplateGlobal.cjs.js');
|
|
7
7
|
|
|
8
|
-
const scaffolderActionsExtensionPoint = backendPluginApi.createExtensionPoint({
|
|
9
|
-
id: "scaffolder.actions"
|
|
10
|
-
});
|
|
11
8
|
const scaffolderTaskBrokerExtensionPoint = backendPluginApi.createExtensionPoint({
|
|
12
9
|
id: "scaffolder.taskBroker"
|
|
13
10
|
});
|
|
@@ -26,7 +23,6 @@ exports.serializeWorkspace = serializer.serializeWorkspace;
|
|
|
26
23
|
exports.createTemplateFilter = createTemplateFilter.createTemplateFilter;
|
|
27
24
|
exports.createTemplateGlobalFunction = createTemplateGlobal.createTemplateGlobalFunction;
|
|
28
25
|
exports.createTemplateGlobalValue = createTemplateGlobal.createTemplateGlobalValue;
|
|
29
|
-
exports.scaffolderActionsExtensionPoint = scaffolderActionsExtensionPoint;
|
|
30
26
|
exports.scaffolderAutocompleteExtensionPoint = scaffolderAutocompleteExtensionPoint;
|
|
31
27
|
exports.scaffolderTaskBrokerExtensionPoint = scaffolderTaskBrokerExtensionPoint;
|
|
32
28
|
exports.scaffolderTemplatingExtensionPoint = scaffolderTemplatingExtensionPoint;
|
package/dist/alpha.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.cjs.js","sources":["../src/alpha/index.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createExtensionPoint } from '@backstage/backend-plugin-api';\nimport {\n TaskBroker,\n
|
|
1
|
+
{"version":3,"file":"alpha.cjs.js","sources":["../src/alpha/index.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createExtensionPoint } from '@backstage/backend-plugin-api';\nimport {\n TaskBroker,\n TemplateFilter,\n TemplateGlobal,\n} from '@backstage/plugin-scaffolder-node';\nimport { CreatedTemplateFilter } from './filters';\nimport { CreatedTemplateGlobal } from './globals';\n\nexport * from '../tasks/alpha';\nexport * from './filters';\nexport * from './globals';\nexport * from './types';\nexport * from './checkpoints';\n\n/**\n * Extension point for replacing the scaffolder task broker.\n *\n * @alpha\n * @deprecated this extension point is planned to be removed, please reach out to us in an issue if you're using this extension point and your use cases.\n */\nexport interface ScaffolderTaskBrokerExtensionPoint {\n setTaskBroker(taskBroker: TaskBroker): void;\n}\n\n/**\n * Extension point for replacing the scaffolder task broker.\n *\n * @alpha\n * @deprecated this extension point is planned to be removed, please reach out to us in an issue if you're using this extension point and your use cases.\n */\nexport const scaffolderTaskBrokerExtensionPoint =\n createExtensionPoint<ScaffolderTaskBrokerExtensionPoint>({\n id: 'scaffolder.taskBroker',\n });\n\n/**\n * Extension point for adding template filters and globals.\n *\n * @alpha\n */\nexport interface ScaffolderTemplatingExtensionPoint {\n addTemplateFilters(\n filters: Record<string, TemplateFilter> | CreatedTemplateFilter<any, any>[],\n ): void;\n\n addTemplateGlobals(\n globals: Record<string, TemplateGlobal> | CreatedTemplateGlobal[],\n ): void;\n}\n\n/**\n * Extension point for adding template filters and globals.\n *\n * @alpha\n */\nexport const scaffolderTemplatingExtensionPoint =\n createExtensionPoint<ScaffolderTemplatingExtensionPoint>({\n id: 'scaffolder.templating',\n });\n\n/**\n * Autocomplete handler for the scaffolder.\n * @alpha\n */\nexport type AutocompleteHandler = ({\n resource,\n token,\n context,\n}: {\n resource: string;\n token: string;\n context: Record<string, string>;\n}) => Promise<{ results: { title?: string; id: string }[] }>;\n\n/**\n * Extension point for adding autocomplete handler providers\n * @alpha\n */\nexport interface ScaffolderAutocompleteExtensionPoint {\n addAutocompleteProvider({\n id,\n handler,\n }: {\n id: string;\n handler: AutocompleteHandler;\n }): void;\n}\n\n/**\n * Extension point for adding autocomplete handlers.\n *\n * @alpha\n */\nexport const scaffolderAutocompleteExtensionPoint =\n createExtensionPoint<ScaffolderAutocompleteExtensionPoint>({\n id: 'scaffolder.autocomplete',\n });\n\n/**\n * This provider has to be implemented to make it possible to serialize/deserialize scaffolder workspace.\n *\n * @alpha\n */\nexport interface WorkspaceProvider {\n serializeWorkspace({\n path,\n taskId,\n }: {\n path: string;\n taskId: string;\n }): Promise<void>;\n\n cleanWorkspace(options: { taskId: string }): Promise<void>;\n\n rehydrateWorkspace(options: {\n taskId: string;\n targetPath: string;\n }): Promise<void>;\n}\n\n/**\n * Extension point for adding workspace providers.\n *\n * @alpha\n */\nexport interface ScaffolderWorkspaceProviderExtensionPoint {\n addProviders(providers: Record<string, WorkspaceProvider>): void;\n}\n\n/**\n * Extension point for adding workspace providers.\n *\n * @alpha\n */\nexport const scaffolderWorkspaceProviderExtensionPoint =\n createExtensionPoint<ScaffolderWorkspaceProviderExtensionPoint>({\n id: 'scaffolder.workspace.provider',\n });\n"],"names":["createExtensionPoint"],"mappings":";;;;;;;AA+CO,MAAM,qCACXA,qCAAA,CAAyD;AAAA,EACvD,EAAA,EAAI;AACN,CAAC;AAsBI,MAAM,qCACXA,qCAAA,CAAyD;AAAA,EACvD,EAAA,EAAI;AACN,CAAC;AAmCI,MAAM,uCACXA,qCAAA,CAA2D;AAAA,EACzD,EAAA,EAAI;AACN,CAAC;AAsCI,MAAM,4CACXA,qCAAA,CAAgE;AAAA,EAC9D,EAAA,EAAI;AACN,CAAC;;;;;;;;;;;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
|
-
import {
|
|
2
|
+
import { TaskBroker, TemplateFilter, TemplateGlobal } from '@backstage/plugin-scaffolder-node';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { JsonValue } from '@backstage/types';
|
|
5
5
|
export { T as TemplateFilter, a as TemplateGlobal } from './types/types.d-C0fXdKnD.js';
|
|
@@ -151,24 +151,11 @@ type CheckpointContext<T extends JsonValue | void = JsonValue> = {
|
|
|
151
151
|
fn: () => Promise<T> | T;
|
|
152
152
|
};
|
|
153
153
|
|
|
154
|
-
/**
|
|
155
|
-
* Extension point for managing scaffolder actions.
|
|
156
|
-
*
|
|
157
|
-
* @alpha
|
|
158
|
-
*/
|
|
159
|
-
interface ScaffolderActionsExtensionPoint {
|
|
160
|
-
addActions(...actions: TemplateAction<any, any, any>[]): void;
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Extension point for managing scaffolder actions.
|
|
164
|
-
*
|
|
165
|
-
* @alpha
|
|
166
|
-
*/
|
|
167
|
-
declare const scaffolderActionsExtensionPoint: _backstage_backend_plugin_api.ExtensionPoint<ScaffolderActionsExtensionPoint>;
|
|
168
154
|
/**
|
|
169
155
|
* Extension point for replacing the scaffolder task broker.
|
|
170
156
|
*
|
|
171
157
|
* @alpha
|
|
158
|
+
* @deprecated this extension point is planned to be removed, please reach out to us in an issue if you're using this extension point and your use cases.
|
|
172
159
|
*/
|
|
173
160
|
interface ScaffolderTaskBrokerExtensionPoint {
|
|
174
161
|
setTaskBroker(taskBroker: TaskBroker): void;
|
|
@@ -177,6 +164,7 @@ interface ScaffolderTaskBrokerExtensionPoint {
|
|
|
177
164
|
* Extension point for replacing the scaffolder task broker.
|
|
178
165
|
*
|
|
179
166
|
* @alpha
|
|
167
|
+
* @deprecated this extension point is planned to be removed, please reach out to us in an issue if you're using this extension point and your use cases.
|
|
180
168
|
*/
|
|
181
169
|
declare const scaffolderTaskBrokerExtensionPoint: _backstage_backend_plugin_api.ExtensionPoint<ScaffolderTaskBrokerExtensionPoint>;
|
|
182
170
|
/**
|
|
@@ -257,4 +245,4 @@ interface ScaffolderWorkspaceProviderExtensionPoint {
|
|
|
257
245
|
*/
|
|
258
246
|
declare const scaffolderWorkspaceProviderExtensionPoint: _backstage_backend_plugin_api.ExtensionPoint<ScaffolderWorkspaceProviderExtensionPoint>;
|
|
259
247
|
|
|
260
|
-
export { type AutocompleteHandler, type CheckpointContext, type CheckpointState, type CheckpointStateValue, type CheckpointStatus, type CreatedTemplateFilter, type CreatedTemplateGlobal, type CreatedTemplateGlobalFunction, type CreatedTemplateGlobalValue, type
|
|
248
|
+
export { type AutocompleteHandler, type CheckpointContext, type CheckpointState, type CheckpointStateValue, type CheckpointStatus, type CreatedTemplateFilter, type CreatedTemplateGlobal, type CreatedTemplateGlobalFunction, type CreatedTemplateGlobalValue, type ScaffolderAutocompleteExtensionPoint, type ScaffolderTaskBrokerExtensionPoint, type ScaffolderTemplatingExtensionPoint, type ScaffolderWorkspaceProviderExtensionPoint, type TemplateFilterExample, type TemplateGlobalFunctionExample, type UpdateTaskCheckpointOptions, type WorkspaceProvider, type ZodFunctionSchema, createTemplateFilter, createTemplateGlobalFunction, createTemplateGlobalValue, restoreWorkspace, scaffolderAutocompleteExtensionPoint, scaffolderTaskBrokerExtensionPoint, scaffolderTemplatingExtensionPoint, scaffolderWorkspaceProviderExtensionPoint, serializeWorkspace };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
4
|
+
|
|
5
|
+
const scaffolderActionsExtensionPoint = backendPluginApi.createExtensionPoint({
|
|
6
|
+
id: "scaffolder.actions"
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
exports.scaffolderActionsExtensionPoint = scaffolderActionsExtensionPoint;
|
|
10
|
+
//# sourceMappingURL=extensions.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensions.cjs.js","sources":["../src/extensions.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createExtensionPoint } from '@backstage/backend-plugin-api';\nimport { TemplateAction } from './actions';\n\n/**\n * Extension point for managing scaffolder actions.\n *\n * @public\n */\nexport interface ScaffolderActionsExtensionPoint {\n addActions(...actions: TemplateAction<any, any, any>[]): void;\n}\n\n/**\n * Extension point for managing scaffolder actions.\n *\n * @public\n */\nexport const scaffolderActionsExtensionPoint =\n createExtensionPoint<ScaffolderActionsExtensionPoint>({\n id: 'scaffolder.actions',\n });\n"],"names":["createExtensionPoint"],"mappings":";;;;AAgCO,MAAM,kCACXA,qCAAA,CAAsD;AAAA,EACpD,EAAA,EAAI;AACN,CAAC;;;;"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -7,6 +7,7 @@ var gitHelpers = require('./actions/gitHelpers.cjs.js');
|
|
|
7
7
|
var util = require('./actions/util.cjs.js');
|
|
8
8
|
var serializeDirectoryContents = require('./files/serializeDirectoryContents.cjs.js');
|
|
9
9
|
var deserializeDirectoryContents = require('./files/deserializeDirectoryContents.cjs.js');
|
|
10
|
+
var extensions = require('./extensions.cjs.js');
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
|
|
@@ -25,4 +26,5 @@ exports.isNotGitDirectoryOrContents = util.isNotGitDirectoryOrContents;
|
|
|
25
26
|
exports.parseRepoUrl = util.parseRepoUrl;
|
|
26
27
|
exports.serializeDirectoryContents = serializeDirectoryContents.serializeDirectoryContents;
|
|
27
28
|
exports.deserializeDirectoryContents = deserializeDirectoryContents.deserializeDirectoryContents;
|
|
29
|
+
exports.scaffolderActionsExtensionPoint = extensions.scaffolderActionsExtensionPoint;
|
|
28
30
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JsonObject, Observable, JsonValue, Expand } from '@backstage/types';
|
|
2
|
+
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
3
|
import { BackstageCredentials, LoggerService, UrlReaderService } from '@backstage/backend-plugin-api';
|
|
3
4
|
import { PermissionCriteria } from '@backstage/plugin-permission-common';
|
|
4
5
|
import { TaskSpec, TemplateInfo } from '@backstage/plugin-scaffolder-common';
|
|
@@ -23,18 +24,24 @@ type TaskSecrets = Record<string, string> & {
|
|
|
23
24
|
* The status of each step of the Task
|
|
24
25
|
*
|
|
25
26
|
* @public
|
|
27
|
+
* @deprecated this type is planned to be removed.
|
|
28
|
+
* Please reach out to us in an issue if you're using this type and your use cases.
|
|
26
29
|
*/
|
|
27
30
|
type TaskStatus = 'cancelled' | 'completed' | 'failed' | 'open' | 'processing' | 'skipped';
|
|
28
31
|
/**
|
|
29
32
|
* The state of a completed task.
|
|
30
33
|
*
|
|
31
34
|
* @public
|
|
35
|
+
* @deprecated this interface is planned to be removed.
|
|
36
|
+
* Please reach out to us in an issue if you're using this interface and your use cases.
|
|
32
37
|
*/
|
|
33
38
|
type TaskCompletionState = 'failed' | 'completed';
|
|
34
39
|
/**
|
|
35
40
|
* SerializedTask
|
|
36
41
|
*
|
|
37
42
|
* @public
|
|
43
|
+
* @deprecated this type is planned to be removed.
|
|
44
|
+
* Please reach out to us in an issue if you're using this type and your use cases.
|
|
38
45
|
*/
|
|
39
46
|
type SerializedTask = {
|
|
40
47
|
id: string;
|
|
@@ -50,12 +57,16 @@ type SerializedTask = {
|
|
|
50
57
|
* TaskEventType
|
|
51
58
|
*
|
|
52
59
|
* @public
|
|
60
|
+
* @deprecated this type is planned to be removed.
|
|
61
|
+
* Please reach out to us in an issue if you're using this type and your use cases.
|
|
53
62
|
*/
|
|
54
63
|
type TaskEventType = 'completion' | 'log' | 'cancelled' | 'recovered';
|
|
55
64
|
/**
|
|
56
65
|
* SerializedTaskEvent
|
|
57
66
|
*
|
|
58
67
|
* @public
|
|
68
|
+
* @deprecated this type is planned to be removed.
|
|
69
|
+
* Please reach out to us in an issue if you're using this type and your use cases.
|
|
59
70
|
*/
|
|
60
71
|
type SerializedTaskEvent = {
|
|
61
72
|
id: number;
|
|
@@ -73,6 +84,8 @@ type SerializedTaskEvent = {
|
|
|
73
84
|
* The result of {@link TaskBroker.dispatch}
|
|
74
85
|
*
|
|
75
86
|
* @public
|
|
87
|
+
* @deprecated this interface is planned to be removed.
|
|
88
|
+
* Please reach out to us in an issue if you're using this interface and your use cases.
|
|
76
89
|
*/
|
|
77
90
|
type TaskBrokerDispatchResult = {
|
|
78
91
|
taskId: string;
|
|
@@ -82,6 +95,8 @@ type TaskBrokerDispatchResult = {
|
|
|
82
95
|
* Currently a spec and optional secrets
|
|
83
96
|
*
|
|
84
97
|
* @public
|
|
98
|
+
* @deprecated this interface is planned to be removed.
|
|
99
|
+
* Please reach out to us in an issue if you're using this interface and your use cases.
|
|
85
100
|
*/
|
|
86
101
|
type TaskBrokerDispatchOptions = {
|
|
87
102
|
spec: TaskSpec;
|
|
@@ -91,6 +106,8 @@ type TaskBrokerDispatchOptions = {
|
|
|
91
106
|
/**
|
|
92
107
|
* TaskFilter
|
|
93
108
|
* @public
|
|
109
|
+
* @deprecated this type is planned to be removed.
|
|
110
|
+
* Please reach out to us in an issue if you're using this type and your use cases.
|
|
94
111
|
*/
|
|
95
112
|
type TaskFilter = {
|
|
96
113
|
key: string;
|
|
@@ -99,6 +116,8 @@ type TaskFilter = {
|
|
|
99
116
|
/**
|
|
100
117
|
* TaskFilters
|
|
101
118
|
* @public
|
|
119
|
+
* @deprecated this type is planned to be removed.
|
|
120
|
+
* Please reach out to us in an issue if you're using this type and your use cases.
|
|
102
121
|
*/
|
|
103
122
|
type TaskFilters = {
|
|
104
123
|
anyOf: TaskFilter[];
|
|
@@ -108,9 +127,12 @@ type TaskFilters = {
|
|
|
108
127
|
not: TaskFilter;
|
|
109
128
|
} | TaskFilter;
|
|
110
129
|
/**
|
|
111
|
-
*
|
|
130
|
+
* TaskContext
|
|
112
131
|
*
|
|
113
132
|
* @public
|
|
133
|
+
*
|
|
134
|
+
* @deprecated this interface is planned to be removed.
|
|
135
|
+
* Please reach out to us in an issue if you're using this interface and your use cases.
|
|
114
136
|
*/
|
|
115
137
|
interface TaskContext {
|
|
116
138
|
taskId?: string;
|
|
@@ -141,15 +163,17 @@ interface TaskContext {
|
|
|
141
163
|
* TaskBroker
|
|
142
164
|
*
|
|
143
165
|
* @public
|
|
166
|
+
* @deprecated this interface is planned to be removed.
|
|
167
|
+
* Please reach out to us in an issue if you're using this interface and your use cases.
|
|
144
168
|
*/
|
|
145
169
|
interface TaskBroker {
|
|
146
|
-
cancel
|
|
147
|
-
retry
|
|
170
|
+
cancel(taskId: string): Promise<void>;
|
|
171
|
+
retry(options: {
|
|
148
172
|
secrets?: TaskSecrets;
|
|
149
173
|
taskId: string;
|
|
150
174
|
}): Promise<void>;
|
|
151
175
|
claim(): Promise<TaskContext>;
|
|
152
|
-
recoverTasks
|
|
176
|
+
recoverTasks(): Promise<void>;
|
|
153
177
|
dispatch(options: TaskBrokerDispatchOptions): Promise<TaskBrokerDispatchResult>;
|
|
154
178
|
vacuumTasks(options: {
|
|
155
179
|
timeoutS: number;
|
|
@@ -161,7 +185,7 @@ interface TaskBroker {
|
|
|
161
185
|
events: SerializedTaskEvent[];
|
|
162
186
|
}>;
|
|
163
187
|
get(taskId: string): Promise<SerializedTask>;
|
|
164
|
-
list
|
|
188
|
+
list(options?: {
|
|
165
189
|
filters?: {
|
|
166
190
|
createdBy?: string | string[];
|
|
167
191
|
status?: TaskStatus | TaskStatus[];
|
|
@@ -179,16 +203,6 @@ interface TaskBroker {
|
|
|
179
203
|
tasks: SerializedTask[];
|
|
180
204
|
totalTasks?: number;
|
|
181
205
|
}>;
|
|
182
|
-
/**
|
|
183
|
-
* @deprecated Make sure to pass `createdBy` and `status` in the `filters` parameter instead
|
|
184
|
-
*/
|
|
185
|
-
list?(options: {
|
|
186
|
-
createdBy?: string;
|
|
187
|
-
status?: TaskStatus;
|
|
188
|
-
}): Promise<{
|
|
189
|
-
tasks: SerializedTask[];
|
|
190
|
-
totalTasks?: number;
|
|
191
|
-
}>;
|
|
192
206
|
}
|
|
193
207
|
|
|
194
208
|
/**
|
|
@@ -557,4 +571,19 @@ declare function serializeDirectoryContents(sourcePath: string, options?: {
|
|
|
557
571
|
*/
|
|
558
572
|
declare function deserializeDirectoryContents(targetPath: string, files: SerializedFile[]): Promise<void>;
|
|
559
573
|
|
|
560
|
-
|
|
574
|
+
/**
|
|
575
|
+
* Extension point for managing scaffolder actions.
|
|
576
|
+
*
|
|
577
|
+
* @public
|
|
578
|
+
*/
|
|
579
|
+
interface ScaffolderActionsExtensionPoint {
|
|
580
|
+
addActions(...actions: TemplateAction<any, any, any>[]): void;
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* Extension point for managing scaffolder actions.
|
|
584
|
+
*
|
|
585
|
+
* @public
|
|
586
|
+
*/
|
|
587
|
+
declare const scaffolderActionsExtensionPoint: _backstage_backend_plugin_api.ExtensionPoint<ScaffolderActionsExtensionPoint>;
|
|
588
|
+
|
|
589
|
+
export { type ActionContext, type ExecuteShellCommandOptions, type ScaffolderActionsExtensionPoint, type SerializedFile, type SerializedTask, type SerializedTaskEvent, type TaskBroker, type TaskBrokerDispatchOptions, type TaskBrokerDispatchResult, type TaskCompletionState, type TaskContext, type TaskEventType, type TaskFilter, type TaskFilters, type TaskSecrets, type TaskStatus, type TemplateAction, type TemplateActionOptions, type TemplateExample, addFiles, cloneRepo, commitAndPushBranch, commitAndPushRepo, createBranch, createTemplateAction, deserializeDirectoryContents, executeShellCommand, fetchContents, fetchFile, getRepoSourceDirectory, initRepoAndPush, isNotGitDirectoryOrContents, parseRepoUrl, scaffolderActionsExtensionPoint, serializeDirectoryContents };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-scaffolder-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0-next.1",
|
|
4
4
|
"description": "The plugin-scaffolder-node module for @backstage/plugin-scaffolder-backend",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "node-library",
|
|
@@ -62,13 +62,13 @@
|
|
|
62
62
|
"test": "backstage-cli package test"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@backstage/backend-plugin-api": "
|
|
66
|
-
"@backstage/catalog-model": "
|
|
67
|
-
"@backstage/errors": "
|
|
68
|
-
"@backstage/integration": "
|
|
69
|
-
"@backstage/plugin-permission-common": "
|
|
70
|
-
"@backstage/plugin-scaffolder-common": "
|
|
71
|
-
"@backstage/types": "
|
|
65
|
+
"@backstage/backend-plugin-api": "1.4.4-next.0",
|
|
66
|
+
"@backstage/catalog-model": "1.7.5",
|
|
67
|
+
"@backstage/errors": "1.2.7",
|
|
68
|
+
"@backstage/integration": "1.18.1-next.1",
|
|
69
|
+
"@backstage/plugin-permission-common": "0.9.2-next.0",
|
|
70
|
+
"@backstage/plugin-scaffolder-common": "1.7.2-next.1",
|
|
71
|
+
"@backstage/types": "1.2.2",
|
|
72
72
|
"@isomorphic-git/pgp-plugin": "^0.0.7",
|
|
73
73
|
"concat-stream": "^2.0.0",
|
|
74
74
|
"fs-extra": "^11.2.0",
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
"zod-to-json-schema": "^3.20.4"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@backstage/backend-test-utils": "
|
|
88
|
-
"@backstage/cli": "
|
|
89
|
-
"@backstage/config": "
|
|
87
|
+
"@backstage/backend-test-utils": "1.9.1-next.1",
|
|
88
|
+
"@backstage/cli": "0.34.4-next.1",
|
|
89
|
+
"@backstage/config": "1.3.4-next.0",
|
|
90
90
|
"@types/lodash": "^4.14.151"
|
|
91
91
|
}
|
|
92
92
|
}
|