@cosmicdrift/kumiko-dev-server 0.290.0 → 0.291.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.290.0",
3
+ "version": "0.291.0",
4
4
  "description": "Dev-tooling for Kumiko apps: local dev-server bootstrap (runDevApp), scaffolding, codegen. Its compose-stacks/env-schema subpaths are consumed at prod boot too — see @cosmicdrift/kumiko-server-runtime for the prod runner itself.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -59,10 +59,10 @@
59
59
  "kumiko-upgrade": "./bin/kumiko-upgrade.ts"
60
60
  },
61
61
  "dependencies": {
62
- "@cosmicdrift/kumiko-bundled-features": "0.290.0",
63
- "@cosmicdrift/kumiko-framework": "0.290.0",
64
- "@cosmicdrift/kumiko-headless": "0.290.0",
65
- "@cosmicdrift/kumiko-server-runtime": "0.290.0",
62
+ "@cosmicdrift/kumiko-bundled-features": "0.291.0",
63
+ "@cosmicdrift/kumiko-framework": "0.291.0",
64
+ "@cosmicdrift/kumiko-headless": "0.291.0",
65
+ "@cosmicdrift/kumiko-server-runtime": "0.291.0",
66
66
  "ts-morph": "^28.0.0"
67
67
  },
68
68
  "publishConfig": {
package/src/changes.json CHANGED
@@ -1,4 +1,10 @@
1
1
  [
2
+ {
3
+ "version": "0.291.0",
4
+ "type": "fix",
5
+ "title": "renderWriteHandlerTypes emits the WriteHandlerQn union in stable order",
6
+ "detail": "`renderWriteHandlerTypes` now sorts `handlerQns` before rendering, like its sibling renderers in the same file. The dev-server passes registration order (`collectWriteHandlerQns`) while the CLI/build path passes manifest order, so the same feature set produced a differently ordered `WriteHandlerQn` union in `.kumiko/define.ts` and `.kumiko/types.generated.d.ts` depending on which one ran last. Consumer apps that commit those generated files no longer get order-only diffs after a local `bun dev`."
7
+ },
2
8
  {
3
9
  "version": "0.289.0",
4
10
  "type": "improvement",
@@ -90,4 +90,11 @@ describe("renderWriteHandlerTypes", () => {
90
90
  expect(out).toContain("export type WriteHandlerQn =");
91
91
  expect(out).toContain('| "tenant:write:create"');
92
92
  });
93
+
94
+ test("output does not depend on input order", () => {
95
+ const out = renderWriteHandlerTypes(["a:write:x", "b:write:y"]);
96
+
97
+ expect(renderWriteHandlerTypes(["b:write:y", "a:write:x"])).toBe(out);
98
+ expect(out.indexOf('| "a:write:x"')).toBeLessThan(out.indexOf('| "b:write:y"'));
99
+ });
93
100
  });
@@ -296,7 +296,9 @@ export function renderDefineFile(handlerQns: readonly string[] = []): string {
296
296
  export function renderWriteHandlerTypes(handlerQns: readonly string[]): string {
297
297
  if (handlerQns.length === 0) return "";
298
298
 
299
- const lines = handlerQns.map((qn) => ` | "${qn}"`);
299
+ // Stable order — callers pass registration order (dev-server) or manifest
300
+ // order (CLI); bare sort keeps both byte-identical.
301
+ const lines = [...handlerQns].sort().map((qn) => ` | "${qn}"`);
300
302
  return ["", WRITE_HANDLER_QN_MARKER, `export type WriteHandlerQn =`, ...lines, ";", ""].join(
301
303
  "\n",
302
304
  );
@@ -63,6 +63,7 @@ import {
63
63
  type SessionUser,
64
64
  type TenantId,
65
65
  type TierResolverPlugin,
66
+ type ValidateBootOptions,
66
67
  validateAppCustomScreenWriteQns,
67
68
  validateBoot,
68
69
  } from "@cosmicdrift/kumiko-framework/engine";
@@ -171,6 +172,8 @@ export type RunDevAppOptions = {
171
172
  * auth-email-password automatisch dazu gemischt — KEIN doppeltes
172
173
  * manuelles Hinzufügen nötig. */
173
174
  readonly features: readonly FeatureDefinition[];
175
+ /** Opt-in boot-validator warnings — see ValidateBootOptions. */
176
+ readonly validateBootOptions?: ValidateBootOptions;
174
177
  /** Pfad zum Browser-Entry-Modul. Bun.build bündelt es zu /client.js.
175
178
  * Mutually exclusive mit `clientEntries`. */
176
179
  readonly clientEntry?: string;
@@ -297,7 +300,7 @@ export async function runDevApp(options: RunDevAppOptions): Promise<KumikoServer
297
300
  // CrashLoopBackOff sterben ließ (#359). Wirft synchron, bevor ein
298
301
  // Socket oder Watcher (codegen-Write) aufgeht.
299
302
  try {
300
- validateBoot(features);
303
+ validateBoot(features, options.validateBootOptions);
301
304
  } finally {
302
305
  if (setFileStorageProviderEnv) delete process.env["FILE_STORAGE_PROVIDER"];
303
306
  }