@vtex/api
Advanced tools
Comparing version
@@ -15,4 +15,10 @@ 'use strict'; | ||
var _streamToPromise = require('stream-to-promise'); | ||
var _streamToPromise2 = _interopRequireDefault(_streamToPromise); | ||
var _baseClient = require('./baseClient'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
Function.prototype.$asyncbind = function $asyncbind(self, catcher) { | ||
@@ -416,5 +422,7 @@ "use strict"; | ||
unpackAppBundle: (app, bundlePath, unpackPath, generatePackageJson) => new Promise(function ($return, $error) { | ||
var stream; | ||
return apps.getAppBundle(app, bundlePath, generatePackageJson).then(function ($await_1) { | ||
$await_1.pipe((0, _zlib.createGunzip)()).pipe((0, _tarFs.extract)(unpackPath)); | ||
return $return(); | ||
stream = $await_1; | ||
return $return((0, _streamToPromise2.default)(stream.pipe((0, _zlib.createGunzip)()).pipe((0, _tarFs.extract)(unpackPath)))); | ||
}.$asyncbind(this, $error), $error); | ||
@@ -421,0 +429,0 @@ }.$asyncbind(this)), |
@@ -19,2 +19,6 @@ 'use strict'; | ||
var _streamToPromise = require('stream-to-promise'); | ||
var _streamToPromise2 = _interopRequireDefault(_streamToPromise); | ||
var _baseClient = require('./baseClient'); | ||
@@ -388,5 +392,7 @@ | ||
unpackAppBundle: (app, version, bundlePath, unpackPath, generatePackageJson) => new Promise(function ($return, $error) { | ||
var stream; | ||
return registry.getAppBundle(app, version, bundlePath, generatePackageJson).then(function ($await_1) { | ||
$await_1.pipe((0, _zlib.createGunzip)()).pipe((0, _tarFs.extract)(unpackPath)); | ||
return $return(); | ||
stream = $await_1; | ||
return $return((0, _streamToPromise2.default)(stream.pipe((0, _zlib.createGunzip)()).pipe((0, _tarFs.extract)(unpackPath)))); | ||
}.$asyncbind(this, $error), $error); | ||
@@ -393,0 +399,0 @@ }.$asyncbind(this)) |
{ | ||
"name": "@vtex/api", | ||
"version": "0.21.3", | ||
"version": "0.21.4", | ||
"description": "VTEX I/O API client", | ||
@@ -35,2 +35,3 @@ "main": "./lib/index.js", | ||
"multipart-stream": "^2.0.1", | ||
"stream-to-promise": "^2.2.0", | ||
"tar-fs": "^1.15.3" | ||
@@ -37,0 +38,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
235926
18.86%40
21.21%1052
0.19%0
-100%7
16.67%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed