From eef2b0136b81568014cbc8250e711061e0ab59f8 Mon Sep 17 00:00:00 2001 From: Priom Chowdhury Date: Tue, 31 Mar 2026 14:25:30 -0400 Subject: [PATCH] fix: prod deploy --- .claude/settings.json | 7 + .claude/settings.local.json | 1 + .vscode/settings.json | 2 +- package.json | 183 +++++++++--------- ...@tanstack__start-plugin-core@1.132.0.patch | 24 +++ pnpm-lock.yaml | 47 +---- src/router.tsx | 3 - vite.config.ts | 4 +- 8 files changed, 135 insertions(+), 136 deletions(-) create mode 100644 .claude/settings.json create mode 100644 patches/@tanstack__start-plugin-core@1.132.0.patch diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 00000000..0439daff --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,7 @@ +{ + "permissions": { + "allow": [ + "WebFetch(domain:developers.cloudflare.com)" + ] + } +} diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 34eacd48..136586c2 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -1,6 +1,7 @@ { "permissions": { "allow": [ + "Bash(find:*)" ] } } diff --git a/.vscode/settings.json b/.vscode/settings.json index 25987dba..28601ae1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -27,7 +27,7 @@ "editor.defaultFormatter": "biomejs.biome" }, "[json]": { - "editor.defaultFormatter": "biomejs.biome" + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[jsonc]": { "editor.defaultFormatter": "biomejs.biome" diff --git a/package.json b/package.json index 2b5707e8..ba47a426 100644 --- a/package.json +++ b/package.json @@ -1,92 +1,95 @@ { - "name": "hypeterminal", - "private": true, - "type": "module", - "packageManager": "pnpm@9.15.0", - "scripts": { - "dev": "vite dev", - "build": "lingui compile && NODE_OPTIONS=--max-old-space-size=4096 vite build && node scripts/clean-worker-statics.mjs", - "build:analyze": "ANALYZE=true lingui compile && vite build", - "serve": "vite preview", - "format": "biome format", - "lint": "biome lint", - "check": "biome check", - "fix": "biome check --write", - "test": "vitest run", - "i18n:extract": "lingui extract", - "i18n:compile": "lingui compile", - "prepare": "lefthook install", - "perf:bundle": "npx vite-bundle-visualizer", - "perf:compare": "node scripts/compare-bundle.js", - "perf:ws-soak:30m": "WS_SOAK_RUN=true WS_SOAK_DURATION_MS=1800000 WS_SOAK_SAMPLE_MS=1000 WS_SOAK_OP_MS=10 vitest run src/lib/tests/websocket-soak.test.ts", - "perf:ws-soak:60m": "WS_SOAK_RUN=true WS_SOAK_DURATION_MS=3600000 WS_SOAK_SAMPLE_MS=1000 WS_SOAK_OP_MS=10 vitest run src/lib/tests/websocket-soak.test.ts" - }, - "dependencies": { - "@fontsource-variable/ibm-plex-sans": "5.2.8", - "@lingui/core": "5.7.0", - "@lingui/react": "5.7.0", - "@marsidev/react-turnstile": "^1.4.2", - "@nktkas/hyperliquid": "0.31.0", - "@phosphor-icons/react": "2.1.10", - "@privy-io/react-auth": "^3.17.0", - "@privy-io/wagmi": "^4.0.2", - "@tanstack/react-query": "5.66.5", - "@tanstack/react-router": "1.132.0", - "@tanstack/react-router-ssr-query": "1.131.7", - "@tanstack/react-start": "1.132.0", - "@tanstack/react-table": "8.21.3", - "@tanstack/react-virtual": "3.13.13", - "big.js": "7.0.1", - "class-variance-authority": "0.7.1", - "clsx": "2.1.1", - "cmdk": "1.1.1", - "events": "^3.3.0", - "klinecharts": "9.8.12", - "motion": "12.33.0", - "radix-ui": "1.4.3", - "react": "19.2.0", - "react-dom": "19.2.0", - "react-resizable-panels": "4.6.0", - "recharts": "2.15.4", - "sonner": "2.0.7", - "tailwind-merge": "3.4.0", - "tailwindcss": "4.0.6", - "tw-animate-css": "1.4.0", - "vaul": "1.1.2", - "viem": "2.42.1", - "vite-plugin-node-polyfills": "^0.25.0", - "wagmi": "3.1.0", - "zod": "4.3.4", - "zustand": "5.0.9" - }, - "devDependencies": { - "@biomejs/biome": "2.2.4", - "@commitlint/cli": "^20.3.1", - "@commitlint/config-conventional": "^20.3.1", - "@lingui/babel-plugin-lingui-macro": "^5.7.0", - "@lingui/cli": "^5.7.0", - "@lingui/vite-plugin": "^5.7.0", - "@tailwindcss/vite": "^4.0.6", - "@tanstack/router-plugin": "^1.132.0", - "@types/big.js": "^6.2.2", - "@types/node": "^22.10.2", - "@types/react": "^19.2.0", - "@types/react-dom": "^19.2.0", - "@vitejs/plugin-react": "^5.0.4", - "babel-plugin-react-compiler": "^1.0.0", - "lefthook": "^1.11.0", - "nitro": "latest", - "rollup-plugin-visualizer": "^6.0.5", - "shadcn": "^3.8.3", - "typescript": "^5.7.2", - "vite": "^7.1.7", - "vite-bundle-analyzer": "^1.3.2", - "vite-tsconfig-paths": "^5.1.4", - "vitest": "^4.0.16" - }, - "pnpm": { - "overrides": { - "@noble/hashes": "1.8.0" - } - } + "name": "hyperterminal", + "private": true, + "type": "module", + "packageManager": "pnpm@9.15.0", + "scripts": { + "dev": "vite dev", + "build": "lingui compile && NODE_OPTIONS=--max-old-space-size=4096 vite build && node scripts/clean-worker-statics.mjs", + "build:analyze": "ANALYZE=true lingui compile && vite build", + "serve": "vite preview", + "format": "biome format", + "lint": "biome lint", + "check": "biome check", + "fix": "biome check --write", + "test": "vitest run", + "i18n:extract": "lingui extract", + "i18n:compile": "lingui compile", + "prepare": "lefthook install", + "perf:bundle": "npx vite-bundle-visualizer", + "perf:compare": "node scripts/compare-bundle.js", + "perf:ws-soak:30m": "WS_SOAK_RUN=true WS_SOAK_DURATION_MS=1800000 WS_SOAK_SAMPLE_MS=1000 WS_SOAK_OP_MS=10 vitest run src/lib/tests/websocket-soak.test.ts", + "perf:ws-soak:60m": "WS_SOAK_RUN=true WS_SOAK_DURATION_MS=3600000 WS_SOAK_SAMPLE_MS=1000 WS_SOAK_OP_MS=10 vitest run src/lib/tests/websocket-soak.test.ts", + "clean": "rm -rf node_modules dist .output .wrangler" + }, + "dependencies": { + "@fontsource-variable/ibm-plex-sans": "5.2.8", + "@lingui/core": "5.7.0", + "@lingui/react": "5.7.0", + "@marsidev/react-turnstile": "^1.4.2", + "@nktkas/hyperliquid": "0.31.0", + "@phosphor-icons/react": "2.1.10", + "@privy-io/react-auth": "^3.17.0", + "@privy-io/wagmi": "^4.0.2", + "@tanstack/react-query": "5.66.5", + "@tanstack/react-router": "1.132.0", + "@tanstack/react-start": "1.132.0", + "@tanstack/react-table": "8.21.3", + "@tanstack/react-virtual": "3.13.13", + "big.js": "7.0.1", + "class-variance-authority": "0.7.1", + "clsx": "2.1.1", + "cmdk": "1.1.1", + "events": "^3.3.0", + "klinecharts": "9.8.12", + "motion": "12.33.0", + "radix-ui": "1.4.3", + "react": "19.2.0", + "react-dom": "19.2.0", + "react-resizable-panels": "4.6.0", + "recharts": "2.15.4", + "sonner": "2.0.7", + "tailwind-merge": "3.4.0", + "tailwindcss": "4.0.6", + "tw-animate-css": "1.4.0", + "vaul": "1.1.2", + "viem": "2.42.1", + "vite-plugin-node-polyfills": "^0.25.0", + "wagmi": "3.1.0", + "zod": "4.3.4", + "zustand": "5.0.9" + }, + "devDependencies": { + "@biomejs/biome": "2.2.4", + "@commitlint/cli": "^20.3.1", + "@commitlint/config-conventional": "^20.3.1", + "@lingui/babel-plugin-lingui-macro": "^5.7.0", + "@lingui/cli": "^5.7.0", + "@lingui/vite-plugin": "^5.7.0", + "@tailwindcss/vite": "^4.0.6", + "@tanstack/router-plugin": "^1.132.0", + "@types/big.js": "^6.2.2", + "@types/node": "^22.10.2", + "@types/react": "^19.2.0", + "@types/react-dom": "^19.2.0", + "@vitejs/plugin-react": "^5.0.4", + "babel-plugin-react-compiler": "^1.0.0", + "lefthook": "^1.11.0", + "nitro": "3.0.260311-beta", + "rollup-plugin-visualizer": "^6.0.5", + "shadcn": "^3.8.3", + "typescript": "^5.7.2", + "vite": "^7.1.7", + "vite-bundle-analyzer": "^1.3.2", + "vite-tsconfig-paths": "^5.1.4", + "vitest": "^4.0.16" + }, + "pnpm": { + "overrides": { + "@noble/hashes": "1.8.0" + }, + "patchedDependencies": { + "@tanstack/start-plugin-core@1.132.0": "patches/@tanstack__start-plugin-core@1.132.0.patch" + } + } } diff --git a/patches/@tanstack__start-plugin-core@1.132.0.patch b/patches/@tanstack__start-plugin-core@1.132.0.patch new file mode 100644 index 00000000..1fd69060 --- /dev/null +++ b/patches/@tanstack__start-plugin-core@1.132.0.patch @@ -0,0 +1,24 @@ +diff --git a/dist/esm/start-manifest-plugin/plugin.js b/dist/esm/start-manifest-plugin/plugin.js +index a708b72a74c98ab060461d3656b64ff099bfd5b8..0176b52efc393d7275aa85e29e451887b3f1eb66 100644 +--- a/dist/esm/start-manifest-plugin/plugin.js ++++ b/dist/esm/start-manifest-plugin/plugin.js +@@ -4,7 +4,9 @@ import { VIRTUAL_MODULES } from "@tanstack/start-server-core"; + import { tsrSplit } from "@tanstack/router-plugin"; + import { resolveViteId } from "../utils.js"; + import { ENTRY_POINTS } from "../constants.js"; +-const getCSSRecursively = (chunk, chunksByFileName, basePath) => { ++const getCSSRecursively = (chunk, chunksByFileName, basePath, visited = new Set()) => { ++ if (visited.has(chunk.fileName)) return []; ++ visited.add(chunk.fileName); + const result = []; + for (const cssFile of chunk.viteMetadata?.importedCss ?? []) { + result.push({ +@@ -20,7 +22,7 @@ const getCSSRecursively = (chunk, chunksByFileName, basePath) => { + const importedChunk = chunksByFileName.get(importedFileName); + if (importedChunk) { + result.push( +- ...getCSSRecursively(importedChunk, chunksByFileName, basePath) ++ ...getCSSRecursively(importedChunk, chunksByFileName, basePath, visited) + ); + } + } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 22c5efe4..5acf36e8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,11 @@ settings: overrides: '@noble/hashes': 1.8.0 +patchedDependencies: + '@tanstack/start-plugin-core@1.132.0': + hash: y6rkty7a5nnsbxx4xmpfnsiroa + path: patches/@tanstack__start-plugin-core@1.132.0.patch + importers: .: @@ -41,9 +46,6 @@ importers: '@tanstack/react-router': specifier: 1.132.0 version: 1.132.0(react-dom@19.2.0(react@19.2.0))(react@19.2.0) - '@tanstack/react-router-ssr-query': - specifier: 1.131.7 - version: 1.131.7(@tanstack/query-core@5.66.4)(@tanstack/react-query@5.66.5(react@19.2.0))(@tanstack/react-router@1.132.0(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@tanstack/router-core@1.168.5)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@tanstack/react-start': specifier: 1.132.0 version: 1.132.0(crossws@0.4.4(srvx@0.11.13))(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(vite@7.3.1(@types/node@22.19.15)(jiti@2.6.1)(lightningcss@1.32.0)(tsx@4.21.0)) @@ -166,7 +168,7 @@ importers: specifier: ^1.11.0 version: 1.13.6 nitro: - specifier: latest + specifier: 3.0.260311-beta version: 3.0.260311-beta(chokidar@5.0.0)(dotenv@17.3.1)(idb-keyval@6.2.2)(jiti@2.6.1)(lru-cache@11.2.7)(rollup@4.60.0)(vite@7.3.1(@types/node@22.19.15)(jiti@2.6.1)(lightningcss@1.32.0)(tsx@4.21.0)) rollup-plugin-visualizer: specifier: ^6.0.5 @@ -2982,16 +2984,6 @@ packages: peerDependencies: react: ^18 || ^19 - '@tanstack/react-router-ssr-query@1.131.7': - resolution: {integrity: sha512-wFp/OXUMNsOti9YwmIIiwp1+npZiBAY0bbf5IjomtwX6lhsBTutN5A/wIyGAja6wm+R5la9F8cihEEKdkS8YUQ==} - engines: {node: '>=12'} - peerDependencies: - '@tanstack/query-core': '>=5.66.0' - '@tanstack/react-query': '>=5.66.2' - '@tanstack/react-router': '>=1.127.0' - react: '>=18.0.0 || >=19.0.0' - react-dom: '>=18.0.0 || >=19.0.0' - '@tanstack/react-router@1.132.0': resolution: {integrity: sha512-tGNmQrFc4zWQZvjqYnC8ib84H/9QokRl73hr0P2XlxCY2KAgPTk2QjdzW03LqXgQZRXg7++vKznJt4LS9/M3iA==} engines: {node: '>=12'} @@ -3100,13 +3092,6 @@ packages: webpack: optional: true - '@tanstack/router-ssr-query-core@1.131.7': - resolution: {integrity: sha512-uHU+RmH7qjVDBjFb11iUJUaCAA7jgI5fQz1Q7SWL96knB9esrkXMQ77v5pxucxv3uC9XlnCyFijE3XJqo3Xb8Q==} - engines: {node: '>=12'} - peerDependencies: - '@tanstack/query-core': '>=5.66.0' - '@tanstack/router-core': '>=1.127.0' - '@tanstack/router-utils@1.132.0': resolution: {integrity: sha512-WDnvAi9kO20joLDzlsTvfgXNv+FgQ4G98xAD8r4jKWoTdTTG05DU2sRYimtbdq4Q7E3uVdvyvPdhRy45wan7bw==} engines: {node: '>=12'} @@ -11345,17 +11330,6 @@ snapshots: '@tanstack/query-core': 5.66.4 react: 19.2.0 - '@tanstack/react-router-ssr-query@1.131.7(@tanstack/query-core@5.66.4)(@tanstack/react-query@5.66.5(react@19.2.0))(@tanstack/react-router@1.132.0(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@tanstack/router-core@1.168.5)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': - dependencies: - '@tanstack/query-core': 5.66.4 - '@tanstack/react-query': 5.66.5(react@19.2.0) - '@tanstack/react-router': 1.132.0(react-dom@19.2.0(react@19.2.0))(react@19.2.0) - '@tanstack/router-ssr-query-core': 1.131.7(@tanstack/query-core@5.66.4)(@tanstack/router-core@1.168.5) - react: 19.2.0 - react-dom: 19.2.0(react@19.2.0) - transitivePeerDependencies: - - '@tanstack/router-core' - '@tanstack/react-router@1.132.0(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@tanstack/history': 1.132.0 @@ -11397,7 +11371,7 @@ snapshots: '@tanstack/react-start-server': 1.132.0(crossws@0.4.4(srvx@0.11.13))(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@tanstack/router-utils': 1.161.6 '@tanstack/start-client-core': 1.132.0 - '@tanstack/start-plugin-core': 1.132.0(@tanstack/react-router@1.132.0(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(crossws@0.4.4(srvx@0.11.13))(vite@7.3.1(@types/node@22.19.15)(jiti@2.6.1)(lightningcss@1.32.0)(tsx@4.21.0)) + '@tanstack/start-plugin-core': 1.132.0(patch_hash=y6rkty7a5nnsbxx4xmpfnsiroa)(@tanstack/react-router@1.132.0(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(crossws@0.4.4(srvx@0.11.13))(vite@7.3.1(@types/node@22.19.15)(jiti@2.6.1)(lightningcss@1.32.0)(tsx@4.21.0)) pathe: 2.0.3 react: 19.2.0 react-dom: 19.2.0(react@19.2.0) @@ -11514,11 +11488,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@tanstack/router-ssr-query-core@1.131.7(@tanstack/query-core@5.66.4)(@tanstack/router-core@1.168.5)': - dependencies: - '@tanstack/query-core': 5.66.4 - '@tanstack/router-core': 1.168.5 - '@tanstack/router-utils@1.132.0': dependencies: '@babel/core': 7.29.0 @@ -11571,7 +11540,7 @@ snapshots: tiny-invariant: 1.3.3 tiny-warning: 1.0.3 - '@tanstack/start-plugin-core@1.132.0(@tanstack/react-router@1.132.0(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(crossws@0.4.4(srvx@0.11.13))(vite@7.3.1(@types/node@22.19.15)(jiti@2.6.1)(lightningcss@1.32.0)(tsx@4.21.0))': + '@tanstack/start-plugin-core@1.132.0(patch_hash=y6rkty7a5nnsbxx4xmpfnsiroa)(@tanstack/react-router@1.132.0(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(crossws@0.4.4(srvx@0.11.13))(vite@7.3.1(@types/node@22.19.15)(jiti@2.6.1)(lightningcss@1.32.0)(tsx@4.21.0))': dependencies: '@babel/code-frame': 7.26.2 '@babel/core': 7.29.0 diff --git a/src/router.tsx b/src/router.tsx index 41a90c0b..04f77bd0 100644 --- a/src/router.tsx +++ b/src/router.tsx @@ -1,5 +1,4 @@ import { createRouter } from "@tanstack/react-router"; -import { setupRouterSsrQueryIntegration } from "@tanstack/react-router-ssr-query"; import { getRootProviderContext, RootProvider } from "@/providers/root"; import { routeTree } from "./routeTree.gen"; @@ -15,7 +14,5 @@ export const getRouter = () => { }, }); - setupRouterSsrQueryIntegration({ router, queryClient: rqContext.queryClient }); - return router; }; diff --git a/vite.config.ts b/vite.config.ts index f60147e4..94fc534c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -147,6 +147,7 @@ const config = defineConfig({ nodePolyfills({ include: ['buffer'], globals: { Buffer: true } }), ssrStubPlugin, nitro({ + preset: 'cloudflare-pages', compressPublicAssets: true, minify: true, rollupConfig: { @@ -160,9 +161,6 @@ const config = defineConfig({ }, }, routeRules: { - '/api/faucet/**': { - proxy: 'https://usdh.com/api/faucet/**', - }, '/assets/**': { headers: { 'cache-control': 'public, max-age=31536000, immutable' }, },