@cosmicdrift/kumiko-framework 0.367.0 → 0.369.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.
Files changed (240) hide show
  1. package/AGENTS.md +1 -7
  2. package/README.md +1 -1
  3. package/agents/examples/access-control.md +2 -2
  4. package/agents/examples/anonymous-access-multitenant.md +2 -2
  5. package/agents/examples/anonymous-access.md +3 -3
  6. package/agents/examples/apex-landing.md +1 -1
  7. package/agents/examples/apex-surface-auth.md +6 -7
  8. package/agents/examples/api-worker-split.md +7 -8
  9. package/agents/examples/auth-claims.md +2 -1
  10. package/agents/examples/auth-foundation-providers.md +3 -3
  11. package/agents/examples/auth-mfa.md +3 -4
  12. package/agents/examples/basic-entity.md +3 -4
  13. package/agents/examples/chat-channels.md +4 -4
  14. package/agents/examples/compliance-profiles-demo.md +2 -3
  15. package/agents/examples/cross-feature-events.md +4 -4
  16. package/agents/examples/crypto-shredding-hr.md +14 -9
  17. package/agents/examples/currencies-global.md +3 -4
  18. package/agents/examples/currencies-per-tenant.md +3 -4
  19. package/agents/examples/custom-fields-basic.md +2 -3
  20. package/agents/examples/custom-handlers.md +3 -5
  21. package/agents/examples/dashboard-stats.md +2 -3
  22. package/agents/examples/delivery-notifications.md +5 -6
  23. package/agents/examples/e2e-generator.md +1 -1
  24. package/agents/examples/embedded-entity-form.md +2 -3
  25. package/agents/examples/embedded.md +2 -3
  26. package/agents/examples/encrypted-tenant-config.md +5 -6
  27. package/agents/examples/error-contract.md +3 -4
  28. package/agents/examples/event-sourcing.md +19 -23
  29. package/agents/examples/feature-toggles.md +4 -4
  30. package/agents/examples/field-access.md +3 -4
  31. package/agents/examples/files-post-processing.md +12 -13
  32. package/agents/examples/golden-path.md +208 -0
  33. package/agents/examples/idempotency.md +2 -2
  34. package/agents/examples/inbound-mail-triage.md +7 -7
  35. package/agents/examples/lane-routing.md +3 -3
  36. package/agents/examples/ledger-banking.md +2 -3
  37. package/agents/examples/ledger-invoicing.md +2 -3
  38. package/agents/examples/legal-pages.md +1 -1
  39. package/agents/examples/lifecycle-hooks.md +3 -3
  40. package/agents/examples/managed-config.md +3 -4
  41. package/agents/examples/managed-pages.md +2 -2
  42. package/agents/examples/notes-history-basic.md +4 -5
  43. package/agents/examples/ownership.md +3 -5
  44. package/agents/examples/pdf-audit-export.md +2 -3
  45. package/agents/examples/pipeline-basics.md +2 -2
  46. package/agents/examples/public-share-token.md +3 -3
  47. package/agents/examples/rate-limiting.md +2 -1
  48. package/agents/examples/realtime-sse.md +2 -3
  49. package/agents/examples/record-detail-layout.md +1 -1
  50. package/agents/examples/reference-data.md +3 -3
  51. package/agents/examples/relations.md +2 -2
  52. package/agents/examples/screens-nav.md +1 -1
  53. package/agents/examples/search.md +2 -2
  54. package/agents/examples/secrets-demo.md +8 -8
  55. package/agents/examples/security-baseline.md +2 -2
  56. package/agents/examples/session-revocation.md +7 -8
  57. package/agents/examples/state-machine.md +181 -165
  58. package/agents/examples/tags-basic.md +2 -3
  59. package/agents/examples/tenant-isolation.md +2 -3
  60. package/agents/examples/tenant-settings.md +2 -2
  61. package/agents/examples/tier-admin.md +3 -4
  62. package/agents/examples/timezones.md +3 -3
  63. package/agents/examples/user-data-rights.md +12 -8
  64. package/agents/examples/user-profile.md +3 -3
  65. package/agents/examples/webhook-step.md +2 -3
  66. package/agents/examples/wizard-form.md +4 -5
  67. package/agents/examples/workflow-engine.md +7 -3
  68. package/agents/examples/writeform-section.md +1 -1
  69. package/agents/examples.md +1 -0
  70. package/agents/features.md +4 -4
  71. package/dist/consumer-cli.js +2 -3
  72. package/dist/crypto/index.d.ts +1 -1
  73. package/dist/crypto/index.js +1 -1
  74. package/dist/crypto/owner-transition-rekey.js +2 -0
  75. package/dist/crypto/pg-kms-adapter.js +1 -1
  76. package/dist/crypto/subject-resolver.d.ts +2 -0
  77. package/dist/crypto/subject-resolver.js +30 -15
  78. package/dist/db/bun-db-deprecated.d.ts +10 -0
  79. package/dist/{bun-db/index.js → db/bun-db-deprecated.js} +4 -3
  80. package/dist/db/config-seed.js +1 -1
  81. package/dist/db/connection.d.ts +23 -5
  82. package/dist/db/connection.js +10 -5
  83. package/dist/db/dialect.js +1 -1
  84. package/dist/db/entity-field-encryption.d.ts +5 -0
  85. package/dist/db/entity-field-encryption.js +29 -0
  86. package/dist/db/entity-table-meta.js +6 -5
  87. package/dist/db/event-store-executor-read.js +26 -5
  88. package/dist/db/index.d.ts +4 -4
  89. package/dist/db/index.js +1 -1
  90. package/dist/db/migrate-runner.js +1 -1
  91. package/dist/db/queries/backfill-pii.js +16 -9
  92. package/dist/db/queries/ddl.js +1 -1
  93. package/dist/db/queries/event-store.d.ts +2 -0
  94. package/dist/db/queries/event-store.js +26 -0
  95. package/dist/db/queries/test-stack.js +1 -1
  96. package/dist/db/query.d.ts +105 -1
  97. package/dist/db/query.js +1450 -3
  98. package/dist/{stack/table-helpers.d.ts → db/table-push.d.ts} +5 -15
  99. package/dist/{stack/table-helpers.js → db/table-push.js} +6 -46
  100. package/dist/db/tenant-db.d.ts +11 -0
  101. package/dist/db/tenant-db.js +51 -12
  102. package/dist/derivatives/derivatives-context.d.ts +1 -1
  103. package/dist/derivatives/derivatives-context.js +1 -1
  104. package/dist/engine/boot-validator/gdpr-storage.js +3 -3
  105. package/dist/engine/boot-validator/pii-retention.js +3 -3
  106. package/dist/engine/boot-validator/record-owned.js +3 -3
  107. package/dist/engine/boot-validator/screens.js +37 -1
  108. package/dist/engine/bridge-stub.d.ts +4 -0
  109. package/dist/engine/bridge-stub.js +62 -0
  110. package/dist/engine/build-config-feature-schema.js +197 -65
  111. package/dist/engine/event-helpers.d.ts +2 -1
  112. package/dist/engine/event-helpers.js +1 -0
  113. package/dist/engine/extension-selector-plugins.d.ts +3 -0
  114. package/dist/engine/extension-selector-plugins.js +14 -0
  115. package/dist/engine/feature-config-events-jobs.d.ts +2 -0
  116. package/dist/engine/feature-config-events-jobs.js +3 -2
  117. package/dist/engine/index.d.ts +1 -0
  118. package/dist/engine/index.js +1 -0
  119. package/dist/es-ops/operations-schema.js +1 -1
  120. package/dist/event-store/admin-api.js +1 -1
  121. package/dist/event-store/archive.js +1 -1
  122. package/dist/event-store/errors.d.ts +2 -1
  123. package/dist/event-store/errors.js +6 -2
  124. package/dist/event-store/event-store.js +17 -9
  125. package/dist/event-store/events-schema.js +1 -1
  126. package/dist/event-store/rebuild-dead-letter.js +3 -3
  127. package/dist/event-store/snapshot.js +1 -1
  128. package/dist/event-store/upcaster-dead-letter.js +3 -3
  129. package/dist/files/create-file-ref-from-bytes.js +1 -1
  130. package/dist/files/file-routes.js +1 -1
  131. package/dist/i18n/settings-hub-keys.js +1 -2
  132. package/dist/internal/stack-support.d.ts +12 -0
  133. package/dist/internal/stack-support.js +12 -0
  134. package/dist/internal/testing.d.ts +4 -0
  135. package/dist/internal/testing.js +5 -0
  136. package/dist/jobs/job-runner.js +23 -11
  137. package/dist/migrations/pending-rebuilds.js +1 -1
  138. package/dist/migrations/pii-event-backfill.js +2 -2
  139. package/dist/pipeline/dispatch-shared.js +43 -23
  140. package/dist/pipeline/dispatch-write.js +6 -2
  141. package/dist/pipeline/dispatcher-utils.js +6 -2
  142. package/dist/pipeline/event-consumer-state.js +1 -1
  143. package/dist/pipeline/projection-rebuild.d.ts +1 -0
  144. package/dist/pipeline/projection-rebuild.js +1 -1
  145. package/dist/pipeline/projection-state.js +1 -1
  146. package/dist/pipeline/system-hooks.js +1 -1
  147. package/dist/schema-cli.js +3 -3
  148. package/dist/search/purge-subject.js +20 -10
  149. package/dist/seeding/index.d.ts +1 -0
  150. package/dist/seeding/index.js +1 -0
  151. package/dist/stack/index.d.ts +10 -9
  152. package/dist/stack/index.js +11 -19
  153. package/dist/testing/e2e-generator.d.ts +5 -49
  154. package/dist/testing/e2e-generator.js +5 -382
  155. package/dist/testing/handler-context.d.ts +5 -4
  156. package/dist/testing/handler-context.js +5 -69
  157. package/dist/testing/index.d.ts +10 -26
  158. package/dist/testing/index.js +10 -34
  159. package/dist/testing/real-providers.d.ts +5 -3
  160. package/dist/testing/real-providers.js +5 -21
  161. package/dist/upgrade-cli.js +6 -4
  162. package/package.json +37 -9
  163. package/src/changes.json +64 -0
  164. package/src/scripts/codemod/README.md +43 -0
  165. package/src/scripts/codemod/codemod-support.ts +276 -0
  166. package/src/scripts/codemod/db-factory.ts +810 -0
  167. package/src/scripts/codemod/feature-factory.ts +429 -0
  168. package/src/scripts/codemod/s3-imports.ts +274 -0
  169. package/src/scripts/codemod/tenant-db-options.ts +454 -0
  170. package/src/scripts/codemod/testing-move-targets.ts +161 -0
  171. package/src/scripts/codemod/testing-move.ts +520 -0
  172. package/dist/bun-db/connection.d.ts +0 -17
  173. package/dist/bun-db/connection.js +0 -40
  174. package/dist/bun-db/index.d.ts +0 -4
  175. package/dist/bun-db/query.d.ts +0 -106
  176. package/dist/bun-db/query.js +0 -1457
  177. package/dist/db/api.d.ts +0 -19
  178. package/dist/db/api.js +0 -23
  179. package/dist/db/bun-provider.d.ts +0 -2
  180. package/dist/db/bun-provider.js +0 -28
  181. package/dist/db/postgres-provider.d.ts +0 -2
  182. package/dist/db/postgres-provider.js +0 -21
  183. package/dist/db/query-api.d.ts +0 -2
  184. package/dist/db/query-api.js +0 -6
  185. package/dist/stack/db.d.ts +0 -22
  186. package/dist/stack/db.js +0 -67
  187. package/dist/stack/drain-event-consumers.d.ts +0 -4
  188. package/dist/stack/drain-event-consumers.js +0 -51
  189. package/dist/stack/drain-jobs.d.ts +0 -22
  190. package/dist/stack/drain-jobs.js +0 -141
  191. package/dist/stack/event-collector.d.ts +0 -9
  192. package/dist/stack/event-collector.js +0 -12
  193. package/dist/stack/push-entity-projection-tables.d.ts +0 -24
  194. package/dist/stack/push-entity-projection-tables.js +0 -74
  195. package/dist/stack/redis.d.ts +0 -17
  196. package/dist/stack/redis.js +0 -52
  197. package/dist/stack/request-helper.d.ts +0 -35
  198. package/dist/stack/request-helper.js +0 -144
  199. package/dist/stack/test-stack.d.ts +0 -192
  200. package/dist/stack/test-stack.js +0 -429
  201. package/dist/testing/access-assertions.d.ts +0 -2
  202. package/dist/testing/access-assertions.js +0 -13
  203. package/dist/testing/assertions.d.ts +0 -10
  204. package/dist/testing/assertions.js +0 -22
  205. package/dist/testing/boot-validator-fixture.d.ts +0 -3
  206. package/dist/testing/boot-validator-fixture.js +0 -101
  207. package/dist/testing/closed-connection-error.d.ts +0 -7
  208. package/dist/testing/closed-connection-error.js +0 -46
  209. package/dist/testing/db-cleanup.d.ts +0 -9
  210. package/dist/testing/db-cleanup.js +0 -31
  211. package/dist/testing/expect-error.d.ts +0 -2
  212. package/dist/testing/expect-error.js +0 -22
  213. package/dist/testing/file-provider-contract.d.ts +0 -2
  214. package/dist/testing/file-provider-contract.js +0 -102
  215. package/dist/testing/http-cookies.d.ts +0 -7
  216. package/dist/testing/http-cookies.js +0 -47
  217. package/dist/testing/late-bound.d.ts +0 -9
  218. package/dist/testing/late-bound.js +0 -31
  219. package/dist/testing/manual-clock.d.ts +0 -14
  220. package/dist/testing/manual-clock.js +0 -12
  221. package/dist/testing/multipart-helper.d.ts +0 -22
  222. package/dist/testing/multipart-helper.js +0 -77
  223. package/dist/testing/mutable-master-key-provider.d.ts +0 -7
  224. package/dist/testing/mutable-master-key-provider.js +0 -35
  225. package/dist/testing/observability-recorder.d.ts +0 -9
  226. package/dist/testing/observability-recorder.js +0 -29
  227. package/dist/testing/seed.d.ts +0 -9
  228. package/dist/testing/seed.js +0 -21
  229. package/dist/testing/shared-entities.d.ts +0 -286
  230. package/dist/testing/shared-entities.js +0 -56
  231. package/dist/testing/utils.d.ts +0 -1
  232. package/dist/testing/utils.js +0 -1
  233. package/dist/testing/wait-for.d.ts +0 -20
  234. package/dist/testing/wait-for.js +0 -47
  235. package/dist/testing/without-ambient-temporal.d.ts +0 -5
  236. package/dist/testing/without-ambient-temporal.js +0 -17
  237. package/dist/testing/zip-fixture.d.ts +0 -1
  238. package/dist/testing/zip-fixture.js +0 -33
  239. /package/dist/{stack/test-users.d.ts → seeding/seed-users.d.ts} +0 -0
  240. /package/dist/{stack/test-users.js → seeding/seed-users.js} +0 -0
