@cosmicdrift/kumiko-server-runtime 0.212.0 → 0.214.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-server-runtime",
3
- "version": "0.212.0",
3
+ "version": "0.214.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/codegen tooling.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -80,8 +80,8 @@
80
80
  }
81
81
  },
82
82
  "dependencies": {
83
- "@cosmicdrift/kumiko-bundled-features": "0.212.0",
84
- "@cosmicdrift/kumiko-framework": "0.212.0",
83
+ "@cosmicdrift/kumiko-bundled-features": "0.214.0",
84
+ "@cosmicdrift/kumiko-framework": "0.214.0",
85
85
  "temporal-polyfill": "^0.3.2"
86
86
  },
87
87
  "publishConfig": {
@@ -39,12 +39,12 @@ export type ComposeFeaturesOptions = {
39
39
  * (+ auth-self-registration when authOptions.signup is set) before the
40
40
  * app features. Mirror of "auth-mode" in run{Dev,Prod}App. */
41
41
  readonly includeBundled: boolean;
42
- /** Optional auth-feature-options durchgereicht an
43
- * createAuthEmailPasswordFeature. Wenn passwordReset / emailVerification
44
- * hier gesetzt sind, registriert das Feature die request-/confirm-
45
- * Handler sonst NICHT (500 wenn die routes via auth-routes.ts
46
- * gemounted sind aber kein Handler dispatcht). Hand-in-hand mit dem
47
- * passwordReset-Block in RunProdAppAuthOptions / RunDevAppAuthOptions. */
42
+ /** Optional auth-feature options passed through to
43
+ * createAuthEmailPasswordFeature. When passwordReset / emailVerification
44
+ * are set here, the feature registers the request/confirm handlers —
45
+ * otherwise it doesn't (500 if the routes are mounted via
46
+ * auth-routes.ts but no handler dispatches). Goes hand-in-hand with the
47
+ * passwordReset block in RunProdAppAuthOptions / RunDevAppAuthOptions. */
48
48
  readonly authOptions?: AuthEmailPasswordOptions;
49
49
  };
50
50
 
@@ -108,13 +108,12 @@ export function composeFeatures(
108
108
  return [...bundled, ...filteredApp];
109
109
  }
110
110
 
111
- /** Shape eines beliebigen run{Prod,Dev}App-Auth-Blocks der eine
112
- * PasswordReset/EmailVerification-Konfiguration tragen kann. Die
113
- * Wrapper-API (PasswordResetSetup) extends die Feature-API
114
- * (PasswordResetOptions), darum reicht ein structural-typed
115
- * Lookup auf den auth-only-Subset. Erlaubt buildComposeAuthOptions
116
- * mit RunProd- UND RunDev-AuthOptions zu callen ohne den Helper
117
- * doppelt zu bauen. */
111
+ /** Shape of any run{Prod,Dev}App auth block that can carry a
112
+ * passwordReset/emailVerification config. The wrapper API
113
+ * (PasswordResetSetup) extends the feature API (PasswordResetOptions), so
114
+ * a structural-typed lookup on the auth-only subset is enough. Lets
115
+ * buildComposeAuthOptions be called with both RunProd- and
116
+ * RunDev-AuthOptions without building the helper twice. */
118
117
  export type AuthOptionsCarrier = {
119
118
  readonly passwordReset?: PasswordResetOptions;
120
119
  readonly emailVerification?: EmailVerificationOptions;
@@ -124,24 +123,26 @@ export type AuthOptionsCarrier = {
124
123
  readonly accountLockout?: AccountLockoutOptions;
125
124
  };
126
125
 
127
- /** Baut den authOptions-Block für composeFeatures aus einem
128
- * Wrapper-Auth-Block. Reicht NUR die feature-side-Felder
129
- * (hmacSecret, tokenTtlMinutes, mode) durch die mail-side
130
- * (sendResetEmail/appResetUrl) gehört in die auth-routes-config
131
- * und wird vom Wrapper separat verdrahtet.
126
+ /** Builds the authOptions block for composeFeatures from a wrapper auth
127
+ * block. Passes through ONLY the feature-side fields (hmacSecret,
128
+ * tokenTtlMinutes, mode) — the mail side (sendResetEmail/appResetUrl)
129
+ * belongs in the auth-routes config and is wired separately by the
130
+ * wrapper.
132
131
  *
133
- * Returnt undefined wenn weder passwordReset noch emailVerification
134
- * gesetzt sind (composeFeatures default-deny: KEINE handler in der
135
- * Registry registriert, /api/auth/request-password-reset etc. bleiben
136
- * 401/404). */
132
+ * Returns undefined when neither passwordReset nor emailVerification is
133
+ * set (composeFeatures default-deny: NO handler registered in the
134
+ * registry, /api/auth/request-password-reset etc. stay 401/404). */
135
+ // All five magic-link flows (reset/verify/signup/invite/unlock) accept the
136
+ // same appUrl shape — a plain string, or a `(locale) => string` function for
137
+ // apps with language-in-path routing (see SignupRequestOptions.appUrl).
137
138
  type MailFlowFields = {
138
- readonly appUrl: string;
139
+ readonly appUrl: string | ((locale: string) => string);
139
140
  readonly tokenTtlMinutes?: number;
140
141
  readonly appName?: string;
141
142
  readonly locale?: AuthMailLocale;
142
143
  };
143
144
 
144
- // The magic-link mail fields shared by all four flows. Conditional spreads omit
145
+ // The magic-link mail fields shared by all five flows. Conditional spreads omit
145
146
  // undefined keys (exactOptionalPropertyTypes) and avoid the property-write that
146
147
  // trips noPropertyAccessFromIndexSignature on the type-aliased option shapes.
147
148
  // reset/verify layer hmacSecret (+ mode) on top.