Compare commits

..

1 Commits

Author SHA1 Message Date
Dave Conway-Jones
260ac94dc7 set node width dependent on gridsize
(up to 50 - then use half sizes or quarters etc)
2021-11-11 14:56:09 +00:00
87 changed files with 489 additions and 1224 deletions

View File

@@ -1,84 +1,3 @@
#### 2.1.6: Maintenance Release
Editor
- Revert copy-text change and apply alternative fix (#3363) @knolleary
- Update marked to latest (#3362) @knolleary
- fix to make start of property error tooltip messages aligned (#3358) @HiroyasuNishiyama
Nodes
- Inject: fix JSON propety validation of inject node (#3349) @HiroyasuNishiyama
- Delay: fix unit value validation of delay node (#3351) @HiroyasuNishiyama
#### 2.1.5: Maintenance Release
Runtime
- Handle reporting error location when stack is truncated (#3346) @knolleary
- Initialize passport when only adminAuth.tokens is set (#3343) @knolleary
- Add log logging (#3342) @knolleary
Editor
- Fix copy buttons on the debug window (another method) (#3331) @kazuhitoyokoi
- Add Japanese translations for hidden flow (#3302) @kazuhitoyokoi
- Improve jsonata legacy mode detection regex (#3345) @knolleary
- Fix generating flow name with incrementing number (#3347) @knolleary
- resume focus after import/export dialog close (#3337) @HiroyasuNishiyama
- Fix findPreviousVisibleTab action (#3321) @knolleary
- Fix storing hidden tab state when not hidden via action (#3312) @knolleary
- Avoid adding empty env properties to tabs/groups (#3311) @knolleary
- Fix hide icon in tour guide (#3301) @kazuhitoyokoi
Nodes
- File: Update file node examples according to node name change (#3335) @HiroyasuNishiyama
- Filter (RBE): Fix for filter node narrrowbandEq mode start condition failure (#3339) @dceejay
- Function: Prevent function scrollbar from obscuring expand button (#3348) @knolleary
- Function: load extralibs when expanding monaco. fixes #3319 (#3334) @Steve-Mcl
- Function: Update Function to use correct api to access env vars (#3310) @knolleary
- HTTP Request: Fix basic auth with empty username or password (#3325) @hardillb
- Inject: Fix incorrect clearing of blank payload property in Inject node (#3322) @knolleary
- Link Call: add link call example (#3336) @HiroyasuNishiyama
- WebSocket: Only setup ws client heartbeat once it is connected (#3344) @knolleary
- Update Japanese translations in node help (#3332) @kazuhitoyokoi
#### 2.1.4: Maintenance Release
Runtime
- fix env var access using $parent for groups (#3278) @HiroyasuNishiyama
- Add proper error handling for 404 errors when serving debug files (#3277) @knolleary
- Add Japanese translations for Node-RED v2.1.0-beta.1 (#3179) @kazuhitoyokoi
- Include full user object on login audit events (#3269) @knolleary
- Remove styling from de locale files (#3237) @knolleary
Editor
- Change tab hide button icon to an eye and add search option (#3282) @knolleary
- Fix i18n handling of namespaces with spaces in (#3281) @knolleary
- Trigger change event when autoComplete fills in input (#3280) @knolleary
- Apply CN i18n fix (#3279) @knolleary
- fix select menu label of config node to use paletteLabel (#3273) @HiroyasuNishiyama
- fix removed tab not to cause node conflict (#3275) @HiroyasuNishiyama
- Group diff fix (#3239) @knolleary
- Only toggle disabled workspace flag if on activeWorkspace (#3252) @knolleary
- Do not show status for disabled nodes (#3253) @knolleary
- Set dimension value for tour guide (#3265) @kazuhitoyokoi
- Avoid redundant initialisation of TypedInput type (#3263) @knolleary
- Don't let themes change flow port label color (#3270) @bonanitech
- Fix treeList gutter calculation to handle floating gutters (#3238) @knolleary
Nodes
- Debug: Handle RegExp types in Debug sidebar (#3251) @knolleary
- Delay: fix 2nd output when in rate limit per topic modes (#3261) @dceejay
- Link: fix to show link target when selected (#3267) @HiroyasuNishiyama
- Inject: Do not modify inject node props in oneditprepare (#3242) @knolleary
- HTTP Request: HTTP Basic Auth should always add : between username and password even if empty (#3236) @hardillb
#### 2.1.3: Maintenance Release
Runtime

View File

@@ -1,6 +1,6 @@
{
"name": "node-red",
"version": "2.1.6",
"version": "2.1.3",
"description": "Low-code programming for event-driven applications",
"homepage": "http://nodered.org",
"license": "Apache-2.0",
@@ -26,31 +26,31 @@
}
],
"dependencies": {
"acorn": "8.7.0",
"acorn": "8.5.0",
"acorn-walk": "8.2.0",
"ajv": "8.8.2",
"ajv": "8.6.3",
"async-mutex": "0.3.2",
"basic-auth": "2.0.1",
"bcryptjs": "2.4.3",
"body-parser": "1.19.1",
"body-parser": "1.19.0",
"cheerio": "1.0.0-rc.10",
"clone": "2.1.2",
"content-type": "1.0.4",
"cookie": "0.4.1",
"cookie-parser": "1.4.6",
"cookie-parser": "1.4.5",
"cors": "2.8.5",
"cronosjs": "1.7.1",
"denque": "2.0.1",
"express": "4.17.2",
"express": "4.17.1",
"express-session": "1.17.2",
"form-data": "4.0.0",
"fs-extra": "10.0.0",
"fs.notify": "0.0.4",
"got": "11.8.3",
"got": "11.8.2",
"hash-sum": "2.0.0",
"hpagent": "0.1.2",
"https-proxy-agent": "5.0.0",
"i18next": "21.6.6",
"i18next": "21.3.1",
"iconv-lite": "0.6.3",
"is-utf8": "0.2.1",
"js-yaml": "3.14.1",
@@ -60,22 +60,22 @@
"media-typer": "1.1.0",
"memorystore": "1.6.6",
"mime": "2.5.2",
"moment-timezone": "0.5.34",
"mqtt": "4.3.4",
"moment-timezone": "0.5.33",
"mqtt": "4.2.8",
"multer": "1.4.3",
"mustache": "4.2.0",
"node-red-admin": "^2.2.1",
"nopt": "5.0.0",
"oauth2orize": "1.11.1",
"oauth2orize": "1.11.0",
"on-headers": "1.0.2",
"passport": "0.5.2",
"passport": "0.5.0",
"passport-http-bearer": "1.0.1",
"passport-oauth2-client-password": "0.1.2",
"raw-body": "2.4.2",
"raw-body": "2.4.1",
"semver": "7.3.5",
"tar": "6.1.11",
"tough-cookie": "4.0.0",
"uglify-js": "3.14.5",
"uglify-js": "3.14.2",
"uuid": "8.3.2",
"ws": "7.5.1",
"xml2js": "0.4.23"
@@ -84,7 +84,7 @@
"bcrypt": "5.0.1"
},
"devDependencies": {
"dompurify": "2.3.4",
"dompurify": "2.3.3",
"grunt": "1.4.1",
"grunt-chmod": "~1.1.1",
"grunt-cli": "~1.4.3",
@@ -107,17 +107,17 @@
"i18next-http-backend": "1.3.1",
"jquery-i18next": "1.2.1",
"jsdoc-nr-template": "github:node-red/jsdoc-nr-template",
"marked": "4.0.10",
"marked": "3.0.7",
"minami": "1.2.3",
"mocha": "9.1.3",
"mocha": "9.1.2",
"node-red-node-test-helper": "^0.2.7",
"nodemon": "2.0.15",
"nodemon": "2.0.13",
"proxy": "^1.0.2",
"sass": "1.48.0",
"sass": "1.43.2",
"should": "13.2.3",
"sinon": "11.1.2",
"stoppable": "^1.1.0",
"supertest": "6.2.1"
"supertest": "6.1.6"
},
"engines": {
"node": ">=12"

View File

@@ -141,7 +141,7 @@ function completeVerify(profile,done) {
Users.authenticate(profile).then(function(user) {
if (user) {
Tokens.create(user.username,"node-red-editor",user.permissions).then(function(tokens) {
log.audit({event: "auth.login",user,username:user.username,scope:user.permissions});
log.audit({event: "auth.login",username:user.username,scope:user.permissions});
user.tokens = tokens;
done(null,user);
});

View File

@@ -93,7 +93,7 @@ var passwordTokenExchange = function(client, username, password, scope, done) {
return logEntry.user !== username;
});
Tokens.create(username,client.id,scope).then(function(tokens) {
log.audit({event: "auth.login",user,username:username,client:client.id,scope:scope});
log.audit({event: "auth.login",username:username,client:client.id,scope:scope});
done(null,tokens.accessToken,null,{expires_in:tokens.expires_in});
});
} else {
@@ -146,7 +146,7 @@ function authenticateUserToken(req) {
} else {
reject();
}
}).catch(reject);
});
} else {
reject();
}
@@ -163,9 +163,6 @@ TokensStrategy.prototype.authenticate = function(req) {
authenticateUserToken(req).then(user => {
this.success(user,{scope:user.permissions});
}).catch(err => {
if (err) {
log.trace("token authentication failure: "+err.stack?err.stack:err)
}
this.fail(401);
});
}

View File

@@ -90,8 +90,6 @@ function init(settings,_server,storage,runtimeAPI) {
auth.getToken,
auth.errorHandler
);
} else if (settings.adminAuth.tokens) {
adminApp.use(passport.initialize());
}
adminApp.post("/auth/revoke",auth.needsPermission(""),auth.revoke,apiUtil.errorHandler);
}

View File

@@ -1,6 +1,6 @@
{
"name": "@node-red/editor-api",
"version": "2.1.6",
"version": "2.1.3",
"license": "Apache-2.0",
"main": "./lib/index.js",
"repository": {
@@ -16,22 +16,22 @@
}
],
"dependencies": {
"@node-red/util": "2.1.6",
"@node-red/editor-client": "2.1.6",
"@node-red/util": "2.1.3",
"@node-red/editor-client": "2.1.3",
"bcryptjs": "2.4.3",
"body-parser": "1.19.1",
"body-parser": "1.19.0",
"clone": "2.1.2",
"cors": "2.8.5",
"express-session": "1.17.2",
"express": "4.17.2",
"express": "4.17.1",
"memorystore": "1.6.6",
"mime": "2.5.2",
"multer": "1.4.3",
"mustache": "4.2.0",
"oauth2orize": "1.11.1",
"oauth2orize": "1.11.0",
"passport-http-bearer": "1.0.1",
"passport-oauth2-client-password": "0.1.2",
"passport": "0.5.2",
"passport": "0.5.0",
"ws": "7.5.1"
},
"optionalDependencies": {

View File

@@ -59,8 +59,6 @@
"hideOtherFlows": "Hide other flows",
"showAllFlows": "Show all flows",
"hideAllFlows": "Hide all flows",
"hiddenFlows": "List __count__ hidden flow",
"hiddenFlows_plural": "List __count__ hidden flows",
"showLastHiddenFlow": "Show last hidden flow",
"listFlows": "List flows",
"listSubflows": "List subflows",
@@ -92,7 +90,6 @@
"palette": {
"show": "Show palette"
},
"edit": "Edit",
"settings": "Settings",
"userSettings": "User Settings",
"nodes": "Nodes",
@@ -671,8 +668,7 @@
"unusedConfigNodes": "Unused configuration nodes",
"invalidNodes": "Invalid nodes",
"uknownNodes": "Unknown nodes",
"unusedSubflows": "Unused subflows",
"hiddenFlows": "Hidden flows"
"unusedSubflows": "Unused subflows"
}
},
"help": {
@@ -1139,7 +1135,6 @@
"defaultValue": "Default value"
},
"tourGuide": {
"takeATour": "Take a tour",
"start": "Start",
"next": "Next"
},

View File

@@ -54,16 +54,7 @@
"delete": "本当に '__label__' を削除しますか?",
"dropFlowHere": "ここにフローをドロップしてください",
"addFlow": "フローの追加",
"addFlowToRight": "右側にフローを追加",
"hideFlow": "フローを非表示",
"hideOtherFlows": "他のフローを非表示",
"showAllFlows": "全てのフローを表示",
"hideAllFlows": "全てのフローを非表示",
"hiddenFlows": "__count__ 個の非表示のフロー一覧",
"hiddenFlows_plural": "__count__ 個の非表示のフロー一覧",
"showLastHiddenFlow": "最後に非表示にしたフローを表示",
"listFlows": "フロー一覧",
"listSubflows": "サブフロー一覧",
"status": "状態",
"enabled": "有効",
"disabled": "無効",
@@ -92,7 +83,6 @@
"palette": {
"show": "パレットを表示"
},
"edit": "編集",
"settings": "設定",
"userSettings": "ユーザ設定",
"nodes": "ノード",
@@ -115,7 +105,6 @@
"editPalette": "パレットの管理",
"other": "その他",
"showTips": "ヒントを表示",
"showWelcomeTours": "新バージョンのガイドツアーを表示",
"help": "Node-REDウェブサイト",
"projects": "プロジェクト",
"projects-new": "新規",
@@ -127,20 +116,7 @@
"groupSelection": "選択部分をグループ化",
"ungroupSelection": "選択部分をグループ解除",
"groupMergeSelection": "選択部分をマージ",
"groupRemoveSelection": "グループから削除",
"arrange": "配置",
"alignLeft": "左揃え",
"alignCenter": "左右中央揃え",
"alignRight": "右揃え",
"alignTop": "上揃え",
"alignMiddle": "上下中央揃え",
"alignBottom": "下揃え",
"distributeHorizontally": "左右に整列",
"distributeVertically": "上下に整列",
"moveToBack": "最背面へ移動",
"moveToFront": "最前面へ移動",
"moveBackwards": "背面へ移動",
"moveForwards": "前面へ移動"
"groupRemoveSelection": "グループから削除"
}
},
"actions": {
@@ -475,8 +451,7 @@
"global": "グローバル",
"workspace": "ワークスペース",
"selectAll": "全てのノードを選択",
"selectNone": "選択を外す",
"selectAllConnected": "接続されたノードを選択",
"selectAllConnected": "接続された全てのノードを選択",
"addRemoveNode": "ノードの選択、選択解除",
"editSelected": "選択したノードを編集",
"deleteSelected": "選択したノードや接続を削除",
@@ -486,13 +461,10 @@
"moveNode": "選択したノードを移動(移動量大)",
"toggleSidebar": "サイドバーの表示/非表示",
"togglePalette": "パレットの表示/非表示",
"copyNode": "ノードをコピー",
"cutNode": "ノードを切り取り",
"copyNode": "選択したノードをコピー",
"cutNode": "選択したノードを切り取り",
"pasteNode": "ノードを貼り付け",
"copyGroupStyle": "グループ様式をコピー",
"pasteGroupStyle": "グループ様式を貼り付け",
"undoChange": "変更操作を戻す",
"redoChange": "変更操作をやり直し",
"searchBox": "ノードを検索",
"managePalette": "パレットの管理",
"actionList": "動作一覧"
@@ -547,8 +519,7 @@
"nodeEnabled_plural": "ノードを有効化しました:",
"nodeDisabled": "ノードを無効化しました:",
"nodeDisabled_plural": "ノードを無効化しました:",
"nodeUpgraded": "ノードモジュール __module__ をバージョン __version__ へ更新しました",
"unknownNodeRegistered": "ノードの読み込みエラー: <ul><li>__type__<br>__error__</li></ul>"
"nodeUpgraded": "ノードモジュール __module__ をバージョン __version__ へ更新しました"
},
"editor": {
"title": "パレットの管理",
@@ -671,8 +642,7 @@
"unusedConfigNodes": "未使用の設定ノード",
"invalidNodes": "不正なノード",
"uknownNodes": "未知のノード",
"unusedSubflows": "未使用のサブフロー",
"hiddenFlows": "非表示のフロー"
"unusedSubflows": "未使用のサブフロー"
}
},
"help": {
@@ -1138,11 +1108,6 @@
"preview": "UIプレビュー",
"defaultValue": "デフォルト値"
},
"tourGuide": {
"takeATour": "ツアーを開始",
"start": "開始",
"next": "次へ"
},
"languages": {
"de": "ドイツ語",
"en-US": "英語",

View File

@@ -225,7 +225,7 @@
"compact": "紧凑",
"formatted": "已格式化",
"copy": "导出到剪贴板",
"export": "导出到库",
"export": "到处到库",
"exportAs": "导出为",
"overwrite": "替换",
"exists": "<p><b>\"__file__\"</b>已存在</p><p>是否要替换它?</p>"

View File

@@ -1,6 +1,6 @@
{
"name": "@node-red/editor-client",
"version": "2.1.6",
"version": "2.1.3",
"license": "Apache-2.0",
"repository": {
"type": "git",

View File

@@ -38,8 +38,6 @@ RED.i18n = (function() {
defaultNS: "editor",
fallbackLng: ['en-US'],
returnObjects: true,
keySeparator: ".",
nsSeparator: ":",
interpolation: {
unescapeSuffix: 'HTML',
escapeValue: false,

View File

@@ -805,6 +805,7 @@ RED.nodes = (function() {
var removedGroups = [];
if (ws) {
delete workspaces[id];
allNodes.removeTab(id);
delete linkTabMap[id];
workspacesOrder.splice(workspacesOrder.indexOf(id),1);
var i;
@@ -842,7 +843,6 @@ RED.nodes = (function() {
for (i=removedGroups.length-1; i>=0; i--) {
removeGroup(removedGroups[i]);
}
allNodes.removeTab(id);
RED.events.emit('flows:remove',ws);
}
return {nodes:removedNodes,links:removedLinks, groups: removedGroups};
@@ -1097,11 +1097,6 @@ RED.nodes = (function() {
// Until we know how that can happen, add a filter here to remove them
node.nodes = node.nodes.filter(function(n) { return !!n }).map(function(n) { return n.id });
}
if (n.type === "tab" || n.type === "group") {
if (node.env && node.env.length === 0) {
delete node.env;
}
}
if (n._def.category != "config") {
node.x = n.x;
node.y = n.y;

View File

@@ -590,7 +590,7 @@ var RED = (function() {
{id:"menu-item-projects-settings",label:RED._("menu.label.projects-settings"),disabled:false,onselect:"core:show-project-settings"}
]});
}
menuOptions.push({id:"menu-item-edit-menu", label:RED._("menu.label.edit"), options: [
menuOptions.push({id:"menu-item-edit-menu", label:"Edit", options: [
{id: "menu-item-edit-undo", label:RED._("keyboard.undoChange"), disabled: true, onselect: "core:undo"},
{id: "menu-item-edit-redo", label:RED._("keyboard.redoChange"), disabled: true, onselect: "core:redo"},
null,

View File

@@ -71,7 +71,6 @@ RED.clipboard = (function() {
text: RED._("common.label.cancel"),
click: function() {
$( this ).dialog( "close" );
RED.view.focus();
}
},
{ // red-ui-clipboard-dialog-download
@@ -82,7 +81,6 @@ RED.clipboard = (function() {
var data = $("#red-ui-clipboard-dialog-export-text").val();
downloadData("flows.json", data);
$( this ).dialog( "close" );
RED.view.focus();
}
},
{ // red-ui-clipboard-dialog-export
@@ -97,7 +95,6 @@ RED.clipboard = (function() {
$( this ).dialog( "close" );
copyText(flowData);
RED.notify(RED._("clipboard.nodesExported"),{id:"clipboard"});
RED.view.focus();
} else {
var flowToExport = $("#red-ui-clipboard-dialog-export-text").val();
var selectedPath = activeLibraries[activeTab].getSelected();
@@ -113,7 +110,6 @@ RED.clipboard = (function() {
contentType: "application/json; charset=utf-8"
}).done(function() {
$(dialog).dialog( "close" );
RED.view.focus();
RED.notify(RED._("library.exportedToLibrary"),"success");
}).fail(function(xhr,textStatus,err) {
if (xhr.status === 401) {
@@ -175,7 +171,6 @@ RED.clipboard = (function() {
}
}
$( this ).dialog( "close" );
RED.view.focus();
}
},
{ // red-ui-clipboard-dialog-import-conflict
@@ -208,7 +203,6 @@ RED.clipboard = (function() {
// console.table(pendingImportConfig.importNodes.map(function(n) { return {id:n.id,type:n.type,result:importMap[n.id]}}))
RED.view.importNodes(newNodes, pendingImportConfig.importOptions);
$( this ).dialog( "close" );
RED.view.focus();
}
}
],
@@ -946,8 +940,7 @@ RED.clipboard = (function() {
if (truncated) {
msg += "_truncated";
}
var clipboardHidden = $('<textarea type="text" id="red-ui-clipboard-hidden" tabIndex="-1">').appendTo(document.body);
clipboardHidden.val(value).focus().select();
$("#red-ui-clipboard-hidden").val(value).focus().select();
var result = document.execCommand("copy");
if (result && element) {
var popover = RED.popover.create({
@@ -961,13 +954,14 @@ RED.clipboard = (function() {
},1000);
popover.open();
}
clipboardHidden.remove();
$("#red-ui-clipboard-hidden").val("");
if (currentFocus) {
$(currentFocus).focus();
}
return result;
}
function importNodes(nodesStr,addFlow) {
var newNodes = nodesStr;
if (typeof nodesStr === 'string') {
@@ -1242,6 +1236,8 @@ RED.clipboard = (function() {
init: function() {
setupDialogs();
$('<textarea type="text" id="red-ui-clipboard-hidden" tabIndex="-1">').appendTo("#red-ui-editor");
RED.actions.add("core:show-export-dialog",showExportNodes);
RED.actions.add("core:show-import-dialog",showImportNodes);

View File

@@ -21,7 +21,7 @@
* value: String : the value to insert if selected
* label: String|DOM Element : the label to display in the dropdown.
* }
*
*
*/
$.widget( "nodered.autoComplete", {
@@ -62,7 +62,7 @@
maxHeight: 200,
class: "red-ui-autoComplete-container",
options: completions,
onselect: (opt) => { this.element.val(opt.value); this.element.focus(); this.element.trigger("change") },
onselect: (opt) => { this.element.val(opt.value); this.element.focus() },
onclose: () => { this.completionMenuShown = false; delete this.menu; this.element.focus()}
});
this.menu.show({

View File

@@ -117,8 +117,6 @@ RED.tabs = (function() {
menuOptions = options.menu()
} else if (Array.isArray(options.menu)) {
menuOptions = options.menu;
} else if (typeof options.menu === 'function') {
menuOptions = options.menu();
}
menu = RED.menu.init({options: menuOptions});
menu.attr("id",options.id+"-menu");
@@ -578,7 +576,7 @@ RED.tabs = (function() {
function findPreviousVisibleTab(li) {
if (!li) {
li = ul.find("li.active");
li = ul.find("li.active").parent();
}
var previous = li.prev();
while(previous.length > 0 && previous.hasClass("hide-tab")) {
@@ -588,9 +586,9 @@ RED.tabs = (function() {
}
function findNextVisibleTab(li) {
if (!li) {
li = ul.find("li.active");
li = ul.find("li.active").parent();
}
var next = li.next();
var next = ul.find("li.active").next();
while(next.length > 0 && next.hasClass("hide-tab")) {
next = next.next();
}
@@ -811,18 +809,15 @@ RED.tabs = (function() {
event.preventDefault();
removeTab(tab.id);
});
RED.popover.tooltip(closeLink,RED._("workspace.hideFlow"));
}
if (tab.hideable) {
li.addClass("red-ui-tabs-closeable")
var closeLink = $("<a/>",{href:"#",class:"red-ui-tab-close red-ui-tab-hide"}).appendTo(li);
closeLink.append('<i class="fa fa-eye" />');
closeLink.append('<i class="fa fa-eye-slash" />');
var closeLink = $("<a/>",{href:"#",class:"red-ui-tab-close"}).appendTo(li);
closeLink.append('<i class="fa fa-times" />');
closeLink.on("click",function(event) {
event.preventDefault();
hideTab(tab.id);
});
RED.popover.tooltip(closeLink,RED._("workspace.hideFlow"));
}
var badges = $('<span class="red-ui-tabs-badges"></span>').appendTo(li);
@@ -831,8 +826,7 @@ RED.tabs = (function() {
$('<i class="red-ui-tabs-badge-selected fa fa-check-circle"></i>').appendTo(badges);
}
// link.attr("title",tab.label);
RED.popover.tooltip(link,function() { return tab.label})
link.attr("title",tab.label);
if (options.onadd) {
options.onadd(tab);
@@ -951,6 +945,7 @@ RED.tabs = (function() {
renameTab: function(id,label) {
tabs[id].label = label;
var tab = ul.find("a[href='#"+id+"']");
tab.attr("title",label);
tab.find("span.red-ui-text-bidi-aware").text(label).attr('dir', RED.text.bidi.resolveBaseTextDir(label));
updateTabWidths();
},

View File

@@ -556,7 +556,7 @@
this.optionExpandButton = $('<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);
this.type(this.options.default||this.typeList[0].value);
this.typeChanged = !!this.options.default;
}catch(err) {
console.log(err.stack);
@@ -805,7 +805,6 @@
var that = this;
var currentType = this.type();
this.typeMap = {};
var firstCall = (this.typeList === undefined);
this.typeList = types.map(function(opt) {
var result;
if (typeof opt === 'string') {
@@ -830,14 +829,10 @@
}
this.menu = this._createMenu(this.typeList,{},function(v) { that.type(v) });
if (currentType && !this.typeMap.hasOwnProperty(currentType)) {
if (!firstCall) {
this.type(this.typeList[0].value);
}
this.type(this.typeList[0].value);
} else {
this.propertyType = null;
if (!firstCall) {
this.type(currentType);
}
this.type(currentType);
}
if (this.typeList.length === 1 && !this.typeList[0].icon && (!this.typeList[0].label || this.typeList[0].showLabel === false)) {
this.selectTrigger.hide()

View File

@@ -554,8 +554,6 @@ RED.diff = (function() {
color: "#DDAA99",
defaults:{name:{value:""}}
}
} else if (node.type === "group") {
def = RED.group.def;
} else {
def = {};
}
@@ -765,15 +763,16 @@ RED.diff = (function() {
}
}
if (node.hasOwnProperty('x')) {
if (localNode) {
if (localNode.x !== node.x || localNode.y !== node.y || localNode.w !== node.w || localNode.h !== node.h ) {
if (localNode.x !== node.x || localNode.y !== node.y) {
localChanged = true;
localChanges++;
}
}
if (remoteNode) {
if (remoteNode.x !== node.x || remoteNode.y !== node.y|| remoteNode.w !== node.w || remoteNode.h !== node.h) {
if (remoteNode.x !== node.x || remoteNode.y !== node.y) {
remoteChanged = true;
remoteChanges++;
}
@@ -791,12 +790,7 @@ RED.diff = (function() {
localCell.addClass("red-ui-diff-status-"+(localChanged?"changed":"unchanged"));
$('<span class="red-ui-diff-status">'+(localChanged?'<i class="fa fa-square"></i>':'')+'</span>').appendTo(localCell);
element = $('<span class="red-ui-diff-list-element"></span>').appendTo(localCell);
var localPosition = {x:localNode.x,y:localNode.y};
if (localNode.hasOwnProperty('w')) {
localPosition.w = localNode.w;
localPosition.h = localNode.h;
}
propertyElements['local.position'] = RED.utils.createObjectElement(localPosition,
propertyElements['local.position'] = RED.utils.createObjectElement({x:localNode.x,y:localNode.y},
{
path: "position",
exposeApi: true,
@@ -817,12 +811,7 @@ RED.diff = (function() {
if (remoteNode) {
$('<span class="red-ui-diff-status">'+(remoteChanged?'<i class="fa fa-square"></i>':'')+'</span>').appendTo(remoteCell);
element = $('<span class="red-ui-diff-list-element"></span>').appendTo(remoteCell);
var remotePosition = {x:remoteNode.x,y:remoteNode.y};
if (remoteNode.hasOwnProperty('w')) {
remotePosition.w = remoteNode.w;
remotePosition.h = remoteNode.h;
}
propertyElements['remote.position'] = RED.utils.createObjectElement(remotePosition,
propertyElements['remote.position'] = RED.utils.createObjectElement({x:remoteNode.x,y:remoteNode.y},
{
path: "position",
exposeApi: true,
@@ -894,11 +883,11 @@ RED.diff = (function() {
}
}
}
var properties = Object.keys(node).filter(function(p) { return p!='inputLabels'&&p!='outputLabels'&&p!='z'&&p!='wires'&&p!=='x'&&p!=='y'&&p!=='w'&&p!=='h'&&p!=='id'&&p!=='type'&&(!def.defaults||!def.defaults.hasOwnProperty(p))});
var properties = Object.keys(node).filter(function(p) { return p!='inputLabels'&&p!='outputLabels'&&p!='z'&&p!='wires'&&p!=='x'&&p!=='y'&&p!=='id'&&p!=='type'&&(!def.defaults||!def.defaults.hasOwnProperty(p))});
if (def.defaults) {
properties = properties.concat(Object.keys(def.defaults));
}
if (node.type !== 'tab' && node.type !== "group") {
if (node.type !== 'tab') {
properties = properties.concat(['inputLabels','outputLabels']);
}
if ( ((localNode && localNode.hasOwnProperty('icon')) || (remoteNode && remoteNode.hasOwnProperty('icon'))) &&

View File

@@ -744,16 +744,7 @@ RED.editor = (function() {
delete cn.__label__;
});
var label = type;
if (typeof node_def.paletteLabel !== "undefined") {
try {
label = RED.utils.sanitize((typeof node_def.paletteLabel === "function" ? node_def.paletteLabel.call(node_def) : node_def.paletteLabel)||type);
} catch(err) {
console.log("Definition error: "+type+".paletteLabel",err);
}
}
select.append('<option value="_ADD_"'+(value===""?" selected":"")+'>'+RED._("editor.addNewType", {type:label})+'</option>');
select.append('<option value="_ADD_"'+(value===""?" selected":"")+'>'+RED._("editor.addNewType", {type:type})+'</option>');
window.setTimeout(function() { select.trigger("change");},50);
}
}

View File

@@ -247,7 +247,7 @@
var currentExpression = expressionEditor.getValue();
var expr;
var usesContext = false;
var legacyMode = /(^|[^a-zA-Z0-9_'".])msg([^a-zA-Z0-9_'"]|$)/.test(currentExpression);
var legacyMode = /(^|[^a-zA-Z0-9_'"])msg([^a-zA-Z0-9_'"]|$)/.test(currentExpression);
$(".red-ui-editor-type-expression-legacy").toggle(legacyMode);
try {
expr = jsonata(currentExpression);

View File

@@ -81,8 +81,7 @@
clearTimeout: true,
setInterval: true,
clearInterval: true
},
extraLibs: options.extraLibs
}
});
if (options.cursor) {
expressionEditor.gotoLine(options.cursor.row+1,options.cursor.column,false);

View File

@@ -55,15 +55,9 @@
}
});
}
if (!old_env && new_env.length === 0) {
delete node.env;
} else if (!isSameObj(old_env, new_env)) {
if (!isSameObj(old_env, new_env)) {
node.env = new_env;
editState.changes.env = node.env;
if (new_env.length === 0) {
delete node.env;
} else {
node.env = new_env;
}
editState.changed = true;
}
}

View File

@@ -105,7 +105,6 @@ RED.search = (function() {
val = extractFlag(val,"unused",flags);
val = extractFlag(val,"config",flags);
val = extractFlag(val,"subflow",flags);
val = extractFlag(val,"hidden",flags);
// uses:<node-id>
val = extractValue(val,"uses",flags);
@@ -151,15 +150,7 @@ RED.search = (function() {
continue;
}
}
if (flags.hasOwnProperty("hidden")) {
// Only tabs can be hidden
if (node.node.type !== 'tab') {
continue
}
if (!RED.workspaces.isHidden(node.node.id)) {
continue
}
}
if (flags.hasOwnProperty("unused")) {
var isUnused = (node.node.type === 'subflow' && node.node.instances.length === 0) ||
(isConfigNode && node.node.users.length === 0)

View File

@@ -379,7 +379,7 @@ RED.sidebar.help = (function() {
var currentVersionParts = RED.settings.version.split(".");
var tourVersionParts = tour.version.split(".");
if (tourVersionParts[0] === currentVersionParts[0] && tourVersionParts[1] === currentVersionParts[1]) {
tourHeader = '<div><button type="button" onclick="RED.actions.invoke(\'core:show-welcome-tour\')" class="red-ui-button">' + RED._("tourGuide.takeATour") + '</button></div>';
tourHeader = '<div><button type="button" onclick="RED.actions.invoke(\'core:show-welcome-tour\')" class="red-ui-button">Take a tour</button></div>'
}
}
var aboutHeader = '<div style="text-align:center;">'+tourHeader+'</div>'

View File

@@ -175,7 +175,6 @@ RED.sidebar.info.outliner = (function() {
n.d = true;
}
n.dirty = true;
n.dirtyStatus = true;
n.changed = true;
RED.events.emit("nodes:change",n);
groupHistoryEvent.events.push(historyEvent);
@@ -204,7 +203,6 @@ RED.sidebar.info.outliner = (function() {
n.d = true;
}
n.dirty = true;
n.dirtyStatus = true;
n.changed = true;
RED.events.emit("nodes:change",n);
RED.history.push(historyEvent);
@@ -274,7 +272,6 @@ RED.sidebar.info.outliner = (function() {
{label:RED._("sidebar.info.search.invalidNodes"), value: "is:invalid"},
{label:RED._("sidebar.info.search.uknownNodes"), value: "type:unknown"},
{label:RED._("sidebar.info.search.unusedSubflows"), value:"is:subflow is:unused"},
{label:RED._("sidebar.info.search.hiddenFlows"), value:"is:hidden"},
]
});

View File

@@ -364,8 +364,6 @@ RED.tourGuide = (function() {
if (step.fallback) {
focus.one("mouseenter", function(evt) {
setTimeout(function() {
var pos = targetElement[0].getBoundingClientRect();
var dimension = Math.max(50, Math.max(pos.width,pos.height)*1.5);
focus.css({
width: (4*dimension)+"px",
height: (4*dimension)+"px"

View File

@@ -109,7 +109,7 @@ RED.utils = (function() {
window._marked.use({extensions: [descriptionList, description] } );
function renderMarkdown(txt) {
var rendered = _marked.parse(txt);
var rendered = _marked(txt);
var cleaned = DOMPurify.sanitize(rendered, {SAFE_FOR_JQUERY: true})
return cleaned;
}
@@ -142,8 +142,6 @@ RED.utils = (function() {
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-meta"></span>').text('function');
} else if (value.hasOwnProperty('type') && (value.type === 'number' || value.type === 'bigint')) {
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-number"></span>').text(value.data);
} else if (value.hasOwnProperty('type') && value.type === 'regexp') {
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-string"></span>').text(value.data);
} else {
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-meta">object</span>');
}
@@ -442,8 +440,6 @@ RED.utils = (function() {
$('<span class="red-ui-debug-msg-type-null">undefined</span>').appendTo(entryObj);
} else if (obj.__enc__ && (obj.type === 'number' || obj.type === 'bigint')) {
e = $('<span class="red-ui-debug-msg-type-number red-ui-debug-msg-object-header"></span>').text(obj.data).appendTo(entryObj);
} else if (typeHint === "regexp" || (obj.__enc__ && obj.type === 'regexp')) {
e = $('<span class="red-ui-debug-msg-type-string red-ui-debug-msg-object-header"></span>').text((typeof obj === "string")?obj:obj.data).appendTo(entryObj);
} else if (typeHint === "function" || (obj.__enc__ && obj.type === 'function')) {
e = $('<span class="red-ui-debug-msg-type-meta red-ui-debug-msg-object-header"></span>').text("function").appendTo(entryObj);
} else if (typeHint === "internal" || (obj.__enc__ && obj.type === 'internal')) {

View File

@@ -46,6 +46,7 @@ RED.view = (function() {
var workspaceScrollPositions = {};
var gridSize = 20;
var widthSize = 20;
var snapGrid = false;
var activeSpliceLink;
@@ -596,7 +597,7 @@ RED.view = (function() {
},
tooltip: function(d) {
if (d.validationErrors && d.validationErrors.length > 0) {
return RED._("editor.errors.invalidProperties")+"\n - "+d.validationErrors.join("\n - ")
return RED._("editor.errors.invalidProperties")+"\n - "+d.validationErrors.join("\n - ")
}
},
show: function(n) { return !n.valid }
@@ -3675,11 +3676,7 @@ RED.view = (function() {
nodeEl = document.getElementById(d.id);
}
if (nodeEl) {
// Do not show node status if:
// - global flag set
// - node has no status
// - node is disabled
if (!showStatus || !d.status || d.d === true) {
if (!showStatus || !d.status) {
nodeEl.__statusGroup__.style.display = "none";
} else {
nodeEl.__statusGroup__.style.display = "inline";
@@ -4029,7 +4026,7 @@ RED.view = (function() {
if (hideLabel) {
d.w = node_height;
} else {
d.w = Math.max(node_width,20*(Math.ceil((labelParts.width+50+(d._def.inputs>0?7:0))/20)) );
d.w = Math.max(node_width,widthSize*(Math.ceil((labelParts.width+50+(d._def.inputs>0?7:0))/widthSize)) );
}
if (ow !== undefined) {
d.x += (d.w-ow)/2;
@@ -4425,9 +4422,6 @@ RED.view = (function() {
n.selected = true;
n.dirty = true;
movingSet.add(n);
if (targets.length === 1) {
RED.view.reveal(n.id);
}
});
updateSelection();
redraw();
@@ -4579,9 +4573,9 @@ RED.view = (function() {
d.nodes.forEach(function(n) {
groupOpCount++
if (n.type !== "group") {
minX = Math.min(minX,n.x-n.w/2-margin-((n._def.button && n._def.align!=="right")?20:0));
minX = Math.min(minX,n.x-n.w/2-margin-((n._def.button && n._def.align!=="right")?widthSize:0));
minY = Math.min(minY,n.y-n.h/2-margin);
maxX = Math.max(maxX,n.x+n.w/2+margin+((n._def.button && n._def.align=="right")?20:0));
maxX = Math.max(maxX,n.x+n.w/2+margin+((n._def.button && n._def.align=="right")?widthSize:0));
maxY = Math.max(maxY,n.y+n.h/2+margin);
} else {
minX = Math.min(minX,n.x-margin)
@@ -5036,7 +5030,6 @@ RED.view = (function() {
delete node.d;
}
node.dirty = true;
node.dirtyStatus = true;
node.changed = true;
RED.events.emit("nodes:change",node);
}
@@ -5092,23 +5085,23 @@ RED.view = (function() {
function calculateNodeDimensions(node) {
var result = [node_width,node_height];
try {
var isLink = (node.type === "link in" || node.type === "link out")
var hideLabel = node.hasOwnProperty('l')?!node.l : isLink;
var label = RED.utils.getNodeLabel(node, node.type);
var labelParts = getLabelParts(label, "red-ui-flow-node-label");
if (hideLabel) {
result[1] = Math.max(node_height,(node.outputs || 0) * 15);
} else {
result[1] = Math.max(6+24*labelParts.lines.length,(node.outputs || 0) * 15, 30);
var isLink = (node.type === "link in" || node.type === "link out")
var hideLabel = node.hasOwnProperty('l')?!node.l : isLink;
var label = RED.utils.getNodeLabel(node, node.type);
var labelParts = getLabelParts(label, "red-ui-flow-node-label");
if (hideLabel) {
result[1] = Math.max(node_height,(node.outputs || 0) * 15);
} else {
result[1] = Math.max(6+24*labelParts.lines.length,(node.outputs || 0) * 15, 30);
}
if (hideLabel) {
result[0] = node_height;
} else {
result[0] = Math.max(node_width,widthSize*(Math.ceil((labelParts.width+50+(node._def.inputs>0?7:0))/widthSize)) );
}
} catch(err) {
console.log("Error",node);
}
if (hideLabel) {
result[0] = node_height;
} else {
result[0] = Math.max(node_width,20*(Math.ceil((labelParts.width+50+(node._def.inputs>0?7:0))/20)) );
}
}catch(err) {
console.log("Error",node);
}
return result;
}
@@ -5249,6 +5242,8 @@ RED.view = (function() {
return gridSize;
} else {
gridSize = Math.max(5,v);
widthSize = gridSize;
while (widthSize > 50) { widthSize = Math.round(widthSize/2); }
updateGrid();
}
},

View File

@@ -66,7 +66,7 @@ RED.workspaces = (function() {
var tabId = RED.nodes.id();
do {
workspaceIndex += 1;
} while ($("#red-ui-workspace-tabs li[flowname='"+RED._('workspace.defaultName',{number:workspaceIndex})+"']").size() !== 0);
} while ($("#red-ui-workspace-tabs a[title='"+RED._('workspace.defaultName',{number:workspaceIndex})+"']").size() !== 0);
ws = {
type: "tab",
@@ -79,15 +79,12 @@ RED.workspaces = (function() {
};
RED.nodes.addWorkspace(ws,targetIndex);
workspace_tabs.addTab(ws,targetIndex);
workspace_tabs.activateTab(tabId);
if (!skipHistoryEntry) {
RED.history.push({t:'add',workspaces:[ws],dirty:RED.nodes.dirty()});
RED.nodes.dirty(true);
}
}
$("#red-ui-tab-"+(ws.id.replace(".","-"))).attr("flowname",ws.label)
RED.view.focus();
return ws;
}
@@ -211,84 +208,65 @@ RED.workspaces = (function() {
},
onhide: function(tab) {
hideStack.push(tab.id);
var hiddenTabs = JSON.parse(RED.settings.getLocal("hiddenTabs")||"{}");
hiddenTabs[tab.id] = true;
RED.settings.setLocal("hiddenTabs",JSON.stringify(hiddenTabs));
RED.events.emit("workspace:hide",{workspace: tab.id})
},
onshow: function(tab) {
removeFromHideStack(tab.id);
var hiddenTabs = JSON.parse(RED.settings.getLocal("hiddenTabs")||"{}");
delete hiddenTabs[tab.id];
RED.settings.setLocal("hiddenTabs",JSON.stringify(hiddenTabs));
RED.events.emit("workspace:show",{workspace: tab.id})
},
minimumActiveTabWidth: 150,
scrollable: true,
addButton: "core:add-flow",
addButtonCaption: RED._("workspace.addFlow"),
menu: function() {
var menuItems = [
{
id:"red-ui-tabs-menu-option-search-flows",
label: RED._("workspace.listFlows"),
onselect: "core:list-flows"
},
{
id:"red-ui-tabs-menu-option-search-subflows",
label: RED._("workspace.listSubflows"),
onselect: "core:list-subflows"
},
null,
{
id:"red-ui-tabs-menu-option-add-flow",
label: RED._("workspace.addFlow"),
onselect: "core:add-flow"
},
{
id:"red-ui-tabs-menu-option-add-flow-right",
label: RED._("workspace.addFlowToRight"),
onselect: "core:add-flow-to-right"
},
null,
{
id:"red-ui-tabs-menu-option-add-hide-flows",
label: RED._("workspace.hideFlow"),
onselect: "core:hide-flow"
},
{
id:"red-ui-tabs-menu-option-add-hide-other-flows",
label: RED._("workspace.hideOtherFlows"),
onselect: "core:hide-other-flows"
},
{
id:"red-ui-tabs-menu-option-add-show-all-flows",
label: RED._("workspace.showAllFlows"),
onselect: "core:show-all-flows"
},
{
id:"red-ui-tabs-menu-option-add-hide-all-flows",
label: RED._("workspace.hideAllFlows"),
onselect: "core:hide-all-flows"
},
{
id:"red-ui-tabs-menu-option-add-show-last-flow",
label: RED._("workspace.showLastHiddenFlow"),
onselect: "core:show-last-hidden-flow"
}
]
if (hideStack.length > 0) {
menuItems.unshift({
label: RED._("workspace.hiddenFlows",{count: hideStack.length}),
onselect: "core:list-hidden-flows"
})
menu: [
{
id:"red-ui-tabs-menu-option-search-flows",
label: RED._("workspace.listFlows"),
onselect: "core:list-flows"
},
{
id:"red-ui-tabs-menu-option-search-subflows",
label: RED._("workspace.listSubflows"),
onselect: "core:list-subflows"
},
null,
{
id:"red-ui-tabs-menu-option-add-flow",
label: RED._("workspace.addFlow"),
onselect: "core:add-flow"
},
{
id:"red-ui-tabs-menu-option-add-flow-right",
label: RED._("workspace.addFlowToRight"),
onselect: "core:add-flow-to-right"
},
null,
{
id:"red-ui-tabs-menu-option-add-hide-flows",
label: RED._("workspace.hideFlow"),
onselect: "core:hide-flow"
},
{
id:"red-ui-tabs-menu-option-add-hide-other-flows",
label: RED._("workspace.hideOtherFlows"),
onselect: "core:hide-other-flows"
},
{
id:"red-ui-tabs-menu-option-add-show-all-flows",
label: RED._("workspace.showAllFlows"),
onselect: "core:show-all-flows"
},
{
id:"red-ui-tabs-menu-option-add-hide-all-flows",
label: RED._("workspace.hideAllFlows"),
onselect: "core:hide-all-flows"
},
{
id:"red-ui-tabs-menu-option-add-show-last-flow",
label: RED._("workspace.showLastHiddenFlow"),
onselect: "core:show-last-hidden-flow"
}
return menuItems;
}
]
});
workspaceTabCount = 0;
}
@@ -428,9 +406,7 @@ RED.workspaces = (function() {
}
}
})
RED.actions.add("core:list-hidden-flows",function() {
RED.actions.invoke("core:search","is:hidden ");
})
RED.actions.add("core:list-flows",function() {
RED.actions.invoke("core:search","type:tab ");
})
@@ -474,7 +450,7 @@ RED.workspaces = (function() {
var changes = { disabled: workspace.disabled };
workspace.disabled = disabled;
$("#red-ui-tab-"+(workspace.id.replace(".","-"))).toggleClass('red-ui-workspace-disabled',!!workspace.disabled);
if (!id || (id === activeWorkspace)) {
if (id || activeWorkspace) {
$("#red-ui-workspace").toggleClass("red-ui-workspace-disabled",!!workspace.disabled);
}
var historyEvent = {
@@ -555,11 +531,11 @@ RED.workspaces = (function() {
}
if (workspace_tabs.contains(id)) {
workspace_tabs.hideTab(id);
var hiddenTabs = JSON.parse(RED.settings.getLocal("hiddenTabs")||"{}");
hiddenTabs[id] = true;
RED.settings.setLocal("hiddenTabs",JSON.stringify(hiddenTabs));
}
},
isHidden: function(id) {
return hideStack.includes(id)
},
show: function(id,skipStack,unhideOnly) {
if (!workspace_tabs.contains(id)) {
var sf = RED.nodes.subflow(id);
@@ -582,11 +558,14 @@ RED.workspaces = (function() {
}
workspace_tabs.activateTab(id);
}
var hiddenTabs = JSON.parse(RED.settings.getLocal("hiddenTabs")||"{}");
delete hiddenTabs[id];
RED.settings.setLocal("hiddenTabs",JSON.stringify(hiddenTabs));
},
refresh: function() {
RED.nodes.eachWorkspace(function(ws) {
workspace_tabs.renameTab(ws.id,ws.label);
$("#red-ui-tab-"+(ws.id.replace(".","-"))).attr("flowname",ws.label)
})
RED.nodes.eachSubflow(function(sf) {
if (workspace_tabs.contains(sf.id)) {

View File

@@ -197,7 +197,6 @@ $view-select-mode-background: $secondary-background-selected;
$view-grid-color: #eee;
$node-label-color: #333;
$node-port-label-color: #888;
$node-border: #999;
$node-border-unknown: #f33;
$node-border-placeholder: #aaa;

View File

@@ -360,7 +360,6 @@ button.red-ui-button-small
position: absolute;
top: -3000px;
}
.form-row .red-ui-editor-node-label-form-row {
margin: 5px 0 0 50px;
label {

View File

@@ -47,7 +47,7 @@
.red-ui-flow-port-label {
stroke-width: 0;
fill: $node-port-label-color;
fill: $secondary-text-color;
font-size: 16px;
dominant-baseline: middle;
text-anchor: middle;

View File

@@ -187,7 +187,7 @@
ul.red-ui-menu-dropdown {
background: $header-menu-background;
border: 1px solid $header-menu-background;
width: 260px !important;
width: 250px !important;
margin-top: 0;
li a {
color: $header-menu-color;

View File

@@ -389,19 +389,7 @@ i.red-ui-tab-icon {
vertical-align: top;
}
.red-ui-tab-hide {
.fa-eye-slash {
display: none;
}
&:hover {
.fa-eye-slash {
display: inline
}
.fa-eye {
display: none
}
}
}
.red-ui-tab-close {
display: none;
background: $tab-background-inactive;

View File

@@ -1,23 +1,14 @@
export default {
steps: [
{
title: {
'en-US': 'Create your first flow',
'ja': 'はじめてのフローを作成'
},
title: "Create your first flow",
width: 400,
description: {
'en-US': 'This tutorial will guide you through creating your first flow',
'ja': '本チュートリアルでは、はじめてのフローを作成する方法について説明します。'
},
description: 'This tutorial will guide you through creating your first flow',
nextButton: 'start'
},
{
element: "#red-ui-workspace .red-ui-tab-button.red-ui-tabs-add",
description: {
'en-US': 'To add a new tab, click the <i class="fa fa-plus"></i> button',
'ja': '新しいタブを追加するため、 <i class="fa fa-plus"></i> ボタンをクリックします。'
},
description: 'To add a new tab, click the <i class="fa fa-plus"></i> button',
wait: {
type: "dom-event",
event: "click",
@@ -27,10 +18,7 @@ export default {
{
element: '.red-ui-palette-node[data-palette-type="inject"]',
direction: 'right',
description: {
'en-US': 'The palette lists all of the nodes available to use. Drag a new Inject node into the workspace.',
'ja': 'パレットには、利用できる全てのードが一覧表示されます。injectードをワークスペースにドラッグします。'
},
description: 'The palette lists all of the nodes available to use. Drag a new Inject node into the workspace.',
fallback: 'inset-bottom-right',
wait: {
type: "nr-event",
@@ -50,10 +38,7 @@ export default {
{
element: '.red-ui-palette-node[data-palette-type="debug"]',
direction: 'right',
description: {
'en-US': 'Next, drag a new Debug node into the workspace.',
'ja': '次に、debugードをワークスペースにドラッグします。'
},
description: 'Next, drag a new Debug node into the workspace.',
fallback: 'inset-bottom-right',
wait: {
type: "nr-event",
@@ -72,10 +57,7 @@ export default {
},
{
element: function() { return $("#"+this.injectNode.id+" .red-ui-flow-port") },
description: {
'en-US': 'Add a wire from the output of the Inject node to the input of the Debug node',
'ja': 'injectードの出力から、debugードの入力へワイヤーで接続します。'
},
description: 'Add a wire from the output of the Inject node to the input of the Debug node',
fallback: 'inset-bottom-right',
wait: {
type: "nr-event",
@@ -87,10 +69,7 @@ export default {
},
{
element: "#red-ui-header-button-deploy",
description: {
'en-US': 'Deploy your changes so the flow is active in the runtime',
'ja': 'フローをランタイムで実行させるため、変更をデプロイします。'
},
description: 'Deploy your changes so the flow is active in the runtime',
width: 200,
wait: {
type: "dom-event",

View File

@@ -3,79 +3,48 @@ export default {
steps: [
{
titleIcon: "fa fa-map-o",
title: {
"en-US": "Welcome to Node-RED 2.1!",
"ja": "Node-RED 2.1へようこそ!"
},
description: {
"en-US": "Let's take a moment to discover the new features in this release.",
"ja": "本リリースの新機能を見つけてみましょう。"
}
title: { "en-US": "Welcome to Node-RED 2.1!" },
description: { "en-US": "Let's take a moment to discover the new features in this release." }
},
{
title: {
"en-US": "A new Tour Guide",
"ja": "新しいツアーガイド"
},
description: {
"en-US": "<p>First, as you've already found, we now have this tour of new features. We'll only show the tour the first time you open the editor for each new version of Node-RED.</p>" +
"<p>You can choose not to see this tour in the future by disabling it under the View tab of User Settings.</p>",
"ja": "<p>最初に、既に見つけている様に、新機能の本ツアーがあります。本ツアーは、新バージョンのNode-REDフローエディタを初めて開いた時のみ表示されます。</p>" +
"<p>ユーザ設定の表示タブの中で、この機能を無効化することで、本ツアーを表示しないようにすることもできます。</p>"
}
title: { "en-US": "A new Tour Guide" },
description: { "en-US": "<p>First, as you've already found, we now have this tour of new features. We'll only show the tour the first time you open the editor for each new version of Node-RED.</p>"+
"<p>You can choose not to see this tour in the future by disabling it under the View tab of User Settings.</p>" }
},
{
title: {
"en-US": "New Edit menu",
"ja": "新しい編集メニュー"
},
title: { "en-US": "New Edit menu" },
prepare() {
$("#red-ui-header-button-sidemenu").trigger("click");
$("#menu-item-edit-menu").parent().addClass("open");
$("#menu-item-edit-menu").parent().addClass("open")
},
complete() {
$("#menu-item-edit-menu").parent().removeClass("open");
$("#menu-item-edit-menu").parent().removeClass("open")
},
element: "#menu-item-edit-menu-submenu",
interactive: false,
direction: "left",
description: {
"en-US": "<p>The main menu has been updated with a new 'Edit' section. This includes all of the familar options, like cut/paste and undo/redo.</p>" +
"<p>The menu now displays keyboard shortcuts for the options.</p>",
"ja": "<p>メインメニューに「編集」セクションが追加されました。本セクションには、切り取り/貼り付けや、変更操作を戻す/やり直しの様な使い慣れたオプションが含まれています。</p>" +
"<p>本メニューには、オプションのためのキーボードショートカットも表示されるようになりました。</p>"
}
description: { "en-US": "<p>The main menu has been updated with a new 'Edit' section. This includes all of the familar options, like cut/paste and undo/redo.</p>"+
"<p>The menu now displays keyboard shortcuts for the options.</p>" }
},
{
title: {
"en-US": "Arranging nodes",
"ja": "ノードの配置"
},
title: { "en-US": "Arranging nodes" },
prepare() {
$("#red-ui-header-button-sidemenu").trigger("click");
$("#menu-item-arrange-menu").parent().addClass("open");
$("#menu-item-arrange-menu").parent().addClass("open")
},
complete() {
$("#menu-item-arrange-menu").parent().removeClass("open");
$("#menu-item-arrange-menu").parent().removeClass("open")
},
element: "#menu-item-arrange-menu-submenu",
interactive: false,
direction: "left",
description: {
"en-US": "<p>The new 'Arrange' section of the menu provides new options to help arrange your nodes. You can align them to a common edge, spread them out evenly or change their order.</p>",
"ja": "<p>メニューの新しい「配置」セクションには、ノードの配置を助ける新しいオプションが提供されています。ノードの端を揃えたり、均等に配置したり、表示順序を変更したりできます。</p>"
}
description: { "en-US": "<p>The new 'Arrange' section of the menu provides new options to help arrange your nodes. You can align them to a common edge, spread them out evenly or change their order.</p>" },
},
{
title: {
"en-US": "Hiding tabs",
"ja": "タブの非表示"
},
title: { "en-US": "Hiding tabs" },
element: "#red-ui-workspace-tabs > li.active",
description: {
"en-US": '<p>Tabs can now be hidden by clicking their <i class="fa fa-eye-slash"></i> icon.</p><p>The Info Sidebar will still list all of your tabs, and tell you which ones are currently hidden.',
"ja": '<p><i class="fa fa-eye-slash"></i> アイコンをクリックすることで、タブを非表示にできます。</p><p>情報サイドバーには、全てのタブが一覧表示されており、現在非表示になっているタブを確認できます。'
},
description: { "en-US": '<p>Tabs can now be hidden by clicking their <i class="fa fa-times"></i> icon.</p><p>The Info Sidebar will still list all of your tabs, and tell you which ones are currently hidden.' },
interactive: false,
prepare() {
$("#red-ui-workspace-tabs > li.active .red-ui-tab-close").css("display","block");
@@ -85,15 +54,9 @@ export default {
}
},
{
title: {
"en-US": "Tab menu",
"ja": "タブメニュー"
},
title: { "en-US": "Tab menu" },
element: "#red-ui-workspace-tabs-menu",
description: {
"en-US": "<p>The new tab menu also provides lots of new options for your tabs.</p>",
"ja": "<p>新しいタブメニューには、タブに関する沢山の新しいオプションが提供されています。</p>"
},
description: { "en-US": '<p>The new tab menu also provides lots of new options for your tabs.</p>' },
interactive: false,
direction: "left",
prepare() {
@@ -104,16 +67,10 @@ export default {
}
},
{
title: {
"en-US": "Flow and Group level environment variables",
"ja": "フローとグループの環境変数"
},
title: { "en-US": "Flow and Group level environment variables" },
element: "#red-ui-workspace-tabs > li.active",
interactive: false,
description: {
"en-US": "<p>Flows and Groups can now have their own environment variables that can be referenced by nodes inside them.</p>",
"ja": "<p>フローとグループには、内部のノードから参照できる環境変数を設定できるようになりました。</p>"
}
description: { "en-US": "<p>Flows and Groups can now have their own environment variables that can be referenced by nodes inside them.</p>" },
},
{
prepare(done) {
@@ -121,28 +78,20 @@ export default {
setTimeout(done,700);
},
element: "#red-ui-tab-editor-tab-envProperties-link-button",
description: {
"en-US": "<p>Their edit dialogs have a new Environment Variables section.</p>",
"ja": "<p>編集ダイアログに環境変数セクションが追加されました。</p>"
}
description: { "en-US": "<p>Their edit dialogs have a new Environment Variables section.</p>" },
},
{
element: ".node-input-env-container-row",
direction: "left",
description: {
"en-US": '<p>The environment variables are listed in this table and new ones can be added by clicking the <i class="fa fa-plus"></i> button.</p>',
"ja": '<p>この表に環境変数が一覧表示されており、<i class="fa fa-plus"></i>ボタンをクリックすることで新しい変数を追加できます。</p>'
},
description: { "en-US": '<p>The environment variables are listed in this table and new ones can be added by clicking the <i class="fa fa-plus"></i> button.</p>' },
complete(done) {
$("#node-dialog-cancel").trigger("click");
setTimeout(done,500);
}
},
{
title: {
"en-US": "Link Call node added",
"ja": "Link Callードを追加"
},
title: {"en-US":"Link Call node added"},
prepare(done) {
this.paletteWasClosed = $("#red-ui-main-container").hasClass("red-ui-palette-closed");
RED.actions.invoke("core:toggle-palette",true)
@@ -151,34 +100,22 @@ export default {
},
element: '[data-palette-type="link call"]',
direction: "right",
description: {
"en-US": "<p>The <code>Link Call</code> node lets you call another flow that begins with a <code>Link In</code> node and get the result back when the message reaches a <code>Link Out</code> node.</p>",
"ja": "<p><code>Link Call</code>ノードを用いることで、<code>Link In</code>ノードから始まるフローを呼び出し、<code>Link Out</code>ノードに到達した時に、結果を取得できます。</p>"
}
description: { "en-US": '<p>The <code>Link Call</code> node lets you call another flow that begins with a <code>Link In</code> node and get the result back when the message reaches a <code>Link Out</code> node.</p>' },
},
{
title: {
"en-US": "MQTT nodes support dynamic connections",
"ja": "MQTTードが動的接続をサポート"
},
title: {"en-US":"MQTT nodes support dynamic connections"},
prepare(done) {
$('[data-palette-type="mqtt out"]')[0].scrollIntoView({block:"center"})
setTimeout(done,100);
},
element: '[data-palette-type="mqtt out"]',
direction: "right",
description: {
"en-US": '<p>The <code>MQTT</code> nodes now support creating their connections and subscriptions dynamically.</p>',
"ja": '<p><code>MQTT</code>ノードは、動的な接続や購読ができるようになりました。</p>'
},
description: { "en-US": '<p>The <code>MQTT</code> nodes now support creating their connections and subscriptions dynamically.</p>' },
},
{
title: {
"en-US": "File nodes renamed",
"ja": "ファイルノードの名前変更"
},
title: {"en-US":"File nodes renamed"},
prepare(done) {
$('[data-palette-type="file"]')[0].scrollIntoView({block:"center"});
$('[data-palette-type="file"]')[0].scrollIntoView({block:"center"})
setTimeout(done,100);
},
complete() {
@@ -188,19 +125,13 @@ export default {
},
element: '[data-palette-type="file"]',
direction: "right",
description: {
"en-US": "<p>The file nodes have been renamed to make it clearer which node does what.</p>",
"ja": "<p>fileードの名前が変更され、どのードが何を行うかが明確になりました。</p>"
}
description: { "en-US": '<p>The file nodes have been renamed to make it clearer which node does what.</p>' },
},
{
title: {
"en-US": "Deep copy option on Change node",
"ja": "Changeードのディープコピーオプション"
},
title: {"en-US":"Deep copy option on Change node"},
prepare(done) {
var def = RED.nodes.getType('change');
RED.editor.edit({id:"test",type:"change",rules:[{t:"set",p:"payload",pt:"msg", tot:"msg",to:"anotherProperty"}],_def:def, _:def._});
var def = RED.nodes.getType('change')
RED.editor.edit({id:"test",type:"change",rules:[{t:'set',p:'payload',pt:'msg', tot:'msg',to:"anotherProperty"}],_def:def, _:def._})
setTimeout(done,700);
},
complete(done) {
@@ -208,22 +139,13 @@ export default {
setTimeout(done,500);
},
element: function() {
return $(".node-input-rule-property-deepCopy").next();
return $(".node-input-rule-property-deepCopy").next()
},
description: {
"en-US": "<p>The Set rule has a new option to create a deep copy of the value. This ensures a complete copy is made, rather than using a reference.</p>",
"ja": "<p>値を代入に、値のディープコピーを作成するオプションが追加されました。これによって参照ではなく、完全なコピーが作成されます。</p>"
}
description: { "en-US": '<p>The Set rule has a new option to create a deep copy of the value. This ensures a complete copy is made, rather than using a reference.</p>' },
},
{
title: {
"en-US": "And that's not all...",
"ja": "これが全てではありません..."
},
description: {
"en-US": "<p>There are many more smaller changes, including:</p><ul><li>Auto-complete suggestions in the <code>msg</code> TypedInput.</li><li>Support for <code>msg.resetTimeout</code> in the <code>Join</code> node.</li><li>Pushing messages to the front of the queue in the <code>Delay</code> node's rate limiting mode.</li><li>An optional second output on the <code>Delay</code> node for rate limited messages.</li></ul>",
"ja": "<p>以下の様な小さな変更が沢山あります:</p><ul><li><code>msg</code> TypedInputの自動補完提案</li><li><code>Join</code>ノードで<code>msg.resetTimeout</code>のサポート</li><li><code>Delay</code>ノードの流量制御モードにおいて先頭メッセージをキューに追加</li><li><code>Delay</code>ードで流量制限されたメッセージ向けの任意の2つ目の出力</li></ul>"
}
title: { "en-US": "And that's not all..." },
description: { "en-US": "<p>There are many more smaller changes, including:</p><ul><li>Auto-complete suggestions in the <code>msg</code> TypedInput.</li><li>Support for <code>msg.resetTimeout</code> in the <code>Join</code> node.</li><li>Pushing messages to the front of the queue in the <code>Delay</code> node's rate limiting mode.</li><li>An optional second output on the <code>Delay</code> node for rate limited messages.</li></ul>" }
}
]
}

View File

@@ -234,7 +234,7 @@
}
} else if (v[i].vt === "jsonata") {
try{jsonata(v[i].v);}catch(e){return false;}
} else if (v[i].vt === "json") {
} else if ([i].vt === "json") {
try{JSON.parse(v[i].v);}catch(e){return false;}
}
}
@@ -690,9 +690,9 @@
this.topic = "";
var result = getProps(items, true);
this.props = result.props;
if(result.hasOwnProperty('payloadType')) { this.payloadType = result.payloadType; };
if(result.hasOwnProperty('payload')) { this.payload = result.payload; };
if(result.hasOwnProperty('topic')) { this.topic = result.topic; };
if(result.payloadType) { this.payloadType = result.payloadType; };
if(result.payload) { this.payload = result.payload; };
if(result.topic) { this.topic = result.topic; };
},
button: {
enabled: function() {

View File

@@ -280,18 +280,6 @@ module.exports = function(RED) {
root: path.join(__dirname,"lib","debug"),
dotfiles: 'deny'
};
try {
res.sendFile(
req.params[0],
options,
err => {
if (err) {
res.sendStatus(404);
}
}
)
} catch(err) {
res.sendStatus(404);
}
res.sendFile(req.params[0], options);
});
};

View File

@@ -91,21 +91,21 @@
<div id="func-tab-init" style="display:none">
<div class="form-row node-text-editor-row" style="position:relative">
<div style="height: 250px; min-height:150px;" class="node-text-editor" id="node-input-init-editor" ></div>
<div style="position: absolute; right:0; bottom: calc(100% - 20px); z-Index: 10;"><button id="node-init-expand-js" class="red-ui-button red-ui-button-small"><i class="fa fa-expand"></i></button></div>
<div style="position: absolute; right:0; bottom: calc(100% - 20px); z-Index: 5;"><button id="node-init-expand-js" class="red-ui-button red-ui-button-small"><i class="fa fa-expand"></i></button></div>
</div>
</div>
<div id="func-tab-body" style="display:none">
<div class="form-row node-text-editor-row" style="position:relative">
<div style="height: 220px; min-height:150px;" class="node-text-editor" id="node-input-func-editor" ></div>
<div style="position: absolute; right:0; bottom: calc(100% - 20px); z-Index: 10;"><button id="node-function-expand-js" class="red-ui-button red-ui-button-small"><i class="fa fa-expand"></i></button></div>
<div style="position: absolute; right:0; bottom: calc(100% - 20px); z-Index: 5;"><button id="node-function-expand-js" class="red-ui-button red-ui-button-small"><i class="fa fa-expand"></i></button></div>
</div>
</div>
<div id="func-tab-finalize" style="display:none">
<div class="form-row node-text-editor-row" style="position:relative">
<div style="height: 250px; min-height:150px;" class="node-text-editor" id="node-input-finalize-editor" ></div>
<div style="position: absolute; right:0; bottom: calc(100% - 20px); z-Index: 10;"><button id="node-finalize-expand-js" class="red-ui-button red-ui-button-small"><i class="fa fa-expand"></i></button></div>
<div style="position: absolute; right:0; bottom: calc(100% - 20px); z-Index: 5;"><button id="node-finalize-expand-js" class="red-ui-button red-ui-button-small"><i class="fa fa-expand"></i></button></div>
</div>
</div>
@@ -512,7 +512,6 @@
return function(e) {
e.preventDefault();
var value = editor.getValue();
var extraLibs = that.libs || [];
RED.editor.editJavaScript({
value: value,
width: "Infinity",
@@ -524,8 +523,7 @@
setTimeout(function() {
editor.focus();
},300);
},
extraLibs: extraLibs
}
})
}
}

View File

@@ -234,7 +234,8 @@ module.exports = function(RED) {
},
env: {
get: function(envVar) {
return RED.util.getSetting(node, envVar);
var flow = node._flow;
return flow.getSetting(envVar);
}
},
setTimeout: function () {

View File

@@ -114,8 +114,7 @@
timeout: {value:"5", required:true, validate:function(v) { return RED.validators.number(v) && (v >= 0); }},
timeoutUnits: {value:"seconds"},
rate: {value:"1", required:true, validate:function(v) { return RED.validators.number(v) && (v >= 0); }},
nbRateUnits: {value:"1", required:false,
validate:function(v) { return RED.validators.number(v) && (v >= 0); }},
nbRateUnits: {value:"1", required:false, validate:RED.validators.regex(/\d+|/)},
rateUnits: {value: "second"},
randomFirst: {value:"1", required:true, validate:function(v) { return RED.validators.number(v) && (v >= 0); }},
randomLast: {value:"5", required:true, validate:function(v) { return RED.validators.number(v) && (v >= 0); }},

View File

@@ -372,7 +372,6 @@ module.exports = function(RED) {
hit = false;
for (var b in node.buffer) { // check if already in queue
if (msg.topic === node.buffer[b].msg.topic) {
if (node.outputs === 2) { send([null,node.buffer[b].msg]) }
node.buffer[b].done();
node.buffer[b] = {msg, send, done}; // if so - replace existing entry
hit = true;

View File

@@ -58,7 +58,7 @@ module.exports = function(RED) {
else {
var n = parseFloat(value);
if (!isNaN(n)) {
if ((typeof node.previous[t] === 'undefined') && (this.func === "narrowband" || this.func === "narrowbandEq")) {
if ((typeof node.previous[t] === 'undefined') && (this.func === "narrowband")) {
if (node.start === '') { node.previous[t] = n; }
else { node.previous[t] = node.start; }
}

View File

@@ -302,8 +302,6 @@ in your Node-RED user directory (${RED.settings.userDir}).
// var cred = ""
if (this.credentials.user || this.credentials.password) {
// cred = `${this.credentials.user}:${this.credentials.password}`;
if (this.credentials.user === undefined) { this.credentials.user = ""}
if (this.credentials.password === undefined) { this.credentials.password = ""}
opts.headers.Authorization = "Basic " + Buffer.from(`${this.credentials.user}:${this.credentials.password}`).toString("base64");
}
// build own basic auth header

View File

@@ -105,24 +105,22 @@ module.exports = function(RED) {
if (node.isServer) {
node._clients[id] = socket;
node.emit('opened',{count:Object.keys(node._clients).length,id:id});
} else {
if (node.heartbeat) {
node.heartbeatInterval = setInterval(function() {
if (socket.nrPendingHeartbeat) {
// No pong received
socket.terminate();
socket.nrErrorHandler(new Error("timeout"));
return;
}
socket.nrPendingHeartbeat = true;
socket.ping();
},node.heartbeat);
}
}
socket.on('open',function() {
if (!node.isServer) {
if (node.heartbeat) {
clearInterval(node.heartbeatInterval);
node.heartbeatInterval = setInterval(function() {
if (socket.nrPendingHeartbeat) {
// No pong received
socket.terminate();
socket.nrErrorHandler(new Error("timeout"));
return;
}
socket.nrPendingHeartbeat = true;
try {
socket.ping();
} catch(err) {}
},node.heartbeat);
}
node.emit('opened',{count:'',id:id});
}
});

View File

@@ -1,156 +0,0 @@
[
{
"id": "62ea32aa.d73aac",
"type": "comment",
"z": "6312c0588348b2d4",
"name": "Example: Link Call Node",
"info": "Link call node can call link in node then get result from link out node.",
"x": 230,
"y": 180,
"wires": []
},
{
"id": "c588bc36.87fec",
"type": "comment",
"z": "6312c0588348b2d4",
"name": "↓ call link in node",
"info": "",
"x": 440,
"y": 220,
"wires": []
},
{
"id": "cd31efb4d2c6967e",
"type": "link call",
"z": "6312c0588348b2d4",
"name": "",
"links": [
"dbc46892c8d14c37"
],
"timeout": "30",
"x": 420,
"y": 260,
"wires": [
[
"c3db64d1d2260340"
]
]
},
{
"id": "dbc46892c8d14c37",
"type": "link in",
"z": "6312c0588348b2d4",
"name": "",
"links": [],
"x": 315,
"y": 340,
"wires": [
[
"e10575d73f2e5352"
]
]
},
{
"id": "6b61792143b3b0a3",
"type": "inject",
"z": "6312c0588348b2d4",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 240,
"y": 260,
"wires": [
[
"cd31efb4d2c6967e"
]
]
},
{
"id": "e10575d73f2e5352",
"type": "change",
"z": "6312c0588348b2d4",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Hello, World!",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 450,
"y": 340,
"wires": [
[
"cf8438e7137bc0f0"
]
]
},
{
"id": "cf8438e7137bc0f0",
"type": "link out",
"z": "6312c0588348b2d4",
"name": "",
"mode": "return",
"links": [],
"x": 595,
"y": 340,
"wires": []
},
{
"id": "c3db64d1d2260340",
"type": "debug",
"z": "6312c0588348b2d4",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 600,
"y": 260,
"wires": []
},
{
"id": "6d077dfa0987febb",
"type": "comment",
"z": "6312c0588348b2d4",
"name": "↑called from link call node",
"info": "",
"x": 410,
"y": 380,
"wires": []
},
{
"id": "53b9a0adfd8c4217",
"type": "comment",
"z": "6312c0588348b2d4",
"name": "↑return to link call node",
"info": "",
"x": 680,
"y": 380,
"wires": []
}
]

View File

@@ -2,7 +2,7 @@
{
"id": "84222b92.d65d18",
"type": "inject",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "",
"props": [
{
@@ -20,8 +20,8 @@
"topic": "",
"payload": "Hello, World!",
"payloadType": "str",
"x": 190,
"y": 180,
"x": 230,
"y": 220,
"wires": [
[
"b4b9f603.739598"
@@ -31,25 +31,25 @@
{
"id": "7b014430.dfd94c",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "Write string to a file, then read from the file",
"info": "Read file node can read string from a file.",
"x": 220,
"y": 100,
"info": "File-in node can read string from a file.",
"x": 260,
"y": 140,
"wires": []
},
{
"id": "b4b9f603.739598",
"type": "file",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "",
"filename": "/tmp/hello.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 380,
"y": 180,
"x": 420,
"y": 220,
"wires": [
[
"6dc01cac.5c4bf4"
@@ -59,7 +59,7 @@
{
"id": "2587adb9.7e60f2",
"type": "debug",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "",
"active": true,
"tosidebar": true,
@@ -68,22 +68,22 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 770,
"y": 180,
"x": 810,
"y": 220,
"wires": []
},
{
"id": "6dc01cac.5c4bf4",
"type": "file in",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "",
"filename": "/tmp/hello.txt",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "none",
"x": 580,
"y": 180,
"x": 620,
"y": 220,
"wires": [
[
"2587adb9.7e60f2"
@@ -93,21 +93,21 @@
{
"id": "f4b4309a.3b78a",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "↑read result from file",
"info": "",
"x": 590,
"y": 220,
"x": 630,
"y": 260,
"wires": []
},
{
"id": "672d3693.3cabd8",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "↓write to /tmp/hello.txt",
"info": "",
"x": 400,
"y": 140,
"x": 440,
"y": 180,
"wires": []
}
]

View File

@@ -2,7 +2,7 @@
{
"id": "8997398f.c5d628",
"type": "inject",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "",
"props": [
{
@@ -20,8 +20,8 @@
"topic": "",
"payload": "😀",
"payloadType": "str",
"x": 170,
"y": 260,
"x": 210,
"y": 480,
"wires": [
[
"56e32d23.050f44"
@@ -31,25 +31,25 @@
{
"id": "4e598e65.1799d",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "Read data in specified encoding",
"info": "Read file node can specify encoding of data read from a file.",
"x": 190,
"y": 180,
"info": "File-in node can specify encoding of data read from a file.",
"x": 230,
"y": 400,
"wires": []
},
{
"id": "56e32d23.050f44",
"type": "file",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "",
"filename": "/tmp/hello.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 340,
"y": 260,
"x": 380,
"y": 480,
"wires": [
[
"38fa0579.f2cd8a"
@@ -59,7 +59,7 @@
{
"id": "d28c8994.99c0a8",
"type": "debug",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "",
"active": true,
"tosidebar": true,
@@ -68,23 +68,22 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 730,
"y": 260,
"x": 770,
"y": 480,
"wires": []
},
{
"id": "38fa0579.f2cd8a",
"type": "file in",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "",
"filename": "/tmp/hello.txt",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "base64",
"allProps": false,
"x": 540,
"y": 260,
"x": 580,
"y": 480,
"wires": [
[
"d28c8994.99c0a8"
@@ -94,21 +93,21 @@
{
"id": "fa22ca20.ae4528",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "↑read data from file as base64 string",
"info": "",
"x": 600,
"y": 300,
"x": 640,
"y": 520,
"wires": []
},
{
"id": "148e25ad.98891a",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "↓write to /tmp/hello.txt",
"info": "",
"x": 360,
"y": 220,
"x": 400,
"y": 440,
"wires": []
}
]

View File

@@ -2,7 +2,7 @@
{
"id": "6a0b1d03.d4cee4",
"type": "inject",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "",
"props": [
{
@@ -20,8 +20,8 @@
"topic": "",
"payload": "",
"payloadType": "date",
"x": 160,
"y": 220,
"x": 220,
"y": 740,
"wires": [
[
"d4b00cb7.a5a23"
@@ -31,25 +31,25 @@
{
"id": "f17ea1d1.8ecc3",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "Read data breaking lines into individual messages",
"info": "Read file node can break read text into messages with individual lines",
"x": 230,
"y": 140,
"info": "File-in node can break read text into messages with individual lines",
"x": 290,
"y": 660,
"wires": []
},
{
"id": "99ae7806.1d6428",
"type": "file",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "",
"filename": "/tmp/hello.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 480,
"y": 220,
"x": 540,
"y": 740,
"wires": [
[
"70d7892f.d27db8"
@@ -59,7 +59,7 @@
{
"id": "7ed8282c.92b338",
"type": "debug",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "",
"active": true,
"tosidebar": true,
@@ -68,22 +68,22 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 750,
"y": 280,
"x": 810,
"y": 800,
"wires": []
},
{
"id": "70d7892f.d27db8",
"type": "file in",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "",
"filename": "/tmp/hello.txt",
"format": "lines",
"chunk": false,
"sendError": false,
"encoding": "none",
"x": 560,
"y": 280,
"x": 620,
"y": 800,
"wires": [
[
"7ed8282c.92b338"
@@ -93,27 +93,27 @@
{
"id": "c1b7e05.1d94b2",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "↑read data from file breaking lines into messages",
"info": "",
"x": 660,
"y": 320,
"x": 720,
"y": 840,
"wires": []
},
{
"id": "a5f647b2.cf27a8",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "↓write to /tmp/hello.txt",
"info": "",
"x": 500,
"y": 180,
"x": 560,
"y": 700,
"wires": []
},
{
"id": "d4b00cb7.a5a23",
"type": "template",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "data",
"field": "payload",
"fieldType": "msg",
@@ -121,8 +121,8 @@
"syntax": "plain",
"template": "one\ntwo\nthree!",
"output": "str",
"x": 310,
"y": 220,
"x": 370,
"y": 740,
"wires": [
[
"99ae7806.1d6428"

View File

@@ -2,7 +2,7 @@
{
"id": "bdd57acc.2edc48",
"type": "inject",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "",
"props": [
{
@@ -20,8 +20,8 @@
"topic": "",
"payload": "",
"payloadType": "date",
"x": 180,
"y": 220,
"x": 220,
"y": 1040,
"wires": [
[
"7a069b01.0c2324"
@@ -31,25 +31,25 @@
{
"id": "1fd12220.33953e",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "Creating a message stream from lines of data",
"info": "Read file node can break read text into messages with individual lines. The messages creates a stream of messages.",
"x": 230,
"y": 140,
"info": "File-in node can break read text into messages with individual lines. The messages creates a stream of messages.",
"x": 270,
"y": 960,
"wires": []
},
{
"id": "ab6eb213.2a08d",
"type": "file",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "",
"filename": "/tmp/hello.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 500,
"y": 220,
"x": 540,
"y": 1040,
"wires": [
[
"b7ed49b0.649fb8"
@@ -59,7 +59,7 @@
{
"id": "c48d8ae0.9ff3a8",
"type": "debug",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "",
"active": true,
"tosidebar": true,
@@ -68,22 +68,22 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 770,
"y": 320,
"x": 810,
"y": 1140,
"wires": []
},
{
"id": "b7ed49b0.649fb8",
"type": "file in",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "",
"filename": "/tmp/hello.txt",
"format": "lines",
"chunk": false,
"sendError": false,
"encoding": "none",
"x": 240,
"y": 320,
"x": 280,
"y": 1140,
"wires": [
[
"83073ebe.fcce4"
@@ -93,27 +93,27 @@
{
"id": "3c33e69f.6a04ba",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "↑read data from file breaking lines into messages",
"info": "",
"x": 340,
"y": 360,
"x": 380,
"y": 1180,
"wires": []
},
{
"id": "3598bf7d.5712a",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "↓write to /tmp/hello.txt",
"info": "",
"x": 520,
"y": 180,
"x": 560,
"y": 1000,
"wires": []
},
{
"id": "7a069b01.0c2324",
"type": "template",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "data",
"field": "payload",
"fieldType": "msg",
@@ -121,8 +121,8 @@
"syntax": "plain",
"template": "Apple\nBanana\nGrape\nOrange",
"output": "str",
"x": 330,
"y": 220,
"x": 370,
"y": 1040,
"wires": [
[
"ab6eb213.2a08d"
@@ -132,7 +132,7 @@
{
"id": "8d4ed1d0.821fe",
"type": "join",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "",
"mode": "auto",
"build": "string",
@@ -145,8 +145,8 @@
"timeout": "",
"count": "",
"reduceRight": false,
"x": 590,
"y": 320,
"x": 630,
"y": 1140,
"wires": [
[
"c48d8ae0.9ff3a8"
@@ -156,7 +156,7 @@
{
"id": "83073ebe.fcce4",
"type": "switch",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "< D",
"property": "payload",
"propertyType": "msg",
@@ -170,8 +170,8 @@
"checkall": "true",
"repair": true,
"outputs": 1,
"x": 430,
"y": 320,
"x": 470,
"y": 1140,
"wires": [
[
"8d4ed1d0.821fe"
@@ -181,21 +181,21 @@
{
"id": "2088e195.f7aebe",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "↓filter data before \"D\"",
"info": "",
"x": 480,
"y": 280,
"x": 520,
"y": 1100,
"wires": []
},
{
"id": "b848cdc7.61e06",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "194a3e4f.a92772",
"name": "↑join to single string",
"info": "",
"x": 630,
"y": 360,
"x": 670,
"y": 1180,
"wires": []
}
]

View File

@@ -2,7 +2,7 @@
{
"id": "84222b92.d65d18",
"type": "inject",
"z": "5132b95f037524f9",
"z": "4b63452d.672afc",
"name": "",
"props": [
{
@@ -20,8 +20,8 @@
"topic": "",
"payload": "Hello, World!",
"payloadType": "str",
"x": 150,
"y": 220,
"x": 230,
"y": 200,
"wires": [
[
"b4b9f603.739598"
@@ -31,25 +31,25 @@
{
"id": "7b014430.dfd94c",
"type": "comment",
"z": "5132b95f037524f9",
"z": "4b63452d.672afc",
"name": "Write string to a file, then read from the file",
"info": "Write file node can write string from a file.",
"x": 180,
"y": 140,
"info": "File node can write string to a file.",
"x": 260,
"y": 120,
"wires": []
},
{
"id": "b4b9f603.739598",
"type": "file",
"z": "5132b95f037524f9",
"z": "4b63452d.672afc",
"name": "",
"filename": "/tmp/hello.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 340,
"y": 220,
"x": 420,
"y": 200,
"wires": [
[
"6dc01cac.5c4bf4"
@@ -59,7 +59,7 @@
{
"id": "2587adb9.7e60f2",
"type": "debug",
"z": "5132b95f037524f9",
"z": "4b63452d.672afc",
"name": "",
"active": true,
"tosidebar": true,
@@ -68,22 +68,22 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 730,
"y": 220,
"x": 810,
"y": 200,
"wires": []
},
{
"id": "6dc01cac.5c4bf4",
"type": "file in",
"z": "5132b95f037524f9",
"z": "4b63452d.672afc",
"name": "",
"filename": "/tmp/hello.txt",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "none",
"x": 540,
"y": 220,
"x": 620,
"y": 200,
"wires": [
[
"2587adb9.7e60f2"
@@ -93,21 +93,21 @@
{
"id": "f4b4309a.3b78a",
"type": "comment",
"z": "5132b95f037524f9",
"z": "4b63452d.672afc",
"name": "↑read result from file",
"info": "",
"x": 550,
"y": 260,
"x": 630,
"y": 240,
"wires": []
},
{
"id": "672d3693.3cabd8",
"type": "comment",
"z": "5132b95f037524f9",
"z": "4b63452d.672afc",
"name": "↓write to /tmp/hello.txt",
"info": "",
"x": 360,
"y": 180,
"x": 440,
"y": 160,
"wires": []
}
]

View File

@@ -2,7 +2,7 @@
{
"id": "704479e1.399388",
"type": "inject",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "",
"props": [
{
@@ -25,8 +25,8 @@
"topic": "",
"payload": "Hello, World!",
"payloadType": "str",
"x": 190,
"y": 260,
"x": 230,
"y": 400,
"wires": [
[
"402f3b7e.988014"
@@ -36,25 +36,25 @@
{
"id": "8e876a75.e9beb8",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "Write string to a file specied by filename property, the read from the file",
"info": "Write file node can target file using `filename` property.",
"x": 310,
"y": 180,
"info": "File node can target file using `filename` property.",
"x": 350,
"y": 320,
"wires": []
},
{
"id": "402f3b7e.988014",
"type": "file",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "",
"filename": "",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 350,
"y": 260,
"x": 390,
"y": 400,
"wires": [
[
"26e077d6.bbcd98"
@@ -64,7 +64,7 @@
{
"id": "97b6b6b2.a54b38",
"type": "debug",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "",
"active": true,
"tosidebar": true,
@@ -73,22 +73,22 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 730,
"y": 260,
"x": 770,
"y": 400,
"wires": []
},
{
"id": "26e077d6.bbcd98",
"type": "file in",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "",
"filename": "/tmp/hello.txt",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "none",
"x": 540,
"y": 260,
"x": 580,
"y": 400,
"wires": [
[
"97b6b6b2.a54b38"
@@ -98,21 +98,21 @@
{
"id": "85062297.da79",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "↑read result from file",
"info": "",
"x": 550,
"y": 300,
"x": 590,
"y": 440,
"wires": []
},
{
"id": "7316c4fc.b1dcdc",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "↓write to file specified by filename property",
"info": "",
"x": 460,
"y": 220,
"x": 500,
"y": 360,
"wires": []
}
]

View File

@@ -2,7 +2,7 @@
{
"id": "4ac00fb0.d5f52",
"type": "inject",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "",
"props": [
{
@@ -20,8 +20,8 @@
"topic": "",
"payload": "",
"payloadType": "date",
"x": 180,
"y": 220,
"x": 220,
"y": 600,
"wires": [
[
"542cc2f4.92857c"
@@ -31,25 +31,25 @@
{
"id": "671f8295.0e6f6c",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "Delete a file",
"info": "Write file node can delete a file.",
"x": 130,
"y": 160,
"info": "File node can delete a file.",
"x": 170,
"y": 540,
"wires": []
},
{
"id": "542cc2f4.92857c",
"type": "file",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "",
"filename": "/tmp/hello.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "delete",
"encoding": "none",
"x": 380,
"y": 220,
"x": 420,
"y": 600,
"wires": [
[
"a24da523.5babe8"
@@ -59,7 +59,7 @@
{
"id": "a24da523.5babe8",
"type": "debug",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "",
"active": true,
"tosidebar": true,
@@ -68,18 +68,18 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 590,
"y": 220,
"x": 630,
"y": 600,
"wires": []
},
{
"id": "51157051.2f62",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "↓delete a file",
"info": "",
"x": 350,
"y": 180,
"x": 390,
"y": 560,
"wires": []
}
]

View File

@@ -2,8 +2,8 @@
{
"id": "e4ef1f5e.7cd82",
"type": "inject",
"z": "6312c0588348b2d4",
"name": "Base64 encoded string",
"z": "4b63452d.672afc",
"name": "",
"props": [
{
"p": "payload"
@@ -20,8 +20,8 @@
"topic": "",
"payload": "8J+YgA==",
"payloadType": "str",
"x": 200,
"y": 220,
"x": 220,
"y": 820,
"wires": [
[
"72b37cc8.177054"
@@ -31,25 +31,25 @@
{
"id": "f5997af4.5a9298",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "Specify encoding of written data",
"info": "Write file node can specify encoding of data.",
"x": 170,
"y": 140,
"info": "File node can specify encoding of data.",
"x": 230,
"y": 740,
"wires": []
},
{
"id": "72b37cc8.177054",
"type": "file",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "",
"filename": "/tmp/hello.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "base64",
"x": 420,
"y": 220,
"x": 400,
"y": 820,
"wires": [
[
"2da33ec.f45cac2"
@@ -59,7 +59,7 @@
{
"id": "2e814354.278c8c",
"type": "debug",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "",
"active": true,
"tosidebar": true,
@@ -68,22 +68,22 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 810,
"y": 220,
"x": 790,
"y": 820,
"wires": []
},
{
"id": "2da33ec.f45cac2",
"type": "file in",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "",
"filename": "/tmp/hello.txt",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "none",
"x": 620,
"y": 220,
"x": 600,
"y": 820,
"wires": [
[
"2e814354.278c8c"
@@ -93,21 +93,21 @@
{
"id": "ec754c99.84bfd",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "↓write string with base64 encoding",
"info": "",
"x": 480,
"y": 180,
"x": 460,
"y": 780,
"wires": []
},
{
"id": "3e6704ff.4ce25c",
"type": "comment",
"z": "6312c0588348b2d4",
"z": "4b63452d.672afc",
"name": "↑read result from file",
"info": "",
"x": 630,
"y": 260,
"x": 610,
"y": 860,
"wires": []
}
]

View File

@@ -851,6 +851,7 @@
"outputas": "Ausgabe",
"breakchunks": "In Chunks aufteilen",
"breaklines": "In Linien aufteilen",
"filelabel": "file",
"sendError": "Nachricht bei Fehler senden (herkömmlicher Modus)",
"encoding": "Kodierung",
"deletelabel": "lösche __file__",

View File

@@ -21,7 +21,7 @@
<dt>msg <span class="property-type">object</span></dt>
<dd>A msg object containing information to populate the template.</dd>
<dt class="optional">template <span class="property-type">string</span></dt>
<dd>A template to be populated from <code>msg.payload</code>. If not configured in the edit panel,
<dd>A template to be populated from msg.payload. If not configured in the edit panel,
this can be set as a property of msg.</dd>
</dl>
<h3>Outputs</h3>

View File

@@ -60,5 +60,5 @@
for the next topic.
</p>
<p><b>Note</b>: In rate limit mode the maximum queue depth can be set by a property in your
<i>settings.js</i> file. For example <code>nodeMessageBufferMaxLength: 1000,</code></p>
<i>settings.js</i> file. For example <code>nodeMessageBufferMaxLength: 1000,</code>
</script>

View File

@@ -25,7 +25,7 @@
<h3>Details</h3>
<p>In RBE mode this node will block until the <code>msg.payload</code>,
(or selected property) value is different to the previous one.
If required it can ignore the initial value, so as not to send anything at start.</p>
If required it can ignore the intial value, so as not to send anything at start.</p>
<p>The <a href="https://en.wikipedia.org/wiki/Deadband" target="_blank">Deadband</a> modes will block the incoming value
<i>unless</i> its change is greater or greater-equal than &plusmn; the band gap away from a previous value.</p>
<p>The Narrowband modes will block the incoming value,
@@ -37,5 +37,5 @@
ignoring any values out of range, or the previous input value, which resets the set point, thus allowing
gradual drift (deadband), or a step change (narrowband).</p>
<p><b>Note:</b> This works on a per <code>msg.topic</code> basis, though this can be changed to another property if desired.
This means that a single filter node can handle multiple different topics at the same time.</p>
This means that a single rbe node can handle multiple different topics at the same time.</p>
</script>

View File

@@ -52,7 +52,7 @@
<dt class="optional">topic <span class="property-type">string|object|array</span></dt>
<dd>For the <code>"subscribe"</code> and <code>"unsubscribe"</code> actions, this property
provides the topic. It can be set as either:<ul>
<li>a String containing the topic filter</li>
<li>a String continaing the topic filter</li>
<li>an Object containing <code>topic</code> and <code>qos</code> properties</li>
<li>an array of either strings or objects to handle multiple topics in one</li>
</ul>

View File

@@ -52,7 +52,7 @@
<dd>In case any redirects occurred while processing the request, this property is the final redirected url.
Otherwise, the url of the original request.</dd>
<dt>responseCookies <span class="property-type">object</span></dt>
<dd>If the response includes cookies, this property is an object of name/value pairs for each cookie.</dd>
<dd>If the response includes cookies, this propery is an object of name/value pairs for each cookie.</dd>
<dt>redirectList <span class="property-type">array</span></dt>
<dd>If the request was redirected one or more times, the accumulated information will be added to this property. `location` is the next redirect destination. `cookies` is the cookies returned from the redirect source.</dd>
</dl>

View File

@@ -60,7 +60,7 @@
</p>
<p>When operating in this mode, the node will not set the <code>msg.parts.count</code>
property as it does not know how many messages to expect in the stream. This
means it cannot be used with the <b>join</b> node in its automatic mode.</p>
means it cannot be used with the <b>join</b> node in its automatic mode</p>
</script>
<script type="text/html" data-help-name="join">

View File

@@ -29,12 +29,3 @@
<p>linkード間のリンクはlinkードを選択した場合にのみ表示されます他のタブへのリンクがある場合には仮想的なノードを表示しますこの仮想的ノードをクリックすると対応するタブに移動できます</p>
<p><b>: </b></p>
</script>
<script type="text/html" data-help-name="link call">
<p><code>link in</code> </p>
<h3>詳細</h3>
<p>本ノードは任意のタブ内に存在する <code>link in</code> `` <code>link out</code> </p>
<p>本ノードはメッセージを受信するとメッセージを接続した <code>link in</code>
その後応答を待った後にメッセージを送信します</o>
<p>もし設定したタイムアウト(デフォルト30秒)以内に応答がない場合は<code>catch</code> </p>
</script>

View File

@@ -46,6 +46,4 @@
<code>{{global[store].名前}}</code>
</p>
<p><b>: </b>デフォルトでは、<i>mustache</i>形式は置換対象のHTML要素をエスケープしますこれを抑止するには<code>{{{三重}}}</code>使</p>
<p>もしコンテンツの中で<code>{{ }}</code>使<code>[[ ]]</code></p>
<pre>{{=[[ ]]=}}</pre>
</script>

View File

@@ -25,14 +25,11 @@
<dt class="optional">reset</dt>
<dd>受信メッセージでこのプロパティを任意の値に設定するとノードが保持する全ての未送信メッセージをクリアします</dd>
<dt class="optional">flush</dt>
<dd>本プロパティに数値が設定されたメッセージを受信すると直ちに指定された数のメッセージを送信しますもし他の型(例えば真偽型)が設定されている場合はノードが保持している全ての未送信メッセージを直ちに送信します</dd>
<dt class="optional">toFront</dt>
<dd>流量制御モードにおいて本プロパティに真偽型<code>true</code><code>msg.flush=1</code></dd>
<dd>受信メッセージでこのプロパティを任意の値に設定するとノードが保持る全ての未送信メッセージを直ちに送信します</dd>
</dl>
<h3>詳細</h3>
<p>メッセージを遅延させるように設定する場合遅延時間は固定値範囲内の乱数値メッセージ毎の動的な指定値のいずれかを指定できます各メッセージは到着時刻に基づいて他のメッセージとは独立して遅延されます</p>
<p>メッセージを遅延させるように設定する場合遅延時間は固定値範囲内の乱数値メッセージ毎の動的な指定値のいずれかを指定できます</p>
<p>流量制御する場合メッセージは指定した時間間隔内に分散して送信しますキューに残っているメッセージ数はノードのステータスに表示されます受け取った中間メッセージを破棄することも可能です</p>
<p>流量値を上書きできるように設定されている場合新しい流量値はすぐに適用されますこの流量値は再度変更されるまで本ノードがリセットされるまでまたはフローが再実行されるまで有効です</p>
<p>流量制御は全てのメッセージに適用することも<code>msg.topic</code></p>
<p><b></b>: 流量制御モードでは、キューの大きさの最大値を<i>settings.js</i>ファイルのプロパティに設定できます例えば次の様な設定です<code>nodeMessageBufferMaxLength: 1000,</code></p>
</script>

View File

@@ -27,5 +27,5 @@
<p>不感帯モードでは%による指定もサポートしています入力と前の値の差分がX%より大きな場合に出力を行います</p>
<p>狭帯域(narrowband)モードでは前の値に対する差分が一定値より大きな場合に入力ペイロードをブロックしますこのモードは故障したセンサから発生する外れ値を無視する時などに有用です</p>
<p>不感帯モードと狭帯域モードでは以前の有効出力値もしくは以前の入力値との比較ができます有効出力値を用いると範囲外の値を無視することが入力値を用いると設定点がリセットされるため漸次的変化(不感帯モード)もしくは段階的変化(狭帯域モード)が可能です</p>
<p><b>:</b> <code>msg.topic</code>filter</p>
<p><b>:</b> <code>msg.topic</code>rbe</p>
</script>

View File

@@ -144,16 +144,11 @@
"filterCurrent": "現在のフロー",
"debugNodes": "debugード",
"clearLog": "ログを削除",
"clearFilteredLog": "選択したメッセージを削除",
"filterLog": "ログのフィルタリング",
"openWindow": "新しいウィンドウで開く",
"copyPath": "パスをコピー",
"copyPayload": "値をコピー",
"pinPath": "展開を固定",
"selectAll": "全てを選択",
"selectNone": "選択を外す",
"all": "全て",
"filtered": "選択したメッセージ"
"pinPath": "展開を固定"
},
"messageMenu": {
"collapseAll": "全パスを折りたたむ",
@@ -164,15 +159,7 @@
},
"link": {
"linkIn": "link in",
"linkOut": "link out",
"linkCall": "link call",
"linkOutReturn": "link return",
"outMode": "モード",
"sendToAll": "接続された全てのlinkードへ送信",
"returnToCaller": "link callードへ返却",
"error": {
"missingReturn": "返却するノードの情報が存在しません"
}
"linkOut": "link out"
},
"tls": {
"tls": "TLS設定",
@@ -295,9 +282,7 @@
"and": "回/",
"rate": "流量",
"msgper": "メッセージ/",
"queuemsg": "中間メッセージをキューに追加",
"dropmsg": "中間メッセージを削除",
"sendmsg": "2番目の出力で中間メッセージを送信",
"allowrate": "msg.rate(ミリ秒単位)で流量値を上書き",
"label": {
"delay": "delay",
@@ -416,11 +401,7 @@
"maximumPacketSize": "最大パケット長",
"receiveMaximum": "最大受信数",
"session": "セッション",
"delay": "遅延",
"action": "動作",
"staticTopic": "1つのトピックを購読",
"dynamicTopic": "動的な購読",
"auto-connect": "自動接続"
"delay": "遅延"
},
"sections-label": {
"birth-message": "接続時の送信メッセージ(Birthメッセージ)",
@@ -461,10 +442,7 @@
"invalid-topic": "不正なトピックが設定されています",
"nonclean-missingclientid": "「セッションの初期化」使用時に、クライアントIDが設定されていません",
"invalid-json-string": "不正なJSON文字列",
"invalid-json-parse": "JSON文字列のパースに失敗しました",
"invalid-action-action": "指定された動作が不正です",
"invalid-action-alreadyconnected": "接続する前にブローカから切断してください",
"invalid-action-badsubscription": "msg.topicが存在しないか不正です"
"invalid-json-parse": "JSON文字列のパースに失敗しました"
}
},
"httpin": {
@@ -500,7 +478,6 @@
"proxy-config": "プロキシ設定",
"use-proxyauth": "プロキシ認証を使用",
"noproxy-hosts": "例外ホスト",
"senderr": "2xx以外の応答をcatchードへ送信",
"utf8": "UTF8文字列",
"binary": "バイナリバッファ",
"json": "JSONオブジェクト",
@@ -726,15 +703,13 @@
"delete": "delete __property__",
"move": "move __property__",
"changeCount": "change: __count__ rules",
"regex": "正規表現を使用",
"deepCopy": "値のディープコピー"
"regex": "正規表現を使用"
},
"action": {
"set": "値の代入",
"change": "値の置換",
"delete": "値の削除",
"move": "値の移動",
"toValue": "対象の値",
"to": "対象の値",
"search": "検索する文字列",
"replace": "置換後の文字列"
@@ -876,8 +851,6 @@
},
"file": {
"label": {
"write": "write file",
"read": "read file",
"filename": "ファイル名",
"action": "動作",
"addnewline": "メッセージの入力のたびに改行を追加",
@@ -885,6 +858,7 @@
"outputas": "出力形式",
"breakchunks": "チャンクへ分割",
"breaklines": "行へ分割",
"filelabel": "file",
"sendError": "エラーメッセージを送信(互換モード)",
"encoding": "文字コード",
"deletelabel": "delete __file__",

View File

@@ -26,46 +26,11 @@
<dd>0: 最大1度到着, 1: 一度以上到着, 2: 1度のみ到着</dd>
<dt>retain <span class="property-type">真偽値</span></dt>
<dd>真の場合メッセージを保持メッセージが古い値の場合があります</dd>
<dt class="optional">responseTopic <span class="property-type">文字列</span></dt>
<dd><b>MQTTv5</b>: MQTT</dd>
<dt class="optional">correlationData <span class="property-type">バッファ</span></dt>
<dd><b>MQTTv5</b>: </dd>
<dt class="optional">contentType <span class="property-type">文字列</span></dt>
<dd><b>MQTTv5</b>: </dd>
<dt class="optional">userProperties <span class="property-type">オブジェクト</span></dt>
<dd><b>MQTTv5</b>: </dd>
<dt class="optional">messageExpiryInterval <span class="property-type">数値</span></dt>
<dd><b>MQTTv5</b>: </dd>
</dl>
<h3>詳細</h3>
<p>購読トピックにはMQTTのワイルドカード(+: 1レベル, #: 複数レベル)を含めることができます</p>
<p>このノードの利用のためにはMQTTブローカへの接続設定が必要ですこの設定は鉛筆アイコンをクリックすることで行えます</p>
<p>MQTT(inおよびout)ノードはブローカへの接続設定を必要に応じて共有できます</p>
<h4>動的購読</h4>
本ノードはMQTTの接続と購読を動的に制御するよう設定できます有効にすると本ノードの入力にメッセージを渡すことで制御できます
<h3>入力</h3>
<p>これらは動的購読が設定されている場合のみ適用されます</p>
<dl class="message-properties">
<dt>action <span class="property-type">文字列</span></dt>
<dd>本ノードが行う動作の名前利用可能な動作は<code>"connect"</code><code>"disconnect"</code><code>"subscribe"</code><code>"unsubscribe"</code></dd>
<dt class="optional">topic <span class="property-type">文字列|オブジェクト|配列</span></dt>
<dd><code>"subscribe"</code><code>"unsubscribe"</code>:<ul>
<li>トピックフィルターを含む文字列</li>
<li><code>topic</code><code>qos</code></li>
<li>複数のトピックを扱う文字列やオブジェクトの配列</li>
</ul>
</dd>
<dt class="optional">broker <span class="property-type">broker</span> </dt>
<dd><code>"connect"</code>: <ul>
<li><code>broker</code></li>
<li><code>port</code></li>
<li><code>url</code> - URLbrokerport</li>
<li><code>username</code></li>
<li><code>password</code></li>
</ul>
<p>本プロパティが設定され既にブローカが接続されている場合<code>force</code></p>
</dd>
</dl>
</script>
<script type="text/html" data-help-name="mqtt out">
@@ -74,24 +39,15 @@
<dl class="message-properties">
<dt>payload <span class="property-type">文字列 | バッファ</span></dt>
<dd>発行するペイロードプロパティが設定されていない場合にはメッセージは送信されません空のメッセージを送信するにはプロパティに空文字列を設定します</dd>
<dt class="optional">topic <span class="property-type">文字列</span></dt>
<dd>発行対象のMQTTトピック</dd>
<dt class="optional">qos <span class="property-type">数値</span></dt>
<dd>0: 最大一度到着, 1: 一度以上到着, 2: 一度のみ到着デフォルトは0です</dd>
<dt class="optional">retain <span class="property-type">真偽値</span></dt>
<dd>真の場合メッセージをブローカに保持しますデフォルトは偽です</dd>
<dt class="optional">responseTopic <span class="property-type">文字列</span></dt>
<dd><b>MQTTv5</b>: MQTT</dd>
<dt class="optional">correlationData <span class="property-type">バッファ</span></dt>
<dd><b>MQTTv5</b>: </dd>
<dt class="optional">contentType <span class="property-type">文字列</span></dt>
<dd><b>MQTTv5</b>: </dd>
<dt class="optional">userProperties <span class="property-type">オブジェクト</span></dt>
<dd><b>MQTTv5</b>: </dd>
<dt class="optional">messageExpiryInterval <span class="property-type">数値</span></dt>
<dd><b>MQTTv5</b>: </dd>
<dt class="optional">topicAlias <span class="property-type">数値</span></dt>
<dd><b>MQTTv5</b>: 使MQTT</dd>
</dl>
<h3>詳細</h3>
<p><code>msg.payload</code>JSON</p>
@@ -99,24 +55,6 @@
<p>同様にQoSとretainもードの設定もしくはノードの設定が空の場合にはそれぞれ<code>msg.qos</code><code>msg.retain</code>retain</p>
<p>このノードの利用のためにはMQTTブローカへの接続設定が必要ですこの設定は鉛筆アイコンをクリックすることで行えます</p>
<p>MQTT(inおよびout)ノードはブローカへの接続設定を必要に応じて共有できます</p>
<h4>動的制御</h4>
本ノードによって接続を動的に制御できます本ノードが以下の制御メッセージのいずれかを受け取った際はペイロードと同じ様にパブリッシュされることはありません
<h3>入力</h3>
<dl class="message-properties">
<dt>action <span class="property-type">文字列</span></dt>
<dd>本ノードが行う動作の名前利用可能な動作は<code>"connect"</code><code>"disconnect"</code><code>"subscribe"</code><code>"unsubscribe"</code></dd>
<dt class="optional">broker <span class="property-type">broker</span> </dt>
<dd><code>"connect"</code>: <ul>
<li><code>broker</code></li>
<li><code>port</code></li>
<li><code>url</code> - URLbrokerport</li>
<li><code>username</code></li>
<li><code>password</code></li>
</ul>
<p>本プロパティが設定され既にブローカが接続されている場合<code>force</code></p>
</dd>
</dl>
</script>
<script type="text/html" data-help-name="mqtt-broker">
@@ -132,4 +70,5 @@
<h4>WebSocket</h4>
<p>WebSocketによる接続を行うように設定できますWebSocketを利用するにはサーバフィールドに接続先のURIを完全な形式で記述します以下に例を示します</p>
<pre>ws://example.com:4000/mqtt</pre>
</script>

View File

@@ -36,7 +36,7 @@
<h3>詳細</h3>
<p>列名にカラム名のリストを指定することができますCSVからオブジェクトに変換を行う際カラム名をプロパティ名として使用します列名の代わりにCSVデータの1行目にカラム名を含めることもできます</p>
<p>CSVへの変換を行う際にはオブジェクトから取り出すべきプロパティとその順序を列名を参照して決めます</p>
<p>列名がない場合本ノードは<code>msg.columns</code>使</p>
<p>列名がない場合本ノードは<code>msg.columns</code>使</p>
<p>入力が配列の場合には列名はカラム名を表す行の出力指定がされた場合だけ用います</p>
<p>数値を変換するオプションがチェックされている場合文字列型の数値が数値として返されますつまり1,"1.5",2の真ん中の値が数値になります</p>
<p>空の文字を含むオプションがチェックされている場合空の文字列が結果に返されますつまり"1","",3の真ん中の値が空の文字列になります</p>

View File

@@ -52,6 +52,7 @@
<p>このモードで処理する際にはメッセージ数を予め知ることができないため<code>msg.parts.count</code><b>join</b></p>
</script>
<script type="text/html" data-help-name="join">
<p>メッセージ列を結合して一つのメッセージにします</p>
<p>メッセージの結合には次の3つのモードが利用できます</p>
@@ -79,10 +80,6 @@
</dd>
<dt class="optional">complete</dt>
<dd>設定されている場合本ノードはペイロードを追加し保持しているメッセージを送信しますペイロードを追加したくない場合はmsgから削除してください</dd>
<dt class="optional">reset</dt>
<dd>設定されている場合本ノードは部分的に完成したメッセージを送信せず削除します</dd>
<dt class="optional">restartTimeout</dt>
<dd>設定されている場合本ノードにタイムアウトが設定されそのタイムアウトを用いて処理が再開されます</dd>
</dl>
<h3>詳細</h3>
@@ -99,7 +96,7 @@
</ul>
<p>出力メッセージのその他のプロパティはメッセージを送信する直前のメッセージをコピーします</p>
<p><i>合計値</i></p>
<p><i></i><code>msg.restartTimeout</code></p>
<p><i></i></p>
<p><code>msg.complete</code></p>
<p><code>msg.reset</code></p>

View File

@@ -771,6 +771,7 @@
"outputas": "출력형식",
"breakchunks": "청크로 분할",
"breaklines": "행으로 분할",
"filelabel": "file",
"sendError": "에러메세지를 송신(호환모드)",
"deletelabel": "delete __file__",
"utf8String": "UTF8문자열",

View File

@@ -816,6 +816,7 @@
"outputas": "Выход",
"breakchunks": "Разбить файл на части",
"breaklines": "Разбить на строки",
"filelabel": "файл",
"sendError": "Отправлять сообщение при ошибке (устаревший режим)",
"encoding": "Кодировка",
"deletelabel": "удалить __file__",

View File

@@ -804,6 +804,7 @@
"outputas": "输出",
"breakchunks": "分拆成块",
"breaklines": "分拆成行",
"filelabel": "文件",
"sendError": "发生错误时发送消息(传统模式)",
"encoding": "编码",
"deletelabel": "删除 __file__",

View File

@@ -809,6 +809,7 @@
"outputas": "輸出",
"breakchunks": "分拆成塊",
"breaklines": "分拆成行",
"filelabel": "文件",
"sendError": "發生錯誤時發送消息(傳統模式)",
"encoding": "編碼",
"deletelabel": "刪除 __file__",

View File

@@ -1,6 +1,6 @@
{
"name": "@node-red/nodes",
"version": "2.1.6",
"version": "2.1.3",
"license": "Apache-2.0",
"repository": {
"type": "git",
@@ -15,13 +15,13 @@
}
],
"dependencies": {
"acorn": "8.7.0",
"acorn": "8.5.0",
"acorn-walk": "8.2.0",
"ajv": "8.8.2",
"body-parser": "1.19.1",
"ajv": "8.6.3",
"body-parser": "1.19.0",
"cheerio": "1.0.0-rc.10",
"content-type": "1.0.4",
"cookie-parser": "1.4.6",
"cookie-parser": "1.4.5",
"cookie": "0.4.1",
"cors": "2.8.5",
"cronosjs": "1.7.1",
@@ -29,18 +29,18 @@
"form-data": "4.0.0",
"fs-extra": "10.0.0",
"fs.notify": "0.0.4",
"got": "11.8.3",
"got": "11.8.2",
"hash-sum": "2.0.0",
"hpagent": "0.1.2",
"https-proxy-agent": "5.0.0",
"is-utf8": "0.2.1",
"js-yaml": "3.14.1",
"media-typer": "1.1.0",
"mqtt": "4.3.4",
"mqtt": "4.2.8",
"multer": "1.4.3",
"mustache": "4.2.0",
"on-headers": "1.0.2",
"raw-body": "2.4.2",
"raw-body": "2.4.1",
"tough-cookie": "4.0.0",
"uuid": "8.3.2",
"ws": "7.5.1",

View File

@@ -1,6 +1,6 @@
{
"name": "@node-red/registry",
"version": "2.1.6",
"version": "2.1.3",
"license": "Apache-2.0",
"main": "./lib/index.js",
"repository": {
@@ -16,11 +16,11 @@
}
],
"dependencies": {
"@node-red/util": "2.1.6",
"@node-red/util": "2.1.3",
"clone": "2.1.2",
"fs-extra": "10.0.0",
"semver": "7.3.5",
"tar": "6.1.11",
"uglify-js": "3.14.5"
"uglify-js": "3.14.2"
}
}

View File

@@ -439,6 +439,8 @@ class Flow {
}
}
return [env.name, env];
return [env.name, env];
});
group._env = Object.fromEntries(entries);
}
@@ -455,24 +457,24 @@ class Flow {
const val
= ((value === "true") ||
(value === true));
return [{
return {
val: val
}, null];
};
}
if (type === "cred") {
return [{
return {
val: value
}, null];
};
}
try {
var val = redUtil.evaluateNodeProperty(value, type, node, null, null);
return [{
return {
val: val
}, null];
};
}
catch (e) {
this.error(e);
return [null, null];
return null;
}
}
}
@@ -486,7 +488,7 @@ class Flow {
return this.getGroupEnvSetting(node, parent, name);
}
}
return [null, name];
return null;
}
@@ -543,9 +545,6 @@ class Flow {
}
}
}
else {
key = key.substring(8);
}
}
return this.parent.getSetting(key);
}

View File

@@ -373,11 +373,10 @@ class Subflow extends Flow {
const node = this.subflowInstance;
if (node.g) {
const group = this.getGroupNode(node.g);
const [result, newName] = this.getGroupEnvSetting(node, group, name);
const result = this.getGroupEnvSetting(node, group, name);
if (result) {
return result.val;
}
name = newName;
}

View File

@@ -83,7 +83,6 @@ function createNode(flow,config) {
}
}
try {
Object.defineProperty(conf,'_module', {value: typeRegistry.getNodeInfo(type), enumerable: false, writable: true })
Object.defineProperty(conf,'_flow', {value: flow, enumerable: false, writable: true })
newNode = new nodeTypeConstructor(conf);
} catch (err) {

View File

@@ -59,9 +59,6 @@ function Node(n) {
// which we can tolerate as they are the same object.
Object.defineProperty(this,'_flow', {value: n._flow, enumerable: false, writable: true })
}
if (n._module) {
Object.defineProperty(this,'_module', {value: n._module, enumerable: false, writable: true })
}
this.updateWires(n.wires);
}
@@ -499,12 +496,7 @@ function log_helper(self, level, msg) {
if (self.name) {
o.name = self.name;
}
// See https://github.com/node-red/node-red/issues/3327
try {
self._flow.log(o);
} catch(err) {
logUnexpectedError(self, err)
}
self._flow.log(o);
}
/**
* Log an INFO level message
@@ -584,59 +576,4 @@ Node.prototype.status = function(status) {
this._flow.handleStatus(this,status);
};
function inspectObject(flow) {
try {
let properties = new Set()
let currentObj = flow
do {
if (!Object.getPrototypeOf(currentObj)) { break }
Object.getOwnPropertyNames(currentObj).map(item => properties.add(item))
} while ((currentObj = Object.getPrototypeOf(currentObj)))
let propList = [...properties.keys()].map(item => `${item}[${(typeof flow[item])[0]}]`)
propList.sort();
let result = [];
let line = "";
while (propList.length > 0) {
let prop = propList.shift()
if (line.length+prop.length > 80) {
result.push(line)
line = "";
} else {
line += " "+prop
}
}
if (line.length > 0) {
result.push(line);
}
return result.join("\n ")
} catch(err) {
return "Failed to capture object properties: "+err.toString()
}
}
function logUnexpectedError(node, error) {
let moduleInfo = node._module?`${node._module.module}@${node._module.version}`:"undefined"
Log.error(`
********************************************************************
Unexpected Node Error
${error.stack}
Node:
Type: ${node.type}
Module: ${moduleInfo}
ID: ${node._alias||node.id}
Properties:
${inspectObject(node)}
Flow: ${node._flow?node._flow.path:'undefined'}
Type: ${node._flow?node._flow.TYPE:'undefined'}
Properties:
${node._flow?inspectObject(node._flow):'undefined'}
Please report this issue, including the information logged above:
https://github.com/node-red/node-red/issues/
********************************************************************
`)
}
module.exports = Node;

View File

@@ -1,6 +1,6 @@
{
"name": "@node-red/runtime",
"version": "2.1.6",
"version": "2.1.3",
"license": "Apache-2.0",
"main": "./lib/index.js",
"repository": {
@@ -16,11 +16,11 @@
}
],
"dependencies": {
"@node-red/registry": "2.1.6",
"@node-red/util": "2.1.6",
"@node-red/registry": "2.1.3",
"@node-red/util": "2.1.3",
"async-mutex": "0.3.2",
"clone": "2.1.2",
"express": "4.17.2",
"express": "4.17.1",
"fs-extra": "10.0.0",
"json-stringify-safe": "5.0.1"
}

View File

@@ -32,14 +32,8 @@ function wrapEventFunction(obj,func) {
return function(eventName, listener) {
if (deprecatedEvents.hasOwnProperty(eventName)) {
const log = require("@node-red/util").log;
const stack = (new Error().stack).split("\n");
let location = "(unknown)"
// See https://github.com/node-red/node-red/issues/3292
if (stack.length > 2) {
location = stack[2].split("(")[1].slice(0,-1);
}
log.warn(`[RED.events] Deprecated use of "${eventName}" event from "${location}". Use "${deprecatedEvents[eventName]}" instead.`)
const stack = (new Error().stack).split("\n")[2].split("(")[1].slice(0,-1);
log.warn(`[RED.events] Deprecated use of "${eventName}" event from "${stack}". Use "${deprecatedEvents[eventName]}" instead.`)
}
return events["_"+func].call(events,eventName,listener)
}

View File

@@ -136,6 +136,8 @@ function getCurrentLocale() {
function init(settings) {
if (!initPromise) {
// Keep this as a 'when' promise as top-level red.js uses 'otherwise'
// and embedded users of NR may have copied that.
initPromise = new Promise((resolve,reject) => {
i18n.use(MessageFileLoader);
var opt = {
@@ -144,8 +146,6 @@ function init(settings) {
defaultNS: "runtime",
ns: [],
fallbackLng: defaultLang,
keySeparator: ".",
nsSeparator: ":",
interpolation: {
unescapeSuffix: 'HTML',
escapeValue: false,

View File

@@ -526,11 +526,10 @@ function getSetting(node, name, flow_) {
if (flow) {
if (node && node.g) {
const group = flow.getGroupNode(node.g);
const [result, newName] = flow.getGroupEnvSetting(node, group, name);
const result = flow.getGroupEnvSetting(node, group, name);
if (result) {
return result.val;
}
name = newName;
}
return flow.getSetting(name);
}
@@ -686,7 +685,7 @@ function prepareJSONataExpression(value,node) {
return moment(arg1, arg2, arg3, arg4);
});
expr.registerFunction('clone', cloneMessage, '<(oa)-:o>');
expr._legacyMode = /(^|[^a-zA-Z0-9_'".])msg([^a-zA-Z0-9_'"]|$)/.test(value);
expr._legacyMode = /(^|[^a-zA-Z0-9_'"])msg([^a-zA-Z0-9_'"]|$)/.test(value);
expr._node = node;
return expr;
}
@@ -843,9 +842,6 @@ function encodeObject(msg,opts) {
length: msg.msg.size
}
needsStringify = true;
} else if (msg.msg && msg.msg.constructor.name === "RegExp") {
msg.format = 'regexp';
msg.msg = msg.msg.toString();
}
if (needsStringify || (msg.format === "Object")) {
msg.msg = safeJSONStringify(msg.msg, function(key, value) {
@@ -911,12 +907,6 @@ function encodeObject(msg,opts) {
data: Object.fromEntries(Array.from(value.entries()).slice(0,debuglength)),
length: value.size
}
} else if (value.constructor.name === "RegExp") {
value = {
__enc__: true,
type: "regexp",
data: value.toString()
}
}
} else if (value === undefined) {
value = {

View File

@@ -1,6 +1,6 @@
{
"name": "@node-red/util",
"version": "2.1.6",
"version": "2.1.3",
"license": "Apache-2.0",
"repository": {
"type": "git",
@@ -16,10 +16,10 @@
],
"dependencies": {
"fs-extra": "10.0.0",
"i18next": "21.6.6",
"i18next": "21.3.1",
"json-stringify-safe": "5.0.1",
"jsonata": "1.8.5",
"lodash.clonedeep": "^4.5.0",
"moment-timezone": "0.5.34"
"moment-timezone": "0.5.33"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "node-red",
"version": "2.1.6",
"version": "2.1.3",
"description": "Low-code programming for event-driven applications",
"homepage": "http://nodered.org",
"license": "Apache-2.0",
@@ -31,13 +31,13 @@
"flow"
],
"dependencies": {
"@node-red/editor-api": "2.1.6",
"@node-red/runtime": "2.1.6",
"@node-red/util": "2.1.6",
"@node-red/nodes": "2.1.6",
"@node-red/editor-api": "2.1.3",
"@node-red/runtime": "2.1.3",
"@node-red/util": "2.1.3",
"@node-red/nodes": "2.1.3",
"basic-auth": "2.0.1",
"bcryptjs": "2.4.3",
"express": "4.17.2",
"express": "4.17.1",
"fs-extra": "10.0.0",
"node-red-admin": "^2.2.1",
"nopt": "5.0.0",

View File

@@ -425,7 +425,7 @@ describe('rbe node', function() {
});
it('should not send output if x away or greater from original value (narrowbandEq)', function(done) {
var flow = [{"id":"n1", "type":"rbe", func:"narrowbandEq", gap:"10", inout:"out", start:"1", wires:[["n2"]] },
var flow = [{"id":"n1", "type":"rbe", func:"narrowbandEq", gap:"10", inout:"out", wires:[["n2"]] },
{id:"n2", type:"helper"} ];
helper.load(testNode, flow, function() {
var n1 = helper.getNode("n1");
@@ -445,7 +445,6 @@ describe('rbe node', function() {
done();
}
});
n1.emit("input", {payload:100});
n1.emit("input", {payload:0});
n1.emit("input", {payload:10});
n1.emit("input", {payload:5});

View File

@@ -1275,52 +1275,6 @@ describe('Flow', function() {
}
});
it("can access environment variable property using $parent", function (done) {
try {
after(function() {
delete process.env.V0;
delete process.env.V1;
})
process.env.V0 = "gv0";
process.env.V1 = "gv1";
var config = flowUtils.parseConfig([
{id:"t1",type:"tab",env:[
{"name": "V0", value: "v0", type: "str"}
]},
{id:"g1",type:"group",z:"t1",env:[
{"name": "V0", value: "v1", type: "str"},
{"name": "V1", value: "v2", type: "str"}
]},
{id:"g2",type:"group",z:"t1",g:"g1",env:[
{"name": "V1", value: "v3", type: "str"}
]},
{id:"1",x:10,y:10,z:"t1",type:"test",foo:"${$parent.V0}",wires:[]},
{id:"2",x:10,y:10,z:"t1",g:"g1",type:"test",foo:"${$parent.V0}",wires:[]},
{id:"3",x:10,y:10,z:"t1",g:"g1",type:"test",foo:"${$parent.V1}",wires:[]},
{id:"4",x:10,y:10,z:"t1",g:"g2",type:"test",foo:"${$parent.V1}",wires:[]},
{id:"5",x:10,y:10,z:"t1",type:"test",foo:"${$parent.V1}",wires:[]},
]);
var flow = Flow.create({getSetting:v=>process.env[v]},config,config.flows["t1"]);
flow.start();
var activeNodes = flow.getActiveNodes();
activeNodes["1"].foo.should.equal("gv0");
activeNodes["2"].foo.should.equal("v0");
activeNodes["3"].foo.should.equal("gv1");
activeNodes["4"].foo.should.equal("v2");
activeNodes["5"].foo.should.equal("gv1");
flow.stop().then(function() {
done();
});
}
catch (e) {
console.log(e.stack);
done(e);
}
});
});