Skip to content

Commit

Permalink
feat: 逻辑优化
Browse files Browse the repository at this point in the history
  • Loading branch information
baranwang committed Nov 5, 2024
1 parent c485bf9 commit 1b65dc9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/surge2egern/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,10 @@ export class Surge2Egern {
return output.value;
}, outputElement);

await this.#browser.close();
spinner.succeed(`${title}成功`);

return outputValue;
} catch (error) {
await this.#browser.close();
spinner.fail(`${title}失败`);
throw error;
}
Expand All @@ -90,7 +88,11 @@ export class Surge2Egern {
return this.#transform('模块配置转换', module);
}

async transformRules(rules: string) {
transformRules(rules: string) {
return this.#transform('规则集合转换', rules);
}

async destroy() {
await this.#browser.close();
}
}

0 comments on commit 1b65dc9

Please sign in to comment.