@nwire/rbac 0.12.0 → 0.13.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/rbac.d.ts CHANGED
@@ -26,7 +26,8 @@
26
26
  * // 3b. Programmatic — gate inside a handler
27
27
  * defineAction({
28
28
  * name: "posts.delete",
29
- * handler: async (input, ctx) => {
29
+ * handler: async (ctx) => {
30
+ * const { input } = ctx;
30
31
  * const post = await db.query.posts.findFirst({ where: eq(posts.id, input.id) });
31
32
  * if (!post) throw NotFound;
32
33
  * const ability = ctx.ability();
package/dist/rbac.js CHANGED
@@ -26,7 +26,8 @@
26
26
  * // 3b. Programmatic — gate inside a handler
27
27
  * defineAction({
28
28
  * name: "posts.delete",
29
- * handler: async (input, ctx) => {
29
+ * handler: async (ctx) => {
30
+ * const { input } = ctx;
30
31
  * const post = await db.query.posts.findFirst({ where: eq(posts.id, input.id) });
31
32
  * if (!post) throw NotFound;
32
33
  * const ability = ctx.ability();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nwire/rbac",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Nwire — RBAC + permissions wrapped around CASL. defineAbility(user => ...) declares what each user can do; rbacPlugin enforces it on every dispatch.",
5
5
  "keywords": [
6
6
  "authorization",
@@ -30,9 +30,9 @@
30
30
  "dependencies": {
31
31
  "@casl/ability": "^6.8.1",
32
32
  "koa": "^2.16.4",
33
- "@nwire/app": "0.12.0",
34
- "@nwire/auth": "0.12.0",
35
- "@nwire/forge": "0.12.0"
33
+ "@nwire/app": "0.13.0",
34
+ "@nwire/forge": "0.13.0",
35
+ "@nwire/auth": "0.13.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "^22.19.9",