@cosmicdrift/kumiko-server-runtime 0.176.0 → 0.176.2

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/run-prod-app.ts +15 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-server-runtime",
3
- "version": "0.176.0",
3
+ "version": "0.176.2",
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.176.0",
80
- "@cosmicdrift/kumiko-framework": "0.176.0",
79
+ "@cosmicdrift/kumiko-bundled-features": "0.176.2",
80
+ "@cosmicdrift/kumiko-framework": "0.176.2",
81
81
  "temporal-polyfill": "^0.3.2"
82
82
  },
83
83
  "publishConfig": {
@@ -1149,6 +1149,21 @@ export async function runProdApp(options: RunProdAppOptions): Promise<ProdAppHan
1149
1149
  // statt eines fixed JSON-Strings. Heute: registry-static, also OK.
1150
1150
  const appSchemaJson = JSON.stringify(buildAppSchema(registry));
1151
1151
 
1152
+ // App-eigene HTTP-Routes mounten — VOR den Seeds (symmetrisch zum
1153
+ // dev-server, siehe create-kumiko-server.ts). Ein Seed, der über den
1154
+ // Dispatcher dispatcht, baut Honos Matcher; danach wirft jedes weitere
1155
+ // app.get() "Can not add a route since the matcher is already built".
1156
+ // Eingehende /api/*-Pfade sind schon vom dispatcher belegt; extraRoutes
1157
+ // sollte die nicht überschreiben (kein enforce, das ist Author-Verantwortung).
1158
+ if (options.extraRoutes) {
1159
+ options.extraRoutes(entrypoint.app, {
1160
+ db,
1161
+ redis,
1162
+ registry,
1163
+ dispatchSystemWrite: makeDispatchSystemWrite(entrypoint.dispatcher),
1164
+ });
1165
+ }
1166
+
1152
1167
  // 9. Seeds: admin first, then config-seeds from r.config({seeds}),
1153
1168
  // then app-specific. All idempotent — runProdApp doesn't gate
1154
1169
  // "first boot" via flag, every seed-step checks its own
@@ -1193,21 +1208,6 @@ export async function runProdApp(options: RunProdAppOptions): Promise<ProdAppHan
1193
1208
 
1194
1209
  await entrypoint.start();
1195
1210
 
1196
- // 10. App-eigene HTTP-Routes mounten — vor dem static-fallback. Hono
1197
- // matcht in Eintrags-Reihenfolge, also greifen explizite Routen
1198
- // der App (z.B. /feed.xml) bevor der Static-Fallback nach Disk-
1199
- // Files sucht. Eingehende /api/*-Pfade sind schon vom dispatcher
1200
- // belegt; extraRoutes sollte die nicht überschreiben (kein
1201
- // enforce, das ist Author-Verantwortung).
1202
- if (options.extraRoutes) {
1203
- options.extraRoutes(entrypoint.app, {
1204
- db,
1205
- redis,
1206
- registry,
1207
- dispatchSystemWrite: makeDispatchSystemWrite(entrypoint.dispatcher),
1208
- });
1209
- }
1210
-
1211
1211
  // 11. Build the fetch-handler. Static-fallback for non-/api/ paths
1212
1212
  // wired via a wrapper so Hono owns /api/* + extraRoutes and disk
1213
1213
  // owns the rest. Tests use this directly; listen() wraps it in