@cosmicdrift/kumiko-framework 0.367.0 → 0.368.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/AGENTS.md +1 -7
- package/README.md +1 -1
- package/agents/examples/access-control.md +2 -2
- package/agents/examples/anonymous-access-multitenant.md +2 -2
- package/agents/examples/anonymous-access.md +3 -3
- package/agents/examples/apex-landing.md +1 -1
- package/agents/examples/apex-surface-auth.md +6 -7
- package/agents/examples/api-worker-split.md +7 -8
- package/agents/examples/auth-claims.md +2 -1
- package/agents/examples/auth-foundation-providers.md +3 -3
- package/agents/examples/auth-mfa.md +3 -4
- package/agents/examples/basic-entity.md +3 -4
- package/agents/examples/chat-channels.md +4 -4
- package/agents/examples/compliance-profiles-demo.md +2 -3
- package/agents/examples/cross-feature-events.md +4 -4
- package/agents/examples/crypto-shredding-hr.md +14 -9
- package/agents/examples/currencies-global.md +3 -4
- package/agents/examples/currencies-per-tenant.md +3 -4
- package/agents/examples/custom-fields-basic.md +2 -3
- package/agents/examples/custom-handlers.md +3 -5
- package/agents/examples/dashboard-stats.md +2 -3
- package/agents/examples/delivery-notifications.md +5 -6
- package/agents/examples/e2e-generator.md +1 -1
- package/agents/examples/embedded-entity-form.md +2 -3
- package/agents/examples/embedded.md +2 -3
- package/agents/examples/encrypted-tenant-config.md +5 -6
- package/agents/examples/error-contract.md +3 -4
- package/agents/examples/event-sourcing.md +19 -23
- package/agents/examples/feature-toggles.md +4 -4
- package/agents/examples/field-access.md +3 -4
- package/agents/examples/files-post-processing.md +12 -13
- package/agents/examples/golden-path.md +208 -0
- package/agents/examples/idempotency.md +2 -2
- package/agents/examples/inbound-mail-triage.md +7 -7
- package/agents/examples/lane-routing.md +3 -3
- package/agents/examples/ledger-banking.md +2 -3
- package/agents/examples/ledger-invoicing.md +2 -3
- package/agents/examples/legal-pages.md +1 -1
- package/agents/examples/lifecycle-hooks.md +3 -3
- package/agents/examples/managed-config.md +3 -4
- package/agents/examples/managed-pages.md +2 -2
- package/agents/examples/notes-history-basic.md +4 -5
- package/agents/examples/ownership.md +3 -5
- package/agents/examples/pdf-audit-export.md +2 -3
- package/agents/examples/pipeline-basics.md +2 -2
- package/agents/examples/public-share-token.md +3 -3
- package/agents/examples/rate-limiting.md +2 -1
- package/agents/examples/realtime-sse.md +2 -3
- package/agents/examples/record-detail-layout.md +1 -1
- package/agents/examples/reference-data.md +3 -3
- package/agents/examples/relations.md +2 -2
- package/agents/examples/screens-nav.md +1 -1
- package/agents/examples/search.md +2 -2
- package/agents/examples/secrets-demo.md +8 -8
- package/agents/examples/security-baseline.md +2 -2
- package/agents/examples/session-revocation.md +7 -8
- package/agents/examples/state-machine.md +181 -165
- package/agents/examples/tags-basic.md +2 -3
- package/agents/examples/tenant-isolation.md +2 -3
- package/agents/examples/tenant-settings.md +2 -2
- package/agents/examples/tier-admin.md +3 -4
- package/agents/examples/timezones.md +3 -3
- package/agents/examples/user-data-rights.md +12 -8
- package/agents/examples/user-profile.md +3 -3
- package/agents/examples/webhook-step.md +2 -3
- package/agents/examples/wizard-form.md +4 -5
- package/agents/examples/workflow-engine.md +7 -3
- package/agents/examples/writeform-section.md +1 -1
- package/agents/examples.md +1 -0
- package/dist/consumer-cli.js +2 -3
- package/dist/crypto/index.d.ts +1 -1
- package/dist/crypto/index.js +1 -1
- package/dist/crypto/owner-transition-rekey.js +2 -0
- package/dist/crypto/pg-kms-adapter.js +1 -1
- package/dist/crypto/subject-resolver.d.ts +2 -0
- package/dist/crypto/subject-resolver.js +30 -15
- package/dist/db/bun-db-deprecated.d.ts +10 -0
- package/dist/{bun-db/index.js → db/bun-db-deprecated.js} +4 -3
- package/dist/db/config-seed.js +1 -1
- package/dist/db/connection.d.ts +23 -5
- package/dist/db/connection.js +10 -5
- package/dist/db/dialect.js +1 -1
- package/dist/db/entity-field-encryption.d.ts +5 -0
- package/dist/db/entity-field-encryption.js +29 -0
- package/dist/db/entity-table-meta.js +6 -5
- package/dist/db/event-store-executor-read.js +26 -5
- package/dist/db/index.d.ts +4 -4
- package/dist/db/index.js +1 -1
- package/dist/db/migrate-runner.js +1 -1
- package/dist/db/queries/backfill-pii.js +16 -9
- package/dist/db/queries/ddl.js +1 -1
- package/dist/db/queries/event-store.d.ts +2 -0
- package/dist/db/queries/event-store.js +26 -0
- package/dist/db/queries/test-stack.js +1 -1
- package/dist/db/query.d.ts +105 -1
- package/dist/db/query.js +1450 -3
- package/dist/{stack/table-helpers.d.ts → db/table-push.d.ts} +5 -15
- package/dist/{stack/table-helpers.js → db/table-push.js} +6 -46
- package/dist/db/tenant-db.d.ts +11 -0
- package/dist/db/tenant-db.js +51 -12
- package/dist/derivatives/derivatives-context.d.ts +1 -1
- package/dist/derivatives/derivatives-context.js +1 -1
- package/dist/engine/boot-validator/gdpr-storage.js +3 -3
- package/dist/engine/boot-validator/pii-retention.js +3 -3
- package/dist/engine/boot-validator/record-owned.js +3 -3
- package/dist/engine/boot-validator/screens.js +8 -1
- package/dist/engine/bridge-stub.d.ts +4 -0
- package/dist/engine/bridge-stub.js +62 -0
- package/dist/engine/event-helpers.d.ts +2 -1
- package/dist/engine/event-helpers.js +1 -0
- package/dist/engine/feature-config-events-jobs.js +2 -2
- package/dist/engine/index.d.ts +1 -0
- package/dist/engine/index.js +1 -0
- package/dist/es-ops/operations-schema.js +1 -1
- package/dist/event-store/admin-api.js +1 -1
- package/dist/event-store/archive.js +1 -1
- package/dist/event-store/errors.d.ts +2 -1
- package/dist/event-store/errors.js +6 -2
- package/dist/event-store/event-store.js +17 -9
- package/dist/event-store/events-schema.js +1 -1
- package/dist/event-store/rebuild-dead-letter.js +3 -3
- package/dist/event-store/snapshot.js +1 -1
- package/dist/event-store/upcaster-dead-letter.js +3 -3
- package/dist/files/create-file-ref-from-bytes.js +1 -1
- package/dist/files/file-routes.js +1 -1
- package/dist/internal/stack-support.d.ts +12 -0
- package/dist/internal/stack-support.js +12 -0
- package/dist/internal/testing.d.ts +4 -0
- package/dist/internal/testing.js +5 -0
- package/dist/jobs/job-runner.js +23 -11
- package/dist/migrations/pending-rebuilds.js +1 -1
- package/dist/migrations/pii-event-backfill.js +2 -2
- package/dist/pipeline/dispatch-shared.js +43 -23
- package/dist/pipeline/dispatch-write.js +6 -2
- package/dist/pipeline/dispatcher-utils.js +6 -2
- package/dist/pipeline/event-consumer-state.js +1 -1
- package/dist/pipeline/projection-rebuild.d.ts +1 -0
- package/dist/pipeline/projection-rebuild.js +1 -1
- package/dist/pipeline/projection-state.js +1 -1
- package/dist/pipeline/system-hooks.js +1 -1
- package/dist/schema-cli.js +3 -3
- package/dist/search/purge-subject.js +20 -10
- package/dist/seeding/index.d.ts +1 -0
- package/dist/seeding/index.js +1 -0
- package/dist/stack/index.d.ts +10 -9
- package/dist/stack/index.js +11 -19
- package/dist/testing/e2e-generator.d.ts +5 -49
- package/dist/testing/e2e-generator.js +5 -382
- package/dist/testing/handler-context.d.ts +5 -4
- package/dist/testing/handler-context.js +5 -69
- package/dist/testing/index.d.ts +10 -26
- package/dist/testing/index.js +10 -34
- package/dist/testing/real-providers.d.ts +5 -3
- package/dist/testing/real-providers.js +5 -21
- package/package.json +37 -9
- package/src/changes.json +58 -0
- package/src/scripts/codemod/README.md +43 -0
- package/src/scripts/codemod/codemod-support.ts +276 -0
- package/src/scripts/codemod/db-factory.ts +810 -0
- package/src/scripts/codemod/feature-factory.ts +429 -0
- package/src/scripts/codemod/s3-imports.ts +274 -0
- package/src/scripts/codemod/tenant-db-options.ts +454 -0
- package/src/scripts/codemod/testing-move-targets.ts +161 -0
- package/src/scripts/codemod/testing-move.ts +520 -0
- package/dist/bun-db/connection.d.ts +0 -17
- package/dist/bun-db/connection.js +0 -40
- package/dist/bun-db/index.d.ts +0 -4
- package/dist/bun-db/query.d.ts +0 -106
- package/dist/bun-db/query.js +0 -1457
- package/dist/db/api.d.ts +0 -19
- package/dist/db/api.js +0 -23
- package/dist/db/bun-provider.d.ts +0 -2
- package/dist/db/bun-provider.js +0 -28
- package/dist/db/postgres-provider.d.ts +0 -2
- package/dist/db/postgres-provider.js +0 -21
- package/dist/db/query-api.d.ts +0 -2
- package/dist/db/query-api.js +0 -6
- package/dist/stack/db.d.ts +0 -22
- package/dist/stack/db.js +0 -67
- package/dist/stack/drain-event-consumers.d.ts +0 -4
- package/dist/stack/drain-event-consumers.js +0 -51
- package/dist/stack/drain-jobs.d.ts +0 -22
- package/dist/stack/drain-jobs.js +0 -141
- package/dist/stack/event-collector.d.ts +0 -9
- package/dist/stack/event-collector.js +0 -12
- package/dist/stack/push-entity-projection-tables.d.ts +0 -24
- package/dist/stack/push-entity-projection-tables.js +0 -74
- package/dist/stack/redis.d.ts +0 -17
- package/dist/stack/redis.js +0 -52
- package/dist/stack/request-helper.d.ts +0 -35
- package/dist/stack/request-helper.js +0 -144
- package/dist/stack/test-stack.d.ts +0 -192
- package/dist/stack/test-stack.js +0 -429
- package/dist/testing/access-assertions.d.ts +0 -2
- package/dist/testing/access-assertions.js +0 -13
- package/dist/testing/assertions.d.ts +0 -10
- package/dist/testing/assertions.js +0 -22
- package/dist/testing/boot-validator-fixture.d.ts +0 -3
- package/dist/testing/boot-validator-fixture.js +0 -101
- package/dist/testing/closed-connection-error.d.ts +0 -7
- package/dist/testing/closed-connection-error.js +0 -46
- package/dist/testing/db-cleanup.d.ts +0 -9
- package/dist/testing/db-cleanup.js +0 -31
- package/dist/testing/expect-error.d.ts +0 -2
- package/dist/testing/expect-error.js +0 -22
- package/dist/testing/file-provider-contract.d.ts +0 -2
- package/dist/testing/file-provider-contract.js +0 -102
- package/dist/testing/http-cookies.d.ts +0 -7
- package/dist/testing/http-cookies.js +0 -47
- package/dist/testing/late-bound.d.ts +0 -9
- package/dist/testing/late-bound.js +0 -31
- package/dist/testing/manual-clock.d.ts +0 -14
- package/dist/testing/manual-clock.js +0 -12
- package/dist/testing/multipart-helper.d.ts +0 -22
- package/dist/testing/multipart-helper.js +0 -77
- package/dist/testing/mutable-master-key-provider.d.ts +0 -7
- package/dist/testing/mutable-master-key-provider.js +0 -35
- package/dist/testing/observability-recorder.d.ts +0 -9
- package/dist/testing/observability-recorder.js +0 -29
- package/dist/testing/seed.d.ts +0 -9
- package/dist/testing/seed.js +0 -21
- package/dist/testing/shared-entities.d.ts +0 -286
- package/dist/testing/shared-entities.js +0 -56
- package/dist/testing/utils.d.ts +0 -1
- package/dist/testing/utils.js +0 -1
- package/dist/testing/wait-for.d.ts +0 -20
- package/dist/testing/wait-for.js +0 -47
- package/dist/testing/without-ambient-temporal.d.ts +0 -5
- package/dist/testing/without-ambient-temporal.js +0 -17
- package/dist/testing/zip-fixture.d.ts +0 -1
- package/dist/testing/zip-fixture.js +0 -33
- /package/dist/{stack/test-users.d.ts → seeding/seed-users.d.ts} +0 -0
- /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-
|
|
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-
|
|
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/
|
|
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 {
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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/
|
|
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-
|
|
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 {
|
|
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
|
-
|
|
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 {
|
|
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-
|
|
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
|
-
|
|
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([
|