Socket
Socket
Sign inDemoInstall

@node-red/runtime

Package Overview
Dependencies
Maintainers
2
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@node-red/runtime - npm Package Compare versions

Comparing version 3.1.0-beta.4 to 3.1.0

2

lib/flows/Subflow.js

@@ -482,3 +482,3 @@ /**

}
if ((node.type === 'complete' || node.type === 'catch' || node.type === 'status') && node.scope) {
if ((node.type === 'complete' || node.type === 'catch' || node.type === 'status') && Array.isArray(node.scope)) {
node.scope = node.scope.map(function(id) {

@@ -485,0 +485,0 @@ return nodeMap[id]?nodeMap[id].id:""

@@ -434,3 +434,3 @@ /**

pull: function(cwd,remote,branch,allowUnrelatedHistories,auth,gitUser) {
var args = ["pull"];
var args = ["pull", "--no-rebase"];
if (remote && branch) {

@@ -437,0 +437,0 @@ args.push(remote);

@@ -74,2 +74,4 @@ /**

const writeFileLocks = {}
module.exports = {

@@ -81,20 +83,18 @@ /**

*/
writeFile: function(path,content,backupPath) {
var backupPromise;
if (backupPath && fs.existsSync(path)) {
backupPromise = fs.copy(path,backupPath);
} else {
backupPromise = Promise.resolve();
writeFile: async function(path,content,backupPath) {
if (!writeFileLocks[path]) {
writeFileLocks[path] = Promise.resolve()
}
const result = writeFileLocks[path].then(async () => {
var backupPromise;
if (backupPath && fs.existsSync(path)) {
await fs.copy(path,backupPath);
log.trace(`utils.writeFile - copied ${path} TO ${backupPath}`)
}
const dirname = fspath.dirname(path);
const tempFile = `${path}.$$$`;
const dirname = fspath.dirname(path);
const tempFile = `${path}.$$$`;
await fs.ensureDir(dirname)
return backupPromise.then(() => {
if (backupPath) {
log.trace(`utils.writeFile - copied ${path} TO ${backupPath}`)
}
return fs.ensureDir(dirname)
}).then(() => {
return new Promise(function(resolve,reject) {
await new Promise(function(resolve,reject) {
var stream = fs.createWriteStream(tempFile);

@@ -115,6 +115,7 @@ stream.on('open',function(fd) {

});
});
}).then(() => {
})
log.trace(`utils.writeFile - written content to ${tempFile}`)
return new Promise(function(resolve,reject) {
await new Promise(function(resolve,reject) {
fs.rename(tempFile,path,err => {

@@ -128,4 +129,6 @@ if (err) {

})
});
});
})
})
writeFileLocks[path] = result.catch(() => {})
return result
},

@@ -132,0 +135,0 @@ readFile: readFile,

@@ -167,2 +167,2 @@ {

}
}
}
{
"name": "@node-red/runtime",
"version": "3.1.0-beta.4",
"version": "3.1.0",
"license": "Apache-2.0",

@@ -19,4 +19,4 @@ "main": "./lib/index.js",

"dependencies": {
"@node-red/registry": "3.1.0-beta.4",
"@node-red/util": "3.1.0-beta.4",
"@node-red/registry": "3.1.0",
"@node-red/util": "3.1.0",
"async-mutex": "0.4.0",

@@ -23,0 +23,0 @@ "clone": "2.1.2",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc