@cosmicdrift/kumiko-server-runtime 0.346.0 → 0.348.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/dist/run-prod-app.d.ts +3 -0
- package/dist/run-prod-app.js +5 -0
- package/dist/run-worker-app.js +2 -0
- package/package.json +5 -5
- package/src/changes.json +6 -0
package/dist/run-prod-app.d.ts
CHANGED
|
@@ -132,6 +132,9 @@ export type RunProdAppAuthOptions = {
|
|
|
132
132
|
* AuthRoutesConfig.cookieDomain). Set to the registrable parent
|
|
133
133
|
* domain when login and app live on different subdomains. */
|
|
134
134
|
readonly cookieDomain?: string;
|
|
135
|
+
/** Former cookie domains cleared on login/logout (see
|
|
136
|
+
* AuthRoutesConfig.retiredCookieDomains). */
|
|
137
|
+
readonly retiredCookieDomains?: readonly string[];
|
|
135
138
|
/** Server-side Origin allowlist for the CSRF guard (see
|
|
136
139
|
* AuthRoutesConfig.allowedOrigins). REQUIRED once `cookieDomain` is set —
|
|
137
140
|
* buildServer fails closed otherwise. Apex + admin host, never tenant
|
package/dist/run-prod-app.js
CHANGED
|
@@ -56,6 +56,7 @@ import { createAllInOneEntrypoint, createApiEntrypoint, } from "@cosmicdrift/kum
|
|
|
56
56
|
import { KumikoBootError, kmsSlotsOf, parseEnv, withOptionalEnvKeys, } from "@cosmicdrift/kumiko-framework/env";
|
|
57
57
|
import { renderDryRun } from "@cosmicdrift/kumiko-framework/env/dry-run";
|
|
58
58
|
import { createEsOperationsTable, createSeedMigrationContext, runPendingSeedMigrations, } from "@cosmicdrift/kumiko-framework/es-ops";
|
|
59
|
+
import { assertSeedModeNotInProduction } from "@cosmicdrift/kumiko-framework/event-store";
|
|
59
60
|
import { assertKumikoSchemaCurrent, SchemaDriftError, } from "@cosmicdrift/kumiko-framework/migrations";
|
|
60
61
|
import { createDispatcher, createEntityCache, createEventDedup, createIdempotencyGuard, } from "@cosmicdrift/kumiko-framework/pipeline";
|
|
61
62
|
import { createRedisCacheSyncBus, redisClientOptionsFromEnv, } from "@cosmicdrift/kumiko-framework/redis";
|
|
@@ -155,6 +156,7 @@ function warnLegacyJwtSecretOnce() {
|
|
|
155
156
|
"loadJwtSecretOrKeyring).");
|
|
156
157
|
}
|
|
157
158
|
export async function runProdApp(options) {
|
|
159
|
+
assertSeedModeNotInProduction();
|
|
158
160
|
// 0. Env-Schema validation + dry-run modes. Runs FIRST so:
|
|
159
161
|
// - operators can introspect env-requirements without a real boot
|
|
160
162
|
// (no DB connection needed, KUMIKO_DRY_RUN_ENV=… → render + exit)
|
|
@@ -514,6 +516,9 @@ export async function runProdApp(options) {
|
|
|
514
516
|
...(effectiveAuth.cookieDomain !== undefined && {
|
|
515
517
|
cookieDomain: effectiveAuth.cookieDomain,
|
|
516
518
|
}),
|
|
519
|
+
...(effectiveAuth.retiredCookieDomains !== undefined && {
|
|
520
|
+
retiredCookieDomains: effectiveAuth.retiredCookieDomains,
|
|
521
|
+
}),
|
|
517
522
|
...(effectiveAuth.allowedOrigins !== undefined && {
|
|
518
523
|
allowedOrigins: effectiveAuth.allowedOrigins,
|
|
519
524
|
}),
|
package/dist/run-worker-app.js
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// Container/Coolify sets the same env vars as runProdApp:
|
|
16
16
|
// DATABASE_URL, REDIS_URL, JWT_SECRET — PORT is not needed.
|
|
17
|
+
import { assertSeedModeNotInProduction } from "@cosmicdrift/kumiko-framework/event-store";
|
|
17
18
|
import { startPiiEventBackfillOnBoot } from "./boot/pii-event-backfill-on-boot.js";
|
|
18
19
|
import { recordAppStartedOnBoot } from "./boot/record-app-started-on-boot.js";
|
|
19
20
|
import { bootWorkerProcess, resolveWorkerEnvSource } from "./boot/worker-boot-core.js";
|
|
@@ -28,6 +29,7 @@ function makeBootModeHandle() {
|
|
|
28
29
|
};
|
|
29
30
|
}
|
|
30
31
|
export async function runWorkerApp(options) {
|
|
32
|
+
assertSeedModeNotInProduction();
|
|
31
33
|
const envSource = await resolveWorkerEnvSource(options, "runWorkerApp");
|
|
32
34
|
// biome-ignore lint/suspicious/noConsole: boot-time progress hint, no logger configured this early
|
|
33
35
|
console.log("[runWorkerApp] booting Kumiko worker…");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-server-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.348.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>",
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@cosmicdrift/kumiko-bundled-features": "0.
|
|
84
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
85
|
-
"@cosmicdrift/kumiko-headless": "0.
|
|
86
|
-
"@cosmicdrift/kumiko-renderer-web": "0.
|
|
83
|
+
"@cosmicdrift/kumiko-bundled-features": "0.348.0",
|
|
84
|
+
"@cosmicdrift/kumiko-framework": "0.348.0",
|
|
85
|
+
"@cosmicdrift/kumiko-headless": "0.348.0",
|
|
86
|
+
"@cosmicdrift/kumiko-renderer-web": "0.348.0",
|
|
87
87
|
"bun-types": "^1.3.13",
|
|
88
88
|
"ioredis": "^5.10.1",
|
|
89
89
|
"temporal-polyfill": "^0.3.2"
|
package/src/changes.json
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.347.0",
|
|
4
|
+
"type": "fix",
|
|
5
|
+
"title": "runProdApp and runDevApp forward auth.retiredCookieDomains to the auth routes",
|
|
6
|
+
"detail": "runProdApp and runDevApp pass retiredCookieDomains through\n`auth.retiredCookieDomains` is now accepted by both runners and reaches the auth routes. Before, the option existed only on the lower-level route config, so apps starting through the runners could not clear a retired cookie domain."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.346.0",
|
|
4
10
|
"type": "improvement",
|