@cosmicdrift/kumiko-server-runtime 0.163.0 → 0.163.2
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.163.
|
|
3
|
+
"version": "0.163.2",
|
|
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>",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@cosmicdrift/kumiko-bundled-features": "0.163.
|
|
76
|
-
"@cosmicdrift/kumiko-framework": "0.163.
|
|
75
|
+
"@cosmicdrift/kumiko-bundled-features": "0.163.2",
|
|
76
|
+
"@cosmicdrift/kumiko-framework": "0.163.2",
|
|
77
77
|
"temporal-polyfill": "^0.3.2"
|
|
78
78
|
},
|
|
79
79
|
"publishConfig": {
|
|
@@ -76,6 +76,24 @@ describe("composeFeatures", () => {
|
|
|
76
76
|
expect(handlerNames).toContain("signup-confirm");
|
|
77
77
|
});
|
|
78
78
|
|
|
79
|
+
// Regression: signup-request no-ops silently (always-200 anti-enumeration
|
|
80
|
+
// contract) unless "auth-self-registration" is mounted. composeFeatures
|
|
81
|
+
// must bundle it alongside authOptions.signup, not leave apps using the
|
|
82
|
+
// includeBundled convenience path to mount it by hand.
|
|
83
|
+
test("authOptions.signup → auth-self-registration mounted, default ON", () => {
|
|
84
|
+
const features = composeFeatures([noopFeature], {
|
|
85
|
+
includeBundled: true,
|
|
86
|
+
authOptions: { signup: { appUrl: "https://app/signup/complete" } },
|
|
87
|
+
});
|
|
88
|
+
const toggle = features.find((f) => f.name === "auth-self-registration");
|
|
89
|
+
expect(toggle).toBeDefined();
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
test("no authOptions.signup → auth-self-registration NOT mounted", () => {
|
|
93
|
+
const features = composeFeatures([noopFeature], { includeBundled: true });
|
|
94
|
+
expect(features.map((f) => f.name)).not.toContain("auth-self-registration");
|
|
95
|
+
});
|
|
96
|
+
|
|
79
97
|
test("OHNE authOptions → KEINE reset/verify-handlers (anti-default-deploy-bug)", () => {
|
|
80
98
|
// Genau der Bug der vom Review-Agent gefangen wurde: composeFeatures
|
|
81
99
|
// ohne authOptions registriert die handler nicht. Wenn jemand das
|
package/src/compose-features.ts
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
type AuthEmailPasswordOptions,
|
|
17
17
|
type AuthMailLocale,
|
|
18
18
|
createAuthEmailPasswordFeature,
|
|
19
|
+
createAuthSelfRegistrationToggleFeature,
|
|
19
20
|
type EmailVerificationOptions,
|
|
20
21
|
type InviteOptions,
|
|
21
22
|
type PasswordResetOptions,
|
|
@@ -75,6 +76,14 @@ export function composeFeatures(
|
|
|
75
76
|
createUserFeature(),
|
|
76
77
|
createTenantFeature(),
|
|
77
78
|
createAuthEmailPasswordFeature(authOptions ?? {}),
|
|
79
|
+
// signup-request/signup-confirm are registered whenever authOptions.signup
|
|
80
|
+
// is set (see above), but the handler itself no-ops unless the companion
|
|
81
|
+
// toggle feature is mounted (ctx.hasFeature(AUTH_SELF_REGISTRATION_FEATURE))
|
|
82
|
+
// — without this, apps using the includeBundled convenience path get
|
|
83
|
+
// self-signup silently broken (always-200 anti-enumeration contract masks
|
|
84
|
+
// it as success). Mount it alongside signup, default ON, matching the
|
|
85
|
+
// "on unless an operator flips it off at runtime" contract.
|
|
86
|
+
...(authOptions?.signup !== undefined ? [createAuthSelfRegistrationToggleFeature()] : []),
|
|
78
87
|
];
|
|
79
88
|
const bundledNames = new Set(bundled.map((f) => f.name));
|
|
80
89
|
const filteredApp: FeatureDefinition[] = [];
|