@beignet/provider-db-drizzle 0.0.9

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 (43) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/README.md +1046 -0
  3. package/dist/mysql/index.d.ts +254 -0
  4. package/dist/mysql/index.d.ts.map +1 -0
  5. package/dist/mysql/index.js +348 -0
  6. package/dist/mysql/index.js.map +1 -0
  7. package/dist/postgres/index.d.ts +240 -0
  8. package/dist/postgres/index.d.ts.map +1 -0
  9. package/dist/postgres/index.js +296 -0
  10. package/dist/postgres/index.js.map +1 -0
  11. package/dist/shared/idempotency-core.d.ts +71 -0
  12. package/dist/shared/idempotency-core.d.ts.map +1 -0
  13. package/dist/shared/idempotency-core.js +169 -0
  14. package/dist/shared/idempotency-core.js.map +1 -0
  15. package/dist/shared/identifiers.d.ts +20 -0
  16. package/dist/shared/identifiers.d.ts.map +1 -0
  17. package/dist/shared/identifiers.js +27 -0
  18. package/dist/shared/identifiers.js.map +1 -0
  19. package/dist/shared/instrumentation.d.ts +19 -0
  20. package/dist/shared/instrumentation.d.ts.map +1 -0
  21. package/dist/shared/instrumentation.js +41 -0
  22. package/dist/shared/instrumentation.js.map +1 -0
  23. package/dist/shared/outbox-core.d.ts +76 -0
  24. package/dist/shared/outbox-core.d.ts.map +1 -0
  25. package/dist/shared/outbox-core.js +193 -0
  26. package/dist/shared/outbox-core.js.map +1 -0
  27. package/dist/shared/rows.d.ts +84 -0
  28. package/dist/shared/rows.d.ts.map +1 -0
  29. package/dist/shared/rows.js +128 -0
  30. package/dist/shared/rows.js.map +1 -0
  31. package/dist/sqlite/index.d.ts +235 -0
  32. package/dist/sqlite/index.d.ts.map +1 -0
  33. package/dist/sqlite/index.js +293 -0
  34. package/dist/sqlite/index.js.map +1 -0
  35. package/package.json +173 -0
  36. package/src/mysql/index.ts +627 -0
  37. package/src/postgres/index.ts +572 -0
  38. package/src/shared/idempotency-core.ts +280 -0
  39. package/src/shared/identifiers.ts +28 -0
  40. package/src/shared/instrumentation.ts +49 -0
  41. package/src/shared/outbox-core.ts +322 -0
  42. package/src/shared/rows.ts +197 -0
  43. package/src/sqlite/index.ts +547 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,82 @@
