From 66c9583d120741927b5a7f7eedf0de0d6d3f27a2 Mon Sep 17 00:00:00 2001 From: Valery Ozarnichuk Date: Wed, 4 Sep 2019 17:25:59 +0300 Subject: [PATCH 1/2] Make possible to set component style file As desribed on https://derbyjs.com/docs/derby-0.10/components/structure Controller.prototype.style = 'path/to/style' --- lib/App.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/App.js b/lib/App.js index fc9580d36..2570b0194 100644 --- a/lib/App.js +++ b/lib/App.js @@ -200,6 +200,11 @@ App.prototype.component = function(viewName, constructor) { throw new Error('No view name specified for component'); } } + + // Load style for component + if (constructor.prototype.style) { + this.loadStyles(constructor.prototype.style); + } // Associate the appropriate view with the component type var view = this.views.find(viewName); From 5ab75d31836780f05e89f1988cf0c6c8ea1b5d89 Mon Sep 17 00:00:00 2001 From: Valery Ozarnichuk Date: Thu, 23 Jan 2020 03:09:13 +0300 Subject: [PATCH 2/2] Fix Invalid or unknown message notifications --- lib/AppForServer.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/AppForServer.js b/lib/AppForServer.js index 7d5211c35..0156569e5 100644 --- a/lib/AppForServer.js +++ b/lib/AppForServer.js @@ -342,8 +342,17 @@ AppForServer.prototype._updateScriptViews = function() { AppForServer.prototype._autoRefresh = function(backend) { var agents = this.agents = {}; var app = this; - + backend.use('receive', function(request, next) { + if (request.data.derby) { + return backend.trigger('derby_debug', request.agent, {data:request.data}, function(err) { + // All apps triggered derby_debug + }); + } + next(); + }); + + backend.use('derby_debug', function(request, next) { var data = request.data; if (data.derby) { app._handleMessage(request.agent, data.derby, data);