From bf68abb9b7bffe3c8658d361c92e850b0c555953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=B8=80=E4=B9=8B?= Date: Mon, 26 Feb 2024 16:04:22 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E5=88=A0=E9=99=A4=E5=90=8C=E6=AD=A5=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20#254?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 4 ++-- package.json | 2 +- src/app/service/synchronize/manager.ts | 5 +++-- src/runtime/content/utils.ts | 2 -- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 84397ad1..dc65fa5c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "scriptcat", - "version": "0.16.0-beta", + "version": "0.16.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "scriptcat", - "version": "0.16.0-beta", + "version": "0.16.1", "license": "GPLv3", "dependencies": { "@arco-design/web-react": "^2.51.1", diff --git a/package.json b/package.json index 390d0d35..39011dce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scriptcat", - "version": "0.16.0", + "version": "0.16.1", "description": "脚本猫,一个可以执行用户脚本的浏览器扩展,万物皆可脚本化,让你的浏览器可以做更多的事情!", "author": "CodFrm", "license": "GPLv3", diff --git a/src/app/service/synchronize/manager.ts b/src/app/service/synchronize/manager.ts index 16985264..b09592cc 100644 --- a/src/app/service/synchronize/manager.ts +++ b/src/app/service/synchronize/manager.ts @@ -251,6 +251,7 @@ export default class SynchronizeManager extends Manager { `脚本${script.name}已被删除` ); } + scriptMap.delete(uuid); } else { // 否则认为是一个无效的.meta文件,进行删除 await fs.delete(file.meta!.path); @@ -285,12 +286,12 @@ export default class SynchronizeManager extends Manager { result.push(this.pullScript(fs, file as SyncFiles)); } }); + // 忽略错误 + await Promise.allSettled(result); // 上传剩下的脚本 scriptMap.forEach((script) => { result.push(this.pushScript(fs, script)); }); - // 忽略错误 - await Promise.allSettled(result); // 重新获取文件列表,保存文件摘要 this.logger.info("sync complete"); await this.updateFileDigest(fs); diff --git a/src/runtime/content/utils.ts b/src/runtime/content/utils.ts index 0b3d2781..34068c5b 100644 --- a/src/runtime/content/utils.ts +++ b/src/runtime/content/utils.ts @@ -229,8 +229,6 @@ export function proxyContext( } } else if (name === Symbol.unscopables) { return unscopables; - } else if (name === Symbol.toStringTag) { - return name; } } return undefined;