From 53bed7b26d33736105b07fd7c6115556faddba1c Mon Sep 17 00:00:00 2001 From: yiling Date: Fri, 5 Jun 2026 17:33:18 +0800 Subject: [PATCH] feat(npm): add win-arm64 compilation target and fix win32 wrapper path mapping --- docker-compose/temporal/docker-compose.yaml | 45 ++++----------------- scripts/build-npm.ts | 10 ++++- 2 files changed, 16 insertions(+), 39 deletions(-) diff --git a/docker-compose/temporal/docker-compose.yaml b/docker-compose/temporal/docker-compose.yaml index 78bec620..1d7b07ca 100644 --- a/docker-compose/temporal/docker-compose.yaml +++ b/docker-compose/temporal/docker-compose.yaml @@ -19,7 +19,6 @@ services: shumai: image: shumaione/shumai:latest - build: ../../ container_name: shumai_app ports: - '3000:3000' @@ -27,47 +26,17 @@ services: - shumai_data:/app/data environment: DATABASE_URL: postgres://shumai:shumai_password@postgres:5432/shumai_db?search_path=public&sslmode=disable - STORAGE_BACKEND: local + STORAGE_BACKEND: s3 + AWS_ENDPOINT_URL_S3: S3_ENDPOINT_URL + S3_REGION: S3_REGION + S3_BUCKET: BUCKET_NAME + S3_ACCESS_KEY_ID: ID + S3_SECRET_ACCESS_KEY: KEY BETTER_AUTH_SECRET: qSxs9DxzHDZBbeeTNPEwBuspYwipBqz5Gk5XdBjNhWw= BETTER_AUTH_URL: http://localhost:3000 WORKFLOW_EXECUTOR: temporal TEMPORAL_ADDRESS: temporal:7233 - depends_on: - postgres: - condition: service_healthy - temporal: - condition: service_healthy - - shumai-agent: - image: shumaione/shumai:latest - build: ../../ - container_name: shumai_agent_worker - command: ['bun', 'index.js', 'worker', 'agent'] - volumes: - - shumai_data:/app/data - environment: - DATABASE_URL: postgres://shumai:shumai_password@postgres:5432/shumai_db?search_path=public&sslmode=disable - STORAGE_BACKEND: local - WORKFLOW_EXECUTOR: temporal - TEMPORAL_ADDRESS: temporal:7233 - depends_on: - postgres: - condition: service_healthy - temporal: - condition: service_healthy - - shumai-transcode: - image: shumaione/shumai:latest - build: ../../ - container_name: shumai_transcode_worker - command: ['bun', 'index.js', 'worker', 'transcode'] - volumes: - - shumai_data:/app/data - environment: - DATABASE_URL: postgres://shumai:shumai_password@postgres:5432/shumai_db?search_path=public&sslmode=disable - STORAGE_BACKEND: local - WORKFLOW_EXECUTOR: temporal - TEMPORAL_ADDRESS: temporal:7233 + GEMINI_API_KEY: KEY depends_on: postgres: condition: service_healthy diff --git a/scripts/build-npm.ts b/scripts/build-npm.ts index 9d30dbc3..955e1c2f 100644 --- a/scripts/build-npm.ts +++ b/scripts/build-npm.ts @@ -36,7 +36,9 @@ const commonExternal = [ const targets = [ { platform: 'darwin', arch: 'arm64', bunTarget: 'bun-darwin-arm64', suffix: '' }, { platform: 'darwin', arch: 'x64', bunTarget: 'bun-darwin-x64', suffix: '' }, + { platform: 'linux', arch: 'arm64', bunTarget: 'bun-linux-arm64', suffix: '' }, { platform: 'linux', arch: 'x64', bunTarget: 'bun-linux-x64', suffix: '' }, + { platform: 'win32', arch: 'arm64', bunTarget: 'bun-windows-arm64', suffix: '.exe' }, { platform: 'win32', arch: 'x64', bunTarget: 'bun-windows-x64', suffix: '.exe' }, ] @@ -184,11 +186,17 @@ if (platform === 'darwin' && arch === 'arm64') { } else if (platform === 'darwin' && arch === 'x64') { pkgName = '@shumai-one/${appName}-darwin-x64' binaryName = '${appName}' +} else if (platform === 'linux' && arch === 'arm64') { + pkgName = '@shumai-one/${appName}-linux-arm64' + binaryName = '${appName}' } else if (platform === 'linux' && arch === 'x64') { pkgName = '@shumai-one/${appName}-linux-x64' binaryName = '${appName}' +} else if (platform === 'win32' && arch === 'arm64') { + pkgName = '@shumai-one/${appName}-win32-arm64' + binaryName = '${appName}.exe' } else if (platform === 'win32' && arch === 'x64') { - pkgName = '@shumai-one/${appName}-windows-x64' + pkgName = '@shumai-one/${appName}-win32-x64' binaryName = '${appName}.exe' } else { console.error(\`Unsupported platform/architecture: \${platform}/\${arch}\`)