diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f3c8a6ce..85fc1f92a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,9 @@ on: release: types: [published] +permissions: + contents: read + jobs: generate: name: 'Update node-red-docker image' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0db909da6..b7f54c5f1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,8 +6,14 @@ on: pull_request: branches: [ master, dev ] +permissions: + contents: read + jobs: build: + permissions: + checks: write # for coverallsapp/github-action to create new checks + contents: read # for actions/checkout to fetch code runs-on: ubuntu-latest strategy: matrix: diff --git a/packages/node_modules/@node-red/editor-client/locales/de/editor.json b/packages/node_modules/@node-red/editor-client/locales/de/editor.json old mode 100755 new mode 100644 diff --git a/packages/node_modules/@node-red/editor-client/locales/de/infotips.json b/packages/node_modules/@node-red/editor-client/locales/de/infotips.json old mode 100755 new mode 100644 diff --git a/packages/node_modules/@node-red/editor-client/locales/de/jsonata.json b/packages/node_modules/@node-red/editor-client/locales/de/jsonata.json old mode 100755 new mode 100644 diff --git a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json old mode 100755 new mode 100644 diff --git a/packages/node_modules/@node-red/editor-client/locales/en-US/infotips.json b/packages/node_modules/@node-red/editor-client/locales/en-US/infotips.json old mode 100755 new mode 100644 diff --git a/packages/node_modules/@node-red/editor-client/locales/en-US/jsonata.json b/packages/node_modules/@node-red/editor-client/locales/en-US/jsonata.json old mode 100755 new mode 100644 diff --git a/packages/node_modules/@node-red/editor-client/locales/ko/editor.json b/packages/node_modules/@node-red/editor-client/locales/ko/editor.json old mode 100755 new mode 100644 diff --git a/packages/node_modules/@node-red/editor-client/locales/ko/infotips.json b/packages/node_modules/@node-red/editor-client/locales/ko/infotips.json old mode 100755 new mode 100644 diff --git a/packages/node_modules/@node-red/editor-client/locales/ko/jsonata.json b/packages/node_modules/@node-red/editor-client/locales/ko/jsonata.json old mode 100755 new mode 100644 diff --git a/packages/node_modules/@node-red/editor-client/locales/ru/editor.json b/packages/node_modules/@node-red/editor-client/locales/ru/editor.json old mode 100755 new mode 100644 diff --git a/packages/node_modules/@node-red/editor-client/locales/ru/infotips.json b/packages/node_modules/@node-red/editor-client/locales/ru/infotips.json old mode 100755 new mode 100644 diff --git a/packages/node_modules/@node-red/editor-client/locales/ru/jsonata.json b/packages/node_modules/@node-red/editor-client/locales/ru/jsonata.json old mode 100755 new mode 100644 diff --git a/packages/node_modules/@node-red/editor-client/src/js/nodes.js b/packages/node_modules/@node-red/editor-client/src/js/nodes.js index d387f01b3..865636b24 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/nodes.js +++ b/packages/node_modules/@node-red/editor-client/src/js/nodes.js @@ -1965,7 +1965,7 @@ RED.nodes = (function() { } } } else { - const keepNodesCurrentZ = reimport && n.z && RED.workspaces.contains(n.z) + const keepNodesCurrentZ = reimport && n.z && (RED.workspaces.contains(n.z) || RED.nodes.subflow(n.z)) if (!keepNodesCurrentZ && n.z && !workspace_map[n.z] && !subflow_map[n.z]) { n.z = activeWorkspace; } @@ -2067,7 +2067,7 @@ RED.nodes = (function() { node.id = getID(); } else { node.id = n.id; - const keepNodesCurrentZ = reimport && node.z && RED.workspaces.contains(node.z) + const keepNodesCurrentZ = reimport && node.z && (RED.workspaces.contains(node.z) || RED.nodes.subflow(node.z)) if (!keepNodesCurrentZ && (node.z == null || (!workspace_map[node.z] && !subflow_map[node.z]))) { if (createMissingWorkspace) { if (missingWorkspace === null) { @@ -2740,6 +2740,7 @@ RED.nodes = (function() { } }); + const nodeGroupMap = {} var replaceNodeIds = Object.keys(replaceNodes); if (replaceNodeIds.length > 0) { var reimportList = []; @@ -2750,6 +2751,12 @@ RED.nodes = (function() { } else { allNodes.removeNode(n); } + if (n.g) { + // reimporting a node *without* including its group object + // will cause the g property to be cleared. Cache it + // here so we can restore it + nodeGroupMap[n.id] = n.g + } reimportList.push(convertNode(n)); RED.events.emit('nodes:remove',n); }); @@ -2771,6 +2778,18 @@ RED.nodes = (function() { var newNodeMap = {}; result.nodes.forEach(function(n) { newNodeMap[n.id] = n; + if (nodeGroupMap[n.id]) { + // This node is in a group - need to substitute the + // node reference inside the group + n.g = nodeGroupMap[n.id] + const group = RED.nodes.group(n.g) + if (group) { + var index = group.nodes.findIndex(gn => gn.id === n.id) + if (index > -1) { + group.nodes[index] = n + } + } + } }); RED.nodes.eachLink(function(l) { if (newNodeMap.hasOwnProperty(l.source.id)) { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js index ef1be05bc..7440b464e 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js @@ -146,7 +146,7 @@ { value: "reset", source: ["delay","trigger","join","rbe"] }, { value: "responseCookies", source: ["http request"] }, { value: "responseTopic", source: ["mqtt"] }, - { value: "responseURL", source: ["http request"] }, + { value: "responseUrl", source: ["http request"] }, { value: "restartTimeout", source: ["join"] }, { value: "retain", source: ["mqtt"] }, { value: "schema", source: ["json"] }, diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js index be114c4a8..da7954625 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js @@ -238,6 +238,7 @@ RED.editor = (function() { var valid = validateNodeProperty(node, defaults, property,value); if (((typeof valid) === "string") || !valid) { input.addClass("input-error"); + input.next(".red-ui-typedInput-container").addClass("input-error"); if ((typeof valid) === "string") { var tooltip = input.data("tooltip"); if (tooltip) { @@ -250,6 +251,7 @@ RED.editor = (function() { } } else { input.removeClass("input-error"); + input.next(".red-ui-typedInput-container").removeClass("input-error"); var tooltip = input.data("tooltip"); if (tooltip) { input.data("tooltip", null); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/library.js b/packages/node_modules/@node-red/editor-client/src/js/ui/library.js old mode 100755 new mode 100644 diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js b/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js old mode 100755 new mode 100644 diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/projects/projects.js b/packages/node_modules/@node-red/editor-client/src/js/ui/projects/projects.js old mode 100755 new mode 100644 diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js old mode 100755 new mode 100644 index 17e1e87e3..03e4d3cd9 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js @@ -3369,6 +3369,9 @@ RED.view = (function() { } if (dblClickPrimed && mousedown_node == d && clickElapsed > 0 && clickElapsed < dblClickInterval) { mouse_mode = RED.state.DEFAULT; + // Avoid dbl click causing text selection. + d3.event.preventDefault() + document.getSelection().removeAllRanges() if (d.type != "subflow") { if (/^subflow:/.test(d.type) && (d3.event.ctrlKey || d3.event.metaKey)) { RED.workspaces.show(d.type.substring(8)); diff --git a/packages/node_modules/@node-red/nodes/core/common/25-catch.html b/packages/node_modules/@node-red/nodes/core/common/25-catch.html index a2bf07aa4..1a13d1337 100644 --- a/packages/node_modules/@node-red/nodes/core/common/25-catch.html +++ b/packages/node_modules/@node-red/nodes/core/common/25-catch.html @@ -4,7 +4,7 @@