Commit Graph

92 Commits

Author SHA1 Message Date
Stephen McLaughlin e714ff35c4
Merge branch 'dev' into diagnostics 2022-04-27 12:08:32 +01:00
Steve-Mcl 39f303fcd6 add unit tests 2022-04-06 15:11:37 +01:00
Sam Machin 50718495da
fix test mock 2022-03-24 08:39:31 +00:00
Sam Machin d9bd736159
change error to warn for moving from unencrypted to encrypted 2022-03-21 09:29:41 +00:00
Sam Machin c7f48a83c0
add test 2022-03-19 17:57:30 +00:00
Nick O'Leary 4173625fca
Merge pull request #3243 from node-red/delete-global-context
Clear context contents when switching projects
2022-01-26 11:28:34 +00:00
Hiroyasu Nishiyama aa3f5001d5 additional update of test for NR_ prefix addition 2022-01-26 10:52:41 +09:00
Hiroyasu Nishiyama 75bcd9e8d5 add support for accessing node id & name as env var 2022-01-14 23:40:12 +09:00
Nick O'Leary 3abef972a7
Clear context contents when switching projects
Fixes #3240
2022-01-12 18:59:29 +00:00
Hiroyasu Nishiyama c331da7323 fix env var access using $env for groups 2021-11-27 19:29:57 +09:00
Hiroyasu Nishiyama 6aecc3915c add support of environtment variable for tab & group 2021-08-19 21:15:13 +09:00
Nick O'Leary ce905ba2c4
Merge branch 'master' into dev 2021-06-08 11:44:31 +01:00
Steve-Mcl a92f0c4c6e fix context key validation + add tests
- adds a helper function validateContextKey to keep it DRY
- adds tests ensure key of null "" 1 {} [] [""] [1] [{}] all throw error
2021-05-26 13:04:09 +01:00
Nick O'Leary 71ba73b38f
Merge branch 'master' into dev 2021-05-04 11:19:05 +01:00
Nick O'Leary 7df1a03b4b
Handle subflow modules that contain subflows 2021-04-28 21:50:00 +01:00
Nick O'Leary d2432716ea
Fix hook requires in unit tests 2021-04-15 15:30:02 +01:00
Nick O'Leary ed351eee54
Move hooks to util package 2021-04-15 15:12:30 +01:00
Nick O'Leary 877c463494
Update to latest sinon 2021-04-09 11:22:57 +01:00
Nick O'Leary 99a9e3a91b
Fix handling encrypted creds on /flows api 2021-03-06 20:27:51 +00:00
Nick O'Leary 3d23d1de4f
Merge pull request #2873 from node-red/function-modules
Function node external modules
2021-03-01 21:35:31 +00:00
Nick O'Leary 3af77b6a31
Merge pull request #2785 from node-red/library-plugins
Library plugins
2021-02-25 16:05:23 +00:00
Nick O'Leary 5012568464
Stop config nodes after flow nodes
Fixes #2876
2021-02-19 20:44:01 +00:00
Nick O'Leary b41c7962c2
Add tests for pluggable library 2021-02-19 15:24:56 +00:00
Nick O'Leary 6336ab121e
Merge branch 'dev' into function-modules 2021-02-13 00:21:27 +00:00
Nick O'Leary e899d2d5b8
Fix tests for externalModules component 2021-02-13 00:18:04 +00:00
Nick O'Leary a006b52052
Initial plugin runtime api implementation 2021-01-18 16:25:40 +00:00
Nick O'Leary 0c9fd25d3e
Nodes log via parent flow to allow flow-info to be added 2021-01-07 11:10:34 +00:00
Nick O'Leary 9d2d060dec
Fix unit tests for externalModules 2020-12-27 20:59:31 +00:00
Nick O'Leary fca21ac126
Rename paletteEditorEnabled to installerEnabled 2020-12-07 11:49:01 +00:00
Nick O'Leary 6fb96fa3c1
Move exec and events components to util module
The exec and events components are common components that
are used by both runtime and registry. It makes sense to
move them into the util package.

This also adds some docs to the registry module
2020-12-07 11:49:01 +00:00
Nick O'Leary 5992ed1fab
Fully remove when.js dependency 2020-12-07 11:49:01 +00:00
Nick O'Leary f19ec5d9b6
Clear retained status of deleted nodes 2020-11-17 13:29:13 +00:00
Nick O'Leary 7a90fe5aec
Fix flow api unit tests 2020-09-29 17:35:43 +01:00
Nick O'Leary 22a301b55e
Add flows:* events and deprecate nodes-* events 2020-09-29 16:29:10 +01:00
Nick O'Leary 605177dcf0
Validate hook names when they are added 2020-09-29 16:28:52 +01:00
Nick O'Leary 08148a07b2
Update Node/Flow to trigger msg routing hooks 2020-09-29 12:19:27 +01:00
Nick O'Leary bdd736315a
Add RED.hooks engine 2020-09-29 12:19:27 +01:00
Nick O'Leary d57ec0cd53
Refactor lib/flows code to include initial router component 2020-09-29 12:19:26 +01:00
Nick O'Leary 69d60ffb24
Add simplified git workflow to auto-commit changes 2020-09-28 10:41:33 +01:00
Nick O'Leary 91c2f479bb
Fix settings file migration test 2020-09-25 18:29:47 +01:00
Nick O'Leary 96d81ef72b
Add slight delay to fix config.json file tests 2020-09-24 16:54:24 +01:00
Nick O'Leary 4d0c572c2e
Fix .config.json unit tests 2020-09-24 15:42:52 +01:00
Nick O'Leary 5cf489a270
Fixup node test 2020-09-04 09:52:30 +01:00
Melvin Groenhoff d84c2b780b Fix `this` context when calling multiple event listeners (fixes #2692). 2020-09-04 10:20:30 +02:00
Nick O'Leary 16c26d8098
Move runtime settings back to adminApi from editorApi
Fixes #2662
2020-07-31 15:26:21 +01:00
Nick O'Leary fe4ef354ac
Flag a node as removed when it is disabled 2020-06-08 20:59:00 +01:00
Nick O'Leary 294696daf5
Merge branch 'dev' into groups 2020-03-30 23:42:52 +01:00
Nick O'Leary 84771f5864
Flows/subflows must preinitialise their context objects
Fixes #2513

If a node inside a subflow accessed its context object in its
constructor, the subflow-instance flow context would not yet
have been created. This would cause a place holder context
to get created on its behalf, but that place holder doesn't
have its parent set properly. This then breaks the usage
of $parent inside such a subflow.

This fix has changed it so flows (and subflows) create their
flow context as part of their initial creation. That ensures
it exists when individual nodes from the subflow are created,
allowing them to safely access their context.

This has also fixed a related issue where any attempt to use
$parent to access beyond the root parent would seemingly hang
as the callback was never being called. This would cause
messages to get stuck in flows. The fix ensures the callback
is used in the root context objects and undefined is returned.
2020-03-27 23:47:12 +00:00
Nick O'Leary 5cd2791506
[groups] Add groups to flow util unit tests 2020-03-16 23:01:57 +00:00
Nick O'Leary 1830478ec3
Merge pull request #2461 from node-red/set-flow-with-creds
Allow credentials to be provided as part of /flows api
2020-02-24 16:22:57 +00:00