Version Packages (next)
This commit is contained in:
@@ -1,5 +1,76 @@
|
||||
# @backstage/plugin-scaffolder-node
|
||||
|
||||
## 0.9.0-next.2
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 5863b04: **BREAKING CHANGES**
|
||||
|
||||
The legacy methods to define `createTemplateActions` have been replaced with the new native `zod` approaches for defining input and output schemas.
|
||||
|
||||
You can migrate actions that look like the following with the below examples:
|
||||
|
||||
```ts
|
||||
// really old legacy json schema
|
||||
createTemplateAction<{ repoUrl: string }, { repoOutput: string }>({
|
||||
id: 'test',
|
||||
schema: {
|
||||
input: {
|
||||
type: 'object'
|
||||
required: ['repoUrl']
|
||||
properties: {
|
||||
repoUrl: {
|
||||
type: 'string',
|
||||
description: 'repository url description'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// old zod method
|
||||
createTemplateAction({
|
||||
id: 'test'
|
||||
schema: {
|
||||
input: {
|
||||
repoUrl: z.string({ description: 'repository url description' })
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// new method:
|
||||
createTemplateAction({
|
||||
id: 'test',
|
||||
schema: {
|
||||
input: {
|
||||
repoUrl: z => z.string({ description: 'repository url description' })
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// or for more complex zod types like unions
|
||||
createTemplateAction({
|
||||
id: 'test',
|
||||
schema: {
|
||||
input: z => z.object({
|
||||
repoUrl: z.string({ description: 'repository url description' })
|
||||
})
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
This breaking change also means that `logStream` has been removed entirely from `ActionsContext`, and that the `logger` is now just a `LoggerService` implementation instead. There is no replacement for the `logStream`, if you wish to still keep using a `logStream` we recommend that you create your own stream that writes to `ctx.logger` instead.
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/backend-plugin-api@1.4.0-next.1
|
||||
- @backstage/catalog-model@1.7.4
|
||||
- @backstage/errors@1.2.7
|
||||
- @backstage/integration@1.17.0
|
||||
- @backstage/types@1.2.1
|
||||
- @backstage/plugin-scaffolder-common@1.5.11
|
||||
|
||||
## 0.8.3-next.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@backstage/plugin-scaffolder-node",
|
||||
"version": "0.8.3-next.1",
|
||||
"version": "0.9.0-next.2",
|
||||
"description": "The plugin-scaffolder-node module for @backstage/plugin-scaffolder-backend",
|
||||
"backstage": {
|
||||
"role": "node-library",
|
||||
|
||||
Reference in New Issue
Block a user