@cosmicdrift/kumiko-dev-server 0.173.1 → 0.174.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-dev-server",
3
- "version": "0.173.1",
3
+ "version": "0.174.1",
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.173.1",
58
- "@cosmicdrift/kumiko-framework": "0.173.1",
59
- "@cosmicdrift/kumiko-server-runtime": "0.173.1",
57
+ "@cosmicdrift/kumiko-bundled-features": "0.174.1",
58
+ "@cosmicdrift/kumiko-framework": "0.174.1",
59
+ "@cosmicdrift/kumiko-server-runtime": "0.174.1",
60
60
  "ts-morph": "^28.0.0"
61
61
  },
62
62
  "publishConfig": {
@@ -462,18 +462,14 @@ describe("createKumikoServer — hot-reload broadcast", () => {
462
462
  const initialBuilds = builds;
463
463
  writeFileSync(join(webDir, "page.tsx"), "export const x = 1;\n");
464
464
 
465
- const deadline = Date.now() + 3000;
466
- let sawReload = false;
467
- while (Date.now() < deadline && !sawReload) {
468
- const readPromise = reader.read();
469
- const timeout = new Promise<{ done: true; value: undefined }>((resolve) =>
470
- setTimeout(() => resolve({ done: true, value: undefined }), 200),
471
- );
472
- const { value, done } = await Promise.race([readPromise, timeout]);
473
- if (done || value === undefined) continue;
474
- const chunk = new TextDecoder().decode(value);
475
- if (chunk.includes("event: reload")) sawReload = true;
476
- }
465
+ const readAll = (async () => {
466
+ for (;;) {
467
+ const { value, done } = await reader.read();
468
+ if (done) return false;
469
+ if (new TextDecoder().decode(value).includes("event: reload")) return true;
470
+ }
471
+ })();
472
+ const sawReload = await Promise.race([readAll, Bun.sleep(3000).then(() => false)]);
477
473
  await reader.cancel();
478
474
 
479
475
  expect(builds).toBeGreaterThan(initialBuilds);
@@ -127,5 +127,14 @@ describe("walkthrough — DX-3.1 snapshot", () => {
127
127
  expect(main).toContain("admin: {");
128
128
  expect(main).toContain("memberships:");
129
129
  expect(main).toContain("runProdApp");
130
+ // Prod writer stays untouched — the verify flow must run there (#1687).
131
+ expect(main).not.toContain("emailVerified");
132
+ });
133
+
134
+ test("bin/dev.ts seeds the admin as emailVerified: true so login doesn't 422", async () => {
135
+ await scaffoldApp({ name: "my-notes", destination: appRoot });
136
+ const dev = readFileSync(join(appRoot, "bin/dev.ts"), "utf-8");
137
+ expect(dev).toContain("admin: {");
138
+ expect(dev).toContain("emailVerified: true,");
130
139
  });
131
140
  });
@@ -568,6 +568,10 @@ function renderDev(appName: string): string {
568
568
  writer.writeLine(`email: "admin@${appName}.local",`);
569
569
  writer.writeLine(`password: "changeme",`);
570
570
  writer.writeLine(`displayName: "Admin",`);
571
+ // Dev-only: skip the email-verify login gate for the seeded
572
+ // admin. Prod's scaffold (renderMain) leaves this unset on
573
+ // purpose — the verify flow must run there.
574
+ writer.writeLine("emailVerified: true,");
571
575
  writer.write("memberships: [");
572
576
  writer.indent(() => {
573
577
  writer.inlineBlock(() => {