mirror of
https://github.com/HolographicHat/Yae.git
synced 2025-12-14 02:18:13 +08:00
fix crash when appcenter error
This commit is contained in:
@@ -57,7 +57,6 @@ const device = (() => {
|
||||
|
||||
const upload = () => {
|
||||
if (queue.length > 0) {
|
||||
try {
|
||||
const data = JSON.stringify({ "logs": queue })
|
||||
axios.post("https://in.appcenter.ms/logs?api-version=1.0.0", data,{
|
||||
headers: {
|
||||
@@ -66,8 +65,7 @@ const upload = () => {
|
||||
}
|
||||
}).then(_ => {
|
||||
queue.length = 0
|
||||
})
|
||||
} catch (e) {}
|
||||
}).catch(_ => {})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,8 +60,12 @@ const exportToCocogoat = async proto => {
|
||||
date: getDate(finishTimestamp)
|
||||
})
|
||||
})
|
||||
exec("clip").stdin.end(JSON.stringify(out,null,2))
|
||||
console.log("导出内容已复制到剪贴板")
|
||||
const ts = Date.now()
|
||||
const json = JSON.stringify(out,null,2)
|
||||
exec("clip").stdin.end(json)
|
||||
const fp = `./export-${ts}-cocogoat.json`
|
||||
fs.writeFileSync(fp, json)
|
||||
console.log(`导出内容已复制到剪贴板,若拷贝失败请手动复制 export-${ts}-cocogoat.json 文件内容`)
|
||||
}
|
||||
|
||||
const exportToCsv = async proto => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const version = {
|
||||
code: 2,
|
||||
name: "1.0.1"
|
||||
code: 3,
|
||||
name: "1.2"
|
||||
}
|
||||
|
||||
module.exports = { version }
|
||||
|
||||
Reference in New Issue
Block a user