1
+ # @beignet/provider-db-drizzle
2
+
3
+ ## 0.0.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 6ebec8c: Add `/postgres` and `/mysql` subpaths. `@beignet/provider-db-drizzle/postgres` (node-postgres) and `@beignet/provider-db-drizzle/mysql` (mysql2, MySQL 8.0+) now ship the same contract as `/sqlite`: a typed `DbPort`, unit of work, transactional outbox, and idempotency storage, each with `createDrizzlePostgres*` / `createDrizzleMysql*` factories, `POSTGRES_DB_URL` / `MYSQL_DB_URL` env config, and devtools query instrumentation. A shared conformance test suite now proves identical unit-of-work, outbox, and idempotency semantics across all three databases. `pg` and `mysql2` are optional peer dependencies — install only the driver you use.
8
+ - 1bb42a3: Rename `@beignet/provider-drizzle-turso` to `@beignet/provider-db-drizzle`, with databases as subpath exports. Import from `@beignet/provider-db-drizzle/sqlite`; `DrizzleTurso*` symbols are now `DrizzleSqlite*`, the provider registers as `drizzle-sqlite`, and the connection env vars are `SQLITE_DB_URL` and `SQLITE_DB_AUTH_TOKEN` (the auth token applies to hosted libSQL such as Turso). Provider packages now follow `provider-<capability>-<implementation>` naming, and multi-backend implementations add backends as subpaths — `/postgres` and `/mysql` are planned next.
9
+
10
+ ## 0.0.8
11
+
12
+ ## 0.0.7
13
+
14
+ ## 0.0.6
15
+
16
+ ## 0.0.5
17
+
18
+ ## 0.0.4
19
+
20
+ ### Patch Changes
21
+
22
+ - 8bcb31f: Mark package READMEs with Beignet's experimental alpha status and 0.0.x stability expectations.
23
+ - d137044: Declare `@beignet/core` as a peer dependency with a lockstep version range in
24
+ every integration and provider package instead of a regular `"*"` dependency.
25
+ Installs now always resolve a single shared copy of core, so `instanceof`
26
+ checks such as `isContractError` and upload error identity keep working, and
27
+ mixed Beignet versions fail loudly at install time instead of at runtime.
28
+
29
+ If your package manager does not install peer dependencies automatically, add
30
+ `@beignet/core` to your app alongside these packages. `@beignet/nuqs` now also
31
+ declares `@beignet/react-query` as a peer dependency, and
32
+ `@beignet/provider-storage-s3` now expects you to install
33
+ `@aws-sdk/client-s3` and `@aws-sdk/s3-request-presigner` yourself, matching
34
+ how other providers treat their SDKs.
35
+
36
+ - 780955c: Add Drizzle/Turso-backed durable idempotency storage with setup SQL, root and transaction-client ports, and Unit of Work rollback coverage for idempotency and outbox writes.
37
+ - 89390fe: Harden the Drizzle/Turso outbox and idempotency adapters and widen database URL validation:
38
+
39
+ - `markDelivered(...)` and `markFailed(...)` now trust the driver-reported `rowsAffected` instead of re-reading the row after the update. The re-read raced with legitimate re-claims (a concurrent worker could re-claim a message immediately after `markFailed` returned it to `pending`) and threw spurious `OutboxClaimError`s. The verification read only runs as a fallback when the driver does not report `rowsAffected`.
40
+ - Idempotency `complete(...)` and `fail(...)` no longer silently no-op when no in-progress reservation matches the key and fingerprint. They now throw the new `DrizzleTursoIdempotencyMutationError`, surfacing workflow bugs such as double completion, missing reservations, and fingerprint mismatches. Like `reserve(...)`, a missing `rowsAffected` is treated as success.
41
+ - `TURSO_DB_URL` now accepts every URL scheme `@libsql/client` accepts: `libsql://` and `file:` plus `http://`, `https://`, `ws://`, and `wss://` for local or self-hosted sqld instances.
42
+
43
+ - 69b8c35: Replace the README's broken multiple-databases example. The provider reads one connection from `TURSO_DB_URL`, so registering it twice cannot target two databases; the docs now explain the limitation and show wiring a second database through an app-owned typed provider with its own env prefix.
44
+ - 1a79090: Emit Node-compatible ESM: all relative imports in published packages now carry explicit .js extensions, fixing ERR_MODULE_NOT_FOUND when running the CLI or importing package dist files under plain Node.
45
+ - 44f1192: Move first-party provider diagnostics to package-owned `beignet.provider`
46
+ manifest metadata and have doctor read installed provider package manifests.
47
+ - 2aa77ca: Add static provider metadata and provider wiring diagnostics for generated apps.
48
+ - aa5425c: Clarify Postgres guidance in the provider README with public-facing database adapter language.
49
+ - 03b1743: Document durable workflow provider conventions for retries, backoff, dead-letter state, and unsupported provider semantics.
50
+ - 69b8c35: Require patched dependency versions for security advisories: drizzle-orm
51
+ `^0.45.2` (SQL injection via improperly escaped identifiers, GHSA advisory
52
+ patched in 0.45.2) and nodemailer `^8.0.5` (SMTP command injection fixes).
53
+ Generated apps now scaffold with drizzle-orm `^0.45.2` and drizzle-kit
54
+ `^0.31.10`.
55
+ - 8063d38: Rename the contract front door to `defineContract`/`defineContractGroup`, rename operational commands to tasks (`@beignet/core/tasks`, `defineTasks`, `runTask`, `beignet task run`, `beignet make task`, `server/tasks.ts`, `features/<feature>/tasks/`, `paths.tasks`), and standardize context binding: context-free declarations stay top-level (`defineEvent`), while context-bound definitions come from per-capability factories (`createListeners`, `createJobs`, `createSchedules`, `createNotifications`, `createTasks`) called once in `lib/`. Top-level context-generic `defineListener`, `defineJob`, `defineSchedule`, and `defineNotification` are removed.
56
+
57
+ ## 0.0.3
58
+
59
+ ### Patch Changes
60
+
61
+ - Updated dependencies [3160184]
62
+ - Updated dependencies [254ef6d]
63
+ - Updated dependencies [4cb1784]
64
+ - Updated dependencies [8bd9085]
65
+ - @beignet/core@0.0.3
66
+
67
+ ## 0.0.2
68
+
69
+ ### Patch Changes
70
+
71
+ - 90b29ad: Add pagination primitives and generate list responses with `items` and `page`.
72
+ - 07fa19c: Add durable outbox primitives for transactionally recording events and jobs, plus a Drizzle/Turso outbox adapter.
73
+ - Updated dependencies [90b29ad]
74
+ - Updated dependencies [07fa19c]
75
+ - Updated dependencies [08bae67]
76
+ - Updated dependencies [730a818]
77
+ - Updated dependencies [a79f60c]
78
+ - @beignet/core@0.0.2
79
+
80
+ ## 0.0.1
81
+
82
+ - Initial Beignet release under the `@beignet` npm scope.