@saasicat/adapter-drizzle 1.0.0-rc.2 → 1.0.0-rc.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.
- package/README.md +19 -0
- package/dist/.build-stamp +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
# @saasicat/adapter-drizzle
|
|
2
2
|
|
|
3
|
+
## What this is
|
|
4
|
+
|
|
3
5
|
The Drizzle + PostgreSQL persistence adapter for SaaSiCat. Same ports, same
|
|
4
6
|
canonical schema and the same executable contract as
|
|
5
7
|
`@saasicat/adapter-prisma` — `@saasicat/persistence-testing` runs the
|
|
6
8
|
identical suite against both adapters in CI, which is what makes "swap the
|
|
7
9
|
ORM, keep the guarantees" a verified claim.
|
|
8
10
|
|
|
11
|
+
## What this is not
|
|
12
|
+
|
|
13
|
+
Not a drop-in equal of `@saasicat/adapter-prisma`. It implements the core
|
|
14
|
+
persistence slices — plans, plan versions, subscriptions, audit, MFA, promo
|
|
15
|
+
codes and their redemptions — and the contract suite marks what is missing as
|
|
16
|
+
skipped rather than passing. Check the shipped-adapter table below before
|
|
17
|
+
choosing it for a deployment that needs the whole surface.
|
|
18
|
+
|
|
19
|
+
Not a schema owner either: the tables come from `@saasicat/spec`, and your
|
|
20
|
+
Drizzle schema declares them. It does not create or migrate anything.
|
|
21
|
+
|
|
9
22
|
## Quickstart — the bundle
|
|
10
23
|
|
|
11
24
|
```ts
|
|
@@ -83,3 +96,9 @@ The integration run applies the normative reference SQL and executes the
|
|
|
83
96
|
`@saasicat/persistence-testing` contract plus drizzle-specific interop
|
|
84
97
|
tests. **The database is disposable: the harness drops and recreates its
|
|
85
98
|
`public` schema.**
|
|
99
|
+
|
|
100
|
+
## Next
|
|
101
|
+
|
|
102
|
+
- [Ports and adapters](../../docs/explanation/adr/0007-ports-and-adapters.md) — why the seam is here
|
|
103
|
+
- [Data model](../../docs/explanation/data-model.md) — the tables and their constraints
|
|
104
|
+
- [`@saasicat/persistence-testing`](../persistence-testing/README.md) — the contract this passes
|
package/dist/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
77b29de030049a943d96341b062016bc99ba5ea5e5ab5cba2cb379ac1f4bddef
|
package/dist/index.d.cts
CHANGED
|
@@ -2618,7 +2618,7 @@ declare class DrizzleSubscriptionRepository implements SubscriptionRepository {
|
|
|
2618
2618
|
/**
|
|
2619
2619
|
* `PlanVersionRepository` against the canonical `plan_versions` table.
|
|
2620
2620
|
* `findActive` is deliberately not implemented — the canonical schema has no
|
|
2621
|
-
* `validFrom`/`validUntil` columns yet (see docs/data-model.md, Known gaps).
|
|
2621
|
+
* `validFrom`/`validUntil` columns yet (see docs/explanation/data-model.md, Known gaps).
|
|
2622
2622
|
*/
|
|
2623
2623
|
declare class DrizzlePlanVersionRepository implements PlanVersionRepository {
|
|
2624
2624
|
private readonly db;
|
|
@@ -2726,7 +2726,7 @@ declare class DrizzleSuperAdminBootstrapAdapter implements SuperAdminProvisionin
|
|
|
2726
2726
|
* `PlanCatalogReadSink` against the canonical `plans`, `plan_versions` and
|
|
2727
2727
|
* `feature_catalog_entries` tables — DB hydration of the plan catalog at
|
|
2728
2728
|
* boot. `validFrom`/`validUntil` are reported as null: the canonical schema
|
|
2729
|
-
* does not persist booking windows yet (see docs/data-model.md, Known gaps).
|
|
2729
|
+
* does not persist booking windows yet (see docs/explanation/data-model.md, Known gaps).
|
|
2730
2730
|
*/
|
|
2731
2731
|
declare class DrizzlePlanCatalogReadSink implements PlanCatalogReadSink {
|
|
2732
2732
|
private readonly db;
|
package/dist/index.d.ts
CHANGED
|
@@ -2618,7 +2618,7 @@ declare class DrizzleSubscriptionRepository implements SubscriptionRepository {
|
|
|
2618
2618
|
/**
|
|
2619
2619
|
* `PlanVersionRepository` against the canonical `plan_versions` table.
|
|
2620
2620
|
* `findActive` is deliberately not implemented — the canonical schema has no
|
|
2621
|
-
* `validFrom`/`validUntil` columns yet (see docs/data-model.md, Known gaps).
|
|
2621
|
+
* `validFrom`/`validUntil` columns yet (see docs/explanation/data-model.md, Known gaps).
|
|
2622
2622
|
*/
|
|
2623
2623
|
declare class DrizzlePlanVersionRepository implements PlanVersionRepository {
|
|
2624
2624
|
private readonly db;
|
|
@@ -2726,7 +2726,7 @@ declare class DrizzleSuperAdminBootstrapAdapter implements SuperAdminProvisionin
|
|
|
2726
2726
|
* `PlanCatalogReadSink` against the canonical `plans`, `plan_versions` and
|
|
2727
2727
|
* `feature_catalog_entries` tables — DB hydration of the plan catalog at
|
|
2728
2728
|
* boot. `validFrom`/`validUntil` are reported as null: the canonical schema
|
|
2729
|
-
* does not persist booking windows yet (see docs/data-model.md, Known gaps).
|
|
2729
|
+
* does not persist booking windows yet (see docs/explanation/data-model.md, Known gaps).
|
|
2730
2730
|
*/
|
|
2731
2731
|
declare class DrizzlePlanCatalogReadSink implements PlanCatalogReadSink {
|
|
2732
2732
|
private readonly db;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saasicat/adapter-drizzle",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.4",
|
|
4
4
|
"description": "Drizzle + PostgreSQL persistence adapter for SaaSiCat: drizzlePersistence() bundle plus the individual adapters (MFA, audit, RLS bypass, transaction runner, subscription/plan-version/promo repositories, SuperAdmin bootstrap, plan-catalog sinks). Targets the canonical schema from @saasicat/spec and passes the same executable persistence contract as @saasicat/adapter-prisma.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@saasicat/core": "^1.0.0-rc.
|
|
26
|
+
"@saasicat/core": "^1.0.0-rc.4"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@nestjs/common": "^11.0.0",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"pg": "^8.22.0",
|
|
38
38
|
"tsup": "^8.0.0",
|
|
39
39
|
"typescript": "^6.0.0",
|
|
40
|
-
"@saasicat/persistence-testing": "^1.0.0-rc.
|
|
41
|
-
"@saasicat/spec": "^1.0.0-rc.
|
|
40
|
+
"@saasicat/persistence-testing": "^1.0.0-rc.4",
|
|
41
|
+
"@saasicat/spec": "^1.0.0-rc.4"
|
|
42
42
|
},
|
|
43
43
|
"license": "PolyForm-Shield-1.0.0",
|
|
44
44
|
"author": "Taci Uelker",
|