Skip to content

Commit 3275478

Browse files
Bug fix
1 parent 873de80 commit 3275478

21 files changed

+49
-29
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
typora-root-url: docs/images
33
created: 2017-04-18 16:53:00
4-
updated: 2024-09-01 16:52:21
4+
updated: 2024-09-02 17:52:21
55
---
66

77
# Changelog
@@ -28,10 +28,14 @@ The following are only used for _**developing**_ UIBUILDER:
2828

2929
------------
3030

31-
## [Unreleased](https://github.com/TotallyInformation/node-red-contrib-uibuilder/compare/v7.0.2...main)
31+
## [Unreleased](https://github.com/TotallyInformation/node-red-contrib-uibuilder/compare/v7.0.3...main)
3232

3333
Nothing currently.
3434

35+
## [v7.0.3](https://github.com/TotallyInformation/node-red-contrib-uibuilder/compare/v7.0.3...v7.0.2)
36+
37+
Bug fix only. Issue for new UIBUILDER installations that would get the error `[node-red-contrib-uibuilder/uibuilder] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Array (line:393)`.
38+
3539
## [v7.0.2](https://github.com/TotallyInformation/node-red-contrib-uibuilder/compare/v7.0.2...v7.0.1)
3640

3741
Bug fix only. Minor issue in `nodes/libs/uiblib.js` regarding the new `nanoId` client id creator.

docs/dev/release-steps.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ Make sure version numbers are correct and aligned:
2121

2222
* package.json
2323
* gulpfile.js
24+
25+
Make sure that `gulp watch` is running for these:
26+
2427
* src\front-end-module\ui.js
2528
* src\front-end-module\uibuilder.module.js
2629

@@ -32,6 +35,7 @@ Make sure version numbers are correct and aligned:
3235

3336
## 04) Do a final commit & push to the dev branch
3437

38+
* Commit and push
3539
* Check DeepScan and Snyk results and resolve any issues.
3640

3741
## 05) Merge GitHub dev branch to main

