Comparing version 1.3.0 to 1.4.0
#!/usr/bin/env node | ||
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=4)}([function(t,e){t.exports=require("commander")},function(t,e){t.exports=require("inquirer")},function(t,e){t.exports=require("child_process")},function(t){t.exports=JSON.parse('{"a":"1.3.0"}')},function(t,e,n){"use strict";n.r(e);var r=n(0),o=n(1),i=n.n(o),u=function(){return(u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},a=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},c=function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},s=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r};function l(t,e){return a(this,void 0,void 0,(function(){return c(this,(function(n){switch(n.label){case 0:return[4,f(t,e,{})];case 1:return[2,n.sent().files]}}))}))}function f(t,e,n){return a(this,void 0,void 0,(function(){var r;return c(this,(function(o){return r=Object.entries(n).map((function(t){var e=t[0],n=t[1];return u({name:e},n)})),[2,i.a.prompt(s([{type:"checkbox",name:"files",message:t,choices:e,validate:function(t){return!(t.length<1)||"Are you tricking me 🤨? Please choose files"}}],r))]}))}))}var h=n(2);function p(t,e){return void 0===e&&(e=!1),new Promise((function(n,r){try{n(Object(h.spawnSync)("git",t.split(" "),{cwd:process.cwd(),stdio:e?"inherit":"pipe",encoding:"utf8"}).stdout)}catch(t){r(t)}}))}var d=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},v=function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},g=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r};function y(t,e,n,r){return void 0===r&&(r=!1),d(this,void 0,void 0,(function(){var o;return v(this,(function(i){switch(i.label){case 0:return[4,p(o=t+" "+g(n||[],e).join(" "),r)];case 1:return i.sent(),r?[2]:(console.log("[0m",'"git '+o+'"',"[32m","did great 🤟"),[2])}}))}))}function b(){return d(this,void 0,void 0,(function(){var t;return v(this,(function(e){switch(e.label){case 0:return[4,p("status --porcelain=v2 -uall")];case 1:return t=e.sent(),[2,t.split(/\n/g).filter((function(t){return t})).reduce((function(t,e){try{var n=e.split(/ +/g),r=n[0],o=n.slice(1),i=o[o.length-1];if("1"===r){var u=o[0].split(""),a=u[0],c=u[1];"."!==a&&t.push({status:"staged",path:i,deleted:"D"===a}),"."!==c&&t.push({status:"tracked",path:i,deleted:"D"===c})}else"?"===r&&t.push({status:"untracked",path:i})}catch(t){console.log(e)}return t}),[])]}}))}))}function w(t){return d(this,void 0,void 0,(function(){return v(this,(function(e){switch(e.label){case 0:return[4,y("add",t)];case 1:return e.sent(),[2]}}))}))}function m(t){return d(this,void 0,void 0,(function(){return v(this,(function(e){switch(e.label){case 0:return[4,y("reset HEAD --",t)];case 1:return e.sent(),[2]}}))}))}function x(t,e){return d(this,void 0,void 0,(function(){return v(this,(function(n){switch(n.label){case 0:return[4,w(t)];case 1:return n.sent(),[4,y("stash push"+(e?" -m "+e.replace(/ /g,"-"):""),t)];case 2:return n.sent(),[2]}}))}))}function k(t,e){return y("diff",t,e,!0)}var O=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},S=function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},j=A((function(){return O(void 0,void 0,void 0,(function(){var t;return S(this,(function(e){switch(e.label){case 0:return[4,b()];case 1:return(t=e.sent().filter((function(t){return"staged"!==t.status}))).length?[4,l("Files to add",t.map((function(t){return t.path})))]:(console.log("[33m","There are no changes here. Get back to work 🤓"),[2]);case 2:return[4,w(e.sent())];case 3:return e.sent(),[2]}}))}))})),P=A((function(){return O(void 0,void 0,void 0,(function(){var t;return S(this,(function(e){switch(e.label){case 0:return[4,b()];case 1:return(t=e.sent().filter((function(t){return"staged"===t.status}))).length?[4,l("Files to reset?",t.map((function(t){return t.path})))]:(console.log("[33m","There are no files in stage. You have nothing to regret about 🦾"),[2]);case 2:return[4,m(e.sent())];case 3:return e.sent(),[2]}}))}))})),T=A((function(){return O(void 0,void 0,void 0,(function(){var t,e,n,r;return S(this,(function(o){switch(o.label){case 0:return[4,b()];case 1:return(t=o.sent().filter((function(t){return!t.deleted}))).length?[4,f("Files to stash",t.map((function(t){return t.path})),{message:{type:"input",message:'Leave a message to your future self ("-m").. or not, whatever'}})]:(console.log("[33m","Stash what exactly 🤥?"),[2]);case 2:return e=o.sent(),n=e.files,r=e.message,[4,x(n,r)];case 3:return o.sent(),[2]}}))}))})),_=A((function(t){return O(void 0,void 0,void 0,(function(){var e,n;return S(this,(function(r){switch(r.label){case 0:return e=t.args.includes("--cached"),[4,b()];case 1:return(n=r.sent().filter((function(t){return!t.deleted&&(e?"staged"===t.status:"staged"!==t.status)}))).length?[4,l("Files to diff",n.map((function(t){return t.path})))]:(console.log("[33m","You can't view diff of.. nothing 🧐"),[2]);case 2:return[4,k(r.sent(),t.args)];case 3:return r.sent(),[2]}}))}))}));function A(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return t.apply(void 0,e)}catch(t){console.log("[31m","Oops, something went wrong",t)}}}var q=n(3);!function(){try{r.program.version(q.a),r.program.command("add").description('do "git add" with style 📥').action(j),r.program.command("reset").description('do "git reset" with style 🔙').action(P),r.program.command("stash").description('do "git stash" with style 👜').action(T),r.program.command("diff").allowUnknownOption().description('do "git diff" with style 🤔 (Accept any argument "git diff" accpets)').action(_),r.program.parse(process.argv)}catch(t){console.log(t)}}()}]); | ||
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=5)}([function(t,e){t.exports=require("commander")},function(t,e){t.exports=require("inquirer")},function(t,e){t.exports=require("child_process")},function(t,e){t.exports=require("path")},function(t){t.exports=JSON.parse('{"a":"1.4.0"}')},function(t,e,n){"use strict";n.r(e);var r=n(0),o=n(1),i=n.n(o),u=function(){return(u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},a=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},c=function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},s=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r};function l(t,e){return a(this,void 0,void 0,(function(){return c(this,(function(n){switch(n.label){case 0:return[4,f(t,e,{})];case 1:return[2,n.sent().files]}}))}))}function f(t,e,n){return a(this,void 0,void 0,(function(){var r;return c(this,(function(o){return r=Object.entries(n).map((function(t){var e=t[0],n=t[1];return u({name:e},n)})),[2,i.a.prompt(s([{type:"checkbox",name:"files",message:t,choices:e,validate:function(t){return!(t.length<1)||"Are you tricking me 🤨? Please choose files"}}],r))]}))}))}var h=n(2);function p(t,e){return void 0===e&&(e=!1),new Promise((function(n,r){try{n(Object(h.spawnSync)("git",t.split(" "),{cwd:process.cwd(),stdio:e?"inherit":"pipe",encoding:"utf8"}).stdout)}catch(t){r(t)}}))}var d=n(3),v=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},g=function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},y=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r};function b(t,e,n,r){return void 0===r&&(r=!1),v(this,void 0,void 0,(function(){var o;return g(this,(function(i){switch(i.label){case 0:return[4,p(o=t+" "+y(n||[],e).join(" "),r)];case 1:return i.sent(),r?[2]:(console.log("[0m",'"git '+o+'"',"[32m","did great 🤟"),[2])}}))}))}function m(){return v(this,void 0,void 0,(function(){var t;return g(this,(function(e){switch(e.label){case 0:return[4,p("status --porcelain=v2 -uall")];case 1:return t=e.sent(),[2,t.split(/\n/g).filter((function(t){return t})).reduce((function(t,e){try{var n=e.split(/ +/g),r=n[0],o=n.slice(1),i=o[o.length-1];if("1"===r){var u=o[0].split(""),a=u[0],c=u[1];"."!==a&&t.push({status:"staged",path:i,deleted:"D"===a}),"."!==c&&t.push({status:"tracked",path:i,deleted:"D"===c})}else"?"===r&&t.push({status:"untracked",path:i})}catch(t){console.log(e)}return t}),[])]}}))}))}function w(t){return v(this,void 0,void 0,(function(){return g(this,(function(e){switch(e.label){case 0:return[4,b("add",t)];case 1:return e.sent(),[2]}}))}))}function x(t){return v(this,void 0,void 0,(function(){return g(this,(function(e){switch(e.label){case 0:return[4,b("reset HEAD --",t)];case 1:return e.sent(),[2]}}))}))}function k(t,e){return v(this,void 0,void 0,(function(){return g(this,(function(n){switch(n.label){case 0:return[4,w(t)];case 1:return n.sent(),[4,b("stash push"+(e?" -m "+e.replace(/ /g,"-"):""),t)];case 2:return n.sent(),[2]}}))}))}function O(t,e){return b("diff",t,e,!0)}function S(t,e){var n=t.replace(Object(d.basename)(t),e);return b("mv",[],[t,n])}var j=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},P=function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},T=F((function(){return j(void 0,void 0,void 0,(function(){var t;return P(this,(function(e){switch(e.label){case 0:return[4,m()];case 1:return(t=e.sent().filter((function(t){return"staged"!==t.status}))).length?[4,l("Files to add",t.map((function(t){return t.path})))]:(console.log("[33m","There are no changes here. Get back to work 🤓"),[2]);case 2:return[4,w(e.sent())];case 3:return e.sent(),[2]}}))}))})),_=F((function(){return j(void 0,void 0,void 0,(function(){var t;return P(this,(function(e){switch(e.label){case 0:return[4,m()];case 1:return(t=e.sent().filter((function(t){return"staged"===t.status}))).length?[4,l("Files to reset?",t.map((function(t){return t.path})))]:(console.log("[33m","There are no files in stage. You have nothing to regret about 🦾"),[2]);case 2:return[4,x(e.sent())];case 3:return e.sent(),[2]}}))}))})),q=F((function(){return j(void 0,void 0,void 0,(function(){var t,e,n,r;return P(this,(function(o){switch(o.label){case 0:return[4,m()];case 1:return(t=o.sent().filter((function(t){return!t.deleted}))).length?[4,f("Files to stash",t.map((function(t){return t.path})),{message:{type:"input",message:'Leave a message to your future self ("-m").. or not, whatever'}})]:(console.log("[33m","Stash what exactly 🤥?"),[2]);case 2:return e=o.sent(),n=e.files,r=e.message,[4,k(n,r)];case 3:return o.sent(),[2]}}))}))})),A=F((function(t){return j(void 0,void 0,void 0,(function(){var e,n;return P(this,(function(r){switch(r.label){case 0:return e=t.args.includes("--cached"),[4,m()];case 1:return(n=r.sent().filter((function(t){return!t.deleted&&(e?"staged"===t.status:"staged"!==t.status)}))).length?[4,l("Files to diff",n.map((function(t){return t.path})))]:(console.log("[33m","You can't view diff of.. nothing 🧐"),[2]);case 2:return[4,O(r.sent(),t.args)];case 3:return r.sent(),[2]}}))}))})),E=F((function(t){var e=t.args,n=e[0],r=e[1];return j(void 0,void 0,void 0,(function(){return P(this,(function(t){switch(t.label){case 0:return[4,S(n,r)];case 1:return t.sent(),[2]}}))}))}));function F(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return t.apply(void 0,e)}catch(t){console.log("[31m","Oops, something went wrong",t)}}}var G=n(4);!function(){try{r.program.version(G.a),r.program.command("add").description('do "git add" with style 📥').action(T),r.program.command("reset").description('do "git reset" with style 🔙').action(_),r.program.command("stash").description('do "git stash" with style 👜').action(q),r.program.command("diff").allowUnknownOption().description('do "git diff" with style 🤔 (Accept any argument "git diff" accpets)').action(A),r.program.command("rename <path> <newName>").description('do "git mv" (for renaming) with style 🔖').action(E),r.program.parse(process.argv)}catch(t){console.log(t)}}()}]); |
## Change log | ||
**0.2.0** | ||
**1.4.0** | ||
- Support command `rename` | ||
**1.3.0** | ||
- Nothing, I'm not sure why it was a major 🤨 | ||
**1.2.0** | ||
- Support commands `stash` and `diff` (also added webpack + typescript) | ||
**0.1.0** | ||
**1.1.0** | ||
- Support commands `add` and `reset` |
{ | ||
"name": "git-wiz", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"author": { | ||
@@ -34,5 +34,3 @@ "email": "moshfeu.dev@gmail.com", | ||
"commander": "^6.1.0", | ||
"inquirer": "^7.3.3", | ||
"ts-loader": "^8.0.3", | ||
"typescript": "^4.0.2" | ||
"inquirer": "^7.3.3" | ||
}, | ||
@@ -44,4 +42,6 @@ "devDependencies": { | ||
"webpack-cli": "^3.3.12", | ||
"webpack-node-externals": "^2.5.2" | ||
"webpack-node-externals": "^2.5.2", | ||
"ts-loader": "^8.0.3", | ||
"typescript": "^4.0.2" | ||
} | ||
} |
@@ -34,2 +34,3 @@ ![thanks for stopping by](https://moshfeudev.wixsite.com/shield/_functions/view/git-wiz) | ||
- `diff` | ||
- `rename` (`mv`) | ||
@@ -36,0 +37,0 @@ ## Development |
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
13284
2
62
7
- Removedts-loader@^8.0.3
- Removedtypescript@^4.0.2
- Removed@jridgewell/gen-mapping@0.3.5(transitive)
- Removed@jridgewell/resolve-uri@3.1.2(transitive)
- Removed@jridgewell/set-array@1.2.1(transitive)
- Removed@jridgewell/source-map@0.3.6(transitive)
- Removed@jridgewell/sourcemap-codec@1.5.0(transitive)
- Removed@jridgewell/trace-mapping@0.3.25(transitive)
- Removed@types/eslint@9.6.1(transitive)
- Removed@types/eslint-scope@3.7.7(transitive)
- Removed@types/estree@1.0.6(transitive)
- Removed@types/json-schema@7.0.15(transitive)
- Removed@types/node@22.9.0(transitive)
- Removed@webassemblyjs/ast@1.14.1(transitive)
- Removed@webassemblyjs/floating-point-hex-parser@1.13.2(transitive)
- Removed@webassemblyjs/helper-api-error@1.13.2(transitive)
- Removed@webassemblyjs/helper-buffer@1.14.1(transitive)
- Removed@webassemblyjs/helper-numbers@1.13.2(transitive)
- Removed@webassemblyjs/helper-wasm-bytecode@1.13.2(transitive)
- Removed@webassemblyjs/helper-wasm-section@1.14.1(transitive)
- Removed@webassemblyjs/ieee754@1.13.2(transitive)
- Removed@webassemblyjs/leb128@1.13.2(transitive)
- Removed@webassemblyjs/utf8@1.13.2(transitive)
- Removed@webassemblyjs/wasm-edit@1.14.1(transitive)
- Removed@webassemblyjs/wasm-gen@1.14.1(transitive)
- Removed@webassemblyjs/wasm-opt@1.14.1(transitive)
- Removed@webassemblyjs/wasm-parser@1.14.1(transitive)
- Removed@webassemblyjs/wast-printer@1.14.1(transitive)
- Removed@xtuc/ieee754@1.2.0(transitive)
- Removed@xtuc/long@4.2.2(transitive)
- Removedacorn@8.14.0(transitive)
- Removedajv@6.12.6(transitive)
- Removedajv-keywords@3.5.2(transitive)
- Removedbig.js@5.2.2(transitive)
- Removedbraces@3.0.3(transitive)
- Removedbrowserslist@4.24.2(transitive)
- Removedbuffer-from@1.1.2(transitive)
- Removedcaniuse-lite@1.0.30001679(transitive)
- Removedchrome-trace-event@1.0.4(transitive)
- Removedcommander@2.20.3(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedelectron-to-chromium@1.5.55(transitive)
- Removedemojis-list@3.0.0(transitive)
- Removedenhanced-resolve@4.5.05.17.1(transitive)
- Removederrno@0.1.8(transitive)
- Removedes-module-lexer@1.5.4(transitive)
- Removedescalade@3.2.0(transitive)
- Removedeslint-scope@5.1.1(transitive)
- Removedesrecurse@4.3.0(transitive)
- Removedestraverse@4.3.05.3.0(transitive)
- Removedevents@3.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedfill-range@7.1.1(transitive)
- Removedglob-to-regexp@0.4.1(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-number@7.0.0(transitive)
- Removedisarray@1.0.0(transitive)
- Removedjest-worker@27.5.1(transitive)
- Removedjson-parse-even-better-errors@2.3.1(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedjson5@2.2.3(transitive)
- Removedloader-runner@4.3.0(transitive)
- Removedloader-utils@2.0.4(transitive)
- Removedmemory-fs@0.5.0(transitive)
- Removedmerge-stream@2.0.0(transitive)
- Removedmicromatch@4.0.8(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removedneo-async@2.6.2(transitive)
- Removednode-releases@2.0.18(transitive)
- Removedpicocolors@1.1.1(transitive)
- Removedpicomatch@2.3.1(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedprr@1.0.1(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedrandombytes@2.1.0(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedschema-utils@3.3.0(transitive)
- Removedsemver@7.6.3(transitive)
- Removedserialize-javascript@6.0.2(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedsource-map-support@0.5.21(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedsupports-color@8.1.1(transitive)
- Removedtapable@1.1.32.2.1(transitive)
- Removedterser@5.36.0(transitive)
- Removedterser-webpack-plugin@5.3.10(transitive)
- Removedto-regex-range@5.0.1(transitive)
- Removedts-loader@8.4.0(transitive)
- Removedtypescript@4.9.5(transitive)
- Removedundici-types@6.19.8(transitive)
- Removedupdate-browserslist-db@1.1.1(transitive)
- Removeduri-js@4.4.1(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedwatchpack@2.4.2(transitive)
- Removedwebpack@5.96.1(transitive)
- Removedwebpack-sources@3.2.3(transitive)