mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Compare commits
26 Commits
4456-fix-g
...
3.1.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd32ee09ff | ||
|
|
4bb2157cab | ||
|
|
47f20cc86a | ||
|
|
5fc4526c70 | ||
|
|
9fe653f821 | ||
|
|
55da21ed15 | ||
|
|
7ebf84f38c | ||
|
|
d42e75ebd0 | ||
|
|
28825049fe | ||
|
|
1c3644e338 | ||
|
|
2dfabb523b | ||
|
|
3e2d20e536 | ||
|
|
ee7ee083b0 | ||
|
|
21f807aa66 | ||
|
|
6b088bda12 | ||
|
|
a32ee869ae | ||
|
|
a2d7772958 | ||
|
|
6ec052be18 | ||
|
|
9c71d52d69 | ||
|
|
171c146ec5 | ||
|
|
bc6afa2164 | ||
|
|
3c036257ef | ||
|
|
6633730bf1 | ||
|
|
2964a4da5e | ||
|
|
722fe02933 | ||
|
|
60593fed4a |
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@@ -27,12 +27,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repository: 'node-red/node-red.github.io'
|
repository: 'node-red/node-red.github.io'
|
||||||
path: 'node-red.github.io'
|
path: 'node-red.github.io'
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '16'
|
node-version: '16'
|
||||||
- run: node ./node-red/.github/scripts/update-node-red-docker.js
|
- run: node ./node-red/.github/scripts/update-node-red-docker.js
|
||||||
- name: Create Docker Pull Request
|
- name: Create Docker Pull Request
|
||||||
uses: peter-evans/create-pull-request@v2
|
uses: peter-evans/create-pull-request@v5
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.NR_REPO_TOKEN }}
|
token: ${{ secrets.NR_REPO_TOKEN }}
|
||||||
committer: GitHub <noreply@github.com>
|
committer: GitHub <noreply@github.com>
|
||||||
@@ -48,7 +48,7 @@ jobs:
|
|||||||
This PR was auto-generated by a GitHub Action. Any questions, speak to @knolleary
|
This PR was auto-generated by a GitHub Action. Any questions, speak to @knolleary
|
||||||
- run: node ./node-red/.github/scripts/update-node-red-website.js
|
- run: node ./node-red/.github/scripts/update-node-red-website.js
|
||||||
- name: Create Website Pull Request
|
- name: Create Website Pull Request
|
||||||
uses: peter-evans/create-pull-request@v2
|
uses: peter-evans/create-pull-request@v5
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.NR_REPO_TOKEN }}
|
token: ${{ secrets.NR_REPO_TOKEN }}
|
||||||
committer: GitHub <noreply@github.com>
|
committer: GitHub <noreply@github.com>
|
||||||
|
|||||||
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
|
|||||||
54
CHANGELOG.md
54
CHANGELOG.md
@@ -1,3 +1,57 @@
|
|||||||
|
#### 3.1.1: Maintenance Release
|
||||||
|
|
||||||
|
Editor
|
||||||
|
|
||||||
|
- Fix debug filter (#4461) @knolleary
|
||||||
|
- Fix various issues with debug pop-out window (#4459) @knolleary
|
||||||
|
- Ensure subflow instances keep track of their groups (#4457) @knolleary
|
||||||
|
- Fix `validateNodeProperty` without validator provided (#4455) @GogoVega
|
||||||
|
- Debounce node-removed notifications (#4453) @knolleary
|
||||||
|
- Don't try to load the parents of the first commit (#4448) @bonanitech
|
||||||
|
- Allow a theme to specifiy which theme mermaid should use (#4441) @knolleary
|
||||||
|
- Update browser title with flow name if set (#4427) @knolleary
|
||||||
|
- Ensure typeSearch handles undefined node definitions (#4423) @knolleary
|
||||||
|
- Ensure group w/h are imported if present (#4426) @knolleary
|
||||||
|
- Hide node status background when there is no status to show (#4425) @knolleary
|
||||||
|
- Add a close button to the restart-required notification (#4407) @knolleary
|
||||||
|
- Extend typedInput "num" type validity check to NaN, binary, octal & hex (#4371) @ralphwetzel
|
||||||
|
- Fix unintended new line in node name (#4399) @kazuhitoyokoi
|
||||||
|
- Ctrl-Enter does not close tray (Monaco) #4377 (#4382) @hazymat
|
||||||
|
- fix buffer viewer to handle 0b style binary (#4393) @dceejay
|
||||||
|
- Rework mermaid integration to support off-DOM rendering (#4364) @knolleary
|
||||||
|
- Add missing nls labels to context menu (#4365) @knolleary
|
||||||
|
|
||||||
|
Runtime
|
||||||
|
|
||||||
|
- Bump the github-actions group with 2 updates (#4404) @app/dependabot
|
||||||
|
- Handle unknown node reference inside subflow module (#4460) @knolleary
|
||||||
|
- Add modules.install audit event when external module installed (#4452) @knolleary
|
||||||
|
- Allow import of modules with subpath in specifier (#4451) @knolleary
|
||||||
|
- Update node-red-admin version (#4438) @knolleary
|
||||||
|
- Handle false-like env vars properly (#4411) @knolleary
|
||||||
|
- Only save settings once during node load process (#4409) @knolleary
|
||||||
|
- Ensure global-config nodes lookup cred values properly (#4405) @knolleary
|
||||||
|
- Handle credential env var evaluation when no value set (#4362) @knolleary
|
||||||
|
- Don't commit package-lock.json (#4354) @bonanitech
|
||||||
|
- Fix env evaluation when one env references another in the same object (#4361) @knolleary
|
||||||
|
- Add dependabot for Github Actions (#4312) @Rotzbua
|
||||||
|
- Update outdated Github Actions (#4311) @Rotzbua
|
||||||
|
- github: Request `npm run test` in PR template (#4348) @ZJvandeWeg
|
||||||
|
- Add French translation of v3.1.0-beta.4 changes + slight improvements (#4329) @GogoVega
|
||||||
|
- Handle nodes with multiple input handlers properly (#4332) @knolleary
|
||||||
|
- Soften the language around unrequited PRs (#4351) @knolleary
|
||||||
|
|
||||||
|
Nodes
|
||||||
|
|
||||||
|
- CSV: make CSV export way faster by not re-allocating and handling huge string (#4349) @Fadoli
|
||||||
|
- Delay: Fix regression in delay node to not pass on msg.reset (#4350) @dceejay
|
||||||
|
- Link Call: Handle undefined linkType value for existing link-call nodes (#4331) @knolleary
|
||||||
|
- MQTT: Guard against node.broker being undefined (#4454) @knolleary
|
||||||
|
- MQTT: check topic length > 0 before publish (#4416) @dceejay
|
||||||
|
- Switch/Change: Improve validation of switch/change node rules (#4368) @knolleary
|
||||||
|
- Template: Fix height of description editor in template node (#4346) @kazuhitoyokoi
|
||||||
|
- Various: Add validators to any fields using msg-typed Input (#4440) @knolleary
|
||||||
|
|
||||||
#### 3.1.0: Milestone Release
|
#### 3.1.0: Milestone Release
|
||||||
|
|
||||||
Editor
|
Editor
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red",
|
"name": "node-red",
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"description": "Low-code programming for event-driven applications",
|
"description": "Low-code programming for event-driven applications",
|
||||||
"homepage": "https://nodered.org",
|
"homepage": "https://nodered.org",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@node-red/editor-api",
|
"name": "@node-red/editor-api",
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -16,8 +16,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@node-red/util": "3.1.0",
|
"@node-red/util": "3.1.1",
|
||||||
"@node-red/editor-client": "3.1.0",
|
"@node-red/editor-client": "3.1.1",
|
||||||
"bcryptjs": "2.4.3",
|
"bcryptjs": "2.4.3",
|
||||||
"body-parser": "1.20.2",
|
"body-parser": "1.20.2",
|
||||||
"clone": "2.1.2",
|
"clone": "2.1.2",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@node-red/editor-client",
|
"name": "@node-red/editor-client",
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -534,6 +534,10 @@ var RED = (function() {
|
|||||||
RED.view.redrawStatus(node);
|
RED.view.redrawStatus(node);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let pendingNodeRemovedNotifications = []
|
||||||
|
let pendingNodeRemovedTimeout
|
||||||
|
|
||||||
RED.comms.subscribe("notification/node/#",function(topic,msg) {
|
RED.comms.subscribe("notification/node/#",function(topic,msg) {
|
||||||
var i,m;
|
var i,m;
|
||||||
var typeList;
|
var typeList;
|
||||||
@@ -571,8 +575,15 @@ var RED = (function() {
|
|||||||
m = msg[i];
|
m = msg[i];
|
||||||
info = RED.nodes.removeNodeSet(m.id);
|
info = RED.nodes.removeNodeSet(m.id);
|
||||||
if (info.added) {
|
if (info.added) {
|
||||||
typeList = "<ul><li>"+m.types.map(RED.utils.sanitize).join("</li><li>")+"</li></ul>";
|
pendingNodeRemovedNotifications = pendingNodeRemovedNotifications.concat(m.types.map(RED.utils.sanitize))
|
||||||
RED.notify(RED._("palette.event.nodeRemoved", {count:m.types.length})+typeList,"success");
|
if (pendingNodeRemovedTimeout) {
|
||||||
|
clearTimeout(pendingNodeRemovedTimeout)
|
||||||
|
}
|
||||||
|
pendingNodeRemovedTimeout = setTimeout(function () {
|
||||||
|
typeList = "<ul><li>"+pendingNodeRemovedNotifications.join("</li><li>")+"</li></ul>";
|
||||||
|
RED.notify(RED._("palette.event.nodeRemoved", {count:pendingNodeRemovedNotifications.length})+typeList,"success");
|
||||||
|
pendingNodeRemovedNotifications = []
|
||||||
|
}, 200)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadIconList();
|
loadIconList();
|
||||||
|
|||||||
@@ -182,6 +182,17 @@ RED.editor = (function() {
|
|||||||
error: err.message
|
error: err.message
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else if (valid) {
|
||||||
|
// If the validator is not provided in node property => Check if the input has a validator
|
||||||
|
if ("category" in node._def) {
|
||||||
|
const isConfig = node._def.category === "config";
|
||||||
|
const prefix = isConfig ? "node-config-input" : "node-input";
|
||||||
|
const input = $("#"+prefix+"-"+property);
|
||||||
|
const isTypedInput = input.length > 0 && input.next(".red-ui-typedInput-container").length > 0;
|
||||||
|
if (isTypedInput) {
|
||||||
|
valid = input.typedInput("validate");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (valid && definition[property].type && RED.nodes.getType(definition[property].type) && !("validate" in definition[property])) {
|
if (valid && definition[property].type && RED.nodes.getType(definition[property].type) && !("validate" in definition[property])) {
|
||||||
if (!value || value == "_ADD_") {
|
if (!value || value == "_ADD_") {
|
||||||
|
|||||||
@@ -647,9 +647,9 @@ RED.sidebar.versionControl = (function() {
|
|||||||
$.getJSON("projects/"+activeProject.name+"/commits/"+entry.sha,function(result) {
|
$.getJSON("projects/"+activeProject.name+"/commits/"+entry.sha,function(result) {
|
||||||
result.project = activeProject;
|
result.project = activeProject;
|
||||||
result.parents = entry.parents;
|
result.parents = entry.parents;
|
||||||
result.oldRev = entry.sha+"~1";
|
result.oldRev = entry.parents[0].length !== 0 ? entry.sha+"~1" : entry.sha;
|
||||||
result.newRev = entry.sha;
|
result.newRev = entry.sha;
|
||||||
result.oldRevTitle = RED._("sidebar.project.versionControl.commitCapital")+" "+entry.sha.substring(0,7)+"~1";
|
result.oldRevTitle = entry.parents[0].length !== 0 ? RED._("sidebar.project.versionControl.commitCapital")+" "+entry.sha.substring(0,7)+"~1" : " ";
|
||||||
result.newRevTitle = RED._("sidebar.project.versionControl.commitCapital")+" "+entry.sha.substring(0,7);
|
result.newRevTitle = RED._("sidebar.project.versionControl.commitCapital")+" "+entry.sha.substring(0,7);
|
||||||
result.date = humanizeSinceDate(parseInt(entry.date));
|
result.date = humanizeSinceDate(parseInt(entry.date));
|
||||||
RED.diff.showCommitDiff(result);
|
RED.diff.showCommitDiff(result);
|
||||||
|
|||||||
@@ -40,9 +40,22 @@ RED.validators = {
|
|||||||
return opt ? RED._("validator.errors.invalid-regexp") : false;
|
return opt ? RED._("validator.errors.invalid-regexp") : false;
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
typedInput: function(ptypeName,isConfig,mopt) {
|
typedInput: function(ptypeName, isConfig, mopt) {
|
||||||
|
let options = ptypeName
|
||||||
|
if (typeof ptypeName === 'string' ) {
|
||||||
|
options = {}
|
||||||
|
options.typeField = ptypeName
|
||||||
|
options.isConfig = isConfig
|
||||||
|
options.allowBlank = false
|
||||||
|
}
|
||||||
return function(v, opt) {
|
return function(v, opt) {
|
||||||
var ptype = $("#node-"+(isConfig?"config-":"")+"input-"+ptypeName).val() || this[ptypeName];
|
let ptype = options.type
|
||||||
|
if (!ptype && options.typeField) {
|
||||||
|
ptype = $("#node-"+(options.isConfig?"config-":"")+"input-"+options.typeField).val() || this[options.typeField];
|
||||||
|
}
|
||||||
|
if (options.allowBlank && v === '') {
|
||||||
|
return true
|
||||||
|
}
|
||||||
const result = RED.utils.validateTypedProperty(v, ptype, opt)
|
const result = RED.utils.validateTypedProperty(v, ptype, opt)
|
||||||
if (result === true || opt) {
|
if (result === true || opt) {
|
||||||
// Valid, or opt provided - return result as-is
|
// Valid, or opt provided - return result as-is
|
||||||
|
|||||||
@@ -195,6 +195,119 @@
|
|||||||
node.dirty = true;
|
node.dirty = true;
|
||||||
});
|
});
|
||||||
RED.view.redraw();
|
RED.view.redraw();
|
||||||
|
},
|
||||||
|
requestDebugNodeList: function(filteredNodes) {
|
||||||
|
var workspaceOrder = RED.nodes.getWorkspaceOrder();
|
||||||
|
var workspaceOrderMap = {};
|
||||||
|
workspaceOrder.forEach(function(ws,i) {
|
||||||
|
workspaceOrderMap[ws] = i;
|
||||||
|
});
|
||||||
|
|
||||||
|
var candidateNodes = [];
|
||||||
|
var candidateSFs = [];
|
||||||
|
var subflows = {};
|
||||||
|
RED.nodes.eachNode(function (n) {
|
||||||
|
var nt = n.type;
|
||||||
|
if (nt === "debug") {
|
||||||
|
if (n.z in workspaceOrderMap) {
|
||||||
|
candidateNodes.push(n);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var sf = RED.nodes.subflow(n.z);
|
||||||
|
if (sf) {
|
||||||
|
subflows[sf.id] = {
|
||||||
|
debug: true,
|
||||||
|
subflows: {}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(nt.substring(0, 8) === "subflow:") {
|
||||||
|
if (n.z in workspaceOrderMap) {
|
||||||
|
candidateSFs.push(n);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var psf = RED.nodes.subflow(n.z);
|
||||||
|
if (psf) {
|
||||||
|
var sid = nt.substring(8);
|
||||||
|
var item = subflows[psf.id];
|
||||||
|
if (!item) {
|
||||||
|
item = {
|
||||||
|
debug: undefined,
|
||||||
|
subflows: {}
|
||||||
|
};
|
||||||
|
subflows[psf.id] = item;
|
||||||
|
}
|
||||||
|
item.subflows[sid] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
candidateSFs.forEach(function (sf) {
|
||||||
|
var sid = sf.type.substring(8);
|
||||||
|
if (containsDebug(sid, subflows)) {
|
||||||
|
candidateNodes.push(sf);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
candidateNodes.sort(function(A,B) {
|
||||||
|
var wsA = workspaceOrderMap[A.z];
|
||||||
|
var wsB = workspaceOrderMap[B.z];
|
||||||
|
if (wsA !== wsB) {
|
||||||
|
return wsA-wsB;
|
||||||
|
}
|
||||||
|
var labelA = RED.utils.getNodeLabel(A,A.id);
|
||||||
|
var labelB = RED.utils.getNodeLabel(B,B.id);
|
||||||
|
return labelA.localeCompare(labelB);
|
||||||
|
});
|
||||||
|
var currentWs = null;
|
||||||
|
var data = [];
|
||||||
|
var currentFlow;
|
||||||
|
var currentSelectedCount = 0;
|
||||||
|
candidateNodes.forEach(function(node) {
|
||||||
|
if (currentWs !== node.z) {
|
||||||
|
if (currentFlow && currentFlow.checkbox) {
|
||||||
|
currentFlow.selected = currentSelectedCount === currentFlow.children.length
|
||||||
|
}
|
||||||
|
currentSelectedCount = 0;
|
||||||
|
currentWs = node.z;
|
||||||
|
var parent = RED.nodes.workspace(currentWs) || RED.nodes.subflow(currentWs);
|
||||||
|
currentFlow = {
|
||||||
|
label: RED.utils.getNodeLabel(parent, currentWs),
|
||||||
|
}
|
||||||
|
if (!parent.disabled) {
|
||||||
|
currentFlow.children = [];
|
||||||
|
currentFlow.checkbox = true;
|
||||||
|
} else {
|
||||||
|
currentFlow.class = "disabled"
|
||||||
|
}
|
||||||
|
data.push(currentFlow);
|
||||||
|
}
|
||||||
|
if (currentFlow.children) {
|
||||||
|
if (!filteredNodes[node.id]) {
|
||||||
|
currentSelectedCount++;
|
||||||
|
}
|
||||||
|
currentFlow.children.push({
|
||||||
|
label: RED.utils.getNodeLabel(node,node.id),
|
||||||
|
node: {
|
||||||
|
id: node.id
|
||||||
|
},
|
||||||
|
checkbox: true,
|
||||||
|
selected: !filteredNodes[node.id]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (currentFlow && currentFlow.checkbox) {
|
||||||
|
currentFlow.selected = currentSelectedCount === currentFlow.children.length
|
||||||
|
}
|
||||||
|
if (subWindow) {
|
||||||
|
try {
|
||||||
|
subWindow.postMessage({event:"refreshDebugNodeList", nodes:data},"*");
|
||||||
|
} catch(err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RED.debug.refreshDebugNodeList(data)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -396,6 +509,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function containsDebug(sid, map) {
|
||||||
|
var item = map[sid];
|
||||||
|
if (item) {
|
||||||
|
if (item.debug === undefined) {
|
||||||
|
var sfs = Object.keys(item.subflows);
|
||||||
|
var contain = false;
|
||||||
|
for (var i = 0; i < sfs.length; i++) {
|
||||||
|
var sf = sfs[i];
|
||||||
|
if (containsDebug(sf, map)) {
|
||||||
|
contain = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
item.debug = contain;
|
||||||
|
}
|
||||||
|
return item.debug;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$("#red-ui-sidebar-debug-open").on("click", function(e) {
|
$("#red-ui-sidebar-debug-open").on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
subWindow = window.open(document.location.toString().replace(/[?#].*$/,"")+"debug/view/view.html"+document.location.search,"nodeREDDebugView","menubar=no,location=no,toolbar=no,chrome,height=500,width=600");
|
subWindow = window.open(document.location.toString().replace(/[?#].*$/,"")+"debug/view/view.html"+document.location.search,"nodeREDDebugView","menubar=no,location=no,toolbar=no,chrome,height=500,width=600");
|
||||||
@@ -427,6 +560,8 @@
|
|||||||
options.messageSourceClick(msg.id,msg._alias,msg.path);
|
options.messageSourceClick(msg.id,msg._alias,msg.path);
|
||||||
} else if (msg.event === "clear") {
|
} else if (msg.event === "clear") {
|
||||||
options.clear();
|
options.clear();
|
||||||
|
} else if (msg.event === "requestDebugNodeList") {
|
||||||
|
options.requestDebugNodeList(msg.filteredNodes)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
window.addEventListener('message',this.handleWindowMessage);
|
window.addEventListener('message',this.handleWindowMessage);
|
||||||
|
|||||||
@@ -167,19 +167,13 @@ RED.debug = (function() {
|
|||||||
var menu = RED.popover.menu({
|
var menu = RED.popover.menu({
|
||||||
options: options,
|
options: options,
|
||||||
onselect: function(item) {
|
onselect: function(item) {
|
||||||
if (item.value !== filterType) {
|
setFilterType(item.value)
|
||||||
filterType = item.value;
|
|
||||||
$('#red-ui-sidebar-debug-filter span').text(RED._('node-red:debug.sidebar.'+filterType));
|
|
||||||
refreshMessageList();
|
|
||||||
RED.settings.set("debug.filter",filterType)
|
|
||||||
}
|
|
||||||
if (filterType === 'filterSelected') {
|
if (filterType === 'filterSelected') {
|
||||||
refreshDebugNodeList();
|
config.requestDebugNodeList(filteredNodes);
|
||||||
filterDialog.slideDown(200);
|
filterDialog.slideDown(200);
|
||||||
filterDialogShown = true;
|
filterDialogShown = true;
|
||||||
debugNodeTreeList.focus();
|
debugNodeTreeList.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.show({
|
menu.show({
|
||||||
@@ -254,131 +248,7 @@ RED.debug = (function() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function refreshDebugNodeList(data) {
|
||||||
function containsDebug(sid, map) {
|
|
||||||
var item = map[sid];
|
|
||||||
if (item) {
|
|
||||||
if (item.debug === undefined) {
|
|
||||||
var sfs = Object.keys(item.subflows);
|
|
||||||
var contain = false;
|
|
||||||
for (var i = 0; i < sfs.length; i++) {
|
|
||||||
var sf = sfs[i];
|
|
||||||
if (containsDebug(sf, map)) {
|
|
||||||
contain = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
item.debug = contain;
|
|
||||||
}
|
|
||||||
return item.debug;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function refreshDebugNodeList() {
|
|
||||||
var workspaceOrder = RED.nodes.getWorkspaceOrder();
|
|
||||||
var workspaceOrderMap = {};
|
|
||||||
workspaceOrder.forEach(function(ws,i) {
|
|
||||||
workspaceOrderMap[ws] = i;
|
|
||||||
});
|
|
||||||
|
|
||||||
var candidateNodes = [];
|
|
||||||
var candidateSFs = [];
|
|
||||||
var subflows = {};
|
|
||||||
RED.nodes.eachNode(function (n) {
|
|
||||||
var nt = n.type;
|
|
||||||
if (nt === "debug") {
|
|
||||||
if (n.z in workspaceOrderMap) {
|
|
||||||
candidateNodes.push(n);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
var sf = RED.nodes.subflow(n.z);
|
|
||||||
if (sf) {
|
|
||||||
subflows[sf.id] = {
|
|
||||||
debug: true,
|
|
||||||
subflows: {}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(nt.substring(0, 8) === "subflow:") {
|
|
||||||
if (n.z in workspaceOrderMap) {
|
|
||||||
candidateSFs.push(n);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
var psf = RED.nodes.subflow(n.z);
|
|
||||||
if (psf) {
|
|
||||||
var sid = nt.substring(8);
|
|
||||||
var item = subflows[psf.id];
|
|
||||||
if (!item) {
|
|
||||||
item = {
|
|
||||||
debug: undefined,
|
|
||||||
subflows: {}
|
|
||||||
};
|
|
||||||
subflows[psf.id] = item;
|
|
||||||
}
|
|
||||||
item.subflows[sid] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
candidateSFs.forEach(function (sf) {
|
|
||||||
var sid = sf.type.substring(8);
|
|
||||||
if (containsDebug(sid, subflows)) {
|
|
||||||
candidateNodes.push(sf);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
candidateNodes.sort(function(A,B) {
|
|
||||||
var wsA = workspaceOrderMap[A.z];
|
|
||||||
var wsB = workspaceOrderMap[B.z];
|
|
||||||
if (wsA !== wsB) {
|
|
||||||
return wsA-wsB;
|
|
||||||
}
|
|
||||||
var labelA = RED.utils.getNodeLabel(A,A.id);
|
|
||||||
var labelB = RED.utils.getNodeLabel(B,B.id);
|
|
||||||
return labelA.localeCompare(labelB);
|
|
||||||
});
|
|
||||||
var currentWs = null;
|
|
||||||
var data = [];
|
|
||||||
var currentFlow;
|
|
||||||
var currentSelectedCount = 0;
|
|
||||||
candidateNodes.forEach(function(node) {
|
|
||||||
if (currentWs !== node.z) {
|
|
||||||
if (currentFlow && currentFlow.checkbox) {
|
|
||||||
currentFlow.selected = currentSelectedCount === currentFlow.children.length
|
|
||||||
}
|
|
||||||
currentSelectedCount = 0;
|
|
||||||
currentWs = node.z;
|
|
||||||
var parent = RED.nodes.workspace(currentWs) || RED.nodes.subflow(currentWs);
|
|
||||||
currentFlow = {
|
|
||||||
label: RED.utils.getNodeLabel(parent, currentWs),
|
|
||||||
}
|
|
||||||
if (!parent.disabled) {
|
|
||||||
currentFlow.children = [];
|
|
||||||
currentFlow.checkbox = true;
|
|
||||||
} else {
|
|
||||||
currentFlow.class = "disabled"
|
|
||||||
}
|
|
||||||
data.push(currentFlow);
|
|
||||||
}
|
|
||||||
if (currentFlow.children) {
|
|
||||||
if (!filteredNodes[node.id]) {
|
|
||||||
currentSelectedCount++;
|
|
||||||
}
|
|
||||||
currentFlow.children.push({
|
|
||||||
label: RED.utils.getNodeLabel(node,node.id),
|
|
||||||
node: node,
|
|
||||||
checkbox: true,
|
|
||||||
selected: !filteredNodes[node.id]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (currentFlow && currentFlow.checkbox) {
|
|
||||||
currentFlow.selected = currentSelectedCount === currentFlow.children.length
|
|
||||||
}
|
|
||||||
|
|
||||||
debugNodeTreeList.treeList("data", data);
|
debugNodeTreeList.treeList("data", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -401,7 +271,7 @@ RED.debug = (function() {
|
|||||||
},200);
|
},200);
|
||||||
}
|
}
|
||||||
function _refreshMessageList(_activeWorkspace) {
|
function _refreshMessageList(_activeWorkspace) {
|
||||||
if (_activeWorkspace) {
|
if (typeof _activeWorkspace === 'string') {
|
||||||
activeWorkspace = _activeWorkspace.replace(/\./g,"_");
|
activeWorkspace = _activeWorkspace.replace(/\./g,"_");
|
||||||
}
|
}
|
||||||
if (filterType === "filterAll") {
|
if (filterType === "filterAll") {
|
||||||
@@ -479,12 +349,12 @@ RED.debug = (function() {
|
|||||||
filteredNodes[n.id] = true;
|
filteredNodes[n.id] = true;
|
||||||
});
|
});
|
||||||
delete filteredNodes[sourceId];
|
delete filteredNodes[sourceId];
|
||||||
$("#red-ui-sidebar-debug-filterSelected").trigger("click");
|
|
||||||
RED.settings.set('debug.filteredNodes',Object.keys(filteredNodes))
|
RED.settings.set('debug.filteredNodes',Object.keys(filteredNodes))
|
||||||
|
setFilterType('filterSelected')
|
||||||
refreshMessageList();
|
refreshMessageList();
|
||||||
}},
|
}},
|
||||||
{id:"red-ui-debug-msg-menu-item-clear-filter",label:RED._("node-red:debug.messageMenu.clearFilter"),onselect:function(){
|
{id:"red-ui-debug-msg-menu-item-clear-filter",label:RED._("node-red:debug.messageMenu.clearFilter"),onselect:function(){
|
||||||
$("#red-ui-sidebar-debug-filterAll").trigger("click");
|
clearFilterSettings()
|
||||||
refreshMessageList();
|
refreshMessageList();
|
||||||
}}
|
}}
|
||||||
);
|
);
|
||||||
@@ -713,9 +583,17 @@ RED.debug = (function() {
|
|||||||
if (!!clearFilter) {
|
if (!!clearFilter) {
|
||||||
clearFilterSettings();
|
clearFilterSettings();
|
||||||
}
|
}
|
||||||
refreshDebugNodeList();
|
config.requestDebugNodeList(filteredNodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setFilterType(type) {
|
||||||
|
if (type !== filterType) {
|
||||||
|
filterType = type;
|
||||||
|
$('#red-ui-sidebar-debug-filter span').text(RED._('node-red:debug.sidebar.'+filterType));
|
||||||
|
refreshMessageList();
|
||||||
|
RED.settings.set("debug.filter",filterType)
|
||||||
|
}
|
||||||
|
}
|
||||||
function clearFilterSettings() {
|
function clearFilterSettings() {
|
||||||
filteredNodes = {};
|
filteredNodes = {};
|
||||||
filterType = 'filterAll';
|
filterType = 'filterAll';
|
||||||
@@ -728,6 +606,7 @@ RED.debug = (function() {
|
|||||||
init: init,
|
init: init,
|
||||||
refreshMessageList:refreshMessageList,
|
refreshMessageList:refreshMessageList,
|
||||||
handleDebugMessage: handleDebugMessage,
|
handleDebugMessage: handleDebugMessage,
|
||||||
clearMessageList: clearMessageList
|
clearMessageList: clearMessageList,
|
||||||
|
refreshDebugNodeList: refreshDebugNodeList
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ $(function() {
|
|||||||
},
|
},
|
||||||
clear: function() {
|
clear: function() {
|
||||||
window.opener.postMessage({event:"clear"},'*');
|
window.opener.postMessage({event:"clear"},'*');
|
||||||
|
},
|
||||||
|
requestDebugNodeList: function(filteredNodes) {
|
||||||
|
window.opener.postMessage({event: 'requestDebugNodeList', filteredNodes},'*')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,6 +29,8 @@ $(function() {
|
|||||||
RED.debug.refreshMessageList(evt.data.activeWorkspace);
|
RED.debug.refreshMessageList(evt.data.activeWorkspace);
|
||||||
} else if (evt.data.event === "projectChange") {
|
} else if (evt.data.event === "projectChange") {
|
||||||
RED.debug.clearMessageList(true);
|
RED.debug.clearMessageList(true);
|
||||||
|
} else if (evt.data.event === "refreshDebugNodeList") {
|
||||||
|
RED.debug.refreshDebugNodeList(evt.data.nodes)
|
||||||
}
|
}
|
||||||
},false);
|
},false);
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
|
|||||||
@@ -57,7 +57,12 @@
|
|||||||
action: {value:"scale"},
|
action: {value:"scale"},
|
||||||
round: {value:false},
|
round: {value:false},
|
||||||
property: {value:"payload",required:true,
|
property: {value:"payload",required:true,
|
||||||
label:RED._("node-red:common.label.property")},
|
label:RED._("node-red:common.label.property"),
|
||||||
|
validate: RED.validators.typedInput({ type: 'msg' })
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// RED.validators.typedInput("propertyType", false)},
|
||||||
name: {value:""}
|
name: {value:""}
|
||||||
},
|
},
|
||||||
inputs: 1,
|
inputs: 1,
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
color:"darksalmon",
|
color:"darksalmon",
|
||||||
defaults: {
|
defaults: {
|
||||||
command: {value:""},
|
command: {value:""},
|
||||||
addpay: {value:""},
|
addpay: {value:"", validate: RED.validators.typedInput({ type: 'msg', allowBlank: true })},
|
||||||
append: {value:""},
|
append: {value:""},
|
||||||
useSpawn: {value:"false"},
|
useSpawn: {value:"false"},
|
||||||
timer: {value:""},
|
timer: {value:""},
|
||||||
|
|||||||
@@ -56,9 +56,11 @@
|
|||||||
inout: {value:"out"},
|
inout: {value:"out"},
|
||||||
septopics: {value:true},
|
septopics: {value:true},
|
||||||
property: {value:"payload", required:true,
|
property: {value:"payload", required:true,
|
||||||
label:RED._("node-red:rbe.label.property")},
|
label:RED._("node-red:rbe.label.property"),
|
||||||
|
validate: RED.validators.typedInput({ type: 'msg' })},
|
||||||
topi: {value:"topic", required:true,
|
topi: {value:"topic", required:true,
|
||||||
label:RED._("node-red:rbe.label.topic")}
|
label:RED._("node-red:rbe.label.topic"),
|
||||||
|
validate: RED.validators.typedInput({ type: 'msg' })}
|
||||||
},
|
},
|
||||||
inputs:1,
|
inputs:1,
|
||||||
outputs:1,
|
outputs:1,
|
||||||
|
|||||||
@@ -612,7 +612,7 @@ module.exports = function(RED) {
|
|||||||
node.brokerurl = node.url;
|
node.brokerurl = node.url;
|
||||||
} else {
|
} else {
|
||||||
// if the broker is ws:// or wss:// or tcp://
|
// if the broker is ws:// or wss:// or tcp://
|
||||||
if (node.broker.indexOf("://") > -1) {
|
if ((typeof node.broker === 'string') && node.broker.indexOf("://") > -1) {
|
||||||
node.brokerurl = node.broker;
|
node.brokerurl = node.broker;
|
||||||
// Only for ws or wss, check if proxy env var for additional configuration
|
// Only for ws or wss, check if proxy env var for additional configuration
|
||||||
if (node.brokerurl.indexOf("wss://") > -1 || node.brokerurl.indexOf("ws://") > -1) {
|
if (node.brokerurl.indexOf("wss://") > -1 || node.brokerurl.indexOf("ws://") > -1) {
|
||||||
|
|||||||
@@ -41,8 +41,8 @@
|
|||||||
color:"#DEBD5C",
|
color:"#DEBD5C",
|
||||||
defaults: {
|
defaults: {
|
||||||
name: {value:""},
|
name: {value:""},
|
||||||
property: {value:"payload"},
|
property: {value:"payload", validate: RED.validators.typedInput({ type: 'msg' }) },
|
||||||
outproperty: {value:"payload"},
|
outproperty: {value:"payload", validate: RED.validators.typedInput({ type: 'msg' }) },
|
||||||
tag: {value:""},
|
tag: {value:""},
|
||||||
ret: {value:"html"},
|
ret: {value:"html"},
|
||||||
as: {value:"single"}
|
as: {value:"single"}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
defaults: {
|
defaults: {
|
||||||
name: {value:""},
|
name: {value:""},
|
||||||
property: {value:"payload",required:true,
|
property: {value:"payload",required:true,
|
||||||
|
validate: RED.validators.typedInput({ type: 'msg' }),
|
||||||
label:RED._("node-red:json.label.property")},
|
label:RED._("node-red:json.label.property")},
|
||||||
action: {value:""},
|
action: {value:""},
|
||||||
pretty: {value:false}
|
pretty: {value:false}
|
||||||
|
|||||||
@@ -27,7 +27,8 @@
|
|||||||
defaults: {
|
defaults: {
|
||||||
name: {value:""},
|
name: {value:""},
|
||||||
property: {value:"payload",required:true,
|
property: {value:"payload",required:true,
|
||||||
label:RED._("node-red:common.label.property")},
|
label:RED._("node-red:common.label.property"),
|
||||||
|
validate: RED.validators.typedInput({ type: 'msg' })},
|
||||||
attr: {value:""},
|
attr: {value:""},
|
||||||
chr: {value:""}
|
chr: {value:""}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
color:"#DEBD5C",
|
color:"#DEBD5C",
|
||||||
defaults: {
|
defaults: {
|
||||||
property: {value:"payload",required:true,
|
property: {value:"payload",required:true,
|
||||||
|
validate: RED.validators.typedInput({ type: 'msg' }),
|
||||||
label:RED._("node-red:common.label.property")},
|
label:RED._("node-red:common.label.property")},
|
||||||
name: {value:""}
|
name: {value:""}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
arraySplt: {value:1},
|
arraySplt: {value:1},
|
||||||
arraySpltType: {value:"len"},
|
arraySpltType: {value:"len"},
|
||||||
stream: {value:false},
|
stream: {value:false},
|
||||||
addname: {value:""}
|
addname: {value:"", validate: RED.validators.typedInput({ type: 'msg', allowBlank: true })}
|
||||||
},
|
},
|
||||||
inputs:1,
|
inputs:1,
|
||||||
outputs:1,
|
outputs:1,
|
||||||
@@ -208,7 +208,22 @@
|
|||||||
validate:RED.validators.typedInput("propertyType", false)
|
validate:RED.validators.typedInput("propertyType", false)
|
||||||
},
|
},
|
||||||
propertyType: { value:"msg"},
|
propertyType: { value:"msg"},
|
||||||
key: {value:"topic"},
|
key: {value:"topic", validate: (function () {
|
||||||
|
const typeValidator = RED.validators.typedInput({ type: 'msg' })
|
||||||
|
return function(v, opt) {
|
||||||
|
const joinMode = $("#node-input-mode").val() || this.mode
|
||||||
|
if (joinMode !== 'custom') {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
const buildType = $("#node-input-build").val() || this.build
|
||||||
|
if (buildType !== 'object') {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return typeValidator(v, opt)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})()
|
||||||
|
},
|
||||||
joiner: { value:"\\n"},
|
joiner: { value:"\\n"},
|
||||||
joinerType: { value:"str"},
|
joinerType: { value:"str"},
|
||||||
accumulate: { value:"false" },
|
accumulate: { value:"false" },
|
||||||
|
|||||||
@@ -198,7 +198,7 @@
|
|||||||
category: 'storage',
|
category: 'storage',
|
||||||
defaults: {
|
defaults: {
|
||||||
name: {value:""},
|
name: {value:""},
|
||||||
filename: {value:""},
|
filename: {value:"", validate: RED.validators.typedInput({ typeField: 'filenameType' })},
|
||||||
filenameType: {value:"str"},
|
filenameType: {value:"str"},
|
||||||
appendNewline: {value:true},
|
appendNewline: {value:true},
|
||||||
createDir: {value:false},
|
createDir: {value:false},
|
||||||
@@ -297,7 +297,7 @@
|
|||||||
category: 'storage',
|
category: 'storage',
|
||||||
defaults: {
|
defaults: {
|
||||||
name: {value:""},
|
name: {value:""},
|
||||||
filename: {value:""},
|
filename: {value:"", validate: RED.validators.typedInput({ typeField: 'filenameType' }) },
|
||||||
filenameType: {value:"str"},
|
filenameType: {value:"str"},
|
||||||
format: {value:"utf8"},
|
format: {value:"utf8"},
|
||||||
chunk: {value:false},
|
chunk: {value:false},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@node-red/nodes",
|
"name": "@node-red/nodes",
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ function requireModule(module) {
|
|||||||
const parsedModule = parseModuleName(module);
|
const parsedModule = parseModuleName(module);
|
||||||
|
|
||||||
if (BUILTIN_MODULES.indexOf(parsedModule.module) !== -1) {
|
if (BUILTIN_MODULES.indexOf(parsedModule.module) !== -1) {
|
||||||
return require(parsedModule.module);
|
return require(parsedModule.module + parsedModule.subpath);
|
||||||
}
|
}
|
||||||
if (!knownExternalModules[parsedModule.module]) {
|
if (!knownExternalModules[parsedModule.module]) {
|
||||||
const e = new Error("Module not allowed");
|
const e = new Error("Module not allowed");
|
||||||
@@ -131,7 +131,7 @@ function importModule(module) {
|
|||||||
const parsedModule = parseModuleName(module);
|
const parsedModule = parseModuleName(module);
|
||||||
|
|
||||||
if (BUILTIN_MODULES.indexOf(parsedModule.module) !== -1) {
|
if (BUILTIN_MODULES.indexOf(parsedModule.module) !== -1) {
|
||||||
return import(parsedModule.module);
|
return import(parsedModule.module + parsedModule.subpath);
|
||||||
}
|
}
|
||||||
if (!knownExternalModules[parsedModule.module]) {
|
if (!knownExternalModules[parsedModule.module]) {
|
||||||
const e = new Error("Module not allowed");
|
const e = new Error("Module not allowed");
|
||||||
@@ -152,12 +152,13 @@ function importModule(module) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function parseModuleName(module) {
|
function parseModuleName(module) {
|
||||||
var match = /((?:@[^/]+\/)?[^/@]+)(?:@([\s\S]+))?/.exec(module);
|
var match = /((?:@[^/]+\/)?[^/@]+)(\/[^/@]+)?(?:@([\s\S]+))?/.exec(module);
|
||||||
if (match) {
|
if (match) {
|
||||||
return {
|
return {
|
||||||
spec: module,
|
spec: module,
|
||||||
module: match[1],
|
module: match[1],
|
||||||
version: match[2],
|
subpath: match[2] || '',
|
||||||
|
version: match[3],
|
||||||
builtin: BUILTIN_MODULES.indexOf(match[1]) !== -1,
|
builtin: BUILTIN_MODULES.indexOf(match[1]) !== -1,
|
||||||
known: !!knownExternalModules[match[1]]
|
known: !!knownExternalModules[match[1]]
|
||||||
}
|
}
|
||||||
@@ -283,6 +284,7 @@ async function installModule(moduleDetails) {
|
|||||||
const runtimeInstalledModules = settings.get("modules") || {};
|
const runtimeInstalledModules = settings.get("modules") || {};
|
||||||
runtimeInstalledModules[moduleDetails.module] = moduleDetails;
|
runtimeInstalledModules[moduleDetails.module] = moduleDetails;
|
||||||
settings.set("modules",runtimeInstalledModules)
|
settings.set("modules",runtimeInstalledModules)
|
||||||
|
log.audit({event: "modules.install",module:moduleDetails.module, version:moduleDetails.version});
|
||||||
}).catch(result => {
|
}).catch(result => {
|
||||||
var output = result.stderr || result.toString();
|
var output = result.stderr || result.toString();
|
||||||
var e;
|
var e;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@node-red/registry",
|
"name": "@node-red/registry",
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@node-red/util": "3.1.0",
|
"@node-red/util": "3.1.1",
|
||||||
"clone": "2.1.2",
|
"clone": "2.1.2",
|
||||||
"fs-extra": "11.1.1",
|
"fs-extra": "11.1.1",
|
||||||
"semver": "7.5.4",
|
"semver": "7.5.4",
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ class Subflow extends Flow {
|
|||||||
for (j=0;j<wires.length;j++) {
|
for (j=0;j<wires.length;j++) {
|
||||||
if (wires[j].id != self.subflowDef.id) {
|
if (wires[j].id != self.subflowDef.id) {
|
||||||
node = self.node_map[wires[j].id];
|
node = self.node_map[wires[j].id];
|
||||||
if (node._originalWires) {
|
if (node && node._originalWires) {
|
||||||
node.wires = clone(node._originalWires);
|
node.wires = clone(node._originalWires);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -265,8 +265,10 @@ class Subflow extends Flow {
|
|||||||
subflowInstanceModified = true;
|
subflowInstanceModified = true;
|
||||||
} else {
|
} else {
|
||||||
node = self.node_map[wires[j].id];
|
node = self.node_map[wires[j].id];
|
||||||
node.wires[wires[j].port] = node.wires[wires[j].port].concat(newWires[i]);
|
if (node) {
|
||||||
modifiedNodes[node.id] = node;
|
node.wires[wires[j].port] = node.wires[wires[j].port].concat(newWires[i]);
|
||||||
|
modifiedNodes[node.id] = node;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -294,10 +296,14 @@ class Subflow extends Flow {
|
|||||||
this.node._updateWires(subflowInstanceConfig.wires);
|
this.node._updateWires(subflowInstanceConfig.wires);
|
||||||
} else {
|
} else {
|
||||||
var node = self.node_map[wires[j].id];
|
var node = self.node_map[wires[j].id];
|
||||||
if (!node._originalWires) {
|
if (node) {
|
||||||
node._originalWires = clone(node.wires);
|
if (!node._originalWires) {
|
||||||
|
node._originalWires = clone(node.wires);
|
||||||
|
}
|
||||||
|
node.wires[wires[j].port] = (node.wires[wires[j].port]||[]).concat(this.subflowInstance.wires[i]);
|
||||||
|
} else {
|
||||||
|
this.error("Unknown node referenced inside subflow: " + wires[j].id)
|
||||||
}
|
}
|
||||||
node.wires[wires[j].port] = (node.wires[wires[j].port]||[]).concat(this.subflowInstance.wires[i]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -313,11 +319,15 @@ class Subflow extends Flow {
|
|||||||
this.node._updateWires(subflowInstanceConfig.wires);
|
this.node._updateWires(subflowInstanceConfig.wires);
|
||||||
} else {
|
} else {
|
||||||
var node = self.node_map[wires[j].id];
|
var node = self.node_map[wires[j].id];
|
||||||
if (!node._originalWires) {
|
if (node) {
|
||||||
node._originalWires = clone(node.wires);
|
if (!node._originalWires) {
|
||||||
|
node._originalWires = clone(node.wires);
|
||||||
|
}
|
||||||
|
node.wires[wires[j].port] = (node.wires[wires[j].port]||[]);
|
||||||
|
node.wires[wires[j].port].push(subflowStatusId);
|
||||||
|
} else {
|
||||||
|
this.error("Unknown node referenced inside subflow: " + wires[j].id)
|
||||||
}
|
}
|
||||||
node.wires[wires[j].port] = (node.wires[wires[j].port]||[]);
|
|
||||||
node.wires[wires[j].port].push(subflowStatusId);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@node-red/runtime",
|
"name": "@node-red/runtime",
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -16,8 +16,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@node-red/registry": "3.1.0",
|
"@node-red/registry": "3.1.1",
|
||||||
"@node-red/util": "3.1.0",
|
"@node-red/util": "3.1.1",
|
||||||
"async-mutex": "0.4.0",
|
"async-mutex": "0.4.0",
|
||||||
"clone": "2.1.2",
|
"clone": "2.1.2",
|
||||||
"express": "4.18.2",
|
"express": "4.18.2",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@node-red/util",
|
"name": "@node-red/util",
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"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",
|
"name": "node-red",
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"description": "Low-code programming for event-driven applications",
|
"description": "Low-code programming for event-driven applications",
|
||||||
"homepage": "https://nodered.org",
|
"homepage": "https://nodered.org",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
@@ -31,10 +31,10 @@
|
|||||||
"flow"
|
"flow"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@node-red/editor-api": "3.1.0",
|
"@node-red/editor-api": "3.1.1",
|
||||||
"@node-red/runtime": "3.1.0",
|
"@node-red/runtime": "3.1.1",
|
||||||
"@node-red/util": "3.1.0",
|
"@node-red/util": "3.1.1",
|
||||||
"@node-red/nodes": "3.1.0",
|
"@node-red/nodes": "3.1.1",
|
||||||
"basic-auth": "2.0.1",
|
"basic-auth": "2.0.1",
|
||||||
"bcryptjs": "2.4.3",
|
"bcryptjs": "2.4.3",
|
||||||
"express": "4.18.2",
|
"express": "4.18.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user