@cosmicdrift/kumiko-dev-server 0.182.0 → 0.183.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-dev-server",
3
- "version": "0.182.0",
3
+ "version": "0.183.0",
4
4
  "description": "Dev-tooling for Kumiko apps: local dev-server bootstrap (runDevApp), scaffolding, codegen. Not shipped into production node_modules — see @cosmicdrift/kumiko-server-runtime for the prod boot path.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -54,9 +54,9 @@
54
54
  "kumiko-schema-check": "./bin/kumiko-schema-check.ts"
55
55
  },
56
56
  "dependencies": {
57
- "@cosmicdrift/kumiko-bundled-features": "0.182.0",
58
- "@cosmicdrift/kumiko-framework": "0.182.0",
59
- "@cosmicdrift/kumiko-server-runtime": "0.182.0",
57
+ "@cosmicdrift/kumiko-bundled-features": "0.183.0",
58
+ "@cosmicdrift/kumiko-framework": "0.183.0",
59
+ "@cosmicdrift/kumiko-server-runtime": "0.183.0",
60
60
  "ts-morph": "^28.0.0"
61
61
  },
62
62
  "publishConfig": {
@@ -82,6 +82,11 @@ describe("createKumikoServer", () => {
82
82
  expect(body).toMatch(/<div id="root">/);
83
83
  // Reload-Snippet wurde in </body> injiziert.
84
84
  expect(body).toMatch(/EventSource\("\/_reload"\)/);
85
+ // As a classic script the bundle's top-level declarations become window
86
+ // properties: a dependency exporting `function history()`
87
+ // (prosemirror-history, via tiptap) then replaces window.history and every
88
+ // pushState throws. Prod has always emitted the module form.
89
+ expect(body).toMatch(/<script type="module" src="\/client\.js"><\/script>/);
85
90
  });
86
91
 
87
92
  test("GET /client.js → 404 wenn clientEntry fehlt (Route nicht registriert)", async () => {
@@ -255,6 +255,12 @@ const RELOAD_SNIPPET = `
255
255
  // Minimal HTML when the caller didn't hand one in. `#root` is the
256
256
  // default mount target for `createKumikoApp`, so the one-line client
257
257
  // can attach without the sample having to ship its own template.
258
+ //
259
+ // `type="module"` is load-bearing: a classic script turns the bundle's
260
+ // top-level declarations into window properties, so a dependency exporting
261
+ // `function history()` (prosemirror-history, pulled in by tiptap) silently
262
+ // replaces `window.history` and every pushState afterwards throws. Prod
263
+ // (build-prod-bundle) has always emitted the module form.
258
264
  const DEFAULT_HTML = `<!doctype html>
259
265
  <html lang="en">
260
266
  <head>
@@ -264,7 +270,7 @@ const DEFAULT_HTML = `<!doctype html>
264
270
  </head>
265
271
  <body>
266
272
  <div id="root"></div>
267
- <script src="/client.js"></script>
273
+ <script type="module" src="/client.js"></script>
268
274
  </body>
269
275
  </html>
270
276
  `;
@@ -730,7 +736,11 @@ export async function createKumikoServer(
730
736
  const devJobRunners = await startDevJobRunners({
731
737
  registry: stack.registry,
732
738
  db: stack.db,
733
- context: { db: stack.db, registry: stack.registry },
739
+ // The stack's own AppContext, not a `{ db, registry }` literal: these
740
+ // runners consume the lanes, and a job reaching for ctx.files /
741
+ // ctx.notify / ctx.config would otherwise die here while the very same
742
+ // handler works on the request path (kumiko-framework#1232).
743
+ context: stack.context,
734
744
  redisUrl,
735
745
  });
736
746