Releases: tinyland-inc/tinyland-auth-pg
Releases · tinyland-inc/tinyland-auth-pg
v0.2.4
Added
bootstrapUsers({ storage | pool | connectionString, tenantId, users, passwordHasher? })for idempotent tenant-scoped deploy/startup auth user seeding.- Root and
./bootstrap-userspackage exports for the helper and public types.
Fixed
- Keeps bootstrap user create/update logic on the shared adapter boundary instead of requiring consumers to duplicate raw SQL upsert logic.
v0.2.3
Broaden @tummycrypt/tinyland-auth peer compatibility to include 0.3.x and validate against auth 0.3.0.
v0.2.2
Publish @tummycrypt/tinyland-auth-pg 0.2.2 from the existing signed v0.2.2 tag.
v0.2.1
v0.2.1
Added
- first-class
NodePgStorageAdapter createNodePgStorageAdapter({ connectionString, poolConfig?, closeOnDispose? })- Docker-backed node-postgres smoke coverage
Fixed
- shared package now has a truthful self-hosted PostgreSQL path for CNPG/local PG without requiring consumer-local adapter hacks
- CI/publish workflow now publishes to npm without the stale GitHub Packages branch
Notes
- this release preserves the tenant-scoped
0.2.xAPI introduced inv0.2.0 - self-hosted consumers can now use node-postgres directly through the shared package
v0.2.0 — driver-agnostic + Pattern B tenant isolation
Breaking release. Every adapter method now takes tenantId: string as its first parameter. Every row-bearing table carries tenant_id uuid NOT NULL.
Full migration guide: CHANGELOG.md
Highlights
- Driver-agnostic construction via
createPgStorageAdapter({ db })— accepts any drizzle client (drizzle-orm/neon-http,drizzle-orm/postgres-js,drizzle-orm/node-postgres). Callers own the client lifecycle. PgBouncer-compatible withpostgres.jsand{ prepare: false }. - Pattern B tenant isolation —
tenant_idon every row-bearing table, composite uniques scoped to(tenant_id, <col>),TenantScoped<T>return types. - Construction-time validation on both
{ db }and{ connectionString }branches. - Driver-agnostic delete counts via
.returning({...}).length(fixes silent zero on postgres.js). - 29 unit tests + 3 testcontainers smoke tests exercising the postgres.js path end-to-end.
New exports
Database— union of supported drizzle client typesTenantScoped<T>— widens a domain type with{ tenantId: string }PgStorageConfig— discriminated union accepted by the factory
Deprecated
createPgStorageAdapter({ connectionString }) still works but only resolves to neon-http. Prefer { db } for all new code — required for PgBouncer, node-postgres, and self-hosted Postgres.
v0.1.1
Fix publishConfig access, add test gate to publish workflow.