diff --git a/bun.lock b/bun.lock index 0712faaa0..8846361af 100644 --- a/bun.lock +++ b/bun.lock @@ -3,6 +3,9 @@ "workspaces": { "": { "name": "blitzkit", + "dependencies": { + "typescript": "^5.9.3", + }, }, "packages/app": { "name": "@blitzkit/app", @@ -35,8 +38,10 @@ "markdown-escape": "^2.0.0", "pickleparser": "^0.2.1", "prisma": "^6.17.1", + "protobufjs": "^7.5.4", "react": "^19.2.0", "satori": "^0.18.3", + "sharp": "^0.34.4", }, }, "packages/closed": { @@ -108,8 +113,10 @@ "lz4js": "^0.2.0", "progress": "^2.0.3", "puppeteer": "^24.22.3", + "sharp": "^0.34.4", "three": "^0.180.0", "ts-proto": "^2.7.7", + "yaml": "^2.8.1", }, }, "packages/varuna": { @@ -1302,7 +1309,7 @@ "domutils": ["domutils@3.2.2", "", { "dependencies": { "dom-serializer": "^2.0.0", "domelementtype": "^2.3.0", "domhandler": "^5.0.3" } }, "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw=="], - "dotenv": ["dotenv@17.2.2", "", {}, "sha512-Sf2LSQP+bOlhKWWyhFsn0UsfdK/kCWRv1iuA2gXAwt3dyNabr6QSj00I2V10pidqz69soatm9ZwZvpQMTIOd5Q=="], + "dotenv": ["dotenv@17.2.3", "", {}, "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w=="], "dprint-node": ["dprint-node@1.0.8", "", { "dependencies": { "detect-libc": "^1.0.3" } }, "sha512-iVKnUtYfGrYcW1ZAlfR/F59cUVL8QIhWoBJoSjkkdua/dkWIgjZfiLMeTjiB06X0ZLkQ0M2C1VbUj/CxkIf1zg=="], @@ -2288,7 +2295,7 @@ "typesafe-path": ["typesafe-path@0.2.2", "", {}, "sha512-OJabfkAg1WLZSqJAJ0Z6Sdt3utnbzr/jh+NAHoyWHJe8CMSy79Gm085094M9nvTPy22KzTVn5Zq5mbapCI/hPA=="], - "typescript": ["typescript@5.6.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw=="], + "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], "typescript-auto-import-cache": ["typescript-auto-import-cache@0.3.6", "", { "dependencies": { "semver": "^7.3.8" } }, "sha512-RpuHXrknHdVdK7wv/8ug3Fr0WNsNi5l5aB8MYYuXhq2UH5lnEB1htJ1smhtD5VeCsGr2p8mUDtd83LCQDFVgjQ=="], @@ -2540,11 +2547,7 @@ "@babel/preset-env/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "@blitzkit/core/dotenv": ["dotenv@17.2.3", "", {}, "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w=="], - - "@blitzkit/scripts/dotenv": ["dotenv@17.2.3", "", {}, "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w=="], - - "@blitzkit/website/typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + "@blitzkit/app/typescript": ["typescript@5.6.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw=="], "@blitzkit/website/vite": ["vite@7.1.9", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", "tinyglobby": "^0.2.15" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-4nVGliEpxmhCL8DslSAUdxlB6+SMrhB0a1v5ijlh1xB1nEPuy1mxaHxysVucLHuWryAxLWg6a5ei+U4TLn/rFg=="], diff --git a/package.json b/package.json index 105f95573..392feedf3 100644 --- a/package.json +++ b/package.json @@ -40,5 +40,8 @@ "type": "module", "workspaces": [ "packages/*" - ] + ], + "dependencies": { + "typescript": "^5.9.3" + } } diff --git a/packages/bot/package.json b/packages/bot/package.json index d2cb33908..d9b167f04 100644 --- a/packages/bot/package.json +++ b/packages/bot/package.json @@ -19,8 +19,10 @@ "markdown-escape": "^2.0.0", "pickleparser": "^0.2.1", "prisma": "^6.17.1", + "protobufjs": "^7.5.4", "react": "^19.2.0", - "satori": "^0.18.3" + "satori": "^0.18.3", + "sharp": "^0.34.4" }, "private": true, "scripts": { diff --git a/packages/bot/src/core/blitzkit/iconPng.ts b/packages/bot/src/core/blitzkit/iconPng.ts index 92a2538e1..c575b07b7 100644 --- a/packages/bot/src/core/blitzkit/iconPng.ts +++ b/packages/bot/src/core/blitzkit/iconPng.ts @@ -1,9 +1,9 @@ -import sharp from 'sharp'; +import sharp from "sharp"; const cache: Record = {}; export async function iconPng(url: string) { - if (!url.endsWith('.webp')) return url; + if (!url.endsWith(".webp")) return url; if (!cache[url]) { const imageResponse = await fetch(url); @@ -12,5 +12,5 @@ export async function iconPng(url: string) { cache[url] = imageBufferPNG; } - return `data:image/png;base64,${cache[url].toString('base64')}`; + return `data:image/png;base64,${cache[url].toString("base64")}`; } diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 6da2dd015..d6af45ab8 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -26,8 +26,10 @@ "lz4js": "^0.2.0", "progress": "^2.0.3", "puppeteer": "^24.22.3", + "sharp": "^0.34.4", "three": "^0.180.0", - "ts-proto": "^2.7.7" + "ts-proto": "^2.7.7", + "yaml": "^2.8.1" }, "private": true, "scripts": { diff --git a/packages/scripts/src/core/blitz/readTexture/index.ts b/packages/scripts/src/core/blitz/readTexture/index.ts index 708abee4f..9893fcd2b 100644 --- a/packages/scripts/src/core/blitz/readTexture/index.ts +++ b/packages/scripts/src/core/blitz/readTexture/index.ts @@ -1,9 +1,7 @@ import { DdsReadStream, PvrReadStream } from "@blitzkit/core"; import { existsSync } from "fs"; -import sharp from "sharp"; import { DATA_COMPRESSED } from "../../../buildAssets/constants"; import { readDVPLFile } from "../readDVPLFile"; -import { TextureMutation } from "./constants"; export async function readTexture(path: string) { const ddsTexturePath = path.replace(".tex", ".dx11.dds"); diff --git a/packages/website/src/components/Tankopedia/GuideSection/index.tsx b/packages/website/src/components/Tankopedia/GuideSection/index.tsx index 115767ce9..ab6e61896 100644 --- a/packages/website/src/components/Tankopedia/GuideSection/index.tsx +++ b/packages/website/src/components/Tankopedia/GuideSection/index.tsx @@ -1,7 +1,7 @@ import { CaretRightIcon } from "@radix-ui/react-icons"; import { Box, Flex, Link, Text } from "@radix-ui/themes"; import { Var } from "../../../core/radix/var"; -import type { TankGuide } from "../../../pages/[...locale]/tanks/[slug]/index.astro"; +import type { TankGuide } from "../../../types/tankGuide"; interface Props { guide: TankGuide; @@ -48,7 +48,9 @@ export function GuideSection({ guide }: Props) { height="100%" left="0" style={{ - background: `linear-gradient(${Var("gray-a1")}, ${Var("gray-1")})`, + background: `linear-gradient(${Var("gray-a1")}, ${Var( + "gray-1" + )})`, }} /> diff --git a/packages/website/src/pages/[...locale]/tanks/[slug]/_index.tsx b/packages/website/src/pages/[...locale]/tanks/[slug]/_index.tsx index b8db6c973..2ff88ed91 100644 --- a/packages/website/src/pages/[...locale]/tanks/[slug]/_index.tsx +++ b/packages/website/src/pages/[...locale]/tanks/[slug]/_index.tsx @@ -17,7 +17,7 @@ import { import { Duel } from "../../../../stores/duel"; import { Tankopedia } from "../../../../stores/tankopedia"; import type { MaybeSkeletonComponentProps } from "../../../../types/maybeSkeletonComponentProps"; -import type { TankGuide } from "./index.astro"; +import type { TankGuide } from "../../../../types/tankGuide"; type PageProps = MaybeSkeletonComponentProps & LocaleAcceptorProps & { diff --git a/packages/website/src/pages/[...locale]/tanks/[slug]/index.astro b/packages/website/src/pages/[...locale]/tanks/[slug]/index.astro index ec6908160..240b9c8be 100644 --- a/packages/website/src/pages/[...locale]/tanks/[slug]/index.astro +++ b/packages/website/src/pages/[...locale]/tanks/[slug]/index.astro @@ -20,6 +20,7 @@ import { tankCharacteristics } from "../../../../core/blitzkit/tankCharacteristi import { getStrings } from "../../../../core/i18n/getStrings"; import BaseLayout from "../../../../layouts/BaseLayout.astro"; import { genericDefaultEquipmentMatrix } from "../../../../stores/duel/constants"; +import type { TankGuide } from "../../../../types/tankGuide"; import { getStaticPaths as parentGetStaticPaths } from "../index.astro"; import { Page } from "./_index"; @@ -100,12 +101,6 @@ const description = literals( } ); -export interface TankGuide { - url: string; - description?: string; - image?: string; -} - const guideUrl = `${assertSecret(import.meta.env.PUBLIC_GUIDE_WEBSITE)}/${tank.slug}`; let guide: TankGuide | undefined = undefined; const guideResponse = await fetch(guideUrl); diff --git a/packages/website/src/stores/tierList.ts b/packages/website/src/stores/tierList.ts index d0eaed7dd..c82d009c4 100644 --- a/packages/website/src/stores/tierList.ts +++ b/packages/website/src/stores/tierList.ts @@ -1,6 +1,6 @@ -import { enableMapSet } from 'immer'; -import { Varuna } from 'varuna'; -import { tierListRows } from '../components/TierList/Table/constants'; +import { enableMapSet } from "immer"; +import { Varuna } from "varuna"; +import { tierListRows } from "../components/TierList/Table/constants"; export interface TierList { dragging: boolean; diff --git a/packages/website/src/types/tankGuide.ts b/packages/website/src/types/tankGuide.ts new file mode 100644 index 000000000..a8b8f18db --- /dev/null +++ b/packages/website/src/types/tankGuide.ts @@ -0,0 +1,5 @@ +export interface TankGuide { + url: string; + description?: string; + image?: string; +} diff --git a/packages/website/tsconfig.json b/packages/website/tsconfig.json index 3e5cbbcee..a03ae083f 100644 --- a/packages/website/tsconfig.json +++ b/packages/website/tsconfig.json @@ -1,4 +1,3 @@ { - "extends": ["../../tsconfig.json", "astro/tsconfigs/base"], - "compilerOptions": { "jsx": "react-jsx" } + "extends": ["../../tsconfig.json", "astro/tsconfigs/base"] } diff --git a/tsconfig.json b/tsconfig.json index a0ea97ce1..faa4c5f5d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "target": "ESNext", "module": "ESNext", - "moduleResolution": "Node", + "moduleResolution": "bundler", "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "strict": true, @@ -11,6 +11,7 @@ "resolveJsonModule": true, "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, + "jsx": "react-jsx", "incremental": true, "isolatedModules": true, "paths": {