Version Packages (next)

This commit is contained in:
github-actions[bot]
2022-10-11 14:30:05 +00:00
parent 6e68cb86e8
commit 9282c018c7
329 changed files with 4446 additions and 165 deletions
+39
View File
@@ -1,5 +1,44 @@
# @backstage/plugin-permission-node
## 0.7.0-next.2
### Minor Changes
- 46b4a72cee: **BREAKING**: When defining permission rules, it's now necessary to provide a [ZodSchema](https://github.com/colinhacks/zod) that specifies the parameters the rule expects. This has been added to help better describe the parameters in the response of the metadata endpoint and to validate the parameters before a rule is executed.
To help with this, we have also made a change to the API of permission rules. Before, the permission rules `toQuery` and `apply` signature expected parameters to be separate arguments, like so...
```ts
createPermissionRule({
apply: (resource, foo, bar) => true,
toQuery: (foo, bar) => {},
});
```
The API has now changed to expect the parameters as a single object
```ts
createPermissionRule({
paramSchema: z.object({
foo: z.string().describe('Foo value to match'),
bar: z.string().describe('Bar value to match'),
}),
apply: (resource, { foo, bar }) => true,
toQuery: ({ foo, bar }) => {},
});
```
One final change made is to limit the possible values for a parameter to primitives and arrays of primitives.
### Patch Changes
- Updated dependencies
- @backstage/backend-common@0.15.2-next.2
- @backstage/plugin-permission-common@0.7.0-next.2
- @backstage/plugin-auth-node@0.2.6-next.2
- @backstage/config@1.0.3-next.2
- @backstage/errors@1.1.2-next.2
## 0.6.6-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/plugin-permission-node",
"description": "Common permission and authorization utilities for backend plugins",
"version": "0.6.6-next.1",
"version": "0.7.0-next.2",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",