@node-red/runtime
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -203,2 +203,5 @@ /** | ||
// if msg.status exists | ||
if (msg.status.hasOwnProperty("text") && msg.status.text.indexOf("common.") === 0) { | ||
msg.status.text = "node-red:"+msg.status.text; | ||
} | ||
self.node.status(msg.status) | ||
@@ -314,3 +317,2 @@ } | ||
} | ||
super.start(diff); | ||
@@ -440,3 +442,2 @@ } | ||
} | ||
} | ||
@@ -443,0 +444,0 @@ |
@@ -227,3 +227,3 @@ /** | ||
} catch(err) { | ||
node.error(err,msg); | ||
node.error(err,arg); | ||
} | ||
@@ -230,0 +230,0 @@ } |
@@ -59,4 +59,5 @@ /** | ||
flowsFile = settings.flowFile; | ||
// handle Unix and Windows "C:\" | ||
if ((flowsFile[0] == "/") || (flowsFile[1] == ":")) { | ||
// handle Unix and Windows "C:\" and Windows "\\" for UNC. | ||
if (fspath.isAbsolute(flowsFile)) { | ||
//if (((flowsFile[0] == "\\") && (flowsFile[1] == "\\")) || (flowsFile[0] == "/") || (flowsFile[1] == ":")) { | ||
// Absolute path | ||
@@ -63,0 +64,0 @@ flowsFullPath = flowsFile; |
@@ -18,2 +18,3 @@ /** | ||
var fs = require('fs-extra'); | ||
var fspath = require('path'); | ||
var when = require('when'); | ||
@@ -83,3 +84,3 @@ var nodeFn = require('when/node/function'); | ||
writeFile: function(path,content,backupPath) { | ||
if (backupPath) { | ||
if (backupPath) { | ||
if (fs.existsSync(path)) { | ||
@@ -90,16 +91,22 @@ fs.renameSync(path,backupPath); | ||
return when.promise(function(resolve,reject) { | ||
var stream = fs.createWriteStream(path); | ||
stream.on('open',function(fd) { | ||
stream.write(content,'utf8',function() { | ||
fs.fsync(fd,function(err) { | ||
if (err) { | ||
log.warn(log._("storage.localfilesystem.fsync-fail",{path: path, message: err.toString()})); | ||
} | ||
stream.end(resolve); | ||
fs.ensureDir(fspath.dirname(path), (err)=>{ | ||
if (err) { | ||
reject(err); | ||
return; | ||
} | ||
var stream = fs.createWriteStream(path); | ||
stream.on('open',function(fd) { | ||
stream.write(content,'utf8',function() { | ||
fs.fsync(fd,function(err) { | ||
if (err) { | ||
log.warn(log._("storage.localfilesystem.fsync-fail",{path: path, message: err.toString()})); | ||
} | ||
stream.end(resolve); | ||
}); | ||
}); | ||
}); | ||
stream.on('error',function(err) { | ||
reject(err); | ||
}); | ||
}); | ||
stream.on('error',function(err) { | ||
reject(err); | ||
}); | ||
}); | ||
@@ -106,0 +113,0 @@ }, |
{ | ||
"name": "@node-red/runtime", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"license": "Apache-2.0", | ||
@@ -19,4 +19,4 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@node-red/registry": "1.0.2", | ||
"@node-red/util": "1.0.2", | ||
"@node-red/registry": "1.0.3", | ||
"@node-red/util": "1.0.3", | ||
"clone": "2.1.2", | ||
@@ -23,0 +23,0 @@ "express": "4.17.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
461714
11168
+ Added@node-red/registry@1.0.3(transitive)
+ Added@node-red/util@1.0.3(transitive)
+ Addedjsonata@1.7.0(transitive)
+ Addeduglify-js@3.6.9(transitive)
- Removed@node-red/registry@1.0.2(transitive)
- Removed@node-red/util@1.0.2(transitive)
- Removedjsonata@1.6.5(transitive)
- Removeduglify-js@3.6.0(transitive)
Updated@node-red/registry@1.0.3
Updated@node-red/util@1.0.3