更新依赖&版本号(2.12.3-beta.11)

This commit is contained in:
lyswhut
2026-08-21 19:32:41 +08:00
parent c68361719d
commit f4f9496fda
15 changed files with 273 additions and 521 deletions
+5 -8
View File
@@ -9,7 +9,7 @@ const getGzipFiles = async() => {
// for (const name of names) {
// if (name.endsWith('.node')) await fs.promises.unlink(path.join(libDir, name))
// }
return names.filter(name => name.endsWith('.gz'))
return names.filter((name) => name.endsWith('.gz'))
}
const unzip = async(filePath) => {
@@ -18,22 +18,20 @@ const unzip = async(filePath) => {
await fs.promises.mkdir(targetDir)
await tar.x({
file: filePath,
strip: 1,
strip: 0,
C: targetDir,
})
return targetDir
}
const files = [
'better_sqlite3',
]
const files = ['better_sqlite3']
const moveFile = async(filePath) => {
const name = 'electron-' + path.basename(filePath).split('-electron-')[1]
const name = `${path.basename(filePath).split('_v')[0].replace('_', '-')}`
for (const fileName of files) {
if (fileName == 'better_sqlite3' && !name.includes('linux')) continue
const targetPath = path.join(libDir, `${fileName}_${name}.node`)
if (fs.existsSync(targetPath)) await fs.promises.unlink(targetPath)
await fs.promises.rename(path.join(filePath, 'Release', fileName + '.node'), targetPath)
await fs.promises.rename(path.join(filePath, `${fileName}.node`), targetPath)
}
await fs.promises.rm(filePath, { recursive: true })
}
@@ -49,4 +47,3 @@ const run = async() => {
}
run()