feat : update
CI / Verify (push) Successful in 1m28s
CI / Build immutable images and deploy (push) Successful in 2m5s

This commit is contained in:
2026-09-05 18:15:06 +07:00 Unverified
parent e66b5a3a0d
commit 5aa0ae80c1
42 changed files with 4613 additions and 67 deletions
+8 -2
View File
@@ -2,7 +2,7 @@ import * as z from "zod";
import { targetStatOptions } from "@/lib/guides/stats";
import { parseYouTubeUrl } from "@/lib/guides/youtube";
import { extraSheetSchema } from "@/lib/guides/extra-sheet";
import { extraSheetSchema, normalizeExtraSheetRichText } from "@/lib/guides/extra-sheet";
import { normalizeExtraRichText } from "@/lib/rich-text";
export const guideSectionKinds = ["weapon", "artifact", "constellations", "team"] as const;
@@ -10,6 +10,11 @@ export type GuideSectionKind = (typeof guideSectionKinds)[number];
const percent = z.coerce.number().finite().min(-9999).max(9999);
const catalogKey = z.string().trim().min(1).max(64);
export const weaponRefinementSchema = z.union([
z.number().int().min(1).max(5).transform(String),
z.enum(["1", "2", "3", "4", "5", "1-5"]),
]);
export type WeaponRefinement = z.output<typeof weaponRefinementSchema>;
export const createGuideSchema = z.strictObject({
characterKey: catalogKey,
@@ -40,7 +45,7 @@ export const weaponSectionSchema = z.strictObject({
note: z.string().trim().max(2_000).nullable(),
rows: z.array(z.strictObject({
weaponKey: catalogKey,
refinement: z.number().int().min(1).max(5),
refinement: weaponRefinementSchema,
overallPercent: percent.nullable(),
personalPercent: percent.nullable(),
note: z.string().trim().max(2_000).nullable(),
@@ -159,6 +164,7 @@ const extraRowSchema = z.strictObject({
}).transform((row) => ({
...row,
body: normalizeExtraRichText(row.body, row.highlights),
sheet: row.sheet ? normalizeExtraSheetRichText(row.sheet) : null,
highlights: [],
}));