feat: use pnpm & lock core-js shim

This commit is contained in:
2023-10-25 11:29:01 +08:00
parent 5bf4b1c09e
commit 54eaae96bd
32 changed files with 444 additions and 178 deletions

View File

@@ -34,9 +34,7 @@ export namespace task {
protected pluginDisable(plugin: plugin.Plugin) {
if (this.pluginCacheTasks.has(plugin.description.name)) {
this.pluginCacheTasks.get(plugin.description.name).forEach((task) => {
task.cancel()
})
this.pluginCacheTasks.get(plugin.description.name).forEach((task) => task.cancel())
this.pluginCacheTasks.delete(plugin.description.name)
}
}
@@ -151,8 +149,9 @@ export namespace task {
this.func(...args)
this.emit('after', this)
} catch (error: any) {
this.emit('error', error)
if (!error.processed) {
try {
this.emit('error', error)
} catch (ignore) {
console.console('§4插件执行任务时发生错误', error)
console.ex(error)
this.cancel()
@@ -181,7 +180,7 @@ export namespace task {
* 提交任务
* @param args 任务参数
*/
protected abstract submit0(...args: any[]): any
protected abstract submit0(...args: any[]): Cancelable
/**
* 取消任务
*/