@cosmicdrift/kumiko-server-runtime 0.174.1 → 0.176.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-server-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.176.1",
|
|
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>",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@cosmicdrift/kumiko-bundled-features": "0.
|
|
80
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
79
|
+
"@cosmicdrift/kumiko-bundled-features": "0.176.1",
|
|
80
|
+
"@cosmicdrift/kumiko-framework": "0.176.1",
|
|
81
81
|
"temporal-polyfill": "^0.3.2"
|
|
82
82
|
},
|
|
83
83
|
"publishConfig": {
|
|
@@ -22,7 +22,7 @@ const KEK = Buffer.alloc(32, 7).toString("base64");
|
|
|
22
22
|
const otherFeature = defineFeature("widgets", () => {});
|
|
23
23
|
|
|
24
24
|
describe("buildBootExtraContext — framework-default provider autowire", () => {
|
|
25
|
-
test("
|
|
25
|
+
test("templateResolver is wired unconditionally (no secrets feature, no auth)", () => {
|
|
26
26
|
const ctx = buildBootExtraContext({
|
|
27
27
|
db: fakeDb,
|
|
28
28
|
features: [otherFeature],
|
|
@@ -30,7 +30,7 @@ describe("buildBootExtraContext — framework-default provider autowire", () =>
|
|
|
30
30
|
registry,
|
|
31
31
|
hasAuth: false,
|
|
32
32
|
});
|
|
33
|
-
expect(typeof (ctx["
|
|
33
|
+
expect(typeof (ctx["templateResolver"] as { findExact?: unknown }).findExact).toBe("function");
|
|
34
34
|
expect(ctx["secrets"]).toBeUndefined();
|
|
35
35
|
expect(ctx["configResolver"]).toBeUndefined();
|
|
36
36
|
expect(ctx["_notifyFactory"]).toBeUndefined();
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
SECRETS_FEATURE_NAME,
|
|
18
18
|
} from "@cosmicdrift/kumiko-bundled-features/secrets";
|
|
19
19
|
import { bindAutoRevokeFromFeature } from "@cosmicdrift/kumiko-bundled-features/sessions";
|
|
20
|
-
import {
|
|
20
|
+
import { createTemplateResolverApi } from "@cosmicdrift/kumiko-bundled-features/template-resolver";
|
|
21
21
|
import type { SseBroker } from "@cosmicdrift/kumiko-framework/api";
|
|
22
22
|
import type { KmsAdapter } from "@cosmicdrift/kumiko-framework/crypto";
|
|
23
23
|
import type { DbConnection } from "@cosmicdrift/kumiko-framework/db";
|
|
@@ -38,7 +38,7 @@ import type {
|
|
|
38
38
|
} from "./run-prod-app";
|
|
39
39
|
|
|
40
40
|
// Boot-time context helpers for runProdApp: ctx-extra-context wiring
|
|
41
|
-
// (
|
|
41
|
+
// (templateResolver/delivery/secrets/config-resolver), auth-mail convenience
|
|
42
42
|
// normalization, and prod session-auth wiring. Split out of run-prod-app.ts
|
|
43
43
|
// (#1005, Welle 2) — mechanical relocation, these are self-contained pure
|
|
44
44
|
// functions, no closure over runProdApp's local boot state.
|
|
@@ -58,7 +58,7 @@ export function addConfigAccessorFactory<T extends { readonly configResolver?: C
|
|
|
58
58
|
// Framework-Default-Provider für den AppContext — gleicher Mechanismus wie
|
|
59
59
|
// der tenantTierResolver-Autowire (findTierResolverUsage): deklarierter
|
|
60
60
|
// Bedarf (Feature gemountet) → Default aus db/env, App überschreibt nur die
|
|
61
|
-
// Ausnahme.
|
|
61
|
+
// Ausnahme. templateResolver ist unbedingt (createTemplateResolverApi wirft nie, baut
|
|
62
62
|
// nur einen db-gebundenen Accessor). secrets wird nur auto-verdrahtet wenn
|
|
63
63
|
// das secrets-Feature gemountet ist UND ein KEK tatsächlich verfügbar ist
|
|
64
64
|
// (masterKey-Override ODER env-KEK present) — sonst skip, damit der eager
|
|
@@ -108,7 +108,7 @@ export function buildBootExtraContext(opts: {
|
|
|
108
108
|
const wireSecrets = hasSecretsFeature && crypto.masterKeyProvider !== undefined;
|
|
109
109
|
const hasDeliveryFeature = opts.features.some((f) => f.name === DELIVERY_FEATURE);
|
|
110
110
|
return {
|
|
111
|
-
|
|
111
|
+
templateResolver: createTemplateResolverApi(opts.db),
|
|
112
112
|
...(opts.kms && { kms: opts.kms }),
|
|
113
113
|
...(hasDeliveryFeature && {
|
|
114
114
|
_notifyFactory: buildDeliveryNotifyFactory({
|
package/src/run-prod-app.ts
CHANGED
|
@@ -483,7 +483,7 @@ export type RunProdAppOptions = {
|
|
|
483
483
|
readonly migrations?: { readonly dir: string } | false;
|
|
484
484
|
/** Extra AppContext keys. Framework-Defaults werden zur Boot-Zeit
|
|
485
485
|
* unter den Factory-Werten ergänzt, App-Werte gewinnen immer:
|
|
486
|
-
* - `
|
|
486
|
+
* - `templateResolver` (createTemplateResolverApi(db)) — immer
|
|
487
487
|
* - `secrets` (createSecretsContext) — nur wenn das `secrets`-Feature
|
|
488
488
|
* gemountet ist (sonst kein KEK-env-Zwang für Apps ohne secrets)
|
|
489
489
|
* - `configResolver` — im Auth-Mode (env-config-overrides)
|