[uibuilder] The next step - 3rd-party comms with a uibuilder front-end

Another round of changes pushed to the GitHub vNext branch today.

  • A couple of annoying bugs got squashed.

  • Package Management is now almost completely rewritten - still some work to do to allow you to install local packages though. But installing from npmjs and from GitHub both work and you can add tag/version/branch specifiers as well. Useful if you want a specific version or branch.

    As mentioned, uibuilder packages are no longer merged into the Node-RED userDir folder but instead are now in the uibRoot folder (defaults to ~/.node-red/uibuilder for most people). This means that you will need to remove the packages from your userDir and re-add them in the correct folder. Using uibuilder itself is the easiest way to add them back in but the changes also mean that you can install them yourself, when you restart node-red, uibuilder will work everything out as long as the package.json file in uibRoot was updated with the installed packages (the default for npm).

  • The Editor panel has been extensively rewritten as well.

    Some areas of the panel are inaccessible until you have deployed a new instance - which creates the server folders required. Should save confusion, especially if you haven't used uibuilder before.

    New error information is available when you are setting/changing the URL.

    The extra information about installed packages is now included on the Libraries tab. Including the installed version and an estimate of the correct URL to use in your front-end code. There is also a link to the packages homepage (if specified in its package.json file), you can click on the package name. If not known, an npmjs.com search is performed.

    And of course, everything in the panel is laid out much better than before.

  • Behind the scenes, the ExpressJS route handling has been extensively reworked and now uses Express's Router capabilities. This greatly simplifies how routes are created and removed. Especially when instances of uibuilder have their URL changed or when an instance is removed from the flows.

Still left to do is simplifying and tidying up the security feature - I fear it won't have all the features I'd hoped for in this release. Also I want to include @shrickus's idea to allow a custom middleware to be added to an instance so that API's can be added.

A couple of other bugs to squash too.

The changelog file in the branch has details of the changes and a long todo list (not all of which will make it into this release) :slight_smile:

Please do try it out if you have a chance and let me know of any bugs, issues or wishes.

1 Like