mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Compare commits
24 Commits
delay-flus
...
3.0.1
Author | SHA1 | Date | |
---|---|---|---|
|
dc7fef6395 | ||
|
da65bf7292 | ||
|
17d9c2577e | ||
|
bc7852c1cc | ||
|
51d8792f62 | ||
|
bfdbeb0964 | ||
|
ede82ad0d5 | ||
|
f50dcb9e40 | ||
|
676c5e5df5 | ||
|
d52be76c8a | ||
|
c6a517c88c | ||
|
96eb8719b8 | ||
|
bcd31610f6 | ||
|
a4d66622a5 | ||
|
af4f07cb26 | ||
|
f7120b32f5 | ||
|
273404e24d | ||
|
1b53b5b927 | ||
|
7c5413e568 | ||
|
39b2fe45a5 | ||
|
8d3c5d09f6 | ||
|
5944fdb5dc | ||
|
e120bad779 | ||
|
d546a4a15b |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,3 +1,17 @@
|
||||
#### 3.0.1: Maintenance Release
|
||||
|
||||
Editor
|
||||
|
||||
- Allow codeEditor theme to be set even if `codeEditor` is not set in settings.js (#3794) @Steve-Mcl
|
||||
- Sys info (diagnostics report) amendments (#3793) @Steve-Mcl
|
||||
- Allow `mode` and `title` to be omitted in `options` argument for `createEditor` (#3791) @Steve-Mcl
|
||||
- Fix focus issues (#3789) @Steve-Mcl
|
||||
- Ensure all typedInput buttons have button type set (#3788) @knolleary
|
||||
- Do not flag hasUsers=false nodes as unused in search (#3787) @knolleary
|
||||
- Properly position quick-add dialog in all cases (#3786) @knolleary
|
||||
- Ensure quick-add dialog does not obscure ghost node when shifted (#3785) @knolleary
|
||||
- Remove use of Object.hasOwn (#3784) @knolleary
|
||||
|
||||
#### 3.0.0: Milestone Release
|
||||
|
||||
Editor
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"description": "Low-code programming for event-driven applications",
|
||||
"homepage": "http://nodered.org",
|
||||
"license": "Apache-2.0",
|
||||
|
@@ -327,9 +327,8 @@ module.exports = {
|
||||
themeContext.header.url = themePlugin.header.url || themeContext.header.url
|
||||
}
|
||||
}
|
||||
if(theme.codeEditor) {
|
||||
theme.codeEditor.options = Object.assign({}, themePlugin.monacoOptions, theme.codeEditor.options);
|
||||
}
|
||||
theme.codeEditor = theme.codeEditor || {}
|
||||
theme.codeEditor.options = Object.assign({}, themePlugin.monacoOptions, theme.codeEditor.options);
|
||||
}
|
||||
activeThemeInitialised = true;
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/editor-api",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
@@ -16,8 +16,8 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@node-red/util": "3.0.0",
|
||||
"@node-red/editor-client": "3.0.0",
|
||||
"@node-red/util": "3.0.1",
|
||||
"@node-red/editor-client": "3.0.1",
|
||||
"bcryptjs": "2.4.3",
|
||||
"body-parser": "1.20.0",
|
||||
"clone": "2.1.2",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/editor-client",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@@ -766,7 +766,7 @@ var RED = (function() {
|
||||
$('<div id="red-ui-header-shade" class="hide"></div>').appendTo(header);
|
||||
$('<div id="red-ui-main-container" class="red-ui-sidebar-closed hide">'+
|
||||
'<div id="red-ui-workspace"></div>'+
|
||||
'<div id="red-ui-editor-stack"></div>'+
|
||||
'<div id="red-ui-editor-stack" tabindex="-1"></div>'+
|
||||
'<div id="red-ui-palette"></div>'+
|
||||
'<div id="red-ui-sidebar"></div>'+
|
||||
'<div id="red-ui-sidebar-separator"></div>'+
|
||||
|
@@ -90,10 +90,10 @@
|
||||
optEl.append(generateSpans(srcMatch));
|
||||
optEl.appendTo(element);
|
||||
}
|
||||
matches.push({
|
||||
value: optVal,
|
||||
label: element,
|
||||
i: (valMatch.found ? valMatch.index : srcMatch.index)
|
||||
matches.push({
|
||||
value: optVal,
|
||||
label: element,
|
||||
i: (valMatch.found ? valMatch.index : srcMatch.index)
|
||||
});
|
||||
}
|
||||
})
|
||||
@@ -501,7 +501,7 @@
|
||||
this.options.types = this.options.types||Object.keys(allOptions);
|
||||
}
|
||||
|
||||
this.selectTrigger = $('<button class="red-ui-typedInput-type-select" tabindex="0"></button>').prependTo(this.uiSelect);
|
||||
this.selectTrigger = $('<button type="button" class="red-ui-typedInput-type-select" tabindex="0"></button>').prependTo(this.uiSelect);
|
||||
$('<i class="red-ui-typedInput-icon fa fa-caret-down"></i>').toggle(this.options.types.length > 1).appendTo(this.selectTrigger);
|
||||
|
||||
this.selectLabel = $('<span class="red-ui-typedInput-type-label"></span>').appendTo(this.selectTrigger);
|
||||
@@ -570,7 +570,7 @@
|
||||
})
|
||||
|
||||
// explicitly set optionSelectTrigger display to inline-block otherwise jQ sets it to 'inline'
|
||||
this.optionSelectTrigger = $('<button tabindex="0" class="red-ui-typedInput-option-trigger" style="display:inline-block"><span class="red-ui-typedInput-option-caret"><i class="red-ui-typedInput-icon fa fa-caret-down"></i></span></button>').appendTo(this.uiSelect);
|
||||
this.optionSelectTrigger = $('<button type="button" tabindex="0" class="red-ui-typedInput-option-trigger" style="display:inline-block"><span class="red-ui-typedInput-option-caret"><i class="red-ui-typedInput-icon fa fa-caret-down"></i></span></button>').appendTo(this.uiSelect);
|
||||
this.optionSelectLabel = $('<span class="red-ui-typedInput-option-label"></span>').prependTo(this.optionSelectTrigger);
|
||||
// RED.popover.tooltip(this.optionSelectLabel,function() {
|
||||
// return that.optionValue;
|
||||
@@ -591,7 +591,7 @@
|
||||
that.uiSelect.addClass('red-ui-typedInput-focus');
|
||||
});
|
||||
|
||||
this.optionExpandButton = $('<button tabindex="0" class="red-ui-typedInput-option-expand" style="display:inline-block"></button>').appendTo(this.uiSelect);
|
||||
this.optionExpandButton = $('<button type="button" tabindex="0" class="red-ui-typedInput-option-expand" style="display:inline-block"></button>').appendTo(this.uiSelect);
|
||||
this.optionExpandButtonIcon = $('<i class="red-ui-typedInput-icon fa fa-ellipsis-h"></i>').appendTo(this.optionExpandButton);
|
||||
|
||||
this.type(this.typeField.val() || this.options.default||this.typeList[0].value);
|
||||
|
@@ -44,14 +44,10 @@ RED.contextMenu = (function () {
|
||||
const canRemoveFromGroup = hasSelection && !!selection.nodes[0].g
|
||||
const offset = $("#red-ui-workspace-chart").offset()
|
||||
|
||||
let addX = options.x - offset.left + $("#red-ui-workspace-chart").scrollLeft()
|
||||
let addY = options.y - offset.top + $("#red-ui-workspace-chart").scrollTop()
|
||||
|
||||
if (RED.view.snapGrid) {
|
||||
const gridSize = RED.view.gridSize()
|
||||
addX = gridSize * Math.floor(addX / gridSize)
|
||||
addY = gridSize * Math.floor(addY / gridSize)
|
||||
}
|
||||
// addX/addY must be the position in the workspace accounting for both scroll and scale
|
||||
// The +5 is because we display the contextMenu -5,-5 to actual click position
|
||||
let addX = (options.x + 5 - offset.left + $("#red-ui-workspace-chart").scrollLeft()) / RED.view.scale()
|
||||
let addY = (options.y + 5 - offset.top + $("#red-ui-workspace-chart").scrollTop()) / RED.view.scale()
|
||||
|
||||
const menuItems = [
|
||||
{ onselect: 'core:show-action-list', onpostselect: function () { } },
|
||||
@@ -67,6 +63,10 @@ RED.contextMenu = (function () {
|
||||
splice: isSingleLink ? selection.links[0] : undefined,
|
||||
// spliceMultiple: isMultipleLinks
|
||||
})
|
||||
},
|
||||
onpostselect: function() {
|
||||
// ensure quick add dialog search input has focus
|
||||
$('#red-ui-type-search-input').trigger('focus')
|
||||
}
|
||||
},
|
||||
(hasLinks) ? { // has least 1 wire selected
|
||||
@@ -144,7 +144,7 @@ RED.contextMenu = (function () {
|
||||
($(window).width() -MENU_WIDTH)) {
|
||||
direction = "left";
|
||||
}
|
||||
|
||||
|
||||
menu = RED.menu.init({
|
||||
direction: direction,
|
||||
onpreselect: function() {
|
||||
|
@@ -1105,6 +1105,10 @@ RED.editor = (function() {
|
||||
if (editing_node) {
|
||||
RED.sidebar.info.refresh(editing_node);
|
||||
RED.sidebar.help.show(editing_node.type, false);
|
||||
//ensure focused element is NOT body (for keyboard scope to operate correctly)
|
||||
if (document.activeElement.tagName === 'BODY') {
|
||||
$('#red-ui-editor-stack').trigger('focus')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -764,7 +764,7 @@ RED.editor.codeEditor.monaco = (function() {
|
||||
|
||||
|
||||
if(!options.stateId && options.stateId !== false) {
|
||||
options.stateId = RED.editor.generateViewStateId("monaco", options, (options.mode || options.title).split("/").pop());
|
||||
options.stateId = RED.editor.generateViewStateId("monaco", options, (options.mode || options.title || "").split("/").pop());
|
||||
}
|
||||
var el = options.element || $("#"+options.id)[0];
|
||||
var toolbarRow = $("<div>").appendTo(el);
|
||||
|
@@ -187,7 +187,7 @@ RED.search = (function() {
|
||||
}
|
||||
if (flags.hasOwnProperty("unused")) {
|
||||
var isUnused = (node.node.type === 'subflow' && node.node.instances.length === 0) ||
|
||||
(isConfigNode && node.node.users.length === 0)
|
||||
(isConfigNode && node.node.users.length === 0 && node.node._def.hasUsers !== false)
|
||||
if (flags.unused !== isUnused) {
|
||||
continue;
|
||||
}
|
||||
@@ -538,7 +538,7 @@ RED.search = (function() {
|
||||
$(previousActiveElement).trigger("focus");
|
||||
}
|
||||
previousActiveElement = null;
|
||||
}
|
||||
}
|
||||
if(!keepSearchToolbar) {
|
||||
clearActiveSearch();
|
||||
}
|
||||
@@ -630,7 +630,7 @@ RED.search = (function() {
|
||||
$("#red-ui-sidebar-shade").on('mousedown',hide);
|
||||
|
||||
$("#red-ui-view-searchtools-close").on("click", function close() {
|
||||
clearActiveSearch();
|
||||
clearActiveSearch();
|
||||
updateSearchToolbar();
|
||||
});
|
||||
$("#red-ui-view-searchtools-close").trigger("click");
|
||||
|
@@ -269,8 +269,8 @@ RED.typeSearch = (function() {
|
||||
moveCallback = opts.move;
|
||||
RED.events.emit("type-search:open");
|
||||
//shade.show();
|
||||
if ($("#red-ui-main-container").height() - opts.y - 150 < 0) {
|
||||
opts.y = opts.y - 235;
|
||||
if ($("#red-ui-main-container").height() - opts.y - 195 < 0) {
|
||||
opts.y = opts.y - 275;
|
||||
}
|
||||
dialog.css({left:opts.x+"px",top:opts.y+"px"}).show();
|
||||
searchResultsDiv.slideDown(300);
|
||||
|
@@ -1071,12 +1071,15 @@ RED.view = (function() {
|
||||
RED.view.redraw();
|
||||
}
|
||||
|
||||
// `point` is the place in the workspace the mouse has clicked.
|
||||
// This takes into account scrolling and scaling of the workspace.
|
||||
var ox = point[0];
|
||||
var oy = point[1];
|
||||
|
||||
// Need to map that to browser location to position the pop-up
|
||||
const offset = $("#red-ui-workspace-chart").offset()
|
||||
var clientX = ox + offset.left - $("#red-ui-workspace-chart").scrollLeft()
|
||||
var clientY = oy + offset.top - $("#red-ui-workspace-chart").scrollTop()
|
||||
var clientX = (ox * scaleFactor) + offset.left - $("#red-ui-workspace-chart").scrollLeft()
|
||||
var clientY = (oy * scaleFactor) + offset.top - $("#red-ui-workspace-chart").scrollTop()
|
||||
|
||||
if (RED.settings.get("editor").view['view-snap-grid']) {
|
||||
// eventLayer.append("circle").attr("cx",point[0]).attr("cy",point[1]).attr("r","2").attr('fill','red')
|
||||
@@ -4906,7 +4909,7 @@ RED.view = (function() {
|
||||
if (d._def.button) {
|
||||
var buttonEnabled = isButtonEnabled(d);
|
||||
this.__buttonGroup__.classList.toggle("red-ui-flow-node-button-disabled", !buttonEnabled);
|
||||
if (RED.runtime && Object.hasOwn(RED.runtime,'started')) {
|
||||
if (RED.runtime && RED.runtime.started !== undefined) {
|
||||
this.__buttonGroup__.classList.toggle("red-ui-flow-node-button-stopped", !RED.runtime.started);
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/nodes",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/registry",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
@@ -16,7 +16,7 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@node-red/util": "3.0.0",
|
||||
"@node-red/util": "3.0.1",
|
||||
"clone": "2.1.2",
|
||||
"fs-extra": "10.1.0",
|
||||
"semver": "7.3.7",
|
||||
|
@@ -100,9 +100,13 @@ function buildDiagnosticReport(scope, callback) {
|
||||
version: os.version(),
|
||||
},
|
||||
runtime: {
|
||||
isStarted: runtime.isStarted(),
|
||||
modules: modules,
|
||||
version: runtime.settings.version,
|
||||
isStarted: runtime.isStarted(),
|
||||
flows: {
|
||||
state: runtime.flows && runtime.flows.state(),
|
||||
started: runtime.flows && runtime.flows.started,
|
||||
},
|
||||
modules: modules,
|
||||
settings: {
|
||||
available: runtime.settings.available(),
|
||||
apiMaxLength: runtime.settings.apiMaxLength || "UNSET",
|
||||
@@ -114,6 +118,11 @@ function buildDiagnosticReport(scope, callback) {
|
||||
flowFile: runtime.settings.flowFile || "UNSET",
|
||||
mqttReconnectTime: runtime.settings.mqttReconnectTime || "UNSET",
|
||||
serialReconnectTime: runtime.settings.serialReconnectTime || "UNSET",
|
||||
socketReconnectTime: runtime.settings.socketReconnectTime || "UNSET",
|
||||
socketTimeout: runtime.settings.socketTimeout || "UNSET",
|
||||
tcpMsgQueueSize: runtime.settings.tcpMsgQueueSize || "UNSET",
|
||||
inboundWebSocketTimeout: runtime.settings.inboundWebSocketTimeout || "UNSET",
|
||||
runtimeState: runtime.settings.runtimeState || "UNSET",
|
||||
|
||||
adminAuth: runtime.settings.adminAuth ? "SET" : "UNSET",
|
||||
|
||||
@@ -131,6 +140,7 @@ function buildDiagnosticReport(scope, callback) {
|
||||
uiHost: runtime.settings.uiHost ? "SET" : "UNSET",
|
||||
uiPort: runtime.settings.uiPort ? "SET" : "UNSET",
|
||||
userDir: runtime.settings.userDir ? "SET" : "UNSET",
|
||||
nodesDir: runtime.settings.nodesDir && runtime.settings.nodesDir.length ? "SET" : "UNSET",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/runtime",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
@@ -16,8 +16,8 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@node-red/registry": "3.0.0",
|
||||
"@node-red/util": "3.0.0",
|
||||
"@node-red/registry": "3.0.1",
|
||||
"@node-red/util": "3.0.1",
|
||||
"async-mutex": "0.3.2",
|
||||
"clone": "2.1.2",
|
||||
"express": "4.18.1",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/util",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"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.0.0",
|
||||
"version": "3.0.1",
|
||||
"description": "Low-code programming for event-driven applications",
|
||||
"homepage": "http://nodered.org",
|
||||
"license": "Apache-2.0",
|
||||
@@ -31,10 +31,10 @@
|
||||
"flow"
|
||||
],
|
||||
"dependencies": {
|
||||
"@node-red/editor-api": "3.0.0",
|
||||
"@node-red/runtime": "3.0.0",
|
||||
"@node-red/util": "3.0.0",
|
||||
"@node-red/nodes": "3.0.0",
|
||||
"@node-red/editor-api": "3.0.1",
|
||||
"@node-red/runtime": "3.0.1",
|
||||
"@node-red/util": "3.0.1",
|
||||
"@node-red/nodes": "3.0.1",
|
||||
"basic-auth": "2.0.1",
|
||||
"bcryptjs": "2.4.3",
|
||||
"express": "4.18.1",
|
||||
|
@@ -33,6 +33,11 @@ describe("runtime-api/diagnostics", function() {
|
||||
flowFile: "flows.json",
|
||||
mqttReconnectTime: 321,
|
||||
serialReconnectTime: 432,
|
||||
socketReconnectTime: 2222,
|
||||
socketTimeout: 3333,
|
||||
tcpMsgQueueSize: 4444,
|
||||
inboundWebSocketTimeout: 5555,
|
||||
runtimeState: {enabled: true, ui: false},
|
||||
adminAuth: {},//should be sanitised to "SET"
|
||||
httpAdminRoot: "/admin/root/",
|
||||
httpAdminCors: {},//should be sanitised to "SET"
|
||||
@@ -45,6 +50,7 @@ describe("runtime-api/diagnostics", function() {
|
||||
uiHost: "something.secret.com",//should be sanitised to "SET"
|
||||
uiPort: 1337,//should be sanitised to "SET"
|
||||
userDir: "/var/super/secret/",//should be sanitised to "SET",
|
||||
nodesDir: "/var/super/secret/",//should be sanitised to "SET",
|
||||
contextStorage: {
|
||||
default : { module: "memory" },
|
||||
file: { module: "localfilesystem" },
|
||||
@@ -73,8 +79,9 @@ describe("runtime-api/diagnostics", function() {
|
||||
|
||||
//result.runtime.xxxxx
|
||||
const runtimeCount = Object.keys(result.runtime).length;
|
||||
runtimeCount.should.eql(4);//ensure no more than 4 keys are present in runtime
|
||||
runtimeCount.should.eql(5);//ensure 5 keys are present in runtime
|
||||
result.runtime.should.have.property('isStarted',true)
|
||||
result.runtime.should.have.property('flows')
|
||||
result.runtime.should.have.property('modules').type("object");
|
||||
result.runtime.should.have.property('settings').type("object");
|
||||
result.runtime.should.have.property('version','7.7.7');
|
||||
@@ -87,7 +94,7 @@ describe("runtime-api/diagnostics", function() {
|
||||
|
||||
//result.runtime.settings.xxxxx
|
||||
const settingsCount = Object.keys(result.runtime.settings).length;
|
||||
settingsCount.should.eql(21);//ensure no more than the 21 settings listed below are present in the settings object
|
||||
settingsCount.should.eql(27);//ensure no more than the 21 settings listed below are present in the settings object
|
||||
result.runtime.settings.should.have.property('available',true);
|
||||
result.runtime.settings.should.have.property('apiMaxLength', "UNSET");//deliberately disabled to ensure UNSET is returned
|
||||
result.runtime.settings.should.have.property('debugMaxLength', 1111);
|
||||
@@ -96,6 +103,11 @@ describe("runtime-api/diagnostics", function() {
|
||||
result.runtime.settings.should.have.property('flowFile', "flows.json");
|
||||
result.runtime.settings.should.have.property('mqttReconnectTime', 321);
|
||||
result.runtime.settings.should.have.property('serialReconnectTime', 432);
|
||||
result.runtime.settings.should.have.property('socketReconnectTime', 2222);
|
||||
result.runtime.settings.should.have.property('socketTimeout', 3333);
|
||||
result.runtime.settings.should.have.property('tcpMsgQueueSize', 4444);
|
||||
result.runtime.settings.should.have.property('inboundWebSocketTimeout', 5555);
|
||||
result.runtime.settings.should.have.property('runtimeState', {enabled: true, ui: false});
|
||||
result.runtime.settings.should.have.property("adminAuth", "SET"); //should be sanitised to "SET"
|
||||
result.runtime.settings.should.have.property("httpAdminCors", "SET"); //should be sanitised to "SET"
|
||||
result.runtime.settings.should.have.property('httpAdminRoot', "/admin/root/");
|
||||
@@ -109,6 +121,7 @@ describe("runtime-api/diagnostics", function() {
|
||||
result.runtime.settings.should.have.property("uiPort", "SET"); //should be sanitised to "SET"
|
||||
result.runtime.settings.should.have.property("userDir", "SET"); //should be sanitised to "SET"
|
||||
result.runtime.settings.should.have.property('contextStorage').type("object");
|
||||
result.runtime.settings.should.have.property('nodesDir', "SET")
|
||||
|
||||
//result.runtime.settings.contextStorage.xxxxx
|
||||
const contextCount = Object.keys(result.runtime.settings.contextStorage).length;
|
||||
|
Reference in New Issue
Block a user