Well, finally it is here! Lots more fixes and code improvements so that we can keep the improvements coming.
A major release though because I'm afraid that there are a couple of potentially breaking changes.
The most important being that node.js v12 is now the minimum supported version. This is due to changes in upstream libraries.
The second most important is that I am now assuming that everyone is using a "modern" browser. That is one that supports ES6 (ECMA2015). Both the Editor code and the uibuilderfe make this assumption. As I've previously said, if this causes you an issue, please reach out and we can do something about it.
The other two big changes are:
New instances of uibuilder nodes will only be given the "blank" template which uses no front-end frameworks.
You can load a different template using the "Template Settings" in the Editor.
Loading a new template WILL overwrite any files with the same name. A warning is given though so even if you press the button, you can still back out.
You can choose from the following internal templates:
- VueJS & bootstrap-vue - The previous default template.
- Simple VueJS - A minimal VueJS example.
- Blank - The new default.
- External - See below.
NOTE: When using an external template, no check is currently done on dependencies, you must install these yourself. I will try to add this feature in the future.
You can now set uibuilder's root folder - that stores configuration, common, security and each node's front-end code - to a different location.
The default location is in your userDir folder in a sub-folder called
uibuilder. If you are using projects, the sub-folder will be in your projects root folder. This setting will change that.
See docs/changing-uibroot for more detail.
And the rest of the changes:
Update fs-extra to v10. No longer supports node.js v10, requires v12+.
Make some class methods private in web.js and socket.js. Requires node.js v12 as a minimum as it uses an ECMA2018 feature.
web.setup and socket.setup can only be called once.
Socket.IO updated from v2 to v4.
Added Admin API check for whether a url has a matching instance root folder. (Was an outstanding to-do)
Reworked the info block that is printed to the log on startup. Much neater and with added info on the webserver being used.
Technical Docs have been improved in line with some other work I did recently on enterprise standards.
The docsify configuration has been greatly improved with a new theme and some automation for dates and document front-matter.
Added a new page on changing the uibRoot folder.
Updated the front page with links and explanations of the different sections.
In the technical documentation, you can now access and search the main README as well as the current and archive changelogs (v1 & v2) in addition to everything else.
Don't forget that you can access the tech docs on the Internet from GitHub AND locally from within Node-RED.
nodes/web.js- Added web.isConfigured to allow a check to see whether web.setup has been called.
nodes/sockets.js- Added socket.isConfigured to allow a check to see whether socket.setup has been called.
Add a new icon to the main readme that allows editing of uibuilder code using VSCode either via a remote repository or via a Docker container.
- Node-RED edge-case for credentials was causing node to be marked as changed whenever "Done" button pressed even if no changes made. Turns out to be an issue if you don't give a password-type credential an actual value (e.g. leave it blank). Gave the
JWTsecreta default value even when it isn't really needed.
- Instance details page - CSS now loads correctly even if using a customer server port. Some Socket.IO details that were missing now returned.
- web.js - specifying a custom server port caused uibuilder to crash. Now fixed.
- Lots of tidying up of log messages, especially TRACE level.
- Accidentally include a node.js v14+ issue, now removed.
- Additional try/catch blocks to force better reporting if there is an error in the uibuilder module files.