Features, Bug Fixes and Code Refactoring
New
- Add new pre-defined msg from Node-RED that will cause the front-end client (browser) to reload.
- Add auto-reload flag to file editor - if set, any connected clients will automatically reload when a file is saved. (Only from the file editor in Node-RED for now, later I'll extend this to work if you are editing files using external editors).
- Add new function to uibuilderfe.js -
uibuilder.clearEventListeners()
- Will forcably clear anyonChange
event listeners that have been created. Partial update for Issue #134. - Added initial documentation for front-end build tooling to technical documentation (general info and Snowpack).
Fixed
- Issue #126 - Security not turning on even if TLS is used.
- Update security.js template to remove simple false return if authentication fails - this is no longer valid.
Please note that the security features in uibuilder are still not complete and are not well tested. They also have some debug output. Other items on the backlog are currently taking preference.
Updated
-
Bump dependencies to latest
-
Add collapsible summaries to README.md
-
Various updates to technical documentation
-
Update chkAuth validation function to make it more robust
-
Improve auth process logging and msg._auth.info checks
-
Remove simple true/false return from auth processing as this is no longer valid
-
uibuilderfe
- Added check for
uibuilder.start()
having already been called and prevent it being run more than once. Partial update for Issue #134. - Add new function
uibuilder.clearEventListeners()
- see details in New above. - Added initial code for a simple alert - not yet ready for use.
- Added check for
-
Internal code refactoring
-
Prep for adding the ability for uibuilder to use its own independent ExpressJS server
-
Rename uibuilder.js's
nodeGo()
function tonodeInstance()
for clarity -
Add
dumpReq()
to tilib.js - returns the important bits of an ExpressJS REQ object -
Begin to add Node-RED type definitions
-
Add ExpressJS type definitions
-
Other linting improvements
-
The refactoring has removed several hundred lines of code from the main js file and
simplified quite a few function calls. -
Moved Socket.IO processing to its own Singleton class module.
This means that any Node-RED related module can potentially
require
thesocket.js
module and get
access to the list of Socket.IO namespace's for all uibuilder node instances. All you need is the uibuilder URL name.It also means that any module can send messages to connected front-end clients simply by referencing the module and knowing
the url.Note that this currently only works once the class has been instantiated and a setup method called.
That requires a number of objects to be passed to it. This happens when you have added and deployed a uibuilder
node to your flows.But it does mean that, in theory at least, you could now write another custom node that could make use of the uibuilder communications
channel. Of course, it also opens the way for new nodes to be added to uibuilder. However, a slight caveat to that would be that
loading order would be important and you really must deploy uibuilder before any other node that might want to use the module. -
Started moving ExpressJS web server handling to its own Singleton class module
Again, this will mean that any module running in Node-RED could potentially tie into the module
and be able to access/influence uibuilders web server capability.Works similarly to the Socket.IO class above. So it has to be initialised using a number of properties
from the core uibuilder node.Currently, only the core ExpressJS app and server references are handled by the class. More work
is required to move other processing into it.
-
-
Include PR #131 - add Socket.IO CORS support