mirror of
https://github.com/certd/certd.git
synced 2026-04-24 20:57:26 +08:00
chore: 网络测试
This commit is contained in:
@@ -129,9 +129,9 @@ async function spawn(opts: SpawnOption): Promise<string> {
|
||||
log.error(`child process exited with code ${code}`);
|
||||
const e = new Error(stderr || "return " + code);
|
||||
//@ts-ignore
|
||||
error.stderr = stderr;
|
||||
e.stderr = stderr;
|
||||
//@ts-ignore
|
||||
error.stdout = stdout;
|
||||
e.stdout = stdout;
|
||||
reject(e);
|
||||
} else {
|
||||
resolve(stdout);
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
"devDependencies": {
|
||||
"@types/chai": "^4.3.3",
|
||||
"@types/mocha": "^10.0.0",
|
||||
"@types/psl": "^1.1.3",
|
||||
"@typescript-eslint/eslint-plugin": "^8.26.1",
|
||||
"@typescript-eslint/parser": "^8.26.1",
|
||||
"chai": "^4.3.6",
|
||||
|
||||
@@ -36,13 +36,11 @@
|
||||
"socks-proxy-agent": "^8.0.4",
|
||||
"ssh2": "^1.15.0",
|
||||
"strip-ansi": "^7.1.0",
|
||||
"tencentcloud-sdk-nodejs": "^4.0.1005",
|
||||
"psl": "^1.9.0"
|
||||
"tencentcloud-sdk-nodejs": "^4.0.1005"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chai": "^4.3.3",
|
||||
"@types/mocha": "^10.0.0",
|
||||
"@types/psl": "^1.1.3",
|
||||
"@typescript-eslint/eslint-plugin": "^8.26.1",
|
||||
"@typescript-eslint/parser": "^8.26.1",
|
||||
"chai": "^4.3.6",
|
||||
|
||||
@@ -78,7 +78,7 @@ const createPingTestMethod = async () => {
|
||||
const createTelnetTestMethod = async () => {
|
||||
const domain = getCurrentDomain();
|
||||
const port = getCurrentPort();
|
||||
|
||||
|
||||
return TelnetTest(domain, port);
|
||||
};
|
||||
|
||||
@@ -95,7 +95,7 @@ const getCurrentPort = () => {
|
||||
// 运行全部测试
|
||||
async function runAllTests() {
|
||||
const domain = getCurrentDomain();
|
||||
|
||||
|
||||
// 检查是否有域名
|
||||
if (!domain) {
|
||||
message.error("请输入域名");
|
||||
@@ -107,8 +107,6 @@ async function runAllTests() {
|
||||
// 通过组件引用调用测试方法
|
||||
try {
|
||||
await Promise.allSettled([domainResolveRef.value?.test(), pingTestRef.value?.test(), telnetTestRef.value?.test()]);
|
||||
|
||||
message.success("所有测试已完成");
|
||||
} catch (error) {
|
||||
message.error("部分测试执行失败,请查看详细结果");
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user