fix(ci/config): Improve CI workflows, update project configuration, and clean up code formatting
This commit is contained in:
@ -16,7 +16,10 @@ export class SmartNetwork {
|
||||
return test;
|
||||
}
|
||||
|
||||
public async ping(hostArg: string, timeoutArg: number = 500): Promise<ReturnType<typeof plugins.smartping.Smartping.prototype.ping>> {
|
||||
public async ping(
|
||||
hostArg: string,
|
||||
timeoutArg: number = 500,
|
||||
): Promise<ReturnType<typeof plugins.smartping.Smartping.prototype.ping>> {
|
||||
const smartpingInstance = new plugins.smartping.Smartping();
|
||||
const pingResult = await smartpingInstance.ping(hostArg, timeoutArg);
|
||||
return pingResult;
|
||||
@ -120,18 +123,22 @@ export class SmartNetwork {
|
||||
|
||||
public async getPublicIps() {
|
||||
return {
|
||||
v4: await plugins.publicIp.publicIpv4({
|
||||
timeout: 1000,
|
||||
onlyHttps: true,
|
||||
}).catch(async (err) => {
|
||||
return null
|
||||
}),
|
||||
v6: await plugins.publicIp.publicIpv6({
|
||||
timeout: 1000,
|
||||
onlyHttps: true,
|
||||
}).catch(async (err) => {
|
||||
return null
|
||||
})
|
||||
v4: await plugins.publicIp
|
||||
.publicIpv4({
|
||||
timeout: 1000,
|
||||
onlyHttps: true,
|
||||
})
|
||||
.catch(async (err) => {
|
||||
return null;
|
||||
}),
|
||||
v6: await plugins.publicIp
|
||||
.publicIpv6({
|
||||
timeout: 1000,
|
||||
onlyHttps: true,
|
||||
})
|
||||
.catch(async (err) => {
|
||||
return null;
|
||||
}),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user