@cosmicdrift/kumiko-bundled-features 0.133.0 → 0.134.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 +6 -6
- package/src/admin-shell/web/overview-layout.tsx +3 -2
- package/src/delivery/web/delivery-log-screen.tsx +1 -1
- package/src/feature-toggles/web/toggle-admin-screen.tsx +1 -1
- package/src/personal-access-tokens/web/pat-tokens-screen.tsx +13 -3
- package/src/feature-toggles/db/queries/toggle-state.ts +0 -25
- package/src/legal-pages/security-headers.ts +0 -1
- package/src/sessions/schema/index.ts +0 -5
- package/src/tenant/schema/index.ts +0 -5
- package/src/user/schema/index.ts +0 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-bundled-features",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.134.0",
|
|
4
4
|
"description": "Built-in features — tenant, user, auth, delivery. The stuff you'd rewrite anyway, already typed.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -107,11 +107,11 @@
|
|
|
107
107
|
"./step-dispatcher": "./src/step-dispatcher/index.ts"
|
|
108
108
|
},
|
|
109
109
|
"dependencies": {
|
|
110
|
-
"@cosmicdrift/kumiko-dispatcher-live": "0.
|
|
111
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
112
|
-
"@cosmicdrift/kumiko-headless": "0.
|
|
113
|
-
"@cosmicdrift/kumiko-renderer": "0.
|
|
114
|
-
"@cosmicdrift/kumiko-renderer-web": "0.
|
|
110
|
+
"@cosmicdrift/kumiko-dispatcher-live": "0.134.0",
|
|
111
|
+
"@cosmicdrift/kumiko-framework": "0.134.0",
|
|
112
|
+
"@cosmicdrift/kumiko-headless": "0.134.0",
|
|
113
|
+
"@cosmicdrift/kumiko-renderer": "0.134.0",
|
|
114
|
+
"@cosmicdrift/kumiko-renderer-web": "0.134.0",
|
|
115
115
|
"@mollie/api-client": "^4.5.0",
|
|
116
116
|
"@node-rs/argon2": "^2.0.2",
|
|
117
117
|
"@types/nodemailer": "^8.0.0",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// @runtime client
|
|
2
2
|
import { usePrimitives } from "@cosmicdrift/kumiko-renderer";
|
|
3
|
+
import { FormScreenShell } from "@cosmicdrift/kumiko-renderer-web";
|
|
3
4
|
import type { ReactNode } from "react";
|
|
4
5
|
|
|
5
6
|
export type OverviewCard = {
|
|
@@ -32,7 +33,7 @@ export function OverviewLayout({
|
|
|
32
33
|
const gridClass = columns === 2 ? "sm:grid-cols-2" : "sm:grid-cols-3";
|
|
33
34
|
|
|
34
35
|
return (
|
|
35
|
-
<
|
|
36
|
+
<FormScreenShell testId={testId} maxWidth="4xl" className="flex flex-col gap-6">
|
|
36
37
|
<Heading variant="page">{title}</Heading>
|
|
37
38
|
|
|
38
39
|
{state.kind === "loading" && (
|
|
@@ -63,6 +64,6 @@ export function OverviewLayout({
|
|
|
63
64
|
))}
|
|
64
65
|
</div>
|
|
65
66
|
)}
|
|
66
|
-
</
|
|
67
|
+
</FormScreenShell>
|
|
67
68
|
);
|
|
68
69
|
}
|
|
@@ -59,7 +59,7 @@ export function DeliveryLogScreen(): ReactNode {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
return (
|
|
62
|
-
<FormScreenShell testId="delivery-log-screen" className="flex
|
|
62
|
+
<FormScreenShell testId="delivery-log-screen" maxWidth="4xl" className="flex flex-col gap-6">
|
|
63
63
|
<Heading variant="page">{t("delivery.log.title")}</Heading>
|
|
64
64
|
|
|
65
65
|
<Card options={{ padded: false }}>
|
|
@@ -69,7 +69,7 @@ export function ToggleAdminScreen(): ReactNode {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
return (
|
|
72
|
-
<FormScreenShell testId="toggle-admin-screen" className="flex
|
|
72
|
+
<FormScreenShell testId="toggle-admin-screen" maxWidth="4xl" className="flex flex-col gap-6">
|
|
73
73
|
<Heading variant="page">{t("feature-toggles.admin.title")}</Heading>
|
|
74
74
|
|
|
75
75
|
{actionError !== null && <Banner variant="error">{actionError}</Banner>}
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
useQuery,
|
|
13
13
|
useTranslation,
|
|
14
14
|
} from "@cosmicdrift/kumiko-renderer";
|
|
15
|
+
import { FormScreenShell } from "@cosmicdrift/kumiko-renderer-web";
|
|
15
16
|
import { type ReactNode, useState } from "react";
|
|
16
17
|
import { PatHandlers, PatQueries } from "../constants";
|
|
17
18
|
import { parseGrant } from "../scopes";
|
|
@@ -133,8 +134,8 @@ export function PatTokensScreen({
|
|
|
133
134
|
return parts.join(" · ");
|
|
134
135
|
};
|
|
135
136
|
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
const content = (
|
|
138
|
+
<>
|
|
138
139
|
<Heading>{t("pat.title")}</Heading>
|
|
139
140
|
|
|
140
141
|
{minted && (
|
|
@@ -250,6 +251,15 @@ export function PatTokensScreen({
|
|
|
250
251
|
);
|
|
251
252
|
})}
|
|
252
253
|
</div>
|
|
253
|
-
|
|
254
|
+
</>
|
|
255
|
+
);
|
|
256
|
+
|
|
257
|
+
if (embedded) {
|
|
258
|
+
return <div className="flex flex-col gap-6">{content}</div>;
|
|
259
|
+
}
|
|
260
|
+
return (
|
|
261
|
+
<FormScreenShell testId="pat-tokens-screen" maxWidth="3xl">
|
|
262
|
+
{content}
|
|
263
|
+
</FormScreenShell>
|
|
254
264
|
);
|
|
255
265
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { asRawClient } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
2
|
-
import type { DbRunner } from "@cosmicdrift/kumiko-framework/db";
|
|
3
|
-
import type { Temporal } from "temporal-polyfill";
|
|
4
|
-
|
|
5
|
-
export async function updateFeatureToggleOptimistic(
|
|
6
|
-
db: DbRunner,
|
|
7
|
-
params: {
|
|
8
|
-
readonly enabled: boolean;
|
|
9
|
-
readonly updatedBy: string;
|
|
10
|
-
readonly updatedAt: Temporal.Instant;
|
|
11
|
-
readonly featureName: string;
|
|
12
|
-
readonly expectedVersion: number;
|
|
13
|
-
},
|
|
14
|
-
): Promise<readonly unknown[]> {
|
|
15
|
-
return asRawClient(db).unsafe(
|
|
16
|
-
'UPDATE "read_global_feature_state" SET enabled = $1, version = version + 1, updated_by = $2, updated_at = $3 WHERE feature_name = $4 AND version = $5 RETURNING *',
|
|
17
|
-
[
|
|
18
|
-
params.enabled,
|
|
19
|
-
params.updatedBy,
|
|
20
|
-
params.updatedAt,
|
|
21
|
-
params.featureName,
|
|
22
|
-
params.expectedVersion,
|
|
23
|
-
],
|
|
24
|
-
);
|
|
25
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { securePageHeaders } from "../page-render/security-headers";
|