From 9f40b62ee98f2fb12cafcfb4e8c3e61bfb66730a Mon Sep 17 00:00:00 2001 From: sw3205933776 <3205933776@qq.com> Date: Thu, 21 Aug 2025 17:30:43 +0800 Subject: [PATCH] chore: change dependency source to Aliyun mirror --- electron/main/init.ts | 4 ++-- resources/scripts/install-bun.js | 2 +- resources/scripts/install-uv.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/electron/main/init.ts b/electron/main/init.ts index ac364dbf..f83f76ae 100644 --- a/electron/main/init.ts +++ b/electron/main/init.ts @@ -180,8 +180,8 @@ export async function installDependencies() { fs.writeFileSync(installingLockPath, '') const installedLockPath = path.join(backendPath, 'uv_installed.lock') - const proxyArgs = ['--default-index', 'https://pypi.tuna.tsinghua.edu.cn/simple'] - + // const proxyArgs = ['--default-index', 'https://pypi.tuna.tsinghua.edu.cn/simple'] + const proxyArgs = ['--default-index', 'https://mirrors.aliyun.com/pypi/simple/'] const runInstall = (extraArgs: string[]) => { return new Promise((resolveInner) => { const node_process = spawn(uv_path, [ diff --git a/resources/scripts/install-bun.js b/resources/scripts/install-bun.js index 092ff0e6..5e93f0f9 100644 --- a/resources/scripts/install-bun.js +++ b/resources/scripts/install-bun.js @@ -58,7 +58,7 @@ async function downloadBunBinary(bun_download_url,platform, arch, version = DEFA try { console.log(`Downloading bun ${version} for ${platformKey}...`) console.log(`URL: ${downloadUrl}`) - + if (fs.existsSync(tempFilename)) fs.unlinkSync(tempFilename) // Use the new download function await downloadWithRedirects(downloadUrl, tempFilename) diff --git a/resources/scripts/install-uv.js b/resources/scripts/install-uv.js index 58bccd29..525cebb0 100644 --- a/resources/scripts/install-uv.js +++ b/resources/scripts/install-uv.js @@ -71,7 +71,7 @@ async function downloadUvBinary( try { console.log(`Downloading uv ${version} for ${platformKey}...`); console.log(`URL: ${downloadUrl}`); - + if (fs.existsSync(tempFilename)) fs.unlinkSync(tempFilename) await downloadWithRedirects(downloadUrl, tempFilename); console.log(`Extracting ${packageName} to ${binDir}...`);