fix: build errors

This commit is contained in:
trafficlunar 2026-04-16 22:54:35 +01:00
parent 59bc1d3ace
commit d208565a61
20 changed files with 37 additions and 48 deletions

View file

@ -3,7 +3,6 @@
"version": "1.0.0",
"dependencies": {
"@2toad/profanity": "^3.3.0",
"@tomodachi-share/backend": "workspace:*",
"bit-buffer": "^0.3.0",
"sjcl-with-all": "1.0.8",
"zod": "^4.3.6"

View file

@ -2,4 +2,4 @@ export * from "./constants";
export * from "./qr-codes";
export * from "./switch";
export * from "./three-ds-tomodachi-life-mii";
export type { SwitchMiiInstructions } from "./types";
export type { SwitchMiiInstructions, MiiGender, MiiMakeup, MiiPlatform } from "./types";

View file

@ -1,4 +1,3 @@
import { MiiGender, MiiMakeup, MiiPlatform } from "@tomodachi-share/backend";
import { z } from "zod";
// profanity censoring bypasses the regex in some of these but I think it's funny
@ -58,9 +57,9 @@ export const searchSchema = z.object({
.map((tag) => tag.trim())
.filter((tag) => tag.length > 0),
),
platform: z.enum(MiiPlatform, { error: "Platform must be either 'THREE_DS', or 'SWITCH'" }).optional(),
gender: z.enum(MiiGender, { error: "Gender must be either 'MALE', 'FEMALE', or 'NONBINARY' if on Switch platform" }).optional(),
makeup: z.enum(MiiMakeup, { error: "Makeup must be either 'FULL', 'PARTIAL', or 'NONE'" }).optional(),
platform: z.enum(["THREE_DS", "SWITCH"], { error: "Platform must be either 'THREE_DS', or 'SWITCH'" }).optional(),
gender: z.enum(["MALE", "FEMALE", "NONBINARY"], { error: "Gender must be either 'MALE', 'FEMALE', or 'NONBINARY' if on Switch platform" }).optional(),
makeup: z.enum(["FULL", "PARTIAL", "NONE"], { error: "Makeup must be either 'FULL', 'PARTIAL', or 'NONE'" }).optional(),
allowCopying: z.coerce.boolean({ error: "Allow Copying must be either true or false" }).optional(),
quarantined: z.coerce.boolean({ error: "Quarantined must be either true or false" }).optional(),
// todo: incorporate tagsSchema
@ -286,7 +285,7 @@ export const switchMiiInstructionsSchema = z
.optional(),
height: z.number().int().min(0).max(128).optional(),
weight: z.number().int().min(0).max(128).optional(),
datingPreferences: z.array(z.enum(MiiGender)).optional(),
datingPreferences: z.array(z.enum(["MALE", "FEMALE", "NONBINARY"])).optional(),
birthday: z
.object({
day: z.number().int().min(1).max(31).optional(),

View file

@ -1,4 +1,6 @@
import { MiiGender } from "@tomodachi-share/backend";
type MiiGender = "MALE" | "FEMALE" | "NONBINARY";
type MiiPlatform = "THREE_DS" | "SWITCH";
type MiiMakeup = "FULL" | "PARTIAL" | "NONE";
export interface SwitchMiiInstructions {
head: {