chore(@embark): move getWindowSize to utils

This commit is contained in:
Iuri Matias 2018-11-28 14:43:23 -05:00
parent 94d7d60e6f
commit 219eaab13d
3 changed files with 45 additions and 16 deletions

View File

@ -1,4 +1,4 @@
let windowSize = require('window-size');
const { getWindowSize } = require('../../lib/utils/utils.js');
let Monitor = require('./monitor.js');
@ -15,7 +15,7 @@ class Dashboard {
}
checkWindowSize() {
let size = windowSize.get();
let size = getWindowSize();
if (size.height < 40 || size.width < 118) {
this.logger.warn(__("tip: you can resize the terminal or disable the dashboard with") + " embark run --nodashboard".bold.underline);
}

View File

@ -565,6 +565,11 @@ function jsonFunctionReplacer(_key, value) {
return value;
}
function getWindowSize() {
const windowSize = require('window-size');
return windowSize.get();
}
module.exports = {
joinPath,
dirname,
@ -611,5 +616,6 @@ module.exports = {
fileTreeSort,
copyToClipboard,
fuzzySearch,
jsonFunctionReplacer
jsonFunctionReplacer,
getWindowSize
};

View File

@ -5859,6 +5859,22 @@ ethereumjs-block@^1.6.0, ethereumjs-block@~1.7.0:
ethereumjs-util "^5.0.0"
merkle-patricia-tree "^2.1.2"
ethereumjs-block@~2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-2.1.0.tgz#71d1b19e18061f14cf6371bf34ba31a359931360"
integrity sha512-ip+x4/7hUInX+TQfhEKsQh9MJK1Dbjp4AuPjf1UdX3udAV4beYD4EMCNIPzBLCsGS8WQZYXLpo83tVTISYNpow==
dependencies:
async "^2.0.1"
ethereumjs-common "^0.6.0"
ethereumjs-tx "^1.2.2"
ethereumjs-util "^5.0.0"
merkle-patricia-tree "^2.1.2"
ethereumjs-common@^0.6.0:
version "0.6.1"
resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-0.6.1.tgz#ec98edf315a7f107afb6acc48e937a8266979fae"
integrity sha512-4jOrfDu9qOBTTGGb3zrfT1tE1Hyc6a8LJpEk0Vk9AYlLkBY7crjVICyJpRvjNI+KLDMpMITMw3eWVZOLMtZdhw==
ethereumjs-common@~0.4.0:
version "0.4.1"
resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-0.4.1.tgz#27690a24a817b058cc3a2aedef9392e8d7d63984"
@ -5872,7 +5888,7 @@ ethereumjs-tx@1.3.7, ethereumjs-tx@^1.2.2, ethereumjs-tx@^1.3.3:
ethereum-common "^0.0.18"
ethereumjs-util "^5.0.0"
ethereumjs-util@6.0.0:
ethereumjs-util@6.0.0, ethereumjs-util@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.0.0.tgz#f14841c182b918615afefd744207c7932c8536c0"
integrity sha512-E3yKUyl0Fs95nvTFQZe/ZSNcofhDzUsDlA5y2uoRmf1+Ec7gpGhNCsgKkZBRh7Br5op8mJcYF/jFbmjj909+nQ==
@ -5926,6 +5942,23 @@ ethereumjs-vm@2.4.0:
rustbn.js "~0.2.0"
safe-buffer "^5.1.1"
ethereumjs-vm@^2.3.3:
version "2.5.0"
resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-2.5.0.tgz#71dde54a093bd813c9defdc6d45ceb8fcca2f603"
integrity sha512-Cp1do4J2FIJFnbofqLsKb/aoZKG+Q8NBIbTa1qwZPQkQxzeR3DZVpFk/VbE1EUO6Ha0kSClJ1jzfj07z3cScSQ==
dependencies:
async "^2.1.2"
async-eventemitter "^0.2.2"
ethereumjs-account "^2.0.3"
ethereumjs-block "~2.1.0"
ethereumjs-common "^0.6.0"
ethereumjs-util "^6.0.0"
fake-merkle-patricia-tree "^1.0.1"
functional-red-black-tree "^1.0.1"
merkle-patricia-tree "^2.1.2"
rustbn.js "~0.2.0"
safe-buffer "^5.1.1"
ethereumjs-wallet@0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-0.6.0.tgz#82763b1697ee7a796be7155da9dfb49b2f98cfdb"
@ -10122,7 +10155,7 @@ nan@2.10.0:
resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f"
integrity sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==
nan@^2.0.8, nan@^2.10.0, nan@^2.11.0, nan@^2.2.1, nan@^2.3.3, nan@^2.9.2:
nan@^2.0.8, nan@^2.10.0, nan@^2.2.1, nan@^2.3.3, nan@^2.9.2:
version "2.11.1"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766"
integrity sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==
@ -14467,7 +14500,7 @@ typechecker@~2.0.1:
resolved "https://registry.yarnpkg.com/typechecker/-/typechecker-2.0.8.tgz#e83da84bb64c584ccb345838576c40b0337db82e"
integrity sha1-6D2oS7ZMWEzLNFg4V2xAsDN9uC4=
typedarray-to-buffer@^3.1.2, typedarray-to-buffer@^3.1.5:
typedarray-to-buffer@^3.1.2:
version "3.1.5"
resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080"
integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==
@ -15782,16 +15815,6 @@ websocket-extensions@>=0.1.1:
resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29"
integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==
websocket@1.0.28:
version "1.0.28"
resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.28.tgz#9e5f6fdc8a3fe01d4422647ef93abdd8d45a78d3"
integrity sha512-00y/20/80P7H4bCYkzuuvvfDvh+dgtXi5kzDf3UcZwN6boTYaKvsrtZ5lIYm1Gsg48siMErd9M4zjSYfYFHTrA==
dependencies:
debug "^2.2.0"
nan "^2.11.0"
typedarray-to-buffer "^3.1.5"
yaeti "^0.0.6"
"websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible":
version "1.0.26"
resolved "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2"