node-red 4.0.0-beta.2 → 4.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/lib/red.js +3 -5
- package/package.json +6 -6
- package/red.js +25 -30
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
#### 4.0.0-beta.3: Beta Release
|
|
2
|
+
|
|
3
|
+
Editor
|
|
4
|
+
|
|
5
|
+
- Improve background-deploy notification handling (#4692) @knolleary
|
|
6
|
+
- Hide workspace tab on middle mouse click (#4657) @Steve-Mcl
|
|
7
|
+
- multiplayer: Add user presence indicators (#4666) @knolleary
|
|
8
|
+
- Enable updating dependency node of package.json in project feature (#4676) @kazuhitoyokoi
|
|
9
|
+
- Add French translations for 4.0.0-beta.2 (#4681) @GogoVega
|
|
10
|
+
- Add Japanese translations for 4.0.0-beta.2 (#4674) @kazuhitoyokoi
|
|
11
|
+
- Fix saving of conf-type properties in module packaged subflows (#4658) @knolleary
|
|
12
|
+
- Add npm install timeout notification (#4662) @hardillb
|
|
13
|
+
- Fix undo of subflow env property edits (#4667) @knolleary
|
|
14
|
+
- Fix three error typos in monaco.js (#4660) @JoshuaCWebDeveloper
|
|
15
|
+
- docs: Add closing paragraph tag (#4664) @ZJvandeWeg
|
|
16
|
+
- Avoid login loops when autoLogin enabled but login fails (#4684) @knolleary
|
|
17
|
+
|
|
18
|
+
Runtime
|
|
19
|
+
|
|
20
|
+
- Allow blank strings to be used for env var property substitutions (#4672) @knolleary
|
|
21
|
+
- Use rfdc for cloning pure JSON values (#4679) @knolleary
|
|
22
|
+
- fix: remove outdated Node 11+ check (#4314) @Rotzbua
|
|
23
|
+
- feat(ci): add new nodejs v22 (#4694) @Rotzbua
|
|
24
|
+
- fix(node): increase required node >=18.5 (#4690) @Rotzbua
|
|
25
|
+
- fix(dns): remove outdated node check (#4689) @Rotzbua
|
|
26
|
+
- fix(polyfill): remove import module polyfill (#4688) @Rotzbua
|
|
27
|
+
- Fix typo (#4686) @Rotzbua
|
|
28
|
+
|
|
29
|
+
Nodes
|
|
30
|
+
|
|
31
|
+
- Pass full error object in Function node and copy over cause property (#4685) @knolleary
|
|
32
|
+
- Replacing vm.createScript in favour of vm.Script (#4534) @patlux
|
|
33
|
+
|
|
1
34
|
#### 4.0.0-beta.2: Beta Release
|
|
2
35
|
|
|
3
36
|
Editor
|
|
@@ -50,6 +83,13 @@ Nodes
|
|
|
50
83
|
- Let debug node status msg length be settable via settings (#4402) @dceejay
|
|
51
84
|
- Feat: Add ability to set headers for WebSocket client (#4436) @marcus-j-davies
|
|
52
85
|
|
|
86
|
+
#### 3.1.9: Maintenance Release
|
|
87
|
+
|
|
88
|
+
- Prevent subflow being added to itself (#4654) @knolleary
|
|
89
|
+
- Fix use of spawn on windows with cmd files (#4652) @knolleary
|
|
90
|
+
- Guard refresh of unknown subflow (#4640) @knolleary
|
|
91
|
+
- Fix subflow module sending messages to debug sidebar (#4642) @knolleary
|
|
92
|
+
|
|
53
93
|
#### 3.1.8: Maintenance Release
|
|
54
94
|
|
|
55
95
|
- Add validation and error handling on subflow instance properties (#4632) @knolleary
|
package/lib/red.js
CHANGED
|
@@ -25,11 +25,9 @@ var api = require("@node-red/editor-api");
|
|
|
25
25
|
var server = null;
|
|
26
26
|
var apiEnabled = false;
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
dns.setDefaultResultOrder('ipv4first');
|
|
32
|
-
}
|
|
28
|
+
// Ensure ipv4 results are returned first: https://github.com/node-red/node-red/issues/4010
|
|
29
|
+
const dns = require('dns');
|
|
30
|
+
dns.setDefaultResultOrder('ipv4first');
|
|
33
31
|
|
|
34
32
|
function checkVersion(userSettings) {
|
|
35
33
|
var semver = require('semver');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.3",
|
|
4
4
|
"description": "Low-code programming for event-driven applications",
|
|
5
5
|
"homepage": "https://nodered.org",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"flow"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@node-red/editor-api": "4.0.0-beta.
|
|
35
|
-
"@node-red/runtime": "4.0.0-beta.
|
|
36
|
-
"@node-red/util": "4.0.0-beta.
|
|
37
|
-
"@node-red/nodes": "4.0.0-beta.
|
|
34
|
+
"@node-red/editor-api": "4.0.0-beta.3",
|
|
35
|
+
"@node-red/runtime": "4.0.0-beta.3",
|
|
36
|
+
"@node-red/util": "4.0.0-beta.3",
|
|
37
|
+
"@node-red/nodes": "4.0.0-beta.3",
|
|
38
38
|
"basic-auth": "2.0.1",
|
|
39
39
|
"bcryptjs": "2.4.3",
|
|
40
40
|
"express": "4.19.2",
|
|
@@ -47,6 +47,6 @@
|
|
|
47
47
|
"bcrypt": "5.1.0"
|
|
48
48
|
},
|
|
49
49
|
"engines": {
|
|
50
|
-
"node": ">=18"
|
|
50
|
+
"node": ">=18.5"
|
|
51
51
|
}
|
|
52
52
|
}
|
package/red.js
CHANGED
|
@@ -240,39 +240,34 @@ httpsPromise.then(function(startupHttps) {
|
|
|
240
240
|
// Max value based on (2^31-1)ms - the max that setInterval can accept
|
|
241
241
|
httpsRefreshInterval = 596;
|
|
242
242
|
}
|
|
243
|
-
// Check whether
|
|
244
|
-
if (
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
server.setSecureContext(refreshedHttps);
|
|
261
|
-
RED.log.info(RED.log._("server.https.settings-refreshed"));
|
|
262
|
-
}
|
|
243
|
+
// Check whether `http` is a callable function
|
|
244
|
+
if (typeof settings.https === "function") {
|
|
245
|
+
delayedLogItems.push({type:"info", id:"server.https.refresh-interval", params:{interval:httpsRefreshInterval}});
|
|
246
|
+
setInterval(function () {
|
|
247
|
+
try {
|
|
248
|
+
// Get the result of the function, because createServer doesn't accept functions as input
|
|
249
|
+
Promise.resolve(settings.https()).then(function(refreshedHttps) {
|
|
250
|
+
if (refreshedHttps) {
|
|
251
|
+
// The key/cert needs to be updated in the NodeJs http(s) server, when no key/cert is yet available or when the key/cert has changed.
|
|
252
|
+
// Note that the refreshed key/cert can be supplied as a string or a buffer.
|
|
253
|
+
var updateKey = (server.key == undefined || (Buffer.isBuffer(server.key) && !server.key.equals(refreshedHttps.key)) || (typeof server.key == "string" && server.key != refreshedHttps.key));
|
|
254
|
+
var updateCert = (server.cert == undefined || (Buffer.isBuffer(server.cert) && !server.cert.equals(refreshedHttps.cert)) || (typeof server.cert == "string" && server.cert != refreshedHttps.cert));
|
|
255
|
+
|
|
256
|
+
// Only update the credentials in the server when key or cert has changed
|
|
257
|
+
if(updateKey || updateCert) {
|
|
258
|
+
server.setSecureContext(refreshedHttps);
|
|
259
|
+
RED.log.info(RED.log._("server.https.settings-refreshed"));
|
|
263
260
|
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
});
|
|
267
|
-
} catch(err) {
|
|
261
|
+
}
|
|
262
|
+
}).catch(function(err) {
|
|
268
263
|
RED.log.error(RED.log._("server.https.refresh-failed",{message:err}));
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}
|
|
264
|
+
});
|
|
265
|
+
} catch(err) {
|
|
266
|
+
RED.log.error(RED.log._("server.https.refresh-failed",{message:err}));
|
|
267
|
+
}
|
|
268
|
+
}, httpsRefreshInterval*60*60*1000);
|
|
274
269
|
} else {
|
|
275
|
-
delayedLogItems.push({type:"warn", id:"server.https.
|
|
270
|
+
delayedLogItems.push({type:"warn", id:"server.https.function-required"});
|
|
276
271
|
}
|
|
277
272
|
}
|
|
278
273
|
} else {
|