mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Compare commits
52 Commits
4.0.0-beta
...
resyn-dev
Author | SHA1 | Date | |
---|---|---|---|
|
61b12f6bbe | ||
|
d71b22412b | ||
|
e408c6b376 | ||
|
bf30c24e8e | ||
|
6c14ed0ef5 | ||
|
6d41ecdae0 | ||
|
3f89bc2733 | ||
|
87a25df162 | ||
|
341f43610a | ||
|
67cdf3ef96 | ||
|
cd98f448e9 | ||
|
fac79fd068 | ||
|
da97c5d558 | ||
|
ae7b9fe62e | ||
|
e52c2911da | ||
|
07a29ff779 | ||
|
1b4a8ebe83 | ||
|
abf2eacf18 | ||
|
f808f4e2e8 | ||
|
ca33d6b799 | ||
|
940740f15d | ||
|
51208fcd0c | ||
|
707152d82f | ||
|
5538f6dd8a | ||
|
d601e2caa4 | ||
|
46fdf56c79 | ||
|
f55ee6e665 | ||
|
03648dc7e8 | ||
|
66a667fe58 | ||
|
1bb3a0eca5 | ||
|
08927dfb55 | ||
|
b27483de9c | ||
|
211d420fb2 | ||
|
b8ca4665c1 | ||
|
960af87fb0 | ||
|
de7339ae97 | ||
|
0995af62b6 | ||
|
c2e03a40b4 | ||
|
c855050bcf | ||
|
29ed5b2792 | ||
|
e39216e65a | ||
|
7ac7f9b4c8 | ||
|
4709eb9d49 | ||
|
c13b8266dd | ||
|
bd58431603 | ||
|
28907082f1 | ||
|
f83174c40a | ||
|
ec062d008f | ||
|
a587655a5a | ||
|
3e6f0acf79 | ||
|
7f93d943d7 | ||
|
12543d2c2a |
@@ -1,3 +1,10 @@
|
||||
#### 3.1.9: Maintenance Release
|
||||
|
||||
- Prevent subflow being added to itself (#4654) @knolleary
|
||||
- Fix use of spawn on windows with cmd files (#4652) @knolleary
|
||||
- Guard refresh of unknown subflow (#4640) @knolleary
|
||||
- Fix subflow module sending messages to debug sidebar (#4642) @knolleary
|
||||
|
||||
#### 3.1.8: Maintenance Release
|
||||
|
||||
- Add validation and error handling on subflow instance properties (#4632) @knolleary
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red",
|
||||
"version": "3.1.8",
|
||||
"version": "3.1.9",
|
||||
"description": "Low-code programming for event-driven applications",
|
||||
"homepage": "https://nodered.org",
|
||||
"license": "Apache-2.0",
|
||||
@@ -74,7 +74,7 @@
|
||||
"passport-oauth2-client-password": "0.1.2",
|
||||
"raw-body": "2.5.2",
|
||||
"semver": "7.5.4",
|
||||
"tar": "6.1.13",
|
||||
"tar": "6.2.1",
|
||||
"tough-cookie": "4.1.3",
|
||||
"uglify-js": "3.17.4",
|
||||
"uuid": "9.0.0",
|
||||
|
@@ -205,9 +205,10 @@ function genericStrategy(adminApp,strategy) {
|
||||
passport.use(new strategy.strategy(options, verify));
|
||||
|
||||
adminApp.get('/auth/strategy',
|
||||
passport.authenticate(strategy.name, {session:false,
|
||||
passport.authenticate(strategy.name, {
|
||||
session:false,
|
||||
failureMessage: true,
|
||||
failureRedirect: settings.httpAdminRoot
|
||||
failureRedirect: settings.httpAdminRoot + '?session_message=Login Failed'
|
||||
}),
|
||||
completeGenerateStrategyAuth,
|
||||
handleStrategyError
|
||||
@@ -221,7 +222,7 @@ function genericStrategy(adminApp,strategy) {
|
||||
passport.authenticate(strategy.name, {
|
||||
session:false,
|
||||
failureMessage: true,
|
||||
failureRedirect: settings.httpAdminRoot
|
||||
failureRedirect: settings.httpAdminRoot + '?session_message=Login Failed'
|
||||
}),
|
||||
completeGenerateStrategyAuth,
|
||||
handleStrategyError
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/editor-api",
|
||||
"version": "3.1.8",
|
||||
"version": "3.1.9",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
@@ -16,8 +16,8 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@node-red/util": "3.1.8",
|
||||
"@node-red/editor-client": "3.1.8",
|
||||
"@node-red/util": "3.1.9",
|
||||
"@node-red/editor-client": "3.1.9",
|
||||
"bcryptjs": "2.4.3",
|
||||
"body-parser": "1.20.2",
|
||||
"clone": "2.1.2",
|
||||
|
@@ -719,6 +719,7 @@
|
||||
"nodeHelp": "Node Help",
|
||||
"showHelp": "Show help",
|
||||
"showInOutline": "Show in outline",
|
||||
"hideTopics": "Hide topics",
|
||||
"showTopics": "Show topics",
|
||||
"noHelp": "No help topic selected",
|
||||
"changeLog": "Change Log"
|
||||
@@ -914,6 +915,8 @@
|
||||
}
|
||||
},
|
||||
"typedInput": {
|
||||
"selected": "__count__ selected",
|
||||
"selected_plural": "__count__ selected",
|
||||
"type": {
|
||||
"str": "string",
|
||||
"num": "number",
|
||||
|
@@ -719,6 +719,7 @@
|
||||
"nodeHelp": "Aide sur les noeuds",
|
||||
"showHelp": "Afficher l'aide",
|
||||
"showInOutline": "Afficher dans les grandes lignes",
|
||||
"hideTopics": "Masquer les sujets",
|
||||
"showTopics": "Afficher les sujets",
|
||||
"noHelp": "Aucune rubrique d'aide sélectionnée",
|
||||
"changeLog": "Journal des modifications"
|
||||
@@ -914,6 +915,8 @@
|
||||
}
|
||||
},
|
||||
"typedInput": {
|
||||
"selected": "__count__ sélectionnée",
|
||||
"selected_plural": "__count__ sélectionnées",
|
||||
"type": {
|
||||
"str": "chaîne de caractères",
|
||||
"num": "nombre",
|
||||
|
@@ -719,6 +719,7 @@
|
||||
"nodeHelp": "ノードヘルプ",
|
||||
"showHelp": "ヘルプを表示",
|
||||
"showInOutline": "アウトラインに表示",
|
||||
"hideTopics": "トピックを非表示",
|
||||
"showTopics": "トピックを表示",
|
||||
"noHelp": "ヘルプのトピックが未選択",
|
||||
"changeLog": "更新履歴"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/editor-client",
|
||||
"version": "3.1.8",
|
||||
"version": "3.1.9",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@@ -734,12 +734,12 @@
|
||||
}
|
||||
if (menu.opts.multiple) {
|
||||
var selected = {};
|
||||
this.value().split(",").forEach(function(f) {
|
||||
selected[f] = true;
|
||||
})
|
||||
this.value().split(",").forEach(function(f) {
|
||||
selected[f] = true;
|
||||
});
|
||||
menu.find('input[type="checkbox"]').each(function() {
|
||||
$(this).prop("checked",selected[$(this).data('value')])
|
||||
})
|
||||
$(this).prop("checked", selected[$(this).data('value')] || false);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -830,7 +830,7 @@
|
||||
this.input.trigger('change',[this.propertyType,this.value()]);
|
||||
}
|
||||
} else {
|
||||
this.optionSelectLabel.text(o.length+" selected");
|
||||
this.optionSelectLabel.text(RED._("typedInput.selected", { count: o.length }));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@@ -612,7 +612,10 @@ RED.deploy = (function() {
|
||||
}
|
||||
});
|
||||
RED.nodes.eachSubflow(function (subflow) {
|
||||
subflow.changed = false;
|
||||
if (subflow.changed) {
|
||||
subflow.changed = false;
|
||||
RED.events.emit("subflows:change", subflow);
|
||||
}
|
||||
});
|
||||
RED.nodes.eachWorkspace(function (ws) {
|
||||
if (ws.changed || ws.added) {
|
||||
@@ -628,6 +631,7 @@ RED.deploy = (function() {
|
||||
// Once deployed, cannot undo back to a clean state
|
||||
RED.history.markAllDirty();
|
||||
RED.view.redraw();
|
||||
RED.sidebar.config.refresh();
|
||||
RED.events.emit("deploy");
|
||||
}).fail(function (xhr, textStatus, err) {
|
||||
RED.nodes.dirty(true);
|
||||
|
@@ -248,6 +248,8 @@ RED.editor = (function() {
|
||||
var value = input.val();
|
||||
if (defaults[property].hasOwnProperty("format") && defaults[property].format !== "" && input[0].nodeName === "DIV") {
|
||||
value = input.text();
|
||||
} else if (input.attr("type") === "checkbox") {
|
||||
value = input.prop("checked");
|
||||
}
|
||||
var valid = validateNodeProperty(node, defaults, property,value);
|
||||
if (((typeof valid) === "string") || !valid) {
|
||||
@@ -741,9 +743,16 @@ RED.editor = (function() {
|
||||
}
|
||||
|
||||
try {
|
||||
var rc = editing_node._def.oneditsave.call(editing_node);
|
||||
const rc = editing_node._def.oneditsave.call(editing_node);
|
||||
if (rc === true) {
|
||||
editState.changed = true;
|
||||
} else if (typeof rc === 'object' && rc !== null ) {
|
||||
if (rc.changed === true) {
|
||||
editState.changed = true
|
||||
}
|
||||
if (Array.isArray(rc.history) && rc.history.length > 0) {
|
||||
editState.history = rc.history
|
||||
}
|
||||
}
|
||||
} catch(err) {
|
||||
console.warn("oneditsave",editing_node.id,editing_node.type,err.toString());
|
||||
@@ -914,6 +923,17 @@ RED.editor = (function() {
|
||||
dirty: startDirty
|
||||
}
|
||||
|
||||
if (editing_node.g) {
|
||||
const group = RED.nodes.group(editing_node.g);
|
||||
// Don't use RED.group.removeFromGroup as that emits
|
||||
// a change event on the node - but we're deleting it
|
||||
const index = group?.nodes.indexOf(editing_node) ?? -1;
|
||||
if (index > -1) {
|
||||
group.nodes.splice(index, 1);
|
||||
RED.group.markDirty(group);
|
||||
}
|
||||
}
|
||||
|
||||
RED.nodes.dirty(true);
|
||||
RED.view.redraw(true);
|
||||
RED.history.push(historyEvent);
|
||||
@@ -1015,7 +1035,7 @@ RED.editor = (function() {
|
||||
}
|
||||
});
|
||||
}
|
||||
var historyEvent = {
|
||||
let historyEvent = {
|
||||
t:'edit',
|
||||
node:editing_node,
|
||||
changes:editState.changes,
|
||||
@@ -1031,6 +1051,15 @@ RED.editor = (function() {
|
||||
instances:subflowInstances
|
||||
}
|
||||
}
|
||||
|
||||
if (editState.history) {
|
||||
historyEvent = {
|
||||
t: 'multi',
|
||||
events: [ historyEvent, ...editState.history ],
|
||||
dirty: wasDirty
|
||||
}
|
||||
}
|
||||
|
||||
RED.history.push(historyEvent);
|
||||
}
|
||||
editing_node.dirty = true;
|
||||
@@ -1623,8 +1652,8 @@ RED.editor = (function() {
|
||||
}
|
||||
|
||||
if (!isSameObj(old_env, new_env)) {
|
||||
editing_node.env = new_env;
|
||||
editState.changes.env = editing_node.env;
|
||||
editing_node.env = new_env;
|
||||
editState.changed = true;
|
||||
}
|
||||
|
||||
|
@@ -514,7 +514,7 @@ RED.editor.codeEditor.monaco = (function() {
|
||||
_monaco.languages.json.jsonDefaults.setDiagnosticsOptions(diagnosticOptions);
|
||||
if(modeConfiguration) { _monaco.languages.json.jsonDefaults.setModeConfiguration(modeConfiguration); }
|
||||
} catch (error) {
|
||||
console.warn("monaco - Error setting up json options", err)
|
||||
console.warn("monaco - Error setting up json options", error)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -526,7 +526,7 @@ RED.editor.codeEditor.monaco = (function() {
|
||||
if(htmlDefaults) { _monaco.languages.html.htmlDefaults.setOptions(htmlDefaults); }
|
||||
if(handlebarDefaults) { _monaco.languages.html.handlebarDefaults.setOptions(handlebarDefaults); }
|
||||
} catch (error) {
|
||||
console.warn("monaco - Error setting up html options", err)
|
||||
console.warn("monaco - Error setting up html options", error)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -546,7 +546,7 @@ RED.editor.codeEditor.monaco = (function() {
|
||||
if(lessDefaults_modeConfiguration) { _monaco.languages.css.cssDefaults.setDiagnosticsOptions(lessDefaults_modeConfiguration); }
|
||||
if(scssDefaults_modeConfiguration) { _monaco.languages.css.cssDefaults.setDiagnosticsOptions(scssDefaults_modeConfiguration); }
|
||||
} catch (error) {
|
||||
console.warn("monaco - Error setting up CSS/SCSS/LESS options", err)
|
||||
console.warn("monaco - Error setting up CSS/SCSS/LESS options", error)
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -382,9 +382,11 @@ RED.sidebar.config = (function() {
|
||||
refreshConfigNodeList();
|
||||
}
|
||||
});
|
||||
|
||||
RED.popover.tooltip($('#red-ui-sidebar-config-filter-all'), RED._("sidebar.config.showAllConfigNodes"));
|
||||
RED.popover.tooltip($('#red-ui-sidebar-config-filter-unused'), RED._("sidebar.config.showAllUnusedConfigNodes"));
|
||||
|
||||
RED.popover.tooltip($('#red-ui-sidebar-config-collapse-all'), RED._("palette.actions.collapse-all"));
|
||||
RED.popover.tooltip($('#red-ui-sidebar-config-expand-all'), RED._("palette.actions.expand-all"));
|
||||
}
|
||||
|
||||
function flashConfigNode(el) {
|
||||
|
@@ -36,7 +36,13 @@ RED.sidebar.help = (function() {
|
||||
toolbar = $("<div>", {class:"red-ui-sidebar-header red-ui-info-toolbar"}).appendTo(content);
|
||||
$('<span class="button-group"><a id="red-ui-sidebar-help-show-toc" class="red-ui-button red-ui-button-small selected" href="#"><i class="fa fa-list-ul"></i></a></span>').appendTo(toolbar)
|
||||
var showTOCButton = toolbar.find('#red-ui-sidebar-help-show-toc')
|
||||
RED.popover.tooltip(showTOCButton,RED._("sidebar.help.showTopics"));
|
||||
RED.popover.tooltip(showTOCButton, function () {
|
||||
if ($(showTOCButton).hasClass('selected')) {
|
||||
return RED._("sidebar.help.hideTopics");
|
||||
} else {
|
||||
return RED._("sidebar.help.showTopics");
|
||||
}
|
||||
});
|
||||
showTOCButton.on("click",function(e) {
|
||||
e.preventDefault();
|
||||
if ($(this).hasClass('selected')) {
|
||||
|
@@ -646,120 +646,128 @@ RED.view = (function() {
|
||||
}
|
||||
d3.event = event;
|
||||
var selected_tool = $(ui.draggable[0]).attr("data-palette-type");
|
||||
var result = createNode(selected_tool);
|
||||
if (!result) {
|
||||
return;
|
||||
}
|
||||
var historyEvent = result.historyEvent;
|
||||
var nn = RED.nodes.add(result.node);
|
||||
|
||||
var showLabel = RED.utils.getMessageProperty(RED.settings.get('editor'),"view.view-node-show-label");
|
||||
if (showLabel !== undefined && (nn._def.hasOwnProperty("showLabel")?nn._def.showLabel:true) && !nn._def.defaults.hasOwnProperty("l")) {
|
||||
nn.l = showLabel;
|
||||
}
|
||||
|
||||
var helperOffset = d3.touches(ui.helper.get(0))[0]||d3.mouse(ui.helper.get(0));
|
||||
var helperWidth = ui.helper.width();
|
||||
var helperHeight = ui.helper.height();
|
||||
var mousePos = d3.touches(this)[0]||d3.mouse(this);
|
||||
|
||||
try {
|
||||
var isLink = (nn.type === "link in" || nn.type === "link out")
|
||||
var hideLabel = nn.hasOwnProperty('l')?!nn.l : isLink;
|
||||
|
||||
var label = RED.utils.getNodeLabel(nn, nn.type);
|
||||
var labelParts = getLabelParts(label, "red-ui-flow-node-label");
|
||||
if (hideLabel) {
|
||||
nn.w = node_height;
|
||||
nn.h = Math.max(node_height,(nn.outputs || 0) * 15);
|
||||
} else {
|
||||
nn.w = Math.max(node_width,20*(Math.ceil((labelParts.width+50+(nn._def.inputs>0?7:0))/20)) );
|
||||
nn.h = Math.max(6+24*labelParts.lines.length,(nn.outputs || 0) * 15, 30);
|
||||
var result = createNode(selected_tool);
|
||||
if (!result) {
|
||||
return;
|
||||
}
|
||||
} catch(err) {
|
||||
}
|
||||
var historyEvent = result.historyEvent;
|
||||
var nn = RED.nodes.add(result.node);
|
||||
|
||||
mousePos[1] += this.scrollTop + ((helperHeight/2)-helperOffset[1]);
|
||||
mousePos[0] += this.scrollLeft + ((helperWidth/2)-helperOffset[0]);
|
||||
mousePos[1] /= scaleFactor;
|
||||
mousePos[0] /= scaleFactor;
|
||||
var showLabel = RED.utils.getMessageProperty(RED.settings.get('editor'),"view.view-node-show-label");
|
||||
if (showLabel !== undefined && (nn._def.hasOwnProperty("showLabel")?nn._def.showLabel:true) && !nn._def.defaults.hasOwnProperty("l")) {
|
||||
nn.l = showLabel;
|
||||
}
|
||||
|
||||
nn.x = mousePos[0];
|
||||
nn.y = mousePos[1];
|
||||
var helperOffset = d3.touches(ui.helper.get(0))[0]||d3.mouse(ui.helper.get(0));
|
||||
var helperWidth = ui.helper.width();
|
||||
var helperHeight = ui.helper.height();
|
||||
var mousePos = d3.touches(this)[0]||d3.mouse(this);
|
||||
|
||||
var minX = nn.w/2 -5;
|
||||
if (nn.x < minX) {
|
||||
nn.x = minX;
|
||||
}
|
||||
var minY = nn.h/2 -5;
|
||||
if (nn.y < minY) {
|
||||
nn.y = minY;
|
||||
}
|
||||
var maxX = space_width -nn.w/2 +5;
|
||||
if (nn.x > maxX) {
|
||||
nn.x = maxX;
|
||||
}
|
||||
var maxY = space_height -nn.h +5;
|
||||
if (nn.y > maxY) {
|
||||
nn.y = maxY;
|
||||
}
|
||||
try {
|
||||
var isLink = (nn.type === "link in" || nn.type === "link out")
|
||||
var hideLabel = nn.hasOwnProperty('l')?!nn.l : isLink;
|
||||
|
||||
if (snapGrid) {
|
||||
var gridOffset = RED.view.tools.calculateGridSnapOffsets(nn);
|
||||
nn.x -= gridOffset.x;
|
||||
nn.y -= gridOffset.y;
|
||||
}
|
||||
var label = RED.utils.getNodeLabel(nn, nn.type);
|
||||
var labelParts = getLabelParts(label, "red-ui-flow-node-label");
|
||||
if (hideLabel) {
|
||||
nn.w = node_height;
|
||||
nn.h = Math.max(node_height,(nn.outputs || 0) * 15);
|
||||
} else {
|
||||
nn.w = Math.max(node_width,20*(Math.ceil((labelParts.width+50+(nn._def.inputs>0?7:0))/20)) );
|
||||
nn.h = Math.max(6+24*labelParts.lines.length,(nn.outputs || 0) * 15, 30);
|
||||
}
|
||||
} catch(err) {
|
||||
}
|
||||
|
||||
var linkToSplice = $(ui.helper).data("splice");
|
||||
if (linkToSplice) {
|
||||
spliceLink(linkToSplice, nn, historyEvent)
|
||||
}
|
||||
mousePos[1] += this.scrollTop + ((helperHeight/2)-helperOffset[1]);
|
||||
mousePos[0] += this.scrollLeft + ((helperWidth/2)-helperOffset[0]);
|
||||
mousePos[1] /= scaleFactor;
|
||||
mousePos[0] /= scaleFactor;
|
||||
|
||||
nn.x = mousePos[0];
|
||||
nn.y = mousePos[1];
|
||||
|
||||
var minX = nn.w/2 -5;
|
||||
if (nn.x < minX) {
|
||||
nn.x = minX;
|
||||
}
|
||||
var minY = nn.h/2 -5;
|
||||
if (nn.y < minY) {
|
||||
nn.y = minY;
|
||||
}
|
||||
var maxX = space_width -nn.w/2 +5;
|
||||
if (nn.x > maxX) {
|
||||
nn.x = maxX;
|
||||
}
|
||||
var maxY = space_height -nn.h +5;
|
||||
if (nn.y > maxY) {
|
||||
nn.y = maxY;
|
||||
}
|
||||
|
||||
if (snapGrid) {
|
||||
var gridOffset = RED.view.tools.calculateGridSnapOffsets(nn);
|
||||
nn.x -= gridOffset.x;
|
||||
nn.y -= gridOffset.y;
|
||||
}
|
||||
|
||||
var linkToSplice = $(ui.helper).data("splice");
|
||||
if (linkToSplice) {
|
||||
spliceLink(linkToSplice, nn, historyEvent)
|
||||
}
|
||||
|
||||
var group = $(ui.helper).data("group");
|
||||
if (group) {
|
||||
var oldX = group.x;
|
||||
var oldY = group.y;
|
||||
RED.group.addToGroup(group, nn);
|
||||
var moveEvent = null;
|
||||
if ((group.x !== oldX) ||
|
||||
(group.y !== oldY)) {
|
||||
moveEvent = {
|
||||
t: "move",
|
||||
nodes: [{n: group,
|
||||
ox: oldX, oy: oldY,
|
||||
dx: group.x -oldX,
|
||||
dy: group.y -oldY}],
|
||||
dirty: true
|
||||
};
|
||||
}
|
||||
historyEvent = {
|
||||
t: 'multi',
|
||||
events: [historyEvent],
|
||||
|
||||
var group = $(ui.helper).data("group");
|
||||
if (group) {
|
||||
var oldX = group.x;
|
||||
var oldY = group.y;
|
||||
RED.group.addToGroup(group, nn);
|
||||
var moveEvent = null;
|
||||
if ((group.x !== oldX) ||
|
||||
(group.y !== oldY)) {
|
||||
moveEvent = {
|
||||
t: "move",
|
||||
nodes: [{n: group,
|
||||
ox: oldX, oy: oldY,
|
||||
dx: group.x -oldX,
|
||||
dy: group.y -oldY}],
|
||||
dirty: true
|
||||
};
|
||||
if (moveEvent) {
|
||||
historyEvent.events.push(moveEvent)
|
||||
}
|
||||
historyEvent.events.push({
|
||||
t: "addToGroup",
|
||||
group: group,
|
||||
nodes: nn
|
||||
})
|
||||
}
|
||||
historyEvent = {
|
||||
t: 'multi',
|
||||
events: [historyEvent],
|
||||
|
||||
};
|
||||
if (moveEvent) {
|
||||
historyEvent.events.push(moveEvent)
|
||||
RED.history.push(historyEvent);
|
||||
RED.editor.validateNode(nn);
|
||||
RED.nodes.dirty(true);
|
||||
// auto select dropped node - so info shows (if visible)
|
||||
clearSelection();
|
||||
nn.selected = true;
|
||||
movingSet.add(nn);
|
||||
updateActiveNodes();
|
||||
updateSelection();
|
||||
redraw();
|
||||
|
||||
if (nn._def.autoedit) {
|
||||
RED.editor.edit(nn);
|
||||
}
|
||||
} catch (error) {
|
||||
if (error.code != "NODE_RED") {
|
||||
RED.notify(RED._("notification.error",{message:error.toString()}),"error");
|
||||
} else {
|
||||
RED.notify(RED._("notification.error",{message:error.message}),"error");
|
||||
}
|
||||
historyEvent.events.push({
|
||||
t: "addToGroup",
|
||||
group: group,
|
||||
nodes: nn
|
||||
})
|
||||
}
|
||||
|
||||
RED.history.push(historyEvent);
|
||||
RED.editor.validateNode(nn);
|
||||
RED.nodes.dirty(true);
|
||||
// auto select dropped node - so info shows (if visible)
|
||||
clearSelection();
|
||||
nn.selected = true;
|
||||
movingSet.add(nn);
|
||||
updateActiveNodes();
|
||||
updateSelection();
|
||||
redraw();
|
||||
|
||||
if (nn._def.autoedit) {
|
||||
RED.editor.edit(nn);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1182,6 +1190,7 @@ RED.view = (function() {
|
||||
|
||||
if (d3.event.button === 1) {
|
||||
// Middle Click pan
|
||||
d3.event.preventDefault();
|
||||
mouse_mode = RED.state.PANNING;
|
||||
mouse_position = [d3.event.pageX,d3.event.pageY]
|
||||
scroll_position = [chart.scrollLeft(),chart.scrollTop()];
|
||||
@@ -6063,14 +6072,19 @@ RED.view = (function() {
|
||||
function createNode(type, x, y, z) {
|
||||
const wasDirty = RED.nodes.dirty()
|
||||
var m = /^subflow:(.+)$/.exec(type);
|
||||
var activeSubflow = z ? RED.nodes.subflow(z) : null;
|
||||
var activeSubflow = (z || RED.workspaces.active()) ? RED.nodes.subflow(z || RED.workspaces.active()) : null;
|
||||
|
||||
if (activeSubflow && m) {
|
||||
var subflowId = m[1];
|
||||
let err
|
||||
if (subflowId === activeSubflow.id) {
|
||||
throw new Error(RED._("notification.error", { message: RED._("notification.errors.cannotAddSubflowToItself") }))
|
||||
err = new Error(RED._("notification.errors.cannotAddSubflowToItself"))
|
||||
} else if (RED.nodes.subflowContains(m[1], activeSubflow.id)) {
|
||||
err = new Error(RED._("notification.errors.cannotAddCircularReference"))
|
||||
}
|
||||
if (RED.nodes.subflowContains(m[1], activeSubflow.id)) {
|
||||
throw new Error(RED._("notification.error", { message: RED._("notification.errors.cannotAddCircularReference") }))
|
||||
if (err) {
|
||||
err.code = 'NODE_RED'
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -37,7 +37,6 @@ ul.red-ui-sidebar-node-config-list {
|
||||
}
|
||||
.red-ui-palette-node {
|
||||
// overflow: hidden;
|
||||
cursor: default;
|
||||
&.selected {
|
||||
border-color: transparent;
|
||||
box-shadow: 0 0 0 2px var(--red-ui-node-selected-color);
|
||||
|
@@ -194,27 +194,46 @@
|
||||
nodeMap[node.links[i]].new = true;
|
||||
}
|
||||
}
|
||||
var n;
|
||||
for (var id in nodeMap) {
|
||||
|
||||
let editHistories = []
|
||||
let n;
|
||||
for (let id in nodeMap) {
|
||||
if (nodeMap.hasOwnProperty(id)) {
|
||||
n = RED.nodes.node(id);
|
||||
if (n) {
|
||||
editHistories.push({
|
||||
t:'edit',
|
||||
node: n,
|
||||
changes: {
|
||||
links: [...n.links]
|
||||
},
|
||||
changed: n.changed
|
||||
})
|
||||
if (nodeMap[id].old && !nodeMap[id].new) {
|
||||
// Removed id
|
||||
i = n.links.indexOf(node.id);
|
||||
if (i > -1) {
|
||||
n.links.splice(i,1);
|
||||
n.changed = true
|
||||
n.dirty = true
|
||||
}
|
||||
} else if (!nodeMap[id].old && nodeMap[id].new) {
|
||||
// Added id
|
||||
i = n.links.indexOf(id);
|
||||
if (i === -1) {
|
||||
n.links.push(node.id);
|
||||
n.changed = true
|
||||
n.dirty = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (editHistories.length > 0) {
|
||||
return {
|
||||
history: editHistories
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onAdd() {
|
||||
@@ -254,13 +273,14 @@
|
||||
onEditPrepare(this,"link out");
|
||||
},
|
||||
oneditsave: function() {
|
||||
onEditSave(this);
|
||||
const result = onEditSave(this);
|
||||
// In case the name has changed, ensure any link call nodes on this
|
||||
// tab are redrawn with the updated name
|
||||
var localCallNodes = RED.nodes.filterNodes({z:RED.workspaces.active(), type:"link call"});
|
||||
localCallNodes.forEach(function(node) {
|
||||
node.dirty = true;
|
||||
});
|
||||
return result
|
||||
},
|
||||
onadd: onAdd,
|
||||
oneditresize: resizeNodeList
|
||||
@@ -329,7 +349,7 @@
|
||||
onEditPrepare(this,"link in");
|
||||
},
|
||||
oneditsave: function() {
|
||||
onEditSave(this);
|
||||
return onEditSave(this);
|
||||
},
|
||||
oneditresize: resizeNodeList
|
||||
});
|
||||
@@ -373,7 +393,7 @@
|
||||
|
||||
},
|
||||
oneditsave: function() {
|
||||
onEditSave(this);
|
||||
return onEditSave(this);
|
||||
},
|
||||
onadd: onAdd,
|
||||
oneditresize: resizeNodeList
|
||||
|
@@ -374,7 +374,7 @@ module.exports = function(RED) {
|
||||
iniOpt.breakOnSigint = true;
|
||||
}
|
||||
}
|
||||
node.script = vm.createScript(functionText, createVMOpt(node, ""));
|
||||
node.script = new vm.Script(functionText, createVMOpt(node, ""));
|
||||
if (node.fin && (node.fin !== "")) {
|
||||
var finText = `(function () {
|
||||
var node = {
|
||||
@@ -438,10 +438,9 @@ module.exports = function(RED) {
|
||||
|
||||
//store the error in msg to be used in flows
|
||||
msg.error = err;
|
||||
|
||||
var line = 0;
|
||||
var errorMessage;
|
||||
if (stack.length > 0) {
|
||||
let line = 0;
|
||||
let errorMessage;
|
||||
while (line < stack.length && stack[line].indexOf("ReferenceError") !== 0) {
|
||||
line++;
|
||||
}
|
||||
@@ -455,11 +454,13 @@ module.exports = function(RED) {
|
||||
errorMessage += " (line "+lineno+", col "+cha+")";
|
||||
}
|
||||
}
|
||||
if (errorMessage) {
|
||||
err.message = errorMessage
|
||||
}
|
||||
}
|
||||
if (!errorMessage) {
|
||||
errorMessage = err.toString();
|
||||
}
|
||||
done(errorMessage);
|
||||
// Pass the whole error object so any additional properties
|
||||
// (such as cause) are preserved
|
||||
done(err);
|
||||
}
|
||||
else if (typeof err === "string") {
|
||||
done(err);
|
||||
|
@@ -20,6 +20,7 @@ module.exports = function(RED) {
|
||||
var exec = require('child_process').exec;
|
||||
var fs = require('fs');
|
||||
var isUtf8 = require('is-utf8');
|
||||
const isWindows = process.platform === 'win32'
|
||||
|
||||
function ExecNode(n) {
|
||||
RED.nodes.createNode(this,n);
|
||||
@@ -85,9 +86,12 @@ module.exports = function(RED) {
|
||||
}
|
||||
});
|
||||
var cmd = arg.shift();
|
||||
// Since 18.20.2/20.12.2, it is invalid to call spawn on Windows with a .bat/.cmd file
|
||||
// without using shell: true.
|
||||
const opts = isWindows ? { ...node.spawnOpt, shell: true } : node.spawnOpt
|
||||
/* istanbul ignore else */
|
||||
node.debug(cmd+" ["+arg+"]");
|
||||
child = spawn(cmd,arg,node.spawnOpt);
|
||||
child = spawn(cmd,arg,opts);
|
||||
node.status({fill:"blue",shape:"dot",text:"pid:"+child.pid});
|
||||
var unknownCommand = (child.pid === undefined);
|
||||
if (node.timer !== 0) {
|
||||
|
@@ -103,7 +103,7 @@
|
||||
<h4>Automatic mode</h4>
|
||||
<p>Automatic mode uses the <code>parts</code> property of incoming messages to
|
||||
determine how the sequence should be joined. This allows it to automatically
|
||||
reverse the action of a <b>split</b> node.
|
||||
reverse the action of a <b>split</b> node.</p>
|
||||
|
||||
<h4>Manual mode</h4>
|
||||
<p>When configured to join in manual mode, the node is able to join sequences
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/nodes",
|
||||
"version": "3.1.8",
|
||||
"version": "3.1.9",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@@ -273,7 +273,7 @@ async function installModule(moduleDetails) {
|
||||
let extraArgs = triggerPayload.args || [];
|
||||
let args = ['install', ...extraArgs, installSpec]
|
||||
log.trace(NPM_COMMAND + JSON.stringify(args));
|
||||
return exec.run(NPM_COMMAND, args, { cwd: installDir },true)
|
||||
return exec.run(NPM_COMMAND, args, { cwd: installDir, shell: true },true)
|
||||
} else {
|
||||
log.trace("skipping npm install");
|
||||
}
|
||||
|
@@ -25,12 +25,15 @@ const registryUtil = require("./util");
|
||||
const library = require("./library");
|
||||
const {exec,log,events,hooks} = require("@node-red/util");
|
||||
const child_process = require('child_process');
|
||||
const npmCommand = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
||||
let installerEnabled = false;
|
||||
|
||||
const isWindows = process.platform === 'win32'
|
||||
const npmCommand = isWindows ? 'npm.cmd' : 'npm';
|
||||
|
||||
let installerEnabled = false;
|
||||
let settings;
|
||||
|
||||
const moduleRe = /^(@[^/@]+?[/])?[^/@]+?$/;
|
||||
const slashRe = process.platform === "win32" ? /\\|[/]/ : /[/]/;
|
||||
const slashRe = isWindows ? /\\|[/]/ : /[/]/;
|
||||
const pkgurlRe = /^(https?|git(|\+https?|\+ssh|\+file)):\/\//;
|
||||
const localtgzRe = /^([a-zA-Z]:|\/).+tgz$/;
|
||||
|
||||
@@ -225,7 +228,7 @@ async function installModule(module,version,url) {
|
||||
let extraArgs = triggerPayload.args || [];
|
||||
let args = ['install', ...extraArgs, installName]
|
||||
log.trace(npmCommand + JSON.stringify(args));
|
||||
return exec.run(npmCommand,args,{ cwd: installDir}, true)
|
||||
return exec.run(npmCommand,args,{ cwd: installDir, shell: true }, true)
|
||||
} else {
|
||||
log.trace("skipping npm install");
|
||||
}
|
||||
@@ -260,7 +263,7 @@ async function installModule(module,version,url) {
|
||||
log.warn("------------------------------------------");
|
||||
e = new Error(log._("server.install.install-failed")+": "+err.toString());
|
||||
if (err.hook === "postInstall") {
|
||||
return exec.run(npmCommand,["remove",module],{ cwd: installDir}, false).finally(() => {
|
||||
return exec.run(npmCommand,["remove",module],{ cwd: installDir, shell: true }, false).finally(() => {
|
||||
throw e;
|
||||
})
|
||||
}
|
||||
@@ -356,7 +359,7 @@ async function getModuleVersionFromNPM(module, version) {
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
child_process.execFile(npmCommand,['info','--json',installName],function(err,stdout,stderr) {
|
||||
child_process.execFile(npmCommand,['info','--json',installName],{ shell: true },function(err,stdout,stderr) {
|
||||
try {
|
||||
if (!stdout) {
|
||||
log.warn(log._("server.install.install-failed-not-found",{name:module}));
|
||||
@@ -511,7 +514,7 @@ function uninstallModule(module) {
|
||||
let extraArgs = triggerPayload.args || [];
|
||||
let args = ['remove', ...extraArgs, module]
|
||||
log.trace(npmCommand + JSON.stringify(args));
|
||||
return exec.run(npmCommand,args,{ cwd: installDir}, true)
|
||||
return exec.run(npmCommand,args,{ cwd: installDir, shell: true }, true)
|
||||
} else {
|
||||
log.trace("skipping npm uninstall");
|
||||
}
|
||||
@@ -578,7 +581,7 @@ async function checkPrereq() {
|
||||
installerEnabled = false;
|
||||
} else {
|
||||
return new Promise(resolve => {
|
||||
child_process.execFile(npmCommand,['-v'],function(err,stdout) {
|
||||
child_process.execFile(npmCommand,['-v'],{ shell: true },function(err,stdout) {
|
||||
if (err) {
|
||||
log.info(log._("server.palette-editor.npm-not-found"));
|
||||
installerEnabled = false;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/registry",
|
||||
"version": "3.1.8",
|
||||
"version": "3.1.9",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
@@ -16,11 +16,11 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@node-red/util": "3.1.8",
|
||||
"@node-red/util": "3.1.9",
|
||||
"clone": "2.1.2",
|
||||
"fs-extra": "11.1.1",
|
||||
"semver": "7.5.4",
|
||||
"tar": "6.1.13",
|
||||
"tar": "6.2.1",
|
||||
"uglify-js": "3.17.4"
|
||||
}
|
||||
}
|
||||
|
@@ -678,6 +678,9 @@ class Flow {
|
||||
if (logMessage.hasOwnProperty('stack')) {
|
||||
errorMessage.error.stack = logMessage.stack;
|
||||
}
|
||||
if (logMessage.hasOwnProperty('cause')) {
|
||||
errorMessage.error.cause = logMessage.cause;
|
||||
}
|
||||
targetCatchNode.receive(errorMessage);
|
||||
handled = true;
|
||||
});
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/runtime",
|
||||
"version": "3.1.8",
|
||||
"version": "3.1.9",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
@@ -16,8 +16,8 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@node-red/registry": "3.1.8",
|
||||
"@node-red/util": "3.1.8",
|
||||
"@node-red/registry": "3.1.9",
|
||||
"@node-red/util": "3.1.9",
|
||||
"async-mutex": "0.4.0",
|
||||
"clone": "2.1.2",
|
||||
"express": "4.19.2",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/util",
|
||||
"version": "3.1.8",
|
||||
"version": "3.1.9",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
10
packages/node_modules/node-red/package.json
vendored
10
packages/node_modules/node-red/package.json
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red",
|
||||
"version": "3.1.8",
|
||||
"version": "3.1.9",
|
||||
"description": "Low-code programming for event-driven applications",
|
||||
"homepage": "https://nodered.org",
|
||||
"license": "Apache-2.0",
|
||||
@@ -31,10 +31,10 @@
|
||||
"flow"
|
||||
],
|
||||
"dependencies": {
|
||||
"@node-red/editor-api": "3.1.8",
|
||||
"@node-red/runtime": "3.1.8",
|
||||
"@node-red/util": "3.1.8",
|
||||
"@node-red/nodes": "3.1.8",
|
||||
"@node-red/editor-api": "3.1.9",
|
||||
"@node-red/runtime": "3.1.9",
|
||||
"@node-red/util": "3.1.9",
|
||||
"@node-red/nodes": "3.1.9",
|
||||
"basic-auth": "2.0.1",
|
||||
"bcryptjs": "2.4.3",
|
||||
"express": "4.19.2",
|
||||
|
@@ -13,7 +13,7 @@
|
||||
// 4. Edit your settings file to set the theme:
|
||||
// editorTheme: {
|
||||
// page: {
|
||||
// css: "/path/to/file/generated/by/this/script"
|
||||
// css: '/path/to/file/generated/by/this/script'
|
||||
// }
|
||||
// }
|
||||
//
|
||||
@@ -22,110 +22,69 @@
|
||||
|
||||
|
||||
|
||||
const os = require("os");
|
||||
const nopt = require("nopt");
|
||||
const path = require("path");
|
||||
const fs = require("fs-extra");
|
||||
const sass = require("sass");
|
||||
const os = require('os');
|
||||
const nopt = require('nopt');
|
||||
const path = require('path');
|
||||
const fs = require('fs-extra');
|
||||
const sass = require('sass');
|
||||
|
||||
const knownOpts = {
|
||||
"help": Boolean,
|
||||
"long": Boolean,
|
||||
"in": [path],
|
||||
"out": [path]
|
||||
'help': Boolean,
|
||||
'long': Boolean,
|
||||
'in': [path],
|
||||
'out': [path]
|
||||
};
|
||||
const shortHands = {
|
||||
"?":["--help"]
|
||||
'?':['--help']
|
||||
};
|
||||
nopt.invalidHandler = function(k,v,t) {}
|
||||
|
||||
const parsedArgs = nopt(knownOpts,shortHands,process.argv,2)
|
||||
|
||||
if (parsedArgs.help) {
|
||||
console.log("Usage: build-custom-theme [-?] [--in FILE] [--out FILE]");
|
||||
console.log("");
|
||||
console.log("Options:");
|
||||
console.log(" --in FILE Custom colors sass file");
|
||||
console.log(" --out FILE Where you write the result");
|
||||
console.log(" --long Do not compress the output");
|
||||
console.log(" -?, --help Show this help");
|
||||
console.log("");
|
||||
process.exit();
|
||||
showUsageAndExit(0)
|
||||
}
|
||||
|
||||
|
||||
const ruleRegex = /(\$.*?) *: *(\S[\S\s]*?);/g;
|
||||
var match;
|
||||
|
||||
const customColors = {};
|
||||
|
||||
if (parsedArgs.in && fs.existsSync(parsedArgs.in)) {
|
||||
let customColorsFile = fs.readFileSync(parsedArgs.in,"utf-8");
|
||||
while((match = ruleRegex.exec(customColorsFile)) !== null) {
|
||||
customColors[match[1]] = match[2];
|
||||
}
|
||||
if (!parsedArgs.in) {
|
||||
console.warn('Missing argument: in')
|
||||
showUsageAndExit(1)
|
||||
}
|
||||
|
||||
// Load base colours
|
||||
let colorsFile = fs.readFileSync(path.join(__dirname,"../packages/node_modules/@node-red/editor-client/src/sass/colors.scss"),"utf-8")
|
||||
let updatedColors = [];
|
||||
|
||||
while((match = ruleRegex.exec(colorsFile)) !== null) {
|
||||
updatedColors.push(match[1]+": "+(customColors[match[1]]||match[2])+";")
|
||||
}
|
||||
|
||||
|
||||
(async function() {
|
||||
const tmpDir = os.tmpdir();
|
||||
const workingDir = await fs.mkdtemp(`${tmpDir}${path.sep}`);
|
||||
await fs.copy(path.join(__dirname,"../packages/node_modules/@node-red/editor-client/src/sass/"),workingDir)
|
||||
await fs.writeFile(path.join(workingDir,"colors.scss"),updatedColors.join("\n"))
|
||||
|
||||
const result = sass.renderSync({
|
||||
outputStyle: "expanded",
|
||||
file: path.join(workingDir,"style-custom-theme.scss"),
|
||||
});
|
||||
await fs.copy(path.join(__dirname, '../packages/node_modules/@node-red/editor-client/src/sass/'), workingDir);
|
||||
await fs.copyFile(parsedArgs.in, path.join(workingDir,'colors.scss'));
|
||||
|
||||
const css = result.css.toString()
|
||||
const lines = css.split("\n");
|
||||
const colorCSS = []
|
||||
const nonColorCSS = [];
|
||||
const output = sass.compile(
|
||||
path.join(workingDir, 'style-custom-theme.scss'),
|
||||
{style: parsedArgs.long === true ? 'expanded' : 'compressed'}
|
||||
);
|
||||
|
||||
let inKeyFrameBlock = false;
|
||||
|
||||
lines.forEach(l => {
|
||||
if (inKeyFrameBlock) {
|
||||
nonColorCSS.push(l);
|
||||
if (/^}/.test(l)) {
|
||||
inKeyFrameBlock = false;
|
||||
}
|
||||
} else if (/^@keyframes/.test(l)) {
|
||||
nonColorCSS.push(l);
|
||||
inKeyFrameBlock = true;
|
||||
} else if (!/^ /.test(l)) {
|
||||
colorCSS.push(l);
|
||||
nonColorCSS.push(l);
|
||||
} else if (/color|border|background|fill|stroke|outline|box-shadow/.test(l)) {
|
||||
colorCSS.push(l);
|
||||
} else {
|
||||
nonColorCSS.push(l);
|
||||
}
|
||||
});
|
||||
|
||||
const nrPkg = require("../package.json");
|
||||
const nrPkg = require('../package.json');
|
||||
const now = new Date().toISOString();
|
||||
const header = `/*\n* Theme generated with Node-RED ${nrPkg.version} on ${now}\n*/`;
|
||||
|
||||
const header = `/*
|
||||
* Theme generated with Node-RED ${nrPkg.version} on ${now}
|
||||
*/`;
|
||||
|
||||
var output = sass.renderSync({outputStyle: parsedArgs.long?"expanded":"compressed",data:colorCSS.join("\n")});
|
||||
if (parsedArgs.out) {
|
||||
|
||||
await fs.writeFile(parsedArgs.out,header+"\n"+output.css);
|
||||
await fs.writeFile(parsedArgs.out, header+'\n'+output.css);
|
||||
} else {
|
||||
console.log(header);
|
||||
console.log(output.css.toString());
|
||||
}
|
||||
|
||||
await fs.remove(workingDir);
|
||||
})()
|
||||
|
||||
function showUsageAndExit (exitCode) {
|
||||
console.log('');
|
||||
console.log('Usage: build-custom-theme [-?] [--in FILE] [--out FILE]');
|
||||
console.log('');
|
||||
console.log('Options:');
|
||||
console.log(' --in FILE Custom colors sass file');
|
||||
console.log(' --out FILE Where you write the result');
|
||||
console.log(' --long Do not compress the output');
|
||||
console.log(' -?, --help Show this help');
|
||||
console.log('');
|
||||
process.exit(exitCode);
|
||||
}
|
@@ -390,7 +390,8 @@ describe('function node', function() {
|
||||
msg.should.have.property('level', helper.log().ERROR);
|
||||
msg.should.have.property('id', 'n1');
|
||||
msg.should.have.property('type', 'function');
|
||||
msg.should.have.property('msg', 'ReferenceError: retunr is not defined (line 2, col 1)');
|
||||
msg.should.have.property('msg')
|
||||
msg.msg.message.should.equal('ReferenceError: retunr is not defined (line 2, col 1)');
|
||||
done();
|
||||
} catch(err) {
|
||||
done(err);
|
||||
@@ -659,7 +660,8 @@ describe('function node', function() {
|
||||
msg.should.have.property('level', helper.log().ERROR);
|
||||
msg.should.have.property('id', name);
|
||||
msg.should.have.property('type', 'function');
|
||||
msg.should.have.property('msg', 'Error: Callback must be a function');
|
||||
msg.should.have.property('msg')
|
||||
msg.msg.message.should.equal('Callback must be a function');
|
||||
done();
|
||||
}
|
||||
catch (e) {
|
||||
|
Reference in New Issue
Block a user