@cosmicdrift/kumiko-server-runtime 0.400.0 → 0.402.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.
@@ -30,7 +30,9 @@ export declare function applyStandardBootSeeds(deps: {
30
30
  readonly cipher: EnvelopeCipher | undefined;
31
31
  readonly processName: string;
32
32
  readonly databaseWait?: DatabaseWaitClock;
33
- }): Promise<void>;
33
+ }): Promise<{
34
+ readonly adminUserId?: string;
35
+ }>;
34
36
  type SharedAuthFlowFields = Pick<RunProdAppAuthOptions, "passwordReset" | "emailVerification" | "accountUnlock" | "signup" | "invite">;
35
37
  type AuthFlowRoutes = Pick<AuthRoutesConfig, "passwordReset" | "emailVerification" | "accountUnlock" | "signup" | "invite">;
36
38
  export type SharedAuthRouteSource = SharedAuthFlowFields & Pick<RunProdAppAuthOptions, "loginErrorStatusMap" | "cookieDomain" | "retiredCookieDomains" | "allowedOrigins" | "unsafeSkipOriginCheck" | "postAuthLanding">;
@@ -48,13 +48,14 @@ export async function buildEffectiveFeaturesResolver(deps) {
48
48
  }
49
49
  export async function applyStandardBootSeeds(deps) {
50
50
  const { db, registry, admin, shortcutSeeds, cipher, processName, databaseWait } = deps;
51
+ let adminUserId;
51
52
  // Seeds are idempotent, so a transient connection error re-runs the whole sequence; any other
52
53
  // error stays fatal. Later boot steps build on the seeds, so this cannot continue in the background.
53
54
  await waitUntilDatabaseReachable(async () => {
54
55
  if (admin) {
55
56
  // Operator-created account, not a self-registration: under emailVerificationMode "strict"
56
57
  // an unverified seed admin could never log in. `admin.emailVerified` still overrides.
57
- await seedAdminGuarded(db, { emailVerified: true, ...admin });
58
+ adminUserId = (await seedAdminGuarded(db, { emailVerified: true, ...admin })).id;
58
59
  }
59
60
  for (const seed of shortcutSeeds) {
60
61
  await seed(db);
@@ -66,6 +67,7 @@ export async function applyStandardBootSeeds(deps) {
66
67
  ...(cipher && { cipher }),
67
68
  });
68
69
  }, { ...databaseWait, processName, target: "database (boot seeds)" });
70
+ return adminUserId === undefined ? {} : { adminUserId };
69
71
  }
70
72
  const MFA_ROUTE_HANDLERS = {
71
73
  mfaVerifyHandler: AuthMfaHandlers.verify,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-server-runtime",
3
- "version": "0.400.0",
3
+ "version": "0.402.0",
4
4
  "description": "Production server-boot runtime for Kumiko apps: connections, schema-drift-gate, seeds, lifecycle, graceful shutdown. Symmetric to kumiko-dev-server's runDevApp, without dev/scaffold tooling.",
5
5
  "license": "MIT",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -96,11 +96,11 @@
96
96
  }
97
97
  },
98
98
  "dependencies": {
99
- "@cosmicdrift/kumiko-bundled-features": "0.400.0",
100
- "@cosmicdrift/kumiko-framework": "0.400.0",
101
- "@cosmicdrift/kumiko-renderer": "0.400.0",
102
- "@cosmicdrift/kumiko-renderer-mail-html": "0.400.0",
103
- "@cosmicdrift/kumiko-types": "0.400.0",
99
+ "@cosmicdrift/kumiko-bundled-features": "0.402.0",
100
+ "@cosmicdrift/kumiko-framework": "0.402.0",
101
+ "@cosmicdrift/kumiko-renderer": "0.402.0",
102
+ "@cosmicdrift/kumiko-renderer-mail-html": "0.402.0",
103
+ "@cosmicdrift/kumiko-types": "0.402.0",
104
104
  "ioredis": "^5.10.1",
105
105
  "temporal-polyfill": "^0.3.2",
106
106
  "zod": "^4.6.7"
@@ -109,7 +109,7 @@
109
109
  "bun-types": "^1.4.4"
110
110
  },
111
111
  "devDependencies": {
112
- "@cosmicdrift/kumiko-testing": "0.400.0",
112
+ "@cosmicdrift/kumiko-testing": "0.402.0",
113
113
  "bun-types": "^1.4.4"
114
114
  },
115
115
  "publishConfig": {