@backstage/plugin-scaffolder-common 0.2.0 → 0.2.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 +9 -0
- package/dist/index.d.ts +134 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-common
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix for the previous release with missing type declarations.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/catalog-model@0.10.1
|
|
10
|
+
- @backstage/types@0.1.3
|
|
11
|
+
|
|
3
12
|
## 0.2.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { JsonObject, JsonValue } from '@backstage/types';
|
|
2
|
+
import { Entity, KindValidator } from '@backstage/catalog-model';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Metadata about the Template that was the originator of a scaffolder task, as
|
|
6
|
+
* stored in the database.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
declare type TemplateMetadata = {
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* An individual step of a scaffolder task, as stored in the database.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
interface TaskStep {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
action: string;
|
|
22
|
+
input?: JsonObject;
|
|
23
|
+
if?: string | boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A scaffolder task as stored in the database, generated from a v1beta2
|
|
27
|
+
* apiVersion Template.
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
* @deprecated Please convert your templates to TaskSpecV1beta3 on apiVersion
|
|
31
|
+
* scaffolder.backstage.io/v1beta3
|
|
32
|
+
*/
|
|
33
|
+
interface TaskSpecV1beta2 {
|
|
34
|
+
apiVersion: 'backstage.io/v1beta2';
|
|
35
|
+
baseUrl?: string;
|
|
36
|
+
values: JsonObject;
|
|
37
|
+
steps: TaskStep[];
|
|
38
|
+
output: {
|
|
39
|
+
[name: string]: string;
|
|
40
|
+
};
|
|
41
|
+
metadata?: TemplateMetadata;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A scaffolder task as stored in the database, generated from a v1beta3
|
|
45
|
+
* apiVersion Template.
|
|
46
|
+
*
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
interface TaskSpecV1beta3 {
|
|
50
|
+
apiVersion: 'scaffolder.backstage.io/v1beta3';
|
|
51
|
+
baseUrl?: string;
|
|
52
|
+
parameters: JsonObject;
|
|
53
|
+
steps: TaskStep[];
|
|
54
|
+
output: {
|
|
55
|
+
[name: string]: JsonValue;
|
|
56
|
+
};
|
|
57
|
+
metadata?: TemplateMetadata;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* A scaffolder task as stored in the database, generated from a Template.
|
|
61
|
+
*
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
declare type TaskSpec = TaskSpecV1beta2 | TaskSpecV1beta3;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Backstage catalog Template kind Entity. Templates are used by the Scaffolder
|
|
68
|
+
* plugin to create new entities, such as Components.
|
|
69
|
+
*
|
|
70
|
+
* @public
|
|
71
|
+
* @deprecated Please convert your templates to TemplateEntityV1beta3 on
|
|
72
|
+
* apiVersion scaffolder.backstage.io/v1beta3
|
|
73
|
+
*/
|
|
74
|
+
interface TemplateEntityV1beta2 extends Entity {
|
|
75
|
+
apiVersion: 'backstage.io/v1beta2';
|
|
76
|
+
kind: 'Template';
|
|
77
|
+
spec: {
|
|
78
|
+
type: string;
|
|
79
|
+
parameters?: JsonObject | JsonObject[];
|
|
80
|
+
steps: Array<{
|
|
81
|
+
id?: string;
|
|
82
|
+
name?: string;
|
|
83
|
+
action: string;
|
|
84
|
+
input?: JsonObject;
|
|
85
|
+
if?: string | boolean;
|
|
86
|
+
}>;
|
|
87
|
+
output?: {
|
|
88
|
+
[name: string]: string;
|
|
89
|
+
};
|
|
90
|
+
owner?: string;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Entity data validator for {@link TemplateEntityV1beta2}.
|
|
95
|
+
*
|
|
96
|
+
* @public
|
|
97
|
+
* @deprecated Please convert your templates to TemplateEntityV1beta3 on
|
|
98
|
+
* apiVersion scaffolder.backstage.io/v1beta3
|
|
99
|
+
*/
|
|
100
|
+
declare const templateEntityV1beta2Validator: KindValidator;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Backstage catalog Template kind Entity. Templates are used by the Scaffolder
|
|
104
|
+
* plugin to create new entities, such as Components.
|
|
105
|
+
*
|
|
106
|
+
* @public
|
|
107
|
+
*/
|
|
108
|
+
interface TemplateEntityV1beta3 extends Entity {
|
|
109
|
+
apiVersion: 'scaffolder.backstage.io/v1beta3';
|
|
110
|
+
kind: 'Template';
|
|
111
|
+
spec: {
|
|
112
|
+
type: string;
|
|
113
|
+
parameters?: JsonObject | JsonObject[];
|
|
114
|
+
steps: Array<{
|
|
115
|
+
id?: string;
|
|
116
|
+
name?: string;
|
|
117
|
+
action: string;
|
|
118
|
+
input?: JsonObject;
|
|
119
|
+
if?: string | boolean;
|
|
120
|
+
}>;
|
|
121
|
+
output?: {
|
|
122
|
+
[name: string]: string;
|
|
123
|
+
};
|
|
124
|
+
owner?: string;
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Entity data validator for {@link TemplateEntityV1beta3}.
|
|
129
|
+
*
|
|
130
|
+
* @public
|
|
131
|
+
*/
|
|
132
|
+
declare const templateEntityV1beta3Validator: KindValidator;
|
|
133
|
+
|
|
134
|
+
export { TaskSpec, TaskSpecV1beta2, TaskSpecV1beta3, TaskStep, TemplateEntityV1beta2, TemplateEntityV1beta3, TemplateMetadata, templateEntityV1beta2Validator, templateEntityV1beta3Validator };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-scaffolder-common",
|
|
3
3
|
"description": "Common functionalities for the scaffolder, to be shared between scaffolder and scaffolder-backend plugin",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"url": "https://github.com/backstage/backstage/issues"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@backstage/catalog-model": "^0.10.
|
|
43
|
-
"@backstage/types": "^0.1.
|
|
42
|
+
"@backstage/catalog-model": "^0.10.1",
|
|
43
|
+
"@backstage/types": "^0.1.3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@backstage/cli": "^0.14.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "e244b348c473700e7d5e5fbcef38bd9f9fd1d0ba",
|
|
49
49
|
"module": "dist/index.esm.js"
|
|
50
50
|
}
|