@@ -127,13 +127,13 @@ engine APIs land in a published release.
127
127
 
128
128
  import { afterAll, beforeAll, beforeEach, describe, expect, test } from "bun:test";
129
129
  import { selectMany } from "@cosmicdrift/kumiko-framework/db";
130
+ import { createTestUser } from "@cosmicdrift/kumiko-framework/seeding";
130
131
  import {
131
- createTestUser,
132
132
  resetEventStore,
133
133
  setupTestStack,
134
134
  type TestStack,
135
135
  unsafePushTables,
136
- } from "@cosmicdrift/kumiko-framework/stack";
136
+ } from "@cosmicdrift/kumiko-testing/stack";
137
137
  import { inventoryFeature, lowStockAlertsTable, productTable } from "../feature";
138
138
 
139
139
  let stack: TestStack;
@@ -51,12 +51,12 @@ bun test src/__tests__/feature.integration.test.ts
51
51
  import { afterAll, beforeAll, describe, expect, test } from "bun:test";
52
52
  import type { TenantId } from "@cosmicdrift/kumiko-framework/engine";
53
53
  import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
54
+ import { createTestUser } from "@cosmicdrift/kumiko-framework/seeding";
54
55
  import {
55
- createTestUser,
56
56
  setupTestStack,
57
57
  type TestStack,
58
58
  unsafeCreateEntityTable,
59
- } from "@cosmicdrift/kumiko-framework/stack";
59
+ } from "@cosmicdrift/kumiko-testing/stack";
60
60
  import { publicShareTokenFeature, shareLinkEntity } from "../feature";
