@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 +5 -5
- package/src/index.ts +1 -1
- package/src/run-dev-app.ts +8 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-dev-server",
|
|
3
|
-
"version": "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.
|
|
63
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
64
|
-
"@cosmicdrift/kumiko-headless": "0.
|
|
65
|
-
"@cosmicdrift/kumiko-server-runtime": "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
|
|
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 {
|
package/src/run-dev-app.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
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
|
-
|
|
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
|
|
213
|
-
*
|
|
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
|
|
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 /
|