mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Compare commits
7 Commits
4.0.8
...
5004-icon-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba5c8d823d | ||
|
|
6b043d81a8 | ||
|
|
e2981f2970 | ||
|
|
804551000a | ||
|
|
254b6a1e23 | ||
|
|
3838e4e605 | ||
|
|
3da22882e9 |
@@ -1,4 +0,0 @@
|
||||
/Gruntfile.js
|
||||
/.git/*
|
||||
*.backup
|
||||
/public/*
|
||||
@@ -1,4 +1,4 @@
|
||||
#### 4.0.7: Maintenance Release
|
||||
#### 4.0.8: Maintenance Release
|
||||
|
||||
Editor
|
||||
|
||||
|
||||
16
nodemon.json
Normal file
16
nodemon.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"ignoreRoot": [
|
||||
".git",
|
||||
".nyc_output",
|
||||
".sass-cache",
|
||||
"bower-components",
|
||||
"coverage"
|
||||
],
|
||||
"ignore": [
|
||||
"/Gruntfile.js",
|
||||
"/.git/*",
|
||||
"*.backup",
|
||||
"/public/*"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -245,10 +245,15 @@ RED.library = (function() {
|
||||
if (lib.types && lib.types.indexOf(options.url) === -1) {
|
||||
return;
|
||||
}
|
||||
let icon = 'fa fa-hdd-o';
|
||||
if (lib.icon) {
|
||||
const fullIcon = RED.utils.separateIconPath(lib.icon);
|
||||
icon = (fullIcon.module==="font-awesome"?"fa ":"")+fullIcon.file;
|
||||
}
|
||||
listing.push({
|
||||
library: lib.id,
|
||||
type: options.url,
|
||||
icon: lib.icon || 'fa fa-hdd-o',
|
||||
icon,
|
||||
label: RED._(lib.label||lib.id),
|
||||
path: "",
|
||||
expanded: true,
|
||||
@@ -303,10 +308,15 @@ RED.library = (function() {
|
||||
if (lib.types && lib.types.indexOf(options.url) === -1) {
|
||||
return;
|
||||
}
|
||||
let icon = 'fa fa-hdd-o';
|
||||
if (lib.icon) {
|
||||
const fullIcon = RED.utils.separateIconPath(lib.icon);
|
||||
icon = (fullIcon.module==="font-awesome"?"fa ":"")+fullIcon.file;
|
||||
}
|
||||
listing.push({
|
||||
library: lib.id,
|
||||
type: options.url,
|
||||
icon: lib.icon || 'fa fa-hdd-o',
|
||||
icon,
|
||||
label: RED._(lib.label||lib.id),
|
||||
path: "",
|
||||
expanded: true,
|
||||
|
||||
@@ -352,7 +352,9 @@ module.exports = function(RED) {
|
||||
if (msgs.length === 0) {
|
||||
done()
|
||||
} else {
|
||||
drainMessageGroup(msgs,count,done);
|
||||
setImmediate(() => {
|
||||
drainMessageGroup(msgs,count,done);
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -505,7 +507,9 @@ module.exports = function(RED) {
|
||||
if (err) {
|
||||
node.error(err,nextMsg);
|
||||
}
|
||||
processMessageQueue()
|
||||
setImmediate(() => {
|
||||
processMessageQueue()
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -719,6 +719,14 @@ class Flow {
|
||||
});
|
||||
}
|
||||
|
||||
getContext(scope) {
|
||||
if (scope === 'flow') {
|
||||
return this.context
|
||||
} else if (scope === 'global') {
|
||||
return context.get('global')
|
||||
}
|
||||
}
|
||||
|
||||
dump() {
|
||||
console.log("==================")
|
||||
console.log(this.TYPE, this.id);
|
||||
|
||||
@@ -49,6 +49,14 @@ class Group {
|
||||
}
|
||||
return this.parent.getSetting(key);
|
||||
}
|
||||
|
||||
error(msg) {
|
||||
this.parent.error(msg);
|
||||
}
|
||||
|
||||
getContext(scope) {
|
||||
return this.parent.getContext(scope);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -100,7 +100,24 @@ async function evaluateEnvProperties(flow, env, credentials) {
|
||||
}
|
||||
} else if (type ==='jsonata') {
|
||||
pendingEvaluations.push(new Promise((resolve, _) => {
|
||||
redUtil.evaluateNodeProperty(value, 'jsonata', {_flow: flow}, null, (err, result) => {
|
||||
redUtil.evaluateNodeProperty(value, 'jsonata',{
|
||||
// Fake a node object to provide access to _flow and context
|
||||
_flow: flow,
|
||||
context: () => {
|
||||
return {
|
||||
flow: {
|
||||
get: (value, store, callback) => {
|
||||
return flow.getContext('flow').get(value, store, callback)
|
||||
}
|
||||
},
|
||||
global: {
|
||||
get: (value, store, callback) => {
|
||||
return flow.getContext('global').get(value, store, callback)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, null, (err, result) => {
|
||||
if (!err) {
|
||||
if (typeof result === 'object') {
|
||||
result = { value: result, __clone__: true}
|
||||
|
||||
Reference in New Issue
Block a user