g3l
Advanced tools
Comparing version 8.5.1 to 8.9.1
55
index.js
@@ -19,4 +19,6 @@ #!/usr/bin/env node | ||
var isGitUrl = require('is-git-url'); | ||
var notify = require('./lib/Notify'); | ||
updateNotifier({pkg}).notify(); | ||
program | ||
@@ -127,3 +129,2 @@ .option('-m, --message <message>', 'Commit message') | ||
]; | ||
function run(array) { | ||
@@ -135,3 +136,3 @@ return new Promise(function(resolve, reject) { | ||
if (piece.boolean) { | ||
eval(piece.function + '(' + JSON.stringify(piece) + ').then((value) => {console.log(colors.grey(value));}).catch((err) => {console.log(colors.red(err));bugsnag.notify(new Error(err));})'); | ||
eval(piece.function + '(' + JSON.stringify(piece) + `).then((value) => {console.log(colors.grey(value));}).catch((err) => {console.log(colors.red(err));bugsnag.notify(new Error(err));})`); | ||
} else { | ||
@@ -165,4 +166,10 @@ piece.params.forEach(function(param) { | ||
E(`git checkout -b ${program.new_branch}`) | ||
.then((value) => {resolve(`New branch created: ${program.new_branch}`);}) | ||
.catch((err) => {bugsnag.notify(new Error(err));reject(err)}); | ||
.then((value) => { | ||
notify({title: 'g3l', 'message': `New branch created ${program.new_branch.trim()}`, 'status':'resolve'}) | ||
resolve(`New branch created: ${program.new_branch}`); | ||
}) | ||
.catch((err) => { | ||
notify({title: 'g3l', 'message': `New branch doesn\'t created as: ${program.new_branch.trim()}`, 'status':'reject'}) | ||
reject(err) | ||
}); | ||
}); | ||
@@ -179,4 +186,10 @@ } | ||
C(obj) | ||
.then(function(value) {resolve('Git committed successfully.');}) | ||
.catch(function(err) {bugsnag.notify(new Error(err));reject(err)}); | ||
.then(function(value) { | ||
notify({title: 'g3l', 'message': 'Git committed successfully', 'status':'resolve'}) | ||
resolve('Git committed successfully.'); | ||
}) | ||
.catch(function(err) { | ||
notify({title: 'g3l', 'message': `Git doesn\'t committed successfully.`, 'status':'reject'}) | ||
reject(err) | ||
}); | ||
}); | ||
@@ -190,4 +203,10 @@ } | ||
E(`${isNew} npm publish`) | ||
.then((value) => {resolve(value);}) | ||
.catch((err) => {bugsnag.notify(new Error(err));reject(err);}) | ||
.then((value) => { | ||
notify({title: 'g3l', 'message': 'Npm publish successfully', 'status':'resolve'}) | ||
resolve(value); | ||
}) | ||
.catch((err) => { | ||
notify({title: 'g3l', 'message': `Npm doesn\'t published successfully.`, 'status':'reject'}) | ||
reject(err); | ||
}) | ||
}); | ||
@@ -198,4 +217,5 @@ } | ||
return new Promise(function(resolve, reject) { | ||
notify({title: 'g3l', 'message': 'Git status fetched successfully', 'status':'resolve'}) | ||
S(); | ||
resolve(); | ||
resolve('Git status fetched successfully'); | ||
}); | ||
@@ -208,2 +228,3 @@ } | ||
spawn( "npm", [ "i", `-g`, 'g3l'], function( error, stdout ) { | ||
notify({title: 'g3l', 'message': 'g3l update successfully', 'status':'resolve'}) | ||
resolve('g3l updated successfully.') | ||
@@ -220,5 +241,9 @@ }); | ||
opn(value); | ||
notify({title: 'g3l', 'message': 'g3l created github repository successfully', 'status':'resolve'}) | ||
resolve(emoji.emojify(`:sunglasses: Horarayy! You can init your repository easily with this command: g3l -i`)); | ||
process.exit(); | ||
}).catch((err) => {reject(err);}); | ||
}).catch((err) => { | ||
notify({title: 'g3l', 'message': `Repository doesn\'t created successfully.`, 'status':'reject'}) | ||
reject(err); | ||
}); | ||
}); | ||
@@ -255,6 +280,12 @@ } | ||
E(`git clone ${answers.url} ${answers.name} && cd ${answers.name}`) | ||
.then((value) => {resolve('Clone done!')}) | ||
.catch((err) => {reject(err)}); | ||
.then((value) => { | ||
notify({title: 'g3l', 'message': 'Clone', 'subtitle': `Git clone successfully`, 'status':'resolve'}) | ||
resolve('Clone done!') | ||
}) | ||
.catch((err) => { | ||
notify({title: 'g3l', 'message': `Repository doesn\'t cloned successfully.`, 'status':'reject'}) | ||
reject(err) | ||
}); | ||
}); | ||
}); | ||
} |
{ | ||
"name": "g3l", | ||
"version": "8.5.1", | ||
"version": "8.9.1", | ||
"description": "Git is easy, github cli is easy but g3l easiest git cli in the w0rld!", | ||
@@ -32,2 +32,3 @@ "main": "index.js", | ||
"1n1t": "^1.0.24", | ||
"3x1st": "^1.0.3", | ||
"3x3c": "^1.0.2", | ||
@@ -37,2 +38,3 @@ "async": "^2.0.1", | ||
"c0mm1t": "^1.0.41", | ||
"cl0n3": "^1.0.0", | ||
"cli-table": "^0.3.1", | ||
@@ -47,4 +49,4 @@ "cmdify": "0.0.4", | ||
"node-emoji": "^1.4.1", | ||
"node-notifier": "^4.6.1", | ||
"opn": "^4.0.2", | ||
"path-exists": "^3.0.0", | ||
"prompt": "^1.0.0", | ||
@@ -51,0 +53,0 @@ "underscore": "^1.8.3", |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
5973833
15
437
21
2
+ Added3x1st@^1.0.3
+ Addedcl0n3@^1.0.0
+ Addednode-notifier@^4.6.1
+ Added3x1st@1.0.4(transitive)
+ Addedansi-escapes@3.2.0(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedansicolors@0.3.2(transitive)
+ Addedcardinal@2.1.1(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcl0n3@1.0.0(transitive)
+ Addedcli-usage@0.1.10(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedgrowly@1.3.0(transitive)
+ Addedhas-flag@2.0.03.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedlodash._arraycopy@3.0.0(transitive)
+ Addedlodash._arrayeach@3.0.0(transitive)
+ Addedlodash._baseassign@3.2.0(transitive)
+ Addedlodash._baseclone@3.3.0(transitive)
+ Addedlodash._basecopy@3.0.1(transitive)
+ Addedlodash._basefor@3.0.3(transitive)
+ Addedlodash._bindcallback@3.0.1(transitive)
+ Addedlodash._getnative@3.9.1(transitive)
+ Addedlodash.clonedeep@3.0.2(transitive)
+ Addedlodash.isarguments@3.1.0(transitive)
+ Addedlodash.isarray@3.0.4(transitive)
+ Addedlodash.keys@3.1.2(transitive)
+ Addedmarked@0.7.0(transitive)
+ Addedmarked-terminal@3.3.0(transitive)
+ Addednode-notifier@4.6.1(transitive)
+ Addedredeyed@2.1.1(transitive)
+ Addedshellwords@0.1.1(transitive)
+ Addedsupports-color@5.5.0(transitive)
+ Addedsupports-hyperlinks@1.0.1(transitive)
+ Addedwhich@1.3.1(transitive)
- Removedpath-exists@^3.0.0