@cosmicdrift/kumiko-server-runtime 0.356.0 → 0.358.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.
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// share every step that decides ciphers, blind indexes and config encryption.
|
|
6
6
|
import { loadJwtSecretOrKeyring } from "@cosmicdrift/kumiko-framework/api";
|
|
7
7
|
import { configureBlindIndexKey, configurePiiSubjectKms, resolvePlatformKeks, } from "@cosmicdrift/kumiko-framework/crypto";
|
|
8
|
-
import { configureEntityFieldEncryption, createDbConnection, } from "@cosmicdrift/kumiko-framework/db";
|
|
8
|
+
import { configureEntityFieldEncryption, createDbConnection, dbConnectionOptionsFromEnv, outsideTransactionPoolOptionsFromEnv, } from "@cosmicdrift/kumiko-framework/db";
|
|
9
9
|
import { createRegistry, findTierResolverUsage, validateBoot, } from "@cosmicdrift/kumiko-framework/engine";
|
|
10
10
|
import { createWorkerEntrypoint, } from "@cosmicdrift/kumiko-framework/entrypoint";
|
|
11
11
|
import { assertKumikoSchemaCurrent, SchemaDriftError, } from "@cosmicdrift/kumiko-framework/migrations";
|
|
@@ -101,7 +101,8 @@ export async function bootWorkerProcess(options, envSource, profile) {
|
|
|
101
101
|
throw new Error(`[${processName}] BOOT ABORTED — KMS health check failed (latency ${kmsHealth.latencyMs}ms)`);
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
const { db, close: closeDb } = createDbConnection(databaseUrl);
|
|
104
|
+
const { db, close: closeDb } = createDbConnection(databaseUrl, dbConnectionOptionsFromEnv(envSource));
|
|
105
|
+
const { db: outsideTransactionDb, close: closeOutsideTransactionDb } = createDbConnection(databaseUrl, outsideTransactionPoolOptionsFromEnv(envSource));
|
|
105
106
|
const redis = new Redis(redisUrl, { maxRetriesPerRequest: null });
|
|
106
107
|
const cacheSync = createRedisCacheSyncBus({
|
|
107
108
|
redisUrl,
|
|
@@ -115,6 +116,7 @@ export async function bootWorkerProcess(options, envSource, profile) {
|
|
|
115
116
|
}
|
|
116
117
|
catch (err) {
|
|
117
118
|
await closeDb();
|
|
119
|
+
await closeOutsideTransactionDb();
|
|
118
120
|
redis.disconnect();
|
|
119
121
|
await cacheSync.close();
|
|
120
122
|
throw err;
|
|
@@ -154,6 +156,7 @@ export async function bootWorkerProcess(options, envSource, profile) {
|
|
|
154
156
|
dispatcherOptions: {
|
|
155
157
|
idempotency,
|
|
156
158
|
cacheSync,
|
|
159
|
+
outsideTransactionDb,
|
|
157
160
|
...(resolvedEffectiveFeatures && { effectiveFeatures: resolvedEffectiveFeatures }),
|
|
158
161
|
},
|
|
159
162
|
eventDedup,
|
|
@@ -184,6 +187,7 @@ export async function bootWorkerProcess(options, envSource, profile) {
|
|
|
184
187
|
close: async () => {
|
|
185
188
|
await entrypoint.stop();
|
|
186
189
|
await closeDb();
|
|
190
|
+
await closeOutsideTransactionDb();
|
|
187
191
|
redis.disconnect();
|
|
188
192
|
},
|
|
189
193
|
};
|
|
@@ -66,7 +66,8 @@ const hasBun = typeof globalThis.Bun !== "undefined";
|
|
|
66
66
|
// (nur public/) gedacht ist — wer JS/CSS will, schreibt ein eigenes
|
|
67
67
|
// index.html mit den richtigen Placeholder-Tags.
|
|
68
68
|
// interactive-widget=resizes-content (fw#1918): keeps `position: fixed`
|
|
69
|
-
// bottom bars anchored above a mobile keyboard instead of behind it.
|
|
69
|
+
// bottom bars anchored above a mobile keyboard instead of behind it. iOS Safari
|
|
70
|
+
// ignores the key; renderer-web's useKeyboardInset covers it via window.visualViewport.
|
|
70
71
|
export const DEFAULT_HTML = `<!doctype html>
|
|
71
72
|
<html lang="en">
|
|
72
73
|
<head>
|
package/dist/compose-features.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// auth-email-password (+ auth-self-registration when authOptions.signup
|
|
13
13
|
// is set), then the app features. Later features may reference earlier
|
|
14
14
|
// ones (e.g. authClaims hooks on user/tenant).
|
|
15
|
-
import { createAuthEmailPasswordFeature, createAuthSelfRegistrationToggleFeature, } from "@cosmicdrift/kumiko-bundled-features/auth-email-password";
|
|
15
|
+
import { AUTH_SELF_REGISTRATION_FEATURE, createAuthEmailPasswordFeature, createAuthSelfRegistrationToggleFeature, } from "@cosmicdrift/kumiko-bundled-features/auth-email-password";
|
|
16
16
|
import { AUTH_MFA_FEATURE, mfaStatusCheckerFromFeature, } from "@cosmicdrift/kumiko-bundled-features/auth-mfa";
|
|
17
17
|
import { createConfigFeature } from "@cosmicdrift/kumiko-bundled-features/config";
|
|
18
18
|
import { createFilesTenantDataFeature } from "@cosmicdrift/kumiko-bundled-features/files-tenant-data";
|
|
@@ -74,6 +74,11 @@ export function composeFeatures(appFeatures, options) {
|
|
|
74
74
|
const filteredApp = [];
|
|
75
75
|
for (const f of dedupedAppFeatures) {
|
|
76
76
|
if (bundledNames.has(f.name)) {
|
|
77
|
+
// The toggle takes no options, so the app copy is identical. Apps still
|
|
78
|
+
// need it in APP_FEATURES: the schema CLI and tests compose without
|
|
79
|
+
// authOptions.signup and only get it from there.
|
|
80
|
+
if (f.name === AUTH_SELF_REGISTRATION_FEATURE)
|
|
81
|
+
continue;
|
|
77
82
|
// biome-ignore lint/suspicious/noConsole: boot-time UX warning
|
|
78
83
|
console.warn(`[composeFeatures] "${f.name}" already auto-mounted via includeBundled — dropping the explicit copy from APP_FEATURES. Remove it from run-config.ts to silence this warning.`);
|
|
79
84
|
continue;
|
package/dist/run-prod-app.js
CHANGED
|
@@ -50,7 +50,7 @@ import { TenantQueries } from "@cosmicdrift/kumiko-bundled-features/tenant";
|
|
|
50
50
|
import { UserQueries } from "@cosmicdrift/kumiko-bundled-features/user";
|
|
51
51
|
import { createDefaultSseBroker, createRedisLoginRateLimiter, loadJwtSecretOrKeyring, parseTrustedProxyHopsEnv, TRUSTED_PROXY_HOPS_ENV, } from "@cosmicdrift/kumiko-framework/api";
|
|
52
52
|
import { configureBlindIndexKey, configurePiiSubjectKms, resolvePlatformKeks, } from "@cosmicdrift/kumiko-framework/crypto";
|
|
53
|
-
import { configureEntityFieldEncryption, createDbConnection, } from "@cosmicdrift/kumiko-framework/db";
|
|
53
|
+
import { configureEntityFieldEncryption, createDbConnection, dbConnectionOptionsFromEnv, outsideTransactionPoolOptionsFromEnv, } from "@cosmicdrift/kumiko-framework/db";
|
|
54
54
|
import { collectWriteHandlerQns, createRegistry, findTierResolverUsage, validateAppCustomScreenWriteQns, validateBoot, } from "@cosmicdrift/kumiko-framework/engine";
|
|
55
55
|
import { createAllInOneEntrypoint, createApiEntrypoint, } from "@cosmicdrift/kumiko-framework/entrypoint";
|
|
56
56
|
import { KumikoBootError, kmsSlotsOf, parseEnv, withOptionalEnvKeys, } from "@cosmicdrift/kumiko-framework/env";
|
|
@@ -334,7 +334,8 @@ export async function runProdApp(options) {
|
|
|
334
334
|
throw new Error(`[runProdApp] BOOT ABORTED — KMS health check failed (latency ${kmsHealth.latencyMs}ms)`);
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
const { db, close: closeDb } = createDbConnection(databaseUrl);
|
|
337
|
+
const { db, close: closeDb } = createDbConnection(databaseUrl, dbConnectionOptionsFromEnv(envSource));
|
|
338
|
+
const { db: outsideTransactionDb, close: closeOutsideTransactionDb } = createDbConnection(databaseUrl, outsideTransactionPoolOptionsFromEnv(envSource));
|
|
338
339
|
const redis = new Redis(redisUrl, { maxRetriesPerRequest: null });
|
|
339
340
|
// Sprint-8a Tier-Composition auto-wire: scan features for a
|
|
340
341
|
// tenantTierResolver-extension. If found AND user didn't supply own
|
|
@@ -502,6 +503,7 @@ export async function runProdApp(options) {
|
|
|
502
503
|
dispatcherOptions: {
|
|
503
504
|
idempotency,
|
|
504
505
|
cacheSync,
|
|
506
|
+
outsideTransactionDb,
|
|
505
507
|
...(resolvedEffectiveFeatures && { effectiveFeatures: resolvedEffectiveFeatures }),
|
|
506
508
|
},
|
|
507
509
|
eventDedup,
|
|
@@ -778,6 +780,7 @@ export async function runProdApp(options) {
|
|
|
778
780
|
handle.server?.stop();
|
|
779
781
|
await flushEscapeHatchAudits();
|
|
780
782
|
await closeDb();
|
|
783
|
+
await closeOutsideTransactionDb();
|
|
781
784
|
redis.disconnect();
|
|
782
785
|
},
|
|
783
786
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-server-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.358.0",
|
|
4
4
|
"description": "Production server-boot runtime for Kumiko apps: connections, schema-drift-gate, seeds, lifecycle, graceful shutdown. Symmetric to kumiko-dev-server's runDevApp, without dev/scaffold/codegen tooling.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -84,11 +84,11 @@
|
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@cosmicdrift/kumiko-bundled-features": "0.
|
|
88
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
89
|
-
"@cosmicdrift/kumiko-headless": "0.
|
|
90
|
-
"@cosmicdrift/kumiko-renderer-web": "0.
|
|
91
|
-
"@cosmicdrift/kumiko-types": "0.
|
|
87
|
+
"@cosmicdrift/kumiko-bundled-features": "0.358.0",
|
|
88
|
+
"@cosmicdrift/kumiko-framework": "0.358.0",
|
|
89
|
+
"@cosmicdrift/kumiko-headless": "0.358.0",
|
|
90
|
+
"@cosmicdrift/kumiko-renderer-web": "0.358.0",
|
|
91
|
+
"@cosmicdrift/kumiko-types": "0.358.0",
|
|
92
92
|
"bun-types": "^1.3.13",
|
|
93
93
|
"ioredis": "^5.10.1",
|
|
94
94
|
"temporal-polyfill": "^0.3.2"
|