From 933255179151ca0ee6ea7fcc20299e54b2c1d0a2 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Fri, 27 Jul 2018 17:51:40 +0900 Subject: [PATCH 1/2] :sparkles: --- src/daemons/server-stats.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/daemons/server-stats.ts b/src/daemons/server-stats.ts index 750c00c0c..39eb2699f 100644 --- a/src/daemons/server-stats.ts +++ b/src/daemons/server-stats.ts @@ -61,6 +61,7 @@ async function freeMem() { return data.active; } catch (error) { console.error(error); + throw error; } } @@ -71,5 +72,6 @@ async function totalMem() { return data.total; } catch (error) { console.error(error); + throw error; } } From 75d04858e66954d7d8a7442be770c360d06aefef Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Fri, 27 Jul 2018 17:58:19 +0900 Subject: [PATCH 2/2] :sparkles: --- package.json | 1 + src/daemons/server-stats.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 4202c592e..7e45b02ba 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "@types/showdown": "1.7.5", "@types/single-line-log": "1.1.0", "@types/speakeasy": "2.0.2", + "@types/systeminformation": "3.23.0", "@types/tmp": "0.0.33", "@types/uuid": "3.4.3", "@types/webpack": "4.4.8", diff --git a/src/daemons/server-stats.ts b/src/daemons/server-stats.ts index 39eb2699f..6c3b68403 100644 --- a/src/daemons/server-stats.ts +++ b/src/daemons/server-stats.ts @@ -1,5 +1,5 @@ import * as os from 'os'; -const sysUtils = require('systeminformation'); +import * as sysUtils from 'systeminformation'; import * as diskusage from 'diskusage'; import Xev from 'xev';