#!/usr/bin/env node
"use strict";const ie=require("node:events"),ne=require("node:child_process"),re=require("node:path"),se=require("node:fs"),oe=require("node:process"),g=require("./index.js");var w={},S={},V={};let G=class extends Error{constructor(e,t,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},ae=class extends G{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};V.CommanderError=G;V.InvalidArgumentError=ae;const{InvalidArgumentError:le}=V;let ue=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,i)=>{if(!this.argChoices.includes(t))throw new le(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,i):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function ce(h){const e=h.name()+(h.variadic===!0?"...":"");return h.required?"<"+e+">":"["+e+"]"}S.Argument=ue;S.humanReadableArgName=ce;var L={},T={};const{humanReadableArgName:he}=S;let pe=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){const t=e.commands.filter(n=>!n._hidden),i=e._getHelpCommand();return i&&!i._hidden&&t.push(i),this.sortSubcommands&&t.sort((n,r)=>n.name().localeCompare(r.name())),t}compareOptions(e,t){const i=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return i(e).localeCompare(i(t))}visibleOptions(e){const t=e.options.filter(n=>!n.hidden),i=e._getHelpOption();if(i&&!i.hidden){const n=i.short&&e._findOption(i.short),r=i.long&&e._findOption(i.long);!n&&!r?t.push(i):i.long&&!r?t.push(e.createOption(i.long,i.description)):i.short&&!n&&t.push(e.createOption(i.short,i.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const t=[];for(let i=e.parent;i;i=i.parent){const n=i.options.filter(r=>!r.hidden);t.push(...n)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){const t=e.registeredArguments.map(i=>he(i)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((i,n)=>Math.max(i,t.subcommandTerm(n).length),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((i,n)=>Math.max(i,t.optionTerm(n).length),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((i,n)=>Math.max(i,t.optionTerm(n).length),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((i,n)=>Math.max(i,t.argumentTerm(n).length),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let i="";for(let n=e.parent;n;n=n.parent)i=n.name()+" "+i;return i+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){const i=`(${t.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}formatHelp(e,t){const i=t.padWidth(e,t),n=t.helpWidth||80,r=2,s=2;function l(f,O){if(O){const k=`${f.padEnd(i+s)}${O}`;return t.wrap(k,n-r,i+s)}return f}function o(f){return f.join(`
`).replace(/^/gm," ".repeat(r))}let a=[`Usage: ${t.commandUsage(e)}`,""];const u=t.commandDescription(e);u.length>0&&(a=a.concat([t.wrap(u,n,0),""]));const c=t.visibleArguments(e).map(f=>l(t.argumentTerm(f),t.argumentDescription(f)));c.length>0&&(a=a.concat(["Arguments:",o(c),""]));const d=t.visibleOptions(e).map(f=>l(t.optionTerm(f),t.optionDescription(f)));if(d.length>0&&(a=a.concat(["Options:",o(d),""])),this.showGlobalOptions){const f=t.visibleGlobalOptions(e).map(O=>l(t.optionTerm(O),t.optionDescription(O)));f.length>0&&(a=a.concat(["Global Options:",o(f),""]))}const _=t.visibleCommands(e).map(f=>l(t.subcommandTerm(f),t.subcommandDescription(f)));return _.length>0&&(a=a.concat(["Commands:",o(_),""])),a.join(`
`)}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,i,n=40){const r=" \\f\\t\\v   -   　\uFEFF",s=new RegExp(`[\\n][${r}]+`);if(e.match(s))return e;const l=t-i;if(l<n)return e;const o=e.slice(0,i),a=e.slice(i).replace(`\r
`,`
`),u=" ".repeat(i),d="\\s​",_=new RegExp(`
|.{1,${l-1}}([${d}]|$)|[^${d}]+?([${d}]|$)`,"g"),f=a.match(_)||[];return o+f.map((O,k)=>O===`
`?"":(k>0?u:"")+O.trimEnd()).join(`
`)}};T.Help=pe;var P={};const{InvalidArgumentError:fe}=V;let de=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;const i=_e(e);this.short=i.shortFlag,this.long=i.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}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,i)=>{if(!this.argChoices.includes(t))throw new fe(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,i):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return ge(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},me=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)})}valueFromOption(e,t){const i=t.attributeName();if(!this.dualOptions.has(i))return!0;const n=this.negativeOptions.get(i).presetArg,r=n!==void 0?n:!1;return t.negate===(r===e)}};function ge(h){return h.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function _e(h){let e,t;const i=h.split(/[ |,]+/);return i.length>1&&!/^[[<]/.test(i[1])&&(e=i.shift()),t=i.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}P.Option=de;P.DualOptions=me;var J={};const K=3;function Oe(h,e){if(Math.abs(h.length-e.length)>K)return Math.max(h.length,e.length);const t=[];for(let i=0;i<=h.length;i++)t[i]=[i];for(let i=0;i<=e.length;i++)t[0][i]=i;for(let i=1;i<=e.length;i++)for(let n=1;n<=h.length;n++){let r=1;h[n-1]===e[i-1]?r=0:r=1,t[n][i]=Math.min(t[n-1][i]+1,t[n][i-1]+1,t[n-1][i-1]+r),n>1&&i>1&&h[n-1]===e[i-2]&&h[n-2]===e[i-1]&&(t[n][i]=Math.min(t[n][i],t[n-2][i-2]+1))}return t[h.length][e.length]}function Ae(h,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));const t=h.startsWith("--");t&&(h=h.slice(2),e=e.map(s=>s.slice(2)));let i=[],n=K;const r=.4;return e.forEach(s=>{if(s.length<=1)return;const l=Oe(h,s),o=Math.max(h.length,s.length);(o-l)/o>r&&(l<n?(n=l,i=[s]):l===n&&i.push(s))}),i.sort((s,l)=>s.localeCompare(l)),t&&(i=i.map(s=>`--${s}`)),i.length>1?`
(Did you mean one of ${i.join(", ")}?)`:i.length===1?`
(Did you mean ${i[0]}?)`:""}J.suggestSimilar=Ae;const be=ie.EventEmitter,F=ne,y=re,N=se,m=oe,{Argument:Ce,humanReadableArgName:we}=S,{CommanderError:I}=V,{Help:$e}=T,{Option:W,DualOptions:ye}=P,{suggestSimilar:q}=J;let ve=class Y extends be{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",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._outputConfiguration={writeOut:t=>m.stdout.write(t),writeErr:t=>m.stderr.write(t),getOutHelpWidth:()=>m.stdout.isTTY?m.stdout.columns:void 0,getErrHelpWidth:()=>m.stderr.isTTY?m.stderr.columns:void 0,outputError:(t,i)=>i(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){const e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,i){let n=t,r=i;typeof n=="object"&&n!==null&&(r=n,n=null),r=r||{};const[,s,l]=e.match(/([^ ]+) *(.*)/),o=this.createCommand(s);return n&&(o.description(n),o._executableHandler=!0),r.isDefault&&(this._defaultCommandName=o._name),o._hidden=!!(r.noHelp||r.hidden),o._executableFile=r.executableFile||null,l&&o.arguments(l),this._registerCommand(o),o.parent=this,o.copyInheritedSettings(this),n?this:o}createCommand(e){return new Y(e)}createHelp(){return Object.assign(new $e,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
- specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new Ce(e,t)}argument(e,t,i,n){const r=this.createArgument(e,t);return typeof i=="function"?r.default(n).argParser(i):r.default(i),this.addArgument(r),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){const t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";const[,i,n]=e.match(/([^ ]+) *(.*)/),r=t??"display help for command",s=this.createCommand(i);return s.helpOption(!1),n&&s.arguments(n),r&&s.description(r),this._addImplicitHelpCommand=!0,this._helpCommand=s,this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,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(e,t){const i=["preSubcommand","preAction","postAction"];if(!i.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,i){this._exitCallback&&this._exitCallback(new I(e,t,i)),m.exit(e)}action(e){const t=i=>{const n=this.registeredArguments.length,r=i.slice(0,n);return this._storeOptionsAsProperties?r[n]=this:r[n]=this.opts(),r.push(this),e.apply(this,r)};return this._actionHandler=t,this}createOption(e,t){return new W(e,t)}_callParseArg(e,t,i,n){try{return e.parseArg(t,i)}catch(r){if(r.code==="commander.invalidArgument"){const s=`${n} ${r.message}`;this.error(s,{exitCode:r.exitCode,code:r.code})}throw r}}_registerOption(e){const t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){const i=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${i}'
-  already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){const t=n=>[n.name()].concat(n.aliases()),i=t(e).find(n=>this._findCommand(n));if(i){const n=t(this._findCommand(i)).join("|"),r=t(e).join("|");throw new Error(`cannot add command '${r}' as already have command '${n}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);const t=e.name(),i=e.attributeName();if(e.negate){const r=e.long.replace(/^--no-/,"--");this._findOption(r)||this.setOptionValueWithSource(i,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(i,e.defaultValue,"default");const n=(r,s,l)=>{r==null&&e.presetArg!==void 0&&(r=e.presetArg);const o=this.getOptionValue(i);r!==null&&e.parseArg?r=this._callParseArg(e,r,o,s):r!==null&&e.variadic&&(r=e._concatValue(r,o)),r==null&&(e.negate?r=!1:e.isBoolean()||e.optional?r=!0:r=""),this.setOptionValueWithSource(i,r,l)};return this.on("option:"+t,r=>{const s=`error: option '${e.flags}' argument '${r}' is invalid.`;n(r,s,"cli")}),e.envVar&&this.on("optionEnv:"+t,r=>{const s=`error: option '${e.flags}' value '${r}' from env '${e.envVar}' is invalid.`;n(r,s,"env")}),this}_optionEx(e,t,i,n,r){if(typeof t=="object"&&t instanceof W)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");const s=this.createOption(t,i);if(s.makeOptionMandatory(!!e.mandatory),typeof n=="function")s.default(r).argParser(n);else if(n instanceof RegExp){const l=n;n=(o,a)=>{const u=l.exec(o);return u?u[0]:a},s.default(r).argParser(n)}else s.default(n);return this.addOption(s)}option(e,t,i,n){return this._optionEx({},e,t,i,n)}requiredOption(e,t,i,n){return this._optionEx({mandatory:!0},e,t,i,n)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,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(e=!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=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,i){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=i,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(e)!==void 0&&(t=i.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){m.versions?.electron&&(t.from="electron");const n=m.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(t.from="eval")}e===void 0&&(e=m.argv),this.rawArgs=e.slice();let i;switch(t.from){case void 0:case"node":this._scriptPath=e[1],i=e.slice(2);break;case"electron":m.defaultApp?(this._scriptPath=e[1],i=e.slice(2)):i=e.slice(1);break;case"user":i=e.slice(0);break;case"eval":i=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(e,t){const i=this._prepareUserArgs(e,t);return this._parseCommand([],i),this}async parseAsync(e,t){const i=this._prepareUserArgs(e,t);return await this._parseCommand([],i),this}_executeSubCommand(e,t){t=t.slice();let i=!1;const n=[".js",".ts",".tsx",".mjs",".cjs"];function r(u,c){const d=y.resolve(u,c);if(N.existsSync(d))return d;if(n.includes(y.extname(c)))return;const _=n.find(f=>N.existsSync(`${d}${f}`));if(_)return`${d}${_}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=e._executableFile||`${this._name}-${e._name}`,l=this._executableDir||"";if(this._scriptPath){let u;try{u=N.realpathSync(this._scriptPath)}catch{u=this._scriptPath}l=y.resolve(y.dirname(u),l)}if(l){let u=r(l,s);if(!u&&!e._executableFile&&this._scriptPath){const c=y.basename(this._scriptPath,y.extname(this._scriptPath));c!==this._name&&(u=r(l,`${c}-${e._name}`))}s=u||s}i=n.includes(y.extname(s));let o;m.platform!=="win32"?i?(t.unshift(s),t=B(m.execArgv).concat(t),o=F.spawn(m.argv[0],t,{stdio:"inherit"})):o=F.spawn(s,t,{stdio:"inherit"}):(t.unshift(s),t=B(m.execArgv).concat(t),o=F.spawn(m.execPath,t,{stdio:"inherit"})),o.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{m.on(c,()=>{o.killed===!1&&o.exitCode===null&&o.kill(c)})});const a=this._exitCallback;o.on("close",u=>{u=u??1,a?a(new I(u,"commander.executeSubCommandAsync","(close)")):m.exit(u)}),o.on("error",u=>{if(u.code==="ENOENT"){const c=l?`searched for local subcommand relative to directory '${l}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",d=`'${s}' does not exist
 - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
 - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
 - ${c}`;throw new Error(d)}else if(u.code==="EACCES")throw new Error(`'${s}' not executable`);if(!a)m.exit(1);else{const c=new I(1,"commander.executeSubCommandAsync","(error)");c.nestedError=u,a(c)}}),this.runningCommand=o}_dispatchSubcommand(e,t,i){const n=this._findCommand(e);n||this.help({error:!0});let r;return r=this._chainOrCallSubCommandHook(r,n,"preSubcommand"),r=this._chainOrCall(r,()=>{if(n._executableHandler)this._executeSubCommand(n,t.concat(i));else return n._parseCommand(t,i)}),r}_dispatchHelpCommand(e){e||this.help();const t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){const e=(i,n,r)=>{let s=n;if(n!==null&&i.parseArg){const l=`error: command-argument value '${n}' is invalid for argument '${i.name()}'.`;s=this._callParseArg(i,n,r,l)}return s};this._checkNumberOfArguments();const t=[];this.registeredArguments.forEach((i,n)=>{let r=i.defaultValue;i.variadic?n<this.args.length?(r=this.args.slice(n),i.parseArg&&(r=r.reduce((s,l)=>e(i,l,s),i.defaultValue))):r===void 0&&(r=[]):n<this.args.length&&(r=this.args[n],i.parseArg&&(r=e(i,r,i.defaultValue))),t[n]=r}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let i=e;const n=[];return this._getCommandAndAncestors().reverse().filter(r=>r._lifeCycleHooks[t]!==void 0).forEach(r=>{r._lifeCycleHooks[t].forEach(s=>{n.push({hookedCommand:r,callback:s})})}),t==="postAction"&&n.reverse(),n.forEach(r=>{i=this._chainOrCall(i,()=>r.callback(r.hookedCommand,this))}),i}_chainOrCallSubCommandHook(e,t,i){let n=e;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(r=>{n=this._chainOrCall(n,()=>r(this,t))}),n}_parseCommand(e,t){const i=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(i.operands),t=i.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();const n=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},r=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(r,e,t)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent&&this.parent.listenerCount(r))n(),this._processArguments(),this.parent.emit(r,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){const e=this.options.filter(i=>{const n=i.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});e.filter(i=>i.conflictsWith.length>0).forEach(i=>{const n=e.find(r=>i.conflictsWith.includes(r.attributeName()));n&&this._conflictingOption(i,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){const t=[],i=[];let n=t;const r=e.slice();function s(o){return o.length>1&&o[0]==="-"}let l=null;for(;r.length;){const o=r.shift();if(o==="--"){n===i&&n.push(o),n.push(...r);break}if(l&&!s(o)){this.emit(`option:${l.name()}`,o);continue}if(l=null,s(o)){const a=this._findOption(o);if(a){if(a.required){const u=r.shift();u===void 0&&this.optionMissingArgument(a),this.emit(`option:${a.name()}`,u)}else if(a.optional){let u=null;r.length>0&&!s(r[0])&&(u=r.shift()),this.emit(`option:${a.name()}`,u)}else this.emit(`option:${a.name()}`);l=a.variadic?a:null;continue}}if(o.length>2&&o[0]==="-"&&o[1]!=="-"){const a=this._findOption(`-${o[1]}`);if(a){a.required||a.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${a.name()}`,o.slice(2)):(this.emit(`option:${a.name()}`),r.unshift(`-${o.slice(2)}`));continue}}if(/^--[^=]+=/.test(o)){const a=o.indexOf("="),u=this._findOption(o.slice(0,a));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,o.slice(a+1));continue}}if(s(o)&&(n=i),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&i.length===0){if(this._findCommand(o)){t.push(o),r.length>0&&i.push(...r);break}else if(this._getHelpCommand()&&o===this._getHelpCommand().name()){t.push(o),r.length>0&&t.push(...r);break}else if(this._defaultCommandName){i.push(o),r.length>0&&i.push(...r);break}}if(this._passThroughOptions){n.push(o),r.length>0&&n.push(...r);break}n.push(o)}return{operands:t,unknown:i}}opts(){if(this._storeOptionsAsProperties){const e={},t=this.options.length;for(let i=0;i<t;i++){const n=this.options[i].attributeName();e[n]=n===this._versionOptionName?this._version:this[n]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
`),this.outputHelp({error:!0}));const i=t||{},n=i.exitCode||1,r=i.code||"commander.error";this._exit(n,r,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in m.env){const t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,m.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){const e=new ye(this.options),t=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&t(i.attributeName())&&e.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(n=>!t(n)).forEach(n=>{this.setOptionValueWithSource(n,i.implied[n],"implied")})})}missingArgument(e){const t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){const t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){const i=s=>{const l=s.attributeName(),o=this.getOptionValue(l),a=this.options.find(c=>c.negate&&l===c.attributeName()),u=this.options.find(c=>!c.negate&&l===c.attributeName());return a&&(a.presetArg===void 0&&o===!1||a.presetArg!==void 0&&o===a.presetArg)?a:u||s},n=s=>{const l=i(s),o=l.attributeName();return this.getOptionValueSource(o)==="env"?`environment variable '${l.envVar}'`:`option '${l.flags}'`},r=`error: ${n(e)} cannot be used with ${n(t)}`;this.error(r,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],r=this;do{const s=r.createHelp().visibleOptions(r).filter(l=>l.long).map(l=>l.long);n=n.concat(s),r=r.parent}while(r&&!r._enablePositionalOptions);t=q(e,n)}const i=`error: unknown option '${e}'${t}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const t=this.registeredArguments.length,i=t===1?"":"s",r=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${i} but got ${e.length}.`;this.error(r,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let t="";if(this._showSuggestionAfterError){const n=[];this.createHelp().visibleCommands(this).forEach(r=>{n.push(r.name()),r.alias()&&n.push(r.alias())}),t=q(e,n)}const i=`error: unknown command '${e}'${t}`;this.error(i,{code:"commander.unknownCommand"})}version(e,t,i){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",i=i||"output the version number";const n=this.createOption(t,i);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${e}
`),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");const i=this.parent?._findCommand(e);if(i){const n=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${n}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;const t=this.registeredArguments.map(i=>we(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=y.basename(e,y.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){const t=this.createHelp();return t.helpWidth===void 0&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){e=e||{};const t={error:!!e.error};let i;return t.error?i=n=>this._outputConfiguration.writeErr(n):i=n=>this._outputConfiguration.writeOut(n),t.write=e.write||i,t.command=this,t}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);const i=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(r=>r.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let n=this.helpInformation(i);if(t&&(n=t(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(n),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(r=>r.emit("afterAllHelp",i))}helpOption(e,t){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",t=t??"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=m.exitCode||0;t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){const i=["beforeAll","before","after","afterAll"];if(!i.includes(e))throw new Error(`Unexpected value for position to addHelpText.
Expecting one of '${i.join("', '")}'`);const n=`${e}Help`;return this.on(n,r=>{let s;typeof t=="function"?s=t({error:r.error,command:r.command}):s=t,s&&r.write(`${s}
`)}),this}_outputHelpIfRequested(e){const t=this._getHelpOption();t&&e.find(n=>t.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function B(h){return h.map(e=>{if(!e.startsWith("--inspect"))return e;let t,i="127.0.0.1",n="9229",r;return(r=e.match(/^(--inspect(-brk)?)$/))!==null?t=r[1]:(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=r[1],/^\d+$/.test(r[3])?n=r[3]:i=r[3]):(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=r[1],i=r[3],n=r[4]),t&&n!=="0"?`${t}=${i}:${parseInt(n)+1}`:e})}L.Command=ve;const{Argument:z}=S,{Command:M}=L,{CommanderError:Ee,InvalidArgumentError:Q}=V,{Help:xe}=T,{Option:X}=P;w.program=new M;w.createCommand=h=>new M(h);w.createOption=(h,e)=>new X(h,e);w.createArgument=(h,e)=>new z(h,e);w.Command=M;w.Option=X;w.Argument=z;w.Help=xe;w.CommanderError=Ee;w.InvalidArgumentError=Q;w.InvalidOptionArgumentError=Q;const{program:C,createCommand:qe,createArgument:Be,createOption:Ue,CommanderError:Re,InvalidArgumentError:Ge,InvalidOptionArgumentError:Le,Command:Je,Argument:Ke,Option:U,Help:He}=w;var Ve=ke;function H(h){return h instanceof Buffer?Buffer.from(h):new h.constructor(h.buffer.slice(),h.byteOffset,h.length)}function ke(h){if(h=h||{},h.circles)return Se(h);const e=new Map;if(e.set(Date,s=>new Date(s)),e.set(Map,(s,l)=>new Map(i(Array.from(s),l))),e.set(Set,(s,l)=>new Set(i(Array.from(s),l))),h.constructorHandlers)for(const s of h.constructorHandlers)e.set(s[0],s[1]);let t=null;return h.proto?r:n;function i(s,l){const o=Object.keys(s),a=new Array(o.length);for(let u=0;u<o.length;u++){const c=o[u],d=s[c];typeof d!="object"||d===null?a[c]=d:d.constructor!==Object&&(t=e.get(d.constructor))?a[c]=t(d,l):ArrayBuffer.isView(d)?a[c]=H(d):a[c]=l(d)}return a}function n(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return i(s,n);if(s.constructor!==Object&&(t=e.get(s.constructor)))return t(s,n);const l={};for(const o in s){if(Object.hasOwnProperty.call(s,o)===!1)continue;const a=s[o];typeof a!="object"||a===null?l[o]=a:a.constructor!==Object&&(t=e.get(a.constructor))?l[o]=t(a,n):ArrayBuffer.isView(a)?l[o]=H(a):l[o]=n(a)}return l}function r(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return i(s,r);if(s.constructor!==Object&&(t=e.get(s.constructor)))return t(s,r);const l={};for(const o in s){const a=s[o];typeof a!="object"||a===null?l[o]=a:a.constructor!==Object&&(t=e.get(a.constructor))?l[o]=t(a,r):ArrayBuffer.isView(a)?l[o]=H(a):l[o]=r(a)}return l}}function Se(h){const e=[],t=[],i=new Map;if(i.set(Date,o=>new Date(o)),i.set(Map,(o,a)=>new Map(r(Array.from(o),a))),i.set(Set,(o,a)=>new Set(r(Array.from(o),a))),h.constructorHandlers)for(const o of h.constructorHandlers)i.set(o[0],o[1]);let n=null;return h.proto?l:s;function r(o,a){const u=Object.keys(o),c=new Array(u.length);for(let d=0;d<u.length;d++){const _=u[d],f=o[_];if(typeof f!="object"||f===null)c[_]=f;else if(f.constructor!==Object&&(n=i.get(f.constructor)))c[_]=n(f,a);else if(ArrayBuffer.isView(f))c[_]=H(f);else{const O=e.indexOf(f);O!==-1?c[_]=t[O]:c[_]=a(f)}}return c}function s(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return r(o,s);if(o.constructor!==Object&&(n=i.get(o.constructor)))return n(o,s);const a={};e.push(o),t.push(a);for(const u in o){if(Object.hasOwnProperty.call(o,u)===!1)continue;const c=o[u];if(typeof c!="object"||c===null)a[u]=c;else if(c.constructor!==Object&&(n=i.get(c.constructor)))a[u]=n(c,s);else if(ArrayBuffer.isView(c))a[u]=H(c);else{const d=e.indexOf(c);d!==-1?a[u]=t[d]:a[u]=s(c)}}return e.pop(),t.pop(),a}function l(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return r(o,l);if(o.constructor!==Object&&(n=i.get(o.constructor)))return n(o,l);const a={};e.push(o),t.push(a);for(const u in o){const c=o[u];if(typeof c!="object"||c===null)a[u]=c;else if(c.constructor!==Object&&(n=i.get(c.constructor)))a[u]=n(c,l);else if(ArrayBuffer.isView(c))a[u]=H(c);else{const d=e.indexOf(c);d!==-1?a[u]=t[d]:a[u]=l(c)}}return e.pop(),t.pop(),a}}const je=g.getDefaultExportFromCjs(Ve),R="Output the version number of npm-check-updates.",Pe=h=>h.replace(/`/g,""),De=je();(async()=>{const{default:h}=await Promise.resolve().then(()=>require("./index-CWktU8PK.js")),e=h({pkg:g.pkg});if(e.update&&e.update.latest!==g.pkg.version){const{default:p}=await Promise.resolve().then(()=>require("./index-BmUFwMVL.js")),b=g.semver.parse(e.update.current)?.major,A=g.semver.parse(e.update.latest)?.major,E=(b&&A&&A>=b?new Array(A-b).fill(0).map((x,D)=>b+D+1):[]).map(x=>`${g.pkg.homepage??""}/releases/tag/v${x}.0.0`),v=`${g.pkg.homepage??""}/compare/v${e.update.current}...v${e.update.latest}`;e.notify({defer:!1,isGlobal:!0,message:`Update available ${p.dim("{currentVersion}")}${p.reset(" → ")}${e.update.type==="major"?p.red("{latestVersion}"):e.update.type==="minor"?p.yellow("{latestVersion}"):p.green("{latestVersion}")}
Run ${p.cyan("{updateCommand}")} to update
${p.dim.underline(e.update.type==="major"?E.map(x=>p.dim.underline(x)).join(`
`):v)}`})}const t=process.argv.slice(2),i=t.findIndex(p=>p==="--help"||p==="-h");if(i!==-1&&t[i+1]){const p=t[i+1].replace(/^-*/,"");p==="help"||p==="h"?console.info("Would you like some help with your help?"):(await g.chalkInit(),[...t.slice(0,i),...t.slice(i+1)].forEach(A=>{const $=A.replace(/^-*/,""),E=g.cliOptionsSorted.find(v=>$===v.long||$===v.short||$===`no-${v.long}`&&v.type==="boolean");console.info(E?g.renderExtendedHelp(E)+`
`:$==="version"||$==="v"||$==="V"?g.renderExtendedHelp({long:"version",short:"v",description:R,type:"string"})+`
`:`Unknown option: ${A}`)})),process.exit(0)}const n=new Set(g.cliOptionsSorted.filter(p=>p.cli===!1).map(p=>`--${p.long}`));C.description("[filter] is a list or regex of package names to check (all others will be ignored).").usage("[options] [filter]").configureHelp({optionTerm:p=>p.long&&n.has(p.long)?p.long.replace("--","")+"*":p.long==="--version"?"-v, -V, --version":p.flags.replace("[bool]",""),optionDescription:p=>p.long==="--version"?R:p.long==="--help"?`You're lookin' at it. Run "ncu --help <option>" for a specific option.`:He.prototype.optionDescription(p)}).addOption(new U("-v, --versionAlias").hideHelp()).on("option:versionAlias",()=>{console.info(g.pkg.version),process.exit(0)}),g.cliOptionsSorted.forEach(({long:p,short:b,arg:A,description:$,default:E,help:v,parse:x,type:D})=>{const ee=`${b?`-${b}, `:""}--${p}${A?` <${A}>`:""}`,te=`${Pe($)}${v?` Run "ncu --help ${p}" for details.`:""}`;C.option(ee,te,x||E,x?E:void 0),D==="boolean"&&C.addOption(new U(`--no-${p}`).default(!1).hideHelp())}),C.version(g.pkg.version);const r=De(C._optionValues);C.parse(process.argv);const s=C.opts(),l=process.argv.slice(2),{color:o,configFileName:a,configFilePath:u,global:c,packageFile:d,mergeConfig:_}=s;await g.chalkInit(o);const f=!process.env.NCU_TESTS||u||_?await g.getNcuRc({configFileName:a,configFilePath:u,global:c,packageFile:d,options:{...s,cli:!0}}):null,O=(f?.args||[]).filter((p,b,A)=>(typeof p!="string"||!p.startsWith("-")||!l.includes(p))&&(typeof A[b-1]!="string"||!A[b-1].startsWith("-")||!l.includes(A[b-1]))),k=[...process.argv.slice(0,2),...O,...l];C._optionValues=r,C.parse(k);const j=C.opts(),Z={...f&&Object.keys(f.config).length>0?{rcConfigPath:f.filePath}:null,...g.pickBy(C.opts(),p=>p!==void 0),args:C.args,...j.filter?{filter:j.filter}:null,...j.reject?{reject:j.reject}:null};g.run(Z,{cli:!0})})();
//# sourceMappingURL=cli.js.map
