Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

all-unpacker

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

all-unpacker - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

26

installer.js

@@ -44,19 +44,11 @@ #!/usr/bin/env node

function getExtractUnar(urlSource, fileSource, destination) {
var node_wget = require("node-wget-js");
var StreamZip = require('node-stream-zip');
const node_wget = require("node-wget-fetch");
console.log('Downloading ' + urlSource);
return new Promise(function (resolve, reject) {
node_wget({
url: urlSource,
dest: fileSource
}, function (err) {
if (err) {
return reject('Error downloading file: ' + err);
}
var unzip = new StreamZip({
return node_wget(urlSource, fileSource)
.then((info) => {
const StreamZip = require('node-stream-zip');
const unzip = new StreamZip({
file: fileSource,
storeEntries: true
});
unzip.on('ready', () => {

@@ -66,10 +58,10 @@ unzip.extract(null, destination, (err, count) => {

if (err) {
return reject(err);
return new Error(err) ;
}
return resolve(count);
return count;
});
});
});
});
})
.catch((err) => console.log('Error downloading file: ' + err));
}
{
"name": "all-unpacker",
"version": "0.1.5",
"version": "0.1.6",
"description": "All unpacker for zip, zipx, rar, 7z, tar, gzip, bzip2, lzma,... See theunarchiver.com for complete list, wrapper for unar and lsar.",

@@ -18,3 +18,4 @@ "keywords": [

"Windows",
"Linux"
"Linux",
"Apple"
],

@@ -32,3 +33,3 @@ "author": {

"test": "mocha",
"coveralls": "npm install coveralls && cat .tmp/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"coverage": "npx nyc@latest --reporter json --reporter text mocha -R list test/*.js && codecov -f coverage/coverage-final.json",
"install": "node installer.js"

@@ -47,3 +48,3 @@ },

"optionalDependencies": {
"node-wget-js": "^0.4.4",
"node-wget-fetch": "^1.0.0",
"system-installer": "^1.1.0",

@@ -64,6 +65,6 @@ "node-stream-zip": "^1.11.3"

"chai": "^4.1.2",
"codecov": "^3.8.0",
"fs-extra": "^8.0.0",
"coveralls": "^3.1.0",
"mocha": "^6.2.0"
}
}
all-unpacker
=======
[![Dependencies Status][david-image]][david-url] [![Build Status][travis-image]][travis-url] [![Code coverage][coveralls-image]][coveralls-url] [![Maintainability][codeclimate-image]][codeclimate-url][![Release][npm-image]][npm-url]
[![NPM](https://nodei.co/npm/all-unpacker.png)](https://nodei.co/npm/all-unpacker/)
[![Dependencies Status][david-image]][david-url] [![Node.js CI](https://github.com/techno-express/node-unpack-all/workflows/Node.js%20CI/badge.svg)](https://github.com/techno-express/node-unpack-all/actions) [![Maintainability][codeclimate-image]][codeclimate-url][![Release][npm-image]][npm-url]
> Wrapper for [unar and lsar](http://unarchiver.c3.cx/commandline) command line tool.

@@ -13,3 +15,4 @@ It allows you to unpack a lot of formats: zip, zipx, rar, 7z, tar, gzip, bzip2, lzma, cab, msi, cpio,... [complete list](http://unarchiver.c3.cx/formats)

## Usage
## Usage
```js

@@ -26,2 +29,3 @@ var ua = require('all-unpacker');

#### Example: unpack file
```js

@@ -37,4 +41,5 @@ require('all-unpacker')

```
#### Example: list content
```js

@@ -46,5 +51,4 @@ function cb(err, files, text) {

require('all-unpacker').list('test/abc.rar', {}, cb);
```
```
### Options

@@ -54,23 +58,19 @@

--------- | -----------------------|-------------------------------------------------
quiet | true/false (default) | true will reduce logging for unpacking
quiet | true/false (default) | true will reduce logging for unpacking
targetDir | \<String> | The directory to write the contents of the archive to. Defaults to the current directory.
files | \<String> | Only unpack this list of files or directories.
forceOverwrite | true/false (default) | if null, tmp dir will created automatically
forceDirectory | true/false/undefined | Always create a containing directory for the contents of the unpacked archive. By default, a directory is created if there is more than one top-level file or folder.
noDirectory | true/false/undefined | Never create a containing directory for the contents of the unpacked archive.
noRecursion | true/false/undefined | Do not attempt to extract archives contained in other archives. For instance, when unpacking a .tar.gz file, only unpack the .gz file and not its contents.
copyTime | true/false/undefined | Copy the file modification time from the archive file to the containing directory, if one is created.
password | \<String> | The password to use for decrypting protected archives.
passwordEncoding | \<String> | The encoding to use for the password for the archive, when it is not known. If not specified, then either the encoding given by the -encoding option or the auto-detected encoding is used.
encoding | \<String> | The encoding to use for filenames in the archive, when it is not known. If not specified, the program attempts to auto-detect the encoding used. Use "help" or "list" as the argument to give
forceDirectory | true/false/undefined | Always create a containing directory for the contents of the unpacked archive. By default, a directory is created if there is more than one top-level file or folder.
noDirectory | true/false/undefined | Never create a containing directory for the contents of the unpacked archive.
noRecursion | true/false/undefined | Do not attempt to extract archives contained in other archives. For instance, when unpacking a .tar.gz file, only unpack the .gz file and not its contents.
copyTime | true/false/undefined | Copy the file modification time from the archive file to the containing directory, if one is created.
password | \<String> | The password to use for decrypting protected archives.
passwordEncoding | \<String> | The encoding to use for the password for the archive, when it is not known. If not specified, then either the encoding given by the -encoding option or the auto-detected encoding is used.
encoding | \<String> | The encoding to use for filenames in the archive, when it is not known. If not specified, the program attempts to auto-detect the encoding used. Use "help" or "list" as the argument to give
[david-url]: https://david-dm.org/techno-express/node-unpack-all
[david-image]: http://img.shields.io/david/techno-express/node-unpack-all.svg
[travis-url]: https://travis-ci.org/techno-express/node-unpack-all
[travis-image]: http://img.shields.io/travis/techno-express/node-unpack-all.svg
[codeclimate-url]: https://codeclimate.com/github/techno-express/node-unpack-all/maintainability
[codeclimate-image]: https://api.codeclimate.com/v1/badges/0d6a0bc69a8ea29c7de9/maintainability
[coveralls-url]: https://coveralls.io/github/techno-express/node-unpack-all
[coveralls-image]: https://coveralls.io/repos/github/techno-express/node-unpack-all/badge.svg
[npm-url]: https://www.npmjs.org/package/all-unpacker
[npm-image]: http://img.shields.io/npm/v/all-unpacker.svg
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc