fix(core): update
This commit is contained in:
@ -114,12 +114,9 @@ export class SmartNetwork {
|
||||
const domainPart = domainArg.split(':')[0];
|
||||
const port = portArg ? portArg : parseInt(domainArg.split(':')[1], 10);
|
||||
|
||||
plugins.portscanner.checkPortStatus(port, domainPart, (err, status) => {
|
||||
if (err) {
|
||||
// console.log(err);
|
||||
return done.resolve(false);
|
||||
}
|
||||
if (status === 'open') {
|
||||
plugins.isopen(domainPart, port, (response) => {
|
||||
console.log(response);
|
||||
if (response[port.toString()].isOpen) {
|
||||
done.resolve(true);
|
||||
} else {
|
||||
done.resolve(false);
|
||||
|
@ -10,9 +10,9 @@ import * as smartstring from '@pushrocks/smartstring';
|
||||
export { smartpromise, smartstring };
|
||||
|
||||
// @third party scope
|
||||
import * as portscanner from 'portscanner';
|
||||
import isopen from 'isopen';
|
||||
import publicIp from 'public-ip';
|
||||
import speedtestNet from 'speedtest-net';
|
||||
import * as systeminformation from 'systeminformation';
|
||||
|
||||
export { portscanner, publicIp, speedtestNet, systeminformation };
|
||||
export { isopen, publicIp, speedtestNet, systeminformation };
|
||||
|
Reference in New Issue
Block a user