Uibuilder v1.2.0 published - bug fix and feature release

#1

Hi all,

I'm pleased to announce that v1.2.0 of node-red-contrib-uibuilder has been released. Please update as soon as possible as this fixes a hidden bug.

If you want to see what is coming next, please see Issue #46 on GitHub.

In case you don't know, uibuilder is designed to be an easy way to develop custom user interfaces integrated to Node-RED. Is a Node-RED Dashboard UI too restrictive or too slow, or maybe you just want to use a different front-end framework? uibuilder is there to help. What's the catch? Well, uibuilder doesn't hold your hand, you will need to know at least a little html and JavaScript. Check out the uibuilder WIKI though for some examples that will help you get going.

Changelog

  • CHANGED url property is now validated. It is required, it cannot be more than 20 characters long. It cannot be 'templates' (in preparation for a v2 improved template handling feature).

  • CHANGED The admin API's <adminurl>/uibfiles, <adminurl>/uibgetfile, <adminurl>/uibputfile and <adminurl>/uibindex now have parameter validation.

  • CHANGED Code for file/folder locations, e.g. <userDir>/uibuilder improved. Made to use a single variable. In preparation for better support of projects (probably in v2 as that may be a breaking change).

  • CHANGED Code comments improved, more use of JSDoc.

  • CHANGED Default file name to be edited is changed to index.html rather than index.js as it is more likely to exist.

  • CHANGED Improved the uibindex admin API, added additional details. Use the type parameter set to 'json' or 'urls' (lists the urls in use by all of the instances of uibuilder, used by the admin interface to ensure unique urls). The default is to return a web page containing details. Admin ui help text also updated to include the admin API's.

  • CHANGED Master template folder - files moved to sub-folder to allow for multiple master templates (e.g. VueJS as well as jQuery). In readiness for future changes.

  • CHANGED General utility functions moved to a separate library, tilib.

  • CHANGED New tilib function added getNpmRunScripts. Given a path, returns a list of available scripts from the package.json file in that path - or undefined if the file doesn't exist. If the optional 2nd parameter is supplied, looks for a matching script name and returns the script text - or null if the script isn't there. In preparation for adding npm processing (install, build, etc.).

  • CHANGED Paramterised Master Template Folder. Preparation for more flexible template processing.

  • FIXED ExpressJS app.use paths were not being removed on close processing.

Current Version Limitations

  • There are currently no checks to prevent you losing changes to edits if you close the admin window without saving the file.

  • If you create sub-folders in your src folder, you will not be able to edit the files there. Keep everything in the src folder for now. Let me know if this is limiting for you.

0 Likes

#2

Sorry, I broke file save. v1.2.1 now published, saving should work again.

0 Likes