@node-red/util 3.0.2 → 3.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/util.js +9 -3
- package/package.json +3 -3
package/lib/util.js
CHANGED
|
@@ -696,13 +696,19 @@ function evaluateNodeProperty(value, type, node, msg, callback) {
|
|
|
696
696
|
function prepareJSONataExpression(value,node) {
|
|
697
697
|
var expr = jsonata(value);
|
|
698
698
|
expr.assign('flowContext', function(val, store) {
|
|
699
|
-
|
|
699
|
+
if (node) {
|
|
700
|
+
return node.context().flow.get(val, store);
|
|
701
|
+
}
|
|
702
|
+
return "";
|
|
700
703
|
});
|
|
701
704
|
expr.assign('globalContext', function(val, store) {
|
|
702
|
-
|
|
705
|
+
if (node) {
|
|
706
|
+
return node.context().global.get(val, store);
|
|
707
|
+
}
|
|
708
|
+
return "";
|
|
703
709
|
});
|
|
704
710
|
expr.assign('env', function(name) {
|
|
705
|
-
var val = getSetting(node, name, node._flow);
|
|
711
|
+
var val = getSetting(node, name, node ? node._flow : null);
|
|
706
712
|
if (typeof val !== 'undefined') {
|
|
707
713
|
return val;
|
|
708
714
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-red/util",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.1.0-beta.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"fs-extra": "10.1.0",
|
|
19
|
-
"i18next": "21.
|
|
19
|
+
"i18next": "21.10.0",
|
|
20
20
|
"json-stringify-safe": "5.0.1",
|
|
21
21
|
"jsonata": "1.8.6",
|
|
22
22
|
"lodash.clonedeep": "^4.5.0",
|
|
23
23
|
"moment": "2.29.4",
|
|
24
|
-
"moment-timezone": "0.5.
|
|
24
|
+
"moment-timezone": "0.5.39"
|
|
25
25
|
}
|
|
26
26
|
}
|