@cosmicdrift/kumiko-dev-server 0.308.0 → 0.309.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.308.0",
3
+ "version": "0.309.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.308.0",
63
- "@cosmicdrift/kumiko-framework": "0.308.0",
64
- "@cosmicdrift/kumiko-headless": "0.308.0",
65
- "@cosmicdrift/kumiko-server-runtime": "0.308.0",
62
+ "@cosmicdrift/kumiko-bundled-features": "0.309.0",
63
+ "@cosmicdrift/kumiko-framework": "0.309.0",
64
+ "@cosmicdrift/kumiko-headless": "0.309.0",
65
+ "@cosmicdrift/kumiko-server-runtime": "0.309.0",
66
66
  "ts-morph": "^28.0.0"
67
67
  },
68
68
  "publishConfig": {
package/src/index.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  // - runDevApp (high-level)
11
11
  // Mischt die Standard-Features (config/user/tenant/auth-email-
12
12
  // password) automatisch dazu wenn `auth` gesetzt ist, wired die
13
- // Login-Routes + Error-Map, ruft seedAdmin im onAfterSetup. Default
13
+ // Login-Routes + Error-Map, ruft seedAdminGuarded im onAfterSetup. Default
14
14
  // für Sample-Apps und Showcases — 5-10 Zeilen Bootstrap statt 50.
15
15
 
16
16
  export {
@@ -1,8 +1,7 @@
1
- // runDevApp — high-level dev-server wrapper für Sample-Apps und
2
- // Showcases. Mischt die Standard-Features (config/user/tenant/auth-
3
- // email-password) automatisch dazu wenn auth-mode aktiv ist, wired das
4
- // AuthRoutesConfig + Login-Error-Map, und ruft seedAdmin() im
5
- // onAfterSetup. Reduziert den Sample-Bootstrap von 50 Zeilen auf 5-10.
1
+ // High-level dev-server wrapper for sample apps and showcases. In auth mode it
2
+ // mixes in the standard features (config/user/tenant/auth-email-password),
3
+ // wires AuthRoutesConfig plus the login error map and calls seedAdminGuarded()
4
+ // in onAfterSetup, cutting a sample bootstrap from ~50 lines to 5-10.
6
5
  //
7
6
  // Auto-mix passiert NUR im auth-mode. Ohne `auth`-Block bleibt der
8
7
  // Server im Auto-Mint-JWT-Modus (Dev-Default) und mischt nichts dazu —
@@ -16,7 +15,7 @@
16
15
  import { AuthErrors, AuthHandlers } from "@cosmicdrift/kumiko-bundled-features/auth-email-password";
17
16
  import {
18
17
  type SeedAdminOptions,
19
- seedAdmin,
18
+ seedAdminGuarded,
20
19
  } from "@cosmicdrift/kumiko-bundled-features/auth-email-password/seeding";
21
20
  import {
22
21
  EXT_SESSION_STORE,
@@ -209,9 +208,8 @@ export type RunDevAppOptions = {
209
208
  /** SIGINT/SIGTERM-Handler installieren (Default true; in Tests auf
210
209
  * false damit repeated boots keine Listener akkumulieren). */
211
210
  readonly installSignalHandlers?: boolean;
212
- /** Auth-Mode: Standard-Features dazu, Auth-Routes wired, seedAdmin
213
- * läuft im onAfterSetup. Ohne `auth` läuft der Server im Auto-Mint-
214
- * JWT-Modus. */
211
+ /** Auth mode: standard features mixed in, auth routes wired, seedAdminGuarded
212
+ * runs in onAfterSetup. Without `auth` the server stays in auto-mint JWT mode. */
215
213
  readonly auth?: RunDevAppAuthOptions;
216
214
  /** Eigene Seed-Funktionen, laufen nach dem Admin (wenn auth) in
217
215
  * Array-Reihenfolge. */
@@ -598,7 +596,7 @@ export async function runDevApp(options: RunDevAppOptions): Promise<KumikoServer
598
596
  );
599
597
  }
600
598
  if (effectiveAuth) {
601
- await seedAdmin(stack.db, effectiveAuth.admin);
599
+ await seedAdminGuarded(stack.db, effectiveAuth.admin);
602
600
  }
603
601
  // Apply r.config({ seeds }) declared by any registered feature.
604
602
  // Runs before user-supplied seed callbacks so those can read /