@node-red/runtime
Advanced tools
Comparing version 3.1.0-beta.4 to 3.1.0
@@ -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", |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
13760
1
595886
+ Added@node-red/registry@3.1.0(transitive)
+ Added@node-red/util@3.1.0(transitive)
+ Addedsemver@7.5.4(transitive)
- Removed@node-red/registry@3.1.0-beta.4(transitive)
- Removed@node-red/util@3.1.0-beta.4(transitive)
- Removedsemver@7.5.0(transitive)
Updated@node-red/registry@3.1.0
Updated@node-red/util@3.1.0