@lntvow/dev 4.3.9 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +21 -21
- package/dist/cli.mjs +17 -17
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var
|
|
3
|
-
`)}displayWidth(t){return
|
|
2
|
+
"use strict";var Fo=Object.create;var ln=Object.defineProperty;var Mo=Object.getOwnPropertyDescriptor;var Po=Object.getOwnPropertyNames;var Do=Object.getPrototypeOf,Io=Object.prototype.hasOwnProperty;var Lo=(e,t)=>()=>(e&&(t=e(e=0)),t);var z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var jo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Po(t))!Io.call(e,s)&&s!==r&&ln(e,s,{get:()=>t[s],enumerable:!(n=Mo(t,s))||n.enumerable});return e};var _t=(e,t,r)=>(r=e!=null?Fo(Do(e)):{},jo(t||!e||!e.__esModule?ln(r,"default",{value:e,enumerable:!0}):r,e));var No,j,w=Lo(()=>{"use strict";No=()=>typeof document>"u"?new URL(`file:${__filename}`).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href,j=No()});var Yt=z(Ve=>{"use strict";w();var le=class extends Error{constructor(t,r,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},Ge=class extends le{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Ve.CommanderError=le;Ve.InvalidArgumentError=Ge});var he=z(qe=>{"use strict";w();var{InvalidArgumentError:Ho}=Yt(),We=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new Ho(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Bo(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}qe.Argument=We;qe.humanReadableArgName=Bo});var Ye=z(ze=>{"use strict";w();var{humanReadableArgName:Go}=he(),Ue=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){let r=t.commands.filter(s=>!s._hidden),n=t._getHelpCommand();return n&&!n._hidden&&r.push(n),this.sortSubcommands&&r.sort((s,i)=>s.name().localeCompare(i.name())),r}compareOptions(t,r){let n=s=>s.short?s.short.replace(/^-/,""):s.long.replace(/^--/,"");return n(t).localeCompare(n(r))}visibleOptions(t){let r=t.options.filter(s=>!s.hidden),n=t._getHelpOption();if(n&&!n.hidden){let s=n.short&&t._findOption(n.short),i=n.long&&t._findOption(n.long);!s&&!i?r.push(n):n.long&&!i?r.push(t.createOption(n.long,n.description)):n.short&&!s&&r.push(t.createOption(n.short,n.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let n=t.parent;n;n=n.parent){let s=n.options.filter(i=>!i.hidden);r.push(...s)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(n=>Go(n)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((n,s)=>Math.max(n,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(s)))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((n,s)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(s)))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((n,s)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(s)))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((n,s)=>Math.max(n,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(s)))),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let n="";for(let s=t.parent;s;s=s.parent)n=s.name()+" "+n;return n+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0){let n=`(${r.join(", ")})`;return t.description?`${t.description} ${n}`:n}return t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let n=`(${r.join(", ")})`;return t.description?`${t.description} ${n}`:n}return t.description}formatItemList(t,r,n){return r.length===0?[]:[n.styleTitle(t),...r,""]}groupItems(t,r,n){let s=new Map;return t.forEach(i=>{let o=n(i);s.has(o)||s.set(o,[])}),r.forEach(i=>{let o=n(i);s.has(o)||s.set(o,[]),s.get(o).push(i)}),s}formatHelp(t,r){let n=r.padWidth(t,r),s=r.helpWidth??80;function i(u,f){return r.formatItem(u,n,f,r)}let o=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],a=r.commandDescription(t);a.length>0&&(o=o.concat([r.boxWrap(r.styleCommandDescription(a),s),""]));let h=r.visibleArguments(t).map(u=>i(r.styleArgumentTerm(r.argumentTerm(u)),r.styleArgumentDescription(r.argumentDescription(u))));if(o=o.concat(this.formatItemList("Arguments:",h,r)),this.groupItems(t.options,r.visibleOptions(t),u=>u.helpGroupHeading??"Options:").forEach((u,f)=>{let p=u.map(A=>i(r.styleOptionTerm(r.optionTerm(A)),r.styleOptionDescription(r.optionDescription(A))));o=o.concat(this.formatItemList(f,p,r))}),r.showGlobalOptions){let u=r.visibleGlobalOptions(t).map(f=>i(r.styleOptionTerm(r.optionTerm(f)),r.styleOptionDescription(r.optionDescription(f))));o=o.concat(this.formatItemList("Global Options:",u,r))}return this.groupItems(t.commands,r.visibleCommands(t),u=>u.helpGroup()||"Commands:").forEach((u,f)=>{let p=u.map(A=>i(r.styleSubcommandTerm(r.subcommandTerm(A)),r.styleSubcommandDescription(r.subcommandDescription(A))));o=o.concat(this.formatItemList(f,p,r))}),o.join(`
|
|
3
|
+
`)}displayWidth(t){return hn(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,r,n,s){let o=" ".repeat(2);if(!n)return o+t;let a=t.padEnd(r+t.length-s.displayWidth(t)),h=2,c=(this.helpWidth??80)-r-h-2,u;return c<this.minWidthToWrap||s.preformatted(n)?u=n:u=s.boxWrap(n,c).replace(/\n/g,`
|
|
4
4
|
`+" ".repeat(r+h)),o+a+" ".repeat(h)+u.replace(/\n/g,`
|
|
5
5
|
${o}`)}boxWrap(t,r){if(r<this.minWidthToWrap)return t;let n=t.split(/\r\n|\n/),s=/[\s]*[^\s]+/g,i=[];return n.forEach(o=>{let a=o.match(s);if(a===null){i.push("");return}let h=[a.shift()],l=this.displayWidth(h[0]);a.forEach(c=>{let u=this.displayWidth(c);if(l+u<=r){h.push(c),l+=u;return}i.push(h.join(""));let f=c.trimStart();h=[f],l=this.displayWidth(f)}),i.push(h.join(""))}),i.join(`
|
|
6
|
-
`)}};function
|
|
6
|
+
`)}};function hn(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}ze.Help=Ue;ze.stripColor=hn});var Ze=z(Qe=>{"use strict";w();var{InvalidArgumentError:Vo}=Yt(),Je=class{constructor(t,r){this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let n=Wo(t);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new Vo(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,n):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?fn(this.name().replace(/^no-/,"")):fn(this.name())}helpGroup(t){return this.helpGroupHeading=t,this}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Ke=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(t,r){let n=r.attributeName();if(!this.dualOptions.has(n))return!0;let s=this.negativeOptions.get(n).presetArg,i=s!==void 0?s:!1;return r.negate===(i===t)}};function fn(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function Wo(e){let t,r,n=/^-[^-]$/,s=/^--[^-]/,i=e.split(/[ |,]+/).concat("guard");if(n.test(i[0])&&(t=i.shift()),s.test(i[0])&&(r=i.shift()),!t&&n.test(i[0])&&(t=i.shift()),!t&&s.test(i[0])&&(t=r,r=i.shift()),i[0].startsWith("-")){let o=i[0],a=`option creation failed due to '${o}' in option flags '${e}'`;throw/^-[^-][^-]/.test(o)?new Error(`${a}
|
|
7
7
|
- a short flag is a single dash and a single character
|
|
8
8
|
- either use a single dash and a single character (for a short flag)
|
|
9
9
|
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):n.test(o)?new Error(`${a}
|
|
10
10
|
- too many short flags`):s.test(o)?new Error(`${a}
|
|
11
11
|
- too many long flags`):new Error(`${a}
|
|
12
|
-
- unrecognised flag format`)}if(t===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:r}}
|
|
12
|
+
- unrecognised flag format`)}if(t===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:r}}Qe.Option=Je;Qe.DualOptions=Ke});var mn=z(pn=>{"use strict";w();function qo(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let n=0;n<=e.length;n++)r[n]=[n];for(let n=0;n<=t.length;n++)r[0][n]=n;for(let n=1;n<=t.length;n++)for(let s=1;s<=e.length;s++){let i=1;e[s-1]===t[n-1]?i=0:i=1,r[s][n]=Math.min(r[s-1][n]+1,r[s][n-1]+1,r[s-1][n-1]+i),s>1&&n>1&&e[s-1]===t[n-2]&&e[s-2]===t[n-1]&&(r[s][n]=Math.min(r[s][n],r[s-2][n-2]+1))}return r[e.length][t.length]}function Uo(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let r=e.startsWith("--");r&&(e=e.slice(2),t=t.map(o=>o.slice(2)));let n=[],s=3,i=.4;return t.forEach(o=>{if(o.length<=1)return;let a=qo(e,o),h=Math.max(e.length,o.length);(h-a)/h>i&&(a<s?(s=a,n=[o]):a===s&&n.push(o))}),n.sort((o,a)=>o.localeCompare(a)),r&&(n=n.map(o=>`--${o}`)),n.length>1?`
|
|
13
13
|
(Did you mean one of ${n.join(", ")}?)`:n.length===1?`
|
|
14
|
-
(Did you mean ${n[0]}?)`:""}
|
|
15
|
-
- specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new
|
|
16
|
-
Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,n){this._exitCallback&&this._exitCallback(new
|
|
17
|
-
- already used by option '${r.flags}'`)}this._initOptionGroup(t),this.options.push(t)}_registerCommand(t){let r=s=>[s.name()].concat(s.aliases()),n=r(t).find(s=>this._findCommand(s));if(n){let s=r(this._findCommand(n)).join("|"),i=r(t).join("|");throw new Error(`cannot add command '${i}' as already have command '${s}'`)}this._initCommandGroup(t),this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),n=t.attributeName();if(t.negate){let i=t.long.replace(/^--no-/,"--");this._findOption(i)||this.setOptionValueWithSource(n,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(n,t.defaultValue,"default");let s=(i,o,a)=>{i==null&&t.presetArg!==void 0&&(i=t.presetArg);let h=this.getOptionValue(n);i!==null&&t.parseArg?i=this._callParseArg(t,i,h,o):i!==null&&t.variadic&&(i=t._concatValue(i,h)),i==null&&(t.negate?i=!1:t.isBoolean()||t.optional?i=!0:i=""),this.setOptionValueWithSource(n,i,a)};return this.on("option:"+r,i=>{let o=`error: option '${t.flags}' argument '${i}' is invalid.`;s(i,o,"cli")}),t.envVar&&this.on("optionEnv:"+r,i=>{let o=`error: option '${t.flags}' value '${i}' from env '${t.envVar}' is invalid.`;s(i,o,"env")}),this}_optionEx(t,r,n,s,i){if(typeof r=="object"&&r instanceof
|
|
18
|
-
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(t,r,n){if(
|
|
14
|
+
(Did you mean ${n[0]}?)`:""}pn.suggestSimilar=Uo});var bn=z(nr=>{"use strict";w();var zo=require("events").EventEmitter,Xe=require("child_process"),Tt=require("path"),fe=require("fs"),R=require("process"),{Argument:Yo,humanReadableArgName:Jo}=he(),{CommanderError:tr}=Yt(),{Help:Ko,stripColor:Qo}=Ye(),{Option:dn,DualOptions:Zo}=Ze(),{suggestSimilar:gn}=mn(),er=class e extends zo{constructor(t){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=t||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:r=>R.stdout.write(r),writeErr:r=>R.stderr.write(r),outputError:(r,n)=>n(r),getOutHelpWidth:()=>R.stdout.isTTY?R.stdout.columns:void 0,getErrHelpWidth:()=>R.stderr.isTTY?R.stderr.columns:void 0,getOutHasColors:()=>rr()??(R.stdout.isTTY&&R.stdout.hasColors?.()),getErrHasColors:()=>rr()??(R.stderr.isTTY&&R.stderr.hasColors?.()),stripColor:r=>Qo(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let r=this;r;r=r.parent)t.push(r);return t}command(t,r,n){let s=r,i=n;typeof s=="object"&&s!==null&&(i=s,s=null),i=i||{};let[,o,a]=t.match(/([^ ]+) *(.*)/),h=this.createCommand(o);return s&&(h.description(s),h._executableHandler=!0),i.isDefault&&(this._defaultCommandName=h._name),h._hidden=!!(i.noHelp||i.hidden),h._executableFile=i.executableFile||null,a&&h.arguments(a),this._registerCommand(h),h.parent=this,h.copyInheritedSettings(this),s?this:h}createCommand(t){return new e(t)}createHelp(){return Object.assign(new Ko,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(this._outputConfiguration=Object.assign({},this._outputConfiguration,t),this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,r){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
|
|
15
|
+
- specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new Yo(t,r)}argument(t,r,n,s){let i=this.createArgument(t,r);return typeof n=="function"?i.default(s).argParser(n):i.default(n),this.addArgument(i),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,t&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let n=t??"help [command]",[,s,i]=n.match(/([^ ]+) *(.*)/),o=r??"display help for command",a=this.createCommand(s);return a.helpOption(!1),i&&a.arguments(i),o&&a.description(o),this._addImplicitHelpCommand=!0,this._helpCommand=a,(t||r)&&this._initCommandGroup(a),this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,this._initCommandGroup(t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(t,r){let n=["preSubcommand","preAction","postAction"];if(!n.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
|
|
16
|
+
Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,n){this._exitCallback&&this._exitCallback(new tr(t,r,n)),R.exit(t)}action(t){let r=n=>{let s=this.registeredArguments.length,i=n.slice(0,s);return this._storeOptionsAsProperties?i[s]=this:i[s]=this.opts(),i.push(this),t.apply(this,i)};return this._actionHandler=r,this}createOption(t,r){return new dn(t,r)}_callParseArg(t,r,n,s){try{return t.parseArg(r,n)}catch(i){if(i.code==="commander.invalidArgument"){let o=`${s} ${i.message}`;this.error(o,{exitCode:i.exitCode,code:i.code})}throw i}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let n=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
|
|
17
|
+
- already used by option '${r.flags}'`)}this._initOptionGroup(t),this.options.push(t)}_registerCommand(t){let r=s=>[s.name()].concat(s.aliases()),n=r(t).find(s=>this._findCommand(s));if(n){let s=r(this._findCommand(n)).join("|"),i=r(t).join("|");throw new Error(`cannot add command '${i}' as already have command '${s}'`)}this._initCommandGroup(t),this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),n=t.attributeName();if(t.negate){let i=t.long.replace(/^--no-/,"--");this._findOption(i)||this.setOptionValueWithSource(n,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(n,t.defaultValue,"default");let s=(i,o,a)=>{i==null&&t.presetArg!==void 0&&(i=t.presetArg);let h=this.getOptionValue(n);i!==null&&t.parseArg?i=this._callParseArg(t,i,h,o):i!==null&&t.variadic&&(i=t._concatValue(i,h)),i==null&&(t.negate?i=!1:t.isBoolean()||t.optional?i=!0:i=""),this.setOptionValueWithSource(n,i,a)};return this.on("option:"+r,i=>{let o=`error: option '${t.flags}' argument '${i}' is invalid.`;s(i,o,"cli")}),t.envVar&&this.on("optionEnv:"+r,i=>{let o=`error: option '${t.flags}' value '${i}' from env '${t.envVar}' is invalid.`;s(i,o,"env")}),this}_optionEx(t,r,n,s,i){if(typeof r=="object"&&r instanceof dn)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(r,n);if(o.makeOptionMandatory(!!t.mandatory),typeof s=="function")o.default(i).argParser(s);else if(s instanceof RegExp){let a=s;s=(h,l)=>{let c=a.exec(h);return c?c[0]:l},o.default(i).argParser(s)}else o.default(s);return this.addOption(o)}option(t,r,n,s){return this._optionEx({},t,r,n,s)}requiredOption(t,r,n,s){return this._optionEx({mandatory:!0},t,r,n,s)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(t=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,r){return this.setOptionValueWithSource(t,r,void 0)}setOptionValueWithSource(t,r,n){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=n,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(t)!==void 0&&(r=n.getOptionValueSource(t))}),r}_prepareUserArgs(t,r){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},t===void 0&&r.from===void 0){R.versions?.electron&&(r.from="electron");let s=R.execArgv??[];(s.includes("-e")||s.includes("--eval")||s.includes("-p")||s.includes("--print"))&&(r.from="eval")}t===void 0&&(t=R.argv),this.rawArgs=t.slice();let n;switch(r.from){case void 0:case"node":this._scriptPath=t[1],n=t.slice(2);break;case"electron":R.defaultApp?(this._scriptPath=t[1],n=t.slice(2)):n=t.slice(1);break;case"user":n=t.slice(0);break;case"eval":n=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(t,r){this._prepareForParse();let n=this._prepareUserArgs(t,r);return this._parseCommand([],n),this}async parseAsync(t,r){this._prepareForParse();let n=this._prepareUserArgs(t,r);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
18
|
+
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(t,r,n){if(fe.existsSync(t))return;let s=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",i=`'${t}' does not exist
|
|
19
19
|
- if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
20
20
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
21
|
-
- ${s}`;throw new Error(i)}_executeSubCommand(t,r){r=r.slice();let n=!1,s=[".js",".ts",".tsx",".mjs",".cjs"];function i(c,u){let f=
|
|
21
|
+
- ${s}`;throw new Error(i)}_executeSubCommand(t,r){r=r.slice();let n=!1,s=[".js",".ts",".tsx",".mjs",".cjs"];function i(c,u){let f=Tt.resolve(c,u);if(fe.existsSync(f))return f;if(s.includes(Tt.extname(u)))return;let p=s.find(A=>fe.existsSync(`${f}${A}`));if(p)return`${f}${p}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=t._executableFile||`${this._name}-${t._name}`,a=this._executableDir||"";if(this._scriptPath){let c;try{c=fe.realpathSync(this._scriptPath)}catch{c=this._scriptPath}a=Tt.resolve(Tt.dirname(c),a)}if(a){let c=i(a,o);if(!c&&!t._executableFile&&this._scriptPath){let u=Tt.basename(this._scriptPath,Tt.extname(this._scriptPath));u!==this._name&&(c=i(a,`${u}-${t._name}`))}o=c||o}n=s.includes(Tt.extname(o));let h;R.platform!=="win32"?n?(r.unshift(o),r=_n(R.execArgv).concat(r),h=Xe.spawn(R.argv[0],r,{stdio:"inherit"})):h=Xe.spawn(o,r,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,t._name),r.unshift(o),r=_n(R.execArgv).concat(r),h=Xe.spawn(R.execPath,r,{stdio:"inherit"})),h.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(u=>{R.on(u,()=>{h.killed===!1&&h.exitCode===null&&h.kill(u)})});let l=this._exitCallback;h.on("close",c=>{c=c??1,l?l(new tr(c,"commander.executeSubCommandAsync","(close)")):R.exit(c)}),h.on("error",c=>{if(c.code==="ENOENT")this._checkForMissingExecutable(o,a,t._name);else if(c.code==="EACCES")throw new Error(`'${o}' not executable`);if(!l)R.exit(1);else{let u=new tr(1,"commander.executeSubCommandAsync","(error)");u.nestedError=c,l(u)}}),this.runningCommand=h}_dispatchSubcommand(t,r,n){let s=this._findCommand(t);s||this.help({error:!0}),s._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,s,"preSubcommand"),i=this._chainOrCall(i,()=>{if(s._executableHandler)this._executeSubCommand(s,r.concat(n));else return s._parseCommand(r,n)}),i}_dispatchHelpCommand(t){t||this.help();let r=this._findCommand(t);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,r)=>{t.required&&this.args[r]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(n,s,i)=>{let o=s;if(s!==null&&n.parseArg){let a=`error: command-argument value '${s}' is invalid for argument '${n.name()}'.`;o=this._callParseArg(n,s,i,a)}return o};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((n,s)=>{let i=n.defaultValue;n.variadic?s<this.args.length?(i=this.args.slice(s),n.parseArg&&(i=i.reduce((o,a)=>t(n,a,o),n.defaultValue))):i===void 0&&(i=[]):s<this.args.length&&(i=this.args[s],n.parseArg&&(i=t(n,i,n.defaultValue))),r[s]=i}),this.processedArgs=r}_chainOrCall(t,r){return t&&t.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let n=t,s=[];return this._getCommandAndAncestors().reverse().filter(i=>i._lifeCycleHooks[r]!==void 0).forEach(i=>{i._lifeCycleHooks[r].forEach(o=>{s.push({hookedCommand:i,callback:o})})}),r==="postAction"&&s.reverse(),s.forEach(i=>{n=this._chainOrCall(n,()=>i.callback(i.hookedCommand,this))}),n}_chainOrCallSubCommandHook(t,r,n){let s=t;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(i=>{s=this._chainOrCall(s,()=>i(this,r))}),s}_parseCommand(t,r){let n=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(n.operands),r=n.unknown,this.args=t.concat(r),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),r);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,t,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){s(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(i,t,r)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(i))s(),this._processArguments(),this.parent.emit(i,t,r);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,r);this.listenerCount("command:*")?this.emit("command:*",t,r):this.commands.length?this.unknownCommand():(s(),this._processArguments())}else this.commands.length?(s(),this.help({error:!0})):(s(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(r=>r._name===t||r._aliases.includes(t))}_findOption(t){return this.options.find(r=>r.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(r=>{r.mandatory&&t.getOptionValue(r.attributeName())===void 0&&t.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(n=>{let s=n.attributeName();return this.getOptionValue(s)===void 0?!1:this.getOptionValueSource(s)!=="default"});t.filter(n=>n.conflictsWith.length>0).forEach(n=>{let s=t.find(i=>n.conflictsWith.includes(i.attributeName()));s&&this._conflictingOption(n,s)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],n=[],s=r,i=t.slice();function o(l){return l.length>1&&l[0]==="-"}let a=l=>/^-\d*\.?\d+(e[+-]?\d+)?$/.test(l)?!this._getCommandAndAncestors().some(c=>c.options.map(u=>u.short).some(u=>/^-\d$/.test(u))):!1,h=null;for(;i.length;){let l=i.shift();if(l==="--"){s===n&&s.push(l),s.push(...i);break}if(h&&(!o(l)||a(l))){this.emit(`option:${h.name()}`,l);continue}if(h=null,o(l)){let c=this._findOption(l);if(c){if(c.required){let u=i.shift();u===void 0&&this.optionMissingArgument(c),this.emit(`option:${c.name()}`,u)}else if(c.optional){let u=null;i.length>0&&(!o(i[0])||a(i[0]))&&(u=i.shift()),this.emit(`option:${c.name()}`,u)}else this.emit(`option:${c.name()}`);h=c.variadic?c:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let c=this._findOption(`-${l[1]}`);if(c){c.required||c.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${c.name()}`,l.slice(2)):(this.emit(`option:${c.name()}`),i.unshift(`-${l.slice(2)}`));continue}}if(/^--[^=]+=/.test(l)){let c=l.indexOf("="),u=this._findOption(l.slice(0,c));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,l.slice(c+1));continue}}if(s===r&&o(l)&&!(this.commands.length===0&&a(l))&&(s=n),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&n.length===0){if(this._findCommand(l)){r.push(l),i.length>0&&n.push(...i);break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){r.push(l),i.length>0&&r.push(...i);break}else if(this._defaultCommandName){n.push(l),i.length>0&&n.push(...i);break}}if(this._passThroughOptions){s.push(l),i.length>0&&s.push(...i);break}s.push(l)}return{operands:r,unknown:n}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let n=0;n<r;n++){let s=this.options[n].attributeName();t[s]=s===this._versionOptionName?this._version:this[s]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,r)=>Object.assign(t,r.opts()),{})}error(t,r){this._outputConfiguration.outputError(`${t}
|
|
22
22
|
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
23
23
|
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
24
|
-
`),this.outputHelp({error:!0}));let n=r||{},s=n.exitCode||1,i=n.code||"commander.error";this._exit(s,i,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in R.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,R.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new
|
|
25
|
-
`),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(t);if(n){let s=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${s}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(n=>
|
|
24
|
+
`),this.outputHelp({error:!0}));let n=r||{},s=n.exitCode||1,i=n.code||"commander.error";this._exit(s,i,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in R.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,R.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new Zo(this.options),r=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&r(n.attributeName())&&t.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(s=>!r(s)).forEach(s=>{this.setOptionValueWithSource(s,n.implied[s],"implied")})})}missingArgument(t){let r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){let r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){let n=o=>{let a=o.attributeName(),h=this.getOptionValue(a),l=this.options.find(u=>u.negate&&a===u.attributeName()),c=this.options.find(u=>!u.negate&&a===u.attributeName());return l&&(l.presetArg===void 0&&h===!1||l.presetArg!==void 0&&h===l.presetArg)?l:c||o},s=o=>{let a=n(o),h=a.attributeName();return this.getOptionValueSource(h)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},i=`error: ${s(t)} cannot be used with ${s(r)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let s=[],i=this;do{let o=i.createHelp().visibleOptions(i).filter(a=>a.long).map(a=>a.long);s=s.concat(o),i=i.parent}while(i&&!i._enablePositionalOptions);r=gn(t,s)}let n=`error: unknown option '${t}'${r}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,n=r===1?"":"s",i=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${n} but got ${t.length}.`;this.error(i,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let s=[];this.createHelp().visibleCommands(this).forEach(i=>{s.push(i.name()),i.alias()&&s.push(i.alias())}),r=gn(t,s)}let n=`error: unknown command '${t}'${r}`;this.error(n,{code:"commander.unknownCommand"})}version(t,r,n){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",n=n||"output the version number";let s=this.createOption(r,n);return this._versionOptionName=s.attributeName(),this._registerOption(s),this.on("option:"+s.name(),()=>{this._outputConfiguration.writeOut(`${t}
|
|
25
|
+
`),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(t);if(n){let s=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${s}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(n=>Jo(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}helpGroup(t){return t===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=t,this)}commandsGroup(t){return t===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=t,this)}optionsGroup(t){return t===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=t,this)}_initOptionGroup(t){this._defaultOptionGroup&&!t.helpGroupHeading&&t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){this._defaultCommandGroup&&!t.helpGroup()&&t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){return this._name=Tt.basename(t,Tt.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),n=this._getOutputContext(t);r.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let s=r.formatHelp(this,r);return n.hasColors?s:this._outputConfiguration.stripColor(s)}_getOutputContext(t){t=t||{};let r=!!t.error,n,s,i;return r?(n=a=>this._outputConfiguration.writeErr(a),s=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(n=a=>this._outputConfiguration.writeOut(a),s=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:r,write:a=>(s||(a=this._outputConfiguration.stripColor(a)),n(a)),hasColors:s,helpWidth:i}}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let n=this._getOutputContext(t),s={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",s)),this.emit("beforeHelp",s);let i=this.helpInformation({error:n.error});if(r&&(i=r(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",s),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",s))}helpOption(t,r){return typeof t=="boolean"?(t?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(t??"-h, --help",r??"display help for command"),(t||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this._initOptionGroup(t),this}help(t){this.outputHelp(t);let r=Number(R.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let n=["beforeAll","before","after","afterAll"];if(!n.includes(t))throw new Error(`Unexpected value for position to addHelpText.
|
|
26
26
|
Expecting one of '${n.join("', '")}'`);let s=`${t}Help`;return this.on(s,i=>{let o;typeof r=="function"?o=r({error:i.error,command:i.command}):o=r,o&&i.write(`${o}
|
|
27
|
-
`)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(s=>r.is(s))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function bn(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,n="127.0.0.1",s="9229",i;return(i=t.match(/^(--inspect(-brk)?)$/))!==null?r=i[1]:(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=i[1],/^\d+$/.test(i[3])?s=i[3]:n=i[3]):(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=i[1],n=i[3],s=i[4]),r&&s!=="0"?`${r}=${n}:${parseInt(s)+1}`:t})}function sr(){if(R.env.NO_COLOR||R.env.FORCE_COLOR==="0"||R.env.FORCE_COLOR==="false")return!1;if(R.env.FORCE_COLOR||R.env.CLICOLOR_FORCE!==void 0)return!0}ir.Command=nr;ir.useColor=sr});var kn=z(mt=>{"use strict";w();var{Argument:vn}=fe(),{Command:or}=yn(),{CommanderError:ea,InvalidArgumentError:Cn}=Yt(),{Help:ra}=Ke(),{Option:wn}=tr();mt.program=new or;mt.createCommand=e=>new or(e);mt.createOption=(e,t)=>new wn(e,t);mt.createArgument=(e,t)=>new vn(e,t);mt.Command=or;mt.Option=wn;mt.Argument=vn;mt.Help=ra;mt.CommanderError=ea;mt.InvalidArgumentError=Cn;mt.InvalidOptionArgumentError=Cn});var ur=z((Oh,ar)=>{"use strict";w();var de=process||{},Tn=de.argv||[],me=de.env||{},na=!(me.NO_COLOR||Tn.includes("--no-color"))&&(!!me.FORCE_COLOR||Tn.includes("--color")||de.platform==="win32"||(de.stdout||{}).isTTY&&me.TERM!=="dumb"||!!me.CI),sa=(e,t,r=e)=>n=>{let s=""+n,i=s.indexOf(t,e.length);return~i?e+ia(s,t,r,i)+t:e+s+t},ia=(e,t,r,n)=>{let s="",i=0;do s+=e.substring(i,n)+r,i=n+t.length,n=e.indexOf(t,i);while(~n);return s+e.substring(i)},xn=(e=na)=>{let t=e?sa:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};ar.exports=xn();ar.exports.createColors=xn});var Sn=z((cr,lr)=>{"use strict";w();(function(e,t){typeof cr=="object"&&typeof lr<"u"?lr.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(cr,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",s="second",i="minute",o="hour",a="day",h="week",l="month",c="quarter",u="year",f="date",p="Invalid Date",A=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,M=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var b=["th","st","nd","rd"],g=k%100;return"["+k+(b[(g-20)%10]||b[g]||b[0])+"]"}},N=function(k,b,g){var v=String(k);return!v||v.length>=b?k:""+Array(b+1-v.length).join(g)+k},J={s:N,z:function(k){var b=-k.utcOffset(),g=Math.abs(b),v=Math.floor(g/60),_=g%60;return(b<=0?"+":"-")+N(v,2,"0")+":"+N(_,2,"0")},m:function k(b,g){if(b.date()<g.date())return-k(g,b);var v=12*(g.year()-b.year())+(g.month()-b.month()),_=b.clone().add(v,l),T=g-_<0,x=b.clone().add(v+(T?-1:1),l);return+(-(v+(g-_)/(T?_-x:x-_))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:l,y:u,w:h,d:a,D:f,h:o,m:i,s,ms:n,Q:c}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},q="en",Y={};Y[q]=I;var pt="$isDayjsObject",et=function(k){return k instanceof jt||!(!k||!k[pt])},lt=function k(b,g,v){var _;if(!b)return q;if(typeof b=="string"){var T=b.toLowerCase();Y[T]&&(_=T),g&&(Y[T]=g,_=T);var x=b.split("-");if(!_&&x.length>1)return k(x[0])}else{var P=b.name;Y[P]=b,_=P}return!v&&_&&(q=_),_||!v&&q},F=function(k,b){if(et(k))return k.clone();var g=typeof b=="object"?b:{};return g.date=k,g.args=arguments,new jt(g)},E=J;E.l=lt,E.i=et,E.w=function(k,b){return F(k,{locale:b.$L,utc:b.$u,x:b.$x,$offset:b.$offset})};var jt=function(){function k(g){this.$L=lt(g.locale,null,!0),this.parse(g),this.$x=this.$x||g.x||{},this[pt]=!0}var b=k.prototype;return b.parse=function(g){this.$d=function(v){var _=v.date,T=v.utc;if(_===null)return new Date(NaN);if(E.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var x=_.match(A);if(x){var P=x[2]-1||0,H=(x[7]||"0").substring(0,3);return T?new Date(Date.UTC(x[1],P,x[3]||1,x[4]||0,x[5]||0,x[6]||0,H)):new Date(x[1],P,x[3]||1,x[4]||0,x[5]||0,x[6]||0,H)}}return new Date(_)}(g),this.init()},b.init=function(){var g=this.$d;this.$y=g.getFullYear(),this.$M=g.getMonth(),this.$D=g.getDate(),this.$W=g.getDay(),this.$H=g.getHours(),this.$m=g.getMinutes(),this.$s=g.getSeconds(),this.$ms=g.getMilliseconds()},b.$utils=function(){return E},b.isValid=function(){return this.$d.toString()!==p},b.isSame=function(g,v){var _=F(g);return this.startOf(v)<=_&&_<=this.endOf(v)},b.isAfter=function(g,v){return F(g)<this.startOf(v)},b.isBefore=function(g,v){return this.endOf(v)<F(g)},b.$g=function(g,v,_){return E.u(g)?this[v]:this.set(_,g)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(g,v){var _=this,T=!!E.u(v)||v,x=E.p(g),P=function(kt,Z){var yt=E.w(_.$u?Date.UTC(_.$y,Z,kt):new Date(_.$y,Z,kt),_);return T?yt:yt.endOf(a)},H=function(kt,Z){return E.w(_.toDate()[kt].apply(_.toDate("s"),(T?[0,0,0,0]:[23,59,59,999]).slice(Z)),_)},U=this.$W,K=this.$M,it=this.$D,At="set"+(this.$u?"UTC":"");switch(x){case u:return T?P(1,0):P(31,11);case l:return T?P(1,K):P(0,K+1);case h:var wt=this.$locale().weekStart||0,Rt=(U<wt?U+7:U)-wt;return P(T?it-Rt:it+(6-Rt),K);case a:case f:return H(At+"Hours",0);case o:return H(At+"Minutes",1);case i:return H(At+"Seconds",2);case s:return H(At+"Milliseconds",3);default:return this.clone()}},b.endOf=function(g){return this.startOf(g,!1)},b.$set=function(g,v){var _,T=E.p(g),x="set"+(this.$u?"UTC":""),P=(_={},_[a]=x+"Date",_[f]=x+"Date",_[l]=x+"Month",_[u]=x+"FullYear",_[o]=x+"Hours",_[i]=x+"Minutes",_[s]=x+"Seconds",_[n]=x+"Milliseconds",_)[T],H=T===a?this.$D+(v-this.$W):v;if(T===l||T===u){var U=this.clone().set(f,1);U.$d[P](H),U.init(),this.$d=U.set(f,Math.min(this.$D,U.daysInMonth())).$d}else P&&this.$d[P](H);return this.init(),this},b.set=function(g,v){return this.clone().$set(g,v)},b.get=function(g){return this[E.p(g)]()},b.add=function(g,v){var _,T=this;g=Number(g);var x=E.p(v),P=function(K){var it=F(T);return E.w(it.date(it.date()+Math.round(K*g)),T)};if(x===l)return this.set(l,this.$M+g);if(x===u)return this.set(u,this.$y+g);if(x===a)return P(1);if(x===h)return P(7);var H=(_={},_[i]=t,_[o]=r,_[s]=e,_)[x]||1,U=this.$d.getTime()+g*H;return E.w(U,this)},b.subtract=function(g,v){return this.add(-1*g,v)},b.format=function(g){var v=this,_=this.$locale();if(!this.isValid())return _.invalidDate||p;var T=g||"YYYY-MM-DDTHH:mm:ssZ",x=E.z(this),P=this.$H,H=this.$m,U=this.$M,K=_.weekdays,it=_.months,At=_.meridiem,wt=function(Z,yt,Ft,rt){return Z&&(Z[yt]||Z(v,T))||Ft[yt].slice(0,rt)},Rt=function(Z){return E.s(P%12||12,Z,"0")},kt=At||function(Z,yt,Ft){var rt=Z<12?"AM":"PM";return Ft?rt.toLowerCase():rt};return T.replace(M,function(Z,yt){return yt||function(Ft){switch(Ft){case"YY":return String(v.$y).slice(-2);case"YYYY":return E.s(v.$y,4,"0");case"M":return U+1;case"MM":return E.s(U+1,2,"0");case"MMM":return wt(_.monthsShort,U,it,3);case"MMMM":return wt(it,U);case"D":return v.$D;case"DD":return E.s(v.$D,2,"0");case"d":return String(v.$W);case"dd":return wt(_.weekdaysMin,v.$W,K,2);case"ddd":return wt(_.weekdaysShort,v.$W,K,3);case"dddd":return K[v.$W];case"H":return String(P);case"HH":return E.s(P,2,"0");case"h":return Rt(1);case"hh":return Rt(2);case"a":return kt(P,H,!0);case"A":return kt(P,H,!1);case"m":return String(H);case"mm":return E.s(H,2,"0");case"s":return String(v.$s);case"ss":return E.s(v.$s,2,"0");case"SSS":return E.s(v.$ms,3,"0");case"Z":return x}return null}(Z)||x.replace(":","")})},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(g,v,_){var T,x=this,P=E.p(v),H=F(g),U=(H.utcOffset()-this.utcOffset())*t,K=this-H,it=function(){return E.m(x,H)};switch(P){case u:T=it()/12;break;case l:T=it();break;case c:T=it()/3;break;case h:T=(K-U)/6048e5;break;case a:T=(K-U)/864e5;break;case o:T=K/r;break;case i:T=K/t;break;case s:T=K/e;break;default:T=K}return _?T:E.a(T)},b.daysInMonth=function(){return this.endOf(l).$D},b.$locale=function(){return Y[this.$L]},b.locale=function(g,v){if(!g)return this.$L;var _=this.clone(),T=lt(g,v,!0);return T&&(_.$L=T),_},b.clone=function(){return E.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},k}(),le=jt.prototype;return F.prototype=le,[["$ms",n],["$s",s],["$m",i],["$H",o],["$W",a],["$M",l],["$y",u],["$D",f]].forEach(function(k){le[k[1]]=function(b){return this.$g(b,k[0],k[1])}}),F.extend=function(k,b){return k.$i||(k(b,jt,F),k.$i=!0),F},F.locale=lt,F.isDayjs=et,F.unix=function(k){return F(1e3*k)},F.en=Y[q],F.Ls=Y,F.p={},F})});var An=z((hr,fr)=>{"use strict";w();(function(e,t){typeof hr=="object"&&typeof fr<"u"?fr.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(hr,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,s){var i,o=function(c,u,f){f===void 0&&(f={});var p=new Date(c),A=function(M,I){I===void 0&&(I={});var N=I.timeZoneName||"short",J=M+"|"+N,q=t[J];return q||(q=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:M,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:N}),t[J]=q),q}(u,f);return A.formatToParts(p)},a=function(c,u){for(var f=o(c,u),p=[],A=0;A<f.length;A+=1){var M=f[A],I=M.type,N=M.value,J=e[I];J>=0&&(p[J]=parseInt(N,10))}var q=p[3],Y=q===24?0:q,pt=p[0]+"-"+p[1]+"-"+p[2]+" "+Y+":"+p[4]+":"+p[5]+":000",et=+c;return(s.utc(pt).valueOf()-(et-=et%1e3))/6e4},h=n.prototype;h.tz=function(c,u){c===void 0&&(c=i);var f,p=this.utcOffset(),A=this.toDate(),M=A.toLocaleString("en-US",{timeZone:c}),I=Math.round((A-new Date(M))/1e3/60),N=15*-Math.round(A.getTimezoneOffset()/15)-I;if(!Number(N))f=this.utcOffset(0,u);else if(f=s(M,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(N,!0),u){var J=f.utcOffset();f=f.add(p-J,"minute")}return f.$x.$timezone=c,f},h.offsetName=function(c){var u=this.$x.$timezone||s.tz.guess(),f=o(this.valueOf(),u,{timeZoneName:c}).find(function(p){return p.type.toLowerCase()==="timezonename"});return f&&f.value};var l=h.startOf;h.startOf=function(c,u){if(!this.$x||!this.$x.$timezone)return l.call(this,c,u);var f=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return l.call(f,c,u).tz(this.$x.$timezone,!0)},s.tz=function(c,u,f){var p=f&&u,A=f||u||i,M=a(+s(),A);if(typeof c!="string")return s(c).tz(A);var I=function(Y,pt,et){var lt=Y-60*pt*1e3,F=a(lt,et);if(pt===F)return[lt,pt];var E=a(lt-=60*(F-pt)*1e3,et);return F===E?[lt,F]:[Y-60*Math.min(F,E)*1e3,Math.max(F,E)]}(s.utc(c,p).valueOf(),M,A),N=I[0],J=I[1],q=s(N).utcOffset(J);return q.$x.$timezone=A,q},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(c){i=c}}})});var $n=z((Ah,En)=>{"use strict";w();var Nt=1e3,Ht=Nt*60,Bt=Ht*60,Mt=Bt*24,oa=Mt*7,aa=Mt*365.25;En.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return ua(e);if(r==="number"&&isFinite(e))return t.long?la(e):ca(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function ua(e){if(e=String(e),!(e.length>100)){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 r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*aa;case"weeks":case"week":case"w":return r*oa;case"days":case"day":case"d":return r*Mt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Bt;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ht;case"seconds":case"second":case"secs":case"sec":case"s":return r*Nt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function ca(e){var t=Math.abs(e);return t>=Mt?Math.round(e/Mt)+"d":t>=Bt?Math.round(e/Bt)+"h":t>=Ht?Math.round(e/Ht)+"m":t>=Nt?Math.round(e/Nt)+"s":e+"ms"}function la(e){var t=Math.abs(e);return t>=Mt?ge(e,t,Mt,"day"):t>=Bt?ge(e,t,Bt,"hour"):t>=Ht?ge(e,t,Ht,"minute"):t>=Nt?ge(e,t,Nt,"second"):e+" ms"}function ge(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var pr=z(($h,Rn)=>{"use strict";w();function ha(e){r.debug=r,r.default=r,r.coerce=h,r.disable=o,r.enable=s,r.enabled=a,r.humanize=$n(),r.destroy=l,Object.keys(e).forEach(c=>{r[c]=e[c]}),r.names=[],r.skips=[],r.formatters={};function t(c){let u=0;for(let f=0;f<c.length;f++)u=(u<<5)-u+c.charCodeAt(f),u|=0;return r.colors[Math.abs(u)%r.colors.length]}r.selectColor=t;function r(c){let u,f=null,p,A;function M(...I){if(!M.enabled)return;let N=M,J=Number(new Date),q=J-(u||J);N.diff=q,N.prev=u,N.curr=J,u=J,I[0]=r.coerce(I[0]),typeof I[0]!="string"&&I.unshift("%O");let Y=0;I[0]=I[0].replace(/%([a-zA-Z%])/g,(et,lt)=>{if(et==="%%")return"%";Y++;let F=r.formatters[lt];if(typeof F=="function"){let E=I[Y];et=F.call(N,E),I.splice(Y,1),Y--}return et}),r.formatArgs.call(N,I),(N.log||r.log).apply(N,I)}return M.namespace=c,M.useColors=r.useColors(),M.color=r.selectColor(c),M.extend=n,M.destroy=r.destroy,Object.defineProperty(M,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(p!==r.namespaces&&(p=r.namespaces,A=r.enabled(c)),A),set:I=>{f=I}}),typeof r.init=="function"&&r.init(M),M}function n(c,u){let f=r(this.namespace+(typeof u>"u"?":":u)+c);return f.log=this.log,f}function s(c){r.save(c),r.namespaces=c,r.names=[],r.skips=[];let u=(typeof c=="string"?c:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of u)f[0]==="-"?r.skips.push(f.slice(1)):r.names.push(f)}function i(c,u){let f=0,p=0,A=-1,M=0;for(;f<c.length;)if(p<u.length&&(u[p]===c[f]||u[p]==="*"))u[p]==="*"?(A=p,M=f,p++):(f++,p++);else if(A!==-1)p=A+1,M++,f=M;else return!1;for(;p<u.length&&u[p]==="*";)p++;return p===u.length}function o(){let c=[...r.names,...r.skips.map(u=>"-"+u)].join(",");return r.enable(""),c}function a(c){for(let u of r.skips)if(i(c,u))return!1;for(let u of r.names)if(i(c,u))return!0;return!1}function h(c){return c instanceof Error?c.stack||c.message:c}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Rn.exports=ha});var Fn=z((ot,_e)=>{"use strict";w();ot.formatArgs=pa;ot.save=ma;ot.load=da;ot.useColors=fa;ot.storage=ga();ot.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ot.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"];function fa(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function pa(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+_e.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(n=r))}),e.splice(n,0,t)}ot.log=console.debug||console.log||(()=>{});function ma(e){try{e?ot.storage.setItem("debug",e):ot.storage.removeItem("debug")}catch{}}function da(){let e;try{e=ot.storage.getItem("debug")||ot.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function ga(){try{return localStorage}catch{}}_e.exports=pr()(ot);var{formatters:_a}=_e.exports;_a.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Pn=z((Mh,Mn)=>{"use strict";w();Mn.exports=(e,t)=>{t=t||process.argv;let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return n!==-1&&(s===-1?!0:n<s)}});var In=z((Dh,Dn)=>{"use strict";w();var ba=require("os"),bt=Pn(),X=process.env,Gt;bt("no-color")||bt("no-colors")||bt("color=false")?Gt=!1:(bt("color")||bt("colors")||bt("color=true")||bt("color=always"))&&(Gt=!0);"FORCE_COLOR"in X&&(Gt=X.FORCE_COLOR.length===0||parseInt(X.FORCE_COLOR,10)!==0);function ya(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function va(e){if(Gt===!1)return 0;if(bt("color=16m")||bt("color=full")||bt("color=truecolor"))return 3;if(bt("color=256"))return 2;if(e&&!e.isTTY&&Gt!==!0)return 0;let t=Gt?1:0;if(process.platform==="win32"){let r=ba.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in X)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in X)||X.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in X)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(X.TEAMCITY_VERSION)?1:0;if(X.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in X){let r=parseInt((X.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(X.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(X.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(X.TERM)||"COLORTERM"in X?1:(X.TERM==="dumb",t)}function mr(e){let t=va(e);return ya(t)}Dn.exports={supportsColor:mr,stdout:mr(process.stdout),stderr:mr(process.stderr)}});var jn=z((Q,ye)=>{"use strict";w();var Ca=require("tty"),be=require("util");Q.init=Aa;Q.log=Ta;Q.formatArgs=ka;Q.save=xa;Q.load=Sa;Q.useColors=wa;Q.destroy=be.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Q.colors=[6,2,3,4,5,1];try{let e=In();e&&(e.stderr||e).level>=2&&(Q.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{}Q.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(s,i)=>i.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function wa(){return"colors"in Q.inspectOpts?!!Q.inspectOpts.colors:Ca.isatty(process.stderr.fd)}function ka(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${s};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
|
|
27
|
+
`)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(s=>r.is(s))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function _n(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,n="127.0.0.1",s="9229",i;return(i=t.match(/^(--inspect(-brk)?)$/))!==null?r=i[1]:(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=i[1],/^\d+$/.test(i[3])?s=i[3]:n=i[3]):(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=i[1],n=i[3],s=i[4]),r&&s!=="0"?`${r}=${n}:${parseInt(s)+1}`:t})}function rr(){if(R.env.NO_COLOR||R.env.FORCE_COLOR==="0"||R.env.FORCE_COLOR==="false")return!1;if(R.env.FORCE_COLOR||R.env.CLICOLOR_FORCE!==void 0)return!0}nr.Command=er;nr.useColor=rr});var wn=z(mt=>{"use strict";w();var{Argument:yn}=he(),{Command:sr}=bn(),{CommanderError:Xo,InvalidArgumentError:vn}=Yt(),{Help:ta}=Ye(),{Option:Cn}=Ze();mt.program=new sr;mt.createCommand=e=>new sr(e);mt.createOption=(e,t)=>new Cn(e,t);mt.createArgument=(e,t)=>new yn(e,t);mt.Command=sr;mt.Option=Cn;mt.Argument=yn;mt.Help=ta;mt.CommanderError=Xo;mt.InvalidArgumentError=vn;mt.InvalidOptionArgumentError=vn});var or=z((vh,ir)=>{"use strict";w();var me=process||{},On=me.argv||[],pe=me.env||{},ea=!(pe.NO_COLOR||On.includes("--no-color"))&&(!!pe.FORCE_COLOR||On.includes("--color")||me.platform==="win32"||(me.stdout||{}).isTTY&&pe.TERM!=="dumb"||!!pe.CI),ra=(e,t,r=e)=>n=>{let s=""+n,i=s.indexOf(t,e.length);return~i?e+na(s,t,r,i)+t:e+s+t},na=(e,t,r,n)=>{let s="",i=0;do s+=e.substring(i,n)+r,i=n+t.length,n=e.indexOf(t,i);while(~n);return s+e.substring(i)},Tn=(e=ea)=>{let t=e?ra:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};ir.exports=Tn();ir.exports.createColors=Tn});var xn=z((ar,ur)=>{"use strict";w();(function(e,t){typeof ar=="object"&&typeof ur<"u"?ur.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(ar,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",s="second",i="minute",o="hour",a="day",h="week",l="month",c="quarter",u="year",f="date",p="Invalid Date",A=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,M=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var b=["th","st","nd","rd"],g=k%100;return"["+k+(b[(g-20)%10]||b[g]||b[0])+"]"}},N=function(k,b,g){var v=String(k);return!v||v.length>=b?k:""+Array(b+1-v.length).join(g)+k},J={s:N,z:function(k){var b=-k.utcOffset(),g=Math.abs(b),v=Math.floor(g/60),_=g%60;return(b<=0?"+":"-")+N(v,2,"0")+":"+N(_,2,"0")},m:function k(b,g){if(b.date()<g.date())return-k(g,b);var v=12*(g.year()-b.year())+(g.month()-b.month()),_=b.clone().add(v,l),T=g-_<0,x=b.clone().add(v+(T?-1:1),l);return+(-(v+(g-_)/(T?_-x:x-_))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:l,y:u,w:h,d:a,D:f,h:o,m:i,s,ms:n,Q:c}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},q="en",Y={};Y[q]=I;var pt="$isDayjsObject",et=function(k){return k instanceof jt||!(!k||!k[pt])},lt=function k(b,g,v){var _;if(!b)return q;if(typeof b=="string"){var T=b.toLowerCase();Y[T]&&(_=T),g&&(Y[T]=g,_=T);var x=b.split("-");if(!_&&x.length>1)return k(x[0])}else{var P=b.name;Y[P]=b,_=P}return!v&&_&&(q=_),_||!v&&q},F=function(k,b){if(et(k))return k.clone();var g=typeof b=="object"?b:{};return g.date=k,g.args=arguments,new jt(g)},E=J;E.l=lt,E.i=et,E.w=function(k,b){return F(k,{locale:b.$L,utc:b.$u,x:b.$x,$offset:b.$offset})};var jt=function(){function k(g){this.$L=lt(g.locale,null,!0),this.parse(g),this.$x=this.$x||g.x||{},this[pt]=!0}var b=k.prototype;return b.parse=function(g){this.$d=function(v){var _=v.date,T=v.utc;if(_===null)return new Date(NaN);if(E.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var x=_.match(A);if(x){var P=x[2]-1||0,H=(x[7]||"0").substring(0,3);return T?new Date(Date.UTC(x[1],P,x[3]||1,x[4]||0,x[5]||0,x[6]||0,H)):new Date(x[1],P,x[3]||1,x[4]||0,x[5]||0,x[6]||0,H)}}return new Date(_)}(g),this.init()},b.init=function(){var g=this.$d;this.$y=g.getFullYear(),this.$M=g.getMonth(),this.$D=g.getDate(),this.$W=g.getDay(),this.$H=g.getHours(),this.$m=g.getMinutes(),this.$s=g.getSeconds(),this.$ms=g.getMilliseconds()},b.$utils=function(){return E},b.isValid=function(){return this.$d.toString()!==p},b.isSame=function(g,v){var _=F(g);return this.startOf(v)<=_&&_<=this.endOf(v)},b.isAfter=function(g,v){return F(g)<this.startOf(v)},b.isBefore=function(g,v){return this.endOf(v)<F(g)},b.$g=function(g,v,_){return E.u(g)?this[v]:this.set(_,g)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(g,v){var _=this,T=!!E.u(v)||v,x=E.p(g),P=function(Ot,Z){var yt=E.w(_.$u?Date.UTC(_.$y,Z,Ot):new Date(_.$y,Z,Ot),_);return T?yt:yt.endOf(a)},H=function(Ot,Z){return E.w(_.toDate()[Ot].apply(_.toDate("s"),(T?[0,0,0,0]:[23,59,59,999]).slice(Z)),_)},U=this.$W,K=this.$M,it=this.$D,At="set"+(this.$u?"UTC":"");switch(x){case u:return T?P(1,0):P(31,11);case l:return T?P(1,K):P(0,K+1);case h:var kt=this.$locale().weekStart||0,Rt=(U<kt?U+7:U)-kt;return P(T?it-Rt:it+(6-Rt),K);case a:case f:return H(At+"Hours",0);case o:return H(At+"Minutes",1);case i:return H(At+"Seconds",2);case s:return H(At+"Milliseconds",3);default:return this.clone()}},b.endOf=function(g){return this.startOf(g,!1)},b.$set=function(g,v){var _,T=E.p(g),x="set"+(this.$u?"UTC":""),P=(_={},_[a]=x+"Date",_[f]=x+"Date",_[l]=x+"Month",_[u]=x+"FullYear",_[o]=x+"Hours",_[i]=x+"Minutes",_[s]=x+"Seconds",_[n]=x+"Milliseconds",_)[T],H=T===a?this.$D+(v-this.$W):v;if(T===l||T===u){var U=this.clone().set(f,1);U.$d[P](H),U.init(),this.$d=U.set(f,Math.min(this.$D,U.daysInMonth())).$d}else P&&this.$d[P](H);return this.init(),this},b.set=function(g,v){return this.clone().$set(g,v)},b.get=function(g){return this[E.p(g)]()},b.add=function(g,v){var _,T=this;g=Number(g);var x=E.p(v),P=function(K){var it=F(T);return E.w(it.date(it.date()+Math.round(K*g)),T)};if(x===l)return this.set(l,this.$M+g);if(x===u)return this.set(u,this.$y+g);if(x===a)return P(1);if(x===h)return P(7);var H=(_={},_[i]=t,_[o]=r,_[s]=e,_)[x]||1,U=this.$d.getTime()+g*H;return E.w(U,this)},b.subtract=function(g,v){return this.add(-1*g,v)},b.format=function(g){var v=this,_=this.$locale();if(!this.isValid())return _.invalidDate||p;var T=g||"YYYY-MM-DDTHH:mm:ssZ",x=E.z(this),P=this.$H,H=this.$m,U=this.$M,K=_.weekdays,it=_.months,At=_.meridiem,kt=function(Z,yt,Ft,rt){return Z&&(Z[yt]||Z(v,T))||Ft[yt].slice(0,rt)},Rt=function(Z){return E.s(P%12||12,Z,"0")},Ot=At||function(Z,yt,Ft){var rt=Z<12?"AM":"PM";return Ft?rt.toLowerCase():rt};return T.replace(M,function(Z,yt){return yt||function(Ft){switch(Ft){case"YY":return String(v.$y).slice(-2);case"YYYY":return E.s(v.$y,4,"0");case"M":return U+1;case"MM":return E.s(U+1,2,"0");case"MMM":return kt(_.monthsShort,U,it,3);case"MMMM":return kt(it,U);case"D":return v.$D;case"DD":return E.s(v.$D,2,"0");case"d":return String(v.$W);case"dd":return kt(_.weekdaysMin,v.$W,K,2);case"ddd":return kt(_.weekdaysShort,v.$W,K,3);case"dddd":return K[v.$W];case"H":return String(P);case"HH":return E.s(P,2,"0");case"h":return Rt(1);case"hh":return Rt(2);case"a":return Ot(P,H,!0);case"A":return Ot(P,H,!1);case"m":return String(H);case"mm":return E.s(H,2,"0");case"s":return String(v.$s);case"ss":return E.s(v.$s,2,"0");case"SSS":return E.s(v.$ms,3,"0");case"Z":return x}return null}(Z)||x.replace(":","")})},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(g,v,_){var T,x=this,P=E.p(v),H=F(g),U=(H.utcOffset()-this.utcOffset())*t,K=this-H,it=function(){return E.m(x,H)};switch(P){case u:T=it()/12;break;case l:T=it();break;case c:T=it()/3;break;case h:T=(K-U)/6048e5;break;case a:T=(K-U)/864e5;break;case o:T=K/r;break;case i:T=K/t;break;case s:T=K/e;break;default:T=K}return _?T:E.a(T)},b.daysInMonth=function(){return this.endOf(l).$D},b.$locale=function(){return Y[this.$L]},b.locale=function(g,v){if(!g)return this.$L;var _=this.clone(),T=lt(g,v,!0);return T&&(_.$L=T),_},b.clone=function(){return E.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},k}(),ce=jt.prototype;return F.prototype=ce,[["$ms",n],["$s",s],["$m",i],["$H",o],["$W",a],["$M",l],["$y",u],["$D",f]].forEach(function(k){ce[k[1]]=function(b){return this.$g(b,k[0],k[1])}}),F.extend=function(k,b){return k.$i||(k(b,jt,F),k.$i=!0),F},F.locale=lt,F.isDayjs=et,F.unix=function(k){return F(1e3*k)},F.en=Y[q],F.Ls=Y,F.p={},F})});var Sn=z((cr,lr)=>{"use strict";w();(function(e,t){typeof cr=="object"&&typeof lr<"u"?lr.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(cr,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,s){var i,o=function(c,u,f){f===void 0&&(f={});var p=new Date(c),A=function(M,I){I===void 0&&(I={});var N=I.timeZoneName||"short",J=M+"|"+N,q=t[J];return q||(q=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:M,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:N}),t[J]=q),q}(u,f);return A.formatToParts(p)},a=function(c,u){for(var f=o(c,u),p=[],A=0;A<f.length;A+=1){var M=f[A],I=M.type,N=M.value,J=e[I];J>=0&&(p[J]=parseInt(N,10))}var q=p[3],Y=q===24?0:q,pt=p[0]+"-"+p[1]+"-"+p[2]+" "+Y+":"+p[4]+":"+p[5]+":000",et=+c;return(s.utc(pt).valueOf()-(et-=et%1e3))/6e4},h=n.prototype;h.tz=function(c,u){c===void 0&&(c=i);var f,p=this.utcOffset(),A=this.toDate(),M=A.toLocaleString("en-US",{timeZone:c}),I=Math.round((A-new Date(M))/1e3/60),N=15*-Math.round(A.getTimezoneOffset()/15)-I;if(!Number(N))f=this.utcOffset(0,u);else if(f=s(M,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(N,!0),u){var J=f.utcOffset();f=f.add(p-J,"minute")}return f.$x.$timezone=c,f},h.offsetName=function(c){var u=this.$x.$timezone||s.tz.guess(),f=o(this.valueOf(),u,{timeZoneName:c}).find(function(p){return p.type.toLowerCase()==="timezonename"});return f&&f.value};var l=h.startOf;h.startOf=function(c,u){if(!this.$x||!this.$x.$timezone)return l.call(this,c,u);var f=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return l.call(f,c,u).tz(this.$x.$timezone,!0)},s.tz=function(c,u,f){var p=f&&u,A=f||u||i,M=a(+s(),A);if(typeof c!="string")return s(c).tz(A);var I=function(Y,pt,et){var lt=Y-60*pt*1e3,F=a(lt,et);if(pt===F)return[lt,pt];var E=a(lt-=60*(F-pt)*1e3,et);return F===E?[lt,F]:[Y-60*Math.min(F,E)*1e3,Math.max(F,E)]}(s.utc(c,p).valueOf(),M,A),N=I[0],J=I[1],q=s(N).utcOffset(J);return q.$x.$timezone=A,q},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(c){i=c}}})});var En=z((Oh,An)=>{"use strict";w();var Nt=1e3,Ht=Nt*60,Bt=Ht*60,Mt=Bt*24,sa=Mt*7,ia=Mt*365.25;An.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return oa(e);if(r==="number"&&isFinite(e))return t.long?ua(e):aa(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function oa(e){if(e=String(e),!(e.length>100)){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 r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*ia;case"weeks":case"week":case"w":return r*sa;case"days":case"day":case"d":return r*Mt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Bt;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ht;case"seconds":case"second":case"secs":case"sec":case"s":return r*Nt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function aa(e){var t=Math.abs(e);return t>=Mt?Math.round(e/Mt)+"d":t>=Bt?Math.round(e/Bt)+"h":t>=Ht?Math.round(e/Ht)+"m":t>=Nt?Math.round(e/Nt)+"s":e+"ms"}function ua(e){var t=Math.abs(e);return t>=Mt?de(e,t,Mt,"day"):t>=Bt?de(e,t,Bt,"hour"):t>=Ht?de(e,t,Ht,"minute"):t>=Nt?de(e,t,Nt,"second"):e+" ms"}function de(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var hr=z((xh,$n)=>{"use strict";w();function ca(e){r.debug=r,r.default=r,r.coerce=h,r.disable=o,r.enable=s,r.enabled=a,r.humanize=En(),r.destroy=l,Object.keys(e).forEach(c=>{r[c]=e[c]}),r.names=[],r.skips=[],r.formatters={};function t(c){let u=0;for(let f=0;f<c.length;f++)u=(u<<5)-u+c.charCodeAt(f),u|=0;return r.colors[Math.abs(u)%r.colors.length]}r.selectColor=t;function r(c){let u,f=null,p,A;function M(...I){if(!M.enabled)return;let N=M,J=Number(new Date),q=J-(u||J);N.diff=q,N.prev=u,N.curr=J,u=J,I[0]=r.coerce(I[0]),typeof I[0]!="string"&&I.unshift("%O");let Y=0;I[0]=I[0].replace(/%([a-zA-Z%])/g,(et,lt)=>{if(et==="%%")return"%";Y++;let F=r.formatters[lt];if(typeof F=="function"){let E=I[Y];et=F.call(N,E),I.splice(Y,1),Y--}return et}),r.formatArgs.call(N,I),(N.log||r.log).apply(N,I)}return M.namespace=c,M.useColors=r.useColors(),M.color=r.selectColor(c),M.extend=n,M.destroy=r.destroy,Object.defineProperty(M,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(p!==r.namespaces&&(p=r.namespaces,A=r.enabled(c)),A),set:I=>{f=I}}),typeof r.init=="function"&&r.init(M),M}function n(c,u){let f=r(this.namespace+(typeof u>"u"?":":u)+c);return f.log=this.log,f}function s(c){r.save(c),r.namespaces=c,r.names=[],r.skips=[];let u=(typeof c=="string"?c:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of u)f[0]==="-"?r.skips.push(f.slice(1)):r.names.push(f)}function i(c,u){let f=0,p=0,A=-1,M=0;for(;f<c.length;)if(p<u.length&&(u[p]===c[f]||u[p]==="*"))u[p]==="*"?(A=p,M=f,p++):(f++,p++);else if(A!==-1)p=A+1,M++,f=M;else return!1;for(;p<u.length&&u[p]==="*";)p++;return p===u.length}function o(){let c=[...r.names,...r.skips.map(u=>"-"+u)].join(",");return r.enable(""),c}function a(c){for(let u of r.skips)if(i(c,u))return!1;for(let u of r.names)if(i(c,u))return!0;return!1}function h(c){return c instanceof Error?c.stack||c.message:c}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}$n.exports=ca});var Rn=z((ot,ge)=>{"use strict";w();ot.formatArgs=ha;ot.save=fa;ot.load=pa;ot.useColors=la;ot.storage=ma();ot.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ot.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"];function la(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function ha(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+ge.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(n=r))}),e.splice(n,0,t)}ot.log=console.debug||console.log||(()=>{});function fa(e){try{e?ot.storage.setItem("debug",e):ot.storage.removeItem("debug")}catch{}}function pa(){let e;try{e=ot.storage.getItem("debug")||ot.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function ma(){try{return localStorage}catch{}}ge.exports=hr()(ot);var{formatters:da}=ge.exports;da.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Mn=z((Eh,Fn)=>{"use strict";w();Fn.exports=(e,t)=>{t=t||process.argv;let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return n!==-1&&(s===-1?!0:n<s)}});var Dn=z((Rh,Pn)=>{"use strict";w();var ga=require("os"),bt=Mn(),X=process.env,Gt;bt("no-color")||bt("no-colors")||bt("color=false")?Gt=!1:(bt("color")||bt("colors")||bt("color=true")||bt("color=always"))&&(Gt=!0);"FORCE_COLOR"in X&&(Gt=X.FORCE_COLOR.length===0||parseInt(X.FORCE_COLOR,10)!==0);function _a(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ba(e){if(Gt===!1)return 0;if(bt("color=16m")||bt("color=full")||bt("color=truecolor"))return 3;if(bt("color=256"))return 2;if(e&&!e.isTTY&&Gt!==!0)return 0;let t=Gt?1:0;if(process.platform==="win32"){let r=ga.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in X)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in X)||X.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in X)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(X.TEAMCITY_VERSION)?1:0;if(X.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in X){let r=parseInt((X.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(X.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(X.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(X.TERM)||"COLORTERM"in X?1:(X.TERM==="dumb",t)}function fr(e){let t=ba(e);return _a(t)}Pn.exports={supportsColor:fr,stdout:fr(process.stdout),stderr:fr(process.stderr)}});var Ln=z((Q,be)=>{"use strict";w();var ya=require("tty"),_e=require("util");Q.init=xa;Q.log=ka;Q.formatArgs=Ca;Q.save=Oa;Q.load=Ta;Q.useColors=va;Q.destroy=_e.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Q.colors=[6,2,3,4,5,1];try{let e=Dn();e&&(e.stderr||e).level>=2&&(Q.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{}Q.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(s,i)=>i.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function va(){return"colors"in Q.inspectOpts?!!Q.inspectOpts.colors:ya.isatty(process.stderr.fd)}function Ca(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${s};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
|
|
28
28
|
`).join(`
|
|
29
|
-
`+i),e.push(s+"m+"+
|
|
30
|
-
`)}function
|
|
31
|
-
`).map(t=>t.trim()).join(" ")};
|
|
32
|
-
`){return e.split(r).reduce((n,s)=>{let i=t?s.trim():s;return i&&n.push(i),n},[])}function
|
|
33
|
-
`)){let h=
|
|
34
|
-
`);a=h[0],o=h[1]}yield{file:i,key:a,value:o}}}var ti,uu=d({"src/lib/responses/ConfigList.ts"(){"use strict";O(),ti=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((e,t)=>Object.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){let t=It(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,r){let n=this.addFile(e);n.hasOwnProperty(t)?Array.isArray(n[t])?n[t].push(r):n[t]=[n[t],r]:n[t]=r,this._all=void 0}}}});function yr(e,t){return typeof e=="string"&&Rr.hasOwnProperty(e)?e:t}function cu(e,t,r,n){let s=["config",`--${n}`];return r&&s.push("--add"),s.push(e,t),{commands:s,format:"utf-8",parser(i){return i}}}function lu(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser(n){return ou(n,e)}}}function hu(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return iu(r)}}}function fu(){return{addConfig(e,t,...r){return this._runTask(cu(e,t,r[0]===!0,yr(r[1],"local")),G(arguments))},getConfig(e,t){return this._runTask(lu(e,yr(t,void 0)),G(arguments))},listConfig(...e){return this._runTask(hu(yr(e[0],void 0)),G(arguments))}}}var Rr,ei=d({"src/lib/tasks/config.ts"(){"use strict";uu(),O(),Rr=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(Rr||{})}});function pu(e){return ri.has(e)}var vr,ri,ni=d({"src/lib/tasks/diff-name-status.ts"(){"use strict";vr=(e=>(e.ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",e))(vr||{}),ri=new Set(Object.values(vr))}});function mu(...e){return new ii().param(...e)}function du(e){let t=new Set,r={};return Nr(e,n=>{let[s,i,o]=n.split(qt);t.add(s),(r[s]=r[s]||[]).push({line:j(i),path:s,preview:o})}),{paths:t,results:r}}function gu(){return{grep(e){let t=G(arguments),r=at(arguments);for(let s of si)if(r.includes(s))return this._runTask(ut(`git.grep: use of "${s}" is not supported.`),t);typeof e=="string"&&(e=mu().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(s){return du(s)}},t)}}}var si,Kt,Wn,ii,oi=d({"src/lib/tasks/grep.ts"(){"use strict";O(),V(),si=["-h"],Kt=Symbol("grepQuery"),ii=class{constructor(){this[Wn]=[]}*[(Wn=Kt,Symbol.iterator)](){for(let e of this[Kt])yield e}and(...e){return e.length&&this[Kt].push("--and","(",...Xt(e,"-e"),")"),this}param(...e){return this[Kt].push(...Xt(e,"-e")),this}}}}),ai={};W(ai,{ResetMode:()=>Oe,getResetMode:()=>bu,resetTask:()=>_u});function _u(e,t){let r=["reset"];return ui(e)&&r.push(`--${e}`),r.push(...t),st(r)}function bu(e){if(ui(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function ui(e){return ci.includes(e)}var Oe,ci,li=d({"src/lib/tasks/reset.ts"(){"use strict";V(),Oe=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(Oe||{}),ci=Array.from(Object.values(Oe))}});function yu(){return(0,Ee.default)("simple-git")}function qn(e,t,r){return!t||!String(t).replace(/\s*/,"")?r?(n,...s)=>{e(n,...s),r(n,...s)}:e:(n,...s)=>{e(`%s ${n}`,t,...s),r&&r(n,...s)}}function vu(e,t,{namespace:r}){if(typeof e=="string")return e;let n=t&&t.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}function Qr(e,t,r,n=yu()){let s=e&&`[${e}]`||"",i=[],o=typeof t=="string"?n.extend(t):t,a=vu(Ct(t,tt),o,n);return l(r);function h(c,u){return $(i,Qr(e,a.replace(/^[^:]+/,c),u,n))}function l(c){let u=c&&`[${c}]`||"",f=o&&qn(o,u)||Lt,p=qn(n,`${s} ${u}`,f);return Object.assign(o?f:p,{label:e,sibling:h,info:p,step:l})}}var hi=d({"src/lib/git-logger.ts"(){"use strict";O(),Ee.default.formatters.L=e=>String(Vr(e)?e.length:"-"),Ee.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):ie(e)}}),Ce,Fr,Cu=d({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";$t(),hi(),Ce=class{constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){let t=Ce.getName(e.commands[0]),r=Qr(this.logLabel,t);return{task:e,logger:r,name:t}}push(e){let 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(let[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(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let t=this.withProgress(e);if(!t)throw new xt(void 0,"TasksPendingQueue: attempt called for an unknown task");return t.logger("Starting task"),t}static getName(e="empty"){return`task:${e}:${++Ce.counter}`}},Fr=Ce,Fr.counter=0}});function Dt(e,t){return{method:xs(e.commands)||"",commands:t}}function wu(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function Un(e,t,r,n){return s=>{r("%s received %L bytes",t,s),n("%B",s),e.push(s)}}var Mr,ku=d({"src/lib/runners/git-executor-chain.ts"(){"use strict";$t(),V(),O(),Cu(),Mr=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new Fr}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}attemptTask(e){return Qt(this,null,function*(){let t=yield this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:n}=this._queue.attempt(e);return yield Js(e)?this.attemptEmptyTask(e,n):this.attemptRemoteTask(e,n)}catch(n){throw this.onFatalException(e,n)}finally{r(),t()}})}onFatalException(e,t){let r=t instanceof xt?Object.assign(t,{task:e}):new xt(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}attemptRemoteTask(e,t){return Qt(this,null,function*(){let r=this._plugins.exec("spawn.binary","",Dt(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],Dt(e,e.commands)),s=yield this.gitResponse(e,r,n,this.outputHandler,t.step("SPAWN")),i=yield this.handleTaskData(e,n,s,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),Ys(e)?Ar(e.parser,i):Ar(e.parser,i.asStrings())})}attemptEmptyTask(e,t){return Qt(this,null,function*(){return t("empty task bypassing child process to call to task's parser"),e.parser(this)})}handleTaskData(e,t,r,n){let{exitCode:s,rejection:i,stdOut:o,stdErr:a}=r;return new Promise((h,l)=>{n("Preparing to handle process response exitCode=%d stdOut=",s);let{error:c}=this._plugins.exec("task.error",{error:i},dt(dt({},Dt(e,t)),r));if(c&&e.onError)return n.info("exitCode=%s handling with custom error handler"),e.onError(r,c,u=>{n.info("custom error handler treated as success"),n("custom error returned a %s",ie(u)),h(new ee(Array.isArray(u)?Buffer.concat(u):u,Buffer.concat(a)))},l);if(c)return n.info("handling as error: exitCode=%s stdErr=%s rejection=%o",s,a.length,i),l(c);n.info("retrieving task output complete"),h(new ee(Buffer.concat(o),Buffer.concat(a)))})}gitResponse(e,t,r,n,s){return Qt(this,null,function*(){let i=s.sibling("output"),o=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},Dt(e,e.commands));return new Promise(a=>{let h=[],l=[];s.info("%s %o",t,r),s("%O",o);let c=this._beforeSpawn(e,r);if(c)return a({stdOut:h,stdErr:l,exitCode:9901,rejection:c});this._plugins.exec("spawn.before",void 0,Zt(dt({},Dt(e,r)),{kill(f){c=f||c}}));let u=(0,fi.spawn)(t,r,o);u.stdout.on("data",Un(h,"stdOut",s,i.step("stdOut"))),u.stderr.on("data",Un(l,"stdErr",s,i.step("stdErr"))),u.on("error",wu(l,s)),n&&(s("Passing child process stdOut/stdErr to custom outputHandler"),n(t,u.stdout,u.stderr,[...r])),this._plugins.exec("spawn.after",void 0,Zt(dt({},Dt(e,r)),{spawned:u,close(f,p){a({stdOut:h,stdErr:l,exitCode:f,rejection:c||p})},kill(f){u.killed||(c=f,u.kill("SIGINT"))}}))})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,Zt(dt({},Dt(e,t)),{kill(n){r=n||r}})),r}}}}),pi={};W(pi,{GitExecutor:()=>mi});var mi,Ou=d({"src/lib/runners/git-executor.ts"(){"use strict";ku(),mi=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new Mr(this,this._scheduler,this._plugins)}chain(){return new Mr(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function Tu(e,t,r=Lt){let n=i=>{r(null,i)},s=i=>{i?.task===e&&r(i instanceof ne?xu(i):i,void 0)};t.then(n,s)}function xu(e){let t=n=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${n} should be GitResponseError.git.${n}, this will no longer be available in version 3`),t=Lt};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(r,{}));function r(n,s){return s in e||(n[s]={enumerable:!1,configurable:!1,get(){return t(s),e.git[s]}}),n}}var Su=d({"src/lib/task-callback.ts"(){"use strict";Ut(),O()}});function zn(e,t){return Us(r=>{if(!Hr(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var Au=d({"src/lib/tasks/change-working-directory.ts"(){"use strict";O(),V()}});function Cr(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=Pe(t,"-B")),st(t)}function Eu(){return{checkout(){return this._runTask(Cr(at(arguments,1)),G(arguments))},checkoutBranch(e,t){return this._runTask(Cr(["-b",e,t,...at(arguments)]),G(arguments))},checkoutLocalBranch(e){return this._runTask(Cr(["-b",e,...at(arguments)]),G(arguments))}}}var $u=d({"src/lib/tasks/checkout.ts"(){"use strict";O(),V()}});function Ru(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function Fu(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return ct(Ru(),[di],e)}})}}}var di,Mu=d({"src/lib/tasks/count-objects.ts"(){"use strict";O(),di=new S(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=Es(t);e.hasOwnProperty(n)&&(e[n]=j(r))})}});function Pu(e){return ct({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},gi,e)}var gi,Du=d({"src/lib/parsers/parse-commit.ts"(){"use strict";O(),gi=[new S(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,n])=>{e.branch=t,e.commit=n,e.root=!!r}),new S(/\s*Author:\s(.+)/i,(e,[t])=>{let r=t.split("<"),n=r.pop();!n||!n.includes("@")||(e.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}),new S(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(r,10)||0,e.summary.deletions=parseInt(n,10)||0}),new S(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0;let s=parseInt(r,10)||0;n==="-"?e.summary.deletions=s:n==="+"&&(e.summary.insertions=s)})]}});function Iu(e,t,r){return{commands:["-c","core.abbrev=40","commit",...Xt(e,"-m"),...t,...r],format:"utf-8",parser:Pu}}function Lu(){return{commit(t,...r){let n=G(arguments),s=e(t)||Iu(vt(t),vt(Ct(r[0],Ae,[])),[...Ct(r[1],oe,[]),...at(arguments,0,!0)]);return this._runTask(s,n)}};function e(t){return!Ae(t)&&ut("git.commit: requires the commit message to be supplied as a string/string[]")}}var ju=d({"src/lib/tasks/commit.ts"(){"use strict";Du(),O(),V()}});function Nu(){return{firstCommit(){return this._runTask(st(["rev-list","--max-parents=0","HEAD"],!0),G(arguments))}}}var Hu=d({"src/lib/tasks/first-commit.ts"(){"use strict";O(),V()}});function Bu(e,t){let r=["hash-object",e];return t&&r.push("-w"),st(r,!0)}var Gu=d({"src/lib/tasks/hash-object.ts"(){"use strict";V()}});function Vu(e,t,r){let n=String(r).trim(),s;if(s=_i.exec(n))return new Te(e,t,!1,s[1]);if(s=bi.exec(n))return new Te(e,t,!0,s[1]);let i="",o=n.split(" ");for(;o.length;)if(o.shift()==="in"){i=o.join(" ");break}return new Te(e,t,/^re/i.test(n),i)}var Te,_i,bi,Wu=d({"src/lib/responses/InitSummary.ts"(){"use strict";Te=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},_i=/^Init.+ repository in (.+)$/,bi=/^Rein.+ in (.+)$/}});function qu(e){return e.includes(Zr)}function Uu(e=!1,t,r){let n=["init",...r];return e&&!qu(n)&&n.splice(1,0,Zr),{commands:n,format:"utf-8",parser(s){return Vu(n.includes("--bare"),t,s)}}}var Zr,zu=d({"src/lib/tasks/init.ts"(){"use strict";Wu(),Zr="--bare"}});function Xr(e){for(let t=0;t<e.length;t++){let r=tn.exec(e[t]);if(r)return`--${r[1]}`}return""}function Yu(e){return tn.test(e)}var tn,ae=d({"src/lib/args/log-format.ts"(){"use strict";tn=/^--(stat|numstat|name-only|name-status)(=|$)/}}),yi,Ju=d({"src/lib/responses/DiffSummary.ts"(){"use strict";yi=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function vi(e=""){let t=Ci[e];return r=>ct(new yi,t,r,!1)}var wr,Yn,Jn,Kn,Ci,wi=d({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";ae(),Ju(),ni(),O(),wr=[new S(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,n=""])=>{e.files.push({file:t.trim(),changes:j(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new S(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,n])=>{e.files.push({file:t.trim(),before:j(r),after:j(n),binary:!0})}),new S(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let n=/(\d+) i/.exec(r),s=/(\d+) d/.exec(r);e.changed=j(t),e.insertions=j(n?.[1]),e.deletions=j(s?.[1])})],Yn=[new S(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,n])=>{let s=j(t),i=j(r);e.changed++,e.insertions+=s,e.deletions+=i,e.files.push({file:n,changes:s+i,insertions:s,deletions:i,binary:!1})}),new S(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],Jn=[new S(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],Kn=[new S(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,r,n,s,i])=>{e.changed++,e.files.push({file:i??n,changes:0,insertions:0,deletions:0,binary:!1,status:xr(pu(t)&&t),from:xr(!!i&&n!==i&&n),similarity:j(r)})})],Ci={"":wr,"--stat":wr,"--numstat":Yn,"--name-status":Kn,"--name-only":Jn}}});function Ku(e,t){return t.reduce((r,n,s)=>(r[n]=e[s]||"",r),Object.create({diff:null}))}function ki(e=nn,t=Oi,r=""){let n=vi(r);return function(s){let i=se(s.trim(),!1,en).map(function(o){let a=o.split(rn),h=Ku(a[0].split(e),t);return a.length>1&&a[1].trim()&&(h.diff=n(a[1])),h});return{all:i,latest:i.length&&i[0]||null,total:i.length}}}var en,rn,nn,Oi,Ti=d({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";O(),wi(),ae(),en="\xF2\xF2\xF2\xF2\xF2\xF2 ",rn=" \xF2\xF2",nn=" \xF2 ",Oi=["hash","date","message","refs","author_name","author_email"]}}),xi={};W(xi,{diffSummaryTask:()=>Qu,validateLogFormatConfig:()=>je});function Qu(e){let t=Xr(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),je(r)||{commands:r,format:"utf-8",parser:vi(t)}}function je(e){let t=e.filter(Yu);if(t.length>1)return ut(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return ut(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var sn=d({"src/lib/tasks/diff.ts"(){"use strict";ae(),wi(),V()}});function Zu(e,t){let r=[],n=[];return Object.keys(e).forEach(s=>{r.push(s),n.push(String(e[s]))}),[r,n.join(t)]}function Xu(e){return Object.keys(e).reduce((t,r)=>(r in Pr||(t[r]=e[r]),t),{})}function Si(e={},t=[]){let r=Ct(e.splitter,tt,nn),n=!Br(e.format)&&e.format?e.format:{hash:"%H",date:e.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:e.mailMap!==!1?"%aN":"%an",author_email:e.mailMap!==!1?"%aE":"%ae"},[s,i]=Zu(n,r),o=[],a=[`--pretty=format:${en}${i}${rn}`,...t],h=e.n||e["max-count"]||e.maxCount;if(h&&a.push(`--max-count=${h}`),e.from||e.to){let l=e.symmetric!==!1?"...":"..";o.push(`${e.from||""}${l}${e.to||""}`)}return tt(e.file)&&a.push("--follow",Ba(e.file)),Wr(Xu(e),a),{fields:s,splitter:r,commands:[...a,...o]}}function tc(e,t,r){let n=ki(e,t,Xr(r));return{commands:["log",...r],format:"utf-8",parser:n}}function ec(){return{log(...r){let n=G(arguments),s=Si(qr(arguments),Ct(arguments[0],oe)),i=t(...r)||je(s.commands)||e(s);return this._runTask(i,n)}};function e(r){return tc(r.splitter,r.fields,r.commands)}function t(r,n){return tt(r)&&tt(n)&&ut("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var Pr,Ai=d({"src/lib/tasks/log.ts"(){"use strict";ae(),re(),Ti(),O(),V(),sn(),Pr=(e=>(e[e["--pretty"]=0]="--pretty",e[e["max-count"]=1]="max-count",e[e.maxCount=2]="maxCount",e[e.n=3]="n",e[e.file=4]="file",e[e.format=5]="format",e[e.from=6]="from",e[e.to=7]="to",e[e.splitter=8]="splitter",e[e.symmetric=9]="symmetric",e[e.mailMap=10]="mailMap",e[e.multiLine=11]="multiLine",e[e.strictDate=12]="strictDate",e))(Pr||{})}}),xe,Ei,rc=d({"src/lib/responses/MergeSummary.ts"(){"use strict";xe=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},Ei=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),Dr,$i,nc=d({"src/lib/responses/PullSummary.ts"(){"use strict";Dr=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},$i=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function kr(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function Qn(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:j(t&&t[1]||"0"),delta:j(r&&r[1]||"0")}}var Ri,sc=d({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";O(),Ri=[new Et(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=kr(e.remoteMessages);Object.assign(s,{[n]:j(r)})}),new Et(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=kr(e.remoteMessages);Object.assign(s,{[n]:j(r)})}),new Et(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let s=kr(e.remoteMessages);s.total=Qn(t),s.reused=Qn(r),s.packReused=j(n)})]}});function Fi(e,t){return ct({remoteMessages:new Pi},Mi,t)}var Mi,Pi,Di=d({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";O(),sc(),Mi=[new Et(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...Ri,new Et([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new Et([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,n])=>{e.remoteMessages.vulnerabilities={count:j(t),summary:r,url:n}})],Pi=class{constructor(){this.all=[]}}}});function ic(e,t){let r=ct(new $i,Ii,[e,t]);return r.message&&r}var Zn,Xn,ts,es,Ii,rs,on,Li=d({"src/lib/parsers/parse-pull.ts"(){"use strict";nc(),O(),Di(),Zn=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,Xn=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,ts=/^(create|delete) mode \d+ (.+)/,es=[new S(Zn,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new S(Xn,(e,[t,,r,,n])=>r!==void 0||n!==void 0?(e.summary.changes=+t||0,e.summary.insertions=+r||0,e.summary.deletions=+n||0,!0):!1),new S(ts,(e,[t,r])=>{$(e.files,r),$(t==="create"?e.created:e.deleted,r)})],Ii=[new S(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new S(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new S(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,r,n,s])=>{e.branch.local=n,e.hash.local=t,e.branch.remote=s,e.hash.remote=r})],rs=(e,t)=>ct(new Dr,es,[e,t]),on=(e,t)=>Object.assign(new Dr,rs(e,t),Fi(e,t))}}),ns,ji,ss,oc=d({"src/lib/parsers/parse-merge.ts"(){"use strict";rc(),O(),Li(),ns=[new S(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new S(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new xe(t,r))}),new S(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new xe(t,r,{deleteRef:n}))}),new S(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new xe(t,null))}),new S(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],ji=(e,t)=>Object.assign(ss(e,t),on(e,t)),ss=e=>ct(new Ei,ns,e)}});function is(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=ji(t,r);if(n.failed)throw new ne(n);return n}}:ut("Git.merge requires at least one option")}var ac=d({"src/lib/tasks/merge.ts"(){"use strict";Ut(),oc(),V()}});function uc(e,t,r){let n=r.includes("deleted"),s=r.includes("tag")||/^refs\/tags/.test(e),i=!r.includes("new");return{deleted:n,tag:s,branch:!s,new:!i,alreadyUpdated:i,local:e,remote:t}}var os,Ni,as,cc=d({"src/lib/parsers/parse-push.ts"(){"use strict";O(),Di(),os=[new S(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new S(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref=Zt(dt({},e.ref||{}),{local:t})}),new S(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(uc(t,r,n))}),new S(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch=Zt(dt({},e.branch||{}),{local:t,remote:r,remoteName:n})}),new S(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,r,n,s])=>{e.update={head:{local:t,remote:r},hash:{from:n,to:s}}})],Ni=(e,t)=>{let r=as(e,t),n=Fi(e,t);return dt(dt({},r),n)},as=(e,t)=>ct({pushed:[]},os,[e,t])}}),Hi={};W(Hi,{pushTagsTask:()=>lc,pushTask:()=>an});function lc(e={},t){return $(t,"--tags"),an(e,t)}function an(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),Pe(r,"-v"),$(r,"--verbose"),$(r,"--porcelain"),{commands:r,format:"utf-8",parser:Ni}}var Bi=d({"src/lib/tasks/push.ts"(){"use strict";cc(),O()}});function hc(){return{showBuffer(){let e=["show",...at(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(zs(e),G(arguments))},show(){let e=["show",...at(arguments,1)];return this._runTask(st(e),G(arguments))}}}var fc=d({"src/lib/tasks/show.ts"(){"use strict";O(),V()}}),us,Gi,pc=d({"src/lib/responses/FileStatusSummary.ts"(){"use strict";us=/^(.+)\0(.+)$/,Gi=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=us.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});function cs(e){let[t,r]=e.split(qt);return{from:r||t,to:t}}function ft(e,t,r){return[`${e}${t}`,r]}function Or(e,...t){return t.map(r=>ft(e,r,(n,s)=>$(n.conflicted,s)))}function mc(e,t){let r=t.trim();switch(" "){case r.charAt(2):return n(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return n(" ",r.charAt(0),r.substr(2));default:return}function n(s,i,o){let a=`${s}${i}`,h=Vi.get(a);h&&h(e,o),a!=="##"&&a!=="!!"&&e.files.push(new Gi(o,s,i))}}var ls,Vi,Wi,dc=d({"src/lib/responses/StatusSummary.ts"(){"use strict";O(),pc(),ls=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},Vi=new Map([ft(" ","A",(e,t)=>$(e.created,t)),ft(" ","D",(e,t)=>$(e.deleted,t)),ft(" ","M",(e,t)=>$(e.modified,t)),ft("A"," ",(e,t)=>$(e.created,t)&&$(e.staged,t)),ft("A","M",(e,t)=>$(e.created,t)&&$(e.staged,t)&&$(e.modified,t)),ft("D"," ",(e,t)=>$(e.deleted,t)&&$(e.staged,t)),ft("M"," ",(e,t)=>$(e.modified,t)&&$(e.staged,t)),ft("M","M",(e,t)=>$(e.modified,t)&&$(e.staged,t)),ft("R"," ",(e,t)=>{$(e.renamed,cs(t))}),ft("R","M",(e,t)=>{let r=cs(t);$(e.renamed,r),$(e.modified,r.to)}),ft("!","!",(e,t)=>{$(e.ignored=e.ignored||[],t)}),ft("?","?",(e,t)=>$(e.not_added,t)),...Or("A","A","U"),...Or("D","D","U"),...Or("U","A","D","U"),["##",(e,t)=>{let r=/ahead (\d+)/,n=/behind (\d+)/,s=/^(.+?(?=(?:\.{3}|\s|$)))/,i=/\.{3}(\S*)/,o=/\son\s([\S]+)$/,a;a=r.exec(t),e.ahead=a&&+a[1]||0,a=n.exec(t),e.behind=a&&+a[1]||0,a=s.exec(t),e.current=a&&a[1],a=i.exec(t),e.tracking=a&&a[1],a=o.exec(t),e.current=a&&a[1]||e.current,e.detached=/\(no branch\)/.test(t)}]]),Wi=function(e){let t=e.split(qt),r=new ls;for(let n=0,s=t.length;n<s;){let i=t[n++].trim();i&&(i.charAt(0)==="R"&&(i+=qt+(t[n++]||"")),mc(r,i))}return r}}});function gc(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!qi.includes(r))],parser(r){return Wi(r)}}}var qi,_c=d({"src/lib/tasks/status.ts"(){"use strict";dc(),qi=["--null","-z"]}});function $e(e=0,t=0,r=0,n="",s=!0){return Object.defineProperty({major:e,minor:t,patch:r,agent:n,installed:s},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function bc(){return $e(0,0,0,"",!1)}function yc(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:vc,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(un));n(t)}})}}}function vc(e){return e===un?bc():ct($e(0,0,0,e),Ui,e)}var un,Ui,Cc=d({"src/lib/tasks/version.ts"(){"use strict";O(),un="installed=false",Ui=[new S(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,s=""])=>{Object.assign(e,$e(j(t),j(r),j(n),s))}),new S(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,s=""])=>{Object.assign(e,$e(j(t),j(r),n,s))})]}}),zi={};W(zi,{SimpleGitApi:()=>Ir});var Ir,wc=d({"src/lib/simple-git-api.ts"(){"use strict";Su(),Au(),$u(),Mu(),ju(),ei(),Hu(),oi(),Gu(),zu(),Ai(),ac(),Bi(),fc(),_c(),V(),Cc(),O(),Ir=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&Tu(e,n,t),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},_executor:{value:r}})}add(e){return this._runTask(st(["add",...vt(e)]),G(arguments))}cwd(e){let t=G(arguments);return typeof e=="string"?this._runTask(zn(e,this._executor),t):typeof e?.path=="string"?this._runTask(zn(e.path,e.root&&this._executor||void 0),t):this._runTask(ut("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(Bu(e,t===!0),G(arguments))}init(e){return this._runTask(Uu(e===!0,this._executor.cwd,at(arguments)),G(arguments))}merge(){return this._runTask(is(at(arguments)),G(arguments))}mergeFromTo(e,t){return tt(e)&&tt(t)?this._runTask(is([e,t,...at(arguments)]),G(arguments,!1)):this._runTask(ut("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=an({remote:Ct(arguments[0],tt),branch:Ct(arguments[1],tt)},at(arguments));return this._runTask(e,G(arguments))}stash(){return this._runTask(st(["stash",...at(arguments)]),G(arguments))}status(){return this._runTask(gc(at(arguments)),G(arguments))}},Object.assign(Ir.prototype,Eu(),Lu(),fu(),Fu(),Nu(),gu(),ec(),hc(),yc())}}),Yi={};W(Yi,{Scheduler:()=>Ki});var hs,Ki,kc=d({"src/lib/runners/scheduler.ts"(){"use strict";O(),hi(),hs=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,Ji.createDeferred)();return{promise:t,done:r,id:e}}})(),Ki=class{constructor(e=2){this.concurrency=e,this.logger=Qr("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let e=$(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),Pe(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=$(this.pending,hs());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),Qi={};W(Qi,{applyPatchTask:()=>Oc});function Oc(e,t){return st(["apply",...t,...e])}var Tc=d({"src/lib/tasks/apply-patch.ts"(){"use strict";V()}});function xc(e,t){return{branch:e,hash:t,success:!0}}function Sc(e){return{branch:e,hash:null,success:!1}}var Zi,Ac=d({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";Zi=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function Xi(e,t){return t===1&&Lr.test(e)}var fs,Lr,ps,Ne,Ec=d({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";Ac(),O(),fs=/(\S+)\s+\(\S+\s([^)]+)\)/,Lr=/^error[^']+'([^']+)'/m,ps=[new S(fs,(e,[t,r])=>{let n=xc(t,r);e.all.push(n),e.branches[t]=n}),new S(Lr,(e,[t])=>{let r=Sc(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],Ne=(e,t)=>ct(new Zi,ps,[e,t])}}),to,$c=d({"src/lib/responses/BranchSummary.ts"(){"use strict";to=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==="*",linkedWorkTree:e==="+",name:r,commit:n,label:s}}}}});function ms(e){return e?e.charAt(0):""}function eo(e){return ct(new to,ro,e)}var ro,Rc=d({"src/lib/parsers/parse-branch.ts"(){"use strict";$c(),O(),ro=[new S(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,s])=>{e.push(ms(t),!0,r,n,s)}),new S(new RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$","s"),(e,[t,r,n,s])=>{e.push(ms(t),!1,r,n,s)})]}}),no={};W(no,{branchLocalTask:()=>Mc,branchTask:()=>Fc,containsDeleteBranchCommand:()=>so,deleteBranchTask:()=>Dc,deleteBranchesTask:()=>Pc});function so(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function Fc(e){let t=so(e),r=["branch",...e];return r.length===1&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser(n,s){return t?Ne(n,s).all[0]:eo(n)}}}function Mc(){return{format:"utf-8",commands:["branch","-v"],parser:eo}}function Pc(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return Ne(r,n)},onError({exitCode:r,stdOut:n},s,i,o){if(!Xi(String(s),r))return o(s);i(n)}}}function Dc(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,s){return Ne(n,s).branches[e]},onError({exitCode:n,stdErr:s,stdOut:i},o,a,h){if(!Xi(String(o),n))return h(o);throw new ne(r.parser(te(i),te(s)),String(o))}};return r}var Ic=d({"src/lib/tasks/branch.ts"(){"use strict";Ut(),Ec(),Rc(),O()}}),io,Lc=d({"src/lib/responses/CheckIgnore.ts"(){"use strict";io=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),oo={};W(oo,{checkIgnoreTask:()=>jc});function jc(e){return{commands:["check-ignore",...e],format:"utf-8",parser:io}}var Nc=d({"src/lib/tasks/check-ignore.ts"(){"use strict";Lc()}}),ao={};W(ao,{cloneMirrorTask:()=>Bc,cloneTask:()=>uo});function Hc(e){return/^--upload-pack(=|$)/.test(e)}function uo(e,t,r){let n=["clone",...r];return tt(e)&&n.push(e),tt(t)&&n.push(t),n.find(Hc)?ut("git.fetch: potential exploit argument blocked."):st(n)}function Bc(e,t,r){return $(r,"--mirror"),uo(e,t,r)}var Gc=d({"src/lib/tasks/clone.ts"(){"use strict";V(),O()}});function Vc(e,t){return ct({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},co,[e,t])}var co,Wc=d({"src/lib/parsers/parse-fetch.ts"(){"use strict";O(),co=[new S(/From (.+)$/,(e,[t])=>{e.remote=t}),new S(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new S(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new S(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new S(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,n,s])=>{e.updated.push({name:n,tracking:s,to:r,from:t})})]}}),lo={};W(lo,{fetchTask:()=>Uc});function qc(e){return/^--upload-pack(=|$)/.test(e)}function Uc(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find(qc)?ut("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:Vc}}var zc=d({"src/lib/tasks/fetch.ts"(){"use strict";Wc(),V()}});function Yc(e){return ct({moves:[]},ho,e)}var ho,Jc=d({"src/lib/parsers/parse-move.ts"(){"use strict";O(),ho=[new S(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),fo={};W(fo,{moveTask:()=>Kc});function Kc(e,t){return{commands:["mv","-v",...vt(e),t],format:"utf-8",parser:Yc}}var Qc=d({"src/lib/tasks/move.ts"(){"use strict";Jc(),O()}}),po={};W(po,{pullTask:()=>Zc});function Zc(e,t,r){let n=["pull",...r];return e&&t&&n.splice(1,0,e,t),{commands:n,format:"utf-8",parser(s,i){return on(s,i)},onError(s,i,o,a){let h=ic(te(s.stdOut),te(s.stdErr));if(h)return a(new ne(h));a(i)}}}var Xc=d({"src/lib/tasks/pull.ts"(){"use strict";Ut(),Li(),O()}});function tl(e){let t={};return mo(e,([r])=>t[r]={name:r}),Object.values(t)}function el(e){let t={};return mo(e,([r,n,s])=>{t.hasOwnProperty(r)||(t[r]={name:r,refs:{fetch:"",push:""}}),s&&n&&(t[r].refs[s.replace(/[^a-z]/g,"")]=n)}),Object.values(t)}function mo(e,t){Nr(e,r=>t(r.split(/\s+/)))}var rl=d({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";O()}}),go={};W(go,{addRemoteTask:()=>nl,getRemotesTask:()=>sl,listRemotesTask:()=>il,remoteTask:()=>ol,removeRemoteTask:()=>al});function nl(e,t,r){return st(["remote","add",...r,e,t])}function sl(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?el:tl}}function il(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),st(t)}function ol(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),st(t)}function al(e){return st(["remote","remove",e])}var ul=d({"src/lib/tasks/remote.ts"(){"use strict";rl(),V()}}),_o={};W(_o,{stashListTask:()=>cl});function cl(e={},t){let r=Si(e),n=["stash","list",...r.commands,...t],s=ki(r.splitter,r.fields,Xr(n));return je(n)||{commands:n,format:"utf-8",parser:s}}var ll=d({"src/lib/tasks/stash-list.ts"(){"use strict";ae(),Ti(),sn(),Ai()}}),bo={};W(bo,{addSubModuleTask:()=>hl,initSubModuleTask:()=>fl,subModuleTask:()=>He,updateSubModuleTask:()=>pl});function hl(e,t){return He(["add",e,t])}function fl(e){return He(["init",...e])}function He(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),st(t)}function pl(e){return He(["update",...e])}var ml=d({"src/lib/tasks/sub-module.ts"(){"use strict";V()}});function dl(e,t){let r=isNaN(e),n=isNaN(t);return r!==n?r?1:-1:r?yo(e,t):0}function yo(e,t){return e===t?0:e>t?1:-1}function gl(e){return e.trim()}function we(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var ds,vo,_l=d({"src/lib/responses/TagList.ts"(){"use strict";ds=class{constructor(e,t){this.all=e,this.latest=t}},vo=function(e,t=!1){let r=e.split(`
|
|
35
|
-
`).map(gl).filter(Boolean);t||r.sort(function(s,i){let o=s.split("."),a=i.split(".");if(o.length===1||a.length===1)return dl(we(o[0]),we(a[0]));for(let h=0,l=Math.max(o.length,a.length);h<l;h++){let c=yo(we(o[h]),we(a[h]));if(c)return c}return 0});let n=t?r[0]:[...r].reverse().find(s=>s.indexOf(".")>=0);return new ds(r,n)}}}),Co={};W(Co,{addAnnotatedTagTask:()=>vl,addTagTask:()=>yl,tagListTask:()=>bl});function bl(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return vo(r,t)}}}function yl(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function vl(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var Cl=d({"src/lib/tasks/tag.ts"(){"use strict";_l()}}),wl=Na({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(Ou(),B(pi)),{SimpleGitApi:n}=(wc(),B(zi)),{Scheduler:s}=(kc(),B(Yi)),{configurationErrorTask:i}=(V(),B($r)),{asArray:o,filterArray:a,filterPrimitives:h,filterString:l,filterStringOrStringArray:c,filterType:u,getTrailingOptions:f,trailingFunctionArgument:p,trailingOptionsArgument:A}=(O(),B(Ls)),{applyPatchTask:M}=(Tc(),B(Qi)),{branchTask:I,branchLocalTask:N,deleteBranchesTask:J,deleteBranchTask:q}=(Ic(),B(no)),{checkIgnoreTask:Y}=(Nc(),B(oo)),{checkIsRepoTask:pt}=(Bs(),B(js)),{cloneTask:et,cloneMirrorTask:lt}=(Gc(),B(ao)),{cleanWithOptionsTask:F,isCleanOptionsArray:E}=(Zs(),B(Ks)),{diffSummaryTask:jt}=(sn(),B(xi)),{fetchTask:le}=(zc(),B(lo)),{moveTask:k}=(Qc(),B(fo)),{pullTask:b}=(Xc(),B(po)),{pushTagsTask:g}=(Bi(),B(Hi)),{addRemoteTask:v,getRemotesTask:_,listRemotesTask:T,remoteTask:x,removeRemoteTask:P}=(ul(),B(go)),{getResetMode:H,resetTask:U}=(li(),B(ai)),{stashListTask:K}=(ll(),B(_o)),{addSubModuleTask:it,initSubModuleTask:At,subModuleTask:wt,updateSubModuleTask:Rt}=(ml(),B(bo)),{addAnnotatedTagTask:kt,addTagTask:Z,tagListTask:yt}=(Cl(),B(Co)),{straightThroughBufferTask:Ft,straightThroughStringTask:rt}=(V(),B($r));function C(m,y){this._plugins=y,this._executor=new r(m.baseDir,new s(m.maxConcurrentProcesses),y),this._trimmed=m.trimmed}(C.prototype=Object.create(n.prototype)).constructor=C,C.prototype.customBinary=function(m){return this._plugins.reconfigure("binary",m),this},C.prototype.env=function(m,y){return arguments.length===1&&typeof m=="object"?this._executor.env=m:(this._executor.env=this._executor.env||{})[m]=y,this},C.prototype.stashList=function(m){return this._runTask(K(A(arguments)||{},a(m)&&m||[]),p(arguments))};function ln(m,y,D,nt){return typeof D!="string"?i(`git.${m}() requires a string 'repoPath'`):y(D,u(nt,l),f(arguments))}C.prototype.clone=function(){return this._runTask(ln("clone",et,...arguments),p(arguments))},C.prototype.mirror=function(){return this._runTask(ln("mirror",lt,...arguments),p(arguments))},C.prototype.mv=function(m,y){return this._runTask(k(m,y),p(arguments))},C.prototype.checkoutLatestTag=function(m){var y=this;return this.pull(function(){y.tags(function(D,nt){y.checkout(nt.latest,m)})})},C.prototype.pull=function(m,y,D,nt){return this._runTask(b(u(m,l),u(y,l),f(arguments)),p(arguments))},C.prototype.fetch=function(m,y){return this._runTask(le(u(m,l),u(y,l),f(arguments)),p(arguments))},C.prototype.silent=function(m){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},C.prototype.tags=function(m,y){return this._runTask(yt(f(arguments)),p(arguments))},C.prototype.rebase=function(){return this._runTask(rt(["rebase",...f(arguments)]),p(arguments))},C.prototype.reset=function(m){return this._runTask(U(H(m),f(arguments)),p(arguments))},C.prototype.revert=function(m){let y=p(arguments);return typeof m!="string"?this._runTask(i("Commit must be a string"),y):this._runTask(rt(["revert",...f(arguments,0,!0),m]),y)},C.prototype.addTag=function(m){let y=typeof m=="string"?Z(m):i("Git.addTag requires a tag name");return this._runTask(y,p(arguments))},C.prototype.addAnnotatedTag=function(m,y){return this._runTask(kt(m,y),p(arguments))},C.prototype.deleteLocalBranch=function(m,y,D){return this._runTask(q(m,typeof y=="boolean"?y:!1),p(arguments))},C.prototype.deleteLocalBranches=function(m,y,D){return this._runTask(J(m,typeof y=="boolean"?y:!1),p(arguments))},C.prototype.branch=function(m,y){return this._runTask(I(f(arguments)),p(arguments))},C.prototype.branchLocal=function(m){return this._runTask(N(),p(arguments))},C.prototype.raw=function(m){let y=!Array.isArray(m),D=[].slice.call(y?arguments:m,0);for(let gt=0;gt<D.length&&y;gt++)if(!h(D[gt])){D.splice(gt,D.length-gt);break}D.push(...f(arguments,0,!0));var nt=p(arguments);return D.length?this._runTask(rt(D,this._trimmed),nt):this._runTask(i("Raw: must supply one or more command to execute"),nt)},C.prototype.submoduleAdd=function(m,y,D){return this._runTask(it(m,y),p(arguments))},C.prototype.submoduleUpdate=function(m,y){return this._runTask(Rt(f(arguments,!0)),p(arguments))},C.prototype.submoduleInit=function(m,y){return this._runTask(At(f(arguments,!0)),p(arguments))},C.prototype.subModule=function(m,y){return this._runTask(wt(f(arguments)),p(arguments))},C.prototype.listRemote=function(){return this._runTask(T(f(arguments)),p(arguments))},C.prototype.addRemote=function(m,y,D){return this._runTask(v(m,y,f(arguments)),p(arguments))},C.prototype.removeRemote=function(m,y){return this._runTask(P(m),p(arguments))},C.prototype.getRemotes=function(m,y){return this._runTask(_(m===!0),p(arguments))},C.prototype.remote=function(m,y){return this._runTask(x(f(arguments)),p(arguments))},C.prototype.tag=function(m,y){let D=f(arguments);return D[0]!=="tag"&&D.unshift("tag"),this._runTask(rt(D),p(arguments))},C.prototype.updateServerInfo=function(m){return this._runTask(rt(["update-server-info"]),p(arguments))},C.prototype.pushTags=function(m,y){let D=g({remote:u(m,l)},f(arguments));return this._runTask(D,p(arguments))},C.prototype.rm=function(m){return this._runTask(rt(["rm","-f",...o(m)]),p(arguments))},C.prototype.rmKeepLocal=function(m){return this._runTask(rt(["rm","--cached",...o(m)]),p(arguments))},C.prototype.catFile=function(m,y){return this._catFile("utf-8",arguments)},C.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},C.prototype._catFile=function(m,y){var D=p(y),nt=["cat-file"],gt=y[0];if(typeof gt=="string")return this._runTask(i("Git.catFile: options must be supplied as an array of strings"),D);Array.isArray(gt)&&nt.push.apply(nt,gt);let Ve=m==="buffer"?Ft(nt):rt(nt);return this._runTask(Ve,D)},C.prototype.diff=function(m,y){let D=l(m)?i("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):rt(["diff",...f(arguments)]);return this._runTask(D,p(arguments))},C.prototype.diffSummary=function(){return this._runTask(jt(f(arguments,1)),p(arguments))},C.prototype.applyPatch=function(m){let y=c(m)?M(o(m),f([].slice.call(arguments,1))):i("git.applyPatch requires one or more string patches as the first argument");return this._runTask(y,p(arguments))},C.prototype.revparse=function(){let m=["rev-parse",...f(arguments,!0)];return this._runTask(rt(m,!0),p(arguments))},C.prototype.clean=function(m,y,D){let nt=E(m),gt=nt&&m.join("")||u(m,l)||"",Ve=f([].slice.call(arguments,nt?1:0));return this._runTask(F(gt,Ve),p(arguments))},C.prototype.exec=function(m){let y={commands:[],format:"utf-8",parser(){typeof m=="function"&&m()}};return this._runTask(y)},C.prototype.clearQueue=function(){return this},C.prototype.checkIgnore=function(m,y){return this._runTask(Y(o(u(m,c,[]))),p(arguments))},C.prototype.checkIsRepo=function(m,y){return this._runTask(pt(u(m,l)),p(arguments))},t.exports=C}});re();$t();var kl=class extends xt{constructor(e,t){super(void 0,t),this.config=e}};$t();$t();var Tt=class extends xt{constructor(e,t,r){super(e,r),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};Ut();ws();Bs();Zs();ei();ni();oi();li();function Ol(e){return e?[{type:"spawn.before",action(n,s){e.aborted&&s.kill(new Tt(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(n,s){function i(){s.kill(new Tt(void 0,"abort","Abort signal received"))}e.addEventListener("abort",i),s.spawned.on("close",()=>e.removeEventListener("abort",i))}}]:void 0}function Tl(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function xl(e,t){if(Tl(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new Tt(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function Sl(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new Tt(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(t==="clone"&&/^\s*-u\b/.test(e))throw new Tt(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(t==="push"&&/^\s*--exec\b/.test(e))throw new Tt(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function Al({allowUnsafeProtocolOverride:e=!1,allowUnsafePack:t=!1}={}){return{type:"spawn.args",action(r,n){return r.forEach((s,i)=>{let o=i<r.length?r[i+1]:"";e||xl(s,o),t||Sl(s,n.method)}),r}}}O();function El(e){let t=Xt(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}O();var gs=(0,Wt.deferred)().promise;function $l({onClose:e=!0,onExit:t=50}={}){function r(){let s=-1,i={close:(0,Wt.deferred)(),closeTimeout:(0,Wt.deferred)(),exit:(0,Wt.deferred)(),exitTimeout:(0,Wt.deferred)()},o=Promise.race([e===!1?gs:i.closeTimeout.promise,t===!1?gs:i.exitTimeout.promise]);return n(e,i.close,i.closeTimeout),n(t,i.exit,i.exitTimeout),{close(a){s=a,i.close.done()},exit(a){s=a,i.exit.done()},get exitCode(){return s},result:o}}function n(s,i,o){s!==!1&&(s===!0?i.promise:i.promise.then(()=>Tr(s))).then(o.done)}return{type:"spawn.after",action(s,i){return Qt(this,arguments,function*(o,{spawned:a,close:h}){var l,c;let u=r(),f=!0,p=()=>void(f=!1);(l=a.stdout)==null||l.on("data",p),(c=a.stderr)==null||c.on("data",p),a.on("error",p),a.on("close",A=>u.close(A)),a.on("exit",A=>u.exit(A));try{yield u.result,f&&(yield Tr(50)),h(u.exitCode)}catch(A){h(u.exitCode,A)}})}}}O();var Rl="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",_s="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function Fl(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function bs(e,t){if(e.length<1||e.length>2)throw new Tt(void 0,"binary",Rl);if(e.some(Fl))if(t)console.warn(_s);else throw new Tt(void 0,"binary",_s);let[n,s]=e;return{binary:n,prefix:s}}function Ml(e,t=["git"],r=!1){let n=bs(vt(t),r);e.on("binary",s=>{n=bs(vt(s),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",s=>n.prefix?[n.prefix,...s]:s)}$t();function Pl(e){return!!(e.exitCode&&e.stdErr.length)}function Dl(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function Il(e=!1,t=Pl,r=Dl){return(n,s)=>!e&&n||!t(s)?n:r(s)}function ys(e){return{type:"task.error",action(t,r){let n=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(n)?{error:new xt(void 0,n.toString("utf-8"))}:{error:n}}}}O();var Ll=class{constructor(){this.plugins=new Set,this.events=new wo.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let r=$(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){let t=[];return vt(e).forEach(r=>r&&this.plugins.add($(t,r))),()=>{t.forEach(r=>this.plugins.delete(r))}}exec(e,t,r){let n=t,s=Object.freeze(Object.create(r));for(let i of this.plugins)i.type===e&&(n=i.action(n,s));return n}};O();function jl(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(i,o){return r.includes(o.method)?As(i,t):i}},{type:"spawn.after",action(i,o){var a;o.commands.includes(t)&&((a=o.spawned.stderr)==null||a.on("data",h=>{let l=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(h.toString("utf8"));l&&e({method:o.method,stage:Nl(l[1]),progress:j(l[2]),processed:j(l[3]),total:j(l[4])})}))}}]}function Nl(e){return String(e.toLowerCase().split(" ",1))||"unknown"}O();function Hl(e){let t=Rs(e,["uid","gid"]);return{type:"spawn.options",action(r){return dt(dt({},t),r)}}}function Bl({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(n,s){var i,o;let a;function h(){a&&clearTimeout(a),a=setTimeout(c,e)}function l(){var u,f;(u=s.spawned.stdout)==null||u.off("data",h),(f=s.spawned.stderr)==null||f.off("data",h),s.spawned.off("exit",l),s.spawned.off("close",l),a&&clearTimeout(a)}function c(){l(),s.kill(new Tt(void 0,"timeout","block timeout reached"))}r&&((i=s.spawned.stdout)==null||i.on("data",h)),t&&((o=s.spawned.stderr)==null||o.on("data",h)),s.spawned.on("exit",l),s.spawned.on("close",l),h()}}}re();function Gl(){return{type:"spawn.args",action(e){let t=[],r;function n(s){(r=r||[]).push(...s)}for(let s=0;s<e.length;s++){let i=e[s];if(Se(i)){n(Vn(i));continue}if(i==="--"){n(e.slice(s+1).flatMap(o=>Se(o)&&Vn(o)||o));break}t.push(i)}return r?[...t,"--",...r.map(String)]:t}}}O();var Vl=wl();function Wl(e,t){var r;let n=new Ll,s=Ds(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!Hr(s.baseDir))throw new kl(s,"Cannot use simple-git on a directory that does not exist");return Array.isArray(s.config)&&n.add(El(s.config)),n.add(Al(s.unsafe)),n.add(Gl()),n.add($l(s.completion)),s.abort&&n.add(Ol(s.abort)),s.progress&&n.add(jl(s.progress)),s.timeout&&n.add(Bl(s.timeout)),s.spawnOptions&&n.add(Hl(s.spawnOptions)),n.add(ys(Il(!0))),s.errors&&n.add(ys(s.errors)),Ml(n,s.binary,(r=s.unsafe)==null?void 0:r.allowUnsafeCustomBinary),new Vl(s,n)}Ut();var ko=Wl;var To="@lntvow/dev",xo="4.3.9";w();var zt=_t(require("fs"),1),ue=_t(require("path"),1),So=require("url"),Be=_t(ur(),1),ql=(0,So.fileURLToPath)(L),Ul=ue.default.dirname(ql);console.log(Be.default.blue(`Cwd is: ${process.cwd()}`));function Ao(e,t){zt.default.existsSync(t)||zt.default.mkdirSync(t),zt.default.readdirSync(e,{withFileTypes:!0}).forEach(n=>{let s=ue.default.resolve(e,n.name),i=ue.default.resolve(t,n.name);if(n.isDirectory())Ao(s,i);else{if(zt.default.existsSync(i))return;zt.default.copyFileSync(s,i)}})}function Eo(){console.log(Be.default.blue("Start copying template files")),Ao(ue.default.resolve(Ul,"./configs"),process.cwd()),console.log(Be.default.green("Template files copied successfully"))}cn.default.extend(Fo.default);var zl=(0,Ro.fileURLToPath)(L),Yl=(0,ce.dirname)(zl),Mo=(0,ce.resolve)(Yl,"../");console.log("repoPath:===== ",Mo);Jt.name(To).version(xo,"-v, --version","output the version number");Jt.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").description("init project").action(e=>{console.log(St.default.green("Init project by @lntvow/dev"));let{temp:t,git:r,scripts:n}=e;if(t&&Eo(),r){console.log(St.default.blue("Start init simple-git-hooks"));let s=(0,$o.execSync)("npx simple-git-hooks");console.log(s.toString())}if(n){console.log(St.default.blue("Start init scripts"));try{let s=(0,ce.resolve)(process.cwd(),"package.json"),i=JSON.parse((0,Ge.readFileSync)(s,"utf-8"));i={...i,scripts:{postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",commit:"git add . && git-cz && git push",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc",ncu:"ncu -u && pnpm install",...i.scripts}},(0,Ge.writeFileSync)(s,JSON.stringify(i,null,2)),console.log(St.default.green("Scripts added successfully"))}catch{console.log(St.default.yellow("No package.json file found ignoring scripts"))}}console.log(St.default.yellow(`
|
|
36
|
-
You may need to re-execute the "pnpm install" command`))});Jt.command("release").description("git release").action(async()=>{console.log(
|
|
29
|
+
`+i),e.push(s+"m+"+be.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=wa()+t+" "+e[0]}function wa(){return Q.inspectOpts.hideDate?"":new Date().toISOString()+" "}function ka(...e){return process.stderr.write(_e.formatWithOptions(Q.inspectOpts,...e)+`
|
|
30
|
+
`)}function Oa(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Ta(){return process.env.DEBUG}function xa(e){e.inspectOpts={};let t=Object.keys(Q.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=Q.inspectOpts[t[r]]}be.exports=hr()(Q);var{formatters:In}=be.exports;In.o=function(e){return this.inspectOpts.colors=this.useColors,_e.inspect(e,this.inspectOpts).split(`
|
|
31
|
+
`).map(t=>t.trim()).join(" ")};In.O=function(e){return this.inspectOpts.colors=this.useColors,_e.inspect(e,this.inspectOpts)}});var mr=z((Ph,pr)=>{"use strict";w();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?pr.exports=Rn():pr.exports=Ln()});var jn=z(ht=>{"use strict";w();var Sa=ht&&ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ht,"__esModule",{value:!0});var Aa=require("fs"),Ea=Sa(mr()),Vt=Ea.default("@kwsites/file-exists");function $a(e,t,r){Vt("checking %s",e);try{let n=Aa.statSync(e);return n.isFile()&&t?(Vt("[OK] path represents a file"),!0):n.isDirectory()&&r?(Vt("[OK] path represents a directory"),!0):(Vt("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return Vt("[FAIL] path is not accessible: %o",n),!1;throw Vt("[FATAL] %o",n),n}}function Ra(e,t=ht.READABLE){return $a(e,(t&ht.FILE)>0,(t&ht.FOLDER)>0)}ht.exists=Ra;ht.FILE=1;ht.FOLDER=2;ht.READABLE=ht.FILE+ht.FOLDER});var Nn=z(ye=>{"use strict";w();function Fa(e){for(var t in e)ye.hasOwnProperty(t)||(ye[t]=e[t])}Object.defineProperty(ye,"__esModule",{value:!0});Fa(jn())});var gr=z(Pt=>{"use strict";w();Object.defineProperty(Pt,"__esModule",{value:!0});Pt.createDeferred=Pt.deferred=void 0;function dr(){let e,t,r="pending";return{promise:new Promise((s,i)=>{e=s,t=i}),done(s){r==="pending"&&(r="resolved",e(s))},fail(s){r==="pending"&&(r="rejected",t(s))},get fulfilled(){return r!=="pending"},get status(){return r}}}Pt.deferred=dr;Pt.createDeferred=dr;Pt.default=dr});w();var Eo=require("child_process"),He=require("fs"),$o=require("path");w();var kn=_t(wn(),1),{program:Jt,createCommand:uh,createArgument:ch,createOption:lh,CommanderError:hh,InvalidArgumentError:fh,InvalidOptionArgumentError:ph,Command:mh,Argument:dh,Option:gh,Help:_h}=kn.default;var wt=_t(or(),1),un=_t(xn(),1),Ro=_t(Sn(),1);w();var Fe=_t(Nn(),1),Ae=_t(mr(),1),hi=require("child_process"),Yi=_t(gr(),1),Wt=_t(gr(),1),Co=require("events"),$e=Object.defineProperty,Ma=Object.defineProperties,Pa=Object.getOwnPropertyDescriptor,Da=Object.getOwnPropertyDescriptors,Ir=Object.getOwnPropertyNames,Hn=Object.getOwnPropertySymbols,ys=Object.prototype.hasOwnProperty,Ia=Object.prototype.propertyIsEnumerable,Bn=(e,t,r)=>t in e?$e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dt=(e,t)=>{for(var r in t||(t={}))ys.call(t,r)&&Bn(e,r,t[r]);if(Hn)for(var r of Hn(t))Ia.call(t,r)&&Bn(e,r,t[r]);return e},Zt=(e,t)=>Ma(e,Da(t)),d=(e,t)=>function(){return e&&(t=(0,e[Ir(e)[0]])(e=0)),t},La=(e,t)=>function(){return t||(0,e[Ir(e)[0]])((t={exports:{}}).exports,t),t.exports},W=(e,t)=>{for(var r in t)$e(e,r,{get:t[r],enumerable:!0})},ja=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ir(t))!ys.call(e,s)&&s!==r&&$e(e,s,{get:()=>t[s],enumerable:!(n=Pa(t,s))||n.enumerable});return e},B=e=>ja($e({},"__esModule",{value:!0}),e),Qt=(e,t,r)=>new Promise((n,s)=>{var i=h=>{try{a(r.next(h))}catch(l){s(l)}},o=h=>{try{a(r.throw(h))}catch(l){s(l)}},a=h=>h.done?n(h.value):Promise.resolve(h.value).then(i,o);a((r=r.apply(e,t)).next())});function Na(...e){let t=new String(e);return Re.set(t,e),t}function xe(e){return e instanceof String&&Re.has(e)}function Gn(e){return Re.get(e)||[]}var Re,re=d({"src/lib/args/pathspec.ts"(){"use strict";Re=new WeakMap}}),St,$t=d({"src/lib/errors/git-error.ts"(){"use strict";St=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),ne,Ut=d({"src/lib/errors/git-response-error.ts"(){"use strict";$t(),ne=class extends St{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),vs,Cs=d({"src/lib/errors/task-configuration-error.ts"(){"use strict";$t(),vs=class extends St{constructor(e){super(void 0,e)}}}});function ws(e){return typeof e=="function"?e:Lt}function ks(e){return typeof e=="function"&&e!==Lt}function Os(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function Ts(e,t=0){return xs(e)&&e.length>t?e[t]:void 0}function It(e,t=0){if(xs(e)&&e.length>t)return e[e.length-1-t]}function xs(e){return!!(e&&typeof e.length=="number")}function se(e="",t=!0,r=`
|
|
32
|
+
`){return e.split(r).reduce((n,s)=>{let i=t?s.trim():s;return i&&n.push(i),n},[])}function Lr(e,t){return se(e,!0).map(r=>t(r))}function jr(e){return(0,Fe.exists)(e,Fe.FOLDER)}function $(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function Ss(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function Me(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function vt(e){return Array.isArray(e)?e:[e]}function As(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function Es(e){return vt(e).map(String)}function L(e,t=0){if(e==null)return t;let r=parseInt(e,10);return isNaN(r)?t:r}function Xt(e,t){let r=[];for(let n=0,s=e.length;n<s;n++)r.push(t,e[n]);return r}function te(e){return(Array.isArray(e)?Buffer.concat(e):e).toString("utf-8")}function $s(e,t){return Object.assign({},...t.map(r=>r in e?{[r]:e[r]}:{}))}function kr(e=0){return new Promise(t=>setTimeout(t,e))}function Or(e){if(e!==!1)return e}var qt,Lt,ie,Pe=d({"src/lib/utils/util.ts"(){"use strict";qt="\0",Lt=()=>{},ie=Object.prototype.toString.call.bind(Object.prototype.toString)}});function Ct(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function Nr(e,t){let r=xe(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function Hr(e){return!!e&&ie(e)==="[object Object]"}function Rs(e){return typeof e=="function"}var oe,tt,Fs,Se,Br,Ms=d({"src/lib/utils/argument-filters.ts"(){"use strict";Pe(),re(),oe=e=>Array.isArray(e),tt=e=>typeof e=="string",Fs=e=>Array.isArray(e)&&e.every(tt),Se=e=>tt(e)||Array.isArray(e)&&e.every(tt),Br=e=>e==null||"number|boolean|function".includes(typeof e)?!1:Array.isArray(e)||typeof e=="string"||typeof e.length=="number"}}),Tr,Ha=d({"src/lib/utils/exit-codes.ts"(){"use strict";Tr=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(Tr||{})}}),ee,Ba=d({"src/lib/utils/git-output-streams.ts"(){"use strict";ee=class{constructor(e,t){this.stdOut=e,this.stdErr=t}asStrings(){return new ee(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),S,Et,Ga=d({"src/lib/utils/line-parser.ts"(){"use strict";S=class{constructor(e,t){this.matches=[],this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((s,i)=>this.addMatch(s,i,r(i)))?this.useMatches(n,this.prepareMatches())!==!1:!1),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){let n=r&&e.exec(r);return n&&this.pushMatch(t,n),!!n}pushMatch(e,t){this.matches.push(...t.slice(1))}},Et=class extends S{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 Ps(...e){let t=process.cwd(),r=Object.assign(dt({baseDir:t},Ds),...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var Ds,Va=d({"src/lib/utils/simple-git-options.ts"(){"use strict";Ds={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function Gr(e,t=[]){return Hr(e)?Object.keys(e).reduce((r,n)=>{let s=e[n];return xe(s)?r.push(s):Nr(s,["boolean"])?r.push(n+"="+s):r.push(n),r},t):t}function at(e,t=0,r=!1){let n=[];for(let s=0,i=t<0?e.length:t;s<i;s++)"string|number".includes(typeof e[s])&&n.push(String(e[s]));return Gr(Vr(e),n),r||n.push(...Wa(e)),n}function Wa(e){let t=typeof It(e)=="function";return Ct(It(e,t?1:0),oe,[])}function Vr(e){let t=Rs(It(e));return Ct(It(e,t?1:0),Hr)}function G(e,t=!0){let r=ws(It(e));return t||ks(r)?r:void 0}var qa=d({"src/lib/utils/task-options.ts"(){"use strict";Ms(),Pe(),re()}});function xr(e,t){return e(t.stdOut,t.stdErr)}function ct(e,t,r,n=!0){return vt(r).forEach(s=>{for(let i=se(s,n),o=0,a=i.length;o<a;o++){let h=(l=0)=>{if(!(o+l>=a))return i[o+l]};t.some(({parse:l})=>l(h,e))}}),e}var Ua=d({"src/lib/utils/task-parser.ts"(){"use strict";Pe()}}),Is={};W(Is,{ExitCodes:()=>Tr,GitOutputStreams:()=>ee,LineParser:()=>S,NOOP:()=>Lt,NULL:()=>qt,RemoteLineParser:()=>Et,append:()=>$,appendTaskOptions:()=>Gr,asArray:()=>vt,asCamelCase:()=>As,asFunction:()=>ws,asNumber:()=>L,asStringArray:()=>Es,bufferToString:()=>te,callTaskParser:()=>xr,createInstanceConfig:()=>Ps,delay:()=>kr,filterArray:()=>oe,filterFunction:()=>Rs,filterHasLength:()=>Br,filterPlainObject:()=>Hr,filterPrimitives:()=>Nr,filterString:()=>tt,filterStringArray:()=>Fs,filterStringOrStringArray:()=>Se,filterType:()=>Ct,first:()=>Ts,folderExists:()=>jr,forEachLineWithContent:()=>Lr,getTrailingOptions:()=>at,including:()=>Ss,isUserFunction:()=>ks,last:()=>It,objectToString:()=>ie,orVoid:()=>Or,parseStringResponse:()=>ct,pick:()=>$s,prefixedArray:()=>Xt,remove:()=>Me,splitOn:()=>Os,toLinesWithContent:()=>se,trailingFunctionArgument:()=>G,trailingOptionsArgument:()=>Vr});var O=d({"src/lib/utils/index.ts"(){"use strict";Ms(),Ha(),Ba(),Ga(),Va(),qa(),Ua(),Pe()}}),Ls={};W(Ls,{CheckRepoActions:()=>Sr,checkIsBareRepoTask:()=>Ns,checkIsRepoRootTask:()=>js,checkIsRepoTask:()=>za});function za(e){switch(e){case"bare":return Ns();case"root":return js()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:De,parser:Wr}}function js(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:De,parser(t){return/^\.(git)?$/.test(t.trim())}}}function Ns(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:De,parser:Wr}}function Ya(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var Sr,De,Wr,Hs=d({"src/lib/tasks/check-is-repo.ts"(){"use strict";O(),Sr=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(Sr||{}),De=({exitCode:e},t,r,n)=>{if(e===128&&Ya(t))return r(Buffer.from("false"));n(t)},Wr=e=>e.trim()==="true"}});function Ja(e,t){let r=new Bs(e),n=e?Vs:Gs;return se(t).forEach(s=>{let i=s.replace(n,"");r.paths.push(i),(Ws.test(i)?r.folders:r.files).push(i)}),r}var Bs,Gs,Vs,Ws,Ka=d({"src/lib/responses/CleanSummary.ts"(){"use strict";O(),Bs=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},Gs=/^[a-z]+\s*/i,Vs=/^[a-z]+\s+[a-z]+\s*/i,Ws=/\/$/}}),Ar={};W(Ar,{EMPTY_COMMANDS:()=>Ie,adhocExecTask:()=>qs,configurationErrorTask:()=>ut,isBufferTask:()=>zs,isEmptyTask:()=>Ys,straightThroughBufferTask:()=>Us,straightThroughStringTask:()=>st});function qs(e){return{commands:Ie,format:"empty",parser:e}}function ut(e){return{commands:Ie,format:"empty",parser(){throw typeof e=="string"?new vs(e):e}}}function st(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function Us(e){return{commands:e,format:"buffer",parser(t){return t}}}function zs(e){return e.format==="buffer"}function Ys(e){return e.format==="empty"||!e.commands.length}var Ie,V=d({"src/lib/tasks/task.ts"(){"use strict";Cs(),Ie=[]}}),Js={};W(Js,{CONFIG_ERROR_INTERACTIVE_MODE:()=>qr,CONFIG_ERROR_MODE_REQUIRED:()=>Ur,CONFIG_ERROR_UNKNOWN_OPTION:()=>zr,CleanOptions:()=>we,cleanTask:()=>Ks,cleanWithOptionsTask:()=>Qa,isCleanOptionsArray:()=>Za});function Qa(e,t){let{cleanMode:r,options:n,valid:s}=Xa(e);return r?s.options?(n.push(...t),n.some(ru)?ut(qr):Ks(r,n)):ut(zr+JSON.stringify(e)):ut(Ur)}function Ks(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return Ja(e==="n",n)}}}function Za(e){return Array.isArray(e)&&e.every(t=>Yr.has(t))}function Xa(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(s=>{tu(s)?(t=s,n.cleanMode=!0):n.options=n.options&&eu(r[r.length]=`-${s}`)}),{cleanMode:t,options:r,valid:n}}function tu(e){return e==="f"||e==="n"}function eu(e){return/^-[a-z]$/i.test(e)&&Yr.has(e.charAt(1))}function ru(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}var qr,Ur,zr,we,Yr,Qs=d({"src/lib/tasks/clean.ts"(){"use strict";Ka(),O(),V(),qr="Git clean interactive mode is not supported",Ur='Git clean mode parameter ("n" or "f") is required',zr="Git clean unknown option found in: ",we=(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",e))(we||{}),Yr=new Set(["i",...Es(Object.values(we))])}});function nu(e){let t=new Xs;for(let r of Zs(e))t.addValue(r.file,String(r.key),r.value);return t}function su(e,t){let r=null,n=[],s=new Map;for(let i of Zs(e,t))i.key===t&&(n.push(r=i.value),s.has(i.file)||s.set(i.file,[]),s.get(i.file).push(r));return{key:t,paths:Array.from(s.keys()),scopes:s,value:r,values:n}}function iu(e){return e.replace(/^(file):/,"")}function*Zs(e,t=null){let r=e.split("\0");for(let n=0,s=r.length-1;n<s;){let i=iu(r[n++]),o=r[n++],a=t;if(o.includes(`
|
|
33
|
+
`)){let h=Os(o,`
|
|
34
|
+
`);a=h[0],o=h[1]}yield{file:i,key:a,value:o}}}var Xs,ou=d({"src/lib/responses/ConfigList.ts"(){"use strict";O(),Xs=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((e,t)=>Object.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){let t=It(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,r){let n=this.addFile(e);n.hasOwnProperty(t)?Array.isArray(n[t])?n[t].push(r):n[t]=[n[t],r]:n[t]=r,this._all=void 0}}}});function _r(e,t){return typeof e=="string"&&Er.hasOwnProperty(e)?e:t}function au(e,t,r,n){let s=["config",`--${n}`];return r&&s.push("--add"),s.push(e,t),{commands:s,format:"utf-8",parser(i){return i}}}function uu(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser(n){return su(n,e)}}}function cu(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return nu(r)}}}function lu(){return{addConfig(e,t,...r){return this._runTask(au(e,t,r[0]===!0,_r(r[1],"local")),G(arguments))},getConfig(e,t){return this._runTask(uu(e,_r(t,void 0)),G(arguments))},listConfig(...e){return this._runTask(cu(_r(e[0],void 0)),G(arguments))}}}var Er,ti=d({"src/lib/tasks/config.ts"(){"use strict";ou(),O(),Er=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(Er||{})}});function hu(e){return ei.has(e)}var br,ei,ri=d({"src/lib/tasks/diff-name-status.ts"(){"use strict";br=(e=>(e.ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",e))(br||{}),ei=new Set(Object.values(br))}});function fu(...e){return new si().param(...e)}function pu(e){let t=new Set,r={};return Lr(e,n=>{let[s,i,o]=n.split(qt);t.add(s),(r[s]=r[s]||[]).push({line:L(i),path:s,preview:o})}),{paths:t,results:r}}function mu(){return{grep(e){let t=G(arguments),r=at(arguments);for(let s of ni)if(r.includes(s))return this._runTask(ut(`git.grep: use of "${s}" is not supported.`),t);typeof e=="string"&&(e=fu().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(s){return pu(s)}},t)}}}var ni,Kt,Vn,si,ii=d({"src/lib/tasks/grep.ts"(){"use strict";O(),V(),ni=["-h"],Kt=Symbol("grepQuery"),si=class{constructor(){this[Vn]=[]}*[(Vn=Kt,Symbol.iterator)](){for(let e of this[Kt])yield e}and(...e){return e.length&&this[Kt].push("--and","(",...Xt(e,"-e"),")"),this}param(...e){return this[Kt].push(...Xt(e,"-e")),this}}}}),oi={};W(oi,{ResetMode:()=>ke,getResetMode:()=>gu,resetTask:()=>du});function du(e,t){let r=["reset"];return ai(e)&&r.push(`--${e}`),r.push(...t),st(r)}function gu(e){if(ai(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function ai(e){return ui.includes(e)}var ke,ui,ci=d({"src/lib/tasks/reset.ts"(){"use strict";V(),ke=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(ke||{}),ui=Array.from(Object.values(ke))}});function _u(){return(0,Ae.default)("simple-git")}function Wn(e,t,r){return!t||!String(t).replace(/\s*/,"")?r?(n,...s)=>{e(n,...s),r(n,...s)}:e:(n,...s)=>{e(`%s ${n}`,t,...s),r&&r(n,...s)}}function bu(e,t,{namespace:r}){if(typeof e=="string")return e;let n=t&&t.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}function Jr(e,t,r,n=_u()){let s=e&&`[${e}]`||"",i=[],o=typeof t=="string"?n.extend(t):t,a=bu(Ct(t,tt),o,n);return l(r);function h(c,u){return $(i,Jr(e,a.replace(/^[^:]+/,c),u,n))}function l(c){let u=c&&`[${c}]`||"",f=o&&Wn(o,u)||Lt,p=Wn(n,`${s} ${u}`,f);return Object.assign(o?f:p,{label:e,sibling:h,info:p,step:l})}}var li=d({"src/lib/git-logger.ts"(){"use strict";O(),Ae.default.formatters.L=e=>String(Br(e)?e.length:"-"),Ae.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):ie(e)}}),ve,$r,yu=d({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";$t(),li(),ve=class{constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){let t=ve.getName(e.commands[0]),r=Jr(this.logLabel,t);return{task:e,logger:r,name:t}}push(e){let 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(let[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(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let t=this.withProgress(e);if(!t)throw new St(void 0,"TasksPendingQueue: attempt called for an unknown task");return t.logger("Starting task"),t}static getName(e="empty"){return`task:${e}:${++ve.counter}`}},$r=ve,$r.counter=0}});function Dt(e,t){return{method:Ts(e.commands)||"",commands:t}}function vu(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function qn(e,t,r,n){return s=>{r("%s received %L bytes",t,s),n("%B",s),e.push(s)}}var Rr,Cu=d({"src/lib/runners/git-executor-chain.ts"(){"use strict";$t(),V(),O(),yu(),Rr=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new $r}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}attemptTask(e){return Qt(this,null,function*(){let t=yield this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:n}=this._queue.attempt(e);return yield Ys(e)?this.attemptEmptyTask(e,n):this.attemptRemoteTask(e,n)}catch(n){throw this.onFatalException(e,n)}finally{r(),t()}})}onFatalException(e,t){let r=t instanceof St?Object.assign(t,{task:e}):new St(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}attemptRemoteTask(e,t){return Qt(this,null,function*(){let r=this._plugins.exec("spawn.binary","",Dt(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],Dt(e,e.commands)),s=yield this.gitResponse(e,r,n,this.outputHandler,t.step("SPAWN")),i=yield this.handleTaskData(e,n,s,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),zs(e)?xr(e.parser,i):xr(e.parser,i.asStrings())})}attemptEmptyTask(e,t){return Qt(this,null,function*(){return t("empty task bypassing child process to call to task's parser"),e.parser(this)})}handleTaskData(e,t,r,n){let{exitCode:s,rejection:i,stdOut:o,stdErr:a}=r;return new Promise((h,l)=>{n("Preparing to handle process response exitCode=%d stdOut=",s);let{error:c}=this._plugins.exec("task.error",{error:i},dt(dt({},Dt(e,t)),r));if(c&&e.onError)return n.info("exitCode=%s handling with custom error handler"),e.onError(r,c,u=>{n.info("custom error handler treated as success"),n("custom error returned a %s",ie(u)),h(new ee(Array.isArray(u)?Buffer.concat(u):u,Buffer.concat(a)))},l);if(c)return n.info("handling as error: exitCode=%s stdErr=%s rejection=%o",s,a.length,i),l(c);n.info("retrieving task output complete"),h(new ee(Buffer.concat(o),Buffer.concat(a)))})}gitResponse(e,t,r,n,s){return Qt(this,null,function*(){let i=s.sibling("output"),o=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},Dt(e,e.commands));return new Promise(a=>{let h=[],l=[];s.info("%s %o",t,r),s("%O",o);let c=this._beforeSpawn(e,r);if(c)return a({stdOut:h,stdErr:l,exitCode:9901,rejection:c});this._plugins.exec("spawn.before",void 0,Zt(dt({},Dt(e,r)),{kill(f){c=f||c}}));let u=(0,hi.spawn)(t,r,o);u.stdout.on("data",qn(h,"stdOut",s,i.step("stdOut"))),u.stderr.on("data",qn(l,"stdErr",s,i.step("stdErr"))),u.on("error",vu(l,s)),n&&(s("Passing child process stdOut/stdErr to custom outputHandler"),n(t,u.stdout,u.stderr,[...r])),this._plugins.exec("spawn.after",void 0,Zt(dt({},Dt(e,r)),{spawned:u,close(f,p){a({stdOut:h,stdErr:l,exitCode:f,rejection:c||p})},kill(f){u.killed||(c=f,u.kill("SIGINT"))}}))})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,Zt(dt({},Dt(e,t)),{kill(n){r=n||r}})),r}}}}),fi={};W(fi,{GitExecutor:()=>pi});var pi,wu=d({"src/lib/runners/git-executor.ts"(){"use strict";Cu(),pi=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new Rr(this,this._scheduler,this._plugins)}chain(){return new Rr(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function ku(e,t,r=Lt){let n=i=>{r(null,i)},s=i=>{i?.task===e&&r(i instanceof ne?Ou(i):i,void 0)};t.then(n,s)}function Ou(e){let t=n=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${n} should be GitResponseError.git.${n}, this will no longer be available in version 3`),t=Lt};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(r,{}));function r(n,s){return s in e||(n[s]={enumerable:!1,configurable:!1,get(){return t(s),e.git[s]}}),n}}var Tu=d({"src/lib/task-callback.ts"(){"use strict";Ut(),O()}});function Un(e,t){return qs(r=>{if(!jr(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var xu=d({"src/lib/tasks/change-working-directory.ts"(){"use strict";O(),V()}});function yr(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=Me(t,"-B")),st(t)}function Su(){return{checkout(){return this._runTask(yr(at(arguments,1)),G(arguments))},checkoutBranch(e,t){return this._runTask(yr(["-b",e,t,...at(arguments)]),G(arguments))},checkoutLocalBranch(e){return this._runTask(yr(["-b",e,...at(arguments)]),G(arguments))}}}var Au=d({"src/lib/tasks/checkout.ts"(){"use strict";O(),V()}});function Eu(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function $u(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return ct(Eu(),[mi],e)}})}}}var mi,Ru=d({"src/lib/tasks/count-objects.ts"(){"use strict";O(),mi=new S(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=As(t);e.hasOwnProperty(n)&&(e[n]=L(r))})}});function Fu(e){return ct({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},di,e)}var di,Mu=d({"src/lib/parsers/parse-commit.ts"(){"use strict";O(),di=[new S(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,n])=>{e.branch=t,e.commit=n,e.root=!!r}),new S(/\s*Author:\s(.+)/i,(e,[t])=>{let r=t.split("<"),n=r.pop();!n||!n.includes("@")||(e.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}),new S(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(r,10)||0,e.summary.deletions=parseInt(n,10)||0}),new S(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0;let s=parseInt(r,10)||0;n==="-"?e.summary.deletions=s:n==="+"&&(e.summary.insertions=s)})]}});function Pu(e,t,r){return{commands:["-c","core.abbrev=40","commit",...Xt(e,"-m"),...t,...r],format:"utf-8",parser:Fu}}function Du(){return{commit(t,...r){let n=G(arguments),s=e(t)||Pu(vt(t),vt(Ct(r[0],Se,[])),[...Ct(r[1],oe,[]),...at(arguments,0,!0)]);return this._runTask(s,n)}};function e(t){return!Se(t)&&ut("git.commit: requires the commit message to be supplied as a string/string[]")}}var Iu=d({"src/lib/tasks/commit.ts"(){"use strict";Mu(),O(),V()}});function Lu(){return{firstCommit(){return this._runTask(st(["rev-list","--max-parents=0","HEAD"],!0),G(arguments))}}}var ju=d({"src/lib/tasks/first-commit.ts"(){"use strict";O(),V()}});function Nu(e,t){let r=["hash-object",e];return t&&r.push("-w"),st(r,!0)}var Hu=d({"src/lib/tasks/hash-object.ts"(){"use strict";V()}});function Bu(e,t,r){let n=String(r).trim(),s;if(s=gi.exec(n))return new Oe(e,t,!1,s[1]);if(s=_i.exec(n))return new Oe(e,t,!0,s[1]);let i="",o=n.split(" ");for(;o.length;)if(o.shift()==="in"){i=o.join(" ");break}return new Oe(e,t,/^re/i.test(n),i)}var Oe,gi,_i,Gu=d({"src/lib/responses/InitSummary.ts"(){"use strict";Oe=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},gi=/^Init.+ repository in (.+)$/,_i=/^Rein.+ in (.+)$/}});function Vu(e){return e.includes(Kr)}function Wu(e=!1,t,r){let n=["init",...r];return e&&!Vu(n)&&n.splice(1,0,Kr),{commands:n,format:"utf-8",parser(s){return Bu(n.includes("--bare"),t,s)}}}var Kr,qu=d({"src/lib/tasks/init.ts"(){"use strict";Gu(),Kr="--bare"}});function Qr(e){for(let t=0;t<e.length;t++){let r=Zr.exec(e[t]);if(r)return`--${r[1]}`}return""}function Uu(e){return Zr.test(e)}var Zr,ae=d({"src/lib/args/log-format.ts"(){"use strict";Zr=/^--(stat|numstat|name-only|name-status)(=|$)/}}),bi,zu=d({"src/lib/responses/DiffSummary.ts"(){"use strict";bi=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function yi(e=""){let t=vi[e];return r=>ct(new bi,t,r,!1)}var vr,zn,Yn,Jn,vi,Ci=d({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";ae(),zu(),ri(),O(),vr=[new S(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,n=""])=>{e.files.push({file:t.trim(),changes:L(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new S(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,n])=>{e.files.push({file:t.trim(),before:L(r),after:L(n),binary:!0})}),new S(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let n=/(\d+) i/.exec(r),s=/(\d+) d/.exec(r);e.changed=L(t),e.insertions=L(n?.[1]),e.deletions=L(s?.[1])})],zn=[new S(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,n])=>{let s=L(t),i=L(r);e.changed++,e.insertions+=s,e.deletions+=i,e.files.push({file:n,changes:s+i,insertions:s,deletions:i,binary:!1})}),new S(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],Yn=[new S(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],Jn=[new S(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,r,n,s,i])=>{e.changed++,e.files.push({file:i??n,changes:0,insertions:0,deletions:0,binary:!1,status:Or(hu(t)&&t),from:Or(!!i&&n!==i&&n),similarity:L(r)})})],vi={"":vr,"--stat":vr,"--numstat":zn,"--name-status":Jn,"--name-only":Yn}}});function Yu(e,t){return t.reduce((r,n,s)=>(r[n]=e[s]||"",r),Object.create({diff:null}))}function wi(e=en,t=ki,r=""){let n=yi(r);return function(s){let i=se(s.trim(),!1,Xr).map(function(o){let a=o.split(tn),h=Yu(a[0].split(e),t);return a.length>1&&a[1].trim()&&(h.diff=n(a[1])),h});return{all:i,latest:i.length&&i[0]||null,total:i.length}}}var Xr,tn,en,ki,Oi=d({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";O(),Ci(),ae(),Xr="\xF2\xF2\xF2\xF2\xF2\xF2 ",tn=" \xF2\xF2",en=" \xF2 ",ki=["hash","date","message","refs","author_name","author_email"]}}),Ti={};W(Ti,{diffSummaryTask:()=>Ju,validateLogFormatConfig:()=>Le});function Ju(e){let t=Qr(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),Le(r)||{commands:r,format:"utf-8",parser:yi(t)}}function Le(e){let t=e.filter(Uu);if(t.length>1)return ut(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return ut(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var rn=d({"src/lib/tasks/diff.ts"(){"use strict";ae(),Ci(),V()}});function Ku(e,t){let r=[],n=[];return Object.keys(e).forEach(s=>{r.push(s),n.push(String(e[s]))}),[r,n.join(t)]}function Qu(e){return Object.keys(e).reduce((t,r)=>(r in Fr||(t[r]=e[r]),t),{})}function xi(e={},t=[]){let r=Ct(e.splitter,tt,en),n=!Nr(e.format)&&e.format?e.format:{hash:"%H",date:e.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:e.mailMap!==!1?"%aN":"%an",author_email:e.mailMap!==!1?"%aE":"%ae"},[s,i]=Ku(n,r),o=[],a=[`--pretty=format:${Xr}${i}${tn}`,...t],h=e.n||e["max-count"]||e.maxCount;if(h&&a.push(`--max-count=${h}`),e.from||e.to){let l=e.symmetric!==!1?"...":"..";o.push(`${e.from||""}${l}${e.to||""}`)}return tt(e.file)&&a.push("--follow",Na(e.file)),Gr(Qu(e),a),{fields:s,splitter:r,commands:[...a,...o]}}function Zu(e,t,r){let n=wi(e,t,Qr(r));return{commands:["log",...r],format:"utf-8",parser:n}}function Xu(){return{log(...r){let n=G(arguments),s=xi(Vr(arguments),Ct(arguments[0],oe)),i=t(...r)||Le(s.commands)||e(s);return this._runTask(i,n)}};function e(r){return Zu(r.splitter,r.fields,r.commands)}function t(r,n){return tt(r)&&tt(n)&&ut("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var Fr,Si=d({"src/lib/tasks/log.ts"(){"use strict";ae(),re(),Oi(),O(),V(),rn(),Fr=(e=>(e[e["--pretty"]=0]="--pretty",e[e["max-count"]=1]="max-count",e[e.maxCount=2]="maxCount",e[e.n=3]="n",e[e.file=4]="file",e[e.format=5]="format",e[e.from=6]="from",e[e.to=7]="to",e[e.splitter=8]="splitter",e[e.symmetric=9]="symmetric",e[e.mailMap=10]="mailMap",e[e.multiLine=11]="multiLine",e[e.strictDate=12]="strictDate",e))(Fr||{})}}),Te,Ai,tc=d({"src/lib/responses/MergeSummary.ts"(){"use strict";Te=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},Ai=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),Mr,Ei,ec=d({"src/lib/responses/PullSummary.ts"(){"use strict";Mr=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},Ei=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function Cr(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function Kn(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:L(t&&t[1]||"0"),delta:L(r&&r[1]||"0")}}var $i,rc=d({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";O(),$i=[new Et(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=Cr(e.remoteMessages);Object.assign(s,{[n]:L(r)})}),new Et(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=Cr(e.remoteMessages);Object.assign(s,{[n]:L(r)})}),new Et(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let s=Cr(e.remoteMessages);s.total=Kn(t),s.reused=Kn(r),s.packReused=L(n)})]}});function Ri(e,t){return ct({remoteMessages:new Mi},Fi,t)}var Fi,Mi,Pi=d({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";O(),rc(),Fi=[new Et(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...$i,new Et([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new Et([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,n])=>{e.remoteMessages.vulnerabilities={count:L(t),summary:r,url:n}})],Mi=class{constructor(){this.all=[]}}}});function nc(e,t){let r=ct(new Ei,Di,[e,t]);return r.message&&r}var Qn,Zn,Xn,ts,Di,es,nn,Ii=d({"src/lib/parsers/parse-pull.ts"(){"use strict";ec(),O(),Pi(),Qn=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,Zn=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,Xn=/^(create|delete) mode \d+ (.+)/,ts=[new S(Qn,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new S(Zn,(e,[t,,r,,n])=>r!==void 0||n!==void 0?(e.summary.changes=+t||0,e.summary.insertions=+r||0,e.summary.deletions=+n||0,!0):!1),new S(Xn,(e,[t,r])=>{$(e.files,r),$(t==="create"?e.created:e.deleted,r)})],Di=[new S(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new S(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new S(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,r,n,s])=>{e.branch.local=n,e.hash.local=t,e.branch.remote=s,e.hash.remote=r})],es=(e,t)=>ct(new Mr,ts,[e,t]),nn=(e,t)=>Object.assign(new Mr,es(e,t),Ri(e,t))}}),rs,Li,ns,sc=d({"src/lib/parsers/parse-merge.ts"(){"use strict";tc(),O(),Ii(),rs=[new S(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new S(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new Te(t,r))}),new S(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new Te(t,r,{deleteRef:n}))}),new S(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new Te(t,null))}),new S(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],Li=(e,t)=>Object.assign(ns(e,t),nn(e,t)),ns=e=>ct(new Ai,rs,e)}});function ss(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=Li(t,r);if(n.failed)throw new ne(n);return n}}:ut("Git.merge requires at least one option")}var ic=d({"src/lib/tasks/merge.ts"(){"use strict";Ut(),sc(),V()}});function oc(e,t,r){let n=r.includes("deleted"),s=r.includes("tag")||/^refs\/tags/.test(e),i=!r.includes("new");return{deleted:n,tag:s,branch:!s,new:!i,alreadyUpdated:i,local:e,remote:t}}var is,ji,os,ac=d({"src/lib/parsers/parse-push.ts"(){"use strict";O(),Pi(),is=[new S(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new S(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref=Zt(dt({},e.ref||{}),{local:t})}),new S(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(oc(t,r,n))}),new S(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch=Zt(dt({},e.branch||{}),{local:t,remote:r,remoteName:n})}),new S(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,r,n,s])=>{e.update={head:{local:t,remote:r},hash:{from:n,to:s}}})],ji=(e,t)=>{let r=os(e,t),n=Ri(e,t);return dt(dt({},r),n)},os=(e,t)=>ct({pushed:[]},is,[e,t])}}),Ni={};W(Ni,{pushTagsTask:()=>uc,pushTask:()=>sn});function uc(e={},t){return $(t,"--tags"),sn(e,t)}function sn(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),Me(r,"-v"),$(r,"--verbose"),$(r,"--porcelain"),{commands:r,format:"utf-8",parser:ji}}var Hi=d({"src/lib/tasks/push.ts"(){"use strict";ac(),O()}});function cc(){return{showBuffer(){let e=["show",...at(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(Us(e),G(arguments))},show(){let e=["show",...at(arguments,1)];return this._runTask(st(e),G(arguments))}}}var lc=d({"src/lib/tasks/show.ts"(){"use strict";O(),V()}}),as,Bi,hc=d({"src/lib/responses/FileStatusSummary.ts"(){"use strict";as=/^(.+)\0(.+)$/,Bi=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=as.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});function us(e){let[t,r]=e.split(qt);return{from:r||t,to:t}}function ft(e,t,r){return[`${e}${t}`,r]}function wr(e,...t){return t.map(r=>ft(e,r,(n,s)=>$(n.conflicted,s)))}function fc(e,t){let r=t.trim();switch(" "){case r.charAt(2):return n(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return n(" ",r.charAt(0),r.substr(2));default:return}function n(s,i,o){let a=`${s}${i}`,h=Gi.get(a);h&&h(e,o),a!=="##"&&a!=="!!"&&e.files.push(new Bi(o,s,i))}}var cs,Gi,Vi,pc=d({"src/lib/responses/StatusSummary.ts"(){"use strict";O(),hc(),cs=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},Gi=new Map([ft(" ","A",(e,t)=>$(e.created,t)),ft(" ","D",(e,t)=>$(e.deleted,t)),ft(" ","M",(e,t)=>$(e.modified,t)),ft("A"," ",(e,t)=>$(e.created,t)&&$(e.staged,t)),ft("A","M",(e,t)=>$(e.created,t)&&$(e.staged,t)&&$(e.modified,t)),ft("D"," ",(e,t)=>$(e.deleted,t)&&$(e.staged,t)),ft("M"," ",(e,t)=>$(e.modified,t)&&$(e.staged,t)),ft("M","M",(e,t)=>$(e.modified,t)&&$(e.staged,t)),ft("R"," ",(e,t)=>{$(e.renamed,us(t))}),ft("R","M",(e,t)=>{let r=us(t);$(e.renamed,r),$(e.modified,r.to)}),ft("!","!",(e,t)=>{$(e.ignored=e.ignored||[],t)}),ft("?","?",(e,t)=>$(e.not_added,t)),...wr("A","A","U"),...wr("D","D","U"),...wr("U","A","D","U"),["##",(e,t)=>{let r=/ahead (\d+)/,n=/behind (\d+)/,s=/^(.+?(?=(?:\.{3}|\s|$)))/,i=/\.{3}(\S*)/,o=/\son\s([\S]+)$/,a;a=r.exec(t),e.ahead=a&&+a[1]||0,a=n.exec(t),e.behind=a&&+a[1]||0,a=s.exec(t),e.current=a&&a[1],a=i.exec(t),e.tracking=a&&a[1],a=o.exec(t),e.current=a&&a[1]||e.current,e.detached=/\(no branch\)/.test(t)}]]),Vi=function(e){let t=e.split(qt),r=new cs;for(let n=0,s=t.length;n<s;){let i=t[n++].trim();i&&(i.charAt(0)==="R"&&(i+=qt+(t[n++]||"")),fc(r,i))}return r}}});function mc(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!Wi.includes(r))],parser(r){return Vi(r)}}}var Wi,dc=d({"src/lib/tasks/status.ts"(){"use strict";pc(),Wi=["--null","-z"]}});function Ee(e=0,t=0,r=0,n="",s=!0){return Object.defineProperty({major:e,minor:t,patch:r,agent:n,installed:s},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function gc(){return Ee(0,0,0,"",!1)}function _c(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:bc,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(on));n(t)}})}}}function bc(e){return e===on?gc():ct(Ee(0,0,0,e),qi,e)}var on,qi,yc=d({"src/lib/tasks/version.ts"(){"use strict";O(),on="installed=false",qi=[new S(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,s=""])=>{Object.assign(e,Ee(L(t),L(r),L(n),s))}),new S(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,s=""])=>{Object.assign(e,Ee(L(t),L(r),n,s))})]}}),Ui={};W(Ui,{SimpleGitApi:()=>Pr});var Pr,vc=d({"src/lib/simple-git-api.ts"(){"use strict";Tu(),xu(),Au(),Ru(),Iu(),ti(),ju(),ii(),Hu(),qu(),Si(),ic(),Hi(),lc(),dc(),V(),yc(),O(),Pr=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&ku(e,n,t),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},_executor:{value:r}})}add(e){return this._runTask(st(["add",...vt(e)]),G(arguments))}cwd(e){let t=G(arguments);return typeof e=="string"?this._runTask(Un(e,this._executor),t):typeof e?.path=="string"?this._runTask(Un(e.path,e.root&&this._executor||void 0),t):this._runTask(ut("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(Nu(e,t===!0),G(arguments))}init(e){return this._runTask(Wu(e===!0,this._executor.cwd,at(arguments)),G(arguments))}merge(){return this._runTask(ss(at(arguments)),G(arguments))}mergeFromTo(e,t){return tt(e)&&tt(t)?this._runTask(ss([e,t,...at(arguments)]),G(arguments,!1)):this._runTask(ut("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=sn({remote:Ct(arguments[0],tt),branch:Ct(arguments[1],tt)},at(arguments));return this._runTask(e,G(arguments))}stash(){return this._runTask(st(["stash",...at(arguments)]),G(arguments))}status(){return this._runTask(mc(at(arguments)),G(arguments))}},Object.assign(Pr.prototype,Su(),Du(),lu(),$u(),Lu(),mu(),Xu(),cc(),_c())}}),zi={};W(zi,{Scheduler:()=>Ji});var ls,Ji,Cc=d({"src/lib/runners/scheduler.ts"(){"use strict";O(),li(),ls=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,Yi.createDeferred)();return{promise:t,done:r,id:e}}})(),Ji=class{constructor(e=2){this.concurrency=e,this.logger=Jr("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let e=$(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),Me(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=$(this.pending,ls());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),Ki={};W(Ki,{applyPatchTask:()=>wc});function wc(e,t){return st(["apply",...t,...e])}var kc=d({"src/lib/tasks/apply-patch.ts"(){"use strict";V()}});function Oc(e,t){return{branch:e,hash:t,success:!0}}function Tc(e){return{branch:e,hash:null,success:!1}}var Qi,xc=d({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";Qi=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function Zi(e,t){return t===1&&Dr.test(e)}var hs,Dr,fs,je,Sc=d({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";xc(),O(),hs=/(\S+)\s+\(\S+\s([^)]+)\)/,Dr=/^error[^']+'([^']+)'/m,fs=[new S(hs,(e,[t,r])=>{let n=Oc(t,r);e.all.push(n),e.branches[t]=n}),new S(Dr,(e,[t])=>{let r=Tc(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],je=(e,t)=>ct(new Qi,fs,[e,t])}}),Xi,Ac=d({"src/lib/responses/BranchSummary.ts"(){"use strict";Xi=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==="*",linkedWorkTree:e==="+",name:r,commit:n,label:s}}}}});function ps(e){return e?e.charAt(0):""}function to(e){return ct(new Xi,eo,e)}var eo,Ec=d({"src/lib/parsers/parse-branch.ts"(){"use strict";Ac(),O(),eo=[new S(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,s])=>{e.push(ps(t),!0,r,n,s)}),new S(new RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$","s"),(e,[t,r,n,s])=>{e.push(ps(t),!1,r,n,s)})]}}),ro={};W(ro,{branchLocalTask:()=>Rc,branchTask:()=>$c,containsDeleteBranchCommand:()=>no,deleteBranchTask:()=>Mc,deleteBranchesTask:()=>Fc});function no(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function $c(e){let t=no(e),r=["branch",...e];return r.length===1&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser(n,s){return t?je(n,s).all[0]:to(n)}}}function Rc(){return{format:"utf-8",commands:["branch","-v"],parser:to}}function Fc(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return je(r,n)},onError({exitCode:r,stdOut:n},s,i,o){if(!Zi(String(s),r))return o(s);i(n)}}}function Mc(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,s){return je(n,s).branches[e]},onError({exitCode:n,stdErr:s,stdOut:i},o,a,h){if(!Zi(String(o),n))return h(o);throw new ne(r.parser(te(i),te(s)),String(o))}};return r}var Pc=d({"src/lib/tasks/branch.ts"(){"use strict";Ut(),Sc(),Ec(),O()}}),so,Dc=d({"src/lib/responses/CheckIgnore.ts"(){"use strict";so=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),io={};W(io,{checkIgnoreTask:()=>Ic});function Ic(e){return{commands:["check-ignore",...e],format:"utf-8",parser:so}}var Lc=d({"src/lib/tasks/check-ignore.ts"(){"use strict";Dc()}}),oo={};W(oo,{cloneMirrorTask:()=>Nc,cloneTask:()=>ao});function jc(e){return/^--upload-pack(=|$)/.test(e)}function ao(e,t,r){let n=["clone",...r];return tt(e)&&n.push(e),tt(t)&&n.push(t),n.find(jc)?ut("git.fetch: potential exploit argument blocked."):st(n)}function Nc(e,t,r){return $(r,"--mirror"),ao(e,t,r)}var Hc=d({"src/lib/tasks/clone.ts"(){"use strict";V(),O()}});function Bc(e,t){return ct({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},uo,[e,t])}var uo,Gc=d({"src/lib/parsers/parse-fetch.ts"(){"use strict";O(),uo=[new S(/From (.+)$/,(e,[t])=>{e.remote=t}),new S(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new S(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new S(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new S(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,n,s])=>{e.updated.push({name:n,tracking:s,to:r,from:t})})]}}),co={};W(co,{fetchTask:()=>Wc});function Vc(e){return/^--upload-pack(=|$)/.test(e)}function Wc(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find(Vc)?ut("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:Bc}}var qc=d({"src/lib/tasks/fetch.ts"(){"use strict";Gc(),V()}});function Uc(e){return ct({moves:[]},lo,e)}var lo,zc=d({"src/lib/parsers/parse-move.ts"(){"use strict";O(),lo=[new S(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),ho={};W(ho,{moveTask:()=>Yc});function Yc(e,t){return{commands:["mv","-v",...vt(e),t],format:"utf-8",parser:Uc}}var Jc=d({"src/lib/tasks/move.ts"(){"use strict";zc(),O()}}),fo={};W(fo,{pullTask:()=>Kc});function Kc(e,t,r){let n=["pull",...r];return e&&t&&n.splice(1,0,e,t),{commands:n,format:"utf-8",parser(s,i){return nn(s,i)},onError(s,i,o,a){let h=nc(te(s.stdOut),te(s.stdErr));if(h)return a(new ne(h));a(i)}}}var Qc=d({"src/lib/tasks/pull.ts"(){"use strict";Ut(),Ii(),O()}});function Zc(e){let t={};return po(e,([r])=>t[r]={name:r}),Object.values(t)}function Xc(e){let t={};return po(e,([r,n,s])=>{t.hasOwnProperty(r)||(t[r]={name:r,refs:{fetch:"",push:""}}),s&&n&&(t[r].refs[s.replace(/[^a-z]/g,"")]=n)}),Object.values(t)}function po(e,t){Lr(e,r=>t(r.split(/\s+/)))}var tl=d({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";O()}}),mo={};W(mo,{addRemoteTask:()=>el,getRemotesTask:()=>rl,listRemotesTask:()=>nl,remoteTask:()=>sl,removeRemoteTask:()=>il});function el(e,t,r){return st(["remote","add",...r,e,t])}function rl(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?Xc:Zc}}function nl(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),st(t)}function sl(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),st(t)}function il(e){return st(["remote","remove",e])}var ol=d({"src/lib/tasks/remote.ts"(){"use strict";tl(),V()}}),go={};W(go,{stashListTask:()=>al});function al(e={},t){let r=xi(e),n=["stash","list",...r.commands,...t],s=wi(r.splitter,r.fields,Qr(n));return Le(n)||{commands:n,format:"utf-8",parser:s}}var ul=d({"src/lib/tasks/stash-list.ts"(){"use strict";ae(),Oi(),rn(),Si()}}),_o={};W(_o,{addSubModuleTask:()=>cl,initSubModuleTask:()=>ll,subModuleTask:()=>Ne,updateSubModuleTask:()=>hl});function cl(e,t){return Ne(["add",e,t])}function ll(e){return Ne(["init",...e])}function Ne(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),st(t)}function hl(e){return Ne(["update",...e])}var fl=d({"src/lib/tasks/sub-module.ts"(){"use strict";V()}});function pl(e,t){let r=isNaN(e),n=isNaN(t);return r!==n?r?1:-1:r?bo(e,t):0}function bo(e,t){return e===t?0:e>t?1:-1}function ml(e){return e.trim()}function Ce(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var ms,yo,dl=d({"src/lib/responses/TagList.ts"(){"use strict";ms=class{constructor(e,t){this.all=e,this.latest=t}},yo=function(e,t=!1){let r=e.split(`
|
|
35
|
+
`).map(ml).filter(Boolean);t||r.sort(function(s,i){let o=s.split("."),a=i.split(".");if(o.length===1||a.length===1)return pl(Ce(o[0]),Ce(a[0]));for(let h=0,l=Math.max(o.length,a.length);h<l;h++){let c=bo(Ce(o[h]),Ce(a[h]));if(c)return c}return 0});let n=t?r[0]:[...r].reverse().find(s=>s.indexOf(".")>=0);return new ms(r,n)}}}),vo={};W(vo,{addAnnotatedTagTask:()=>bl,addTagTask:()=>_l,tagListTask:()=>gl});function gl(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return yo(r,t)}}}function _l(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function bl(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var yl=d({"src/lib/tasks/tag.ts"(){"use strict";dl()}}),vl=La({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(wu(),B(fi)),{SimpleGitApi:n}=(vc(),B(Ui)),{Scheduler:s}=(Cc(),B(zi)),{configurationErrorTask:i}=(V(),B(Ar)),{asArray:o,filterArray:a,filterPrimitives:h,filterString:l,filterStringOrStringArray:c,filterType:u,getTrailingOptions:f,trailingFunctionArgument:p,trailingOptionsArgument:A}=(O(),B(Is)),{applyPatchTask:M}=(kc(),B(Ki)),{branchTask:I,branchLocalTask:N,deleteBranchesTask:J,deleteBranchTask:q}=(Pc(),B(ro)),{checkIgnoreTask:Y}=(Lc(),B(io)),{checkIsRepoTask:pt}=(Hs(),B(Ls)),{cloneTask:et,cloneMirrorTask:lt}=(Hc(),B(oo)),{cleanWithOptionsTask:F,isCleanOptionsArray:E}=(Qs(),B(Js)),{diffSummaryTask:jt}=(rn(),B(Ti)),{fetchTask:ce}=(qc(),B(co)),{moveTask:k}=(Jc(),B(ho)),{pullTask:b}=(Qc(),B(fo)),{pushTagsTask:g}=(Hi(),B(Ni)),{addRemoteTask:v,getRemotesTask:_,listRemotesTask:T,remoteTask:x,removeRemoteTask:P}=(ol(),B(mo)),{getResetMode:H,resetTask:U}=(ci(),B(oi)),{stashListTask:K}=(ul(),B(go)),{addSubModuleTask:it,initSubModuleTask:At,subModuleTask:kt,updateSubModuleTask:Rt}=(fl(),B(_o)),{addAnnotatedTagTask:Ot,addTagTask:Z,tagListTask:yt}=(yl(),B(vo)),{straightThroughBufferTask:Ft,straightThroughStringTask:rt}=(V(),B(Ar));function C(m,y){this._plugins=y,this._executor=new r(m.baseDir,new s(m.maxConcurrentProcesses),y),this._trimmed=m.trimmed}(C.prototype=Object.create(n.prototype)).constructor=C,C.prototype.customBinary=function(m){return this._plugins.reconfigure("binary",m),this},C.prototype.env=function(m,y){return arguments.length===1&&typeof m=="object"?this._executor.env=m:(this._executor.env=this._executor.env||{})[m]=y,this},C.prototype.stashList=function(m){return this._runTask(K(A(arguments)||{},a(m)&&m||[]),p(arguments))};function cn(m,y,D,nt){return typeof D!="string"?i(`git.${m}() requires a string 'repoPath'`):y(D,u(nt,l),f(arguments))}C.prototype.clone=function(){return this._runTask(cn("clone",et,...arguments),p(arguments))},C.prototype.mirror=function(){return this._runTask(cn("mirror",lt,...arguments),p(arguments))},C.prototype.mv=function(m,y){return this._runTask(k(m,y),p(arguments))},C.prototype.checkoutLatestTag=function(m){var y=this;return this.pull(function(){y.tags(function(D,nt){y.checkout(nt.latest,m)})})},C.prototype.pull=function(m,y,D,nt){return this._runTask(b(u(m,l),u(y,l),f(arguments)),p(arguments))},C.prototype.fetch=function(m,y){return this._runTask(ce(u(m,l),u(y,l),f(arguments)),p(arguments))},C.prototype.silent=function(m){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},C.prototype.tags=function(m,y){return this._runTask(yt(f(arguments)),p(arguments))},C.prototype.rebase=function(){return this._runTask(rt(["rebase",...f(arguments)]),p(arguments))},C.prototype.reset=function(m){return this._runTask(U(H(m),f(arguments)),p(arguments))},C.prototype.revert=function(m){let y=p(arguments);return typeof m!="string"?this._runTask(i("Commit must be a string"),y):this._runTask(rt(["revert",...f(arguments,0,!0),m]),y)},C.prototype.addTag=function(m){let y=typeof m=="string"?Z(m):i("Git.addTag requires a tag name");return this._runTask(y,p(arguments))},C.prototype.addAnnotatedTag=function(m,y){return this._runTask(Ot(m,y),p(arguments))},C.prototype.deleteLocalBranch=function(m,y,D){return this._runTask(q(m,typeof y=="boolean"?y:!1),p(arguments))},C.prototype.deleteLocalBranches=function(m,y,D){return this._runTask(J(m,typeof y=="boolean"?y:!1),p(arguments))},C.prototype.branch=function(m,y){return this._runTask(I(f(arguments)),p(arguments))},C.prototype.branchLocal=function(m){return this._runTask(N(),p(arguments))},C.prototype.raw=function(m){let y=!Array.isArray(m),D=[].slice.call(y?arguments:m,0);for(let gt=0;gt<D.length&&y;gt++)if(!h(D[gt])){D.splice(gt,D.length-gt);break}D.push(...f(arguments,0,!0));var nt=p(arguments);return D.length?this._runTask(rt(D,this._trimmed),nt):this._runTask(i("Raw: must supply one or more command to execute"),nt)},C.prototype.submoduleAdd=function(m,y,D){return this._runTask(it(m,y),p(arguments))},C.prototype.submoduleUpdate=function(m,y){return this._runTask(Rt(f(arguments,!0)),p(arguments))},C.prototype.submoduleInit=function(m,y){return this._runTask(At(f(arguments,!0)),p(arguments))},C.prototype.subModule=function(m,y){return this._runTask(kt(f(arguments)),p(arguments))},C.prototype.listRemote=function(){return this._runTask(T(f(arguments)),p(arguments))},C.prototype.addRemote=function(m,y,D){return this._runTask(v(m,y,f(arguments)),p(arguments))},C.prototype.removeRemote=function(m,y){return this._runTask(P(m),p(arguments))},C.prototype.getRemotes=function(m,y){return this._runTask(_(m===!0),p(arguments))},C.prototype.remote=function(m,y){return this._runTask(x(f(arguments)),p(arguments))},C.prototype.tag=function(m,y){let D=f(arguments);return D[0]!=="tag"&&D.unshift("tag"),this._runTask(rt(D),p(arguments))},C.prototype.updateServerInfo=function(m){return this._runTask(rt(["update-server-info"]),p(arguments))},C.prototype.pushTags=function(m,y){let D=g({remote:u(m,l)},f(arguments));return this._runTask(D,p(arguments))},C.prototype.rm=function(m){return this._runTask(rt(["rm","-f",...o(m)]),p(arguments))},C.prototype.rmKeepLocal=function(m){return this._runTask(rt(["rm","--cached",...o(m)]),p(arguments))},C.prototype.catFile=function(m,y){return this._catFile("utf-8",arguments)},C.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},C.prototype._catFile=function(m,y){var D=p(y),nt=["cat-file"],gt=y[0];if(typeof gt=="string")return this._runTask(i("Git.catFile: options must be supplied as an array of strings"),D);Array.isArray(gt)&&nt.push.apply(nt,gt);let Be=m==="buffer"?Ft(nt):rt(nt);return this._runTask(Be,D)},C.prototype.diff=function(m,y){let D=l(m)?i("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):rt(["diff",...f(arguments)]);return this._runTask(D,p(arguments))},C.prototype.diffSummary=function(){return this._runTask(jt(f(arguments,1)),p(arguments))},C.prototype.applyPatch=function(m){let y=c(m)?M(o(m),f([].slice.call(arguments,1))):i("git.applyPatch requires one or more string patches as the first argument");return this._runTask(y,p(arguments))},C.prototype.revparse=function(){let m=["rev-parse",...f(arguments,!0)];return this._runTask(rt(m,!0),p(arguments))},C.prototype.clean=function(m,y,D){let nt=E(m),gt=nt&&m.join("")||u(m,l)||"",Be=f([].slice.call(arguments,nt?1:0));return this._runTask(F(gt,Be),p(arguments))},C.prototype.exec=function(m){let y={commands:[],format:"utf-8",parser(){typeof m=="function"&&m()}};return this._runTask(y)},C.prototype.clearQueue=function(){return this},C.prototype.checkIgnore=function(m,y){return this._runTask(Y(o(u(m,c,[]))),p(arguments))},C.prototype.checkIsRepo=function(m,y){return this._runTask(pt(u(m,l)),p(arguments))},t.exports=C}});re();$t();var Cl=class extends St{constructor(e,t){super(void 0,t),this.config=e}};$t();$t();var xt=class extends St{constructor(e,t,r){super(e,r),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};Ut();Cs();Hs();Qs();ti();ri();ii();ci();function wl(e){return e?[{type:"spawn.before",action(n,s){e.aborted&&s.kill(new xt(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(n,s){function i(){s.kill(new xt(void 0,"abort","Abort signal received"))}e.addEventListener("abort",i),s.spawned.on("close",()=>e.removeEventListener("abort",i))}}]:void 0}function kl(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function Ol(e,t){if(kl(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new xt(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function Tl(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new xt(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(t==="clone"&&/^\s*-u\b/.test(e))throw new xt(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(t==="push"&&/^\s*--exec\b/.test(e))throw new xt(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function xl({allowUnsafeProtocolOverride:e=!1,allowUnsafePack:t=!1}={}){return{type:"spawn.args",action(r,n){return r.forEach((s,i)=>{let o=i<r.length?r[i+1]:"";e||Ol(s,o),t||Tl(s,n.method)}),r}}}O();function Sl(e){let t=Xt(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}O();var ds=(0,Wt.deferred)().promise;function Al({onClose:e=!0,onExit:t=50}={}){function r(){let s=-1,i={close:(0,Wt.deferred)(),closeTimeout:(0,Wt.deferred)(),exit:(0,Wt.deferred)(),exitTimeout:(0,Wt.deferred)()},o=Promise.race([e===!1?ds:i.closeTimeout.promise,t===!1?ds:i.exitTimeout.promise]);return n(e,i.close,i.closeTimeout),n(t,i.exit,i.exitTimeout),{close(a){s=a,i.close.done()},exit(a){s=a,i.exit.done()},get exitCode(){return s},result:o}}function n(s,i,o){s!==!1&&(s===!0?i.promise:i.promise.then(()=>kr(s))).then(o.done)}return{type:"spawn.after",action(s,i){return Qt(this,arguments,function*(o,{spawned:a,close:h}){var l,c;let u=r(),f=!0,p=()=>void(f=!1);(l=a.stdout)==null||l.on("data",p),(c=a.stderr)==null||c.on("data",p),a.on("error",p),a.on("close",A=>u.close(A)),a.on("exit",A=>u.exit(A));try{yield u.result,f&&(yield kr(50)),h(u.exitCode)}catch(A){h(u.exitCode,A)}})}}}O();var El="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",gs="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function $l(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function _s(e,t){if(e.length<1||e.length>2)throw new xt(void 0,"binary",El);if(e.some($l))if(t)console.warn(gs);else throw new xt(void 0,"binary",gs);let[n,s]=e;return{binary:n,prefix:s}}function Rl(e,t=["git"],r=!1){let n=_s(vt(t),r);e.on("binary",s=>{n=_s(vt(s),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",s=>n.prefix?[n.prefix,...s]:s)}$t();function Fl(e){return!!(e.exitCode&&e.stdErr.length)}function Ml(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function Pl(e=!1,t=Fl,r=Ml){return(n,s)=>!e&&n||!t(s)?n:r(s)}function bs(e){return{type:"task.error",action(t,r){let n=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(n)?{error:new St(void 0,n.toString("utf-8"))}:{error:n}}}}O();var Dl=class{constructor(){this.plugins=new Set,this.events=new Co.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let r=$(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){let t=[];return vt(e).forEach(r=>r&&this.plugins.add($(t,r))),()=>{t.forEach(r=>this.plugins.delete(r))}}exec(e,t,r){let n=t,s=Object.freeze(Object.create(r));for(let i of this.plugins)i.type===e&&(n=i.action(n,s));return n}};O();function Il(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(i,o){return r.includes(o.method)?Ss(i,t):i}},{type:"spawn.after",action(i,o){var a;o.commands.includes(t)&&((a=o.spawned.stderr)==null||a.on("data",h=>{let l=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(h.toString("utf8"));l&&e({method:o.method,stage:Ll(l[1]),progress:L(l[2]),processed:L(l[3]),total:L(l[4])})}))}}]}function Ll(e){return String(e.toLowerCase().split(" ",1))||"unknown"}O();function jl(e){let t=$s(e,["uid","gid"]);return{type:"spawn.options",action(r){return dt(dt({},t),r)}}}function Nl({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(n,s){var i,o;let a;function h(){a&&clearTimeout(a),a=setTimeout(c,e)}function l(){var u,f;(u=s.spawned.stdout)==null||u.off("data",h),(f=s.spawned.stderr)==null||f.off("data",h),s.spawned.off("exit",l),s.spawned.off("close",l),a&&clearTimeout(a)}function c(){l(),s.kill(new xt(void 0,"timeout","block timeout reached"))}r&&((i=s.spawned.stdout)==null||i.on("data",h)),t&&((o=s.spawned.stderr)==null||o.on("data",h)),s.spawned.on("exit",l),s.spawned.on("close",l),h()}}}re();function Hl(){return{type:"spawn.args",action(e){let t=[],r;function n(s){(r=r||[]).push(...s)}for(let s=0;s<e.length;s++){let i=e[s];if(xe(i)){n(Gn(i));continue}if(i==="--"){n(e.slice(s+1).flatMap(o=>xe(o)&&Gn(o)||o));break}t.push(i)}return r?[...t,"--",...r.map(String)]:t}}}O();var Bl=vl();function Gl(e,t){var r;let n=new Dl,s=Ps(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!jr(s.baseDir))throw new Cl(s,"Cannot use simple-git on a directory that does not exist");return Array.isArray(s.config)&&n.add(Sl(s.config)),n.add(xl(s.unsafe)),n.add(Hl()),n.add(Al(s.completion)),s.abort&&n.add(wl(s.abort)),s.progress&&n.add(Il(s.progress)),s.timeout&&n.add(Nl(s.timeout)),s.spawnOptions&&n.add(jl(s.spawnOptions)),n.add(bs(Pl(!0))),s.errors&&n.add(bs(s.errors)),Rl(n,s.binary,(r=s.unsafe)==null?void 0:r.allowUnsafeCustomBinary),new Bl(s,n)}Ut();var wo=Gl;var Oo="@lntvow/dev",To="4.4.0";w();var zt=_t(require("fs"),1),ue=_t(require("path"),1),xo=require("url"),an=_t(or(),1),Vl=(0,xo.fileURLToPath)(j),Wl=ue.default.dirname(Vl);function So(e,t){zt.default.existsSync(t)||zt.default.mkdirSync(t),zt.default.readdirSync(e,{withFileTypes:!0}).forEach(n=>{let s=ue.default.resolve(e,n.name),i=ue.default.resolve(t,n.name);if(n.isDirectory())So(s,i);else{if(zt.default.existsSync(i))return;zt.default.copyFileSync(s,i)}})}function Ao(){console.log(an.default.blue("Start copying template files")),So(ue.default.resolve(Wl,"./configs"),process.cwd()),console.log(an.default.green("Template files copied successfully"))}un.default.extend(Ro.default);console.log(wt.default.blue(`Cwd is: ${process.cwd()}`));Jt.name(Oo).version(To,"-v, --version","output the version number");Jt.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").description("init project").action(e=>{console.log(wt.default.green("Init project by @lntvow/dev"));let{temp:t,git:r,scripts:n}=e;if(t&&Ao(),r){console.log(wt.default.blue("Start init simple-git-hooks"));let s=(0,Eo.execSync)("npx simple-git-hooks");console.log(s.toString())}if(n){console.log(wt.default.blue("Start init scripts"));try{let s=(0,$o.resolve)(process.cwd(),"package.json"),i=JSON.parse((0,He.readFileSync)(s,"utf-8"));i={...i,scripts:{postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",commit:"git add . && git-cz && git push",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc",ncu:"ncu -u && pnpm install",...i.scripts}},(0,He.writeFileSync)(s,JSON.stringify(i,null,2)),console.log(wt.default.green("Scripts added successfully"))}catch{console.log(wt.default.yellow("No package.json file found ignoring scripts"))}}console.log(wt.default.yellow(`
|
|
36
|
+
You may need to re-execute the "pnpm install" command`))});Jt.command("release").description("git release").action(async()=>{console.log(wt.default.green("Release project...")),await ql()});Jt.parse();async function ql(){let e=wo(),t=(0,un.default)().format("YYYYMMDD");await e.cwd(process.cwd()),await e.pull(),await e.add("."),await e.commit(t,"--no-verify"),await e.push("origin"),console.log(wt.default.green(`Changes committed with message: ${t}`))}
|