@node-red/util 2.2.0-beta.1 → 2.2.0
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/LICENSE +1 -1
- package/lib/util.js +11 -0
- package/package.json +2 -2
package/LICENSE
CHANGED
package/lib/util.js
CHANGED
|
@@ -522,6 +522,17 @@ function setObjectProperty(msg,prop,value,createMissing) {
|
|
|
522
522
|
* @return {String} value of env var
|
|
523
523
|
*/
|
|
524
524
|
function getSetting(node, name, flow_) {
|
|
525
|
+
if (node) {
|
|
526
|
+
if (name === "NR_NODE_NAME") {
|
|
527
|
+
return node.name;
|
|
528
|
+
}
|
|
529
|
+
if (name === "NR_NODE_ID") {
|
|
530
|
+
return node.id;
|
|
531
|
+
}
|
|
532
|
+
if (name === "NR_NODE_PATH") {
|
|
533
|
+
return node._path;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
525
536
|
var flow = (flow_ ? flow_ : (node ? node._flow : null));
|
|
526
537
|
if (flow) {
|
|
527
538
|
if (node && node.g) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-red/util",
|
|
3
|
-
"version": "2.2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"fs-extra": "10.0.0",
|
|
19
|
-
"i18next": "21.6.
|
|
19
|
+
"i18next": "21.6.10",
|
|
20
20
|
"json-stringify-safe": "5.0.1",
|
|
21
21
|
"jsonata": "1.8.5",
|
|
22
22
|
"lodash.clonedeep": "^4.5.0",
|