mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9ec7bb8d41 | ||
|
2b9bfbc309 | ||
|
e50d04077b | ||
|
b6fcaacb77 |
@@ -1,3 +1,11 @@
|
||||
#### 0.14.3: Maintenance Release
|
||||
|
||||
Fixes
|
||||
|
||||
- Create default setting.js in user-specified directory. Fixes #908
|
||||
- MQTT In subscription qos not defaulting properly
|
||||
- Let exec node handle 0 as well as "0"
|
||||
|
||||
#### 0.14.2: Maintenance Release
|
||||
|
||||
Fixes
|
||||
|
@@ -29,6 +29,7 @@ module.exports = function(RED) {
|
||||
this.useSpawn = n.useSpawn;
|
||||
this.timer = Number(n.timer || 0)*1000;
|
||||
this.activeProcesses = {};
|
||||
var node = this;
|
||||
|
||||
var cleanup = function(p) {
|
||||
//console.log("CLEANUP!!!",p);
|
||||
@@ -37,7 +38,6 @@ module.exports = function(RED) {
|
||||
node.error("Exec node timeout");
|
||||
}
|
||||
|
||||
var node = this;
|
||||
this.on("input", function(msg) {
|
||||
var child;
|
||||
node.status({fill:"blue",shape:"dot",text:" "});
|
||||
@@ -45,8 +45,8 @@ module.exports = function(RED) {
|
||||
// make the extra args into an array
|
||||
// then prepend with the msg.payload
|
||||
var arg = node.cmd;
|
||||
if (node.addpay) { arg += " "+msg.payload; }
|
||||
arg += " "+node.append;
|
||||
if ((node.addpay === true) && msg.hasOwnProperty("payload")) { arg += " "+msg.payload; }
|
||||
if (node.append.trim() !== "") { arg += " "+node.append; }
|
||||
// slice whole line by spaces (trying to honour quotes);
|
||||
arg = arg.match(/(?:[^\s"]+|"[^"]*")+/g);
|
||||
var cmd = arg.shift();
|
||||
@@ -88,7 +88,7 @@ module.exports = function(RED) {
|
||||
}
|
||||
else {
|
||||
var cl = node.cmd;
|
||||
if ((node.addpay === true) && ((msg.payload || "").toString().trim() !== "")) { cl += " "+msg.payload; }
|
||||
if ((node.addpay === true) && msg.hasOwnProperty("payload")) { cl += " "+msg.payload; }
|
||||
if (node.append.trim() !== "") { cl += " "+node.append; }
|
||||
/* istanbul ignore else */
|
||||
if (RED.settings.verbose) { node.log(cl); }
|
||||
|
@@ -314,8 +314,10 @@ module.exports = function(RED) {
|
||||
function MQTTInNode(n) {
|
||||
RED.nodes.createNode(this,n);
|
||||
this.topic = n.topic;
|
||||
this.qos = parseInt(n.qos===undefined?"2":n.qos);
|
||||
|
||||
this.qos = parseInt(n.qos);
|
||||
if (isNaN(this.qos) || this.qos < 0 || this.qos > 2) {
|
||||
this.qos = 2;
|
||||
}
|
||||
this.broker = n.broker;
|
||||
this.brokerConn = RED.nodes.getNode(this.broker);
|
||||
if (!/^(#$|(\+|[^+#]*)(\/(\+|[^+#]*))*(\/(\+|#|[^+#]*))?$)/.test(this.topic)) {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "node-red",
|
||||
"version" : "0.14.2",
|
||||
"version" : "0.14.3",
|
||||
"description" : "A visual tool for wiring the Internet of Things",
|
||||
"homepage" : "http://nodered.org",
|
||||
"license" : "Apache-2.0",
|
||||
|
2
red.js
2
red.js
@@ -81,7 +81,7 @@ if (parsedArgs.settings) {
|
||||
// NODE_RED_HOME contains user data - use its settings.js
|
||||
settingsFile = path.join(process.env.NODE_RED_HOME,"settings.js");
|
||||
} else {
|
||||
var userDir = path.join(parsedArgs.userDir || process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE,".node-red");
|
||||
var userDir = parsedArgs.userDir || path.join(process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE,".node-red");
|
||||
var userSettingsFile = path.join(userDir,"settings.js");
|
||||
if (fs.existsSync(userSettingsFile)) {
|
||||
// $HOME/.node-red/settings.js exists
|
||||
|
Reference in New Issue
Block a user