@rowstile/next 0.1.0-alpha.2 → 0.1.0-alpha.4

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.
Files changed (2) hide show
  1. package/README.md +3 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -57,7 +57,9 @@ Traps it handles:
57
57
  transactions, from the first caller's context. `authz()` runs each `findUnique` in a transaction of its own,
58
58
  and refuses `$transaction([...])` (use `$transaction(async (tx) => ...)`), so no query runs as someone else.
59
59
  Use the client `$extends(authz())` returns, and only that one: the client it was made from is refused
60
- whenever it is used.
60
+ whenever it is used, inside your own extensions too. An extension you add to the client `authz()` returns is
61
+ placed before it, so `authz()` stays the last one: each of your query hooks runs once for a call, and sees
62
+ the errors `authz()` makes (`Refused`, `NotFound`).
61
63
  - **Inserts that read the row back** (`RETURNING`, Prisma's `create`) also need the select rule: Postgres's own
62
64
  message comes back as `Refused` naming the select rule.
63
65
  - **Prisma's promises are lazy**: `actingAs` and `job` await what they return inside their scope.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rowstile/next",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.4",
4
4
  "description": "rowstile with Next.js: signed-in reads kept out of caches, 403 and 404 from route handlers and server actions",
5
5
  "license": "Apache-2.0",
6
6
  "repository": { "type": "git", "url": "git+https://github.com/rowstile/rowstile.git", "directory": "sdk/typescript/next" },
@@ -18,7 +18,7 @@
18
18
  ],
19
19
  "sideEffects": true,
20
20
  "dependencies": {
21
- "@rowstile/client": "0.1.0-alpha.2"
21
+ "@rowstile/client": "0.1.0-alpha.4"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "next": ">=15"