diff --git a/packages/xarc-app-dev/lib/dev-admin/admin-server.js b/packages/xarc-app-dev/lib/dev-admin/admin-server.js index e5291f95d..3c393ae37 100644 --- a/packages/xarc-app-dev/lib/dev-admin/admin-server.js +++ b/packages/xarc-app-dev/lib/dev-admin/admin-server.js @@ -31,8 +31,6 @@ const DEV_ADMIN_STATUS = "DevAdminStatus"; const WDS_PROGRESS = "WDSProgress"; const LOG_ALERT = "LogAlert"; -const PROMPT_SPINNER = ">>>>>>>> "; - const SERVER_ENVS = { [APP_SERVER_NAME]: { XARC_BABEL_TARGET: "node" @@ -68,8 +66,7 @@ class AdminServer { this._io.setup(); this._io.addItem({ name: DEV_ADMIN_STATUS, - display: ck`[DEV ADMIN]`, - spinner: PROMPT_SPINNER + display: ck`[DEV ADMIN]` }); this.updateStatus("webpack is PENDING"); this.handleUserInput(); @@ -134,8 +131,7 @@ ${proxyItem}M - Show this menu Q - Shutdown } getServer(name) { - if (this._servers[name]) return this._servers[name]; - return {}; + return this._servers[name] || {}; } handleServerExit(name) { @@ -330,7 +326,11 @@ ${proxyItem}M - Show this menu Q - Shutdown } if (line.startsWith(progSig)) { progLine = line.substring(progSig.length).replace(cwdRegex, "."); - this._io.addItem({ name: WDS_PROGRESS, spinner: true, display: `Webpack Progress` }); + this._io.addItem({ + name: WDS_PROGRESS, + spinner: true, + display: `Webpack Progress` + }); this._io.updateItem(WDS_PROGRESS, progLine); const match = progLine.match(/\d{1,3}%/); if (match) { @@ -389,9 +389,8 @@ ${proxyItem}M - Show this menu Q - Shutdown toggleFullLogUrlMessage(serverName) { const server = this.getServer(serverName); - if (server && server.options.logSaver) { - const { options } = server; - const { logSaver } = options; + if (server.options) { + const { logSaver } = server.options; logSaver._toggle = !logSaver._toggle; if (!logSaver._toggle) { this._io.removeItem(LOG_ALERT); @@ -405,7 +404,7 @@ ${proxyItem}M - Show this menu Q - Shutdown this._io.addItem({ name: LOG_ALERT, display: ck`[ALERT]`, - spinner: PROMPT_SPINNER + spinner: false }); const instruction = `View full logs at: ${url} - \ Press Z to hide or show this message`; diff --git a/packages/xarc-app-dev/package.json b/packages/xarc-app-dev/package.json index 78d6f5067..c73013f2c 100644 --- a/packages/xarc-app-dev/package.json +++ b/packages/xarc-app-dev/package.json @@ -79,7 +79,7 @@ "style-loader": "^0.20.1", "subapp-util": "^1.0.5", "sudo-prompt": "^8.2.5", - "visual-logger": "^1.1.0", + "visual-logger": "^1.1.2", "webpack-cli": "^3.3.9", "webpack-dev-middleware": "^3.4.0", "webpack-hot-middleware": "^2.22.2",