mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge branch 'master' into dev
This commit is contained in:
commit
5dbaaae68e
@ -17,9 +17,8 @@ module.exports = {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
opts.lang = apiUtils.determineLangFromHeaders(req.acceptsLanguages());
|
opts.lang = apiUtils.determineLangFromHeaders(req.acceptsLanguages());
|
||||||
if (/[^a-z\-\*]/i.test(opts.lang)) {
|
if (/[^0-9a-z=\-\*]/i.test(opts.lang)) {
|
||||||
res.json({});
|
opts.lang = "en-US";
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
runtimeAPI.plugins.getPluginConfigs(opts).then(function(configs) {
|
runtimeAPI.plugins.getPluginConfigs(opts).then(function(configs) {
|
||||||
res.send(configs);
|
res.send(configs);
|
||||||
@ -32,9 +31,8 @@ module.exports = {
|
|||||||
lang: req.query.lng,
|
lang: req.query.lng,
|
||||||
req: apiUtils.getRequestLogObject(req)
|
req: apiUtils.getRequestLogObject(req)
|
||||||
}
|
}
|
||||||
if (/[^a-z\-\*]/i.test(opts.lang)) {
|
if (/[^0-9a-z=\-\*]/i.test(opts.lang)) {
|
||||||
res.json({});
|
opts.lang = "en-US";
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
runtimeAPI.plugins.getPluginCatalogs(opts).then(function(result) {
|
runtimeAPI.plugins.getPluginCatalogs(opts).then(function(result) {
|
||||||
res.json(result);
|
res.json(result);
|
||||||
|
@ -1260,6 +1260,7 @@ RED.clipboard = (function() {
|
|||||||
hideDropTarget();
|
hideDropTarget();
|
||||||
})
|
})
|
||||||
.on("drop",function(event) {
|
.on("drop",function(event) {
|
||||||
|
try {
|
||||||
if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1) {
|
if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1) {
|
||||||
var data = event.originalEvent.dataTransfer.getData("text/plain");
|
var data = event.originalEvent.dataTransfer.getData("text/plain");
|
||||||
data = data.substring(data.indexOf('['),data.lastIndexOf(']')+1);
|
data = data.substring(data.indexOf('['),data.lastIndexOf(']')+1);
|
||||||
@ -1277,6 +1278,10 @@ RED.clipboard = (function() {
|
|||||||
reader.readAsText(file);
|
reader.readAsText(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch(err) {
|
||||||
|
// Ensure any errors throw above doesn't stop the drop target from
|
||||||
|
// being hidden.
|
||||||
|
}
|
||||||
hideDropTarget();
|
hideDropTarget();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
});
|
});
|
||||||
|
@ -100,7 +100,22 @@ RED.tabs = (function() {
|
|||||||
if (options.scrollable) {
|
if (options.scrollable) {
|
||||||
wrapper.addClass("red-ui-tabs-scrollable");
|
wrapper.addClass("red-ui-tabs-scrollable");
|
||||||
scrollContainer.addClass("red-ui-tabs-scroll-container");
|
scrollContainer.addClass("red-ui-tabs-scroll-container");
|
||||||
scrollContainer.on("scroll",updateScroll);
|
scrollContainer.on("scroll",function(evt) {
|
||||||
|
// Generated by trackpads - not mousewheel
|
||||||
|
updateScroll(evt);
|
||||||
|
});
|
||||||
|
scrollContainer.on("wheel", function(evt) {
|
||||||
|
if (evt.originalEvent.deltaX === 0) {
|
||||||
|
// Prevent the scroll event from firing
|
||||||
|
evt.preventDefault();
|
||||||
|
|
||||||
|
// Assume this is wheel event which might not trigger
|
||||||
|
// the scroll event, so do things manually
|
||||||
|
var sl = scrollContainer.scrollLeft();
|
||||||
|
sl -= evt.originalEvent.deltaY;
|
||||||
|
scrollContainer.scrollLeft(sl);
|
||||||
|
}
|
||||||
|
})
|
||||||
scrollLeft = $('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-left"><a href="#" style="display:none;"><i class="fa fa-caret-left"></i></a></div>').appendTo(wrapper).find("a");
|
scrollLeft = $('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-left"><a href="#" style="display:none;"><i class="fa fa-caret-left"></i></a></div>').appendTo(wrapper).find("a");
|
||||||
scrollLeft.on('mousedown',function(evt) { scrollEventHandler(evt,'-=150') }).on('click',function(evt){ evt.preventDefault();});
|
scrollLeft.on('mousedown',function(evt) { scrollEventHandler(evt,'-=150') }).on('click',function(evt){ evt.preventDefault();});
|
||||||
scrollRight = $('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-right"><a href="#" style="display:none;"><i class="fa fa-caret-right"></i></a></div>').appendTo(wrapper).find("a");
|
scrollRight = $('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-right"><a href="#" style="display:none;"><i class="fa fa-caret-right"></i></a></div>').appendTo(wrapper).find("a");
|
||||||
|
@ -320,12 +320,12 @@ RED.palette = (function() {
|
|||||||
var paletteNode = getPaletteNode(nt);
|
var paletteNode = getPaletteNode(nt);
|
||||||
ui.originalPosition.left = paletteNode.offset().left;
|
ui.originalPosition.left = paletteNode.offset().left;
|
||||||
mouseX = ui.position.left - paletteWidth + (ui.helper.width()/2) + chart.scrollLeft();
|
mouseX = ui.position.left - paletteWidth + (ui.helper.width()/2) + chart.scrollLeft();
|
||||||
mouseY = ui.position.top - paletteTop + (ui.helper.height()/2) + chart.scrollTop();
|
mouseY = ui.position.top - paletteTop + (ui.helper.height()/2) + chart.scrollTop() + 10;
|
||||||
if (!groupTimer) {
|
if (!groupTimer) {
|
||||||
groupTimer = setTimeout(function() {
|
groupTimer = setTimeout(function() {
|
||||||
mouseX /= RED.view.scale();
|
var mx = mouseX / RED.view.scale();
|
||||||
mouseY /= RED.view.scale();
|
var my = mouseY / RED.view.scale();
|
||||||
var group = RED.view.getGroupAtPoint(mouseX,mouseY);
|
var group = RED.view.getGroupAtPoint(mx,my);
|
||||||
if (group !== hoverGroup) {
|
if (group !== hoverGroup) {
|
||||||
if (hoverGroup) {
|
if (hoverGroup) {
|
||||||
document.getElementById("group_select_"+hoverGroup.id).classList.remove("red-ui-flow-group-hovered");
|
document.getElementById("group_select_"+hoverGroup.id).classList.remove("red-ui-flow-group-hovered");
|
||||||
@ -357,23 +357,20 @@ RED.palette = (function() {
|
|||||||
svgRect.width = 1;
|
svgRect.width = 1;
|
||||||
svgRect.height = 1;
|
svgRect.height = 1;
|
||||||
nodes = chartSVG.getIntersectionList(svgRect,chartSVG);
|
nodes = chartSVG.getIntersectionList(svgRect,chartSVG);
|
||||||
mouseX /= RED.view.scale();
|
|
||||||
mouseY /= RED.view.scale();
|
|
||||||
} else {
|
} else {
|
||||||
// Firefox doesn't do getIntersectionList and that
|
// Firefox doesn't do getIntersectionList and that
|
||||||
// makes us sad
|
// makes us sad
|
||||||
mouseX /= RED.view.scale();
|
|
||||||
mouseY /= RED.view.scale();
|
|
||||||
nodes = RED.view.getLinksAtPoint(mouseX,mouseY);
|
nodes = RED.view.getLinksAtPoint(mouseX,mouseY);
|
||||||
}
|
}
|
||||||
|
var mx = mouseX / RED.view.scale();
|
||||||
|
var my = mouseY / RED.view.scale();
|
||||||
for (var i=0;i<nodes.length;i++) {
|
for (var i=0;i<nodes.length;i++) {
|
||||||
var node = d3.select(nodes[i]);
|
var node = d3.select(nodes[i]);
|
||||||
if (node.classed('red-ui-flow-link-background') && !node.classed('red-ui-flow-link-link')) {
|
if (node.classed('red-ui-flow-link-background') && !node.classed('red-ui-flow-link-link')) {
|
||||||
var length = nodes[i].getTotalLength();
|
var length = nodes[i].getTotalLength();
|
||||||
for (var j=0;j<length;j+=10) {
|
for (var j=0;j<length;j+=10) {
|
||||||
var p = nodes[i].getPointAtLength(j);
|
var p = nodes[i].getPointAtLength(j);
|
||||||
var d2 = ((p.x-mouseX)*(p.x-mouseX))+((p.y-mouseY)*(p.y-mouseY));
|
var d2 = ((p.x-mx)*(p.x-mx))+((p.y-my)*(p.y-my));
|
||||||
if (d2 < 200 && d2 < bestDistance) {
|
if (d2 < 200 && d2 < bestDistance) {
|
||||||
bestDistance = d2;
|
bestDistance = d2;
|
||||||
bestLink = nodes[i];
|
bestLink = nodes[i];
|
||||||
|
@ -199,7 +199,7 @@ RED.sidebar = (function() {
|
|||||||
id = RED.settings.get("editor.sidebar.order",["info", "help", "version-control", "debug"])[0]
|
id = RED.settings.get("editor.sidebar.order",["info", "help", "version-control", "debug"])[0]
|
||||||
}
|
}
|
||||||
if (id) {
|
if (id) {
|
||||||
if (!containsTab(id)) {
|
if (!containsTab(id) && knownTabs[id]) {
|
||||||
sidebar_tabs.addTab(knownTabs[id]);
|
sidebar_tabs.addTab(knownTabs[id]);
|
||||||
}
|
}
|
||||||
sidebar_tabs.activateTab(id);
|
sidebar_tabs.activateTab(id);
|
||||||
|
@ -477,7 +477,7 @@ RED.sidebar.info = (function() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while ((m=/(\[(.*?)\])/.exec(tip))) {
|
while ((m=/(\[([a-z]*?)\])/.exec(tip))) {
|
||||||
tip = tip.replace(m[1],RED.keyboard.formatKey(m[2]));
|
tip = tip.replace(m[1],RED.keyboard.formatKey(m[2]));
|
||||||
}
|
}
|
||||||
tipBox.html(tip).fadeIn(200);
|
tipBox.html(tip).fadeIn(200);
|
||||||
|
@ -1476,15 +1476,15 @@ RED.view = (function() {
|
|||||||
var mouseY = node.n.y;
|
var mouseY = node.n.y;
|
||||||
if (outer[0][0].getIntersectionList) {
|
if (outer[0][0].getIntersectionList) {
|
||||||
var svgRect = outer[0][0].createSVGRect();
|
var svgRect = outer[0][0].createSVGRect();
|
||||||
svgRect.x = mouseX;
|
svgRect.x = mouseX*scaleFactor;
|
||||||
svgRect.y = mouseY;
|
svgRect.y = mouseY*scaleFactor;
|
||||||
svgRect.width = 1;
|
svgRect.width = 1;
|
||||||
svgRect.height = 1;
|
svgRect.height = 1;
|
||||||
nodes = outer[0][0].getIntersectionList(svgRect, outer[0][0]);
|
nodes = outer[0][0].getIntersectionList(svgRect, outer[0][0]);
|
||||||
} else {
|
} else {
|
||||||
// Firefox doesn"t do getIntersectionList and that
|
// Firefox doesn"t do getIntersectionList and that
|
||||||
// makes us sad
|
// makes us sad
|
||||||
nodes = RED.view.getLinksAtPoint(mouseX,mouseY);
|
nodes = RED.view.getLinksAtPoint(mouseX*scaleFactor,mouseY*scaleFactor);
|
||||||
}
|
}
|
||||||
for (var i=0;i<nodes.length;i++) {
|
for (var i=0;i<nodes.length;i++) {
|
||||||
if (d3.select(nodes[i]).classed("red-ui-flow-link-background")) {
|
if (d3.select(nodes[i]).classed("red-ui-flow-link-background")) {
|
||||||
@ -3445,6 +3445,7 @@ RED.view = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getGroupAt(x,y) {
|
function getGroupAt(x,y) {
|
||||||
|
// x,y expected to be in node-co-ordinate space
|
||||||
var candidateGroups = {};
|
var candidateGroups = {};
|
||||||
for (var i=0;i<activeGroups.length;i++) {
|
for (var i=0;i<activeGroups.length;i++) {
|
||||||
var g = activeGroups[i];
|
var g = activeGroups[i];
|
||||||
@ -5081,6 +5082,9 @@ RED.view = (function() {
|
|||||||
return scaleFactor;
|
return scaleFactor;
|
||||||
},
|
},
|
||||||
getLinksAtPoint: function(x,y) {
|
getLinksAtPoint: function(x,y) {
|
||||||
|
// x,y must be in SVG co-ordinate space
|
||||||
|
// if they come from a node.x/y, they will need to be scaled using
|
||||||
|
// scaleFactor first.
|
||||||
var result = [];
|
var result = [];
|
||||||
var links = outer.selectAll(".red-ui-flow-link-background")[0];
|
var links = outer.selectAll(".red-ui-flow-link-background")[0];
|
||||||
for (var i=0;i<links.length;i++) {
|
for (var i=0;i<links.length;i++) {
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
.red-ui-notification {
|
.red-ui-notification {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 14px 18px;
|
padding: 8px 18px 0px;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
box-shadow: 0 1px 1px 1px $shadow;
|
box-shadow: 0 1px 1px 1px $shadow;
|
||||||
background-color: $secondary-background;
|
background-color: $secondary-background;
|
||||||
@ -35,6 +35,7 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
.ui-dialog-buttonset {
|
.ui-dialog-buttonset {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.red-ui-notification p:first-child {
|
.red-ui-notification p:first-child {
|
||||||
|
@ -636,7 +636,7 @@
|
|||||||
url: "inject/"+this.id,
|
url: "inject/"+this.id,
|
||||||
type:"POST",
|
type:"POST",
|
||||||
success: function(resp) {
|
success: function(resp) {
|
||||||
RED.notify(node._("inject.success",{label:label}),{type:"success",id:"inject"});
|
RED.notify(node._("inject.success",{label:label}),{type:"success",id:"inject", timeout: 2000});
|
||||||
},
|
},
|
||||||
error: function(jqXHR,textStatus,errorThrown) {
|
error: function(jqXHR,textStatus,errorThrown) {
|
||||||
if (jqXHR.status == 404) {
|
if (jqXHR.status == 404) {
|
||||||
|
@ -129,9 +129,9 @@
|
|||||||
RED.history.push(historyEvent);
|
RED.history.push(historyEvent);
|
||||||
RED.view.redraw();
|
RED.view.redraw();
|
||||||
if (xhr.status == 200) {
|
if (xhr.status == 200) {
|
||||||
RED.notify(node._("debug.notification.activated",{label:label}),"success");
|
RED.notify(node._("debug.notification.activated",{label:label}),{type: "success", timeout: 2000});
|
||||||
} else if (xhr.status == 201) {
|
} else if (xhr.status == 201) {
|
||||||
RED.notify(node._("debug.notification.deactivated",{label:label}),"success");
|
RED.notify(node._("debug.notification.deactivated",{label:label}),{type: "success", timeout: 2000});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"id": "2ebdd51e.c5d17a",
|
"id": "b05816ab.7f2b08",
|
||||||
"type": "comment",
|
"type": "comment",
|
||||||
"z": "4b63452d.672afc",
|
"z": "c6ffdacd.d887e8",
|
||||||
"name": "Convert array of JavaScript objects to CSV with column name header",
|
"name": "Specify column names in input message",
|
||||||
"info": "CSV node can convert an array of JavaScript objects to multi-line CSV text with column name header at first line.",
|
"info": "Column names can be specified by `columns` property of incoming message.\n",
|
||||||
"x": 390,
|
"x": 240,
|
||||||
"y": 1200,
|
"y": 200,
|
||||||
"wires": []
|
"wires": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "2b4d538d.ada07c",
|
"id": "39205b5c.690684",
|
||||||
"type": "inject",
|
"type": "inject",
|
||||||
"z": "4b63452d.672afc",
|
"z": "c6ffdacd.d887e8",
|
||||||
"name": "",
|
"name": "",
|
||||||
"props": [
|
"props": [
|
||||||
{
|
{
|
||||||
@ -30,41 +30,41 @@
|
|||||||
"topic": "",
|
"topic": "",
|
||||||
"payload": "",
|
"payload": "",
|
||||||
"payloadType": "date",
|
"payloadType": "date",
|
||||||
"x": 260,
|
"x": 200,
|
||||||
"y": 1260,
|
"y": 260,
|
||||||
"wires": [
|
"wires": [
|
||||||
[
|
[
|
||||||
"3e5c9e8.5065b62"
|
"526b59ba.2fa068"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "db02c7be.0984e8",
|
"id": "b78a407e.2d083",
|
||||||
"type": "csv",
|
"type": "csv",
|
||||||
"z": "4b63452d.672afc",
|
"z": "c6ffdacd.d887e8",
|
||||||
"name": "",
|
"name": "",
|
||||||
"sep": ",",
|
"sep": ",",
|
||||||
"hdrin": false,
|
"hdrin": false,
|
||||||
"hdrout": "all",
|
"hdrout": "all",
|
||||||
"multi": "one",
|
"multi": "one",
|
||||||
"ret": "\\n",
|
"ret": "\\n",
|
||||||
"temp": "kind,price",
|
"temp": "",
|
||||||
"skip": "0",
|
"skip": "0",
|
||||||
"strings": true,
|
"strings": true,
|
||||||
"include_empty_strings": "",
|
"include_empty_strings": "",
|
||||||
"include_null_values": "",
|
"include_null_values": "",
|
||||||
"x": 600,
|
"x": 750,
|
||||||
"y": 1260,
|
"y": 260,
|
||||||
"wires": [
|
"wires": [
|
||||||
[
|
[
|
||||||
"61f8b772.ddb1f8"
|
"8b7084dd.986f68"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "3e5c9e8.5065b62",
|
"id": "526b59ba.2fa068",
|
||||||
"type": "template",
|
"type": "template",
|
||||||
"z": "4b63452d.672afc",
|
"z": "c6ffdacd.d887e8",
|
||||||
"name": "JS object",
|
"name": "JS object",
|
||||||
"field": "payload",
|
"field": "payload",
|
||||||
"fieldType": "msg",
|
"fieldType": "msg",
|
||||||
@ -72,18 +72,18 @@
|
|||||||
"syntax": "plain",
|
"syntax": "plain",
|
||||||
"template": "[\n {\n \"kind\": \"Apple\",\n \"price\": 100,\n \"origin\": \"Canada\"\n },\n {\n \"kind\": \"Orange\",\n \"price\": 120,\n \"origin\": \"USA\"\n },\n {\n \"kind\": \"Banana\",\n \"price\": 80,\n \"origin\": \"Philippines\"\n }\n]",
|
"template": "[\n {\n \"kind\": \"Apple\",\n \"price\": 100,\n \"origin\": \"Canada\"\n },\n {\n \"kind\": \"Orange\",\n \"price\": 120,\n \"origin\": \"USA\"\n },\n {\n \"kind\": \"Banana\",\n \"price\": 80,\n \"origin\": \"Philippines\"\n }\n]",
|
||||||
"output": "json",
|
"output": "json",
|
||||||
"x": 430,
|
"x": 370,
|
||||||
"y": 1260,
|
"y": 260,
|
||||||
"wires": [
|
"wires": [
|
||||||
[
|
[
|
||||||
"db02c7be.0984e8"
|
"b204077a.227778"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "61f8b772.ddb1f8",
|
"id": "8b7084dd.986f68",
|
||||||
"type": "debug",
|
"type": "debug",
|
||||||
"z": "4b63452d.672afc",
|
"z": "c6ffdacd.d887e8",
|
||||||
"name": "",
|
"name": "",
|
||||||
"active": true,
|
"active": true,
|
||||||
"tosidebar": true,
|
"tosidebar": true,
|
||||||
@ -92,8 +92,35 @@
|
|||||||
"complete": "false",
|
"complete": "false",
|
||||||
"statusVal": "",
|
"statusVal": "",
|
||||||
"statusType": "auto",
|
"statusType": "auto",
|
||||||
"x": 780,
|
"x": 930,
|
||||||
"y": 1260,
|
"y": 260,
|
||||||
"wires": []
|
"wires": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "b204077a.227778",
|
||||||
|
"type": "change",
|
||||||
|
"z": "c6ffdacd.d887e8",
|
||||||
|
"name": "",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"t": "set",
|
||||||
|
"p": "columns",
|
||||||
|
"pt": "msg",
|
||||||
|
"to": "kind,price",
|
||||||
|
"tot": "str"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"action": "",
|
||||||
|
"property": "",
|
||||||
|
"from": "",
|
||||||
|
"to": "",
|
||||||
|
"reg": false,
|
||||||
|
"x": 570,
|
||||||
|
"y": 260,
|
||||||
|
"wires": [
|
||||||
|
[
|
||||||
|
"b78a407e.2d083"
|
||||||
|
]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -21,9 +21,10 @@
|
|||||||
the body of the message.</p>
|
the body of the message.</p>
|
||||||
<p>The function is expected to return a message object (or multiple message objects), but can choose
|
<p>The function is expected to return a message object (or multiple message objects), but can choose
|
||||||
to return nothing in order to halt a flow.</p>
|
to return nothing in order to halt a flow.</p>
|
||||||
<p>The <b>Setup</b> tab contains code that will be run whenever the node is started.
|
<p>The <b>On Start</b> tab contains code that will be run whenever the node is started.
|
||||||
The <b>Close</b> tab contains code that will be run when the node is stopped.</p>
|
The <b>On Stop</b> tab contains code that will be run when the node is stopped.</p>
|
||||||
<p>If an promise object is returned from the setup code, input message processing starts after its completion.</p>
|
<p>If the On Start code returns a Promise object, the node will not start handling messages
|
||||||
|
until the promise is resolved.</p>
|
||||||
<h3>Details</h3>
|
<h3>Details</h3>
|
||||||
<p>See the <a target="_blank" href="http://nodered.org/docs/writing-functions.html">online documentation</a>
|
<p>See the <a target="_blank" href="http://nodered.org/docs/writing-functions.html">online documentation</a>
|
||||||
for more information on writing functions.</p>
|
for more information on writing functions.</p>
|
||||||
|
@ -58,7 +58,7 @@ var api = module.exports = {
|
|||||||
* @memberof @node-red/runtime_plugins
|
* @memberof @node-red/runtime_plugins
|
||||||
*/
|
*/
|
||||||
getPluginConfigs: async function(opts) {
|
getPluginConfigs: async function(opts) {
|
||||||
if (/[^a-z\-]/i.test(opts.lang)) {
|
if (/[^0-9a-z=\-\*]/i.test(opts.lang)) {
|
||||||
throw new Error("Invalid language: "+opts.lang)
|
throw new Error("Invalid language: "+opts.lang)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -220,7 +220,7 @@ var reinstallTimeout;
|
|||||||
function reinstallModules(moduleList) {
|
function reinstallModules(moduleList) {
|
||||||
const promises = [];
|
const promises = [];
|
||||||
const reinstallList = [];
|
const reinstallList = [];
|
||||||
const installRetry = 30000;
|
var installRetry = 30000;
|
||||||
if (settings.hasOwnProperty('autoInstallModulesRetry')) {
|
if (settings.hasOwnProperty('autoInstallModulesRetry')) {
|
||||||
log.warn(log._("server.deprecatedOption",{old:"autoInstallModulesRetry", new:"externalModules.autoInstallRetry"}));
|
log.warn(log._("server.deprecatedOption",{old:"autoInstallModulesRetry", new:"externalModules.autoInstallRetry"}));
|
||||||
installRetry = settings.autoInstallModulesRetry;
|
installRetry = settings.autoInstallModulesRetry;
|
||||||
|
Loading…
Reference in New Issue
Block a user