new-project-cli
Version:
Opinionated command line tool that creates a new git repository for an npm package.
7 lines • 69.9 kB
JavaScript
#!/usr/bin/env node
/*!
*** new-project-cli 3.1.0
*** Copyright © 2020, Jaid <jaid.jsx@gmail.com> (https://github.com/Jaid)
*** @license MIT
*** See https://github.com/Jaid/new-project-cli
!*/!function(e){var t={};function r(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,r),s.l=!0,s.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)r.d(n,s,function(t){return e[t]}.bind(null,s));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=104)}([function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),n(r(21)),n(r(63)),n(r(64)),n(r(65)),n(r(66)),n(r(67)),n(r(68)),n(r(7))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(25);t.EMPTY_COMMANDS=[],t.adhocExecTask=function(e){return{commands:t.EMPTY_COMMANDS,format:"utf-8",parser:e}},t.configurationErrorTask=function(e){return{commands:t.EMPTY_COMMANDS,format:"utf-8",parser(){throw"string"==typeof e?new n.TaskConfigurationError(e):e}}},t.straightThroughStringTask=function(e,t=!1){return{commands:e,format:"utf-8",parser:e=>t?String(e).trim():e}},t.isBufferTask=function(e){return"buffer"===e.format},t.isEmptyTask=function(e){return!e.commands.length}},function(e,t){e.exports=require("@absolunet/fsp")},function(e,t){e.exports=require("path")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(20);t.CleanOptions=n.CleanOptions;var s=r(26);t.CheckRepoActions=s.CheckRepoActions;var o=r(27);t.ResetMode=o.ResetMode;var i=r(69);t.GitConstructError=i.GitConstructError;var a=r(8);t.GitError=a.GitError;var c=r(9);t.GitResponseError=c.GitResponseError;var u=r(25);t.TaskConfigurationError=u.TaskConfigurationError},function(e,t){e.exports=require("escape-string-regexp")},function(e,t){e.exports=require("execa")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(54);function s(e){return!(!e||"number"!=typeof e.length)}function o(e,t=!0){return e.split("\n").reduce(((e,r)=>{const n=t?r.trim():r;return n&&e.push(n),e}),[])}function i(e){return Array.isArray(e)?e:[e]}t.NOOP=()=>{},t.asFunction=function(e){return"function"==typeof e?e:t.NOOP},t.isUserFunction=function(e){return"function"==typeof e&&e!==t.NOOP},t.splitOn=function(e,t){const r=e.indexOf(t);return r>0?[e.substr(0,r),e.substr(r+1)]:[e,""]},t.first=function(e,t=0){return s(e)&&e.length>t?e[t]:void 0},t.last=function(e,t=0){if(s(e)&&e.length>t)return e[e.length-1-t]},t.toLinesWithContent=o,t.forEachLineWithContent=function(e,t){return o(e,!0).map((e=>t(e)))},t.folderExists=function(e){return n.exists(e,n.FOLDER)},t.append=function(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t},t.remove=function(e,t){if(Array.isArray(e)){const r=e.indexOf(t);0>r||e.splice(r,1)}else e.delete(t);return t},t.objectToString=Object.prototype.toString.call.bind(Object.prototype.toString),t.asArray=i,t.asStringArray=function(e){return i(e).map(String)},t.asNumber=function(e,t=0){if(null==e)return t;const r=parseInt(e,10);return isNaN(r)?t:r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}t.GitError=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8);class s extends n.GitError{constructor(e,t){super(void 0,t||String(e)),this.git=e}}t.GitResponseError=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(22),s=r(0);function o(e,t,r){return t&&String(t).replace(/\s*/,"")?(n,...s)=>{e("%s "+n,t,...s),r&&r(n,...s)}:r?(t,...n)=>{e(t,...n),r(t,...n)}:e}n.default.formatters.L=e=>String(s.filterHasLength(e)?e.length:"-"),n.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):s.objectToString(e),t.log=n.default("simple-git"),t.createLogger=function e(r,n,i,a=t.log){const c=r&&`[${r}]`||"",u=[],l="string"==typeof n?a.extend(n):n,p=function(e,t,{namespace:r}){if("string"==typeof e)return e;const n=t&&t.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}(s.filterType(n,s.filterString),l,a),f=((null==l?void 0:l.destroy)||s.NOOP).bind(l);return function e(t){const n=t&&`[${t}]`||"",i=l&&o(l,n)||s.NOOP,u=o(a,`${c} ${n}`,i);return Object.assign(l?i:u,{key:p,label:r,child:h,sibling:m,debug:i,info:u,step:e,destroy:d})}(i);function d(){f(),u.forEach((e=>e.destroy())),u.length=0}function h(t){return s.append(u,e(r,l&&l.extend(t)||t))}function m(t,n){return s.append(u,e(r,p.replace(/^[^:]+/,t),n,a))}},t.GitLogger=class{constructor(e=t.log){this._out=e,this.error=o(e,"[ERROR]"),this.warn=o(e,"[WARN]")}silent(e=!1){if(e!==this._out.enabled)return;const{namespace:t}=this._out,r=(process.env.DEBUG||"").split(",").filter((e=>!!e)),o=r.includes(t),i=r.includes("-"+t);e?o?s.remove(r,t):r.push("-"+t):i?s.remove(r,"-"+t):r.push(t),n.default.enable(r.join(","))}}},function(e,t){e.exports=require("fs")},function(e,t){e.exports={githubUser:"Jaid",projectsFolder:"E:/Projects",template:"epoch-seconds",readme:"# {{projectName}}\n## Under construction\nNot much to see right now. Come back lator! :crocodile:",description:"Node module {{projectName}} (:construction: Under construction, usage is not recommended!)",initialCommitMessage:"Initialized based on https://github.com/{{owner}}/{{template}}",lockfileCreationCommitMessage:"Generated lockfile",upgradeCommitMessage:"Automatically upgraded dependencies",openUrls:["https://github.com/{{owner}}/{{projectName}}","https://travis-ci.com/{{owner}}/{{projectName}}/settings"]}},function(e,t){e.exports=require("camel-case")},function(e,t){e.exports=require("constant-case")},function(e,t){e.exports=require("has-content")},function(e,t){e.exports=require("header-case")},function(e,t){e.exports=require("pascal-case")},function(e,t,r){const n=r(45),{GitConstructError:s}=r(4),{createInstanceConfig:o,folderExists:i}=r(0),a=Object.create(null);for(let e=r(4),t=Object.keys(e),n=0;n<t.length;n++){const r=t[n];/^[A-Z]/.test(r)&&(a[r]=e[r])}e.exports.esModuleFactory=function(e){return Object.defineProperties(e,{__esModule:{value:!0},default:{value:e}})},e.exports.gitExportFactory=function(e,t){return Object.assign((function(){return e.apply(null,arguments)}),a,t||{})},e.exports.gitInstanceFactory=function(e,t){const r=o(e&&("string"==typeof e?{baseDir:e}:e),t);if(!i(r.baseDir))throw new s(r,"Cannot use simple-git on a directory that does not exist");return new n(r)}},function(e,t){function r(){this.files=[],this.insertions=0,this.deletions=0,this.changed=0}function n(e,t){if(e=e.trim().match(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/)){var r=(e[3]||"").trim();return t.push({file:e[1].trim(),changes:parseInt(e[2],10),insertions:r.replace(/-/g,"").length,deletions:r.replace(/\+/g,"").length,binary:!1}),!0}}function s(e,t){if(e=e.match(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)$/))return t.push({file:e[1].trim(),before:+e[2],after:+e[3],binary:!0}),!0}e.exports=r,r.prototype.insertions=0,r.prototype.deletions=0,r.prototype.changed=0,r.parse=function(e){var t,o=e.trim().split("\n"),i=new r,a=o.pop();for(a&&a.trim().split(", ").forEach((function(e){var t=/(\d+)\s([a-z]+)/.exec(e);t&&(/files?/.test(t[2])?i.changed=parseInt(t[1],10):i[t[2].replace(/s$/,"")+"s"]=parseInt(t[1],10))}));t=o.shift();)n(t,i.files)||s(t,i.files);return i}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(53),s=r(0),o=r(1);var i;t.CONFIG_ERROR_INTERACTIVE_MODE="Git clean interactive mode is not supported",t.CONFIG_ERROR_MODE_REQUIRED='Git clean mode parameter ("n" or "f") is required',t.CONFIG_ERROR_UNKNOWN_OPTION="Git clean unknown option found in: ",function(e){e.DRY_RUN="n",e.FORCE="f",e.IGNORED_INCLUDED="x",e.IGNORED_ONLY="X",e.EXCLUDING="e",e.QUIET="q",e.RECURSIVE="d"}(i=t.CleanOptions||(t.CleanOptions={}));const a=new Set(["i",...s.asStringArray(Object.values(i))]);function c(e,t){return{commands:["clean","-"+e,...t],format:"utf-8",parser:t=>n.cleanSummaryParser(e===i.DRY_RUN,t)}}function u(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:"--interactive"===e}t.cleanWithOptionsTask=function(e,r){const{cleanMode:n,options:s,valid:l}=function(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach((e=>{var s;!function(e){return e===i.FORCE||e===i.DRY_RUN}(e)?n.options=n.options&&(s=r[r.length]="-"+e,/^-[a-z]$/i.test(s)&&a.has(s.charAt(1))):(t=e,n.cleanMode=!0)})),{cleanMode:t,options:r,valid:n}}(e);return n?l.options?(s.push(...r),s.some(u)?o.configurationErrorTask(t.CONFIG_ERROR_INTERACTIVE_MODE):c(n,s)):o.configurationErrorTask(t.CONFIG_ERROR_UNKNOWN_OPTION+JSON.stringify(e)):o.configurationErrorTask(t.CONFIG_ERROR_MODE_REQUIRED)},t.cleanTask=c,t.isCleanOptionsArray=function(e){return Array.isArray(e)&&e.every((e=>a.has(e)))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7);t.filterType=function(e,t,r){return t(e)?e:arguments.length>2?r:void 0},t.filterArray=e=>Array.isArray(e),t.filterPrimitives=function(e,t){return/number|string|boolean/.test(typeof e)&&(!t||!t.includes(typeof e))},t.filterString=e=>"string"==typeof e,t.filterPlainObject=function(e){return!!e&&"[object Object]"===n.objectToString(e)},t.filterFunction=function(e){return"function"==typeof e},t.filterHasLength=e=>null!=e&&!"number|boolean|function".includes(typeof e)&&(Array.isArray(e)||"string"==typeof e||"number"==typeof e.length)},function(e,t,r){"undefined"==typeof process||"renderer"===process.type||process.__nwjs?e.exports=r(56):e.exports=r(58)},function(e,t,r){e.exports=function(e){function t(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return n.colors[Math.abs(t)%n.colors.length]}function n(e){let r;function i(...e){if(!i.enabled)return;const t=i,s=Number(new Date),o=s-(r||s);t.diff=o,t.prev=r,t.curr=s,r=s,e[0]=n.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,s)=>{if("%%"===r)return r;a++;const o=n.formatters[s];if("function"==typeof o){const n=e[a];r=o.call(t,n),e.splice(a,1),a--}return r})),n.formatArgs.call(t,e),(t.log||n.log).apply(t,e)}return i.namespace=e,i.enabled=n.enabled(e),i.useColors=n.useColors(),i.color=t(e),i.destroy=s,i.extend=o,"function"==typeof n.init&&n.init(i),n.instances.push(i),i}function s(){const e=n.instances.indexOf(this);return-1!==e&&(n.instances.splice(e,1),!0)}function o(e,t){const r=n(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){const e=[...n.names.map(i),...n.skips.map(i).map((e=>"-"+e))].join(",");return n.enable(""),e},n.enable=function(e){let t;n.save(e),n.names=[],n.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),s=r.length;for(t=0;s>t;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")));for(t=0;t<n.instances.length;t++){const e=n.instances[t];e.enabled=n.enabled(e.namespace)}},n.enabled=function(e){if("*"===e[e.length-1])return!0;let t,r;for(t=0,r=n.skips.length;r>t;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;r>t;t++)if(n.names[t].test(e))return!0;return!1},n.humanize=r(57),Object.keys(e).forEach((t=>{n[t]=e[t]})),n.instances=[],n.names=[],n.skips=[],n.formatters={},n.selectColor=t,n.enable(n.load()),n}},function(e,t){e.exports=require("tty")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8);class s extends n.GitError{constructor(e){super(void 0,e)}}t.TaskConfigurationError=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(0);var s;!function(e){e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root"}(s=t.CheckRepoActions||(t.CheckRepoActions={}));const o=(e,t,r,s)=>{if(e===n.ExitCodes.UNCLEAN&&/(Not a git repository|Kein Git-Repository)/i.test(t))return r("false");s(t)},i=e=>"true"===e.trim();function a(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:o,parser:e=>/^\.(git)?$/.test(e.trim())}}function c(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:o,parser:i}}t.checkIsRepoTask=function(e){switch(e){case s.BARE:return c();case s.IS_REPO_ROOT:return a()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:o,parser:i}},t.checkIsRepoRootTask=a,t.checkIsBareRepoTask=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1);var s;!function(e){e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep"}(s=t.ResetMode||(t.ResetMode={}));const o=Array.from(Object.values(s));function i(e){return o.includes(e)}t.resetTask=function(e,t){const r=["reset"];return i(e)&&r.push("--"+e),r.push(...t),n.straightThroughStringTask(r)},t.getResetMode=function(e){if(i(e))return e;switch(typeof e){case"string":case"undefined":return s.SOFT}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(87),s=r(0),o=r(29),i=[new s.LineParser(/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,((e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)})),new s.LineParser(/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,((e,[t,,r,,n])=>(void 0!==r||void 0!==n)&&(e.summary.changes=+t||0,e.summary.insertions=+r||0,e.summary.deletions=+n||0,!0))),new s.LineParser(/^(create|delete) mode \d+ (.+)/,((e,[t,r])=>{s.append(e.files,r),s.append("create"===t?e.created:e.deleted,r)}))];t.parsePullDetail=(e,t)=>s.parseStringResponse(new n.PullSummary,i,`${e}\n${t}`),t.parsePullResult=(e,r)=>Object.assign(new n.PullSummary,t.parsePullDetail(e,r),o.parseRemoteMessages(e,r))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(0),s=r(88),o=[new n.RemoteLineParser(/^remote:\s*(.+)$/,((e,[t])=>(e.remoteMessages.all.push(t.trim()),!1))),...s.remoteMessagesObjectParsers,new n.RemoteLineParser([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],((e,[t])=>{e.remoteMessages.pullRequestUrl=t})),new n.RemoteLineParser([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],((e,[t,r,s])=>{e.remoteMessages.vulnerabilities={count:n.asNumber(t),summary:r,url:s}}))];t.parseRemoteMessages=function(e,t){return n.parseStringResponse({remoteMessages:new i},o,t)};class i{constructor(){this.all=[]}}t.RemoteMessageSummary=i},function(e,t){e.exports=require("yargs")},function(e,t){e.exports=require("essential-config")},function(e,t){e.exports=require("jaid-logger")},function(e,t){e.exports=require("which")},function(e,t){e.exports=require("readable-ms")},function(e,t){e.exports=require("ensure-array")},function(e,t){e.exports=require("fetch-git-repo")},function(e,t){e.exports=require("handlebars")},function(e,t){e.exports=require("is-git-repo-dirty")},function(e,t){e.exports=require("npm-check-updates")},function(e,t){e.exports=require("npm-name-exists")},function(e,t){e.exports=require("open")},function(e,t){e.exports=require("replace-in-file")},function(e,t,r){const{esModuleFactory:n,gitExportFactory:s}=r(18),{gitP:o}=r(103);e.exports=n(s(o))},function(e,t){e.exports=require("validate-npm-package-name")},function(e,t,r){const n=r(46),{GitExecutor:s}=r(50),{Scheduler:o}=r(71),{GitLogger:i}=r(10),{adhocExecTask:a,configurationErrorTask:c}=r(1),{NOOP:u,appendTaskOptions:l,asArray:p,filterArray:f,filterPrimitives:d,filterString:h,filterType:m,folderExists:g,getTrailingOptions:y,trailingFunctionArgument:b,trailingOptionsArgument:_}=r(0),{branchTask:O,branchLocalTask:v,deleteBranchesTask:C,deleteBranchTask:w}=r(73),{taskCallback:k}=r(78),{checkIsRepoTask:T}=r(26),{cloneTask:E,cloneMirrorTask:P}=r(79),{addConfigTask:R,listConfigTask:S}=r(80),{cleanWithOptionsTask:x,isCleanOptionsArray:j}=r(20),{initTask:M}=r(82),{mergeTask:F}=r(84),{moveTask:A}=r(89),{pullTask:L}=r(91),{pushTagsTask:N,pushTask:D}=r(92),{addRemoteTask:I,getRemotesTask:G,listRemotesTask:B,remoteTask:$,removeRemoteTask:U}=r(94),{getResetMode:q,resetTask:z}=r(27),{statusTask:H}=r(96),{addSubModuleTask:V,initSubModuleTask:Y,subModuleTask:W,updateSubModuleTask:K}=r(99),{addAnnotatedTagTask:Q,addTagTask:J,tagListTask:X}=r(100),{straightThroughStringTask:Z}=r(1),{parseCheckIgnore:ee}=r(102),te=Symbol("ChainedExecutor");function re(e){this._executor=new s(e.binary,e.baseDir,new o(e.maxConcurrentProcesses)),this._logger=new i}function ne(e,t,r,n){return"string"!=typeof r?c(`git.${e}() requires a string 'repoPath'`):t(r,m(n,h),y(arguments))}function se(e){return n[e]}re.prototype._executor=null,re.prototype._logger=null,re.prototype.customBinary=function(e){return this._executor.binary=e,this},re.prototype.env=function(e,t){return 1===arguments.length&&"object"==typeof e?this._executor.env=e:(this._executor.env=this._executor.env||{})[e]=t,this},re.prototype.cwd=function(e,t){const r="string"!=typeof e?c("Git.cwd: workingDirectory must be supplied as a string"):a((()=>{if(!g(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return this._executor.cwd=e}));return this._runTask(r,b(arguments)||u)},re.prototype.outputHandler=function(e){return this._executor.outputHandler=e,this},re.prototype.init=function(e,t){return this._runTask(M(!0===e,this._executor.cwd,y(arguments)),b(arguments))},re.prototype.status=function(){return this._runTask(H(y(arguments)),b(arguments))},re.prototype.stashList=function(e,t){var r=b(arguments),n=(r===t?e:null)||{},s=n.splitter||se("ListLogSummary").SPLITTER,o=["stash","list","--pretty=format:"+se("ListLogSummary").START_BOUNDARY+"%H %ai %s%d %aN %ae".replace(/\s+/g,s)+se("ListLogSummary").COMMIT_BOUNDARY];return Array.isArray(n)&&(o=o.concat(n)),this._run(o,r,{parser:re.responseParser("ListLogSummary",s)})},re.prototype.stash=function(e,t){return this._run(["stash"].concat(y(arguments)),b(arguments))},re.prototype.clone=function(){return this._runTask(ne("clone",E,...arguments),b(arguments))},re.prototype.mirror=function(){return this._runTask(ne("mirror",P,...arguments),b(arguments))},re.prototype.mv=function(e,t){return this._runTask(A(e,t),b(arguments))},re.prototype.checkoutLatestTag=function(e){var t=this;return this.pull((function(){t.tags((function(r,n){t.checkout(n.latest,e)}))}))},re.prototype.add=function(e){return this._run(["add"].concat(e),b(arguments))},re.prototype.commit=function(e,t,r,n){var s=["commit"];return p(e).forEach((function(e){s.push("-m",e)})),p("string"==typeof t||Array.isArray(t)?t:[]).forEach((e=>s.push(e))),s.push(...y(arguments,0,!0)),this._run(s,b(arguments),{parser:re.responseParser("CommitSummary")})},re.prototype.pull=function(e,t,r,n){return this._runTask(L(m(e,h),m(t,h),y(arguments)),b(arguments))},re.prototype.fetch=function(e,t,r){const n=["fetch"].concat(y(arguments));return"string"==typeof e&&"string"==typeof t&&n.push(e,t),this._run(n,b(arguments),{concatStdErr:!0,parser:re.responseParser("FetchSummary")})},re.prototype.silent=function(e){return this._logger.silent(!!e),this},re.prototype.tags=function(e,t){return this._runTask(X(y(arguments)),b(arguments))},re.prototype.rebase=function(e,t){return this._run(["rebase"].concat(y(arguments)),b(arguments))},re.prototype.reset=function(e,t){return this._runTask(z(q(e),y(arguments)),b(arguments))},re.prototype.revert=function(e,t,r){const n=b(arguments);return"string"!=typeof e?this._runTask(c("Commit must be a string"),n):this._run(["revert",...y(arguments,0,!0),e],n)},re.prototype.addTag=function(e,t){const r="string"==typeof e?J(e):c("Git.addTag requires a tag name");return this._runTask(r,b(arguments))},re.prototype.addAnnotatedTag=function(e,t,r){return this._runTask(Q(e,t),b(arguments))},re.prototype.checkout=function(e,t){const r=["checkout",...y(arguments,!0)];return this._runTask(Z(r),b(arguments))},re.prototype.checkoutBranch=function(e,t,r){return this.checkout(["-b",e,t],b(arguments))},re.prototype.checkoutLocalBranch=function(e,t){return this.checkout(["-b",e],b(arguments))},re.prototype.deleteLocalBranch=function(e,t,r){return this._runTask(w(e,"boolean"==typeof t&&t),b(arguments))},re.prototype.deleteLocalBranches=function(e,t,r){return this._runTask(C(e,"boolean"==typeof t&&t),b(arguments))},re.prototype.branch=function(e,t){return this._runTask(O(y(arguments)),b(arguments))},re.prototype.branchLocal=function(e){return this._runTask(v(),b(arguments))},re.prototype.addConfig=function(e,t,r,n){return this._runTask(R(e,t,"boolean"==typeof r&&r),b(arguments))},re.prototype.listConfig=function(){return this._runTask(S(),b(arguments))},re.prototype.raw=function(e){const t=!Array.isArray(e),r=[].slice.call(t?arguments:e,0);for(let e=0;e<r.length&&t;e++)if(!d(r[e])){r.splice(e,r.length-e);break}r.push(...y(arguments,0,!0));var n=b(arguments);return r.length?this._run(r,n):this._runTask(c("Raw: must supply one or more command to execute"),n)},re.prototype.submoduleAdd=function(e,t,r){return this._runTask(V(e,t),b(arguments))},re.prototype.submoduleUpdate=function(e,t){return this._runTask(K(y(arguments,!0)),b(arguments))},re.prototype.submoduleInit=function(e,t){return this._runTask(Y(y(arguments,!0)),b(arguments))},re.prototype.subModule=function(e,t){return this._runTask(W(y(arguments)),b(arguments))},re.prototype.listRemote=function(){return this._runTask(B(y(arguments)),b(arguments))},re.prototype.addRemote=function(e,t,r){return this._runTask(I(e,t,y(arguments)),b(arguments))},re.prototype.removeRemote=function(e,t){return this._runTask(U(e),b(arguments))},re.prototype.getRemotes=function(e,t){return this._runTask(G(!0===e),b(arguments))},re.prototype.remote=function(e,t){return this._runTask($(y(arguments)),b(arguments))},re.prototype.mergeFromTo=function(e,t){return h(e)&&h(t)?this._runTask(F([e,t,...y(arguments)]),b(arguments,!1)):this._runTask(c("Git.mergeFromTo requires that the 'from' and 'to' arguments are supplied as strings"))},re.prototype.merge=function(){return this._runTask(F(y(arguments)),b(arguments))},re.prototype.tag=function(e,t){const r=y(arguments);return"tag"!==r[0]&&r.unshift("tag"),this._run(r,b(arguments))},re.prototype.updateServerInfo=function(e){return this._run(["update-server-info"],b(arguments))},re.prototype.push=function(e,t,r){const n=D({remote:m(e,h),branch:m(t,h)},y(arguments));return this._runTask(n,b(arguments))},re.prototype.pushTags=function(e,t){const r=N({remote:m(e,h)},y(arguments));return this._runTask(r,b(arguments))},re.prototype.rm=function(e,t){return this._rm(e,"-f",t)},re.prototype.rmKeepLocal=function(e,t){return this._rm(e,"--cached",t)},re.prototype.catFile=function(e,t){return this._catFile("utf-8",arguments)},re.prototype.binaryCatFile=function(e,t){return this._catFile("buffer",arguments)},re.prototype._catFile=function(e,t){var r=b(t),n=["cat-file"],s=t[0];return"string"==typeof s?this._runTask(c("Git#catFile: options must be supplied as an array of strings"),r):(Array.isArray(s)&&n.push.apply(n,s),this._run(n,r,{format:e}))},re.prototype.diff=function(e,t){const r=["diff",...y(arguments)];return"string"==typeof e&&(r.splice(1,0,e),this._logger.warn("Git#diff: supplying options as a single string is now deprecated, switch to an array of strings")),this._runTask(Z(r),b(arguments))},re.prototype.diffSummary=function(){return this._run(["diff","--stat=4096",...y(arguments,!0)],b(arguments),{parser:re.responseParser("DiffSummary")})},re.prototype.revparse=function(e,t){const r=["rev-parse",...y(arguments,!0)];return this._runTask(Z(r,!0),b(arguments))},re.prototype.show=function(e,t){var r=b(arguments)||u,n=["show"];return("string"==typeof e||Array.isArray(e))&&(n=n.concat(e)),this._run(n,(function(e,t){e?r(e):r(null,t)}))},re.prototype.clean=function(e,t,r){const n=j(e),s=n&&e.join("")||m(e,h)||"",o=y([].slice.call(arguments,n?1:0));return this._runTask(x(s,o),b(arguments))},re.prototype.exec=function(e){const t={commands:[],format:"utf-8",parser(){"function"==typeof e&&e()}};return this._runTask(t)},re.prototype.log=function(e,t){var r=b(arguments),n=_(arguments)||{},s=n.splitter||se("ListLogSummary").SPLITTER,o=n.format||{hash:"%H",date:!1===n.strictDate?"%ai":"%aI",message:"%s",refs:"%D",body:n.multiLine?"%B":"%b",author_name:"%aN",author_email:"%ae"},i=!1!==n.symmetric?"...":"..",a=Object.keys(o),c=a.map((function(e){return o[e]})).join(s),u=[],p=["log","--pretty=format:"+se("ListLogSummary").START_BOUNDARY+c+se("ListLogSummary").COMMIT_BOUNDARY];return f(e)?(p=p.concat(e),n={}):"string"!=typeof arguments[0]&&"string"!=typeof arguments[1]||(this._logger.warn("Git#log: supplying to or from as strings is now deprecated, switch to an options configuration object"),n={from:arguments[0],to:arguments[1]}),(n.n||n["max-count"])&&p.push("--max-count="+(n.n||n["max-count"])),n.from&&n.to&&p.push(n.from+i+n.to),n.file&&u.push("--follow",e.file),"splitter n max-count file from to --pretty format symmetric multiLine strictDate".split(" ").forEach((function(e){delete n[e]})),l(n,p),this._run(p.concat(u),r,{parser:re.responseParser("ListLogSummary",[s,a])})},re.prototype.clearQueue=function(){return this},re.prototype.checkIgnore=function(e,t){var r=b(arguments),n=["check-ignore"];return r!==e&&(n=n.concat(e)),this._run(n,(function(e,t){r&&r(e,!e&&ee(t))}))},re.prototype.checkIsRepo=function(e,t){return this._runTask(T(m(e,h)),b(arguments))},re.prototype._rm=function(e,t,r){var n=[].concat(e),s=["rm",t];return s.push.apply(s,n),this._run(s,b(arguments))},re.prototype._run=function(e,t,r){const n=Object.assign({concatStdErr:!1,onError:void 0,format:"utf-8",parser:e=>e},r||{},{commands:e});return this._runTask(n,t)},re.prototype._runTask=function(e,t){const r=this[te]||this._executor.chain(),n=r.push(e);return k(e,n,t),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},[te]:{value:r}})},re.fail=function(e,t,r){e._logger.error(t),e.clearQueue(),"function"==typeof r&&r.call(e,t,null)},re.responseParser=function(e,t){const r=se(e);return function(e){return r.parse.apply(r,[e].concat(void 0===t?[]:t))}},re.exception=function(e,t,r){const n=t instanceof Error?t:new Error(t);throw"function"==typeof r&&r(n),n},e.exports=re},function(e,t,r){e.exports={CommitSummary:r(47),DiffSummary:r(19),FetchSummary:r(48),ListLogSummary:r(49)}},function(e,t){function r(){this.branch="",this.commit="",this.summary={changes:0,insertions:0,deletions:0},this.author=null}e.exports=r;var n=/\[([^\s]+) ([^\]]+)/,s=/\s*Author:\s(.+)/i;r.parse=function(e){var t=e.trim().split("\n"),o=new r;return function(e,t){t&&(e.branch=t[1],e.commit=t[2])}(o,n.exec(t.shift())),s.test(t[0])&&function(e,t){var r=t[1].split("<"),n=r.pop();n.indexOf("@")>0&&(e.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}(o,s.exec(t.shift())),function(e,t){e.branch&&t&&(e.summary.changes=parseInt(t[1],10)||0,e.summary.insertions=parseInt(t[2],10)||0,e.summary.deletions=parseInt(t[3],10)||0)}(o,/(\d+)[^,]*(?:,\s*(\d+)[^,]*)?(?:,\s*(\d+))?/g.exec(t.shift())),o}},function(e,t,r){"use strict";function n(e){this.raw=e,this.remote=null,this.branches=[],this.tags=[]}n.parsers=[[/From (.+)$/,function(e,t){e.remote=t[0]}],[/\* \[new branch\]\s+(\S+)\s*\-> (.+)$/,function(e,t){e.branches.push({name:t[0],tracking:t[1]})}],[/\* \[new tag\]\s+(\S+)\s*\-> (.+)$/,function(e,t){e.tags.push({name:t[0],tracking:t[1]})}]],n.parse=function(e){var t=new n(e);return String(e).trim().split("\n").forEach((function(e){var r=e.trim();n.parsers.some((function(e){var n=e[0].exec(r);if(n)return e[1](t,n.slice(1)),!0}))})),t},e.exports=n},function(e,t,r){e.exports=s;var n=r(19);function s(e){this.all=e,this.latest=e.length&&e[0]||null,this.total=e.length}function o(e,t){for(var r=0;r<t.length;r++)this[t[r]]=e[r]||""}s.prototype.all=null,s.prototype.latest=null,s.prototype.total=0,o.prototype.diff=null,s.START_BOUNDARY="òòòòòò ",s.COMMIT_BOUNDARY=" òò",s.SPLITTER=" ò ",s.parse=function(e,t,r){return r=r||["hash","date","message","refs","author_name","author_email"],new s(e.trim().split(s.START_BOUNDARY).filter((function(e){return!!e.trim()})).map((function(e){var i=e.trim().split(s.COMMIT_BOUNDARY),a=new o(i[0].trim().split(t),r);return i.length>1&&i[1].trim()&&(a.diff=n.parse(i[1])),a})))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(51);t.GitExecutor=class{constructor(e="git",t,r){this.binary=e,this.cwd=t,this._scheduler=r,this._chain=new n.GitExecutorChain(this,this._scheduler)}chain(){return new n.GitExecutorChain(this,this._scheduler)}push(e){return this._chain.push(e)}}},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,o){function i(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const s=r(52),o=r(4),i=r(1),a=r(70),c=r(0);function u(e,t,r,n){return s=>{r("%s received %L bytes",t,s),n("%B",s),e.push(s)}}t.GitExecutorChain=class{constructor(e,t){this._executor=e,this._scheduler=t,this._chain=Promise.resolve(),this._queue=new a.TasksPendingQueue}get binary(){return this._executor.binary}get outputHandler(){return this._executor.outputHandler}get cwd(){return this._executor.cwd}get env(){return this._executor.env}push(e){return this._queue.push(e),this._chain=this._chain.then((()=>this.attemptTask(e)))}attemptTask(e){return n(this,void 0,void 0,(function*(){const t=yield this._scheduler.next(),r=()=>this._queue.complete(e);try{const{logger:n}=this._queue.attempt(e);return yield i.isEmptyTask(e)?this.attemptEmptyTask(e,n):this.attemptRemoteTask(e,n)}catch(t){throw this.onFatalException(e,t)}finally{r(),t()}}))}onFatalException(e,t){const r=t instanceof o.GitError?Object.assign(t,{task:e}):new o.GitError(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}attemptRemoteTask(e,t){return n(this,void 0,void 0,(function*(){const r=yield this.gitResponse(this.binary,e.commands,this.outputHandler,t.step("SPAWN")),n=yield this.handleTaskData(e,r,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),i.isBufferTask(e)?c.callTaskParser(e.parser,n):c.callTaskParser(e.parser,n.asStrings())}))}attemptEmptyTask(e,t){return n(this,void 0,void 0,(function*(){return t("empty task bypassing child process to call to task's parser"),e.parser()}))}handleTaskData({onError:e,concatStdErr:t},{exitCode:r,stdOut:n,stdErr:s},o){return new Promise(((i,a)=>(o("Preparing to handle process response exitCode=%d stdOut=",r),r&&s.length&&e?(o.info("exitCode=%s handling with custom error handler"),o("concatenate stdErr to stdOut: %j",t),e(r,Buffer.concat([...t?n:[],...s]).toString("utf-8"),(e=>{o.info("custom error handler treated as success"),o("custom error returned a %s",c.objectToString(e)),i(new c.GitOutputStreams(Buffer.isBuffer(e)?e:Buffer.from(String(e)),Buffer.concat(s)))}),a)):r&&s.length?(o.info("exitCode=%s treated as error when then child process has written to stdErr"),a(Buffer.concat(s).toString("utf-8"))):(t&&(o("concatenating stdErr onto stdOut before processing"),o("stdErr: $O",s),n.push(...s)),o.info("retrieving task output complete"),void i(new c.GitOutputStreams(Buffer.concat(n),Buffer.concat(s)))))))}gitResponse(e,t,r,o){return n(this,void 0,void 0,(function*(){const n=o.sibling("output"),i={cwd:this.cwd,env:this.env,windowsHide:!0};return new Promise((a=>{const c=[],l=[];let p=!1;function f(e,t="retry"){(p||l.length||c.length)&&(o.info("exitCode=%s event=%s",e,t),a({stdOut:c,stdErr:l,exitCode:e}),p=!0,n.destroy()),p||(p=!0,setTimeout((()=>f(e,"deferred")),50),o("received %s event before content on stdOut/stdErr",t))}o.info("%s %o",e,t),o("%O",i);const d=s.spawn(e,t,i);d.stdout.on("data",u(c,"stdOut",o,n.step("stdOut"))),d.stderr.on("data",u(l,"stdErr",o,n.step("stdErr"))),d.on("error",function(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}(l,o)),d.on("close",(e=>f(e,"close"))),d.on("exit",(e=>f(e,"exit"))),r&&(o("Passing child process stdOut/stdErr to custom outputHandler"),r(e,d.stdout,d.stderr,[...t]))}))}))}}},function(e,t){e.exports=require("child_process")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(0);class s{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}}t.CleanResponse=s;const o=/\/$/;t.cleanSummaryParser=function(e,t){const r=new s(e),i=e?/^[a-z]+\s+[a-z]+\s*/i:/^[a-z]+\s*/i;return n.toLinesWithContent(t).forEach((e=>{const t=e.replace(i,"");r.paths.push(t),(o.test(t)?r.folders:r.files).push(t)})),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(55))},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(11),o=n(r(22)).default("@kwsites/file-exists");t.exists=function(e,r=t.READABLE){return function(e,t,r){o("checking %s",e);try{const n=s.statSync(e);return n.isFile()&&t?(o("[OK] path represents a file"),!0):n.isDirectory()&&r?(o("[OK] path represents a directory"),!0):(o("[FAIL] path represents something other than a file or directory"),!1)}catch(e){if("ENOENT"===e.code)return o("[FAIL] path is not accessible: %o",e),!1;throw o("[FATAL] %o",e),e}}(e,(r&t.FILE)>0,(r&t.FOLDER)>0)},t.FILE=1,t.FOLDER=2,t.READABLE=t.FILE+t.FOLDER},function(e,t,r){t.log=function(...e){return"object"==typeof console&&console.log&&console.log(...e)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,s=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(s=n))})),t.splice(s,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=r(23)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},function(e,t){var r=1e3,n=60*r,s=60*n,o=24*s;function i(e,t,r,n){var s=t>=1.5*r;return Math.round(e/r)+" "+n+(s?"s":"")}e.exports=function(e,t){t=t||{};var a,c,u=typeof e;if("string"===u&&e.length>0)return function(e){if(100>=(e=String(e)).length){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var i=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"weeks":case"week":case"w":return 6048e5*i;case"days":case"day":case"d":return i*o;case"hours":case"hour":case"hrs":case"hr":case"h":return i*s;case"minutes":case"minute":case"mins":case"min":case"m":return i*n;case"seconds":case"second":case"secs":case"sec":case"s":return i*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}(e);if("number"===u&&isFinite(e))return t.long?(a=e,c=Math.abs(a),o>c?s>c?n>c?r>c?a+" ms":i(a,c,r,"second"):i(a,c,n,"minute"):i(a,c,s,"hour"):i(a,c,o,"day")):function(e){var t=Math.abs(e);return o>t?s>t?n>t?r>t?e+"ms":Math.round(e/r)+"s":Math.round(e/n)+"m":Math.round(e/s)+"h":Math.round(e/o)+"d"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){const n=r(24),s=r(59);t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(...e){return process.stderr.write(s.format(...e)+"\n")},t.formatArgs=function(r){const{namespace:n,useColors:s}=this;if(s){const t=this.color,s="[3"+(8>t?t:"8;5;"+t),o=` ${s};1m${n} [0m`;r[0]=o+r[0].split("\n").join("\n"+o),r.push(s+"m+"+e.exports.humanize(this.diff)+"[0m")}else r[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+n+" "+r[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.colors=[6,2,3,4,5,1];try{const e=r(60);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),e.exports=r(23)(t);const{formatters:o}=e.exports;o.o=function(e){return this.inspectOpts.colors=this.useColors,s.inspect(e,this.inspectOpts).replace(/\s*\n\s*/g," ")},o.O=function(e){return this.inspectOpts.colors=this.useColors,s.inspect(e,this.inspectOpts)}},function(e,t){e.exports=require("util")},function(e,t,r){"use strict";const n=r(61),s=r(24),o=r(62),{env:i}=process;let a;function c(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function u(e,t){if(0===a)return 0;if(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(e&&!t&&void 0===a)return 0;const r=a||0;if("dumb"===i.TERM)return r;if("win32"===process.platform){const e=n.release().split(".");return 10>Number(e[0])||10586>Number(e[2])?1:14931>Number(e[2])?2:3}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in i))||"codeship"===i.CI_NAME?1:r;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in i)return 1;if("truecolor"===i.COLORTERM)return 3;if("TERM_PROGRAM"in i){const e=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return 3>e?2:3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:r}o("no-color")||o("no-colors")||o("color=false")||o("color=never")?a=0:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(a=1),"FORCE_COLOR"in i&&(a="true"===i.FORCE_COLOR?1:"false"===i.FORCE_COLOR?0:0===i.FORCE_COLOR.length?1:Math.min(parseInt(i.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return c(u(e,e&&e.isTTY))},stdout:c(u(!0,s.isatty(1))),stderr:c(u(!0,s.isatty(2)))}},function(e,t){e.exports=require("os")},function(e,t,r){"use strict";e.exports=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return-1!==n&&(-1===s||s>n)}},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),(n=t.ExitCodes||(t.ExitCodes={}))[n.SUCCESS=0]="SUCCESS",n[n.ERROR=1]="ERROR",n[n.UNCLEAN=128]="UNCLEAN"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e,t){this.stdOut=e,this.stdErr=t}asStrings(){return new n(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}t.GitOutputStreams=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e,t){this.matches=[],this.parse=(e,t)=>(this.resetMatches(),!!this._regExp.every(((t,r)=>this.addMatch(t,r,e(r))))&&!1!==this.useMatches(t,this.prepareMatches())),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}useMatches(e,t){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){const n=r&&e.exec(r);return n&&this.pushMatch(t,n),!!n}pushMatch(e,t){this.matches.push(...t.slice(1))}}t.LineParser=n,t.RemoteLineParser=class extends n{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={binary:"git",maxConcurrentProcesses:5};t.createInstanceConfig=function(...e){const t=process.cwd(),r=Object.assign(Object.assign({baseDir:t},n),...e.filter((e=>"object"==typeof e&&e)));return r.baseDir=r.baseDir||t,r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(21),s=r(7);function o(e,t=[]){return n.filterPlainObject(e)?Object.keys(e).reduce(((t,r)=>{const s=e[r];return n.filterPrimitives(s,["boolean"])?t.push(r+"="+s):t.push(r),t}),t):t}function i(e){const t=n.filterFunction(s.last(e));return n.filterType(s.last(e,t?1:0),n.filterPlainObject)}t.appendTaskOptions=o,t.getTrailingOptions=function(e,t=0,r=!1){const a=[];for(let r=0,n=0>t?e.length:t;n>r;r++)"string|number".includes(typeof e[r])&&a.push(String(e[r]));return o(i(e),a),r||a.push(...function(e){const t="function"==typeof s.last(e);return n.filterType(s.last(e,t?1:0),n.filterArray,[])}(e)),a},t.trailingOptionsArgument=i,t.trailingFunctionArgument=function(e,t=!0){const r=s.asFunction(s.last(e));return t||s.isUserFunction(r)?r:void 0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7);t.callTaskParser=function(e,t){return e(t.stdOut,t.stdErr)},t.parseStringResponse=function(e,t,r){for(let s=n.toLinesWithContent(r),o=0,i=s.length;i>o;o++){const r=(e=0)=>{if(i>o+e)return s[o+e]};t.some((({parse:t})=>t(r,e)))}return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8);class s extends n.GitError{constructor(e,t){super(void 0,t),this.config=e}}t.GitConstructError=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10),s=r(4);class o{constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){const t=o.getName(e.commands[0]);return{task:e,logger:n.createLogger(this.logLabel,t),name:t}}push(e){const t=this.createProgress(e);return t.logger("Adding task to the queue, commands = %o",e.commands),this._queue.set(e,t),t}fatal(e){for(const[t,{logger:r}]of Array.from(this._queue.entries()))t===e.task?(r.info("Failed %o",e),r("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):r.info("A fatal exception occurred in a previous task, the queue has been purged: %o",e.message),this.complete(t);if(0!==this._queue.size)throw new Error("Queue size should be zero after fatal: "+this._queue.size)}complete(e){const t=this.withProgress(e);t&&(t.logger.destroy(),this._queue.delete(e))}attempt(e){const t=this.withProgress(e);if(!t)throw new s.GitError(void 0,"TasksPendingQueue: attempt called for an unknown task");return t.logger("Starting task"),t}static getName(e="empty"){return`task:${e}:${++o.counter}`}}t.TasksPendingQueue=o,o.counter=0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(0),s=r(72),o=r(10).createLogger("","scheduler"),i=(()=>{let e=0;return()=>{e++;const{promise:t,done:r}=s.createDeferred();return{promise:t,done:r,id:e}}})();t.Scheduler=class{constructor(e=2){this.concurrency=e,this.pending=[],this.running=[],o("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency)return void o("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);const e=n.append(this.running,this.pending.shift());o("Attempting id=%s",e.id),e.done((()=>{o("Completing id=",e.id),n.remove(this.running,e),this.schedule()}))}next(){const{promise:e,id:t}=n.append(this.pending,i());return o("Scheduling id=%s",t),this.schedule(),e}}},function(e,t,r){"use strict";function n(){let e,t,r="pending";return{promise:new Promise(((r,n)=>{e=r,t=n})),done(t){"pending"===r&&(r="resolved",e(t))},fail(e){"pending"===r&&(r="rejected",t(e))},get fulfilled(){return"pending"!==r},get status(){return r}}}Object.defineProperty(t,"__esModule",{value:!0}),t.createDeferred=t.deferred=void 0,t.deferred=n,t.createDeferred=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9),s=r(74),o=r(76);function i(e){const t=["-d","-D","--delete"];return e.some((e=>t.includes(e)))}t.containsDeleteBranchCommand=i,t.branchTask=function(e){const t=i(e),r=["branch",...e];return 1===r.length&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser:(e,r)=>t?s.parseBranchDeletions(e,r).all[0]:o.parseBranchSummary(e,r)}},t.branchLocalTask=function(){return{format:"utf-8",commands:["branch","-v"],parser:(e,t)=>o.parseBranchSummary(e,t)}},t.deleteBranchesTask=function(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser:(e,t)=>s.parseBranchDeletions(e,t),onError(e,t,r,n){if(!s.hasBranchDeletionError(t,e))return n(t);r(t)},concatStdErr:!0}},t.deleteBranchTask=function(e,t=!1){const r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser:(t,r)=>s.parseBranchDeletions(t,r).branches[e],onError(e,t,o,i){if(!s.hasBranchDeletionError(t,e))return i(t);throw new n.GitResponseError(r.parser(t,""),t)},concatStdErr:!0};return r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(75),s=r(0),o=/^error[^']+'([^']+)'/m,i=[new s.LineParser(/(\S+)\s+\(\S+\s([^)]+)\)/,((e,[t,r])=>{const s=n.branchDeletionSuccess(t,r);e.all.push(s),e.branches[t]=s})),new s.LineParser(o,((e,[t])=>{const r=n.branchDeletionFailure(t);e.errors.push(r),e.all.push(r),e.branches[t]=r}))];t.parseBranchDeletions=e=>s.parseStringResponse(new n.BranchDeletionBatch,i,e),t.hasBranchDeletionError=function(e,t){return t===s.ExitCodes.ERROR&&o.test(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BranchDeletionBatch=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}},t.branchDeletionSuccess=function(e,t){return{branch:e,hash:t,success:!0}},t.branchDeletionFailure=function(e){return{branch:e,hash:null,success:!1}},t.isSingleBranchDeleteFailure=function(e){return e.success}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(77),s=r(0),o=[new s.LineParser(/^(\*\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,((e,[t,r,n,s])=>{e.push(!!t,!0,r,n,s)})),new s.LineParser(/^(\*\s)?(\S+)\s+([a-z0-9]+)\s(.*)$/,((e,[t,r,n,s])=>{e.push(!!t,!1,r,n,s)}))];t.parseBranchSummary=function(e){return s.parseStringResponse(new n.BranchSummaryResult,o,e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BranchSummaryResult=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(e,t,r,n,s){e&&(this.detached=t,this.current=r),this.all.push(r),this.branches[r]={current:e,name:r,commit:n,label:s}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4),s=r(0);t.taskCallback=function(e,t,r=s.NOOP){t.then((e=>{r(null,e)}),(t=>{if((null==t?void 0:t.task)===e){if(t instanceof n.GitResponseError)return r(function(e){let t=e=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${e} should be GitResponseError.git.${e}`),t=s.NOOP};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce((function(r,n){return n in e||(r[n]={enu