From b9380be999fa06fc82180e87acd900a10d8ad5c8 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Tue, 27 Apr 2021 09:46:31 +0000 Subject: [PATCH] fix(core): update --- package-lock.json | 10 +++++----- package.json | 2 +- test/test.ts | 4 ++-- ts/smartnetwork.classes.smartnetwork.ts | 2 +- ts/smartnetwork.plugins.ts | 3 +-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 337f39d..3dcffb1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3109,11 +3109,6 @@ "integrity": "sha1-gJPuBBam4r8qpjOBCRFLP7/6Dps=", "dev": true }, - "@types/speedtest-net": { - "version": "2.1.0", - "resolved": "https://verdaccio.lossless.one/@types%2fspeedtest-net/-/speedtest-net-2.1.0.tgz", - "integrity": "sha512-a6P3s2qOWU08yu/fk/xyswqRlDyeTmg5RMwedC0h1ZbH2d2iqYVATUXX/Jgl4P5hs12uhj0AQCEZlgVbVXSfKQ==" - }, "@types/through2": { "version": "2.0.36", "resolved": "https://verdaccio.lossless.one/@types%2fthrough2/-/through2-2.0.36.tgz", @@ -11871,6 +11866,11 @@ "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", "dev": true }, + "speed-cloudflare-cli": { + "version": "2.0.3", + "resolved": "https://verdaccio.lossless.one/speed-cloudflare-cli/-/speed-cloudflare-cli-2.0.3.tgz", + "integrity": "sha512-aYnaj7ZhasoW+zhsVrO0tmGTxAfBY6eYFoIdoBJdJ0yZE1F/g11pt2AJqIuST0Qbe0x/pzwsEed267tCR6HuOA==" + }, "speedtest-net": { "version": "2.1.1", "resolved": "https://verdaccio.lossless.one/speedtest-net/-/speedtest-net-2.1.1.tgz", diff --git a/package.json b/package.json index 5534440..536b990 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,9 @@ "@pushrocks/smartpromise": "^3.1.3", "@pushrocks/smartstring": "^3.0.24", "@types/default-gateway": "^3.0.1", - "@types/speedtest-net": "^2.1.0", "isopen": "^1.3.0", "public-ip": "^4.0.3", + "speed-cloudflare-cli": "^2.0.3", "speedtest-net": "^2.1.1", "systeminformation": "^5.6.12" }, diff --git a/test/test.ts b/test/test.ts index c91a81a..8942a85 100644 --- a/test/test.ts +++ b/test/test.ts @@ -10,8 +10,8 @@ tap.test('should create a valid instance of SmartNetwork', async () => { tap.test('should perform a speedtest', async () => { const result = await testSmartNetwork.getSpeed(); - console.log(`Download speed for this instance is ${result.download.bandwidth}`); - console.log(`Upload speed for this instance is ${result.download.bandwidth}`); + // console.log(`Download speed for this instance is ${result.download.bandwidth}`); + // console.log(`Upload speed for this instance is ${result.download.bandwidth}`); }); tap.test('should determine wether a port is free', async () => { diff --git a/ts/smartnetwork.classes.smartnetwork.ts b/ts/smartnetwork.classes.smartnetwork.ts index 8f5bdac..8fc615c 100644 --- a/ts/smartnetwork.classes.smartnetwork.ts +++ b/ts/smartnetwork.classes.smartnetwork.ts @@ -38,7 +38,7 @@ export class SmartNetwork { * @param measurementTime */ public async getSpeed() { - const test = await plugins.speedtestNet({ acceptGdpr: true, acceptLicense: true }); + const test = null; return test; } diff --git a/ts/smartnetwork.plugins.ts b/ts/smartnetwork.plugins.ts index 4b344f7..7a61bf0 100644 --- a/ts/smartnetwork.plugins.ts +++ b/ts/smartnetwork.plugins.ts @@ -12,7 +12,6 @@ export { smartpromise, smartstring }; // @third party scope import isopen from 'isopen'; import publicIp from 'public-ip'; -import speedtestNet from 'speedtest-net'; import * as systeminformation from 'systeminformation'; -export { isopen, publicIp, speedtestNet, systeminformation }; +export { isopen, publicIp, systeminformation };