Compare commits

...

71 Commits

Author SHA1 Message Date
Nick O'Leary
a16032a8ed Track mouse release outside workspace so current action completes 2022-06-13 21:01:34 +01:00
Nick O'Leary
deb9c4ecc0 Reset mouse state when switching tabs
Fixes #3639
2022-06-09 15:47:16 -05:00
Stephen McLaughlin
62cd3b2061 Merge pull request #3630 from Steve-Mcl/fix-tcp-sockets-crash
Dont delete TCP socket twice
2022-05-27 07:37:28 +01:00
Nick O'Leary
7924907384 Merge pull request #3626 from node-red/noproxy-not-defined
MQTT Node: define noproxy variable
2022-05-26 10:43:39 +01:00
Stephen McLaughlin
51d429f9ae Dont delete TCP socket twice 2022-05-26 10:18:34 +01:00
Stephen McLaughlin
267aebb9cb Merge pull request #3628 from bonanitech/patch-1
Fix typo in CSS
2022-05-25 16:44:26 +01:00
Mauricio Bonani
3f9ebb588e Fix typo 2022-05-25 11:15:29 -04:00
Stephen McLaughlin
6f0de7c80e define noproxy variable 2022-05-24 20:43:29 +01:00
Stephen McLaughlin
3ace7eeafd Merge pull request #3623 from node-red-hitachi/i18n-debug-sidebar-node-label
i18n debug sidebar node label
2022-05-24 07:03:14 +01:00
Stephen McLaughlin
eb9f15e4e4 Merge pull request #3615 from bonanitech/ace-editor-gutter-color
Use the correct variable for the gutter text color
2022-05-23 17:33:51 +01:00
Hiroyasu Nishiyama
a147458120 i18n debug sidebar node label 2022-05-22 16:28:11 +09:00
Mauricio Bonani
afdb15dc58 Use the correct variable for the gutter text color 2022-05-18 10:28:36 -04:00
Nick O'Leary
98b4b0dce0 Merge pull request #3612 from node-red/3beta2
Update for 3.0.0-beta.2
2022-05-16 11:47:07 +01:00
Nick O'Leary
70f26e0bea Update for 3.0.0-beta.2 2022-05-16 11:10:31 +01:00
Nick O'Leary
b6ad396a6c Merge pull request #3611 from node-red/fix-ace-worker-opts
Ensure ACE worker options are set
2022-05-16 10:59:59 +01:00
Nick O'Leary
e44bb57b0e Merge pull request #3609 from Steve-Mcl/slicing-button
Change slicing / slice-junction operations over to mouse button 0 (Left Mouse Button)
2022-05-16 09:59:41 +01:00
Stephen McLaughlin
5c10b16b65 Ensure ACE worker options are set
fixes #3610
2022-05-15 13:19:28 +01:00
Steve-Mcl
7ec1d42808 Change slicing op to mouse button 0
fixes #3582
2022-05-13 16:43:27 +01:00
Stephen McLaughlin
03e9e89558 Merge pull request #3608 from node-red/filter-virtual-on-slice
Do not slice-junction link node wires
2022-05-13 11:13:14 +01:00
Nick O'Leary
3057035dec Do not slice-junction link node wires 2022-05-12 14:57:16 +01:00
Nick O'Leary
4af72cc7ba Merge pull request #3607 from node-red/junction-rework
Rework Junctions to be more node like in their event handling
2022-05-12 10:12:38 +01:00
Nick O'Leary
f6aee81651 Hide junction ports whilst dragging nodes 2022-05-12 10:02:35 +01:00
Nick O'Leary
a22f569ca0 Rework Junctions to be more node like in their event handling 2022-05-11 23:13:12 +01:00
Nick O'Leary
8043f5d865 Merge pull request #3606 from node-red/dev
Merge minor dev branch fixes and "Search flow:active" V3 item into master
2022-05-10 11:19:03 +01:00
Stephen McLaughlin
2ef50ab71f Merge pull request #3604 from node-red/fix-many-to-one-junction-slice
Handle many-to-one slicing of wires
2022-05-10 08:09:00 +01:00
Stephen McLaughlin
192a4f5e7f Merge pull request #3605 from node-red/fix-ungroup-history
Remove duplicate history add of ungroup event
2022-05-10 08:08:45 +01:00
Nick O'Leary
d2fab7fddd Remove duplicate history add of ungroup event
Fixes #3581
2022-05-09 20:51:17 +01:00
Nick O'Leary
1818b0281d Handle many-to-one slicing of wires 2022-05-09 20:39:34 +01:00
Nick O'Leary
d549a9ad92 Merge pull request #3603 from node-red-hitachi/fix-select-width-of-switch-node-rule
use text width instead of number of characters for deciding select fi…
2022-05-09 17:18:49 +01:00
Stephen McLaughlin
0385c72a8f Merge pull request #3594 from PhilDay-CT/issue-3593
Handle removal of event handlers to allow mqtt client.end() to work
2022-05-09 16:50:48 +01:00
Stephen McLaughlin
e223b20cbd Remove unnecessary call to clientRemoveListeners
Also, merge the non JSDOC comment into the JSDOC comment
2022-05-09 16:37:25 +01:00
Phil Day
a0f7e92e40 call client.end with force=true on timeout 2022-05-09 16:29:39 +01:00
Phil Day
c87ff3ca26 Update packages/node_modules/@node-red/nodes/core/network/10-mqtt.js
Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com>
2022-05-09 16:22:50 +01:00
Phil Day
82672a825d Update packages/node_modules/@node-red/nodes/core/network/10-mqtt.js
Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com>
2022-05-09 16:20:44 +01:00
Phil Day
98d524e82d Update packages/node_modules/@node-red/nodes/core/network/10-mqtt.js
Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com>
2022-05-09 16:20:27 +01:00
Phil Day
3d3090a8f2 Updated to cover the removal of individual event handlers 2022-05-09 15:39:12 +01:00
Stephen McLaughlin
9ed96de237 Merge pull request #3602 from node-red-hitachi/i18n-switch-rule-selector
I18n switch rule selector
2022-05-08 14:28:36 +01:00
Hiroyasu Nishiyama
abb81a0bac use text width instead of number of characters for deciding select field width of switch node rule 2022-05-08 12:32:07 +09:00
Hiroyasu Nishiyama
05eb055b8c add Japanese translation of switch rules 2022-05-08 08:59:07 +09:00
Hiroyasu Nishiyama
e8ddd6d16d i18n switch group label & add Japanese message 2022-05-08 08:44:35 +09:00
Stephen McLaughlin
8706998c8c Merge pull request #3600 from node-red-hitachi/fix-link-call-info-jp
update Japanese info of link call node reflecting update of English info
2022-05-07 14:28:05 +01:00
Hiroyasu Nishiyama
06e0869767 update Japanese info of link call node reflecting update of English info 2022-05-07 22:09:54 +09:00
Nick O'Leary
7841fc6d3e Merge pull request #3580 from bonanitech/typedinput-label
Fix typedInput label not visible on themes
2022-05-06 19:25:54 +01:00
Nick O'Leary
1f7311deeb Merge pull request #3597 from node-red-hitachi/fix-link-call-info
update link-call node info according to current behavior
2022-05-06 19:25:10 +01:00
Hiroyasu Nishiyama
07a9e69e7b update link-call node info according to current behavior 2022-05-06 23:38:58 +09:00
Phil Day
9bc8adc715 Revent change of grunt version 2022-05-06 15:34:25 +01:00
Phil Day
7845ebffc5 Track which event handlers we add to the mqtt client so we can removed them cleanly 2022-05-06 15:29:42 +01:00
Nick O'Leary
b985de6df2 Merge pull request #3595 from Steve-Mcl/fix-project-switching
Fix project switching when junctions are present
2022-05-05 20:48:54 +01:00
Steve-Mcl
11f6491889 fix project switching when junctions are present
fixes #3588
2022-05-05 16:56:28 +01:00
Phil Day
b2ec040a8d Add Force parameter mqtt client.end() when called in disconnect 2022-05-05 16:12:28 +01:00
Stephen McLaughlin
424a53da4e Merge pull request #3576 from kazuhitoyokoi/master-addjpn
Add Japanese translations for v3.0-beta.1
2022-05-05 15:16:36 +01:00
Stephen McLaughlin
963c289af7 Merge pull request #3592 from kazuhitoyokoi/master-fixiconpath
Fix image paths where `red/image/typedInput/XXXX.png` should be `red/image/typedInput/XXXX.svg`
2022-05-05 14:57:49 +01:00
Kazuhito Yokoi
c5af71e0a2 Change icon path from png to svg 2022-05-05 20:38:55 +09:00
Nick O'Leary
329008bf6d Merge pull request #3591 from Steve-Mcl/fix-back-link-to-junc
Fix junction: when wiring from a regular nodes INPUT, backwards to a junction
2022-05-05 10:27:48 +01:00
Steve-Mcl
531dbc5f83 Fix junction: ensure sourcePort is not undefined
fixes #3587
2022-05-05 09:37:32 +01:00
Stephen McLaughlin
851a925956 Merge pull request #3585 from Steve-Mcl/fix-flow-prop-tab
fix error initialising flow tab editor
2022-05-05 08:25:15 +01:00
Stephen McLaughlin
5d4e01eea6 Merge pull request #3589 from node-red-hitachi/fix-system-info
fix error on system-info action
2022-05-05 08:24:24 +01:00
Stephen McLaughlin
7484dc5b4c Merge pull request #3584 from Steve-Mcl/fix-search-err
Fix browser console error Uncaught TypeError when searching certain terms
2022-05-05 08:14:26 +01:00
Hiroyasu Nishiyama
c513cff843 fix error on system-info action 2022-05-05 10:10:52 +09:00
Kazuhito Yokoi
bc5eafce66 Update translations in file and http request nodes 2022-05-05 01:28:42 +09:00
Kazuhito Yokoi
5fb811eb4c Change icon path from png to svg in typedInput 2022-05-05 01:20:41 +09:00
Kazuhito Yokoi
84a3884ffc Fix i18n in typedInput of header area 2022-05-04 23:54:23 +09:00
Kazuhito Yokoi
50ae29a08c Add Japanese translations for v3.0-beta.1 2022-05-04 23:29:40 +09:00
Steve-Mcl
bf8bfa582a fix error initialising flow tab editor
fixes #3577
2022-05-04 15:16:35 +01:00
Steve-Mcl
492d1ef30e declare undeclared loop var 2022-05-04 15:10:02 +01:00
Steve-Mcl
bd19c203e1 Prevent error when uses search term is used
fixes #3578
2022-05-04 15:08:52 +01:00
Mauricio Bonani
7955a17a17 Fix typedInput label not visible 2022-05-04 06:37:52 -04:00
Kazuhito Yokoi
58085e39d1 Add Japanese translations for welcome tour in 3.0-beta.1 2022-05-04 11:39:34 +09:00
Nick O'Leary
3841039728 Update gen publish script for 3.x 2022-05-03 14:29:25 +01:00
Nick O'Leary
f04d954882 Drop node 12 from test runs 2022-05-03 14:25:27 +01:00
Nick O'Leary
39602ff5f2 Update changelog 2022-05-03 13:58:02 +01:00
42 changed files with 527 additions and 322 deletions

