@voltro/plugin-rbac 0.86.0 → 0.87.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/dist/index.js CHANGED
@@ -30,31 +30,35 @@ var A = k({ scope: "@voltro/plugin-rbac" }), j = (e) => x.suspend(() => {
30
30
  cause: String(e)
31
31
  }), x.succeed([])))), l = o ? yield* j(() => o(t)).pipe(x.catchCause(() => x.succeed([]))) : [], d = i(t, s, e.roles, l);
32
32
  c(t, d, s);
33
- }), f = (e, t) => x.gen(function* () {
34
- return yield* d(t.subject, t.tag, t.traceId), D(t.subject, (e) => x.runPromise(d(e, t.tag, t.traceId))), yield* e;
35
- }), p = [
33
+ }), f = (e) => {
34
+ D(e.subject, (t) => x.runPromise(d(t, e.tag, e.traceId)));
35
+ }, p = (e, t) => x.gen(function* () {
36
+ return yield* d(t.subject, t.tag, t.traceId), f(t), yield* e;
37
+ }), m = [
38
+ "rpc:authority:replay",
36
39
  "rpc:intercept:mutation",
37
40
  "rpc:intercept:query",
38
41
  "rpc:intercept:action",
39
42
  "rpc:intercept:workflow",
40
43
  ...s ? ["store:write"] : []
41
- ], m = o === void 0 ? n(e.roles) : void 0;
44
+ ], h = o === void 0 ? n(e.roles) : void 0;
42
45
  return T({
43
46
  name: E({
44
47
  base: M,
45
48
  alias: e.alias
46
49
  }),
47
50
  baseName: M,
48
- ...m === void 0 ? {} : { declaredScopes: m },
51
+ ...h === void 0 ? {} : { declaredScopes: h },
49
52
  description: "Role-based access control — roles compile to scopes on top of the protocol scope system. Ships the permission() handler guard + a role→scope interceptor + a resource-aware guard resolver, failing with protocol's typed ScopeError (one denial tag framework-wide).",
50
- permissions: p,
53
+ permissions: m,
51
54
  bindDataStore: (e) => {
52
55
  u = e;
53
56
  },
54
- interceptMutation: f,
55
- interceptQuery: f,
56
- interceptAction: f,
57
- interceptWorkflow: f,
57
+ bindReplayAuthority: f,
58
+ interceptMutation: p,
59
+ interceptQuery: p,
60
+ interceptAction: p,
61
+ interceptWorkflow: p,
58
62
  errorSchemas: [{
59
63
  schema: w,
60
64
  import: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/plugin-rbac",
3
- "version": "0.86.0",
3
+ "version": "0.87.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,9 +33,9 @@
33
33
  "node": ">=24.0.0"
34
34
  },
35
35
  "dependencies": {
36
- "@voltro/database": "0.86.0",
37
- "@voltro/logger": "0.86.0",
38
- "@voltro/protocol": "0.86.0"
36
+ "@voltro/database": "0.87.0",
37
+ "@voltro/logger": "0.87.0",
38
+ "@voltro/protocol": "0.87.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "effect": "4.0.1",