1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
Commit Graph

31 Commits

Author SHA1 Message Date
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
d6b5494625
Allow credentials to be provided as part of /flows api 2020-02-13 16:44:48 +00:00
Nick O'Leary
000765fb77
Increase timeouts in Subflow tests to minimise false positives 2019-10-25 21:15:59 +01:00
Nick O'Leary
c1c694035d
Allow node.status() to be passed number/bool types
Adds to the existing support for string types. Also
adds unit tests for all three cases
2019-10-14 13:06:59 +01:00
Nick O'Leary
83932e1725
Fix Flow test for updated node.done api 2019-08-14 22:55:46 +01:00
Nick O'Leary
f52289b2c3
Add send to input handler signature 2019-07-09 11:40:55 +01:00
Nick O'Leary
3b5ea0f15f
Add node done API 2019-07-08 23:23:33 +01:00
Nick O'Leary
f106019938
Add runtime test for disabled nodes 2019-06-18 11:02:31 +01:00
Nick O'Leary
28e08ebaf5
Add envVarExcludes setting to block named env vars 2019-03-07 22:54:20 +00:00
Nick O'Leary
8fb6bc059e
Pass complete status to Status node and filter to editor 2019-03-04 10:23:10 +00:00
Nick O'Leary
6e944485f0
Merge pull request #2030 from node-red-hitachi/scope-parent
Allow access of scope parent
2019-02-06 14:10:57 +00:00
Nick O'Leary
79f3669fac
Add 'catch uncaught only' mode to Catch node
Closes #1747

This was inspired by a PR from @mauriciom75 but implemented in a different way
due to some of the internal reworking done to Flow and Subflow in the dev branch
2019-02-05 14:29:50 +00:00
Hiroyasu Nishiyama
723e9b3cba make $parent access without key return undefined 2019-02-05 14:47:30 +09:00
Nick O'Leary
5110eaff96
Merge branch 'dev' into pr_2042 2019-02-04 14:39:00 +00:00
Nick O'Leary
3bcff91328
Add Status Node to Subflow to allow subflow-specific status
Closes #597
2019-02-01 23:44:50 +00:00
Hiroyasu Nishiyama
e843f192ec convert subflow env vars to dict 2019-02-02 08:34:33 +09:00
Hiroyasu Nishiyama
ce507b3b52 simplified meta-data 2019-01-30 20:57:51 +09:00
Nick O'Leary
d534a8952d
Do not propagate Flow.getNode to parent when called from outside flow 2019-01-29 21:49:20 +00:00
Hiroyasu Nishiyama
0881c6a20b update test cases 2019-01-28 23:14:49 +09:00
Hiroyasu Nishiyama
a413f3cded Add support of subflow env var 2019-01-26 23:15:20 +09:00
Nick O'Leary
c99b35428b
Ensure status/error events are propagated to parent properly 2019-01-25 13:35:02 +00:00
Nick O'Leary
490903ca25
Tidy up when usage in Flow and Node 2019-01-17 13:18:26 +00:00
Nick O'Leary
6286b34d00
Add Flow.getSetting for resolving env-var properties
This lays the groundwork for subflow-specific settings
2019-01-16 22:38:04 +00:00
Nick O'Leary
81f4e0de56
Refactor Subflow logic into own class 2019-01-16 16:27:19 +00:00
Hiroyasu Nishiyama
596fbfb517 allow $parent access of flow context 2019-01-16 23:10:03 +09:00
Nick O'Leary
2aae76c9bc
Merge branch 'dev' into repackage 2018-09-17 14:49:11 +01:00
Nick O'Leary
954226da0d
Fix up promises in tests, remove package-lock 2018-08-20 16:45:50 +01:00
Nick O'Leary
38a1291c5b
Fixup all the tests 2018-08-20 16:17:24 +01:00
Nick O'Leary
998bf92ad4
Move tests to reflect package structure 2018-08-19 11:28:03 +01:00