61
61
 
62
62
  const TENANT_ID = "00000000-0000-4000-8000-000000000001" as TenantId;
@@ -159,7 +159,7 @@ describe("public-share-token recipe: expiry", () => {
159
159
  // A full consumer adds domain snapshots, layouts and tier gates on top.
160
160
 
161
161
  import { generateToken } from "@cosmicdrift/kumiko-framework/api";
162
- import { fetchOne } from "@cosmicdrift/kumiko-framework/bun-db";
162
+ import { fetchOne } from "@cosmicdrift/kumiko-framework/db";
163
163
  import {
164
164
  createEntity,
165
165
  createEntityExecutor,
@@ -67,7 +67,8 @@ bun test
67
67
  // in each layer's test.
68
68
 
69
69
  import { afterAll, beforeAll, beforeEach, describe, expect, test } from "bun:test";
70
- import { setupTestStack, type TestStack, TestUsers } from "@cosmicdrift/kumiko-framework/stack";
70
+ import { TestUsers } from "@cosmicdrift/kumiko-framework/seeding";
71
+ import { setupTestStack, type TestStack } from "@cosmicdrift/kumiko-testing/stack";
71
72
  import { createRateLimitShowcaseFeature } from "../feature";
72
73
 
73
74
  let stack: TestStack;
@@ -42,13 +42,12 @@ bun test
42
42
  import { afterAll, beforeAll, beforeEach, describe, expect, test } from "bun:test";
43
43
  import type { SaveContext } from "@cosmicdrift/kumiko-framework/engine";
44
44
  import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
45
+ import { createTestUser, TestUsers } from "@cosmicdrift/kumiko-framework/seeding";
45
46
  import {
46
- createTestUser,
47
47
  setupTestStack,
48
48
  type TestStack,
49
- TestUsers,
50
49
  unsafeCreateEntityTable,
51
- } from "@cosmicdrift/kumiko-framework/stack";
50
+ } from "@cosmicdrift/kumiko-testing/stack";
52
51
  import { chatFeature, messageEntity } from "../feature";
53
52
 
54
53
  let stack: TestStack;
@@ -53,7 +53,7 @@ import {
53
53
  normalizeListColumn,
54
54
  validateBoot as validateBootRaw,
55
55
  } from "@cosmicdrift/kumiko-framework/engine";
56
- import { withBootValidatorFixture } from "@cosmicdrift/kumiko-framework/testing";
56
+ import { withBootValidatorFixture } from "@cosmicdrift/kumiko-testing/helpers";
57
57
  import { z } from "zod";
58
58
  import { createOrderDeskFeature } from "../feature";
59
59
 
@@ -37,10 +37,10 @@ bun test
37
37
  // Proves: seed data is inserted, upsert updates existing rows, new rows added
38
38
 
39
39
  import { afterAll, beforeAll, describe, expect, test } from "bun:test";
40
- import { selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
41
- import { seedReferenceData } from "@cosmicdrift/kumiko-framework/db";
40
+
41
+ import { seedReferenceData, selectMany } from "@cosmicdrift/kumiko-framework/db";
42
42
  import type { ReferenceDataDef } from "@cosmicdrift/kumiko-framework/engine";
43
- import { createTestDb, type TestDb, unsafePushTables } from "@cosmicdrift/kumiko-framework/stack";
43
+ import { createTestDb, type TestDb, unsafePushTables } from "@cosmicdrift/kumiko-testing/stack";
44
44
  import { categoryFeature, categoryTable } from "../feature";
45
45
 
46
46
  let testDb: TestDb;
@@ -40,12 +40,12 @@ import { afterAll, beforeAll, beforeEach, describe, expect, test } from "bun:tes
40
40
  import type { SaveContext } from "@cosmicdrift/kumiko-framework/engine";
41
41
  import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
42
42
  import { createCascadeDeleteHook } from "@cosmicdrift/kumiko-framework/pipeline";
43
+ import { TestUsers } from "@cosmicdrift/kumiko-framework/seeding";
43
44
  import {
44
45
  setupTestStack,
45
46
  type TestStack,
46
- TestUsers,
47
47
  unsafeCreateEntityTable,
48
- } from "@cosmicdrift/kumiko-framework/stack";
48
+ } from "@cosmicdrift/kumiko-testing/stack";
49
49
  import {
50
50
  memberEntity,
51
51
  memberTable,
@@ -51,7 +51,7 @@ import {
51
51
  normalizeListColumn,
52
52
  validateBoot as validateBootRaw,
53
53
  } from "@cosmicdrift/kumiko-framework/engine";
54
- import { withBootValidatorFixture } from "@cosmicdrift/kumiko-framework/testing";
54
+ import { withBootValidatorFixture } from "@cosmicdrift/kumiko-testing/helpers";
55
55
  import { bookEntity, createBookshopAdminFeature, createBookshopFeature } from "../feature";
56
56
 
57
57
  function validateBoot(features: Parameters<typeof validateBootRaw>[0]): void {
@@ -38,12 +38,12 @@ bun test
38
38
 
39
39
  import { afterAll, beforeAll, beforeEach, describe, expect, test } from "bun:test";
40
40
  import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
41
+ import { TestUsers } from "@cosmicdrift/kumiko-framework/seeding";
41
42
  import {
42
43
  setupTestStack,
43
44
  type TestStack,
44
- TestUsers,
45
45
  unsafeCreateEntityTable,
46
- } from "@cosmicdrift/kumiko-framework/stack";
46
+ } from "@cosmicdrift/kumiko-testing/stack";
47
47
  import { productEntity, productFeature } from "../feature";
48
48
 
49
49
  let stack: TestStack;
@@ -57,22 +57,22 @@ import {
57
57
  TENANT_SECRET_READ_EVENT,
58
58
  tenantSecretsTable,
59
59
  } from "@cosmicdrift/kumiko-bundled-features/secrets";
60
- import { fetchOne, selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
60
+ import { fetchOne, selectMany } from "@cosmicdrift/kumiko-framework/db";
61
61
  import { defineFeature, defineWriteHandler } from "@cosmicdrift/kumiko-framework/engine";
62
62
  import { createEventsTable, eventsTable } from "@cosmicdrift/kumiko-framework/event-store";
63
63
  import { createJobRunner, type JobRunner } from "@cosmicdrift/kumiko-framework/jobs";
64
64
  import { createEnvMasterKeyProvider, createSecret } from "@cosmicdrift/kumiko-framework/secrets";
65
- import {
66
- createTestUser,
67
- setupTestStack,
68
- type TestStack,
69
- unsafePushTables,
70
- } from "@cosmicdrift/kumiko-framework/stack";
65
+ import { createTestUser } from "@cosmicdrift/kumiko-framework/seeding";
71
66
  import {
72
67
  createMutableMasterKeyProvider,
73
68
  type MutableMasterKeyProvider,
74
69
  waitFor,
75
- } from "@cosmicdrift/kumiko-framework/testing";
70
+ } from "@cosmicdrift/kumiko-testing/helpers";
71
+ import {
72
+ setupTestStack,
73
+ type TestStack,
74
+ unsafePushTables,
75
+ } from "@cosmicdrift/kumiko-testing/stack";
76
76
  import { z } from "zod";
77
77
  import { createBillingFeature, STRIPE_API_KEY } from "../feature";
78
78
 
@@ -170,7 +170,7 @@ describe("security-baseline sample", () => {
170
170
  // rate-limiting, audit) and how it silences the NODE_ENV=production boot
171
171
  // warning that fires when one of those four is missing.
172
172
 
173
- import { authFoundationFeature } from "@cosmicdrift/kumiko-bundled-features/auth-foundation";
173
+ import { createAuthFoundationFeature } from "@cosmicdrift/kumiko-bundled-features/auth-foundation";
174
174
  import { createConfigFeature } from "@cosmicdrift/kumiko-bundled-features/config";
175
175
  import { securityBaselineFeatures } from "@cosmicdrift/kumiko-bundled-features/presets";
176
176
  import { createTenantFeature } from "@cosmicdrift/kumiko-bundled-features/tenant";
@@ -181,7 +181,7 @@ export const APP_FEATURES: FeatureDefinition[] = [
181
181
  createConfigFeature(),
182
182
  createUserFeature(),
183
183
  createTenantFeature(),
184
- authFoundationFeature,
184
+ createAuthFoundationFeature(),
185
185
  ...securityBaselineFeatures(),
186
186
  ];
187
187
  ```
@@ -23,7 +23,7 @@ The production wiring shape: an app builds `createSessionCallbacks()` against a
23
23
  ## What to copy into your app
24
24
 
25
25
  ```ts illustration
26
- const db = createDbConnection(config.databaseUrl);
26
+ const db = createDbConnection({ url: config.databaseUrl });
27
27
  const callbacks = createSessionCallbacks({ db });
28
28
 
29
29
  const server = buildServer({
@@ -73,7 +73,7 @@ import {
73
73
  createAuthEmailPasswordFeature,
74
74
  hashPassword,
75
75
  } from "@cosmicdrift/kumiko-bundled-features/auth-email-password";
76
- import { authFoundationFeature } from "@cosmicdrift/kumiko-bundled-features/auth-foundation";
76
+ import { createAuthFoundationFeature } from "@cosmicdrift/kumiko-bundled-features/auth-foundation";
77
77
  import {
78
78
  configValuesTable,
79
79
  createConfigFeature,
@@ -98,15 +98,14 @@ import {
98
98
  userEntity,
99
99
  } from "@cosmicdrift/kumiko-bundled-features/user";
100
100
  import type { TenantId } from "@cosmicdrift/kumiko-framework/engine";
101
+ import { TestUsers, testTenantId } from "@cosmicdrift/kumiko-framework/seeding";
102
+ import { createLateBoundHolder } from "@cosmicdrift/kumiko-testing/helpers";
101
103
  import {
102
104
  setupTestStack,
103
105
  type TestStack,
104
- TestUsers,
105
- testTenantId,
106
106
  unsafeCreateEntityTable,
107
107
  unsafePushTables,
108
- } from "@cosmicdrift/kumiko-framework/stack";
109
- import { createLateBoundHolder } from "@cosmicdrift/kumiko-framework/testing";
108
+ } from "@cosmicdrift/kumiko-testing/stack";
110
109
  import * as jose from "jose";
111
110
  import { createSessionCallbacks, createSessionsFeature } from "../feature";
112
111
 
@@ -123,7 +122,7 @@ beforeAll(async () => {
123
122
  createUserFeature(),
124
123
  createTenantFeature(),
125
124
  createAuthEmailPasswordFeature(),
126
- authFoundationFeature,
125
+ createAuthFoundationFeature(),
127
126
  createSessionsFeature(),
128
127
  ],
129
128
  authConfig: {
@@ -207,7 +206,7 @@ describe("session-revocation sample wiring", () => {
207
206
  //
208
207
  // What to copy into your own app:
209
208
  //
210
- // const db = createDbConnection(config.databaseUrl);
209
+ // const db = createDbConnection({ url: config.databaseUrl });
211
210
  // const callbacks = createSessionCallbacks({ db });
212
211
  // const server = buildServer({
213
212
  // registry: buildRegistry([