@cosmicdrift/kumiko-dev-server 0.200.0 → 0.201.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 +4 -4
- package/src/run-dev-app.ts +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-dev-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.201.0",
|
|
4
4
|
"description": "Dev-tooling for Kumiko apps: local dev-server bootstrap (runDevApp), scaffolding, codegen. Not shipped into production node_modules — see @cosmicdrift/kumiko-server-runtime for the prod boot path.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"kumiko-schema-check": "./bin/kumiko-schema-check.ts"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@cosmicdrift/kumiko-bundled-features": "0.
|
|
58
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
59
|
-
"@cosmicdrift/kumiko-server-runtime": "0.
|
|
57
|
+
"@cosmicdrift/kumiko-bundled-features": "0.201.0",
|
|
58
|
+
"@cosmicdrift/kumiko-framework": "0.201.0",
|
|
59
|
+
"@cosmicdrift/kumiko-server-runtime": "0.201.0",
|
|
60
60
|
"ts-morph": "^28.0.0"
|
|
61
61
|
},
|
|
62
62
|
"publishConfig": {
|
package/src/run-dev-app.ts
CHANGED
|
@@ -28,14 +28,17 @@ import {
|
|
|
28
28
|
AUTH_MFA_FEATURE,
|
|
29
29
|
AuthMfaHandlers,
|
|
30
30
|
bindMfaRevokeAllOtherSessionsFromFeature,
|
|
31
|
+
bindRevokeAllPatTokensFromFeature,
|
|
31
32
|
} from "@cosmicdrift/kumiko-bundled-features/auth-mfa";
|
|
32
33
|
import {
|
|
33
34
|
buildEnvConfigOverrides,
|
|
34
35
|
createConfigResolver,
|
|
35
36
|
} from "@cosmicdrift/kumiko-bundled-features/config";
|
|
36
37
|
import {
|
|
38
|
+
bindPatAutoRevokeOnPasswordChangeFromFeature,
|
|
37
39
|
PAT_FEATURE,
|
|
38
40
|
patRateLimitFromFeature,
|
|
41
|
+
revokeAllPatTokensForUser,
|
|
39
42
|
} from "@cosmicdrift/kumiko-bundled-features/personal-access-tokens";
|
|
40
43
|
import {
|
|
41
44
|
bindAutoRevokeFromFeature,
|
|
@@ -573,11 +576,21 @@ export async function runDevApp(options: RunDevAppOptions): Promise<KumikoServer
|
|
|
573
576
|
if (mfaFeature) {
|
|
574
577
|
bindMfaRevokeAllOtherSessionsFromFeature(mfaFeature)?.(store.revokeAllOthers);
|
|
575
578
|
}
|
|
579
|
+
if (mfaFeature && patFeature) {
|
|
580
|
+
bindRevokeAllPatTokensFromFeature(mfaFeature)?.((userId) =>
|
|
581
|
+
revokeAllPatTokensForUser(stack.db, userId),
|
|
582
|
+
);
|
|
583
|
+
}
|
|
576
584
|
sessionStore = store;
|
|
577
585
|
}
|
|
578
586
|
if (patFeature) {
|
|
579
587
|
tokenVerifier = (rawToken) =>
|
|
580
588
|
resolveTokenVerifier({ db: stack.db, registry: stack.registry }, rawToken);
|
|
589
|
+
// Password-change → PAT-revoke: independent of sessions/MFA being
|
|
590
|
+
// mounted, so wired unconditionally here whenever PAT itself is.
|
|
591
|
+
bindPatAutoRevokeOnPasswordChangeFromFeature(patFeature)?.((userId) =>
|
|
592
|
+
revokeAllPatTokensForUser(stack.db, userId),
|
|
593
|
+
);
|
|
581
594
|
}
|
|
582
595
|
if (effectiveAuth) {
|
|
583
596
|
await seedAdmin(stack.db, effectiveAuth.admin);
|