From 7534553ba259ea43027b92efbf74aa248354d12c Mon Sep 17 00:00:00 2001 From: Sam Chau Date: Tue, 20 Jan 2026 18:46:37 +1030 Subject: [PATCH] feat(dev): add platform detection and update environment variables for Vite --- scripts/dev.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/dev.ts b/scripts/dev.ts index 9ad29df..9e29f74 100644 --- a/scripts/dev.ts +++ b/scripts/dev.ts @@ -2,6 +2,13 @@ * Dev script that runs parser and server concurrently with labeled output */ +// Auto-detect platform from Deno.build +function getPlatform(): string { + const os = Deno.build.os === 'darwin' ? 'darwin' : Deno.build.os; + const arch = Deno.build.arch === 'x86_64' ? 'amd64' : Deno.build.arch === 'aarch64' ? 'arm64' : Deno.build.arch; + return `${os}/${arch}`; +} + const colors = { parser: '\x1b[33m', // yellow server: '\x1b[34m', // blue @@ -54,7 +61,9 @@ async function runServer() { HOST: '0.0.0.0', APP_BASE_PATH: './dist/dev', PARSER_HOST: 'localhost', - PARSER_PORT: '5000' + PARSER_PORT: '5000', + VITE_PLATFORM: getPlatform(), + VITE_CHANNEL: 'dev' }, stdout: 'piped', stderr: 'piped'