Version Packages

This commit is contained in:
github-actions[bot]
2022-10-18 09:55:10 +00:00
parent dd1fefda24
commit f0196a2f04
455 changed files with 5334 additions and 1778 deletions
+40
View File
@@ -1,5 +1,45 @@
# @backstage/plugin-permission-node
## 0.7.0
### 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
- 9335ad115e: Exported types for the .metadata endpoint of the permission router
- Updated dependencies
- @backstage/backend-common@0.15.2
- @backstage/plugin-auth-node@0.2.6
- @backstage/plugin-permission-common@0.7.0
- @backstage/config@1.0.3
- @backstage/errors@1.1.2
## 0.7.0-next.2
### Minor 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.7.0-next.2",
"version": "0.7.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",