@verdaccio/local-storage
Advanced tools
Comparing version 2.0.0-beta.1 to 2.0.0-beta.2
@@ -5,2 +5,13 @@ # Change Log | ||
<a name="2.0.0-beta.2"></a> | ||
# [2.0.0-beta.2](https://github.com/verdaccio/local-storage/compare/v2.0.0-beta.1...v2.0.0-beta.2) (2019-02-24) | ||
### Bug Fixes | ||
* avoid open write stream if resource exist [#1191](https://github.com/verdaccio/local-storage/issues/1191) ([b13904a](https://github.com/verdaccio/local-storage/commit/b13904a)) | ||
* package.json to reduce vulnerabilities ([97e9dc3](https://github.com/verdaccio/local-storage/commit/97e9dc3)) | ||
<a name="2.0.0-beta.1"></a> | ||
@@ -7,0 +18,0 @@ # [2.0.0-beta.1](https://github.com/verdaccio/local-storage/compare/v2.0.0-beta.0...v2.0.0-beta.1) (2019-02-03) |
@@ -192,56 +192,56 @@ "use strict"; | ||
uploadStream.emit('error', fSError(fileExist)); | ||
} | ||
} else { | ||
const temporalName = _path.default.join(this.path, `${name}.tmp-${String(Math.random()).replace(/^0\./, '')}`); | ||
const temporalName = _path.default.join(this.path, `${name}.tmp-${String(Math.random()).replace(/^0\./, '')}`); | ||
const file = _fs.default.createWriteStream(temporalName); | ||
const file = _fs.default.createWriteStream(temporalName); | ||
const removeTempFile = () => _fs.default.unlink(temporalName, function () {}); | ||
const removeTempFile = () => _fs.default.unlink(temporalName, function () {}); | ||
let opened = false; | ||
uploadStream.pipe(file); | ||
let opened = false; | ||
uploadStream.pipe(file); | ||
uploadStream.done = function () { | ||
const onend = function () { | ||
file.on('close', function () { | ||
renameTmp(temporalName, pathName, function (err) { | ||
if (err) { | ||
uploadStream.emit('error', err); | ||
} else { | ||
uploadStream.emit('success'); | ||
} | ||
}); | ||
}); | ||
file.end(); | ||
}; | ||
uploadStream.done = function () { | ||
const onend = function () { | ||
file.on('close', function () { | ||
renameTmp(temporalName, pathName, function (err) { | ||
if (err) { | ||
uploadStream.emit('error', err); | ||
} else { | ||
uploadStream.emit('success'); | ||
} | ||
}); | ||
}); | ||
file.end(); | ||
if (_ended) { | ||
onend(); | ||
} else { | ||
uploadStream.on('end', onend); | ||
} | ||
}; | ||
if (_ended) { | ||
onend(); | ||
} else { | ||
uploadStream.on('end', onend); | ||
} | ||
}; | ||
uploadStream.abort = function () { | ||
if (opened) { | ||
opened = false; | ||
file.on('close', function () { | ||
uploadStream.abort = function () { | ||
if (opened) { | ||
opened = false; | ||
file.on('close', function () { | ||
removeTempFile(); | ||
}); | ||
} else { | ||
// if the file does not recieve any byte never is opened and has to be removed anyway. | ||
removeTempFile(); | ||
}); | ||
} else { | ||
// if the file does not recieve any byte never is opened and has to be removed anyway. | ||
removeTempFile(); | ||
} | ||
} | ||
file.end(); | ||
}; | ||
file.end(); | ||
}; | ||
file.on('open', function () { | ||
opened = true; // re-emitting open because it's handled in storage.js | ||
file.on('open', function () { | ||
opened = true; // re-emitting open because it's handled in storage.js | ||
uploadStream.emit('open'); | ||
}); | ||
file.on('error', function (err) { | ||
uploadStream.emit('error', err); | ||
}); | ||
uploadStream.emit('open'); | ||
}); | ||
file.on('error', function (err) { | ||
uploadStream.emit('error', err); | ||
}); | ||
} | ||
}); | ||
@@ -363,2 +363,2 @@ | ||
exports.default = LocalFS; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9sb2NhbC1mcy50cyJdLCJuYW1lcyI6WyJmaWxlRXhpc3QiLCJub1N1Y2hGaWxlIiwicmVzb3VyY2VOb3RBdmFpbGFibGUiLCJwa2dGaWxlTmFtZSIsImZTRXJyb3IiLCJtZXNzYWdlIiwiY29kZSIsImVyciIsIkVycm9yQ29kZSIsImdldDUwMyIsImdldDQwNCIsInRlbXBGaWxlIiwic3RyIiwiU3RyaW5nIiwiTWF0aCIsInJhbmRvbSIsInN1YnN0ciIsInJlbmFtZVRtcCIsInNyYyIsImRzdCIsIl9jYiIsImNiIiwiZnMiLCJ1bmxpbmsiLCJwcm9jZXNzIiwicGxh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mlyc3RcbiAgICAgIGNvbnN0IHVuTG9ja0NhbGxiYWNrID0gZnVuY3Rpb24obG9ja0Vycm9yOiBFcnJvcikge1xuICAgICAgICBjb25zdCBfYXJncyA9IGFyZ3VtZW50cztcblxuICAgICAgICBpZiAobG9ja2VkKSB7XG4gICAgICAgICAgc2VsZi5fdW5sb2NrSlNPTihwa2dGaWxlTmFtZSwgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAvLyBpZ25vcmUgYW55IGVycm9yIGZyb20gdGhlIHVubG9ja1xuICAgICAgICAgICAgb25FbmQuYXBwbHkobG9ja0Vycm9yLCBfYXJncyk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgb25FbmQoLi4uX2FyZ3MpO1xuICAgICAgICB9XG4gICAgICB9O1xuXG4gICAgICBpZiAoIWVycikge1xuICAgICAgICBsb2NrZWQgPSB0cnVlO1xuICAgICAgfVxuXG4gICAgICBpZiAoXy5pc05pbChlcnIpID09PSBmYWxzZSkge1xuICAgICAgICBpZiAoZXJyLmNvZGUgPT09IHJlc291cmNlTm90QXZhaWxhYmxlKSB7XG4gICAgICAgICAgcmV0dXJuIHVuTG9ja0NhbGxiYWNrKEVycm9yQ29kZS5nZXQ1MDMoKSk7XG4gICAgICAgIH0gZWxzZSBpZiAoZXJyLmNvZGUgPT09IG5vU3VjaEZpbGUpIHtcbiAgICAgICAgICByZXR1cm4gdW5Mb2NrQ2FsbGJhY2soRXJyb3JDb2RlLmdldDQwNCgpKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXR1cm4gdW5Mb2NrQ2FsbGJhY2soZXJyKTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICB1cGRhdGVIYW5kbGVyKGpzb24sIGVyciA9PiB7XG4gICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICByZXR1cm4gdW5Mb2NrQ2FsbGJhY2soZXJyKTtcbiAgICAgICAgfVxuICAgICAgICBvbldy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G4gICAgICB9IGVsc2Uge1xuICAgICAgICBjYihlcnIpO1xuICAgICAgfVxuICAgIH0pO1xuICB9XG5cbiAgX2xvY2tBbmRSZWFkSlNPTihuYW1lOiBzdHJpbmcsIGNiOiBGdW5jdGlvbikge1xuICAgIGNvbnN0IGZpbGVOYW1lOiBzdHJpbmcgPSB0aGlzLl9nZXRTdG9yYWdlKG5hbWUpO1xuXG4gICAgcmVhZEZpbGUoXG4gICAgICBmaWxlTmFtZSxcbiAgICAgIHtcbiAgICAgICAgbG9jazogdHJ1ZSxcbiAgICAgICAgcGFyc2U6IHRydWVcbiAgICAgIH0sXG4gICAgICBmdW5jdGlvbihlcnIsIHJlcykge1xuICAgICAgICBpZiAoZXJyKSB7XG4gICAgICAgICAgcmV0dXJuIGNiKGVycik7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGNiKG51bGwsIHJlcyk7XG4gICAgICB9XG4gICAgKTtcbiAgfVxuXG4gIF91bmxvY2tKU09OKG5hbWU6IHN0cmluZywgY2I6IEZ1bmN0aW9uKSB7XG4gICAgdW5sb2NrRmlsZSh0aGlzLl9nZXRTdG9yYWdlKG5hbWUpLCBjYik7XG4gIH1cbn1cbiJdfQ== | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9sb2NhbC1mcy50cyJdLCJuYW1lcyI6WyJmaWxlRXhpc3QiLCJub1N1Y2hGaWxlIiwicmVzb3VyY2VOb3RBdmFpbGFibGUiLCJwa2dGaWxlTmFtZSIsImZTRXJyb3IiLCJtZXNzYWdlIiwiY29kZSIsImVyciIsIkVycm9yQ29kZSIsImdldDUwMyIsImdldDQwNCIsInRlbXBGaWxlIiwic3RyIiwiU3RyaW5nIiwiTWF0aCIsInJhbmRvbSIsInN1YnN0ciIsInJlbmFtZVRtcCIsInNyYyIsImRzdCIsIl9jYiIsImNiIiwiZnMiLCJ1bmxpbmsiLCJwcm9jZXNzIiwicG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A9ICgpID0+IGZzLnVubGluayh0ZW1wb3JhbE5hbWUsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgfSk7XG4gICAgICAgIGxldCBvcGVuZWQgPSBmYWxzZTtcbiAgICAgICAgdXBsb2FkU3RyZWFtLnBpcGUoZmlsZSk7XG5cbiAgICAgICAgdXBsb2FkU3RyZWFtLmRvbmUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBjb25zdCBvbmVuZCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBmaWxlLm9uKCdjbG9zZScsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVuYW1lVG1wKHRlbXBvcmFsTmFtZSwgcGF0aE5hbWUsIGZ1bmN0aW9uIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGxvYWRTdHJlYW0uZW1pdCgnZXJyb3InLCBlcnIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGxvYWRTdHJlYW0uZW1pdCgnc3VjY2VzcycpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBmaWxlLmVuZCgpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGlmIChfZW5kZWQpIHtcbiAgICAgICAgICAgICAgICBvbmVuZCgpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB1cGxvYWRTdHJlYW0ub24oJ2VuZCcsIG9uZW5kKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB1cGxvYWRTdHJlYW0uYWJvcnQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBpZiAob3BlbmVkKSB7XG4g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VuYW1lVG1wKHRlbXBGaWxlUGF0aCwgZGVzdCwgY2IpO1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGNyZWF0ZVRlbXBGaWxlKGVyciA9PiB7XG4gICAgICBpZiAoZXJyICYmIGVyci5jb2RlID09PSBub1N1Y2hGaWxlKSB7XG4gICAgICAgIG1rZGlycChwYXRoLmRpcm5hbWUoZGVzdCksIGZ1bmN0aW9uKGVycikge1xuICAgICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICAgIHJldHVybiBjYihlcnIpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBjcmVhdGVUZW1wRmlsZShjYik7XG4gICAgICAgIH0pO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgY2IoZXJyKTtcbiAgICAgIH1cbiAgICB9KTtcbiAgfVxuXG4gIF9sb2NrQW5kUmVhZEpTT04obmFtZTogc3RyaW5nLCBjYjogRnVuY3Rpb24pIHtcbiAgICBjb25zdCBmaWxlTmFtZTogc3RyaW5nID0gdGhpcy5fZ2V0U3RvcmFnZShuYW1lKTtcblxuICAgIHJlYWRGaWxlKFxuICAgICAgZmlsZU5hbWUsXG4gICAgICB7XG4gICAgICAgIGxvY2s6IHRydWUsXG4gICAgICAgIHBhcnNlOiB0cnVlXG4gICAgICB9LFxuICAgICAgZnVuY3Rpb24oZXJyLCByZXMpIHtcbiAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgIHJldHVybiBjYihlcnIpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBjYihudWxsLCByZXMpO1xuICAgICAgfVxuICAgICk7XG4gIH1cblxuICBfdW5sb2NrSlNPTihuYW1lOiBzdHJpbmcsIGNiOiBGdW5jdGlvbikge1xuICAgIHVubG9ja0ZpbGUodGhpcy5fZ2V0U3RvcmFnZShuYW1lKSwgY2IpO1xuICB9XG59XG4iXX0= |
{ | ||
"name": "@verdaccio/local-storage", | ||
"version": "2.0.0-beta.1", | ||
"version": "2.0.0-beta.2", | ||
"description": "local storage implementation", | ||
@@ -21,5 +21,5 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@verdaccio/file-locking": "0.0.7", | ||
"@verdaccio/file-locking": "0.0.8", | ||
"@verdaccio/streams": "2.0.0-beta.0", | ||
"async": "2.6.1", | ||
"async": "3.0.1-0", | ||
"http-errors": "1.7.1", | ||
@@ -30,13 +30,13 @@ "lodash": "4.17.11", | ||
"devDependencies": { | ||
"@commitlint/cli": "7.5.0", | ||
"@commitlint/cli": "7.5.2", | ||
"@commitlint/config-conventional": "7.5.0", | ||
"@types/http-errors": "1.6.1", | ||
"@types/jest": "23.3.13", | ||
"@types/lodash": "^4.14.120", | ||
"@types/jest": "24.0.4", | ||
"@types/lodash": "^4.14.121", | ||
"@types/minimatch": "^3.0.3", | ||
"@types/node": "10.12.21", | ||
"@typescript-eslint/eslint-plugin": "1.2.0", | ||
"@types/node": "11.9.4", | ||
"@typescript-eslint/eslint-plugin": "1.3.0", | ||
"@verdaccio/babel-preset": "0.0.4", | ||
"@verdaccio/types": "5.0.0-beta.1", | ||
"codecov": "3.1.0", | ||
"codecov": "3.2.0", | ||
"cross-env": "5.2.0", | ||
@@ -46,8 +46,8 @@ "eslint": "5.13.0", | ||
"eslint-config-prettier": "4.0.0", | ||
"eslint-plugin-jest": "22.2.2", | ||
"eslint-plugin-jest": "22.3.0", | ||
"eslint-plugin-prettier": "3.0.1", | ||
"husky": "0.14.3", | ||
"jest": "24.0.0", | ||
"jest": "24.1.0", | ||
"minimatch": "3.0.4", | ||
"prettier": "1.16.3", | ||
"prettier": "1.16.4", | ||
"rmdir-sync": "1.0.1", | ||
@@ -54,0 +54,0 @@ "standard-version": "4.4.0", |
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
148495
46
2228
+ Added@verdaccio/file-locking@0.0.8(transitive)
+ Addedasync@3.0.1-0(transitive)
+ Addedlockfile@1.0.4(transitive)
+ Addedsignal-exit@3.0.7(transitive)
- Removed@verdaccio/file-locking@0.0.7(transitive)
- Removedasync@2.6.1(transitive)
- Removedlockfile@1.0.3(transitive)
- Removedlodash@4.17.10(transitive)
Updatedasync@3.0.1-0