@smplcty/auth 6.0.0 → 7.0.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/README.md +3 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -499,7 +499,9 @@ The library ships its schema as schema-flow YAML inside the package at `@smplcty
|
|
|
499
499
|
|
|
500
500
|
### Consuming with [`@smplcty/schema-flow`](https://www.npmjs.com/package/@smplcty/schema-flow)
|
|
501
501
|
|
|
502
|
-
Requires **`@smplcty/schema-flow >= 0.
|
|
502
|
+
Requires **`@smplcty/schema-flow >= 0.14.0`** — the shipped seeds assign no primary keys (the app-init user and the standard roles are matched by their natural keys, `name`/`kind`) and rely on insert-only seeding, where an existing row is never overwritten. `0.13.0` makes insert-only the default (the old per-table `seeds_on_conflict` knob is gone); on older versions these seeds would upsert and clobber any consumer edits to the standard roles on every migration. `0.14.0` is required so `resolve_session` converges: it canonicalises function type aliases (`resolve_session` returns a `TABLE(… expires_at timestamptz …)`), so the function no longer reports phantom drift on every `plan`/`run`/`drift`.
|
|
503
|
+
|
|
504
|
+
If you are upgrading an existing database, run schema-flow with `--allow-destructive` once: `0.14.0` recreates a function whose return type changed via `DROP … CASCADE` + a post-apply convergence pass that restores the dependent RLS policies, and (where a live DB carries a plain `UNIQUE` constraint sharing a name with one of auth's partial-unique indexes) drops the constraint and builds the partial index. Both paths are gated behind the flag; without it the change is reported as blocked rather than silently no-applied.
|
|
503
505
|
|
|
504
506
|
Import auth's schema and `@smplcty/schema-std` from your schema-flow config. See the reference [`schema-flow.config.yaml`](schema-flow.config.yaml):
|
|
505
507
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smplcty/auth",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Robust, type-safe session and role-based authentication primitives for PostgreSQL apps using Row-Level Security.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@eslint/js": "^10.0.1",
|
|
107
107
|
"@release-it/keep-a-changelog": "^7.1.0",
|
|
108
|
-
"@smplcty/schema-flow": "^0.
|
|
108
|
+
"@smplcty/schema-flow": "^0.14.0",
|
|
109
109
|
"@smplcty/twilio": "^0.1.1",
|
|
110
110
|
"@testcontainers/postgresql": "^12.0.2",
|
|
111
111
|
"@types/node": "^25.9.3",
|