View File

@@ -26,7 +26,7 @@ jobs:
path: 'node-red.github.io'
- uses: actions/setup-node@v1
with:
node-version: '12'
node-version: '16'
- run: node ./node-red/.github/scripts/update-node-red-docker.js
- name: Create Docker Pull Request
uses: peter-evans/create-pull-request@v2

View File

@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12, 14, 16]
node-version: [14, 16]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}

View File

@@ -1,5 +1,46 @@
#### 3.0.0-beta.2: Beta Release
**Migration from 2.x**
- The 'slice wires' action has changed from Ctrl-RightMouseButton to Alt-LeftMouseButton
Editor
- Rework Junctions to be more node like in their event handling (#3607) @knolleary
- Change slicing / slice-junction operations over to mouse button 0 (Left Mouse Button) (#3609) @Steve-Mcl
- Do not slice-junction link node wires (#3608) @knolleary
- Handle many-to-one slicing of wires (#3604) @knolleary
- Ensure ACE worker options are set (#3611) @Steve-Mcl
- Remove duplicate history add of ungroup event (#3605) @knolleary
- use text width instead of number of characters for deciding select fi… (#3603) @HiroyasuNishiyama
- Update Japanese info of link call node reflecting update of English info (#3600) @HiroyasuNishiyama
- Fix typedInput label not visible on themes (#3580) @bonanitech
- Fix project switching when junctions are present (#3595) @Steve-Mcl
- Fix junction: when wiring from a regular nodes INPUT, backwards to a junction (#3591) @Steve-Mcl
- Fix error initialising flow tab editor (#3585) @Steve-Mcl
- Add Japanese translations for v3.0-beta.1 (#3576) @kazuhitoyokoi
- Fix image paths where `red/image/typedInput/XXXX.png` should be `red/image/typedInput/XXXX.svg` (#3592) @kazuhitoyokoi
- Fix browser console error Uncaught TypeError when searching certain terms (#3584) @Steve-Mcl
Runtime
- fix error on system-info action (#3589) @HiroyasuNishiyama
Nodes
- I18n switch rule selector (#3602) @HiroyasuNishiyama
- Handle removal of event handlers to allow mqtt client.end() to work (#3594) @PhilDay-CT
- update link-call node info according to current behavior (#3597) @HiroyasuNishiyama
#### 3.0.0-beta.1: Beta Release
**Migration from 2.x**
- Node-RED now requires Node.js 14.x or later.
- New installs of Node-RED will default to the monaco editor.
Editor
- Add Junctions (#3462) @knolleary

View File

@@ -1,6 +1,6 @@
{
"name": "node-red",
"version": "3.0.0-beta.1",
"version": "3.0.0-beta.2",
"description": "Low-code programming for event-driven applications",
"homepage": "http://nodered.org",
"license": "Apache-2.0",
@@ -42,14 +42,14 @@
"cronosjs": "1.7.1",
"denque": "2.0.1",
"express": "4.18.1",
"express-session": "1.17.2",
"express-session": "1.17.3",
"form-data": "4.0.0",
"fs-extra": "10.1.0",
"got": "11.8.3",
"hash-sum": "2.0.0",
"hpagent": "1.0.0",
"https-proxy-agent": "5.0.1",
"i18next": "21.6.16",
"i18next": "21.8.2",
"iconv-lite": "0.6.3",
"is-utf8": "0.2.1",
"js-yaml": "4.1.0",
@@ -76,7 +76,7 @@
"semver": "7.3.7",
"tar": "6.1.11",
"tough-cookie": "4.0.0",
"uglify-js": "3.15.4",
"uglify-js": "3.15.5",
"uuid": "8.3.2",
"ws": "7.5.6",
"xml2js": "0.4.23"
@@ -85,8 +85,8 @@
"bcrypt": "5.0.1"
},
"devDependencies": {
"dompurify": "2.3.6",
"grunt": "1.5.2",
"dompurify": "2.3.8",
"grunt": "1.5.3",
"grunt-chmod": "~1.1.1",
"grunt-cli": "~1.4.3",
"grunt-concurrent": "3.0.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@node-red/editor-api",
"version": "3.0.0-beta.1",
"version": "3.0.0-beta.2",
"license": "Apache-2.0",
"main": "./lib/index.js",
"repository": {
@@ -16,13 +16,13 @@
}
],
"dependencies": {
"@node-red/util": "3.0.0-beta.1",
"@node-red/editor-client": "3.0.0-beta.1",
"@node-red/util": "3.0.0-beta.2",
"@node-red/editor-client": "3.0.0-beta.2",
"bcryptjs": "2.4.3",
"body-parser": "1.20.0",
"clone": "2.1.2",
"cors": "2.8.5",
"express-session": "1.17.2",
"express-session": "1.17.3",
"express": "4.18.1",
"memorystore": "1.6.7",
"mime": "3.0.0",

View File

@@ -302,9 +302,9 @@
"successfulRestart": "フローの再起動が成功しました",
"deployFailed": "デプロイが失敗しました: __message__",
"unusedConfigNodes": "使われていない設定ノードがあります。",
"unusedConfigNodesButton":"未使用の構成ノードを検索",
"unknownNodesButton":"不明なノードを検索する",
"invalidNodesButton":"無効なノードを検索する",
"unusedConfigNodesButton": "未使用の構成ノードを検索",
"unknownNodesButton": "不明なノードを検索する",
"invalidNodesButton": "無効なノードを検索する",
"errors": {
"noResponse": "サーバの応答がありません"
},
@@ -1159,6 +1159,9 @@
"start": "開始",
"next": "次へ"
},
"diagnostics": {
"title": "システム情報"
},
"languages": {
"de": "ドイツ語",
"en-US": "英語",
@@ -1168,6 +1171,22 @@
"zh-CN": "中国語(簡体)",
"zh-TW": "中国語(繁体)"
},
"validator": {
"errors": {
"invalid-json": "JSONデータが不正: __error__",
"invalid-json-prop": "__prop__: JSONデータが不正: __error__",
"invalid-prop": "プロパティ式が不正",
"invalid-prop-prop": "__prop__: プロパティ式が不正",
"invalid-num": "数値が不正",
"invalid-num-prop": "__prop__: 数値が不正",
"invalid-regexp": "入力パターンが不正",
"invalid-regex-prop": "__prop__: 入力パターンが不正",
"missing-required-prop": "__prop__: プロパティが未設定",
"invalid-config": "__prop__: 設定ノードが不正",
"missing-config": "__prop__: 設定ノードが存在しません",
"validation-error": "__prop__: チェックエラー: __node__, __id__: __error__"
}
},
"action-list": {
"toggle-show-tips": "ヒント表示切替",
"show-about": "Node-REDの説明を表示",
@@ -1305,21 +1324,5 @@
"zoom-reset": "ズームリセット",
"toggle-navigator": "ナビゲータ表示切替",
"show-system-info": "システムインフォメーション"
},
"validator": {
"errors": {
"invalid-json": "JSONデータが不正: __error__",
"invalid-json-prop": "__prop__: JSONデータが不正: __error__",
"invalid-prop": "プロパティ式が不正",
"invalid-prop-prop": "__prop__: プロパティ式が不正",
"invalid-num": "数値が不正",
"invalid-num-prop": "__prop__: 数値が不正",
"invalid-regexp": "入力パターンが不正",
"invalid-regex-prop": "__prop__: 入力パターンが不正",
"missing-required-prop": "__prop__: プロパティが未設定",
"invalid-config": "__prop__: 設定ノードが不正",
"missing-config": "__prop__: 設定ノードが存在しません",
"validation-error": "__prop__: チェックエラー: __node__, __id__: __error__"
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@node-red/editor-client",
"version": "3.0.0-beta.1",
"version": "3.0.0-beta.2",
"license": "Apache-2.0",
"repository": {
"type": "git",

View File

@@ -76,7 +76,7 @@ oop.inherits(NRJavaScriptWorker, Mirror);
(function() {
this.setOptions = function(options) {
this.options = {
o.options = {
// undef: true,
// unused: true,
esversion: 9,
@@ -98,7 +98,7 @@ oop.inherits(NRJavaScriptWorker, Mirror);
if (options) {
for (var opt in options) {
if (options.hasOwnProperty(opt)) {
this.options[opt] = options.opt;
o.options[opt] = options[opt];
}
}
}

View File

@@ -2462,6 +2462,8 @@ RED.nodes = (function() {
workspacesOrder = [];
groups = {};
groupsByZ = {};
junctions = {};
junctionsByZ = {};
var subflowIds = Object.keys(subflows);
subflowIds.forEach(function(id) {

View File

@@ -1026,10 +1026,7 @@
$(opt.icon).prependTo(this.selectLabel);
}
else if (opt.icon.indexOf("/") !== -1) {
image = new Image();
image.name = opt.icon;
image.src = mapDeprecatedIcon(opt.icon);
$('<img>',{src:mapDeprecatedIcon(opt.icon),style:"margin-right: 4px;height: 18px;"}).prependTo(this.selectLabel);
$('<i>',{class:"red-ui-typedInput-icon", style:"mask-image: url("+opt.icon+"); -webkit-mask-image: url("+opt.icon+"); margin-right: 4px;height: 18px;width:13px"}).prependTo(this.selectLabel);
}
else {
$('<i>',{class:"red-ui-typedInput-icon "+opt.icon,style:"min-width: 13px; margin-right: 4px;"}).prependTo(this.selectLabel);

View File

@@ -311,8 +311,8 @@
types:[
'str','num','bool',
{value:"null",label:RED._("common.type.null"),hasValue:false},
{value:"array",label:RED._("common.type.array"),hasValue:false,icon:"red/images/typedInput/json.png"},
{value:"object",label:RED._("common.type.object"),hasValue:false,icon:"red/images/typedInput/json.png"}
{value:"array",label:RED._("common.type.array"),hasValue:false,icon:"red/images/typedInput/json.svg"},
{value:"object",label:RED._("common.type.object"),hasValue:false,icon:"red/images/typedInput/json.svg"}
],
default: valType
});

View File

@@ -19,7 +19,6 @@
this.tabflowEditor = RED.editor.createEditor({
id: 'node-input-info',
mode: 'ace/mode/markdown',
stateId: options.stateId,
value: ""
});

View File

@@ -323,9 +323,6 @@ RED.group = (function() {
groups: [ ],
dirty: RED.nodes.dirty()
}
RED.history.push(historyEvent);
groups.forEach(function(g) {
newSelection = newSelection.concat(ungroup(g))
historyEvent.groups.push(g);

View File

@@ -148,7 +148,7 @@ RED.search = (function() {
var key = keys[i];
var kpos = keys[i].indexOf(val);
if (kpos > -1) {
var ids = Object.keys(index[key]);
var ids = Object.keys(index[key]||{});
for (j=0;j<ids.length;j++) {
var node = index[key][ids[j]];
var isConfigNode = node.node._def.category === "config" && node.node.type !== 'group';
@@ -264,7 +264,7 @@ RED.search = (function() {
}
currentResults = search(value);
if (currentResults.length > 0) {
for (i=0;i<Math.min(currentResults.length,25);i++) {
for (let i=0;i<Math.min(currentResults.length,25);i++) {
searchResults.editableList('addItem',currentResults[i])
}
if (currentResults.length > 25) {

View File

@@ -172,7 +172,8 @@ RED.view = (function() {
length: function() { return set.length},
get: function(i) { return set[i] },
forEach: function(func) { set.forEach(func) },
nodes: function() { return set.map(function(n) { return n.n })}
nodes: function() { return set.map(function(n) { return n.n })},
has: function(node) { return setIds.has(node.id) }
}
return api;
})();
@@ -204,11 +205,6 @@ RED.view = (function() {
function init() {
// setTimeout(function() {
// function snap(p) { return RED.view.gridSize() * Math.round(p/RED.view.gridSize())}; for (var i = 0;i<10;i++) {
// RED.nodes.addJunction({_def:{defaults:{}}, type:'junction', z:"0ccdc1d81f2729cc",id:RED.nodes.id(),x:snap(Math.floor(Math.random()*600)),y:snap(Math.floor(Math.random()*600)), w:0,h:0})
// } ; RED.view.redraw(true)
// },2000)
chart = $("#red-ui-workspace-chart");
outer = d3.select("#red-ui-workspace-chart")
@@ -234,6 +230,7 @@ RED.view = (function() {
.on("mousedown", canvasMouseDown)
.on("mouseup", canvasMouseUp)
.on("mouseenter", function() {
d3.select(document).on('mouseup.red-ui-workspace-tracker', null)
if (lasso) {
if (d3.event.buttons !== 1) {
lasso.remove();
@@ -249,6 +246,7 @@ RED.view = (function() {
}
}
})
.on("mouseleave", canvasMouseLeave)
.on("touchend", function() {
d3.event.preventDefault();
clearTimeout(touchStartTime);
@@ -389,6 +387,9 @@ RED.view = (function() {
drag_lines = [];
RED.events.on("workspace:change",function(event) {
// Just in case the mouse left the workspace whilst doing an action,
// put us back into default mode so the refresh works
mouse_mode = 0
if (event.old !== 0) {
workspaceScrollPositions[event.old] = {
left:chart.scrollLeft(),
@@ -959,8 +960,9 @@ RED.view = (function() {
}
function canvasMouseDown() {
if (RED.view.DEBUG) { console.warn("canvasMouseDown", mouse_mode); }
var point;
if (RED.view.DEBUG) {
console.warn("canvasMouseDown", { mouse_mode, point: d3.mouse(this), event: d3.event });
}
if (mouse_mode === RED.state.SELECTING_NODE) {
d3.event.stopPropagation();
return;
@@ -977,45 +979,49 @@ RED.view = (function() {
selectedLinks.clear();
updateSelection();
}
if (mouse_mode === 0) {
if (lasso) {
lasso.remove();
lasso = null;
}
if (mouse_mode === 0 && lasso) {
lasso.remove();
lasso = null;
}
if ((mouse_mode === 0 || mouse_mode === RED.state.QUICK_JOINING) && (d3.event.touches || d3.event.button === 0) && (d3.event.metaKey || d3.event.ctrlKey)) {
// Trigger quick add dialog
d3.event.stopPropagation();
clearSelection();
point = d3.mouse(this);
var clickedGroup = getGroupAt(point[0],point[1]);
if (drag_lines.length > 0) {
clickedGroup = clickedGroup || RED.nodes.group(drag_lines[0].node.g)
if (d3.event.touches || d3.event.button === 0) {
if ((mouse_mode === 0 || mouse_mode === RED.state.QUICK_JOINING) && (d3.event.metaKey || d3.event.ctrlKey) && !(d3.event.altKey || d3.event.shiftKey)) {
// Trigger quick add dialog
d3.event.stopPropagation();
clearSelection();
const point = d3.mouse(this);
var clickedGroup = getGroupAt(point[0], point[1]);
if (drag_lines.length > 0) {
clickedGroup = clickedGroup || RED.nodes.group(drag_lines[0].node.g)
}
showQuickAddDialog({ position: point, group: clickedGroup });
} else if (mouse_mode === 0 && !(d3.event.metaKey || d3.event.ctrlKey)) {
// CTRL not being held
if (!d3.event.altKey) {
// ALT not held (shift is allowed) Trigger lasso
if (!touchStartTime) {
const point = d3.mouse(this);
lasso = eventLayer.append("rect")
.attr("ox", point[0])
.attr("oy", point[1])
.attr("rx", 1)
.attr("ry", 1)
.attr("x", point[0])
.attr("y", point[1])
.attr("width", 0)
.attr("height", 0)
.attr("class", "nr-ui-view-lasso");
d3.event.preventDefault();
}
} else if (d3.event.altKey) {
//Alt [+shift] held - Begin slicing
clearSelection();
mouse_mode = (d3.event.shiftKey) ? RED.state.SLICING_JUNCTION : RED.state.SLICING;
const point = d3.mouse(this);
slicePath = eventLayer.append("path").attr("class", "nr-ui-view-slice").attr("d", `M${point[0]} ${point[1]}`)
slicePathLast = point;
RED.view.redraw();
}
}
showQuickAddDialog({position:point, group:clickedGroup});
} else if (mouse_mode === 0 && (d3.event.touches || d3.event.button === 0) && !(d3.event.metaKey || d3.event.ctrlKey)) {
// Tigger lasso
if (!touchStartTime) {
point = d3.mouse(this);
lasso = eventLayer.append("rect")
.attr("ox",point[0])
.attr("oy",point[1])
.attr("rx",1)
.attr("ry",1)
.attr("x",point[0])
.attr("y",point[1])
.attr("width",0)
.attr("height",0)
.attr("class","nr-ui-view-lasso");
d3.event.preventDefault();
}
} else if (mouse_mode === 0 && d3.event.button === 2 && (d3.event.metaKey || d3.event.ctrlKey || d3.event.shiftKey)) {
clearSelection();
mouse_mode = (d3.event.metaKey || d3.event.ctrlKey)?RED.state.SLICING : RED.state.SLICING_JUNCTION;
point = d3.mouse(this);
slicePath = eventLayer.append("path").attr("class","nr-ui-view-slice").attr("d",`M${point[0]} ${point[1]}`)
slicePathLast = point;
RED.view.redraw();
}
}
@@ -1715,10 +1721,19 @@ RED.view = (function() {
redraw();
}
}
function canvasMouseLeave() {
if (mouse_mode !== 0 && d3.event.buttons !== 0) {
d3.select(document).on('mouseup.red-ui-workspace-tracker', function() {
d3.select(document).on('mouseup.red-ui-workspace-tracker', null)
canvasMouseUp.call(this)
})
}
}
function canvasMouseUp() {
lastClickPosition = [d3.event.offsetX/scaleFactor,d3.event.offsetY/scaleFactor];
if (RED.view.DEBUG) { console.warn("canvasMouseUp", mouse_mode); }
if (RED.view.DEBUG) {
console.warn("canvasMouseUp", { mouse_mode, point: d3.mouse(this), event: d3.event });
}
var i;
var historyEvent;
if (mouse_mode === RED.state.PANNING) {
@@ -1861,7 +1876,7 @@ RED.view = (function() {
slicePath = null;
RED.view.redraw(true);
} else if (mouse_mode == RED.state.SLICING_JUNCTION) {
var removedLinks = []
var removedLinks = new Set()
var addedLinks = []
var addedJunctions = []
@@ -1870,8 +1885,14 @@ RED.view = (function() {
var sourceId = l.source.id+":"+l.sourcePort
groupedLinks[sourceId] = groupedLinks[sourceId] || []
groupedLinks[sourceId].push(l)
groupedLinks[l.target.id] = groupedLinks[l.target.id] || []
groupedLinks[l.target.id].push(l)
});
var linkGroups = Object.keys(groupedLinks)
linkGroups.sort(function(A,B) {
return groupedLinks[B].length - groupedLinks[A].length
})
linkGroups.forEach(function(gid) {
var links = groupedLinks[gid]
var junction = {
@@ -1886,6 +1907,10 @@ RED.view = (function() {
inputs: 1,
dirty: true
}
links = links.filter(function(l) { return !removedLinks.has(l) })
if (links.length === 0) {
return
}
links.forEach(function(l) {
junction.x += l._sliceLocation.x
junction.y += l._sliceLocation.y
@@ -1901,20 +1926,38 @@ RED.view = (function() {
RED.nodes.addJunction(junction)
addedJunctions.push(junction)
var newLink = {
source: links[0].source,
sourcePort: links[0].sourcePort,
target: junction
let newLink
if (gid === links[0].source.id+":"+links[0].sourcePort) {
newLink = {
source: links[0].source,
sourcePort: links[0].sourcePort,
target: junction
}
} else {
newLink = {
source: junction,
sourcePort: 0,
target: links[0].target
}
}
addedLinks.push(newLink)
RED.nodes.addLink(newLink)
links.forEach(function(l) {
removedLinks.push(l)
removedLinks.add(l)
RED.nodes.removeLink(l)
var newLink = {
source: junction,
sourcePort: 0,
target: l.target
let newLink
if (gid === l.target.id) {
newLink = {
source: l.source,
sourcePort: l.sourcePort,
target: junction
}
} else {
newLink = {
source: junction,
sourcePort: 0,
target: l.target
}
}
addedLinks.push(newLink)
RED.nodes.addLink(newLink)
@@ -1936,7 +1979,7 @@ RED.view = (function() {
t: 'add',
links: addedLinks,
junctions: addedJunctions,
removedLinks: removedLinks
removedLinks: Array.from(removedLinks)
})
RED.nodes.dirty(true)
}
@@ -2917,7 +2960,7 @@ RED.view = (function() {
} else if (drag_line.portType === PORT_TYPE_INPUT) {
src = mouseup_node;
dst = drag_line.node;
src_port = portIndex;
src_port = portIndex || 0;
}
var link = {source: src, sourcePort:src_port, target: dst};
if (drag_line.virtualLink) {
@@ -3208,52 +3251,16 @@ RED.view = (function() {
port.classed("red-ui-flow-port-hovered",false);
}
function junctionMouseOver(junction, d) {
junction.classed("red-ui-flow-junction-hovered",true);
function junctionMouseOver(junction, d, portType) {
var active = (portType === undefined) ||
(mouse_mode !== RED.state.JOINING && mouse_mode !== RED.state.QUICK_JOINING) ||
(drag_lines.length > 0 && drag_lines[0].portType !== portType && !drag_lines[0].virtualLink)
junction.classed("red-ui-flow-junction-hovered", active);
}
function junctionMouseOut(junction, d) {
junction.classed("red-ui-flow-junction-hovered",false);
}
function junctionMouseDown(junction, d, evt) {
if (RED.view.DEBUG) { console.warn("junctionMouseDown", d); }
evt = evt || d3.event;
d3.event = evt
if (evt === 1) {
return;
}
if (mouse_mode === RED.state.SELECTING_NODE) {
evt.stopPropagation();
return;
}
if (mouse_mode == RED.state.QUICK_JOINING) {
d3.event.stopPropagation();
return;
}
// mousedown_node = d;
// mousedown_port_type = portType;
// mousedown_port_index = portIndex || 0;
if (mouse_mode !== RED.state.QUICK_JOINING && (evt.ctrlKey || evt.metaKey)) {
mouse_mode = RED.state.QUICK_JOINING;
document.body.style.cursor = "crosshair";
showDragLines([{node:d,port:0,portType: PORT_TYPE_OUTPUT}]);
$(window).on('keyup',disableQuickJoinEventHandler);
} else if (event.button != 2) {
nodeMouseDown.call(junction[0][0],d)
// clearSelection();
// movingSet.add(d);
// mousedown_node = d;
// mouse_mode = RED.state.MOVING;
// var mouse = d3.touches(junction[0][0])[0]||d3.mouse(junction[0][0]);
// mouse[0] += d.x-d.w/2;
// mouse[1] += d.y-d.h/2;
// prepareDrag(mouse);
}
evt.stopPropagation();
evt.preventDefault();
}
function prepareDrag(mouse) {
mouse_mode = RED.state.MOVING;
// Called when movingSet should be prepared to be dragged
@@ -3413,6 +3420,9 @@ RED.view = (function() {
return;
} else if (mouse_mode === RED.state.SELECTING_NODE) {
d3.event.stopPropagation();
if (d.type === 'junction') {
return
}
if (selectNodesOptions.single) {
selectNodesOptions.done(d);
return;
@@ -3439,12 +3449,12 @@ RED.view = (function() {
var now = Date.now();
clickElapsed = now-clickTime;
clickTime = now;
dblClickPrimed = (lastClickNode == mousedown_node &&
dblClickPrimed = lastClickNode == mousedown_node &&
(d3.event.touches || d3.event.button === 0) &&
!d3.event.shiftKey && !d3.event.altKey &&
clickElapsed < dblClickInterval
)
lastClickNode = mousedown_node;
clickElapsed < dblClickInterval &&
d.type !== 'junction'
lastClickNode = mousedown_node;
if (!d.selected && d.g /*&& !RED.nodes.group(d.g).selected*/) {
var nodeGroup = RED.nodes.group(d.g);
@@ -3570,9 +3580,9 @@ RED.view = (function() {
clearSelection();
}
var clickPosition = (d3.event.offsetX/scaleFactor - mousedown_node.x)
var edgeDelta = (mousedown_node.w/2) - Math.abs(clickPosition);
var edgeDelta = ((mousedown_node.w||10)/2) - Math.abs(clickPosition);
var cnodes;
var targetEdgeDelta = mousedown_node.w > 30 ? 25 : 8;
var targetEdgeDelta = mousedown_node.w > 30 ? 25 : (mousedown_node.w > 0 ? 8 : 3);
if (edgeDelta < targetEdgeDelta) {
if (clickPosition < 0) {
cnodes = [mousedown_node].concat(RED.nodes.getAllUpstreamNodes(mousedown_node));
@@ -3717,12 +3727,13 @@ RED.view = (function() {
function portMouseOverProxy(e) { portMouseOver(d3.select(this), this.__data__,this.__portType__,this.__portIndex__, e); }
function portMouseOutProxy(e) { portMouseOut(d3.select(this), this.__data__,this.__portType__,this.__portIndex__, e); }
function junctionMouseOverProxy(e) { junctionMouseOver(d3.select(this), this.__data__) }
function junctionMouseOverProxy(e) { junctionMouseOver(d3.select(this), this.__data__, this.__portType__) }
function junctionMouseOutProxy(e) { junctionMouseOut(d3.select(this), this.__data__) }
function junctionMouseDownProxy(e) { junctionMouseDown(d3.select(this), this.__data__, e) }
function junctionMouseUpProxy(e) { junctionMouseUp(d3.select(this), this.__data__) }
function linkMouseDown(d) {
if (RED.view.DEBUG) {
console.warn("linkMouseDown", { mouse_mode, point: d3.mouse(this), event: d3.event });
}
if (mouse_mode === RED.state.SELECTING_NODE) {
d3.event.stopPropagation();
return;
@@ -4871,22 +4882,56 @@ RED.view = (function() {
junctionBack.setAttribute("y",-5);
junctionBack.setAttribute("width",10);
junctionBack.setAttribute("height",10);
junctionBack.setAttribute("rx",5);
junctionBack.setAttribute("ry",5);
junctionBack.setAttribute("rx",3);
junctionBack.setAttribute("ry",3);
junctionBack.__data__ = d;
this.__junctionBack__ = junctionBack;
contents.appendChild(junctionBack);
var junctionInput = document.createElementNS("http://www.w3.org/2000/svg","rect");
junctionInput.setAttribute("class","red-ui-flow-junction-port red-ui-flow-junction-port-input");
junctionInput.setAttribute("x",-5);
junctionInput.setAttribute("y",-5);
junctionInput.setAttribute("width",10);
junctionInput.setAttribute("height",10);
junctionInput.setAttribute("rx",3);
junctionInput.setAttribute("ry",3);
junctionInput.__data__ = d;
junctionInput.__portType__ = PORT_TYPE_INPUT;
junctionInput.__portIndex__ = 0;
this.__junctionInput__ = junctionOutput;
contents.appendChild(junctionInput);
junctionInput.addEventListener("mouseup", portMouseUpProxy);
junctionInput.addEventListener("mousedown", portMouseDownProxy);
this.__junctionInput__ = junctionInput;
contents.appendChild(junctionInput);
var junctionOutput = document.createElementNS("http://www.w3.org/2000/svg","rect");
junctionOutput.setAttribute("class","red-ui-flow-junction-port red-ui-flow-junction-port-output");
junctionOutput.setAttribute("x",-5);
junctionOutput.setAttribute("y",-5);
junctionOutput.setAttribute("width",10);
junctionOutput.setAttribute("height",10);
junctionOutput.setAttribute("rx",3);
junctionOutput.setAttribute("ry",3);
junctionOutput.__data__ = d;
junctionOutput.__portType__ = PORT_TYPE_OUTPUT;
junctionOutput.__portIndex__ = 0;
this.__junctionOutput__ = junctionOutput;
contents.appendChild(junctionOutput);
junctionOutput.addEventListener("mouseup", portMouseUpProxy);
junctionOutput.addEventListener("mousedown", portMouseDownProxy);
junctionOutput.addEventListener("mouseover", junctionMouseOverProxy);
junctionOutput.addEventListener("mouseout", junctionMouseOutProxy);
junctionInput.addEventListener("mouseover", junctionMouseOverProxy);
junctionInput.addEventListener("mouseout", junctionMouseOutProxy);
junctionBack.addEventListener("mouseover", junctionMouseOverProxy);
junctionBack.addEventListener("mouseout", junctionMouseOutProxy);
junctionBack.addEventListener("mouseup", portMouseUpProxy);
junctionBack.addEventListener("mousedown", junctionMouseDownProxy);
// d3.select(junctionBack).on("mousedown", nodeMouseDown);
this.__portType__ = PORT_TYPE_INPUT
this.__portIndex__ = 0
// function portMouseUpProxy(e) { portMouseUp(this.__data__,this.__portType__,this.__portIndex__, e); }
// These handlers expect to be registered as d3 events
d3.select(junctionBack).on("mousedown", nodeMouseDown).on("mouseup", nodeMouseUp);
junction[0][0].appendChild(contents);
})
@@ -4895,6 +4940,7 @@ RED.view = (function() {
var junction = d3.select(this);
this.setAttribute("transform", "translate(" + (d.x) + "," + (d.y) + ")");
if (d.dirty) {
junction.classed("red-ui-flow-junction-dragging", mouse_mode === RED.state.MOVING_ACTIVE && movingSet.has(d))
junction.classed("selected", !!d.selected)
dirtyNodes[d.id] = d;
@@ -4935,10 +4981,11 @@ RED.view = (function() {
.on("touchstart",linkTouchStart)
.on("mousemove", function(d) {
if (mouse_mode === RED.state.SLICING) {
selectedLinks.add(d)
l.classed("red-ui-flow-link-splice",true)
redraw()
} else if (mouse_mode === RED.state.SLICING_JUNCTION) {
} else if (mouse_mode === RED.state.SLICING_JUNCTION && !d.link) {
if (!l.classed("red-ui-flow-link-splice")) {
// Find intersection point
var lineLength = pathLine.getTotalLength();

View File

@@ -28,7 +28,7 @@
border-radius: 1px;
}
.ace_gutter-cell {
color: $text-editor-color;
color: $text-editor-gutter-color;
}
.ace_gutter-active-line {
background: $text-editor-gutter-active-line-background;

View File

@@ -379,11 +379,46 @@ g.red-ui-flow-link-unknown path.red-ui-flow-link-line {
white-space: pre;
@include disable-selection;
}
.red-ui-flow-junction-dragging {
.red-ui-flow-junction-background {
background: red !important
}
}
.red-ui-flow-junction:not(.red-ui-flow-junction-dragging):hover {
.red-ui-flow-junction-background {
transform: scale(1.4);
stroke-width: 0.6;
}
.red-ui-flow-junction-port {
opacity: 1;
pointer-events: auto;
}
.red-ui-flow-junction-port-input {
transform: translate(-10px,0)
}
.red-ui-flow-junction-port-output {
transform: translate(10px,0)
}
}
.red-ui-flow-junction-port {
stroke: $node-border;
stroke-width: 1;
fill: $node-port-background;
cursor: crosshair;
transition: transform 0.1s;
opacity: 0;
pointer-events: none;
}
.red-ui-flow-junction-background {
stroke: $node-border;
stroke-width: 1;
fill: $node-port-background;
cursor: crosshair;
transform: scale(1);
transition: transform 0.1s;
&:hover {
}
}
.red-ui-flow-junction-hovered {
stroke: $port-selected-color;

View File

@@ -84,7 +84,7 @@
.red-ui-search-result-node-port {
position: absolute;
border-radius: 2px;
border: 1px solid $node-border;;
border: 1px solid $node-border;
width: 6px;
height: 7px;
top:4px;

View File

@@ -153,6 +153,16 @@ button.red-ui-typedInput-option-trigger
img {
max-width: none;
}
.red-ui-typedInput-icon:not(.fa) {
display: inline-block;
-webkit-mask-size: cover;
mask-size: cover;
-webkit-mask-position: center;
mask-position: center;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
background-color: $primary-text-color;
}
}
&:not(.disabled):hover {

View File

@@ -5,17 +5,17 @@ export default {
titleIcon: "fa fa-map-o",
title: {
"en-US": "Welcome to Node-RED 3.0 Beta 1!",
"ja": "Node-RED 3.0 Beta 1へようこそ!"
"ja": "Node-RED 3.0 ベータ1へようこそ!"
},
description: {
"en-US": "<p>This is the first Beta release of Node-RED 3.0. It contains just about everything we have planned for the final release.</p><p>Let's take a moment to discover the new features in this release.</p>",
"ja": "本リリースの新機能を見つけてみましょう。"
"ja": "<p>これはNode-RED 3.0の最初のベータリリースです。これには、最終リリースで計画しているほぼ全ての機能が含まれています。</p><p>本リリースの新機能を見つけてみましょう。</p>"
}
},
{
title: {
"en-US": "Wire Junctions",
// "ja": ""
"ja": "分岐点をワイヤーに追加"
},
image: 'images/junction-slice.gif',
description: {
@@ -23,26 +23,28 @@ export default {
add junction nodes that give you more control.</p>
<p>Junctions can be added to wires by holding the Shift key, then click and drag with
the right-hand mouse button across the wires.</p>`,
// "ja": ""
"ja": `<p>フローのワイヤーの経路をより制御しやすくするために、分岐点ノードを追加できるようになりました。</p>
<p>シフトキーを押しながら、マウスの右ボタンをクリックし、ワイヤーを横切るようにドラッグすることで、分岐点を追加できます。</p>`
},
},
{
title: {
"en-US": "Wire Junctions",
// "ja": ""
"ja": "分岐点をワイヤーに追加"
},
image: 'images/junction-quick-add.png',
description: {
"en-US": `<p>Junctions can also be added using the quick-add dialog.</p>
<p>The dialog is opened by holding the Ctrl (or Cmd) key when
clicking in the workspace.</p>`,
// "ja": ""
"ja": `<p>クイック追加ダイアログを用いて、分岐点を追加することもできます。</p>
<p>本ダイアログを開くには、Ctrl(またはCmd)キーを押しながら、ワークスペース上でクリックします。</p>`
},
},
{
title: {
"en-US": "Debug Path Tooltip",
// "ja": ""
"ja": "デバッグパスのツールチップ"
},
image: 'images/debug-path-tooltip.png',
description: {
@@ -53,20 +55,22 @@ export default {
the message.</p>
<p>Clicking on any item in the list will reveal it in
the workspace.</p>`,
// "ja": ""
"ja": `<p>デバックサイドバー内のノード名の上にマウスカーソルを乗せると、新たにツールチップが表示され、ノードの場所が分かるようになっています。</p>
<p>これは、サブフローを用いる時に役立つ機能であり、メッセージがどのノードから出力されたかを正確に特定することが遥かに簡単になります。</p>
<p>本リスト内の要素をクリックすると、ワークスペース内にその要素が表示されます。</p>`
},
},
{
title: {
"en-US": "Continuous Search",
// "ja": ""
"ja": "連続した検索"
},
image: 'images/continuous-search.png',
description: {
"en-US": `<p>When searching for things in the editor, a new toolbar in
the workspace provides options to quickly jump between
the search results.</p>`,
// "ja": ""
"ja": `<p>ワークスペース内の新しいツールバーにあるオプションによって、エディタ内を検索する際に、検索結果の間を素早く移動できます。</p>`
},
},
{
@@ -81,13 +85,17 @@ export default {
<li><b><code>Split Wire With Link Nodes</code></b></li>
</ul>
<p>Actions can be accessed from the Action List in the main menu.</p>`,
// "ja": ``
"ja": `<p>ワイヤーを、接続されたLinkードのペアに置き換える動作が新たに追加されました:</p>
<ul>
<li><b><code>ワイヤーをlinkードで分割</code></b></li>
</ul>
<p>本アクションは、メインメニュー内の動作一覧から呼び出せます。</p>`,
},
},
{
title: {
"en-US": "Default node names",
// "ja": ""
"ja": "標準ノードの名前"
},
// image: "images/",
description: {
@@ -100,7 +108,12 @@ export default {
<li><b><code>Generate Node Names</code></b></li>
</ul><p>Actions can be accessed from the Action List in the main menu.</p>
`,
// "ja": ``
"ja": `<p>一部のノードは、ワークスペース上に新インスタンスとして追加した際に、一意の名前を付けるよう変更されました。この変更は、<code>Debug</code>、<code>Function</code>、<code>Link</code>ノードに適用されています。</p>
<p>選択したノードに対して、標準の名前を生成する動作も新たに追加されました:</p>
<ul>
<li><b><code>ノード名を生成</code></b></li>
</ul><p>本アクションは、メインメニュー内の動作一覧から呼び出せます。</p>
`
}
},
{
@@ -115,7 +128,11 @@ export default {
<li>The Link Call node can use a message property to dynamically target the link it should call</li>
<li>The HTTP Request node can be preconfigured with HTTP headers</li>
</ul>`,
// "ja": ``
"ja": `<ul>
<li>Debugードは、受信したメッセージの数をカウントするよう設定できるようになりました。</li>
<li>Link Callードは、メッセージのプロパティによって、呼び出し対象のlinkを動的に指定できるようになりました。</li>
<li>HTTP Requestードは、HTTPヘッダを事前設定できるようになりました。</li>
</ul>`
}
}
]

View File

@@ -69,7 +69,7 @@
outputs:1, // set the number of outputs - 0 to n
color: "#ddd", // set icon color
// set the icon (held in icons dir below where you save the node)
icon: "myicon.png", // saved in icons/myicon.png
icon: "myicon.svg", // saved in icons/myicon.svg
label: function() { // sets the default label contents
return this.name||this.topic||"sample";
},

View File

@@ -582,7 +582,7 @@ RED.debug = (function() {
$('<span class="red-ui-debug-msg-date">'+ getTimestamp()+'</span>').appendTo(metaRow);
if (sourceNode) {
var nodeLink = $('<a>',{href:"#",class:"red-ui-debug-msg-name"}).text("node: "+(o.name||sourceNode.name||sourceNode.id))
var nodeLink = $('<a>',{href:"#",class:"red-ui-debug-msg-name"}).text(RED._("node-red:debug.node")+": "+(o.name||sourceNode.name||sourceNode.id))
.appendTo(metaRow)
.on("click", function(evt) {
evt.preventDefault();

View File

@@ -146,13 +146,13 @@
function createTypeValueField(row, defaultType){
return $('<input/>',{class:"node-input-rule-type-value",type:"text",style:"width: 100%;"}).appendTo(row).typedInput({default:defaultType || 'string',types:[
{value:"string",label:RED._("common.type.string"),hasValue:false,icon:"red/images/typedInput/az.png"},
{value:"number",label:RED._("common.type.number"),hasValue:false,icon:"red/images/typedInput/09.png"},
{value:"boolean",label:RED._("common.type.boolean"),hasValue:false,icon:"red/images/typedInput/bool.png"},
{value:"array",label:RED._("common.type.array"),hasValue:false,icon:"red/images/typedInput/json.png"},
{value:"buffer",label:RED._("common.type.buffer"),hasValue:false,icon:"red/images/typedInput/bin.png"},
{value:"object",label:RED._("common.type.object"),hasValue:false,icon:"red/images/typedInput/json.png"},
{value:"json",label:RED._("common.type.jsonString"),hasValue:false,icon:"red/images/typedInput/json.png"},
{value:"string",label:RED._("common.type.string"),hasValue:false,icon:"red/images/typedInput/az.svg"},
{value:"number",label:RED._("common.type.number"),hasValue:false,icon:"red/images/typedInput/09.svg"},
{value:"boolean",label:RED._("common.type.boolean"),hasValue:false,icon:"red/images/typedInput/bool.svg"},
{value:"array",label:RED._("common.type.array"),hasValue:false,icon:"red/images/typedInput/json.svg"},
{value:"buffer",label:RED._("common.type.buffer"),hasValue:false,icon:"red/images/typedInput/bin.svg"},
{value:"object",label:RED._("common.type.object"),hasValue:false,icon:"red/images/typedInput/json.svg"},
{value:"json",label:RED._("common.type.jsonString"),hasValue:false,icon:"red/images/typedInput/json.svg"},
{value:"undefined",label:RED._("common.type.undefined"),hasValue:false},
{value:"null",label:RED._("common.type.null"),hasValue:false}
]});
@@ -247,14 +247,16 @@
var row2 = $('<div/>',{style:"display: flex; padding-top: 5px; padding-left: 175px;"}).appendTo(inputRows);
var row3 = $('<div/>',{style:"display: flex; padding-top: 5px; align-items: center"}).appendTo(inputRows);
var row4 = $('<div/>',{style:"visibility: hidden; height: 0px;"}).appendTo(inputRows);
var textSpan = $("<span/>").appendTo(row4);
var selectField = $('<select/>',{style:"width:120px; text-align: center;"}).appendTo(row);
var group0 = $('<optgroup/>', { label: "value rules" }).appendTo(selectField);
var group0 = $('<optgroup/>', { label: RED._("node-red:switch.label.value-rules") }).appendTo(selectField);
for (var d in operators) {
if(operators[d].kind === 'V') {
group0.append($("<option></option>").val(operators[d].v).text(/^switch/.test(operators[d].t)?node._(operators[d].t):operators[d].t));
}
}
var group1 = $('<optgroup/>', { label: "sequence rules" }).appendTo(selectField);
var group1 = $('<optgroup/>', { label: RED._("node-red:switch.label.sequence-rules") }).appendTo(selectField);
for (var d in operators) {
if(operators[d].kind === 'S') {
group1.append($("<option></option>").val(operators[d].v).text(/^switch/.test(operators[d].t)?node._(operators[d].t):operators[d].t));
@@ -340,9 +342,12 @@
row3.hide();
}
var selectedLabel = selectField.find("option:selected").text();
if (selectedLabel.length <= 5) {
textSpan.text(selectedLabel);
var width = textSpan.width();
if (width <= 30) {
selectField.outerWidth(60);
} else if (selectedLabel.length < 12) {
} else if (width <= 85) {
selectField.outerWidth(120);
} else {
selectField.width("auto")

View File

@@ -453,6 +453,7 @@ module.exports = function(RED) {
node.options = {};
node.queue = [];
node.subscriptions = {};
node.clientListeners = []
/** @type {mqtt.MqttClient}*/ this.client;
node.setOptions = function(opts, init) {
if(!opts || typeof opts !== "object") {
@@ -591,7 +592,7 @@ module.exports = function(RED) {
// Only for ws or wss, check if proxy env var for additional configuration
if (node.brokerurl.indexOf("wss://") > -1 || node.brokerurl.indexOf("ws://") > -1) {
// check if proxy is set in env
let prox, noprox;
let prox, noprox, noproxy;
if (process.env.http_proxy) { prox = process.env.http_proxy; }
if (process.env.HTTP_PROXY) { prox = process.env.HTTP_PROXY; }
if (process.env.no_proxy) { noprox = process.env.no_proxy.split(","); }
@@ -718,11 +719,16 @@ module.exports = function(RED) {
setStatusConnecting(node, true);
try {
node.serverProperties = {};
if(node.client) {
//belt and braces to avoid left over clients
node.client.end(true);
node._clientRemoveListeners();
}
node.client = mqtt.connect(node.brokerurl, node.options);
node.client.setMaxListeners(0);
let callbackDone = false; //prevent re-connects causing node.client.on('connect' firing callback multiple times
let callbackDone = false; //prevent re-connects causing node._clientOn('connect' firing callback multiple times
// Register successful connect or reconnect handler
node.client.on('connect', function (connack) {
node._clientOn('connect', function (connack) {
node.closing = false;
node.connecting = false;
node.connected = true;
@@ -754,7 +760,7 @@ module.exports = function(RED) {
}
setStatusConnected(node, true);
// Remove any existing listeners before resubscribing to avoid duplicates in the event of a re-connection
node.client.removeAllListeners('message');
node._clientRemoveListeners('message');
// Re-subscribe to stored topics
for (var s in node.subscriptions) {
@@ -766,7 +772,7 @@ module.exports = function(RED) {
if (node.subscriptions[s].hasOwnProperty(r)) {
qos = Math.max(qos,node.subscriptions[s][r].qos);
_options = node.subscriptions[s][r].options;
node.client.on('message',node.subscriptions[s][r].handler);
node._clientOn('message',node.subscriptions[s][r].handler);
}
}
_options.qos = _options.qos || qos;
@@ -779,11 +785,11 @@ module.exports = function(RED) {
node.publish(node.birthMessage);
}
});
node.client.on("reconnect", function() {
node._clientOn("reconnect", function() {
setStatusConnecting(node, true);
});
//Broker Disconnect - V5 event
node.client.on("disconnect", function(packet) {
node._clientOn("disconnect", function(packet) {
//Emitted after receiving disconnect packet from broker. MQTT 5.0 feature.
const rc = (packet && packet.properties && packet.reasonCode) || packet.reasonCode;
const rs = packet && packet.properties && packet.properties.reasonString || "";
@@ -797,7 +803,7 @@ module.exports = function(RED) {
setStatusDisconnected(node, true);
});
// Register disconnect handlers
node.client.on('close', function () {
node._clientOn('close', function () {
if (node.connected) {
node.connected = false;
node.log(RED._("mqtt.state.disconnected",{broker:(node.clientid?node.clientid+"@":"")+node.brokerurl}));
@@ -809,7 +815,7 @@ module.exports = function(RED) {
// Register connect error handler
// The client's own reconnect logic will take care of errors
node.client.on('error', function (error) {
node._clientOn('error', function (error) {
});
}catch(err) {
console.log(err);
@@ -822,7 +828,7 @@ module.exports = function(RED) {
if(node.connected || node.connecting) {
setStatusDisconnected(node, true);
}
if(node.client) { node.client.removeAllListeners(); }
if(node.client) { node._clientRemoveListeners(); }
node.connecting = false;
node.connected = false;
callback && typeof callback == "function" && callback();
@@ -836,8 +842,12 @@ module.exports = function(RED) {
if(!client) {
resolve();
} else {
const t = setTimeout(reject, ms);
client.end(() => {
const t = setTimeout(() => {
//clean end() has exceeded WAIT_END, lets force end!
client && client.end(true);
reject();
}, ms);
client.end(() => {
clearTimeout(t);
resolve()
});
@@ -894,7 +904,7 @@ module.exports = function(RED) {
};
node.subscriptions[topic][ref] = sub;
if (node.connected) {
node.client.on('message',sub.handler);
node._clientOn('message',sub.handler);
node.client.subscribe(topic, options);
}
};
@@ -905,7 +915,7 @@ module.exports = function(RED) {
if (sub) {
if (sub[ref]) {
if(node.client) {
node.client.removeListener('message',sub[ref].handler);
node._clientRemoveListeners('message',sub[ref].handler);
}
delete sub[ref];
}
@@ -995,13 +1005,40 @@ module.exports = function(RED) {
node.on('close', function(done) {
node.disconnect(function() {
if(node.client) {
node.client.removeAllListeners();
}
done();
});
});
/**
* Add event handlers to the MQTT.js client and track them so that
* we do not remove any handlers that the MQTT client uses internally.
* Use {@link node._clientRemoveListeners `node._clientRemoveListeners`} to remove handlers
* @param {string} event The name of the event
* @param {function} handler The handler for this event
*/
node._clientOn = function(event, handler) {
node.clientListeners.push({event, handler})
node.client.on(event, handler)
}
/**
* Remove event handlers from the MQTT.js client & only the events
* that we attached in {@link node._clientOn `node._clientOn`}.
* * If `event` is omitted, then all events matching `handler` are removed
* * If `handler` is omitted, then all events named `event` are removed
* * If both parameters are omitted, then all events are removed
* @param {string} [event] The name of the event (optional)
* @param {function} [handler] The handler for this event (optional)
*/
node._clientRemoveListeners = function(event, handler) {
node.clientListeners = node.clientListeners.filter((l) => {
if (event && event !== l.event) { return true; }
if (handler && handler !== l.handler) { return true; }
node.client.removeListener(l.event, l.handler)
return false; //found and removed, filter out this one
})
}
}
RED.nodes.registerType("mqtt-broker",MQTTBrokerNode,{

View File

@@ -129,7 +129,7 @@
var headerTypes = [
{value:"content-type",label:"Content-Type",hasValue: false},
{value:"location",label:"Location",hasValue: false},
{value:"other",label:RED._("node-red:httpin.label.other"),icon:"red/images/typedInput/az.png"}
{value:"other",label:RED._("node-red:httpin.label.other"),icon:"red/images/typedInput/az.svg"}
]
var contentTypes = [
{value:"application/json",label:"application/json",hasValue: false},
@@ -139,7 +139,7 @@
{value:"text/plain",label:"text/plain",hasValue: false},
{value:"image/gif",label:"image/gif",hasValue: false},
{value:"image/png",label:"image/png",hasValue: false},
{value:"other",label:RED._("node-red:httpin.label.other"),icon:"red/images/typedInput/az.png"}
{value:"other",label:RED._("node-red:httpin.label.other"),icon:"red/images/typedInput/az.svg"}
];
RED.nodes.registerType('http response',{
@@ -180,7 +180,7 @@
var propertyValue = $('<input/>',{class:"node-input-header-value",type:"text",style:"width: 100%"})
.appendTo(propertyValueCell)
.typedInput({types:
header.h === 'content-type'?contentTypes:[{value:"other",label:"other",icon:"red/images/typedInput/az.png"}]
header.h === 'content-type'?contentTypes:[{value:"other",label:"other",icon:"red/images/typedInput/az.svg"}]
});
var matchedType = headerTypes.filter(function(ht) {
@@ -223,7 +223,7 @@
if (type === 'content-type') {
propertyValue.typedInput('types',contentTypes);
} else {
propertyValue.typedInput('types',[{value:"other",label:"other",icon:"red/images/typedInput/az.png"}]);
propertyValue.typedInput('types',[{value:"other",label:"other",icon:"red/images/typedInput/az.svg"}]);
}
});
},

View File

@@ -127,12 +127,14 @@
{ value: "Cache-Control", label: "Cache-Control", hasValue: false },
{ value: "User-Agent", label: "User-Agent", hasValue: false },
{ value: "Location", label: "Location", hasValue: false },
{ value: "other", label: "other", hasValue: true, icon: "red/images/typedInput/az.png" },
{ value: "other", label: RED._("node-red:httpin.label.other"),
hasValue: true, icon: "red/images/typedInput/az.svg" },
{ value: "msg", label: "msg.", hasValue: true },
]
const headerOptions = {};
const defaultOptions = [
{ value: "other", label: "other", hasValue: true, icon: "red/images/typedInput/az.png" },
{ value: "other", label: RED._("node-red:httpin.label.other"),
hasValue: true, icon: "red/images/typedInput/az.svg" },
{ value: "msg", label: "msg.", hasValue: true },
];
headerOptions["accept"] = [

View File

@@ -435,7 +435,7 @@ module.exports = function(RED) {
});
}
else {
var connectedSockets = [];
const connectedSockets = new Set();
node.status({text:RED._("tcpin.status.connections",{count:0})});
let srv = net;
let connOpts;
@@ -456,16 +456,16 @@ module.exports = function(RED) {
});
socket.on('close',function() {
node.log(RED._("tcpin.status.connection-closed",{host:socket.remoteAddress, port:socket.remotePort}));
connectedSockets.splice(connectedSockets.indexOf(socket),1);
node.status({text:RED._("tcpin.status.connections",{count:connectedSockets.length})});
connectedSockets.delete(socket);
node.status({text:RED._("tcpin.status.connections",{count:connectedSockets.size})});
});
socket.on('error',function() {
node.log(RED._("tcpin.errors.socket-error",{host:socket.remoteAddress, port:socket.remotePort}));
connectedSockets.splice(connectedSockets.indexOf(socket),1);
node.status({text:RED._("tcpin.status.connections",{count:connectedSockets.length})});
connectedSockets.delete(socket);
node.status({text:RED._("tcpin.status.connections",{count:connectedSockets.size})});
});
connectedSockets.push(socket);
node.status({text:RED._("tcpin.status.connections",{count:connectedSockets.length})});
connectedSockets.add(socket);
node.status({text:RED._("tcpin.status.connections",{count:connectedSockets.size})});
});
node.on("input", function(msg, nodeSend, nodeDone) {
@@ -478,10 +478,10 @@ module.exports = function(RED) {
} else {
buffer = Buffer.from(""+msg.payload);
}
for (var i = 0; i < connectedSockets.length; i += 1) {
if (node.doend === true) { connectedSockets[i].end(buffer); }
else { connectedSockets[i].write(buffer); }
}
connectedSockets.forEach(soc => {
if (node.doend === true) { soc.end(buffer); }
else { soc.write(buffer); }
})
}
nodeDone();
});
@@ -498,12 +498,10 @@ module.exports = function(RED) {
} else {
node.log(RED._("tcpin.status.listening-port",{port:node.port}));
node.on('close', function() {
for (var c in connectedSockets) {
if (connectedSockets.hasOwnProperty(c)) {
connectedSockets[c].end();
connectedSockets[c].unref();
}
}
connectedSockets.forEach(soc => {
soc.end();
soc.unref();
})
server.close();
node.log(RED._("tcpin.status.stopped-listening",{port:node.port}));
});

View File

@@ -247,7 +247,7 @@
var jsonata_or_empty = {
value: "jsonata",
label: "expression",
icon: "red/images/typedInput/expr.png",
icon: "red/images/typedInput/expr.svg",
validate: function(v) {
try{
if(v !== "") {

View File

@@ -54,9 +54,10 @@
<p>If no response is received within the configured timeout, default 30 seconds, the node
will log an error that can be caught using the <code>catch</code> node.</p>
<p>When the option <b>Link Type</b> is set to "Dynamic target" <code>msg.target</code> can be used to call a
<code>link in</code> by name. The target <code>link in</code> node must be named.
<code>link in</code> by name or id.
<ul>
<li>If there are 2 <code>link in</code> nodes with the same name, an error will be raised</li>
<li>If there is a <code>link in</code> nodes with the same id, it will be called</li>
<li>If there are two or more <code>link in</code> nodes with the same name, an error will be raised</li>
<li>A <code>link call</code> cannot call a <code>link in</code> node inside a subflow</li>
</ul>
</p>

View File

@@ -137,6 +137,7 @@
"toConsole": "system console",
"toStatus": "node status (32 characters)",
"severity": "Level",
"node": "node",
"notification": {
"activated": "Successfully activated: __label__",
"deactivated": "Successfully deactivated: __label__"
@@ -729,7 +730,9 @@
"label": {
"property": "Property",
"rule": "rule",
"repair": "recreate message sequences"
"repair": "recreate message sequences",
"value-rules": "value rules",
"sequence-rules": "sequence rules"
},
"previous": "previous value",
"and": "and",

View File

@@ -42,9 +42,10 @@
<p>本ノードはメッセージを受信するとメッセージを接続した <code>link in</code>
その後応答を待った後にメッセージを送信します</o>
<p>もし設定したタイムアウト(デフォルト30秒)以内に応答がない場合は<code>catch</code> </p>
<p><b>リンクの種類</b>""<code>link in</code><code>msg.target</code><code>link in</code>
<p><b>リンクの種類</b>""<code>link in</code>ID<code>msg.target</code>
<ul>
<li>もし同じ名前を付けた<code>link in</code>2</li>
<li>同じIDの<code>link in</code></li>
<li>もし同じ名前を付けた<code>link in</code>2</li>
<li><code>link call</code><code>link in</code></li>
</ul>
</p>

View File

@@ -86,10 +86,10 @@
"failed": "inject処理が失敗しました。詳細はログを確認してください。",
"toolong": "時間間隔が大き過ぎます",
"invalid-expr": "JSONata式が不正: __error__",
"invalid-jsonata": "__prop__: プロパティ式が不正: __error__",
"invalid-prop": "__prop__: プロパティ式が不正: __error__",
"invalid-json": "__prop__: JSONデータが不正: __error__",
"invalid-repeat": "繰り返し数が不正"
"invalid-jsonata": "__prop__: プロパティ式が不正: __error__",
"invalid-prop": "__prop__: プロパティ式が不正: __error__",
"invalid-json": "__prop__: JSONデータが不正: __error__",
"invalid-repeat": "繰り返し数が不正"
}
},
"catch": {
@@ -129,6 +129,7 @@
"msgprop": "メッセージプロパティ",
"msgobj": "msgオブジェクト全体",
"autostatus": "デバッグ出力と同じ",
"messageCount": "メッセージ数をカウント",
"to": "出力先",
"debtab": "デバッグタブ",
"tabcon": "デバッグタブとコンソール",
@@ -136,6 +137,7 @@
"toConsole": "システムコンソール",
"toStatus": "ノードステータス(32 文字)",
"severity": "Level",
"node": "ノード",
"notification": {
"activated": "有効化しました: __label__",
"deactivated": "無効化しました: __label__"
@@ -206,8 +208,8 @@
},
"error": {
"missing-file": "証明書と秘密鍵のファイルが設定されていません",
"invalid-cert": "証明書が指定されていません",
"invalid-key": "秘密鍵が指定されていません"
"invalid-cert": "証明書が指定されていません",
"invalid-key": "秘密鍵が指定されていません"
}
},
"exec": {
@@ -263,8 +265,8 @@
"moduleNameReserved": "予約された変数名です: __name__",
"inputListener": "コード内で'input'イベントのリスナを設定できません",
"non-message-returned": "Functionードが __type__ 型のメッセージ送信を試みました",
"invalid-js": "JavaScriptコードのエラー",
"missing-module": "モジュール __module__ が存在しません"
"invalid-js": "JavaScriptコードのエラー",
"missing-module": "モジュール __module__ が存在しません"
}
},
"template": {
@@ -318,9 +320,9 @@
"limit": "limit",
"limitTopic": "limit topic",
"random": "random",
"rate": "流量",
"random-first": "ランダム最小値",
"random-last": "ランダム最大値",
"rate": "流量",
"random-first": "ランダム最小値",
"random-last": "ランダム最大値",
"units": {
"second": {
"plural": "秒",
@@ -342,11 +344,11 @@
},
"errors": {
"too-many": "delayード内で保持しているメッセージが多すぎます",
"invalid-timeout": "遅延時間が不正",
"invalid-rate": "流量値が不正",
"invalid-rate-unit": "流量単位時間が不正",
"invalid-random-first": "ランダム最小値が不正",
"invalid-random-last": "ランダム最大値が不正"
"invalid-timeout": "遅延時間が不正",
"invalid-rate": "流量値が不正",
"invalid-rate-unit": "流量単位時間が不正",
"invalid-random-first": "ランダム最小値が不正",
"invalid-random-last": "ランダム最大値が不正"
}
},
"trigger": {
@@ -384,8 +386,8 @@
"resetMessage": "msg.resetを設定",
"resetPayload": "msg.payloadが次の値",
"resetprompt": "任意",
"duration": "時間間隔",
"topic": "トピック"
"duration": "時間間隔",
"topic": "トピック"
}
},
"comment": {
@@ -443,7 +445,8 @@
"action": "動作",
"staticTopic": "1つのトピックを購読",
"dynamicTopic": "動的な購読",
"auto-connect": "自動接続"
"auto-connect": "自動接続",
"auto-mode-depreciated": "本オプションは非推奨になりました。新しい自動判定モードを使用してください。"
},
"sections-label": {
"birth-message": "接続時の送信メッセージ(Birthメッセージ)",
@@ -490,7 +493,7 @@
"invalid-action-action": "指定された動作が不正です",
"invalid-action-alreadyconnected": "接続する前にブローカから切断してください",
"invalid-action-badsubscription": "msg.topicが存在しないか不正です",
"invalid-client-id": "クライアントIDが未指定"
"invalid-client-id": "クライアントIDが未指定"
}
},
"httpin": {
@@ -581,8 +584,8 @@
"send-error": "送信中にエラーが発生しました: ",
"missing-conf": "サーバ設定が不足しています",
"duplicate-path": "同じパスに対して2つのWebSocketリスナは指定できません: __path__",
"missing-server": "サーバが設定されていません",
"missing-client": "クライアントが設定されていません"
"missing-server": "サーバが設定されていません",
"missing-client": "クライアントが設定されていません"
}
},
"watch": {
@@ -611,7 +614,8 @@
"ms": "ミリ秒",
"chars": "文字",
"close": "終了",
"optional": "(任意)"
"optional": "(任意)",
"reattach": "区切り文字を再追加"
},
"type": {
"listen": "待ち受け",
@@ -652,8 +656,8 @@
"connect-timeout": "接続がタイムアウトしました",
"connect-fail": "接続に失敗しました",
"bad-string": "文字列への変換に失敗しました",
"invalid-host": "ホスト名が不正",
"invalid-port": "ポートが不正"
"invalid-host": "ホスト名が不正",
"invalid-port": "ポートが不正"
}
},
"udp": {
@@ -668,7 +672,7 @@
"toport": "ポート",
"address": "アドレス",
"decode-base64": "Base64形式のペイロードを復号",
"port": "ポート"
"port": "ポート"
},
"placeholder": {
"interface": "(任意) 使用するローカルインターフェイスもしくはアドレス",
@@ -716,7 +720,7 @@
"port-invalid": "udp: ポート番号が不正です",
"alreadyused": "udp: 既に__port__番ポートが使用されています",
"ifnotfound": "udp: インターフェイス __iface__ がありません",
"invalid-group": "マルチキャストグループが不正"
"invalid-group": "マルチキャストグループが不正"
}
},
"switch": {
@@ -724,7 +728,9 @@
"label": {
"property": "プロパティ",
"rule": "条件",
"repair": "メッセージ列の補正"
"repair": "メッセージ列の補正",
"value-rules": "値ルール",
"sequence-rules": "列ルール"
},
"previous": "前回の値",
"and": "",
@@ -732,22 +738,22 @@
"stopfirst": "最初に合致した条件で終了",
"ignorecase": "大文字、小文字を区別しない",
"rules": {
"btwn": "is between",
"cont": "contains",
"regex": "matches regex",
"true": "is true",
"false": "is false",
"null": "is null",
"nnull": "is not null",
"istype": "is of type",
"empty": "is empty",
"nempty": "is not empty",
"head": "head",
"tail": "tail",
"index": "index between",
"btwn": "範囲内である",
"cont": "要素に含む",
"regex": "正規表現にマッチ",
"true": "trueである",
"false": "falseである",
"null": "nullである",
"nnull": "nullでない",
"istype": "指定型である",
"empty": "空である",
"nempty": "空でない",
"head": "先頭要素である",
"tail": "末尾要素である",
"index": "指定添字範囲要素である",
"exp": "JSONata式",
"else": "その他",
"hask": "has key"
"hask": "キーを含む"
},
"errors": {
"invalid-expr": "不正な表現: __error__",
@@ -781,8 +787,8 @@
"invalid-json": "対象の値のJSONプロパティが不正",
"invalid-expr": "JSONata式が不正: __error__",
"no-override": "オブジェクト型でないプロパティを設定できません: __property__",
"invalid-prop": "プロパティ式が不正: __property__",
"invalid-json-data": "JSONデータが不正: __error__"
"invalid-prop": "プロパティ式が不正: __property__",
"invalid-json-data": "JSONデータが不正: __error__"
}
},
"range": {
@@ -794,10 +800,10 @@
"from": "最小値",
"to": "最大値",
"roundresult": "小数値を四捨五入し整数値へ変換",
"minin": "入力最小値",
"maxin": "入力最大値",
"minout": "出力最小値",
"maxout": "出力最大値"
"minin": "入力最小値",
"maxin": "入力最大値",
"minout": "出力最小値",
"maxout": "出力最大値"
},
"placeholder": {
"min": "例) 0",
@@ -1022,8 +1028,8 @@
"complete": "<code>msg.complete</code> プロパティが設定されたメッセージ受信後",
"tip": "このモードでは、本ノードが <i>split</i> ノードと組となるか、 <code>msg.parts</code> プロパティが設定されたメッセージを受け取ることが前提となります。",
"too-many": "joinード内部で保持しているメッセージが多すぎます",
"message-prop": "メッセージプロパティ",
"merge": {
"message-prop": "メッセージプロパティ",
"merge": {
"topics-label": "対象トピック",
"topics": "トピック",
"topic": "トピック",
@@ -1081,11 +1087,11 @@
"too-many": "batchード内で保持しているメッセージが多すぎます",
"unexpected": "想定外のモード",
"no-parts": "メッセージにpartsプロパティがありません",
"error": {
"invalid-count": "メッセージ数が不正",
"invalid-overlap": "オーバラップが不正",
"invalid-interval": "時間間隔が不正"
}
"error": {
"invalid-count": "メッセージ数が不正",
"invalid-overlap": "オーバラップが不正",
"invalid-interval": "時間間隔が不正"
}
},
"rbe": {
"rbe": "filter",
@@ -1095,9 +1101,9 @@
"start": "初期値",
"name": "名前",
"septopics": "個別に動作を適用",
"gap": "変化量",
"property": "プロパティ",
"topic": "トピック"
"gap": "変化量",
"property": "プロパティ",
"topic": "トピック"
},
"placeholder": {
"bandgap": "例:10、5%",

View File

@@ -24,7 +24,7 @@
<dt class="optional">method <span class="property-type">文字列</span></dt>
<dd>ノードの設定で指定していない場合このプロパティでリクエストに用いるHTTPメソッドを設定します<code>GET</code>, <code>PUT</code>, <code>POST</code>, <code>PATCH</code>, <code>DELETE</code></dd>
<dt class="optional">headers <span class="property-type">オブジェクト</span></dt>
<dd>リクエストのHTTPヘッダを指定します</dd>
<dd>リクエストのHTTPヘッダを指定します注釈: <code>msg.headers</code></dd>
<dt class="optional">cookies <span class="property-type">オブジェクト</span></dt>
<dd>設定するとリクエストと共にクッキーを送ることができます</dd>
<dt class="optional">payload</dt>

View File

@@ -15,11 +15,12 @@
-->
<script type="text/html" data-help-name="file">
<p><code>msg.payload</code></p>
<p><code>msg.payload</code></p>
<h3>入力</h3>
<dl class="message-properties">
<dt class="optional">filename <span class="property-type">文字列</span></dt>
<dd>対象ファイル名をノード設定していない場合のプロパティでファイルを指定できます</dd>
<dd>更新するファイルの名前はノード設定やメッセージのプロパティで指定できますデフォルトでは<code>msg.filename</code>使
</dd>
<dt class="optional">encoding <span class="property-type">文字列</span></dt>
<dd>エンコーディングをmsgで設定する構成にした際はこの任意のプロパティでエンコーディングを設定できます</dt>
</dl>
@@ -30,7 +31,7 @@
<p><code>msg.filename</code>使</p>
<p>追記を行う代わりにファイル全体を上書きするように設定することもできます例えば画像のようなバイナリデータをファイルに書き出す場合はこのオプションを指定し改行を追記するオプションを指定しないようにします</p>
<p>ファイル出力の際のエンコーディングはエンコーディングリストから選択できます</p>
<p>の他ファイルの削除を行うことも可能です</p>
<p>の他ファイルの削除を行うことも可能です</p>
</script>
<script type="text/html" data-help-name="file in">
@@ -38,14 +39,15 @@
<h3>入力</h3>
<dl class="message-properties">
<dt class="optional">filename <span class="property-type">文字列</span></dt>
<dd>読み出し対象のファイル名をノードに設定していない場合のプロパティでファイルを指定できます</dd>
<dd>読み込むファイルの名前はノード設定やメッセージのプロパティで指定できますデフォルトでは<code>msg.filename</code>使
</dd>
</dl>
<h3>出力</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">文字列 | バッファ</span></dt>
<dd>ファイルの内容を文字列もしくはバッファで表現します</dd>
<dd>ファイルの内容を文字列もしくはバッファで表現します</dd>
<dt class="optional">filename <span class="property-type">文字列</span></dt>
<dd>読み出し対象のファイル名をノードに設定していない場合このプロパティでファイルを指定します</dd>
<dd>読み出し対象のファイル名をノードに設定していない場合この任意のプロパティでファイルの名前を指定します</dd>
</dl>
<h3>詳細</h3>
<p>ファイルネームは絶対パスでの指定を推奨します絶対パスを指定しない場合はNode-REDプロセスのワーキングディレクトリからの相対パスとして扱います</p>

View File

@@ -1,6 +1,6 @@
{
"name": "@node-red/nodes",
"version": "3.0.0-beta.1",
"version": "3.0.0-beta.2",
"license": "Apache-2.0",
"repository": {
"type": "git",

View File

@@ -1,6 +1,6 @@
{
"name": "@node-red/registry",
"version": "3.0.0-beta.1",
"version": "3.0.0-beta.2",
"license": "Apache-2.0",
"main": "./lib/index.js",
"repository": {
@@ -16,11 +16,11 @@
}
],
"dependencies": {
"@node-red/util": "3.0.0-beta.1",
"@node-red/util": "3.0.0-beta.2",
"clone": "2.1.2",
"fs-extra": "10.1.0",
"semver": "7.3.7",
"tar": "6.1.11",
"uglify-js": "3.15.4"
"uglify-js": "3.15.5"
}
}

View File

@@ -165,7 +165,7 @@ function buildDiagnosticReport(scope, callback) {
/** gets a sanitised list containing only the module name */
function listContextModules() {
const keys = Object.keys(runtime.settings.contextStorage);
const keys = Object.keys(runtime.settings.contextStorage || {});
const result = {};
keys.forEach(e => {
result[e] = {

View File

@@ -100,7 +100,9 @@
"error": "クレデンシャルの読み込みエラー: __message__",
"error-saving": "クレデンシャルの保存エラー: __message__",
"not-registered": "クレデンシャル '__type__' は登録されていません",
"system-key-warning": "\n\n---------------------------------------------------------------------\nフローのクレデンシャルファイルはシステム生成キーで暗号化されています。\n\nシステム生成キーを何らかの理由で失った場合、クレデンシャルファイルを\n復元することはできません。その場合、ファイルを削除してクレデンシャルを\n再入力しなければなりません。\n\n設定ファイル内で 'credentialSecret' オプションを使って独自キーを設定\nします。変更を次にデプロイする際、Node-REDは選択したキーを用いてクレ\nデンシャルを再暗号化します。 \n\n---------------------------------------------------------------------\n"
"system-key-warning": "\n\n---------------------------------------------------------------------\nフローのクレデンシャルファイルはシステム生成キーで暗号化されています。\n\nシステム生成キーを何らかの理由で失った場合、クレデンシャルファイルを\n復元することはできません。その場合、ファイルを削除してクレデンシャルを\n再入力しなければなりません。\n\n設定ファイル内で 'credentialSecret' オプションを使って独自キーを設定\nします。変更を次にデプロイする際、Node-REDは選択したキーを用いてクレ\nデンシャルを再暗号化します。 \n\n---------------------------------------------------------------------\n",
"unencrypted": "暗号化されていないクレデンシャルを使用",
"encryptedNotFound": "暗号化されたクレデンシャルが存在しません"
},
"flows": {
"safe-mode": "セーフモードでフローを停止しました。開始するためにはデプロイしてください",

View File

@@ -1,6 +1,6 @@
{
"name": "@node-red/runtime",
"version": "3.0.0-beta.1",
"version": "3.0.0-beta.2",
"license": "Apache-2.0",
"main": "./lib/index.js",
"repository": {
@@ -16,8 +16,8 @@
}
],
"dependencies": {
"@node-red/registry": "3.0.0-beta.1",
"@node-red/util": "3.0.0-beta.1",
"@node-red/registry": "3.0.0-beta.2",
"@node-red/util": "3.0.0-beta.2",
"async-mutex": "0.3.2",
"clone": "2.1.2",
"express": "4.18.1",

View File

@@ -1,6 +1,6 @@
{
"name": "@node-red/util",
"version": "3.0.0-beta.1",
"version": "3.0.0-beta.2",
"license": "Apache-2.0",
"repository": {
"type": "git",
@@ -16,7 +16,7 @@
],
"dependencies": {
"fs-extra": "10.1.0",
"i18next": "21.6.16",
"i18next": "21.8.2",
"json-stringify-safe": "5.0.1",
"jsonata": "1.8.6",
"lodash.clonedeep": "^4.5.0",

View File

@@ -1,6 +1,6 @@
{
"name": "node-red",
"version": "3.0.0-beta.1",
"version": "3.0.0-beta.2",
"description": "Low-code programming for event-driven applications",
"homepage": "http://nodered.org",
"license": "Apache-2.0",
@@ -31,10 +31,10 @@
"flow"
],
"dependencies": {
"@node-red/editor-api": "3.0.0-beta.1",
"@node-red/runtime": "3.0.0-beta.1",
"@node-red/util": "3.0.0-beta.1",
"@node-red/nodes": "3.0.0-beta.1",
"@node-red/editor-api": "3.0.0-beta.2",
"@node-red/runtime": "3.0.0-beta.2",
"@node-red/util": "3.0.0-beta.2",
"@node-red/nodes": "3.0.0-beta.2",
"basic-auth": "2.0.1",
"bcryptjs": "2.4.3",
"express": "4.18.1",

View File

@@ -4,7 +4,7 @@ const path = require("path");
const fs = require("fs-extra");
const should = require("should");
const LATEST = "2";
const LATEST = "3";
function generateScript() {
return new Promise((resolve, reject) => {