@cosmicdrift/kumiko-bundled-features 0.293.0 → 0.294.1
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/package.json +9 -9
- package/src/__tests__/access-invalidation-consumer.integration.test.ts +1 -2
- package/src/__tests__/access-invalidation-stream.integration.test.ts +1 -2
- package/src/__tests__/account-security-composition.integration.test.ts +0 -2
- package/src/__tests__/boot-seed-contract.integration.test.ts +1 -2
- package/src/__tests__/env-schemas.test.ts +1 -0
- package/src/__tests__/es-ops-e2e.integration.test.ts +0 -2
- package/src/agent-tools/__tests__/tool-dispatch.integration.test.ts +0 -2
- package/src/auth-email-password/__tests__/identity-v3-login.integration.test.ts +0 -2
- package/src/auth-email-password/__tests__/seed-admin-guarded.integration.test.ts +1 -2
- package/src/auth-email-password/__tests__/seed-admin.integration.test.ts +1 -2
- package/src/billing-foundation/__tests__/billing-foundation.integration.test.ts +1 -6
- package/src/billing-foundation/__tests__/subscription-tier-sync.integration.test.ts +0 -2
- package/src/cap-counter/__tests__/cap-counter.integration.test.ts +1 -2
- package/src/cap-counter/__tests__/stock-cap-guard.integration.test.ts +1 -3
- package/src/cap-counter/__tests__/with-cap-enforcement.integration.test.ts +1 -2
- package/src/cap-overview/__tests__/cap-overview-security.integration.test.ts +0 -2
- package/src/cap-overview/__tests__/caps-usage-escape-hatch.integration.test.ts +0 -2
- package/src/compliance-profiles/__tests__/compliance-profiles.integration.test.ts +0 -3
- package/src/compliance-profiles/__tests__/seeding.integration.test.ts +1 -2
- package/src/compliance-profiles-ops/__tests__/ops.integration.test.ts +0 -2
- package/src/config/__tests__/backing-secrets.integration.test.ts +0 -3
- package/src/crypto-shredding/__tests__/forget-subject-record.integration.test.ts +1 -4
- package/src/crypto-shredding/__tests__/forget-subject.integration.test.ts +1 -6
- package/src/custom-fields/__tests__/audit-integration.integration.test.ts +0 -2
- package/src/custom-fields/__tests__/cross-tenant-field-delete.integration.test.ts +0 -2
- package/src/custom-fields/__tests__/cross-tenant-set-write.integration.test.ts +0 -2
- package/src/custom-fields/__tests__/custom-fields.integration.test.ts +0 -2
- package/src/custom-fields/__tests__/field-access.integration.test.ts +0 -2
- package/src/custom-fields/__tests__/field-definition-role-config.integration.test.ts +0 -2
- package/src/custom-fields/__tests__/quota.integration.test.ts +0 -2
- package/src/custom-fields/__tests__/retention.integration.test.ts +0 -2
- package/src/custom-fields/__tests__/user-data-rights.integration.test.ts +0 -2
- package/src/file-foundation/__tests__/file-foundation.integration.test.ts +0 -2
- package/src/files-tenant-data/__tests__/hooks.integration.test.ts +1 -6
- package/src/files-tenant-data/__tests__/sweep-orphaned-derivatives.job.integration.test.ts +0 -2
- package/src/folders/__tests__/folders-parent-visibility.integration.test.ts +0 -2
- package/src/folders/__tests__/folders-read-gate.integration.test.ts +0 -2
- package/src/folders/__tests__/folders.integration.test.ts +0 -3
- package/src/folders-user-data/__tests__/hooks.integration.test.ts +0 -2
- package/src/form-draft/__tests__/cleanup.integration.test.ts +0 -2
- package/src/form-draft/__tests__/discard-file-refs.integration.test.ts +0 -2
- package/src/form-draft/__tests__/feature-optional-config.integration.test.ts +0 -2
- package/src/form-draft/__tests__/form-draft.integration.test.ts +0 -2
- package/src/form-draft/__tests__/limits.integration.test.ts +0 -2
- package/src/form-draft-user-data/__tests__/hooks-delete-failure.integration.test.ts +0 -2
- package/src/form-draft-user-data/__tests__/hooks.integration.test.ts +0 -2
- package/src/inbound-mail-foundation/__tests__/connect-routes.integration.test.ts +0 -2
- package/src/inbound-mail-foundation/__tests__/inbound-mail-foundation.integration.test.ts +0 -2
- package/src/inbound-mail-foundation/__tests__/retention.integration.test.ts +1 -2
- package/src/inbound-mail-foundation/__tests__/watch-supervisor.integration.test.ts +0 -2
- package/src/inbound-provider-imap/__tests__/imap-foundation.integration.test.ts +0 -2
- package/src/jobs/__tests__/job-system-user.integration.test.ts +1 -5
- package/src/jobs/__tests__/jobs-events.integration.test.ts +1 -2
- package/src/jobs/__tests__/jobs-feature.integration.test.ts +0 -2
- package/src/jobs/__tests__/jobs-pii-kms.integration.test.ts +1 -2
- package/src/jobs/__tests__/projection-rebuild-job.integration.test.ts +0 -2
- package/src/jobs/__tests__/reindex-entity-job.integration.test.ts +0 -2
- package/src/jobs/__tests__/tenant-job-failures.integration.test.ts +0 -2
- package/src/ledger/__tests__/ledger-reports-tenant-isolation.integration.test.ts +0 -2
- package/src/ledger/__tests__/ledger.integration.test.ts +0 -2
- package/src/legal-pages/__tests__/legal-pages.integration.test.ts +0 -5
- package/src/mail-foundation/__tests__/mail-foundation.integration.test.ts +0 -2
- package/src/managed-pages/__tests__/managed-pages.integration.test.ts +0 -4
- package/src/notes-history/__tests__/notes-history-ownership.integration.test.ts +0 -4
- package/src/notes-history/__tests__/notes-history-parent-visibility.integration.test.ts +0 -3
- package/src/notes-history/__tests__/notes-history.integration.test.ts +0 -2
- package/src/notes-history/__tests__/notes-read-gate.integration.test.ts +0 -3
- package/src/notes-history-user-data/__tests__/hooks.integration.test.ts +0 -2
- package/src/notes-history-user-data/__tests__/mention-forget.integration.test.ts +0 -2
- package/src/readiness/__tests__/readiness.integration.test.ts +1 -2
- package/src/secrets/__tests__/access-options.integration.test.ts +0 -2
- package/src/secrets/__tests__/secrets-events.integration.test.ts +1 -2
- package/src/secrets/__tests__/secrets.integration.test.ts +0 -2
- package/src/secrets/feature.ts +3 -1
- package/src/seo/__tests__/seo.integration.test.ts +0 -3
- package/src/sessions/__tests__/rebuild-survival.integration.test.ts +0 -2
- package/src/sessions/__tests__/sessions.integration.test.ts +1 -2
- package/src/subscription-mollie/__tests__/mollie-foundation.integration.test.ts +1 -2
- package/src/subscription-stripe/__tests__/stripe-foundation.integration.test.ts +1 -3
- package/src/tags/__tests__/tags-parent-visibility.integration.test.ts +0 -2
- package/src/tags/__tests__/tags-read-gate.integration.test.ts +0 -3
- package/src/tags/__tests__/tags.integration.test.ts +0 -4
- package/src/template-resolver/__tests__/collection-kinds.integration.test.ts +0 -2
- package/src/template-resolver/__tests__/collection-ownership.integration.test.ts +0 -2
- package/src/template-resolver/__tests__/handlers.integration.test.ts +0 -2
- package/src/template-resolver/__tests__/seed-legal-content.integration.test.ts +1 -2
- package/src/template-resolver/__tests__/text-blocks.integration.test.ts +1 -2
- package/src/tenant/__tests__/multi-tenant.integration.test.ts +0 -2
- package/src/tenant/__tests__/seed-testing.integration.test.ts +1 -2
- package/src/tenant/__tests__/tenant-security.integration.test.ts +1 -2
- package/src/tenant/__tests__/tenant.integration.test.ts +0 -2
- package/src/tenant/__tests__/update-cross-tenant.integration.test.ts +0 -2
- package/src/tenant-handover/__tests__/claim.integration.test.ts +1 -2
- package/src/tenant-lifecycle/__tests__/tenant-lifecycle.integration.test.ts +1 -10
- package/src/tenant-settings/__tests__/tenant-settings.integration.test.ts +0 -2
- package/src/tier-engine/__tests__/tier-engine.integration.test.ts +0 -2
- package/src/user/__tests__/email-unique-blind-index.integration.test.ts +0 -2
- package/src/user/__tests__/email-unique-plaintext-soft-delete.integration.test.ts +0 -2
- package/src/user/__tests__/seed-testing.integration.test.ts +1 -2
- package/src/user/__tests__/stream-tenant-backfill.integration.test.ts +1 -2
- package/src/user-data-rights/__tests__/anonymous-deletion-kms.integration.test.ts +1 -2
- package/src/user-data-rights/__tests__/anonymous-deletion.integration.test.ts +1 -3
- package/src/user-data-rights/__tests__/audit-log.integration.test.ts +1 -2
- package/src/user-data-rights/__tests__/download-by-token-resolver-trust.integration.test.ts +0 -2
- package/src/user-data-rights/__tests__/download.integration.test.ts +1 -2
- package/src/user-data-rights/__tests__/escape-hatch-audit.integration.test.ts +0 -2
- package/src/user-data-rights/__tests__/escape-hatch-declaration.integration.test.ts +0 -2
- package/src/user-data-rights/__tests__/export-job-list-cross-tenant.integration.test.ts +1 -2
- package/src/user-data-rights/__tests__/file-storage-unification.integration.test.ts +0 -2
- package/src/user-data-rights/__tests__/forget-cleanup-hook-ordering.integration.test.ts +0 -2
- package/src/user-data-rights/__tests__/forget-cleanup-search-purge-ordering.integration.test.ts +0 -2
- package/src/user-data-rights/__tests__/forget-hook-registry.integration.test.ts +0 -2
- package/src/user-data-rights/__tests__/read-users-rebuild-survives-lifecycle.integration.test.ts +1 -6
- package/src/user-data-rights/__tests__/request-cancel-deletion.integration.test.ts +1 -2
- package/src/user-data-rights/__tests__/request-deletion-callback.integration.test.ts +1 -2
- package/src/user-data-rights/__tests__/request-export.integration.test.ts +1 -2
- package/src/user-data-rights/__tests__/restriction-flow.integration.test.ts +1 -2
- package/src/user-data-rights/__tests__/run-export-jobs-cron-context.integration.test.ts +0 -2
- package/src/user-data-rights/__tests__/run-export-jobs.integration.test.ts +1 -3
- package/src/user-data-rights/__tests__/tenant-model-erasure.integration.test.ts +0 -2
- package/src/user-profile/__tests__/change-email.integration.test.ts +1 -2
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
defineFeature,
|
|
12
12
|
type EntityDefinition,
|
|
13
13
|
} from "@cosmicdrift/kumiko-framework/engine";
|
|
14
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
15
14
|
import {
|
|
16
15
|
createTestUser,
|
|
17
16
|
setupTestStack,
|
|
@@ -92,7 +91,6 @@ beforeAll(async () => {
|
|
|
92
91
|
await unsafeCreateEntityTable(stack.db, noteMentionEntity);
|
|
93
92
|
await unsafeCreateEntityTable(stack.db, userEntity);
|
|
94
93
|
await unsafeCreateEntityTable(stack.db, projectEntity);
|
|
95
|
-
await createEventsTable(stack.db);
|
|
96
94
|
|
|
97
95
|
await asRawClient(stack.db).unsafe(
|
|
98
96
|
`INSERT INTO ${PROJECT_TABLE} (id, tenant_id, team_id) VALUES ($1, $3, 'team-a'), ($2, $3, 'team-b')`,
|
|
@@ -209,7 +207,6 @@ describe("notes-history read-gate — parents allowlist narrows both paths", ()
|
|
|
209
207
|
await unsafeCreateEntityTable(allowStack.db, userEntity);
|
|
210
208
|
await unsafeCreateEntityTable(allowStack.db, projectEntity);
|
|
211
209
|
await unsafeCreateEntityTable(allowStack.db, otherEntity);
|
|
212
|
-
await createEventsTable(allowStack.db);
|
|
213
210
|
await asRawClient(allowStack.db).unsafe(
|
|
214
211
|
`INSERT INTO ${PROJECT_TABLE} (id, tenant_id, team_id) VALUES ($1, $2, 'team-a')`,
|
|
215
212
|
[PROJECT_A, userA.tenantId],
|
|
@@ -7,7 +7,6 @@ import { afterAll, beforeAll, describe, expect, test } from "bun:test";
|
|
|
7
7
|
import { asRawClient } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
8
8
|
import { createTenantDb } from "@cosmicdrift/kumiko-framework/db";
|
|
9
9
|
import { createEntity, createTextField, defineFeature } from "@cosmicdrift/kumiko-framework/engine";
|
|
10
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
11
10
|
import {
|
|
12
11
|
createTestUser,
|
|
13
12
|
setupTestStack,
|
|
@@ -54,7 +53,6 @@ beforeAll(async () => {
|
|
|
54
53
|
});
|
|
55
54
|
await unsafeCreateEntityTable(stack.db, noteEntryEntity);
|
|
56
55
|
await unsafeCreateEntityTable(stack.db, contactEntity);
|
|
57
|
-
await createEventsTable(stack.db);
|
|
58
56
|
await asRawClient(stack.db).unsafe(
|
|
59
57
|
`INSERT INTO ${CONTACT_TABLE} (id, tenant_id, name) VALUES ($1, $2, $3)`,
|
|
60
58
|
[CONTACT_1, author.tenantId, "Contact 1"],
|
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
} from "@cosmicdrift/kumiko-framework/crypto";
|
|
20
20
|
import { createEventStoreExecutor, createTenantDb } from "@cosmicdrift/kumiko-framework/db";
|
|
21
21
|
import { createEntity, createTextField, defineFeature } from "@cosmicdrift/kumiko-framework/engine";
|
|
22
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
23
22
|
import { fileRefsTable } from "@cosmicdrift/kumiko-framework/files";
|
|
24
23
|
import {
|
|
25
24
|
createTestUser,
|
|
@@ -104,7 +103,6 @@ beforeAll(async () => {
|
|
|
104
103
|
await unsafeCreateEntityTable(stack.db, noteMentionEntity, "note-mention");
|
|
105
104
|
await unsafeCreateEntityTable(stack.db, contactEntity);
|
|
106
105
|
await unsafePushTables(stack.db, { fileRefsTable });
|
|
107
|
-
await createEventsTable(stack.db);
|
|
108
106
|
// tenant-membership table (from the tenant feature) manually created — same
|
|
109
107
|
// minimal setup as run-forget-cleanup.integration.test.ts, no tenant feature
|
|
110
108
|
// mounted here.
|
|
@@ -8,7 +8,7 @@ import { randomBytes } from "node:crypto";
|
|
|
8
8
|
import { asRawClient, selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
9
9
|
import type { DbConnection } from "@cosmicdrift/kumiko-framework/db";
|
|
10
10
|
import { access, createTenantConfig, defineFeature } from "@cosmicdrift/kumiko-framework/engine";
|
|
11
|
-
import {
|
|
11
|
+
import { eventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
12
12
|
import { createEnvMasterKeyProvider } from "@cosmicdrift/kumiko-framework/secrets";
|
|
13
13
|
import {
|
|
14
14
|
createTestUser,
|
|
@@ -164,7 +164,6 @@ beforeAll(async () => {
|
|
|
164
164
|
db = stack.db;
|
|
165
165
|
await unsafeCreateEntityTable(db, tenantEntity);
|
|
166
166
|
await unsafePushTables(db, { configValuesTable, tenant_secrets: tenantSecretsTable });
|
|
167
|
-
await createEventsTable(db);
|
|
168
167
|
});
|
|
169
168
|
|
|
170
169
|
afterAll(async () => {
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
|
|
10
10
|
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
|
|
11
11
|
import { randomBytes } from "node:crypto";
|
|
12
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
13
12
|
import {
|
|
14
13
|
createEnvMasterKeyProvider,
|
|
15
14
|
type MasterKeyProvider,
|
|
@@ -42,7 +41,6 @@ async function buildStack(feature: ReturnType<typeof createSecretsFeature>): Pro
|
|
|
42
41
|
}),
|
|
43
42
|
});
|
|
44
43
|
await unsafePushTables(stack.db, { tenant_secrets: tenantSecretsTable });
|
|
45
|
-
await createEventsTable(stack.db);
|
|
46
44
|
return stack;
|
|
47
45
|
}
|
|
48
46
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { afterAll, beforeAll, beforeEach, describe, expect, test } from "bun:test";
|
|
9
9
|
import { randomBytes } from "node:crypto";
|
|
10
10
|
import { asRawClient, selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
11
|
-
import {
|
|
11
|
+
import { eventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
12
12
|
import {
|
|
13
13
|
createEnvMasterKeyProvider,
|
|
14
14
|
type MasterKeyProvider,
|
|
@@ -51,7 +51,6 @@ beforeAll(async () => {
|
|
|
51
51
|
}),
|
|
52
52
|
});
|
|
53
53
|
await unsafePushTables(stack.db, { tenantSecretsTable });
|
|
54
|
-
await createEventsTable(stack.db);
|
|
55
54
|
});
|
|
56
55
|
|
|
57
56
|
afterAll(async () => {
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
|
|
8
8
|
import { randomBytes } from "node:crypto";
|
|
9
9
|
import { selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
10
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
11
10
|
import {
|
|
12
11
|
createEnvMasterKeyProvider,
|
|
13
12
|
type MasterKeyProvider,
|
|
@@ -50,7 +49,6 @@ beforeAll(async () => {
|
|
|
50
49
|
// belongs to an ES entity (and entity-tables aren't auto-pushed by
|
|
51
50
|
// setupTestStack).
|
|
52
51
|
await unsafePushTables(stack.db, { tenant_secrets: tenantSecretsTable });
|
|
53
|
-
await createEventsTable(stack.db);
|
|
54
52
|
});
|
|
55
53
|
|
|
56
54
|
afterAll(async () => {
|
package/src/secrets/feature.ts
CHANGED
|
@@ -36,7 +36,9 @@ export const secretsEnvSchema = z.object({
|
|
|
36
36
|
message: "must be base64-encoded 32 bytes (AES-256 KEK)",
|
|
37
37
|
})
|
|
38
38
|
.describe("AES-256 master-key (KEK) for tenant-secrets encryption.")
|
|
39
|
-
.meta({
|
|
39
|
+
.meta({
|
|
40
|
+
kumiko: { kms: true, pulumi: { generator: "openssl rand -base64 32", secret: true } },
|
|
41
|
+
}),
|
|
40
42
|
KUMIKO_SECRETS_MASTER_KEY_CURRENT_VERSION: z
|
|
41
43
|
.string()
|
|
42
44
|
.regex(/^[1-9]\d*$/, "must be a positive integer (V<n> selector)")
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
} from "@cosmicdrift/kumiko-bundled-features/template-resolver";
|
|
13
13
|
import { seedTextBlock } from "@cosmicdrift/kumiko-bundled-features/template-resolver/seeding";
|
|
14
14
|
import { SYSTEM_TENANT_ID } from "@cosmicdrift/kumiko-framework/engine";
|
|
15
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
16
15
|
import {
|
|
17
16
|
createTestUser,
|
|
18
17
|
setupTestStack,
|
|
@@ -60,7 +59,6 @@ beforeAll(async () => {
|
|
|
60
59
|
await unsafeCreateEntityTable(stack.db, pageEntity);
|
|
61
60
|
await unsafeCreateEntityTable(stack.db, templateResourceEntity);
|
|
62
61
|
await unsafePushTables(stack.db, { configValuesTable });
|
|
63
|
-
await createEventsTable(stack.db);
|
|
64
62
|
|
|
65
63
|
await seedTextBlock(stack.db, {
|
|
66
64
|
tenantId: SYSTEM_TENANT_ID,
|
|
@@ -320,7 +318,6 @@ describe("seo :: resolverTrust authoritative (host-based, wie publicstatus/show-
|
|
|
320
318
|
});
|
|
321
319
|
await unsafeCreateEntityTable(authStack.db, pageEntity);
|
|
322
320
|
await unsafePushTables(authStack.db, { configValuesTable });
|
|
323
|
-
await createEventsTable(authStack.db);
|
|
324
321
|
await seedPage(authStack.db, {
|
|
325
322
|
tenantId: TENANT_A,
|
|
326
323
|
slug: "about",
|
|
@@ -3,7 +3,6 @@ import { authFoundationFeature } from "@cosmicdrift/kumiko-bundled-features/auth
|
|
|
3
3
|
import { asRawClient, selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
4
4
|
import { createTenantDb, type DbConnection } from "@cosmicdrift/kumiko-framework/db";
|
|
5
5
|
import { createRegistry, type TenantId } from "@cosmicdrift/kumiko-framework/engine";
|
|
6
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
7
6
|
import {
|
|
8
7
|
createProjectionStateTable,
|
|
9
8
|
rebuildProjection,
|
|
@@ -39,7 +38,6 @@ const TENANT: TenantId = testTenantId(1);
|
|
|
39
38
|
beforeAll(async () => {
|
|
40
39
|
testDb = await createTestDb();
|
|
41
40
|
await unsafeCreateEntityTable(testDb.db, userSessionEntity, "user-session");
|
|
42
|
-
await createEventsTable(testDb.db);
|
|
43
41
|
await createProjectionStateTable(testDb.db);
|
|
44
42
|
});
|
|
45
43
|
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
isPiiCiphertext,
|
|
10
10
|
} from "@cosmicdrift/kumiko-framework/crypto";
|
|
11
11
|
import type { TenantId } from "@cosmicdrift/kumiko-framework/engine";
|
|
12
|
-
import {
|
|
12
|
+
import { eventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
13
13
|
import {
|
|
14
14
|
setupTestStack,
|
|
15
15
|
type TestStack,
|
|
@@ -87,7 +87,6 @@ beforeAll(async () => {
|
|
|
87
87
|
await unsafeCreateEntityTable(stack.db, tenantEntity);
|
|
88
88
|
await unsafeCreateEntityTable(stack.db, userSessionEntity);
|
|
89
89
|
await unsafePushTables(stack.db, { configValuesTable, tenantMembershipsTable });
|
|
90
|
-
await createEventsTable(stack.db);
|
|
91
90
|
});
|
|
92
91
|
|
|
93
92
|
afterAll(async () => {
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "@cosmicdrift/kumiko-bundled-features/billing-foundation";
|
|
28
28
|
import type { DbConnection } from "@cosmicdrift/kumiko-framework/db";
|
|
29
29
|
import type { TenantId } from "@cosmicdrift/kumiko-framework/engine";
|
|
30
|
-
import {
|
|
30
|
+
import { loadAggregate } from "@cosmicdrift/kumiko-framework/event-store";
|
|
31
31
|
import {
|
|
32
32
|
createTestUser,
|
|
33
33
|
setupTestStack,
|
|
@@ -151,7 +151,6 @@ beforeAll(async () => {
|
|
|
151
151
|
db = stack.db;
|
|
152
152
|
// subscriptionsProjectionTable wird von setupTestStack automatisch
|
|
153
153
|
// gepusht (r.projection mit `table`-Property → auto-push).
|
|
154
|
-
await createEventsTable(db);
|
|
155
154
|
await unsafeCreateEntityTable(db, tenantEntity);
|
|
156
155
|
|
|
157
156
|
webhookApp = new Hono();
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "@cosmicdrift/kumiko-bundled-features/billing-foundation";
|
|
23
23
|
import type { DbConnection } from "@cosmicdrift/kumiko-framework/db";
|
|
24
24
|
import { SYSTEM_TENANT_ID, type TenantId } from "@cosmicdrift/kumiko-framework/engine";
|
|
25
|
-
import {
|
|
25
|
+
import { loadAggregate } from "@cosmicdrift/kumiko-framework/event-store";
|
|
26
26
|
import { createEnvMasterKeyProvider } from "@cosmicdrift/kumiko-framework/secrets";
|
|
27
27
|
import {
|
|
28
28
|
createTestUser,
|
|
@@ -116,7 +116,6 @@ beforeAll(async () => {
|
|
|
116
116
|
// subscriptionsProjectionTable wird von setupTestStack automatisch
|
|
117
117
|
// gepusht (r.projection mit `table`-Property → auto-push). config +
|
|
118
118
|
// secrets brauchen ihre Tabellen explizit.
|
|
119
|
-
await createEventsTable(db);
|
|
120
119
|
await unsafeCreateEntityTable(db, tenantEntity);
|
|
121
120
|
await unsafePushTables(db, { configValuesTable, tenant_secrets: tenantSecretsTable });
|
|
122
121
|
// Standalone-secrets-context (gleiche KEK) zum direkten Seeden +
|
|
@@ -506,7 +505,6 @@ describe("scenario 6: billing-live gate end-to-end (#104)", () => {
|
|
|
506
505
|
secrets: createSecretsContext({ db: ctxDb, masterKeyProvider }),
|
|
507
506
|
}),
|
|
508
507
|
});
|
|
509
|
-
await createEventsTable(gateStack.db);
|
|
510
508
|
await unsafeCreateEntityTable(gateStack.db, tenantEntity);
|
|
511
509
|
await unsafePushTables(gateStack.db, {
|
|
512
510
|
configValuesTable,
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
defineFeature,
|
|
18
18
|
type EntityDefinition,
|
|
19
19
|
} from "@cosmicdrift/kumiko-framework/engine";
|
|
20
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
21
20
|
import {
|
|
22
21
|
createTestUser,
|
|
23
22
|
setupTestStack,
|
|
@@ -103,7 +102,6 @@ beforeAll(async () => {
|
|
|
103
102
|
await unsafeCreateEntityTable(stack.db, tagEntity);
|
|
104
103
|
await unsafeCreateEntityTable(stack.db, tagAssignmentEntity);
|
|
105
104
|
await unsafeCreateEntityTable(stack.db, projectEntity);
|
|
106
|
-
await createEventsTable(stack.db);
|
|
107
105
|
await asRawClient(stack.db).unsafe(
|
|
108
106
|
`INSERT INTO ${PROJECT_TABLE} (id, tenant_id, team_id, name) VALUES
|
|
109
107
|
($1, $2, 'team-a', 'Project A'),
|
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
defineFeature,
|
|
14
14
|
type EntityDefinition,
|
|
15
15
|
} from "@cosmicdrift/kumiko-framework/engine";
|
|
16
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
17
16
|
import {
|
|
18
17
|
createTestUser,
|
|
19
18
|
setupTestStack,
|
|
@@ -109,7 +108,6 @@ beforeAll(async () => {
|
|
|
109
108
|
await unsafeCreateEntityTable(stack.db, tagEntity);
|
|
110
109
|
await unsafeCreateEntityTable(stack.db, tagAssignmentEntity);
|
|
111
110
|
await unsafeCreateEntityTable(stack.db, projectEntity);
|
|
112
|
-
await createEventsTable(stack.db);
|
|
113
111
|
|
|
114
112
|
const values = [...TEAM_A_PROJECTS, ...TEAM_B_PROJECTS]
|
|
115
113
|
.map((id, i) => `('${id}', $1, '${i < TEAM_A_PROJECTS.length ? "team-a" : "team-b"}', 'p${i}')`)
|
|
@@ -329,7 +327,6 @@ describe("tags read-gate — ownership narrows further, it does not replace the
|
|
|
329
327
|
await unsafeCreateEntityTable(ownedStack.db, tagEntity);
|
|
330
328
|
await unsafeCreateEntityTable(ownedStack.db, tagAssignmentEntity);
|
|
331
329
|
await unsafeCreateEntityTable(ownedStack.db, ownedEntity);
|
|
332
|
-
await createEventsTable(ownedStack.db);
|
|
333
330
|
await asRawClient(ownedStack.db).unsafe(
|
|
334
331
|
`INSERT INTO ${OWNED_TABLE} (id, tenant_id, team_id) VALUES ($1, $2, 'team-a')`,
|
|
335
332
|
[HOST, tagger.tenantId],
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
import { afterAll, beforeAll, beforeEach, describe, expect, test } from "bun:test";
|
|
18
18
|
import { asRawClient } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
19
19
|
import { createEntity, createTextField, defineFeature } from "@cosmicdrift/kumiko-framework/engine";
|
|
20
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
21
20
|
import {
|
|
22
21
|
createTestUser,
|
|
23
22
|
setupTestStack,
|
|
@@ -99,7 +98,6 @@ beforeAll(async () => {
|
|
|
99
98
|
await unsafeCreateEntityTable(stack.db, tagAssignmentEntity);
|
|
100
99
|
await unsafeCreateEntityTable(stack.db, creditEntity);
|
|
101
100
|
await unsafeCreateEntityTable(stack.db, noteEntity);
|
|
102
|
-
await createEventsTable(stack.db);
|
|
103
101
|
await seedHostRows(stack, CREDIT_TABLE, CREDIT_LABELS, admin.tenantId);
|
|
104
102
|
await seedHostRows(stack, NOTE_TABLE, ["note-d1"], admin.tenantId);
|
|
105
103
|
});
|
|
@@ -468,13 +466,11 @@ describe("tags integration — openToAll access model", () => {
|
|
|
468
466
|
await unsafeCreateEntityTable(openStack.db, tagAssignmentEntity);
|
|
469
467
|
await unsafeCreateEntityTable(openStack.db, creditEntity);
|
|
470
468
|
await unsafeCreateEntityTable(openStack.db, noteEntity);
|
|
471
|
-
await createEventsTable(openStack.db);
|
|
472
469
|
await seedHostRows(openStack, CREDIT_TABLE, ["c-1"], unprivileged.tenantId);
|
|
473
470
|
|
|
474
471
|
defaultStack = await setupTestStack({ features: [tagsFeature] });
|
|
475
472
|
await unsafeCreateEntityTable(defaultStack.db, tagEntity);
|
|
476
473
|
await unsafeCreateEntityTable(defaultStack.db, tagAssignmentEntity);
|
|
477
|
-
await createEventsTable(defaultStack.db);
|
|
478
474
|
});
|
|
479
475
|
|
|
480
476
|
afterAll(async () => {
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
|
|
8
8
|
import { type DbConnection, fetchOne } from "@cosmicdrift/kumiko-framework/db";
|
|
9
9
|
import { createAnonymousUser } from "@cosmicdrift/kumiko-framework/engine";
|
|
10
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
11
10
|
import {
|
|
12
11
|
createTestUser,
|
|
13
12
|
setupTestStack,
|
|
@@ -60,7 +59,6 @@ beforeAll(async () => {
|
|
|
60
59
|
stack = await setupTestStack({ features: [feature] });
|
|
61
60
|
db = stack.db;
|
|
62
61
|
await unsafeCreateEntityTable(db, templateResourceEntity);
|
|
63
|
-
await createEventsTable(db);
|
|
64
62
|
|
|
65
63
|
// A text-block and a snippet on the same tenant with the same slug — proves
|
|
66
64
|
// the collection selects the row rather than decorating the payload.
|
|
@@ -15,7 +15,6 @@ import { afterAll, beforeAll, describe, expect, test } from "bun:test";
|
|
|
15
15
|
import { selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
16
16
|
import type { DbConnection } from "@cosmicdrift/kumiko-framework/db";
|
|
17
17
|
import { createAnonymousUser, type TenantId } from "@cosmicdrift/kumiko-framework/engine";
|
|
18
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
19
18
|
import {
|
|
20
19
|
createTestUser,
|
|
21
20
|
setupTestStack,
|
|
@@ -87,7 +86,6 @@ beforeAll(async () => {
|
|
|
87
86
|
db = stack.db;
|
|
88
87
|
await unsafeCreateEntityTable(db, templateResourceEntity);
|
|
89
88
|
await unsafeCreateEntityTable(db, userContentEntryEntity);
|
|
90
|
-
await createEventsTable(db);
|
|
91
89
|
});
|
|
92
90
|
|
|
93
91
|
afterAll(async () => {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
|
|
2
2
|
import type { DbConnection } from "@cosmicdrift/kumiko-framework/db";
|
|
3
3
|
import { SYSTEM_TENANT_ID } from "@cosmicdrift/kumiko-framework/engine";
|
|
4
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
5
4
|
import {
|
|
6
5
|
createTestUser,
|
|
7
6
|
setupTestStack,
|
|
@@ -40,7 +39,6 @@ beforeAll(async () => {
|
|
|
40
39
|
stack = await setupTestStack({ features: [feature] });
|
|
41
40
|
db = stack.db;
|
|
42
41
|
await unsafeCreateEntityTable(db, templateResourceEntity);
|
|
43
|
-
await createEventsTable(db);
|
|
44
42
|
});
|
|
45
43
|
|
|
46
44
|
afterAll(async () => {
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
selectMany,
|
|
7
7
|
} from "@cosmicdrift/kumiko-framework/db";
|
|
8
8
|
import { SYSTEM_TENANT_ID, SYSTEM_USER_ID } from "@cosmicdrift/kumiko-framework/engine";
|
|
9
|
-
import {
|
|
9
|
+
import { eventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
10
10
|
import {
|
|
11
11
|
setupTestStack,
|
|
12
12
|
type TestStack,
|
|
@@ -33,7 +33,6 @@ beforeAll(async () => {
|
|
|
33
33
|
stack = await setupTestStack({ features: [createTemplateResolverFeature()] });
|
|
34
34
|
db = stack.db;
|
|
35
35
|
await unsafeCreateEntityTable(db, templateResourceEntity);
|
|
36
|
-
await createEventsTable(db);
|
|
37
36
|
});
|
|
38
37
|
|
|
39
38
|
afterAll(async () => {
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
selectMany,
|
|
7
7
|
} from "@cosmicdrift/kumiko-framework/db";
|
|
8
8
|
import { createSystemUser } from "@cosmicdrift/kumiko-framework/engine";
|
|
9
|
-
import {
|
|
9
|
+
import { eventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
10
10
|
import {
|
|
11
11
|
createTestUser,
|
|
12
12
|
setupTestStack,
|
|
@@ -35,7 +35,6 @@ beforeAll(async () => {
|
|
|
35
35
|
stack = await setupTestStack({ features: [feature] });
|
|
36
36
|
db = stack.db;
|
|
37
37
|
await unsafeCreateEntityTable(db, templateResourceEntity);
|
|
38
|
-
await createEventsTable(db);
|
|
39
38
|
});
|
|
40
39
|
|
|
41
40
|
afterAll(async () => {
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
type SessionUser,
|
|
12
12
|
type TenantId,
|
|
13
13
|
} from "@cosmicdrift/kumiko-framework/engine";
|
|
14
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
15
14
|
import { createJobRunner, type JobRunner } from "@cosmicdrift/kumiko-framework/jobs";
|
|
16
15
|
import {
|
|
17
16
|
createTestDb,
|
|
@@ -69,7 +68,6 @@ beforeAll(async () => {
|
|
|
69
68
|
await unsafeCreateEntityTable(db, tenantEntity);
|
|
70
69
|
await unsafeCreateEntityTable(db, userEntity);
|
|
71
70
|
await unsafePushTables(db, { tenantMembershipsTable, configValuesTable });
|
|
72
|
-
await createEventsTable(db);
|
|
73
71
|
|
|
74
72
|
const configFeature = createConfigFeature();
|
|
75
73
|
const userFeature = createUserFeature();
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
import { afterAll, beforeAll, beforeEach, describe, expect, test } from "bun:test";
|
|
15
15
|
import { asRawClient, selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
16
16
|
import { SYSTEM_USER_ID, type TenantId } from "@cosmicdrift/kumiko-framework/engine";
|
|
17
|
-
import {
|
|
17
|
+
import { eventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
18
18
|
import {
|
|
19
19
|
createTestUser,
|
|
20
20
|
setupTestStack,
|
|
@@ -44,7 +44,6 @@ beforeAll(async () => {
|
|
|
44
44
|
});
|
|
45
45
|
await unsafeCreateEntityTable(stack.db, tenantEntity);
|
|
46
46
|
await unsafePushTables(stack.db, { configValuesTable, tenantMembershipsTable });
|
|
47
|
-
await createEventsTable(stack.db);
|
|
48
47
|
});
|
|
49
48
|
|
|
50
49
|
afterAll(async () => {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { afterAll, beforeAll, beforeEach, describe, expect, test } from "bun:test";
|
|
6
6
|
import { asRawClient, selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
7
7
|
import { access, type SessionUser, type TenantId } from "@cosmicdrift/kumiko-framework/engine";
|
|
8
|
-
import {
|
|
8
|
+
import { eventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
9
9
|
import {
|
|
10
10
|
setupTestStack,
|
|
11
11
|
type TestStack,
|
|
@@ -110,7 +110,6 @@ beforeAll(async () => {
|
|
|
110
110
|
tenantMembershipsTable,
|
|
111
111
|
notificationPreferencesTable,
|
|
112
112
|
});
|
|
113
|
-
await createEventsTable(stack.db);
|
|
114
113
|
});
|
|
115
114
|
|
|
116
115
|
afterAll(async () => {
|
|
@@ -2,7 +2,6 @@ import { afterAll, beforeAll, describe, expect, test } from "bun:test";
|
|
|
2
2
|
import { randomBytes } from "node:crypto";
|
|
3
3
|
import type { DbConnection } from "@cosmicdrift/kumiko-framework/db";
|
|
4
4
|
import { access } from "@cosmicdrift/kumiko-framework/engine";
|
|
5
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
6
5
|
import {
|
|
7
6
|
createTestUser,
|
|
8
7
|
setupTestStack,
|
|
@@ -49,7 +48,6 @@ beforeAll(async () => {
|
|
|
49
48
|
|
|
50
49
|
await unsafeCreateEntityTable(db, tenantEntity);
|
|
51
50
|
await unsafePushTables(db, { configValuesTable });
|
|
52
|
-
await createEventsTable(db);
|
|
53
51
|
});
|
|
54
52
|
|
|
55
53
|
afterAll(async () => {
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
// tenant's row. Real HTTP via setupTestStack — no mocks.
|
|
5
5
|
|
|
6
6
|
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
|
|
7
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
8
7
|
import {
|
|
9
8
|
setupTestStack,
|
|
10
9
|
type TestStack,
|
|
@@ -30,7 +29,6 @@ beforeAll(async () => {
|
|
|
30
29
|
|
|
31
30
|
await unsafeCreateEntityTable(stack.db, tenantEntity);
|
|
32
31
|
await unsafePushTables(stack.db, { configValuesTable });
|
|
33
|
-
await createEventsTable(stack.db);
|
|
34
32
|
});
|
|
35
33
|
|
|
36
34
|
afterAll(async () => {
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
type EntityDefinition,
|
|
21
21
|
type TenantId,
|
|
22
22
|
} from "@cosmicdrift/kumiko-framework/engine";
|
|
23
|
-
import {
|
|
23
|
+
import { loadAggregate } from "@cosmicdrift/kumiko-framework/event-store";
|
|
24
24
|
import { fileRefEntity, fileRefsTable } from "@cosmicdrift/kumiko-framework/files";
|
|
25
25
|
import {
|
|
26
26
|
createTestUser,
|
|
@@ -107,7 +107,6 @@ beforeAll(async () => {
|
|
|
107
107
|
await unsafeCreateEntityTable(stack.db, photoEntity, "photo");
|
|
108
108
|
await unsafeCreateEntityTable(stack.db, noteEntity, "note");
|
|
109
109
|
await unsafeCreateEntityTable(stack.db, fileRefEntity);
|
|
110
|
-
await createEventsTable(stack.db);
|
|
111
110
|
});
|
|
112
111
|
|
|
113
112
|
afterAll(async () => {
|
|
@@ -9,12 +9,7 @@ import {
|
|
|
9
9
|
EXT_TENANT_DATA,
|
|
10
10
|
type TenantId,
|
|
11
11
|
} from "@cosmicdrift/kumiko-framework/engine";
|
|
12
|
-
import {
|
|
13
|
-
append,
|
|
14
|
-
createEventsTable,
|
|
15
|
-
eventsTable,
|
|
16
|
-
loadAggregate,
|
|
17
|
-
} from "@cosmicdrift/kumiko-framework/event-store";
|
|
12
|
+
import { append, eventsTable, loadAggregate } from "@cosmicdrift/kumiko-framework/event-store";
|
|
18
13
|
import {
|
|
19
14
|
createTestUser,
|
|
20
15
|
setupTestStack,
|
|
@@ -95,7 +90,6 @@ beforeAll(async () => {
|
|
|
95
90
|
await unsafeCreateEntityTable(db, userSessionEntity);
|
|
96
91
|
await unsafeCreateEntityTable(db, tenantComplianceProfileEntity);
|
|
97
92
|
await unsafeCreateEntityTable(db, tenantMembershipEntity);
|
|
98
|
-
await createEventsTable(db);
|
|
99
93
|
await unsafePushTables(db, { configValuesTable });
|
|
100
94
|
});
|
|
101
95
|
|
|
@@ -218,7 +212,6 @@ describe("tenant-lifecycle :: pipeline abandon / destroyFailed", () => {
|
|
|
218
212
|
});
|
|
219
213
|
await unsafeCreateEntityTable(poisonStack.db, tenantEntity);
|
|
220
214
|
await unsafeCreateEntityTable(poisonStack.db, tenantComplianceProfileEntity);
|
|
221
|
-
await createEventsTable(poisonStack.db);
|
|
222
215
|
await unsafePushTables(poisonStack.db, { configValuesTable });
|
|
223
216
|
});
|
|
224
217
|
|
|
@@ -425,7 +418,6 @@ describe("tenant-lifecycle :: sweep isolates one tenant's failure from another's
|
|
|
425
418
|
});
|
|
426
419
|
await unsafeCreateEntityTable(isolationStack.db, tenantEntity);
|
|
427
420
|
await unsafeCreateEntityTable(isolationStack.db, tenantComplianceProfileEntity);
|
|
428
|
-
await createEventsTable(isolationStack.db);
|
|
429
421
|
await unsafePushTables(isolationStack.db, { configValuesTable });
|
|
430
422
|
});
|
|
431
423
|
|
|
@@ -495,7 +487,6 @@ describe("tenant-lifecycle :: 410 gate derived from the mounted provider", () =>
|
|
|
495
487
|
await unsafeCreateEntityTable(derivedStack.db, userSessionEntity);
|
|
496
488
|
await unsafeCreateEntityTable(derivedStack.db, tenantComplianceProfileEntity);
|
|
497
489
|
await unsafeCreateEntityTable(derivedStack.db, tenantMembershipEntity);
|
|
498
|
-
await createEventsTable(derivedStack.db);
|
|
499
490
|
await unsafePushTables(derivedStack.db, { configValuesTable });
|
|
500
491
|
});
|
|
501
492
|
|
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
defineFeature,
|
|
17
17
|
type SessionUser,
|
|
18
18
|
} from "@cosmicdrift/kumiko-framework/engine";
|
|
19
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
20
19
|
import {
|
|
21
20
|
pushEntityProjectionTables,
|
|
22
21
|
setupTestStack,
|
|
@@ -84,7 +83,6 @@ describe("without tenant-settings mount", () => {
|
|
|
84
83
|
});
|
|
85
84
|
await unsafePushTables(stack.db, { configValuesTable });
|
|
86
85
|
await unsafeCreateEntityTable(stack.db, invoiceEntity);
|
|
87
|
-
await createEventsTable(stack.db);
|
|
88
86
|
await pushEntityProjectionTables(stack, stack.registry);
|
|
89
87
|
});
|
|
90
88
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
|
|
2
2
|
import { randomBytes } from "node:crypto";
|
|
3
3
|
import type { DbConnection } from "@cosmicdrift/kumiko-framework/db";
|
|
4
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
5
4
|
import {
|
|
6
5
|
createTestUser,
|
|
7
6
|
setupTestStack,
|
|
@@ -53,7 +52,6 @@ beforeAll(async () => {
|
|
|
53
52
|
await unsafeCreateEntityTable(db, tenantEntity);
|
|
54
53
|
await unsafeCreateEntityTable(db, tierAssignmentEntity);
|
|
55
54
|
await unsafePushTables(db, { configValuesTable });
|
|
56
|
-
await createEventsTable(db);
|
|
57
55
|
});
|
|
58
56
|
|
|
59
57
|
afterAll(async () => {
|
|
@@ -26,7 +26,6 @@ import {
|
|
|
26
26
|
} from "@cosmicdrift/kumiko-framework/crypto";
|
|
27
27
|
import { createEventStoreExecutor, createTenantDb } from "@cosmicdrift/kumiko-framework/db";
|
|
28
28
|
import { createSystemUser, SYSTEM_TENANT_ID } from "@cosmicdrift/kumiko-framework/engine";
|
|
29
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
30
29
|
import {
|
|
31
30
|
createTestDb,
|
|
32
31
|
type TestDb,
|
|
@@ -47,7 +46,6 @@ const executor = createEventStoreExecutor(userTable, userEntity, { entityName: "
|
|
|
47
46
|
beforeAll(async () => {
|
|
48
47
|
testDb = await createTestDb();
|
|
49
48
|
await unsafeCreateEntityTable(testDb.db, userEntity, "user");
|
|
50
|
-
await createEventsTable(testDb.db);
|
|
51
49
|
});
|
|
52
50
|
|
|
53
51
|
afterAll(async () => {
|
|
@@ -12,7 +12,6 @@ import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, test } fr
|
|
|
12
12
|
import { asRawClient } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
13
13
|
import { createEventStoreExecutor, createTenantDb } from "@cosmicdrift/kumiko-framework/db";
|
|
14
14
|
import { createSystemUser, SYSTEM_TENANT_ID } from "@cosmicdrift/kumiko-framework/engine";
|
|
15
|
-
import { createEventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
16
15
|
import {
|
|
17
16
|
createTestDb,
|
|
18
17
|
type TestDb,
|
|
@@ -30,7 +29,6 @@ const executor = createEventStoreExecutor(userTable, userEntity, { entityName: "
|
|
|
30
29
|
beforeAll(async () => {
|
|
31
30
|
testDb = await createTestDb();
|
|
32
31
|
await unsafeCreateEntityTable(testDb.db, userEntity, "user");
|
|
33
|
-
await createEventsTable(testDb.db);
|
|
34
32
|
});
|
|
35
33
|
|
|
36
34
|
afterAll(async () => {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { afterAll, beforeAll, beforeEach, describe, expect, test } from "bun:test";
|
|
10
10
|
import { asRawClient, selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
11
|
-
import {
|
|
11
|
+
import { eventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
12
12
|
import {
|
|
13
13
|
setupTestStack,
|
|
14
14
|
type TestStack,
|
|
@@ -33,7 +33,6 @@ beforeAll(async () => {
|
|
|
33
33
|
});
|
|
34
34
|
await unsafeCreateEntityTable(stack.db, userEntity);
|
|
35
35
|
await unsafePushTables(stack.db, { configValuesTable });
|
|
36
|
-
await createEventsTable(stack.db);
|
|
37
36
|
});
|
|
38
37
|
|
|
39
38
|
afterAll(async () => {
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
SYSTEM_TENANT_ID,
|
|
15
15
|
type TenantId,
|
|
16
16
|
} from "@cosmicdrift/kumiko-framework/engine";
|
|
17
|
-
import { append
|
|
17
|
+
import { append } from "@cosmicdrift/kumiko-framework/event-store";
|
|
18
18
|
import {
|
|
19
19
|
createTestDb,
|
|
20
20
|
type TestDb,
|
|
@@ -35,7 +35,6 @@ const executor = createEventStoreExecutor(userTable, userEntity, { entityName: "
|
|
|
35
35
|
beforeAll(async () => {
|
|
36
36
|
testDb = await createTestDb();
|
|
37
37
|
await unsafeCreateEntityTable(testDb.db, userEntity, "user");
|
|
38
|
-
await createEventsTable(testDb.db);
|
|
39
38
|
});
|
|
40
39
|
|
|
41
40
|
afterAll(async () => {
|