先提交上去

This commit is contained in:
Fox_block
2026-03-16 20:49:46 +08:00
parent 86abcb5602
commit 192b48cab0
303 changed files with 30019 additions and 5846 deletions
+21
View File
@@ -0,0 +1,21 @@
import fs from 'fs'
import path from 'path'
const root = process.cwd()
const targets = ['db.sqlite']
for (const name of targets) {
const filePath = path.join(root, name)
try {
if (fs.existsSync(filePath)) {
fs.rmSync(filePath, { force: true })
console.log(`[clean-db] removed ${filePath}`)
}
} catch (e) {
if (e.code === 'EPERM' || e.code === 'EACCES') {
console.warn(`[clean-db] skipped ${filePath}: file in use or permission denied`)
} else {
console.error(`[clean-db] failed to remove ${filePath}:`, e?.message || e)
}
}
}