Merge pull request #3371 from node-red/node-alias

Add _path property to nodes and expose as node.path in Function node
This commit is contained in:
Nick O'Leary
2022-01-26 11:10:43 +00:00
committed by GitHub
4 changed files with 29 additions and 19 deletions

View File

@@ -112,6 +112,7 @@ module.exports = function(RED) {
"var node = {"+
"id:__node__.id,"+
"name:__node__.name,"+
"path:__node__.path,"+
"outputCount:__node__.outputCount,"+
"log:__node__.log,"+
"error:__node__.error,"+
@@ -163,6 +164,7 @@ module.exports = function(RED) {
__node__: {
id: node.id,
name: node.name,
path: node._path,
outputCount: node.outputs,
log: function() {
node.log.apply(node, arguments);
@@ -344,6 +346,7 @@ module.exports = function(RED) {
var node = {
id:__node__.id,
name:__node__.name,
path:__node__.path,
outputCount:__node__.outputCount,
log:__node__.log,
error:__node__.error,
@@ -366,6 +369,7 @@ module.exports = function(RED) {
var node = {
id:__node__.id,
name:__node__.name,
path:__node__.path,
outputCount:__node__.outputCount,
log:__node__.log,
error:__node__.error,