front-end/ui.esm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var require_ui = __commonJS({
1919
*/
2020
constructor(win, extLog, jsonHighlight) {
2121
//#region --- Class variables ---
22-
__publicField(this, "version", "7.0.2-src");
22+
__publicField(this, "version", "7.0.3-src");
2323
// List of tags and attributes not in sanitise defaults but allowed in uibuilder.
2424
__publicField(this, "sanitiseExtraTags", ["uib-var"]);
2525
__publicField(this, "sanitiseExtraAttribs", ["variable", "report", "undefined"]);

front-end/ui.esm.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

front-end/ui.esm.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

front-end/ui.iife.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
constructor(win, extLog, jsonHighlight) {
2222
//#region --- Class variables ---
23-
__publicField(this, "version", "7.0.2-src");
23+
__publicField(this, "version", "7.0.3-src");
2424
// List of tags and attributes not in sanitise defaults but allowed in uibuilder.
2525
__publicField(this, "sanitiseExtraTags", ["uib-var"]);
2626
__publicField(this, "sanitiseExtraAttribs", ["variable", "report", "undefined"]);

front-end/ui.iife.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

front-end/ui.iife.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

front-end/uibuilder.esm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ var require_ui = __commonJS({
5858
*/
5959
constructor(win, extLog, jsonHighlight) {
6060
//#region --- Class variables ---
61-
__publicField(this, "version", "7.0.2-src");
61+
__publicField(this, "version", "7.0.3-src");
6262
// List of tags and attributes not in sanitise defaults but allowed in uibuilder.
6363
__publicField(this, "sanitiseExtraTags", ["uib-var"]);
6464
__publicField(this, "sanitiseExtraAttribs", ["variable", "report", "undefined"]);
@@ -5057,7 +5057,7 @@ __publicField(_ApplyTemplate, "props", ["template-id", "once"]);
50575057
var ApplyTemplate = _ApplyTemplate;
50585058

50595059
// src/front-end-module/uibuilder.module.js
5060-
var version = "7.0.2-esm";
5060+
var version = "7.0.3-esm";
50615061
var isMinified = !/param/.test(function(param) {
50625062
});
50635063
function log() {

front-end/uibuilder.esm.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

front-end/uibuilder.esm.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

front-end/uibuilder.iife.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
*/
6060
constructor(win, extLog, jsonHighlight) {
6161
//#region --- Class variables ---
62-
__publicField(this, "version", "7.0.2-src");
62+
__publicField(this, "version", "7.0.3-src");
6363
// List of tags and attributes not in sanitise defaults but allowed in uibuilder.
6464
__publicField(this, "sanitiseExtraTags", ["uib-var"]);
6565
__publicField(this, "sanitiseExtraAttribs", ["variable", "report", "undefined"]);
@@ -5059,7 +5059,7 @@
50595059

50605060
// src/front-end-module/uibuilder.module.js
50615061
var import_meta = {};
5062-
var version = "7.0.2-iife";
5062+
var version = "7.0.3-iife";
50635063
var isMinified = !/param/.test(function(param) {
50645064
});
50655065
function log() {

front-end/uibuilder.iife.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

front-end/uibuilder.iife.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const stdio = 'inherit'
7070
// @ts-ignore Find the module version in the package.json
7171
const { version } = JSON.parse(fs.readFileSync('package.json'))
7272
// Desired release version
73-
const release = '7.0.2'
73+
const release = '7.0.3'
7474
// Wanted node.js version - used for ESBUILD
7575
const nodeVersion = 'node18.12'
7676

nodes/libs/fs.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ const fg = require('fast-glob')
4444
// ! TODO: Move other file-handling functions into this class
4545
// ! In readiness for move to mono-repo (need node.js v16+ as a base)
4646

47+
let log
48+
4749
class UibFs {
4850
//#region --- Class vars ---
4951
/** PRIVATE Flag to indicate whether setup() has been run (ignore the false eslint error)
@@ -87,7 +89,9 @@ class UibFs {
8789

8890
this.RED = uib.RED
8991
this.uib = uib
90-
this.log = uib.RED.log
92+
this.log = log = uib.RED.log
93+
94+
this.log.trace('[uibuilder:fs.js:setup] Setup completed', this.uib)
9195
} // ---- End of setup ---- //
9296

9397
/** returns true if the filename contains / or \ else false
@@ -551,15 +555,14 @@ class UibFs {
551555
preserveTimestamps: true,
552556
}
553557
}
554-
// @ts-ignore
555-
if (Array.isArray(src)) src = join(src)
556-
// @ts-ignore
557-
if (Array.isArray(dest)) dest = join(dest)
558-
559558
try {
559+
// @ts-ignore
560+
if (Array.isArray(src)) src = join(...src)
561+
// ts-ignore
562+
if (Array.isArray(dest)) dest = join(...dest)
560563
cpSync(src, dest, opts)
561564
} catch (e) {
562-
this.log.error(`Could not copy '${src}' to '${dest}'. ${e.message}`, e)
565+
log.error(`Could not copy '${src}' to '${dest}'. ${e.message}`, e)
563566
return false
564567
}
565568
return true

nodes/libs/package-mgt.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,16 @@ class UibPackages {
166166
* @returns {boolean} True if successful
167167
*/
168168
createBasicPj() {
169-
return copySync('../../templates/uibroot-package.json', [this.uib.rootFolder, 'package.json'])
169+
if (!this.log) console.error('[uibuilder:package-mgt:createBasicPj] this.log not defined!')
170+
try {
171+
const pj = copySync([__dirname, '..', '..', 'templates', 'uibroot-package.json'], [this.uib.rootFolder, 'package.json'])
172+
this.log.trace(`[uibuilder:package-mgt:createBasicPj] Basic package.json created in "${this.uib.rootFolder}"`)
173+
return pj
174+
} catch (e) {
175+
this.log.error(`[uibuilder:package-mgt:createBasicPj] Basic package.json creation FAILED in "${this.uib.rootFolder}". ${e.message}`, e)
176+
console.trace()
177+
return null
178+
}
170179
}
171180

172181
/** Use npm to check packages installed to uibRoot

nodes/libs/ui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const Ui = class Ui2 {
22
//#region --- Class variables ---
3-
version = "7.0.2-node";
3+
version = "7.0.3-node";
44
// List of tags and attributes not in sanitise defaults but allowed in uibuilder.
55
sanitiseExtraTags = ["uib-var"];
66
sanitiseExtraAttribs = ["variable", "report", "undefined"];

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-red-contrib-uibuilder",
3-
"version": "7.0.2",
3+
"version": "7.0.3",
44
"description": "Easily create data-driven web UI's for Node-RED using any (or no) front-end library.",
55
"scripts": {
66
"preinstall": "node ./bin/uibpreinstalljs",

src/front-end-module/ui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
const Ui = class Ui {
3434
//#region --- Class variables ---
35-
version = '7.0.2-src'
35+
version = '7.0.3-src'
3636

3737
// List of tags and attributes not in sanitise defaults but allowed in uibuilder.
3838
sanitiseExtraTags = ['uib-var']

src/front-end-module/uibuilder.module.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import UibVar from '../components/uib-var'
3636
import UibMeta from '../components/uib-meta'
3737
import ApplyTemplate from '../components/apply-template'
3838

39-
const version = '7.0.2-src'
39+
const version = '7.0.3-src'
4040

4141
// TODO Add option to allow log events to be sent back to Node-RED as uib ctrl msgs
4242
//#region --- Module-level utility functions --- //

0 commit comments

Comments
 (0)