@backstage/plugin-scaffolder-node 0.8.0-next.2 → 0.8.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 +85 -0
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,90 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-node
|
|
2
2
|
|
|
3
|
+
## 0.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1a58846: **DEPRECATION**: We've deprecated the old way of defining actions using `createTemplateAction` with raw `JSONSchema` and type parameters, as well as using `zod` through an import. You can now use the new format to define `createTemplateActions` with `zod` provided by the framework. This change also removes support for `logStream` in the `context` as well as moving the `logger` to an instance of `LoggerService`.
|
|
8
|
+
|
|
9
|
+
Before:
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
createTemplateAction<{ repoUrl: string }, { test: string }>({
|
|
13
|
+
id: 'test',
|
|
14
|
+
schema: {
|
|
15
|
+
input: {
|
|
16
|
+
type: 'object',
|
|
17
|
+
required: ['repoUrl'],
|
|
18
|
+
properties: {
|
|
19
|
+
repoUrl: { type: 'string' },
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
output: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
required: ['test'],
|
|
25
|
+
properties: {
|
|
26
|
+
test: { type: 'string' },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
handler: async ctx => {
|
|
31
|
+
ctx.logStream.write('blob');
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// or
|
|
36
|
+
|
|
37
|
+
createTemplateAction({
|
|
38
|
+
id: 'test',
|
|
39
|
+
schema: {
|
|
40
|
+
input: z.object({
|
|
41
|
+
repoUrl: z.string(),
|
|
42
|
+
}),
|
|
43
|
+
output: z.object({
|
|
44
|
+
test: z.string(),
|
|
45
|
+
}),
|
|
46
|
+
},
|
|
47
|
+
handler: async ctx => {
|
|
48
|
+
ctx.logStream.write('something');
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
After:
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
createTemplateAction({
|
|
57
|
+
id: 'test',
|
|
58
|
+
schema: {
|
|
59
|
+
input: {
|
|
60
|
+
repoUrl: d => d.string(),
|
|
61
|
+
},
|
|
62
|
+
output: {
|
|
63
|
+
test: d => d.string(),
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
handler: async ctx => {
|
|
67
|
+
// you can just use ctx.logger.log('...'), or if you really need a log stream you can do this:
|
|
68
|
+
const logStream = new PassThrough();
|
|
69
|
+
logStream.on('data', chunk => {
|
|
70
|
+
ctx.logger.info(chunk.toString());
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Patch Changes
|
|
77
|
+
|
|
78
|
+
- 09cf038: Got rid of most `@backstage/backend-common` usages
|
|
79
|
+
- 4f8b5b6: Allow signing git commits using configured private PGP key in scaffolder
|
|
80
|
+
- Updated dependencies
|
|
81
|
+
- @backstage/integration@1.16.2
|
|
82
|
+
- @backstage/plugin-scaffolder-common@1.5.10
|
|
83
|
+
- @backstage/backend-plugin-api@1.2.1
|
|
84
|
+
- @backstage/catalog-model@1.7.3
|
|
85
|
+
- @backstage/errors@1.2.7
|
|
86
|
+
- @backstage/types@1.2.1
|
|
87
|
+
|
|
3
88
|
## 0.8.0-next.2
|
|
4
89
|
|
|
5
90
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-scaffolder-node",
|
|
3
|
-
"version": "0.8.0
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "The plugin-scaffolder-node module for @backstage/plugin-scaffolder-backend",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "node-library",
|
|
@@ -62,12 +62,12 @@
|
|
|
62
62
|
"test": "backstage-cli package test"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@backstage/backend-plugin-api": "1.2.1
|
|
66
|
-
"@backstage/catalog-model": "1.7.3",
|
|
67
|
-
"@backstage/errors": "1.2.7",
|
|
68
|
-
"@backstage/integration": "1.16.2
|
|
69
|
-
"@backstage/plugin-scaffolder-common": "1.5.10
|
|
70
|
-
"@backstage/types": "1.2.1",
|
|
65
|
+
"@backstage/backend-plugin-api": "^1.2.1",
|
|
66
|
+
"@backstage/catalog-model": "^1.7.3",
|
|
67
|
+
"@backstage/errors": "^1.2.7",
|
|
68
|
+
"@backstage/integration": "^1.16.2",
|
|
69
|
+
"@backstage/plugin-scaffolder-common": "^1.5.10",
|
|
70
|
+
"@backstage/types": "^1.2.1",
|
|
71
71
|
"@isomorphic-git/pgp-plugin": "^0.0.7",
|
|
72
72
|
"concat-stream": "^2.0.0",
|
|
73
73
|
"fs-extra": "^11.2.0",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"zod-to-json-schema": "^3.20.4"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@backstage/backend-test-utils": "1.3.1
|
|
86
|
-
"@backstage/cli": "0.31.0
|
|
87
|
-
"@backstage/config": "1.3.2"
|
|
85
|
+
"@backstage/backend-test-utils": "^1.3.1",
|
|
86
|
+
"@backstage/cli": "^0.31.0",
|
|
87
|
+
"@backstage/config": "^1.3.2"
|
|
88
88
|
}
|
|
89
89
|
}
|