decompress
Advanced tools
Comparing version 2.1.0 to 2.1.1
31
cli.js
@@ -14,15 +14,14 @@ #!/usr/bin/env node | ||
var cli = meow({ | ||
requireInput: process.stdin.isTTY, | ||
help: [ | ||
' Usage', | ||
' decompress <file> [directory]', | ||
' cat <file> | decompress [directory]', | ||
'Usage', | ||
' decompress <file> [directory]', | ||
' cat <file> | decompress [directory]', | ||
'', | ||
' Example', | ||
' decompress --strip 1 file.zip out', | ||
' cat file.zip | decompress out', | ||
'Example', | ||
' decompress --strip 1 file.zip out', | ||
' cat file.zip | decompress out', | ||
'', | ||
' Options', | ||
' -m, --mode Set mode on the extracted files', | ||
' -s, --strip Equivalent to --strip-components for tar' | ||
'Options', | ||
' -m, --mode Set mode on the extracted files', | ||
' -s, --strip Equivalent to --strip-components for tar' | ||
].join('\n') | ||
@@ -93,2 +92,14 @@ }, { | ||
if (!src.length) { | ||
console.error([ | ||
'Specify a file to decompress', | ||
'', | ||
'Example', | ||
' decompress --strip 1 file.zip out', | ||
' cat file.zip | decompress out' | ||
].join('\n')); | ||
process.exit(1); | ||
} | ||
if (!isFile(src[src.length - 1])) { | ||
@@ -95,0 +106,0 @@ dest = src[src.length - 1]; |
@@ -78,2 +78,10 @@ 'use strict'; | ||
cb = cb || function () {}; | ||
if (!this.streams.length) { | ||
this.use(Decompress.tar(this.opts)); | ||
this.use(Decompress.tarbz2(this.opts)); | ||
this.use(Decompress.targz(this.opts)); | ||
this.use(Decompress.zip(this.opts)); | ||
} | ||
this.streams.unshift(this.read(this.src())); | ||
@@ -80,0 +88,0 @@ |
{ | ||
"name": "decompress", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Extracting archives made easy", | ||
@@ -43,3 +43,3 @@ "license": "MIT", | ||
"get-stdin": "^3.0.0", | ||
"meow": "^1.0.0", | ||
"meow": "^2.0.0", | ||
"stream-combiner": "^0.2.1", | ||
@@ -46,0 +46,0 @@ "through2": "^0.6.1", |
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
7760
208
+ Addedmeow@2.1.0(transitive)
+ Addedobject-assign@2.1.1(transitive)
- Removedmeow@1.0.0(transitive)
- Removedobject-assign@1.0.0(transitive)
Updatedmeow@^2.0.0