@verdaccio/local-storage
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -215,2 +215,5 @@ 'use strict'; | ||
var file = _fs2.default.createWriteStream(temporalName); | ||
var removeTempFile = function removeTempFile() { | ||
return _fs2.default.unlink(temporalName, function () {}); | ||
}; | ||
var opened = false; | ||
@@ -238,2 +241,3 @@ uploadStream.pipe(file); | ||
}; | ||
uploadStream.abort = function () { | ||
@@ -243,7 +247,11 @@ if (opened) { | ||
file.on('close', function () { | ||
_fs2.default.unlink(temporalName, function () {}); | ||
removeTempFile(); | ||
}); | ||
} else { | ||
// if the file does not recieve any byte never is opened and has to be removed anyway. | ||
removeTempFile(); | ||
} | ||
file.end(); | ||
}; | ||
file.on('open', function () { | ||
@@ -250,0 +258,0 @@ opened = true; |
{ | ||
"name": "@verdaccio/local-storage", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "local storage implementation", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"release": "standard-version -a -s", | ||
"test": "npm run flow && npm run lint && jest", | ||
@@ -41,19 +42,5 @@ "lint": "eslint .", | ||
"jest": "21.2.1", | ||
"nyc": "11.1.0", | ||
"standard-version": "4.3.0", | ||
"rmdir-sync": "1.0.1" | ||
}, | ||
"nyc": { | ||
"include": [ | ||
"src/**/*.js" | ||
], | ||
"all": true, | ||
"cache": true, | ||
"sourceMap": false, | ||
"instrument": false, | ||
"report-dir": "./tests-report", | ||
"reporter": [ | ||
"text", | ||
"html" | ||
] | ||
}, | ||
"publishConfig": { | ||
@@ -60,0 +47,0 @@ "registry": "https://registry.npmjs.org/" |
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
21714
10
526