@cosmicdrift/kumiko-server-runtime 0.265.0 → 0.268.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-server-runtime",
3
- "version": "0.265.0",
3
+ "version": "0.268.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,8 +80,8 @@
80
80
  }
81
81
  },
82
82
  "dependencies": {
83
- "@cosmicdrift/kumiko-bundled-features": "0.265.0",
84
- "@cosmicdrift/kumiko-framework": "0.265.0",
83
+ "@cosmicdrift/kumiko-bundled-features": "0.268.0",
84
+ "@cosmicdrift/kumiko-framework": "0.268.0",
85
85
  "temporal-polyfill": "^0.3.2"
86
86
  },
87
87
  "publishConfig": {
@@ -1,13 +1,9 @@
1
1
  import { createJobRunLogger } from "@cosmicdrift/kumiko-bundled-features/jobs";
2
2
  import type { DbConnection } from "@cosmicdrift/kumiko-framework/db";
3
3
  import type { Registry } from "@cosmicdrift/kumiko-framework/engine";
4
- import type {
5
- AppContext,
6
- DispatchWriteRef,
7
- JobRunIn,
8
- } from "@cosmicdrift/kumiko-framework/engine/types";
4
+ import type { AppContext, JobRunIn } from "@cosmicdrift/kumiko-framework/engine/types";
9
5
  import { createJobRunner, type JobRunner } from "@cosmicdrift/kumiko-framework/jobs";
10
- import type { Dispatcher } from "@cosmicdrift/kumiko-framework/pipeline";
6
+ import { type Dispatcher, dispatcherToWriteRef } from "@cosmicdrift/kumiko-framework/pipeline";
11
7
 
12
8
  export function jobRunLoggerCallbacks(
13
9
  registry: Registry,
@@ -17,18 +13,6 @@ export function jobRunLoggerCallbacks(
17
13
  return createJobRunLogger({ db, registry });
18
14
  }
19
15
 
20
- // Same adapter as the prod entrypoints' dispatcherToWriteRef (entrypoint/
21
- // index.ts) — DispatchWriteRef's (user, qn, payload) shape vs. Dispatcher's
22
- // (type, payload, user). Duplicated here because the entrypoint's version
23
- // isn't exported: dev boot builds its own dispatcher via setupTestStack
24
- // rather than going through createApiEntrypoint/createWorkerEntrypoint.
25
- function dispatcherToWriteRef(dispatcher: Dispatcher): DispatchWriteRef {
26
- return {
27
- write: (user, qn, payload) => dispatcher.write(qn, payload, user),
28
- queryAs: (user, qn, payload) => dispatcher.query(qn, payload, user),
29
- };
30
- }
31
-
32
16
  /** Dev-server parity: consume api + worker lanes when jobs are registered. */
33
17
  export async function startDevJobRunners(opts: {
34
18
  readonly registry: Registry;
@@ -59,9 +43,7 @@ export async function startDevJobRunners(opts: {
59
43
  });
60
44
  // Without this, ctx.write/ctx.queryAs inside a dev-run job throw
61
45
  // "dispatcher attached — call attachDispatcher() first" on their first
62
- // call — the prod entrypoints (createApiEntrypoint/createWorkerEntrypoint/
63
- // createAllInOneEntrypoint) do this automatically, dev boot must too
64
- // (kumiko-framework#2553).
46
+ // call — the prod entrypoints attach automatically, dev boot must too.
65
47
  jr.attachDispatcher(dispatcherToWriteRef(opts.dispatcher));
66
48
  await jr.start();
67
49
  runners.push(jr);