File tree Expand file tree Collapse file tree 6 files changed +457
-928
lines changed Expand file tree Collapse file tree 6 files changed +457
-928
lines changed Original file line number Diff line number Diff line change 1+ 10.19.0
Original file line number Diff line number Diff line change 88 "license" : " MIT" ,
99 "private" : true ,
1010 "scripts" : {
11- "package" : " pkg --out-path dist --config package.json src/index.js"
11+ "package" : " pkg --out-path dist --config package.json src/index.js" ,
12+ "clean" : " rm -rf ./dist"
1213 },
1314 "resolutions" : {
14- "**/**/set-value " : " ^2.0.1 "
15+ "**/**/minimist " : " ^1.2.5 "
1516 },
1617 "dependencies" : {
17- "axios" : " ^0.18.1" ,
18- "chalk" : " ^2.4.2" ,
19- "minimist" : " ^1.2.0" ,
20- "shelljs" : " ^0.8.3" ,
21- "strip-ansi" : " ^5.0.0" ,
18+ "axios" : " ^0.19.2" ,
19+ "chalk" : " ^4.1.0" ,
20+ "minimist" : " ^1.2.5" ,
21+ "strip-ansi" : " ^6.0.0" ,
2222 "targz" : " ^1.0.1"
2323 },
2424 "devDependencies" : {
25- "pkg" : " ^4.3.5"
25+ "pkg" : " ^4.4.9"
26+ },
27+ "pkg" : {
28+ "targets" : [
29+ " node10-macos-x64" ,
30+ " node10-linux-x64"
31+ ]
2632 }
2733}
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ const fs = require ("fs")
44const path = require ( "path" )
55const strip = require ( "strip-ansi" )
66const targz = require ( "targz" )
7- const shell = require ( "shelljs" )
87const { load } = require ( "./account" )
98
109const VERSION = "2.0.1"
@@ -48,10 +47,14 @@ class Context {
4847 if ( this . quiet ) return
4948 if ( ! this . unicode ) {
5049 console . error ( `${ chalk . red ( "Error" ) } :` , ...arguments )
50+ console . error ( "" )
51+ require ( "./commands/help" ) ( this )
5152 }
5253 else {
5354 let stripped = Object . values ( arguments ) . map ( i => strip ( i ) )
5455 console . error ( "Error:" , ...stripped )
56+ console . error ( "" )
57+ require ( "./commands/help" ) ( this )
5558 }
5659 }
5760
@@ -75,7 +78,7 @@ class Context {
7578
7679 mkdir ( destination ) {
7780 try {
78- shell . mkdir ( "-p" , destination )
81+ fs . mkdirSync ( destination , { recursive : true } )
7982 }
8083 catch ( error ) {
8184 throw "permission issue with download path"
Original file line number Diff line number Diff line change @@ -30,5 +30,5 @@ parse ( process.argv.slice ( 2 ) )
3030 } )
3131 . catch ( payload => {
3232 const { context, error } = payload
33- context . error ( error || "unknown command, use -h for help" )
33+ context . error ( error || "unknown command, see help below: " )
3434 } )
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ function parse ( data ) {
213213 }
214214 else if ( ! args . help && ! args . version ) {
215215 return Promise . reject ( {
216- error : "specify command, use -h for help" ,
216+ error : "specify command, see help below: " ,
217217 context
218218 } )
219219 }
You can’t perform that action at this time.
0 commit comments