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.
urlproperty 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>/uibindexnow have parameter validation.
CHANGED Code for file/folder locations, e.g.
<userDir>/uibuilderimproved. 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.jsas it is more likely to exist.
CHANGED Improved the
uibindexadmin 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,
getNpmRunScripts. Given a path, returns a list of available scripts from the package.json file in that path - or
undefinedif the file doesn't exist. If the optional 2nd parameter is supplied, looks for a matching script name and returns the script text - or
nullif 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
srcfolder, you will not be able to edit the files there. Keep everything in the
srcfolder for now. Let me know if this is limiting for you.