mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-05-13 13:17:45 +00:00
fix: build errors
This commit is contained in:
parent
59bc1d3ace
commit
d208565a61
20 changed files with 37 additions and 48 deletions
|
|
@ -1,8 +1,8 @@
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { type Mii, ReportReason } from "@tomodachi-share/backend";
|
|
||||||
|
|
||||||
import ReasonSelector from "./reason-selector";
|
import ReasonSelector from "./reason-selector";
|
||||||
import SubmitButton from "../submit-button";
|
import SubmitButton from "../submit-button";
|
||||||
|
import { Mii, ReportReason } from "@prisma/client";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
mii: Mii;
|
mii: Mii;
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@
|
||||||
"@nanostores/react": "^1.1.0",
|
"@nanostores/react": "^1.1.0",
|
||||||
"@swup/astro": "^1.8.0",
|
"@swup/astro": "^1.8.0",
|
||||||
"@tailwindcss/vite": "^4.2.2",
|
"@tailwindcss/vite": "^4.2.2",
|
||||||
"@tomodachi-share/backend": "workspace:*",
|
|
||||||
"@tomodachi-share/shared": "workspace:*",
|
"@tomodachi-share/shared": "workspace:*",
|
||||||
"@types/react": "^19.2.14",
|
"@types/react": "^19.2.14",
|
||||||
"@types/react-dom": "^19.2.3",
|
"@types/react-dom": "^19.2.3",
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
import DeleteMiiButton from "./delete-mii-button";
|
import DeleteMiiButton from "./delete-mii-button";
|
||||||
import type { Mii } from "@tomodachi-share/backend";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
mii: Mii | any;
|
mii: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function AuthorButtons({ mii }: Props) {
|
export default function AuthorButtons({ mii }: Props) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import { type ChangeEvent } from "react";
|
import { type ChangeEvent } from "react";
|
||||||
import { MiiGender } from "@tomodachi-share/backend";
|
import { type MiiGender, type SwitchMiiInstructions } from "@tomodachi-share/shared";
|
||||||
import { type SwitchMiiInstructions } from "@tomodachi-share/shared";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
data: SwitchMiiInstructions["datingPreferences"];
|
data: SwitchMiiInstructions["datingPreferences"];
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,12 @@
|
||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
|
|
||||||
import type { MiiGender, MiiMakeup, MiiPlatform } from "@tomodachi-share/backend";
|
|
||||||
|
|
||||||
import PlatformSelect from "./platform-select";
|
import PlatformSelect from "./platform-select";
|
||||||
import TagFilter from "./tag-filter";
|
import TagFilter from "./tag-filter";
|
||||||
import GenderSelect from "./gender-select";
|
import GenderSelect from "./gender-select";
|
||||||
import OtherFilters from "./other-filters";
|
import OtherFilters from "./other-filters";
|
||||||
import MakeupSelect from "./makeup-select";
|
import MakeupSelect from "./makeup-select";
|
||||||
|
import type { MiiGender, MiiMakeup, MiiPlatform } from "@tomodachi-share/shared";
|
||||||
|
|
||||||
export default function FilterMenu() {
|
export default function FilterMenu() {
|
||||||
const searchParams = new URLSearchParams(window.location.search);
|
const searchParams = new URLSearchParams(window.location.search);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { useState, useTransition } from "react";
|
import { useState, useTransition } from "react";
|
||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
import type { MiiGender, MiiPlatform } from "@tomodachi-share/backend";
|
import type { MiiGender, MiiPlatform } from "@tomodachi-share/shared";
|
||||||
|
|
||||||
export default function GenderSelect() {
|
export default function GenderSelect() {
|
||||||
const searchParams = new URLSearchParams(window.location.search);
|
const searchParams = new URLSearchParams(window.location.search);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { useState, useTransition } from "react";
|
import { useState, useTransition } from "react";
|
||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
import { type MiiMakeup } from "@tomodachi-share/backend";
|
import type { MiiMakeup } from "@tomodachi-share/shared";
|
||||||
|
|
||||||
export default function MakeupSelect() {
|
export default function MakeupSelect() {
|
||||||
const searchParams = new URLSearchParams(window.location.search);
|
const searchParams = new URLSearchParams(window.location.search);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { type MiiPlatform } from "@tomodachi-share/backend";
|
import type { MiiPlatform } from "@tomodachi-share/shared";
|
||||||
import { type ChangeEvent, useState, useTransition } from "react";
|
import { type ChangeEvent, useState, useTransition } from "react";
|
||||||
|
|
||||||
export default function OtherFilters() {
|
export default function OtherFilters() {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { useState, useTransition } from "react";
|
import { useState, useTransition } from "react";
|
||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
import type { MiiPlatform } from "@tomodachi-share/backend";
|
import type { MiiPlatform } from "@tomodachi-share/shared";
|
||||||
|
|
||||||
export default function PlatformSelect() {
|
export default function PlatformSelect() {
|
||||||
const searchParams = new URLSearchParams(window.location.search);
|
const searchParams = new URLSearchParams(window.location.search);
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,12 @@ import FilterMenu from "../mii/list/filter-menu";
|
||||||
import SortSelect from "../mii/list/sort-select";
|
import SortSelect from "../mii/list/sort-select";
|
||||||
import MiiGrid from "../mii/list/mii-grid";
|
import MiiGrid from "../mii/list/mii-grid";
|
||||||
import Pagination from "../pagination";
|
import Pagination from "../pagination";
|
||||||
import { type Mii } from "@tomodachi-share/backend";
|
|
||||||
import Skeleton from "../mii/list/skeleton";
|
import Skeleton from "../mii/list/skeleton";
|
||||||
|
|
||||||
interface ApiResponse {
|
interface ApiResponse {
|
||||||
totalCount: number;
|
totalCount: number;
|
||||||
filteredCount: number;
|
filteredCount: number;
|
||||||
miis: Mii[];
|
miis: any[];
|
||||||
lastPage: number;
|
lastPage: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -40,8 +39,10 @@ export default function IndexPage() {
|
||||||
{searchParams.get("tags") ? `Miis tagged with '${searchParams.get("tags")}' - TomodachiShare` : "TomodachiShare - index mii list"}
|
{searchParams.get("tags") ? `Miis tagged with '${searchParams.get("tags")}' - TomodachiShare` : "TomodachiShare - index mii list"}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
<p className="text-center mb-4">We're currently going through some major code changes therefore some features won't work.</p>
|
||||||
|
|
||||||
<Suspense fallback={<Skeleton />}>
|
<Suspense fallback={<Skeleton />}>
|
||||||
{!loading && (
|
{!loading && data ? (
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
<div className="bg-amber-50 border-2 border-amber-500 rounded-2xl shadow-lg p-4 flex justify-between items-center gap-2 mb-2 max-md:flex-col">
|
<div className="bg-amber-50 border-2 border-amber-500 rounded-2xl shadow-lg p-4 flex justify-between items-center gap-2 mb-2 max-md:flex-col">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
|
|
@ -69,6 +70,8 @@ export default function IndexPage() {
|
||||||
<MiiGrid miis={data.miis} />
|
<MiiGrid miis={data.miis} />
|
||||||
<Pagination lastPage={data.lastPage} />
|
<Pagination lastPage={data.lastPage} />
|
||||||
</div>
|
</div>
|
||||||
|
) : (
|
||||||
|
<p>No Miis found :( Has the server died?</p>
|
||||||
)}
|
)}
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import ShareMiiButton from "../mii/share-mii-button";
|
||||||
import ThreeDsScanTutorialButton from "../tutorial/3ds-scan";
|
import ThreeDsScanTutorialButton from "../tutorial/3ds-scan";
|
||||||
import SwitchAddMiiTutorialButton from "../tutorial/switch-add-mii";
|
import SwitchAddMiiTutorialButton from "../tutorial/switch-add-mii";
|
||||||
import MiiInstructions from "../mii/instructions";
|
import MiiInstructions from "../mii/instructions";
|
||||||
import type { Mii } from "@tomodachi-share/backend";
|
|
||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
|
|
@ -17,7 +16,7 @@ interface Props {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function MiiPage({ id }: Props) {
|
export default function MiiPage({ id }: Props) {
|
||||||
const [mii, setMii] = useState<Mii | any>(null);
|
const [mii, setMii] = useState<any>(null);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -291,7 +290,7 @@ export default function MiiPage({ id }: Props) {
|
||||||
|
|
||||||
{/* Buttons */}
|
{/* Buttons */}
|
||||||
<div className="flex gap-3 w-fit bg-amber-50 border-2 border-amber-500 rounded-2xl shadow-lg p-4 text-3xl text-orange-400 max-md:place-self-center *:size-12 *:flex *:flex-col *:items-center *:gap-1 **:transition-discrete **:duration-150 *:hover:brightness-75 *:hover:scale-[1.08] *:[&_span]:text-xs">
|
<div className="flex gap-3 w-fit bg-amber-50 border-2 border-amber-500 rounded-2xl shadow-lg p-4 text-3xl text-orange-400 max-md:place-self-center *:size-12 *:flex *:flex-col *:items-center *:gap-1 **:transition-discrete **:duration-150 *:hover:brightness-75 *:hover:scale-[1.08] *:[&_span]:text-xs">
|
||||||
<AuthorButtons mii={mii} />
|
{/* <AuthorButtons mii={mii} /> */}
|
||||||
|
|
||||||
<ShareMiiButton miiId={mii.id} />
|
<ShareMiiButton miiId={mii.id} />
|
||||||
<a aria-label="Report Mii" href={`${import.meta.env.PUBLIC_API_URL}/report/mii/${mii.id}`}>
|
<a aria-label="Report Mii" href={`${import.meta.env.PUBLIC_API_URL}/report/mii/${mii.id}`}>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import type { User } from "@tomodachi-share/backend";
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import ProfileInformation from "../profile-information";
|
import ProfileInformation from "../profile-information";
|
||||||
|
|
||||||
|
|
@ -7,7 +6,7 @@ interface Props {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ProfilePage({ id }: Props) {
|
export default function ProfilePage({ id }: Props) {
|
||||||
const [user, setUser] = useState<User | any>(null);
|
const [user, setUser] = useState<any>(null);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,18 @@
|
||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
|
|
||||||
import Description from "./description";
|
import Description from "./description";
|
||||||
import { type User } from "@tomodachi-share/backend";
|
|
||||||
import { useStore } from "@nanostores/react";
|
import { useStore } from "@nanostores/react";
|
||||||
import { session } from "../session";
|
import { session } from "../session";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
user?: User | any;
|
user?: any;
|
||||||
page?: "settings" | "likes";
|
page?: "settings" | "likes";
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ProfileInformation({ user, page }: Props) {
|
export default function ProfileInformation({ user, page }: Props) {
|
||||||
const $session = useStore(session);
|
const $session = useStore(session);
|
||||||
|
|
||||||
const isAdmin = (!user ? $session.user.id : user.id) === Number(import.meta.env.PUBLIC_ADMIN_USER_ID);
|
const isAdmin = (!user ? $session?.user.id : user.id) === Number(import.meta.env.PUBLIC_ADMIN_USER_ID);
|
||||||
const isContributor = import.meta.env.PUBLIC_CONTRIBUTORS_USER_IDS?.split(",").includes(user.id);
|
const isContributor = import.meta.env.PUBLIC_CONTRIBUTORS_USER_IDS?.split(",").includes(user.id);
|
||||||
const isOwnProfile = !user || $session?.user?.id === user.id;
|
const isOwnProfile = !user || $session?.user?.id === user.id;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import { type FileWithPath } from "react-dropzone";
|
||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
|
|
||||||
import qrcode from "qrcode-generator";
|
import qrcode from "qrcode-generator";
|
||||||
import { MiiGender, MiiMakeup, MiiPlatform } from "@tomodachi-share/backend";
|
|
||||||
|
|
||||||
import { nameSchema, tagsSchema } from "@tomodachi-share/shared/schemas";
|
import { nameSchema, tagsSchema } from "@tomodachi-share/shared/schemas";
|
||||||
import { defaultInstructions, type SwitchMiiInstructions, ThreeDsTomodachiLifeMii, convertQrCode } from "@tomodachi-share/shared";
|
import { defaultInstructions, type SwitchMiiInstructions, ThreeDsTomodachiLifeMii, convertQrCode } from "@tomodachi-share/shared";
|
||||||
|
|
@ -21,6 +20,7 @@ import LikeButton from "../like-button";
|
||||||
import Carousel from "../carousel";
|
import Carousel from "../carousel";
|
||||||
import SubmitButton from "../submit-button";
|
import SubmitButton from "../submit-button";
|
||||||
import Dropzone from "../dropzone";
|
import Dropzone from "../dropzone";
|
||||||
|
import type { MiiPlatform, MiiGender, MiiMakeup } from "@tomodachi-share/shared";
|
||||||
|
|
||||||
export default function SubmitForm() {
|
export default function SubmitForm() {
|
||||||
const [files, setFiles] = useState<FileWithPath[]>([]);
|
const [files, setFiles] = useState<FileWithPath[]>([]);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { MiiGender } from "@tomodachi-share/backend";
|
import type { MiiGender, SwitchMiiInstructions } from "@tomodachi-share/shared";
|
||||||
import type { SwitchMiiInstructions } from "@tomodachi-share/shared";
|
|
||||||
import EnhancedSlider from "../enhanced-slider";
|
import EnhancedSlider from "../enhanced-slider";
|
||||||
import DatingPreferencesViewer from "../../../mii/dating-preferences";
|
import DatingPreferencesViewer from "../../../mii/dating-preferences";
|
||||||
import VoiceViewer from "../../../mii/voice-viewer";
|
import VoiceViewer from "../../../mii/voice-viewer";
|
||||||
|
|
|
||||||
|
|
@ -170,9 +170,6 @@ importers:
|
||||||
'@tailwindcss/vite':
|
'@tailwindcss/vite':
|
||||||
specifier: ^4.2.2
|
specifier: ^4.2.2
|
||||||
version: 4.2.2(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.1))
|
version: 4.2.2(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.1))
|
||||||
'@tomodachi-share/backend':
|
|
||||||
specifier: workspace:*
|
|
||||||
version: link:../backend
|
|
||||||
'@tomodachi-share/shared':
|
'@tomodachi-share/shared':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../shared
|
version: link:../shared
|
||||||
|
|
@ -246,9 +243,6 @@ importers:
|
||||||
'@2toad/profanity':
|
'@2toad/profanity':
|
||||||
specifier: ^3.3.0
|
specifier: ^3.3.0
|
||||||
version: 3.3.0
|
version: 3.3.0
|
||||||
'@tomodachi-share/backend':
|
|
||||||
specifier: workspace:*
|
|
||||||
version: link:../backend
|
|
||||||
bit-buffer:
|
bit-buffer:
|
||||||
specifier: ^0.3.0
|
specifier: ^0.3.0
|
||||||
version: 0.3.0
|
version: 0.3.0
|
||||||
|
|
@ -8548,8 +8542,8 @@ snapshots:
|
||||||
'@next/eslint-plugin-next': 16.2.3
|
'@next/eslint-plugin-next': 16.2.3
|
||||||
eslint: 10.2.0(jiti@2.6.1)
|
eslint: 10.2.0(jiti@2.6.1)
|
||||||
eslint-import-resolver-node: 0.3.10
|
eslint-import-resolver-node: 0.3.10
|
||||||
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.2.0(jiti@2.6.1)))(eslint@10.2.0(jiti@2.6.1))
|
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@10.2.0(jiti@2.6.1))
|
||||||
eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.2.0(jiti@2.6.1)))(eslint@10.2.0(jiti@2.6.1)))(eslint@10.2.0(jiti@2.6.1))
|
eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint-import-resolver-typescript@3.10.1)(eslint@10.2.0(jiti@2.6.1))
|
||||||
eslint-plugin-jsx-a11y: 6.10.2(eslint@10.2.0(jiti@2.6.1))
|
eslint-plugin-jsx-a11y: 6.10.2(eslint@10.2.0(jiti@2.6.1))
|
||||||
eslint-plugin-react: 7.37.5(eslint@10.2.0(jiti@2.6.1))
|
eslint-plugin-react: 7.37.5(eslint@10.2.0(jiti@2.6.1))
|
||||||
eslint-plugin-react-hooks: 7.0.1(eslint@10.2.0(jiti@2.6.1))
|
eslint-plugin-react-hooks: 7.0.1(eslint@10.2.0(jiti@2.6.1))
|
||||||
|
|
@ -8571,7 +8565,7 @@ snapshots:
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.2.0(jiti@2.6.1)))(eslint@10.2.0(jiti@2.6.1)):
|
eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@10.2.0(jiti@2.6.1)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nolyfill/is-core-module': 1.0.39
|
'@nolyfill/is-core-module': 1.0.39
|
||||||
debug: 4.4.3
|
debug: 4.4.3
|
||||||
|
|
@ -8582,22 +8576,22 @@ snapshots:
|
||||||
tinyglobby: 0.2.16
|
tinyglobby: 0.2.16
|
||||||
unrs-resolver: 1.11.1
|
unrs-resolver: 1.11.1
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.2.0(jiti@2.6.1)))(eslint@10.2.0(jiti@2.6.1)))(eslint@10.2.0(jiti@2.6.1))
|
eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint-import-resolver-typescript@3.10.1)(eslint@10.2.0(jiti@2.6.1))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
eslint-module-utils@2.12.1(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.2.0(jiti@2.6.1)))(eslint@10.2.0(jiti@2.6.1)))(eslint@10.2.0(jiti@2.6.1)):
|
eslint-module-utils@2.12.1(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@3.10.1)(eslint@10.2.0(jiti@2.6.1)):
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 3.2.7
|
debug: 3.2.7
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@typescript-eslint/parser': 8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2)
|
'@typescript-eslint/parser': 8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2)
|
||||||
eslint: 10.2.0(jiti@2.6.1)
|
eslint: 10.2.0(jiti@2.6.1)
|
||||||
eslint-import-resolver-node: 0.3.10
|
eslint-import-resolver-node: 0.3.10
|
||||||
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.2.0(jiti@2.6.1)))(eslint@10.2.0(jiti@2.6.1))
|
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@10.2.0(jiti@2.6.1))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.2.0(jiti@2.6.1)))(eslint@10.2.0(jiti@2.6.1)))(eslint@10.2.0(jiti@2.6.1)):
|
eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint-import-resolver-typescript@3.10.1)(eslint@10.2.0(jiti@2.6.1)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rtsao/scc': 1.1.0
|
'@rtsao/scc': 1.1.0
|
||||||
array-includes: 3.1.9
|
array-includes: 3.1.9
|
||||||
|
|
@ -8608,7 +8602,7 @@ snapshots:
|
||||||
doctrine: 2.1.0
|
doctrine: 2.1.0
|
||||||
eslint: 10.2.0(jiti@2.6.1)
|
eslint: 10.2.0(jiti@2.6.1)
|
||||||
eslint-import-resolver-node: 0.3.10
|
eslint-import-resolver-node: 0.3.10
|
||||||
eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.2.0(jiti@2.6.1)))(eslint@10.2.0(jiti@2.6.1)))(eslint@10.2.0(jiti@2.6.1))
|
eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@3.10.1)(eslint@10.2.0(jiti@2.6.1))
|
||||||
hasown: 2.0.2
|
hasown: 2.0.2
|
||||||
is-core-module: 2.16.1
|
is-core-module: 2.16.1
|
||||||
is-glob: 4.0.3
|
is-glob: 4.0.3
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@2toad/profanity": "^3.3.0",
|
"@2toad/profanity": "^3.3.0",
|
||||||
"@tomodachi-share/backend": "workspace:*",
|
|
||||||
"bit-buffer": "^0.3.0",
|
"bit-buffer": "^0.3.0",
|
||||||
"sjcl-with-all": "1.0.8",
|
"sjcl-with-all": "1.0.8",
|
||||||
"zod": "^4.3.6"
|
"zod": "^4.3.6"
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,4 @@ export * from "./constants";
|
||||||
export * from "./qr-codes";
|
export * from "./qr-codes";
|
||||||
export * from "./switch";
|
export * from "./switch";
|
||||||
export * from "./three-ds-tomodachi-life-mii";
|
export * from "./three-ds-tomodachi-life-mii";
|
||||||
export type { SwitchMiiInstructions } from "./types";
|
export type { SwitchMiiInstructions, MiiGender, MiiMakeup, MiiPlatform } from "./types";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import { MiiGender, MiiMakeup, MiiPlatform } from "@tomodachi-share/backend";
|
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
// profanity censoring bypasses the regex in some of these but I think it's funny
|
// 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())
|
.map((tag) => tag.trim())
|
||||||
.filter((tag) => tag.length > 0),
|
.filter((tag) => tag.length > 0),
|
||||||
),
|
),
|
||||||
platform: z.enum(MiiPlatform, { error: "Platform must be either 'THREE_DS', or 'SWITCH'" }).optional(),
|
platform: z.enum(["THREE_DS", "SWITCH"], { 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(),
|
gender: z.enum(["MALE", "FEMALE", "NONBINARY"], { 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(),
|
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(),
|
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(),
|
quarantined: z.coerce.boolean({ error: "Quarantined must be either true or false" }).optional(),
|
||||||
// todo: incorporate tagsSchema
|
// todo: incorporate tagsSchema
|
||||||
|
|
@ -286,7 +285,7 @@ export const switchMiiInstructionsSchema = z
|
||||||
.optional(),
|
.optional(),
|
||||||
height: z.number().int().min(0).max(128).optional(),
|
height: z.number().int().min(0).max(128).optional(),
|
||||||
weight: 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
|
birthday: z
|
||||||
.object({
|
.object({
|
||||||
day: z.number().int().min(1).max(31).optional(),
|
day: z.number().int().min(1).max(31).optional(),
|
||||||
|
|
|
||||||
4
shared/src/types.d.ts
vendored
4
shared/src/types.d.ts
vendored
|
|
@ -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 {
|
export interface SwitchMiiInstructions {
|
||||||
head: {
|
head: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue