@voltro/plugin-rbac 0.83.1 → 0.85.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.
@@ -5,66 +5,10 @@ property of its respective copyright holders and is used under the terms of
5
5
  its license. This file is provided for attribution; it grants no rights in
6
6
  @voltro/plugin-rbac itself, which is proprietary (see LICENSE).
7
7
 
8
- Generated from the resolved runtime dependency closure (7 packages).
8
+ Generated from the resolved runtime dependency closure (5 packages).
9
9
 
10
10
  ---
11
11
 
12
- ## @effect/experimental@0.61.1
13
-
14
- License: MIT
15
-
16
- ```
17
- MIT License
18
-
19
- Copyright (c) 2023-present The Contributors
20
-
21
- Permission is hereby granted, free of charge, to any person obtaining a copy
22
- of this software and associated documentation files (the "Software"), to deal
23
- in the Software without restriction, including without limitation the rights
24
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
25
- copies of the Software, and to permit persons to whom the Software is
26
- furnished to do so, subject to the following conditions:
27
-
28
- The above copyright notice and this permission notice shall be included in all
29
- copies or substantial portions of the Software.
30
-
31
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
34
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
35
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
36
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
37
- SOFTWARE.
38
- ```
39
-
40
- ## @effect/sql@0.52.1
41
-
42
- License: MIT
43
-
44
- ```
45
- MIT License
46
-
47
- Copyright (c) 2023-present The Contributors
48
-
49
- Permission is hereby granted, free of charge, to any person obtaining a copy
50
- of this software and associated documentation files (the "Software"), to deal
51
- in the Software without restriction, including without limitation the rights
52
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
53
- copies of the Software, and to permit persons to whom the Software is
54
- furnished to do so, subject to the following conditions:
55
-
56
- The above copyright notice and this permission notice shall be included in all
57
- copies or substantial portions of the Software.
58
-
59
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
60
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
61
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
62
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
63
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
64
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
65
- SOFTWARE.
66
- ```
67
-
68
12
  ## jose@6.2.12
69
13
 
70
14
  License: MIT
package/dist/index.js CHANGED
@@ -59,18 +59,18 @@ var j = "_voltro_rbac_roles", M = "_voltro_rbac_user_roles", N = k(j, {
59
59
  y(({ subject: r, scope: i, resource: a }) => H(() => e(r, a)).pipe(p.map((e) => {
60
60
  let r = n(e, t.roles);
61
61
  return r.includes(m) || r.includes(i);
62
- }), p.catchAllCause((e) => (V.warn("resolveResourceRoles failed; denying (fail-closed)", {
62
+ }), p.catchCause((e) => (V.warn("resolveResourceRoles failed; denying (fail-closed)", {
63
63
  scope: i,
64
64
  resource: a,
65
65
  cause: String(e)
66
66
  }), p.succeed(!1)))));
67
67
  }
68
68
  let u, d = (n, r) => p.gen(function* () {
69
- let s = yield* H(() => i(r.subject, { ...u === void 0 ? {} : { store: u } })).pipe(p.catchAllCause((e) => (V.warn("resolveRoles failed; falling back to raw subject scopes", {
69
+ let s = yield* H(() => i(r.subject, { ...u === void 0 ? {} : { store: u } })).pipe(p.catchCause((e) => (V.warn("resolveRoles failed; falling back to raw subject scopes", {
70
70
  tag: r.tag,
71
71
  traceId: r.traceId,
72
72
  cause: String(e)
73
- }), p.succeed([])))), c = o ? yield* H(() => o(r.subject)).pipe(p.catchAllCause(() => p.succeed([]))) : [], l = e(r.subject, s, t.roles, c);
73
+ }), p.succeed([])))), c = o ? yield* H(() => o(r.subject)).pipe(p.catchCause(() => p.succeed([]))) : [], l = e(r.subject, s, t.roles, c);
74
74
  return a(r.subject, l, s), yield* n;
75
75
  }), f = [
76
76
  "rpc:intercept:mutation",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/plugin-rbac",
3
- "version": "0.83.1",
3
+ "version": "0.85.0",
4
4
  "description": "Role-based access control — roles compile to scopes on top of @voltro/protocol's scope system. Ships rbacPlugin() (role→scope interceptor + resource-aware guard resolver, failing with protocol's typed ScopeError), the permission()/assertPermission()/anyPermission() handler guards, the compileRoles() pure compiler, cross-dialect roles + userRoles tables. The UI gate lives in @voltro/client (useCan / useCanAny) — scopes are a framework concept, so gating a button must not require this plugin.",
5
5
  "keywords": [
6
6
  "voltro",
@@ -33,12 +33,12 @@
33
33
  "node": ">=24.0.0"
34
34
  },
35
35
  "dependencies": {
36
- "@voltro/database": "0.83.1",
37
- "@voltro/logger": "0.83.1",
38
- "@voltro/protocol": "0.83.1"
36
+ "@voltro/database": "0.85.0",
37
+ "@voltro/logger": "0.85.0",
38
+ "@voltro/protocol": "0.85.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "effect": "^3.22.2",
41
+ "effect": "4.0.1",
42
42
  "react": "^19.0.0"
43
43
  },
44
44
  "peerDependenciesMeta": {