@20minutes/s3-unzip-plus
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -1,2 +0,1 @@ | ||
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; | ||
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator"; | ||
@@ -29,33 +28,19 @@ import _regeneratorRuntime from "@babel/runtime/regenerator"; | ||
export default ( /*#__PURE__*/(function () { | ||
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(command) { | ||
var _command$opts$deleteO, _command$opts$copyMet, _command$opts$verbose; | ||
var bucket, file, targetBucket, targetFolder, _command$args; | ||
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) { | ||
var bucket, file, _ref$targetBucket, targetBucket, _ref$targetFolder, targetFolder, _ref$deleteOnSuccess, deleteOnSuccess, _ref$copyMetadata, copyMetadata, _ref$verbose, verbose; | ||
return _regeneratorRuntime.wrap(function _callee$(_context) { | ||
while (1) switch (_context.prev = _context.next) { | ||
case 0: | ||
if (command.args && command.args.length >= 2) { | ||
; | ||
_command$args = _slicedToArray(command.args, 4); | ||
bucket = _command$args[0]; | ||
file = _command$args[1]; | ||
targetBucket = _command$args[2]; | ||
targetFolder = _command$args[3]; | ||
} | ||
if (!targetBucket) { | ||
targetBucket = bucket; | ||
} | ||
if (!targetFolder) { | ||
targetFolder = ''; | ||
} | ||
_context.next = 5; | ||
bucket = _ref.bucket, file = _ref.file, _ref$targetBucket = _ref.targetBucket, targetBucket = _ref$targetBucket === void 0 ? null : _ref$targetBucket, _ref$targetFolder = _ref.targetFolder, targetFolder = _ref$targetFolder === void 0 ? null : _ref$targetFolder, _ref$deleteOnSuccess = _ref.deleteOnSuccess, deleteOnSuccess = _ref$deleteOnSuccess === void 0 ? false : _ref$deleteOnSuccess, _ref$copyMetadata = _ref.copyMetadata, copyMetadata = _ref$copyMetadata === void 0 ? false : _ref$copyMetadata, _ref$verbose = _ref.verbose, verbose = _ref$verbose === void 0 ? false : _ref$verbose; | ||
_context.next = 3; | ||
return decompress({ | ||
bucket: bucket, | ||
file: file, | ||
targetBucket: targetBucket, | ||
targetFolder: targetFolder, | ||
deleteOnSuccess: (_command$opts$deleteO = command.opts().deleteOnSuccess) !== null && _command$opts$deleteO !== void 0 ? _command$opts$deleteO : false, | ||
copyMetadata: (_command$opts$copyMet = command.opts().copyMetadata) !== null && _command$opts$copyMet !== void 0 ? _command$opts$copyMet : false, | ||
verbose: (_command$opts$verbose = command.opts().verbose) !== null && _command$opts$verbose !== void 0 ? _command$opts$verbose : false | ||
targetBucket: targetBucket !== null && targetBucket !== void 0 ? targetBucket : bucket, | ||
targetFolder: targetFolder !== null && targetFolder !== void 0 ? targetFolder : '', | ||
deleteOnSuccess: !!deleteOnSuccess, | ||
copyMetadata: !!copyMetadata, | ||
verbose: !!verbose | ||
}); | ||
case 5: | ||
case 3: | ||
case "end": | ||
@@ -67,7 +52,7 @@ return _context.stop(); | ||
return function (_x) { | ||
return _ref.apply(this, arguments); | ||
return _ref2.apply(this, arguments); | ||
}; | ||
})()); | ||
export var handler = /*#__PURE__*/function () { | ||
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(event) { | ||
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(event) { | ||
return _regeneratorRuntime.wrap(function _callee2$(_context2) { | ||
@@ -90,4 +75,4 @@ while (1) switch (_context2.prev = _context2.next) { | ||
return function handler(_x2) { | ||
return _ref2.apply(this, arguments); | ||
return _ref3.apply(this, arguments); | ||
}; | ||
}(); |
@@ -9,3 +9,2 @@ "use strict"; | ||
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); | ||
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")); | ||
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); | ||
@@ -36,33 +35,19 @@ var _util = require("./util.js"); | ||
var _default = exports["default"] = /*#__PURE__*/function () { | ||
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(command) { | ||
var _command$opts$deleteO, _command$opts$copyMet, _command$opts$verbose; | ||
var bucket, file, targetBucket, targetFolder, _command$args; | ||
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(_ref) { | ||
var bucket, file, _ref$targetBucket, targetBucket, _ref$targetFolder, targetFolder, _ref$deleteOnSuccess, deleteOnSuccess, _ref$copyMetadata, copyMetadata, _ref$verbose, verbose; | ||
return _regenerator["default"].wrap(function _callee$(_context) { | ||
while (1) switch (_context.prev = _context.next) { | ||
case 0: | ||
if (command.args && command.args.length >= 2) { | ||
; | ||
_command$args = (0, _slicedToArray2["default"])(command.args, 4); | ||
bucket = _command$args[0]; | ||
file = _command$args[1]; | ||
targetBucket = _command$args[2]; | ||
targetFolder = _command$args[3]; | ||
} | ||
if (!targetBucket) { | ||
targetBucket = bucket; | ||
} | ||
if (!targetFolder) { | ||
targetFolder = ''; | ||
} | ||
_context.next = 5; | ||
bucket = _ref.bucket, file = _ref.file, _ref$targetBucket = _ref.targetBucket, targetBucket = _ref$targetBucket === void 0 ? null : _ref$targetBucket, _ref$targetFolder = _ref.targetFolder, targetFolder = _ref$targetFolder === void 0 ? null : _ref$targetFolder, _ref$deleteOnSuccess = _ref.deleteOnSuccess, deleteOnSuccess = _ref$deleteOnSuccess === void 0 ? false : _ref$deleteOnSuccess, _ref$copyMetadata = _ref.copyMetadata, copyMetadata = _ref$copyMetadata === void 0 ? false : _ref$copyMetadata, _ref$verbose = _ref.verbose, verbose = _ref$verbose === void 0 ? false : _ref$verbose; | ||
_context.next = 3; | ||
return (0, _util.decompress)({ | ||
bucket: bucket, | ||
file: file, | ||
targetBucket: targetBucket, | ||
targetFolder: targetFolder, | ||
deleteOnSuccess: (_command$opts$deleteO = command.opts().deleteOnSuccess) !== null && _command$opts$deleteO !== void 0 ? _command$opts$deleteO : false, | ||
copyMetadata: (_command$opts$copyMet = command.opts().copyMetadata) !== null && _command$opts$copyMet !== void 0 ? _command$opts$copyMet : false, | ||
verbose: (_command$opts$verbose = command.opts().verbose) !== null && _command$opts$verbose !== void 0 ? _command$opts$verbose : false | ||
targetBucket: targetBucket !== null && targetBucket !== void 0 ? targetBucket : bucket, | ||
targetFolder: targetFolder !== null && targetFolder !== void 0 ? targetFolder : '', | ||
deleteOnSuccess: !!deleteOnSuccess, | ||
copyMetadata: !!copyMetadata, | ||
verbose: !!verbose | ||
}); | ||
case 5: | ||
case 3: | ||
case "end": | ||
@@ -74,7 +59,7 @@ return _context.stop(); | ||
return function (_x) { | ||
return _ref.apply(this, arguments); | ||
return _ref2.apply(this, arguments); | ||
}; | ||
}(); | ||
var handler = exports.handler = /*#__PURE__*/function () { | ||
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(event) { | ||
var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(event) { | ||
return _regenerator["default"].wrap(function _callee2$(_context2) { | ||
@@ -97,4 +82,4 @@ while (1) switch (_context2.prev = _context2.next) { | ||
return function handler(_x2) { | ||
return _ref2.apply(this, arguments); | ||
return _ref3.apply(this, arguments); | ||
}; | ||
}(); |
{ | ||
"name": "@20minutes/s3-unzip-plus", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Utility for unzipping a compressed (application/zip) file from a S3 bucket's root directory back to the same bucket.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
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
30249
554