Commit Graph

856 Commits

Author SHA1 Message Date
Dave Conway-Jones 6c0d6c5425
Join-reduce keep existing msg properties
see https://discourse.nodered.org/t/no-response-object-after-split-join/63919
2022-06-15 10:16:12 +01:00
Nick O'Leary 3e34d0badb
Merge pull request #3622 from kazuhitoyokoi/master-addjpn
Add Japanese translations for v3.0-beta.2
2022-06-09 16:03:43 -05:00
Nick O'Leary 73ff7e2de4
Merge pull request #3632 from node-red-hitachi/fix-inject-of-JSONata
Fix JSONata evaluation of inject button
2022-06-09 16:00:23 -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
Hiroyasu Nishiyama 7fbebbf361 fix JSONata evaluation of inject button 2022-05-27 11:44:56 +09:00
Kazuhito Yokoi 121372802f Use built-in type in typedInput 2022-05-26 22:50:52 +09:00
Stephen McLaughlin 51d429f9ae
Dont delete TCP socket twice 2022-05-26 10:18:34 +01:00
Kazuhito Yokoi e5a21a3261
Merge branch 'node-red:master' into master-addjpn 2022-05-25 19:07:57 +09:00
Stephen McLaughlin 6f0de7c80e
define noproxy variable 2022-05-24 20:43:29 +01:00
Hiroyasu Nishiyama a147458120 i18n debug sidebar node label 2022-05-22 16:28:11 +09:00
Kazuhito Yokoi 6182e22d18 Add string label to typedInput in file nodes 2022-05-22 11:56:21 +09:00
Kazuhito Yokoi dda84c5cd5 Fix indents in other code except message catalog 2022-05-22 11:18:40 +09: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
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
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 e8ddd6d16d i18n switch group label & add Japanese message 2022-05-08 08:44:35 +09: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
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
Kazuhito Yokoi c5af71e0a2 Change icon path from png to svg 2022-05-05 20:38:55 +09:00
ralphwetzel a4603a4396
Update 60-link.html
Remove development debug message.
Fixes #3574 ... courtesy of @Steve-Mcl
2022-05-04 20:15:24 +02: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
ralphwetzel bbc32c4cd0
Update 21-debug.html
Tidy up a leftover development debug message ... with a smile!
2022-05-03 22:17:00 +02:00
Stephen McLaughlin 7f68e341da
Merge branch 'dev' into master 2022-05-03 09:35:32 +01:00
Nick O'Leary b74a42cdf5
Merge pull request #3569 from node-red/watch-fix
Fix Watch node handling of recursive directories
2022-05-03 09:22:31 +01:00
Stephen McLaughlin 9b644e3c47
Use new validation option to return better label
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-05-02 21:28:04 +01:00
Nick O'Leary 193e420eb3
Fix Watch node handling of recursive directories
Fixes #3566
2022-05-02 20:11:04 +01:00
Steve-Mcl be3b5b7fe2 MQTT topic validation and lockup fix
closes #3557
2022-04-29 19:56:37 +01:00
Stephen McLaughlin 294fc6b62f
Ensure userProps makes it through to runtime 2022-04-29 11:25:19 +01:00
Stephen McLaughlin 662a44fccf
save and restore v5 config user props 2022-04-29 10:44:19 +01:00
Nick O'Leary bee9e20827
Update Watch node to use node-watch module 2022-04-28 14:07:13 +01:00
Nick O'Leary 9565aee3c5
Merge pull request #3533 from Steve-Mcl/filename-typedinput
Feature: Change basic Filename field to a typedInput
2022-04-27 22:28:12 +01:00
Steve-Mcl f63da0c58b Default to msg.filename as per v2 condition 2022-04-27 20:44:41 +01:00
Nick O'Leary dc03d0b300
Merge pull request #3553 from Steve-Mcl/code-edit-ux-improvements
Code editor ux improvements around remembering state of each code editor in a flow
2022-04-27 14:35:43 +01:00
Steve-Mcl 194eb4e266 code editor ux improvements
* Save and restore editor selection(s), cursor(s), scroll pos etc
* Improve focusing of editor at appropriate times
* Works with both ace and monaco
* Backwards compatible and (almost) fully functional with existing nodes
2022-04-27 11:23:13 +01:00
Nick O'Leary e8f20285af
Merge pull request #3551 from node-red/pr_3544
Add message count option to Debug status
2022-04-26 16:25:01 +01:00
Stephen McLaughlin 020eaef5ba
Fix incorrect MQTT status
fixes #3550
2022-04-26 16:12:54 +01:00
Nick O'Leary 973b31521e
Tidy up debug message status count 2022-04-26 16:04:09 +01:00
Stephen McLaughlin 59e513f130
Remove pointless placeholders 2022-04-26 15:30:20 +01:00
Nick O'Leary f4bb62adbc
Merge branch 'dev' into pr_3438 2022-04-26 13:53:35 +01:00
Nick O'Leary 48a528a4b8
Ensure property validation is backwards compatible 2022-04-26 13:45:14 +01:00
Nick O'Leary 2fb9f62d0b
Merge branch 'dev' into fix-name-generator 2022-04-25 20:31:33 +01:00
Nick O'Leary 84e02fc144
Remove name generation from link call and add to Function 2022-04-25 20:30:05 +01:00
Nick O'Leary c88a177cb2
Merge pull request #3530 from Steve-Mcl/mqtt-payload-auto-parsing
MQTT payload auto parsing improvements
2022-04-25 11:40:59 +01:00
Rafael Muynarsk a63dfc4650 Added condition that.statusType === "counter" in the debug.html file 2022-04-24 17:13:53 -03:00
Rafael Muynarsk 8924ac2783 implementing message count on the debug node 2022-04-23 20:18:51 -03:00
Steve-Mcl 856d2ab266 remove unecessary ${ENV_VAR} test 2022-04-23 11:20:21 +01:00
Steve-Mcl 552408f488 Make new Auto Output mode optional
- adds entry to output data type
- adds depreciation tip
2022-04-21 21:20:41 +01:00
Nick O'Leary 12a25c37aa
Merge branch 'master' into dev 2022-04-20 10:56:55 +01:00
Nick O'Leary 4706e20a1d
Merge pull request #3526 from node-red-hitachi/fix-status-reference-in-debug-node
fix reference error of msg.status in debug node
2022-04-20 10:56:25 +01:00
Nick O'Leary 330ddfa3ad
Merge pull request #3528 from Steve-Mcl/link-list-in-subflow
Display link targets of nodes in a regular flow, for Link Call nodes inside a subflow
2022-04-20 09:47:35 +01:00
Nick O'Leary 958f57085f
Merge branch 'dev' into tcp-node-better-split 2022-04-20 09:34:16 +01:00
Nick O'Leary 908f9562f6
Fix name auto-generator to leave blank names alone on copy/paste 2022-04-19 19:17:41 +01:00
Steve-Mcl 8df53e441d remove unused vars 2022-04-19 10:42:00 +01:00
Stephen McLaughlin 6f89efa40b
remove unused if block
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-04-19 10:30:08 +01:00
Steve-Mcl 013af7619e add tests
- fix 2 issues found when developing tests :)
2022-04-16 17:13:54 +01:00
Steve-Mcl aa302ecc32 Ensure filename is at least an empty string! 2022-04-16 14:42:03 +01:00
Steve-Mcl 99b049fe2d final updates to file node filename typedInput
- ensure node settings are auto updated to correct typedInput type/value
- improve label
- ensure str and env are considered "static" (keep stream open)
2022-04-16 14:25:37 +01:00
Steve-Mcl 6e35a9f682 use typedInput for filename on file nodes 2022-04-14 23:55:57 +01:00
Stephen McLaughlin 78f456911a auto mode to auto parse string to JS Object 2022-04-14 22:47:18 +01:00
Steve-Mcl 8f5d3dc49c Use v5 properties to aid auto parsing payload
- closes #3421
- fixes bug in `function setBoolProp()`
2022-04-14 22:47:18 +01:00
Steve-Mcl 97678577fb call done after ws disconnects
fixes #3527
2022-04-14 22:07:52 +01:00
Steve-Mcl b9919b0a9c Show link targets for link call in subflow
fixes #3248
2022-04-12 22:11:34 +01:00
Hiroyasu Nishiyama 226f45d8d5 fix reference error of msg.status in debug node 2022-04-12 11:33:02 +09:00
Hiroyasu Nishiyama accbf6ecfc update validator arguments not to use optional object 2022-04-12 08:09:46 +09:00
Stephen McLaughlin a7932da207
Merge pull request #3488 from Steve-Mcl/httpreq-headers-ui
Add UI for Http Request node headers
2022-04-06 08:35:32 +01:00
Nick O'Leary e606d0b1de
Merge pull request #3385 from node-red/allow-inject-on-start
let inject optionally fire at start in only at time mode.
2022-04-05 23:34:20 +01:00
Nick O'Leary b4bcb7ace2
Merge pull request #3503 from node-red/debug-tooltip
Add a tooltip to debug sidebar messages to reveal full path to node
2022-04-05 23:33:14 +01:00
Kazuhito Yokoi 14fa9cfa4b Change indents from tabs to 4 spaces 2022-03-30 15:20:39 +09:00
Dave Conway-Jones 8a40622815
tcp node - undo trim if we re-add split chars
and fix tests
2022-03-23 22:07:43 +00:00
Steve-Mcl b918b75414 Merge remote-tracking branch 'upstream/master' into dev 2022-03-23 11:16:18 +00:00
Nick O'Leary 37f0e36c98
Merge pull request #3463 from Steve-Mcl/dynamic-link-call
Dynamic link call
2022-03-23 10:14:48 +00:00
Nick O'Leary 5b5553b9a3
Add debug message path info tooltip
Fixes #3477
2022-03-21 20:44:36 +00:00
Nick O'Leary 0f37b326a0
Merge pull request #3502 from Steve-Mcl/fix-mqtt-will-props
fix typo of will properties (properies)
2022-03-21 19:29:23 +00:00
Steve-Mcl 7f9f551cfe fix typo of will properties (properies)
Fixes #3501
2022-03-21 15:24:23 +00:00
Nick O'Leary 3649f10600
Merge pull request #3478 from node-red/auto-gen-name
Allow node name to be auto-generated when added
2022-03-14 19:35:58 +00:00
Nick O'Leary db1ad0df63
Add Junctions 2022-03-14 18:16:24 +00:00
Steve-Mcl c5de18caae fix: node save broken
- Revert last minute code tidy that changed too many `this` to `node`
2022-03-12 16:10:36 +00:00
Steve-Mcl e57774e121 fix UI change events
- use `this` not `node` in UI change events
2022-03-12 15:02:25 +00:00
Steve-Mcl b7ee46d400 revise header options
- remove Accept-Charset
- Use camel case by default
- additional encodings
2022-03-12 15:00:48 +00:00
Steve-Mcl 6007132640 rearange UI (name to bottom) 2022-03-12 14:59:15 +00:00
Steve-Mcl 31b3a4c342 Add UI for common headers/values
- Wrap HTML node script in IFFE (isolate module level vars & functions)
- Add UI elements for setting headers in http req node edit form
- Update built in help
- Add tests
2022-03-12 13:47:29 +00:00
Nick O'Leary 3c0b74005b
Add core:generate-node-names action 2022-03-09 11:32:37 +00:00
Steve-Mcl 10b18de3e0 fix: ensure mqtt v5 props can be set false
fixes #3471
2022-03-05 11:24:25 +00:00
Stephen McLaughlin e85b925f40
Ensure linkType is a valid value (2nd attempt) 2022-03-01 16:48:31 +00:00
Steve-Mcl b665698e78 Ensure linkType is a valid value 2022-02-28 19:00:58 +00:00
Steve-Mcl 249f7e45fb Link Call should not call into subflow...
- includes missing jsdoc
- improves speed (no searching, only lookups)
- code formatting consistency
- improve tests
2022-02-28 13:57:22 +00:00
Dave Conway-Jones c0612e6193
Merge branch 'master' of https://github.com/node-red/node-red 2022-02-28 09:59:35 +00:00
萧十一郎 380a08242a
fix html label mistake (#3459) 2022-02-26 10:10:17 +00:00
Steve-Mcl e653a933f1 fix subflow calls 2022-02-25 18:39:48 +00:00
Steve-Mcl 19cf43a10e Re-write link call targeting...
- Remove msg.target by object
- Remove :: scoping
- Always try to locate matching link-in on same flow first
  - If not found, look on all flows
    - if 1 found, call it
    - If more than 1 link target found, raise error
2022-02-25 16:13:39 +00:00
Dave Conway-Jones 0398ef3b90
undo regression in tcp-in node (missed one)
and add test
2022-02-25 16:06:44 +00:00
Dave Conway-Jones 8c19daf949
TCP nodes- Add optional reattach delimiter to streaming strings 2022-02-25 15:56:13 +00:00
Steve-Mcl e4f0688a02 dynamic link target 1st draft 2022-02-24 19:46:21 +00:00
Dave Conway-Jones 25f4fbf2bb
undo regression to tcp-in node
To fix #3454
2022-02-21 20:03:25 +00:00
Nick O'Leary 0533c08438
Merge branch 'master' into dev 2022-02-18 22:02:30 +00:00
Steve-Mcl 669aa769c2 Fix close timeout on MQTT nodes
fixes #2934
2022-02-17 10:18:46 +00:00
Nick O'Leary 95d3a8cc22
Merge pull request #3409 from node-red/let-switch-number-test-report-NaN-as-false
switch node - add check for NaN in is of type number to be false
2022-02-14 23:17:38 +00:00
Nick O'Leary be11fda814
Allow nbRateUnits to be undefined when validating
Fixes #3407
2022-02-14 20:44:55 +00:00
Hiroyasu Nishiyama 9f98b4b082 add support of property validation message 2022-02-14 10:40:49 +09:00
Dave Conway-Jones 63ebadc526
add check for NaN in is of type number to be false
and add test
to fix issue #3408
2022-02-09 12:03:38 +00:00
Alexandre Alapetite 280d63fde7
Fix util.encodeObject 2022-02-03 15:59:25 +01:00
Alexandre Alapetite e55cbb3e3d
Fix bug in debug node due to msg.hasOwnProperty construct
`msg.hasOwnProperty("status")` might make the debug node crash/produce an error if the payload was created with `Object.create(null)`.
This is the case e.g. for `ini` (to parse INI files), an official NPM node:
4f289946b3/lib/ini.js (L63)

My Node-RED node `node-red-contrib-parser-ini`, which is using that library, was hit by this bug and I had to ship a workaround
fe6b1eb4b1/parser-ini.js (L14)

The `msg.hasOwnProperty("xxx")` construct should not be used since ECMAScript 5.1.

ESLint advises in the same direction https://eslint.org/docs/rules/no-prototype-builtins

This patch was produced using the following regex:
Search: `\b([\w.]+).hasOwnProperty\(`
Replace: `Object.prototype.hasOwnProperty.call($1, `

This could be applied more gobally if desired.
2022-02-03 02:01:22 +01:00
Dave Conway-Jones 514da83961
let inject optionally fire at start in only at time mode. 2022-01-28 18:05:20 +00:00
Nick O'Leary 1cea1ced82
Merge pull request #3371 from node-red/node-alias
Add _path property to nodes and expose as node.path in Function node
2022-01-26 11:10:43 +00:00
Nick O'Leary 703c5adba7
Add _path property to nodes and expose as node.path in Function node 2022-01-25 21:32:28 +00:00
Steve-Mcl 8948ca5323 Merge branch 'dev' into mqtt-reconnect-fix 2022-01-25 12:32:49 +00:00
Steve-Mcl 9c3be51fe9 Improve MQTT broker disconnect situation
* Ensure topic is sane to prevent error 129
* Ensure a log entry is made
* Update node status
2022-01-25 12:29:51 +00:00
Nick O'Leary 4e5ddd57bf
Merge branch 'dev' of github.com:node-red/node-red into dev 2022-01-24 23:18:43 +00:00
Nick O'Leary e0d4ecf835
Merge branch 'master' into dev 2022-01-24 23:18:25 +00:00
Hiroyasu Nishiyama 5effcdb024 use setCookieSync instead of setCookie 2022-01-19 23:45:13 +09:00
Nick O'Leary c4465ba58d
Merge pull request #3351 from node-red-hitachi/fix-delay-rate-unit-validation
fix unit value validation of delay node
2022-01-18 09:45:56 +00:00
Hiroyasu Nishiyama e7189ab81f fix unit value validation of delay node 2022-01-13 23:52:06 +09:00
Hiroyasu Nishiyama f786c7f144 fix JSON propety validation of inject node 2022-01-13 21:42:50 +09:00
Nick O'Leary 51f45293b8
Merge branch 'master' into dev 2022-01-13 10:52:36 +00:00
Nick O'Leary e1467dfe23
Merge pull request #3348 from node-red/scrollbar-expand
Prevent function scrollbar from obscuring expand button
2022-01-13 09:49:15 +00:00
Nick O'Leary c480f96d30
Prevent function scrollbar from obscuring expand button
Fixes #2955
2022-01-13 09:46:37 +00:00
Nick O'Leary 036a825892
Only setup ws client heartbeat once it is connected
Fixes #3264
2022-01-12 21:46:56 +00:00
Nick O'Leary 30b00741b5
Merge pull request #3296 from node-red/Json-try-parse-buffer
Let JSON node attempt to parse buffer if it contains a valid string
2022-01-12 18:58:02 +00:00
Nick O'Leary f86e743cce
Merge branch 'master' into dev 2022-01-12 17:59:26 +00:00
Nick O'Leary c6a38b8355
Merge pull request #3300 from node-red/remove-use-of-verbose-flag-in-core-nodes
Remove use of verbose flag in core nodes - and use node.debug level instead
2022-01-12 17:38:34 +00:00
Nick O'Leary ee84eb666b
Merge pull request #3307 from node-red/add-tls-option-to-tcp-node
Add TLS option to tcp client nodes
2022-01-12 17:37:43 +00:00
Tobias Oort 555f155cad Added support for commaseparated subprotocols
Removed placeholder from html
2022-01-12 09:10:35 +01:00
Dave Conway-Jones 52e4e0e569
Fix for narrrowbandEq mode start condition failure
And add test
As discussed https://discourse.nodered.org/t/the-filter-node-or-the-old-rbe-node/56371
2022-01-11 13:56:44 +00:00
Dave Conway-Jones f77d161643
remove debug msg from inject close 2022-01-10 20:22:20 +00:00
Nick O'Leary 062f76214e
Merge pull request #3325 from hardillb/http-basic-username-only
Fix basic auth with empty username or password
2022-01-10 18:27:55 +00:00
Tobias Oort bd77d7eec3 Implemented support for Websocket Subprotocols in WS Client Node. 2022-01-08 22:18:05 +01:00
Steve-Mcl b5e48aa509 load extralibs when expanding monaco. fixes #3319 2022-01-08 19:29:49 +00:00
Ben Hardill 44616c6872
Fix basic auth with empty username or password
fix for #3324
2022-01-05 20:56:46 +00:00
Nick O'Leary aaa2b4c3db
Merge pull request #3322 from node-red/inject-props-fix
Fix incorrect clearing of blank payload property in Inject node
2022-01-04 18:59:05 +00:00
Nick O'Leary 942b17b807
Fix incorrect clearing of blank payload property in Inject node
Fixes #3316
2022-01-03 21:51:49 +00:00
Nick O'Leary 0dbc35c252
Update Function to use correct api to access env vars
Fixes #3299
2021-12-27 11:55:10 +00:00
Dave Conway-Jones c9f03f1ac5
better tests
(and a small fix as a result)
2021-12-27 09:51:50 +00:00
Dave Conway-Jones 02bd292b8c
fix and test 2021-12-26 16:12:47 +00:00
Dave Conway-Jones e5f1029d0c
fix variable names for test 2021-12-26 15:37:41 +00:00
Dave Conway-Jones cae247160f
Let tcprequest split incoming strings on delimiter (as per tcpin node)
and fixup i18n messages
2021-12-26 15:28:16 +00:00
Dave Conway-Jones 6692b1992c
TCP add tls option to inbound nodes 2021-12-26 12:12:31 +00:00
Dave Conway-Jones 0937837b7f
Add TLS config option to TCP client nodes
(not yet when in server mode)
2021-12-24 16:18:00 +00:00
Dave Conway-Jones 2cad42870e
chaneg exec, file and inject node to use node.debug rather than -v flag 2021-12-17 09:58:10 +00:00
Dave Conway-Jones 6ae42eb787
Let JSON parser attempt to parse buffers if they contain strings
and add/fix test
2021-12-10 15:21:43 +00:00
Nick O'Leary 68a80b9244
Merge pull request #3277 from node-red/debug-path-fix
Add proper error handling for 404 errors when serving debug files
2021-12-01 13:48:25 +00:00
Nick O'Leary 04ffa06221
Add proper error handling for 404 errors when serving debug files 2021-11-26 11:30:51 +00:00