Merge branch 'dev' into @feature/issue-5029

This commit is contained in:
Debadutta Panda
2025-06-07 10:47:20 +05:30
committed by GitHub
59 changed files with 2075 additions and 574 deletions

View File

@@ -3,7 +3,7 @@
<div class="form-tips">
<span data-i18n="[html]unknown.tip"></span>
<p id="unknown-module-known">
<button id="unknown-manage-dependencies" class="red-ui-button">Manage dependencies</button>
<button id="unknown-manage-dependencies" class="red-ui-button"><span data-i18n="unknown.manageModules"></span></button>
</p>
</div>
</div>

View File

@@ -162,6 +162,8 @@ module.exports = function(RED) {
console:console,
util:util,
Buffer:Buffer,
URL: URL,
URLSearchParams: URLSearchParams,
Date: Date,
RED: {
util: {
@@ -403,6 +405,8 @@ module.exports = function(RED) {
if(node.timeout>0){
finOpt.timeout = node.timeout;
finOpt.breakOnSigint = true;
} else if (RED.settings.globalFunctionTimeout > 0){
finOpt.timeout = RED.settings.globalFunctionTimeout * 1000
}
}
var promise = Promise.resolve();
@@ -419,8 +423,14 @@ module.exports = function(RED) {
var opts = {};
if (node.timeout>0){
opts = node.timeoutOptions;
} else if (RED.settings. globalFunctionTimeout > 0){
opts.timeout = RED.settings. globalFunctionTimeout * 1000
}
try {
node.script.runInContext(context,opts);
} catch (err) {
return done(err);
}
node.script.runInContext(context,opts);
context.results.then(function(results) {
sendResults(node,send,msg._msgid,results,false);
if (handleNodeDoneCall) {

View File

@@ -109,7 +109,7 @@ module.exports = function(RED) {
child.stderr.on('data', function (data) {
if (node.activeProcesses.hasOwnProperty(child.pid) && node.activeProcesses[child.pid] !== null) {
if (isUtf8(data)) { msg.payload = data.toString(); }
else { msg.payload = Buffer.from(data); }
else { msg.payload = data; }
nodeSend([null,RED.util.cloneMessage(msg),null]);
}
});
@@ -146,7 +146,8 @@ module.exports = function(RED) {
delete msg.payload;
if (stderr) {
msg2 = RED.util.cloneMessage(msg);
msg2.payload = stderr;
msg2.payload = Buffer.from(stderr,"binary");
if (isUtf8(msg2.payload)) { msg2.payload = msg2.payload.toString(); }
}
msg.payload = Buffer.from(stdout,"binary");
if (isUtf8(msg.payload)) { msg.payload = msg.payload.toString(); }

View File

@@ -29,7 +29,7 @@
<div class="form-row">
<label for="node-input-url"><i class="fa fa-globe"></i> <span data-i18n="httpin.label.url"></span></label>
<input id="node-input-url" type="text" placeholder="http://">
<input id="node-input-url" type="text" placeholder="https://">
</div>
<div class="form-row node-input-paytoqs-row">

View File

@@ -586,6 +586,17 @@ in your Node-RED user directory (${RED.settings.userDir}).
opts.https.certificate = opts.https.cert;
delete opts.https.cert;
}
// The got library uses a different case for some https properties compared to the
// standard node tls options object.
if (opts.https.ALPNProtocols) {
opts.https.alpnProtocols = opts.https.ALPNProtocols
delete opts.https.ALPNProtocols
}
// The got library doesn't support servername at this time
// https://github.com/sindresorhus/got/issues/2320
if (opts.https.servername) {
delete opts.https.servername
}
} else {
if (msg.hasOwnProperty('rejectUnauthorized')) {
opts.https = { rejectUnauthorized: msg.rejectUnauthorized };

View File

@@ -21,8 +21,8 @@
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
</div>
<div class="form-row">
<label for="node-input-property"><i class="fa fa-forward"></i> <span data-i18n="split.splitThe"></span></label>
<input type="text" id="node-input-property" style="width:70%;">
<label for="node-input-property" style="padding-left:10px; margin-right:-10px;" data-i18n="split.splitThe"></label>
<input type="text" id="node-input-property" style="width:70%;"/>
</div>
<div class="form-row"><span data-i18n="[html]split.strBuff"></span></div>
<div class="form-row">

View File

@@ -151,10 +151,11 @@ module.exports = function(RED) {
if (node.arraySplt === 1) {
m = m[0];
}
RED.util.setMessageProperty(msg,node.property,m);
msg.parts.index = i;
const newmsg = RED.util.cloneMessage(msg)
RED.util.setMessageProperty(newmsg,node.property,m);
newmsg.parts.index = i;
pos += node.arraySplt;
send(RED.util.cloneMessage(msg));
send(newmsg);
}
done();
}

View File

@@ -406,6 +406,7 @@
"label": {
"unknown": "unknown"
},
"manageModules": "Manage modules",
"tip": "<p>This node is a type unknown to your installation of Node-RED.</p><p><i>If you deploy with the node in this state, it's configuration will be preserved, but the flow will not start until the missing type is installed.</i></p><p>See the Info side bar for more help</p>"
},
"mqtt": {
@@ -1018,7 +1019,7 @@
"objectSend": "Send a message for each key/value pair",
"strBuff": "<b>String</b> / <b>Buffer</b>",
"array": "<b>Array</b>",
"splitThe": "Split the",
"splitThe": "Split property",
"splitUsing": "Split using",
"splitLength": "Fixed length of",
"stream": "Handle as a stream of messages",

View File

@@ -36,7 +36,7 @@
"js-yaml": "4.1.0",
"media-typer": "1.1.0",
"mqtt": "5.11.0",
"multer": "1.4.5-lts.2",
"multer": "2.0.1",
"mustache": "4.2.0",
"node-watch": "0.7.4",
"on-headers": "1.0.2",