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();
}