@serverless-devs/s 2.0.103 → 2.1.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.
@@ -1,52 +1,52 @@
1
- "use strict";var f=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var nr=f((te,rr)=>{var Ti=require("events").EventEmitter,vt=require("child_process").spawn,ee=require("path"),_t=require("fs"),Ye=class{constructor(e,t){this.flags=e,this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=tr(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.description=t||"",this.defaultValue=void 0}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Fi(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}},Re=class extends Error{constructor(e,t,n){super(n);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},$e=class extends Ti{constructor(e){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._args=[],this.rawArgs=null,this._scriptPath=null,this._name=e||"",this._optionValues={},this._storeOptionsAsProperties=!0,this._storeOptionsAsPropertiesCalled=!1,this._passCommandToAction=!0,this._actionResults=[],this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._hasImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command"}command(e,t,n){let s=t,i=n;typeof s=="object"&&s!==null&&(i=s,s=null),i=i||{};let a=e.split(/ +/),l=this.createCommand(a.shift());return s&&(l.description(s),l._executableHandler=!0),i.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(i.noHelp||i.hidden),l._hasHelpOption=this._hasHelpOption,l._helpFlags=this._helpFlags,l._helpDescription=this._helpDescription,l._helpShortFlag=this._helpShortFlag,l._helpLongFlag=this._helpLongFlag,l._helpCommandName=this._helpCommandName,l._helpCommandnameAndArgs=this._helpCommandnameAndArgs,l._helpCommandDescription=this._helpCommandDescription,l._exitCallback=this._exitCallback,l._storeOptionsAsProperties=this._storeOptionsAsProperties,l._passCommandToAction=this._passCommandToAction,l._combineFlagAndOptionalValue=this._combineFlagAndOptionalValue,l._executableFile=i.executableFile||null,this.commands.push(l),l._parseExpectedArgs(a),l.parent=this,s?this:l}createCommand(e){return new $e(e)}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");function n(s){s.forEach(i=>{if(i._executableHandler&&!i._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${i.name()}`);n(i.commands)})}return n(e.commands),t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}arguments(e){return this._parseExpectedArgs(e.split(/ +/))}addHelpCommand(e,t){return e===!1?this._hasImplicitHelpCommand=!1:(this._hasImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}_lazyHasImplicitHelpCommand(){return this._hasImplicitHelpCommand===void 0&&(this._hasImplicitHelpCommand=this.commands.length&&!this._actionHandler&&!this._findCommand("help")),this._hasImplicitHelpCommand}_parseExpectedArgs(e){if(!!e.length)return e.forEach(t=>{let n={required:!1,name:"",variadic:!1};switch(t[0]){case"<":n.required=!0,n.name=t.slice(1,-1);break;case"[":n.name=t.slice(1,-1);break}n.name.length>3&&n.name.slice(-3)==="..."&&(n.variadic=!0,n.name=n.name.slice(0,-3)),n.name&&this._args.push(n)}),this._args.forEach((t,n)=>{if(t.variadic&&n<this._args.length-1)throw new Error(`only the last argument can be variadic '${t.name}'`)}),this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new Re(e,t,n)),process.exit(e)}action(e){let t=n=>{let s=this._args.length,i=n.slice(0,s);this._passCommandToAction?i[s]=this:i[s]=this.opts(),n.length>s&&i.push(n.slice(s));let a=e.apply(this,i),l=this;for(;l.parent;)l=l.parent;l._actionResults.push(a)};return this._actionHandler=t,this}_checkForOptionNameClash(e){if(!this._storeOptionsAsProperties||this._storeOptionsAsPropertiesCalled||e.name()==="help"||this._getOptionValue(e.attributeName())===void 0)return;let n=!0;if(e.negate){let s=e.long.replace(/^--no-/,"--");n=!this._findOption(s)}else if(e.long){let s=e.long.replace(/^--/,"--no-");n=!this._findOption(s)}if(n)throw new Error(`option '${e.name()}' clashes with existing property '${e.attributeName()}' on Command
1
+ "use strict";var f=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var sr=f((te,ir)=>{var Fi=require("events").EventEmitter,vt=require("child_process").spawn,ee=require("path"),_t=require("fs"),xe=class{constructor(e,t){this.flags=e,this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=nr(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.description=t||"",this.defaultValue=void 0}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Hi(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}},ce=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},ue=class extends Fi{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._args=[],this.rawArgs=null,this._scriptPath=null,this._name=e||"",this._optionValues={},this._storeOptionsAsProperties=!0,this._storeOptionsAsPropertiesCalled=!1,this._passCommandToAction=!0,this._actionResults=[],this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._hasImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command"}command(e,t,n){let s=t,i=n;typeof s=="object"&&s!==null&&(i=s,s=null),i=i||{};let a=e.split(/ +/),l=this.createCommand(a.shift());return s&&(l.description(s),l._executableHandler=!0),i.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(i.noHelp||i.hidden),l._hasHelpOption=this._hasHelpOption,l._helpFlags=this._helpFlags,l._helpDescription=this._helpDescription,l._helpShortFlag=this._helpShortFlag,l._helpLongFlag=this._helpLongFlag,l._helpCommandName=this._helpCommandName,l._helpCommandnameAndArgs=this._helpCommandnameAndArgs,l._helpCommandDescription=this._helpCommandDescription,l._exitCallback=this._exitCallback,l._storeOptionsAsProperties=this._storeOptionsAsProperties,l._passCommandToAction=this._passCommandToAction,l._combineFlagAndOptionalValue=this._combineFlagAndOptionalValue,l._executableFile=i.executableFile||null,this.commands.push(l),l._parseExpectedArgs(a),l.parent=this,s?this:l}createCommand(e){return new ue(e)}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");function n(s){s.forEach(i=>{if(i._executableHandler&&!i._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${i.name()}`);n(i.commands)})}return n(e.commands),t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}arguments(e){return this._parseExpectedArgs(e.split(/ +/))}addHelpCommand(e,t){return e===!1?this._hasImplicitHelpCommand=!1:(this._hasImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}_lazyHasImplicitHelpCommand(){return this._hasImplicitHelpCommand===void 0&&(this._hasImplicitHelpCommand=this.commands.length&&!this._actionHandler&&!this._findCommand("help")),this._hasImplicitHelpCommand}_parseExpectedArgs(e){if(!!e.length)return e.forEach(t=>{let n={required:!1,name:"",variadic:!1};switch(t[0]){case"<":n.required=!0,n.name=t.slice(1,-1);break;case"[":n.name=t.slice(1,-1);break}n.name.length>3&&n.name.slice(-3)==="..."&&(n.variadic=!0,n.name=n.name.slice(0,-3)),n.name&&this._args.push(n)}),this._args.forEach((t,n)=>{if(t.variadic&&n<this._args.length-1)throw new Error(`only the last argument can be variadic '${t.name}'`)}),this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new ce(e,t,n)),process.exit(e)}action(e){let t=n=>{let s=this._args.length,i=n.slice(0,s);this._passCommandToAction?i[s]=this:i[s]=this.opts(),n.length>s&&i.push(n.slice(s));let a=e.apply(this,i),l=this;for(;l.parent;)l=l.parent;l._actionResults.push(a)};return this._actionHandler=t,this}_checkForOptionNameClash(e){if(!this._storeOptionsAsProperties||this._storeOptionsAsPropertiesCalled||e.name()==="help"||this._getOptionValue(e.attributeName())===void 0)return;let n=!0;if(e.negate){let s=e.long.replace(/^--no-/,"--");n=!this._findOption(s)}else if(e.long){let s=e.long.replace(/^--/,"--no-");n=!this._findOption(s)}if(n)throw new Error(`option '${e.name()}' clashes with existing property '${e.attributeName()}' on Command
2
2
  - call storeOptionsAsProperties(false) to store option values safely,
3
3
  - or call storeOptionsAsProperties(true) to suppress this check,
4
4
  - or change option name
5
5
 
6
- Read more on https://git.io/JJc0W`)}_optionEx(e,t,n,s,i){let a=new Ye(t,n),l=a.name(),c=a.attributeName();if(a.mandatory=!!e.mandatory,this._checkForOptionNameClash(a),typeof s!="function")if(s instanceof RegExp){let o=s;s=(u,h)=>{let m=o.exec(u);return m?m[0]:h}}else i=s,s=null;if(a.negate||a.optional||a.required||typeof i=="boolean"){if(a.negate){let o=a.long.replace(/^--no-/,"--");i=this._findOption(o)?this._getOptionValue(c):!0}i!==void 0&&(this._setOptionValue(c,i),a.defaultValue=i)}return this.options.push(a),this.on("option:"+l,o=>{let u=this._getOptionValue(c);o!==null&&s?o=s(o,u===void 0?i:u):o!==null&&a.variadic&&(u===i||!Array.isArray(u)?o=[o]:o=u.concat(o)),typeof u=="boolean"||typeof u>"u"?o==null?this._setOptionValue(c,a.negate?!1:i||!0):this._setOptionValue(c,o):o!==null&&this._setOptionValue(c,a.negate?!1:o)}),this}option(e,t,n,s){return this._optionEx({},e,t,n,s)}requiredOption(e,t,n,s){return this._optionEx({mandatory:!0},e,t,n,s)}combineFlagAndOptionalValue(e){return this._combineFlagAndOptionalValue=e===void 0||e,this}allowUnknownOption(e){return this._allowUnknownOption=e===void 0||e,this}storeOptionsAsProperties(e){if(this._storeOptionsAsPropertiesCalled=!0,this._storeOptionsAsProperties=e===void 0||e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}passCommandToAction(e){return this._passCommandToAction=e===void 0||e,this}_setOptionValue(e,t){this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t}_getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}parse(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");t=t||{},e===void 0&&(e=process.argv,process.versions&&process.versions.electron&&(t.from="electron")),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._scriptPath&&process.mainModule&&(this._scriptPath=process.mainModule.filename),this._name=this._name||this._scriptPath&&ee.basename(this._scriptPath,ee.extname(this._scriptPath)),this._parseCommand([],n),this}parseAsync(e,t){return this.parse(e,t),Promise.all(this._actionResults).then(()=>this)}_executeSubCommand(e,t){t=t.slice();let n=!1,s=[".js",".ts",".tsx",".mjs"];this._checkForMissingMandatoryOptions();let i=this._scriptPath;!i&&process.mainModule&&(i=process.mainModule.filename);let a;try{let m=_t.realpathSync(i);a=ee.dirname(m)}catch{a="."}let l=ee.basename(i,ee.extname(i))+"-"+e._name;e._executableFile&&(l=e._executableFile);let c=ee.join(a,l);_t.existsSync(c)?l=c:s.forEach(m=>{_t.existsSync(`${c}${m}`)&&(l=`${c}${m}`)}),n=s.includes(ee.extname(l));let o;process.platform!=="win32"?n?(t.unshift(l),t=Kt(process.execArgv).concat(t),o=vt(process.argv[0],t,{stdio:"inherit"})):o=vt(l,t,{stdio:"inherit"}):(t.unshift(l),t=Kt(process.execArgv).concat(t),o=vt(process.execPath,t,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(m=>{process.on(m,()=>{o.killed===!1&&o.exitCode===null&&o.kill(m)})});let h=this._exitCallback;h?o.on("close",()=>{h(new Re(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):o.on("close",process.exit.bind(process)),o.on("error",m=>{if(m.code==="ENOENT"){let g=`'${l}' does not exist
6
+ Read more on https://git.io/JJc0W`)}_optionEx(e,t,n,s,i){let a=new xe(t,n),l=a.name(),c=a.attributeName();if(a.mandatory=!!e.mandatory,this._checkForOptionNameClash(a),typeof s!="function")if(s instanceof RegExp){let o=s;s=(u,h)=>{let v=o.exec(u);return v?v[0]:h}}else i=s,s=null;if(a.negate||a.optional||a.required||typeof i=="boolean"){if(a.negate){let o=a.long.replace(/^--no-/,"--");i=this._findOption(o)?this._getOptionValue(c):!0}i!==void 0&&(this._setOptionValue(c,i),a.defaultValue=i)}return this.options.push(a),this.on("option:"+l,o=>{let u=this._getOptionValue(c);o!==null&&s?o=s(o,u===void 0?i:u):o!==null&&a.variadic&&(u===i||!Array.isArray(u)?o=[o]:o=u.concat(o)),typeof u=="boolean"||typeof u>"u"?o==null?this._setOptionValue(c,a.negate?!1:i||!0):this._setOptionValue(c,o):o!==null&&this._setOptionValue(c,a.negate?!1:o)}),this}option(e,t,n,s){return this._optionEx({},e,t,n,s)}requiredOption(e,t,n,s){return this._optionEx({mandatory:!0},e,t,n,s)}combineFlagAndOptionalValue(e){return this._combineFlagAndOptionalValue=e===void 0||e,this}allowUnknownOption(e){return this._allowUnknownOption=e===void 0||e,this}storeOptionsAsProperties(e){if(this._storeOptionsAsPropertiesCalled=!0,this._storeOptionsAsProperties=e===void 0||e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}passCommandToAction(e){return this._passCommandToAction=e===void 0||e,this}_setOptionValue(e,t){this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t}_getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}parse(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");t=t||{},e===void 0&&(e=process.argv,process.versions&&process.versions.electron&&(t.from="electron")),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._scriptPath&&process.mainModule&&(this._scriptPath=process.mainModule.filename),this._name=this._name||this._scriptPath&&ee.basename(this._scriptPath,ee.extname(this._scriptPath)),this._parseCommand([],n),this}parseAsync(e,t){return this.parse(e,t),Promise.all(this._actionResults).then(()=>this)}_executeSubCommand(e,t){t=t.slice();let n=!1,s=[".js",".ts",".tsx",".mjs"];this._checkForMissingMandatoryOptions();let i=this._scriptPath;!i&&process.mainModule&&(i=process.mainModule.filename);let a;try{let v=_t.realpathSync(i);a=ee.dirname(v)}catch{a="."}let l=ee.basename(i,ee.extname(i))+"-"+e._name;e._executableFile&&(l=e._executableFile);let c=ee.join(a,l);_t.existsSync(c)?l=c:s.forEach(v=>{_t.existsSync(`${c}${v}`)&&(l=`${c}${v}`)}),n=s.includes(ee.extname(l));let o;process.platform!=="win32"?n?(t.unshift(l),t=tr(process.execArgv).concat(t),o=vt(process.argv[0],t,{stdio:"inherit"})):o=vt(l,t,{stdio:"inherit"}):(t.unshift(l),t=tr(process.execArgv).concat(t),o=vt(process.execPath,t,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(v=>{process.on(v,()=>{o.killed===!1&&o.exitCode===null&&o.kill(v)})});let h=this._exitCallback;h?o.on("close",()=>{h(new ce(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):o.on("close",process.exit.bind(process)),o.on("error",v=>{if(v.code==="ENOENT"){let m=`'${l}' does not exist
7
7
  - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
8
- - if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(g)}else if(m.code==="EACCES")throw new Error(`'${l}' not executable`);if(!h)process.exit(1);else{let g=new Re(1,"commander.executeSubCommandAsync","(error)");g.nestedError=m,h(g)}}),this.runningCommand=o}_dispatchSubcommand(e,t,n){let s=this._findCommand(e);s||this._helpAndError(),s._executableHandler?this._executeSubCommand(s,t.concat(n)):s._parseCommand(t,n)}_parseCommand(e,t){let n=this.parseOptions(t);if(e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))this._dispatchSubcommand(e[0],e.slice(1),t);else if(this._lazyHasImplicitHelpCommand()&&e[0]===this._helpCommandName)e.length===1?this.help():this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);else if(this._defaultCommandName)Zt(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);else if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this._helpAndError(),Zt(this,n.unknown),this._checkForMissingMandatoryOptions(),n.unknown.length>0&&this.unknownOption(n.unknown[0]),this._actionHandler){let s=this.args.slice();this._args.forEach((i,a)=>{i.required&&s[a]==null?this.missingArgument(i.name):i.variadic&&(s[a]=s.splice(a))}),this._actionHandler(s),this.emit("command:"+this.name(),e,t)}else e.length?this._findCommand("*")?this._dispatchSubcommand("*",e,t):this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length&&this.unknownCommand():this.commands.length&&this._helpAndError()}_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(){for(let e=this;e;e=e.parent)e.options.forEach(t=>{t.mandatory&&e._getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})}parseOptions(e){let t=[],n=[],s=t,i=e.slice();function a(c){return c.length>1&&c[0]==="-"}let l=null;for(;i.length;){let c=i.shift();if(c==="--"){s===n&&s.push(c),s.push(...i);break}if(l&&!a(c)){this.emit(`option:${l.name()}`,c);continue}if(l=null,a(c)){let o=this._findOption(c);if(o){if(o.required){let u=i.shift();u===void 0&&this.optionMissingArgument(o),this.emit(`option:${o.name()}`,u)}else if(o.optional){let u=null;i.length>0&&!a(i[0])&&(u=i.shift()),this.emit(`option:${o.name()}`,u)}else this.emit(`option:${o.name()}`);l=o.variadic?o:null;continue}}if(c.length>2&&c[0]==="-"&&c[1]!=="-"){let o=this._findOption(`-${c[1]}`);if(o){o.required||o.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${o.name()}`,c.slice(2)):(this.emit(`option:${o.name()}`),i.unshift(`-${c.slice(2)}`));continue}}if(/^--[^=]+=/.test(c)){let o=c.indexOf("="),u=this._findOption(c.slice(0,o));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,c.slice(o+1));continue}}c.length>1&&c[0]==="-"&&(s=n),s.push(c)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let s=this.options[n].attributeName();e[s]=s===this._versionOptionName?this._version:this[s]}return e}return this._optionValues}missingArgument(e){let t=`error: missing required argument '${e}'`;console.error(t),this._exit(1,"commander.missingArgument",t)}optionMissingArgument(e,t){let n;t?n=`error: option '${e.flags}' argument missing, got '${t}'`:n=`error: option '${e.flags}' argument missing`,console.error(n),this._exit(1,"commander.optionMissingArgument",n)}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;console.error(t),this._exit(1,"commander.missingMandatoryOptionValue",t)}unknownOption(e){if(this._allowUnknownOption)return;let t=`error: unknown option '${e}'`;console.error(t),this._exit(1,"commander.unknownOption",t)}unknownCommand(){let e=[this.name()];for(let s=this.parent;s;s=s.parent)e.unshift(s.name());let t=e.join(" "),n=`error: unknown command '${this.args[0]}'.`+(this._hasHelpOption?` See '${t} ${this._helpLongFlag}'.`:"");console.error(n),this._exit(1,"commander.unknownCommand",n)}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let s=new Ye(t,n);return this._versionOptionName=s.attributeName(),this.options.push(s),this.on("option:"+s.name(),()=>{process.stdout.write(e+`
9
- `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,this._argsDescription=t,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");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;let t=this._args.map(n=>Qt(n));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}prepareCommands(){let e=this.commands.filter(t=>!t._hidden).map(t=>{let n=t._args.map(s=>Qt(s)).join(" ");return[t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(n?" "+n:""),t._description]});return this._lazyHasImplicitHelpCommand()&&e.push([this._helpCommandnameAndArgs,this._helpCommandDescription]),e}largestCommandLength(){return this.prepareCommands().reduce((t,n)=>Math.max(t,n[0].length),0)}largestOptionLength(){let e=[].slice.call(this.options);return e.push({flags:this._helpFlags}),e.reduce((t,n)=>Math.max(t,n.flags.length),0)}largestArgLength(){return this._args.reduce((e,t)=>Math.max(e,t.name.length),0)}padWidth(){let e=this.largestOptionLength();return this._argsDescription&&this._args.length&&this.largestArgLength()>e&&(e=this.largestArgLength()),this.commands&&this.commands.length&&this.largestCommandLength()>e&&(e=this.largestCommandLength()),e}optionHelp(){let e=this.padWidth(),n=(process.stdout.columns||80)-e-4;function s(c,o){return yt(c,e)+" "+Jt(o,n,e+2)}let i=this.options.map(c=>{let o=c.description+(!c.negate&&c.defaultValue!==void 0?" (default: "+JSON.stringify(c.defaultValue)+")":"");return s(c.flags,o)}),a=this._hasHelpOption&&this._helpShortFlag&&!this._findOption(this._helpShortFlag),l=this._hasHelpOption&&!this._findOption(this._helpLongFlag);if(a||l){let c=this._helpFlags;a?l||(c=this._helpShortFlag):c=this._helpLongFlag,i.push(s(c,this._helpDescription))}return i.join(`
10
- `)}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";let e=this.prepareCommands(),t=this.padWidth(),s=(process.stdout.columns||80)-t-4;return["Commands:",e.map(i=>{let a=i[1]?" "+i[1]:"";return(a?yt(i[0],t):i[0])+Jt(a,s,t+2)}).join(`
8
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(m)}else if(v.code==="EACCES")throw new Error(`'${l}' not executable`);if(!h)process.exit(1);else{let m=new ce(1,"commander.executeSubCommandAsync","(error)");m.nestedError=v,h(m)}}),this.runningCommand=o}_dispatchSubcommand(e,t,n){let s=this._findCommand(e);s||this._helpAndError(),s._executableHandler?this._executeSubCommand(s,t.concat(n)):s._parseCommand(t,n)}_parseCommand(e,t){let n=this.parseOptions(t);if(e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))this._dispatchSubcommand(e[0],e.slice(1),t);else if(this._lazyHasImplicitHelpCommand()&&e[0]===this._helpCommandName)e.length===1?this.help():this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);else if(this._defaultCommandName)Kt(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);else if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this._helpAndError(),Kt(this,n.unknown),this._checkForMissingMandatoryOptions(),n.unknown.length>0&&this.unknownOption(n.unknown[0]),this._actionHandler){let s=this.args.slice();this._args.forEach((i,a)=>{i.required&&s[a]==null?this.missingArgument(i.name):i.variadic&&(s[a]=s.splice(a))}),this._actionHandler(s),this.emit("command:"+this.name(),e,t)}else e.length?this._findCommand("*")?this._dispatchSubcommand("*",e,t):this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length&&this.unknownCommand():this.commands.length&&this._helpAndError()}_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(){for(let e=this;e;e=e.parent)e.options.forEach(t=>{t.mandatory&&e._getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})}parseOptions(e){let t=[],n=[],s=t,i=e.slice();function a(c){return c.length>1&&c[0]==="-"}let l=null;for(;i.length;){let c=i.shift();if(c==="--"){s===n&&s.push(c),s.push(...i);break}if(l&&!a(c)){this.emit(`option:${l.name()}`,c);continue}if(l=null,a(c)){let o=this._findOption(c);if(o){if(o.required){let u=i.shift();u===void 0&&this.optionMissingArgument(o),this.emit(`option:${o.name()}`,u)}else if(o.optional){let u=null;i.length>0&&!a(i[0])&&(u=i.shift()),this.emit(`option:${o.name()}`,u)}else this.emit(`option:${o.name()}`);l=o.variadic?o:null;continue}}if(c.length>2&&c[0]==="-"&&c[1]!=="-"){let o=this._findOption(`-${c[1]}`);if(o){o.required||o.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${o.name()}`,c.slice(2)):(this.emit(`option:${o.name()}`),i.unshift(`-${c.slice(2)}`));continue}}if(/^--[^=]+=/.test(c)){let o=c.indexOf("="),u=this._findOption(c.slice(0,o));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,c.slice(o+1));continue}}c.length>1&&c[0]==="-"&&(s=n),s.push(c)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let s=this.options[n].attributeName();e[s]=s===this._versionOptionName?this._version:this[s]}return e}return this._optionValues}missingArgument(e){let t=`error: missing required argument '${e}'`;console.error(t),this._exit(1,"commander.missingArgument",t)}optionMissingArgument(e,t){let n;t?n=`error: option '${e.flags}' argument missing, got '${t}'`:n=`error: option '${e.flags}' argument missing`,console.error(n),this._exit(1,"commander.optionMissingArgument",n)}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;console.error(t),this._exit(1,"commander.missingMandatoryOptionValue",t)}unknownOption(e){if(this._allowUnknownOption)return;let t=`error: unknown option '${e}'`;console.error(t),this._exit(1,"commander.unknownOption",t)}unknownCommand(){let e=[this.name()];for(let s=this.parent;s;s=s.parent)e.unshift(s.name());let t=e.join(" "),n=`error: unknown command '${this.args[0]}'.`+(this._hasHelpOption?` See '${t} ${this._helpLongFlag}'.`:"");console.error(n),this._exit(1,"commander.unknownCommand",n)}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let s=new xe(t,n);return this._versionOptionName=s.attributeName(),this.options.push(s),this.on("option:"+s.name(),()=>{process.stdout.write(e+`
9
+ `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,this._argsDescription=t,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");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;let t=this._args.map(n=>er(n));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}prepareCommands(){let e=this.commands.filter(t=>!t._hidden).map(t=>{let n=t._args.map(s=>er(s)).join(" ");return[t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(n?" "+n:""),t._description]});return this._lazyHasImplicitHelpCommand()&&e.push([this._helpCommandnameAndArgs,this._helpCommandDescription]),e}largestCommandLength(){return this.prepareCommands().reduce((t,n)=>Math.max(t,n[0].length),0)}largestOptionLength(){let e=[].slice.call(this.options);return e.push({flags:this._helpFlags}),e.reduce((t,n)=>Math.max(t,n.flags.length),0)}largestArgLength(){return this._args.reduce((e,t)=>Math.max(e,t.name.length),0)}padWidth(){let e=this.largestOptionLength();return this._argsDescription&&this._args.length&&this.largestArgLength()>e&&(e=this.largestArgLength()),this.commands&&this.commands.length&&this.largestCommandLength()>e&&(e=this.largestCommandLength()),e}optionHelp(){let e=this.padWidth(),n=(process.stdout.columns||80)-e-4;function s(c,o){return yt(c,e)+" "+Qt(o,n,e+2)}let i=this.options.map(c=>{let o=c.description+(!c.negate&&c.defaultValue!==void 0?" (default: "+JSON.stringify(c.defaultValue)+")":"");return s(c.flags,o)}),a=this._hasHelpOption&&this._helpShortFlag&&!this._findOption(this._helpShortFlag),l=this._hasHelpOption&&!this._findOption(this._helpLongFlag);if(a||l){let c=this._helpFlags;a?l||(c=this._helpShortFlag):c=this._helpLongFlag,i.push(s(c,this._helpDescription))}return i.join(`
10
+ `)}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";let e=this.prepareCommands(),t=this.padWidth(),s=(process.stdout.columns||80)-t-4;return["Commands:",e.map(i=>{let a=i[1]?" "+i[1]:"";return(a?yt(i[0],t):i[0])+Qt(a,s,t+2)}).join(`
11
11
  `).replace(/^/gm," "),""].join(`
12
- `)}helpInformation(){if(this._name==="s")return"";let e=[];if(this._description){e=[this._description,""];let c=this._argsDescription;if(c&&this._args.length){let o=this.padWidth(),h=(process.stdout.columns||80)-o-5;e.push("Arguments:"),this._args.forEach(m=>{e.push(" "+yt(m.name,o)+" "+er(c[m.name]||"",h,o+4))}),e.push("")}}let t=this._name;this._aliases[0]&&(t=t+"|"+this._aliases[0]);let n="";for(let c=this.parent;c;c=c.parent)n=c.name()+" "+n;let s=["Usage: "+n+t+" "+this.usage(),""],i=[],a=this.commandHelp();a&&(i=[a]);let l=[];return(this._hasHelpOption||this.options.length>0)&&(l=["Options:",""+this.optionHelp().replace(/^/gm," "),""]),s.concat(e).concat(l).concat(i).join(`
13
- `)}outputHelp(e){e||(e=n=>n);let t=e(this.helpInformation());if(typeof t!="string"&&!Buffer.isBuffer(t))throw new Error("outputHelp callback must return a string or a Buffer");process.stdout.write(t),this.emit(this._helpLongFlag)}helpOption(e,t){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription;let n=tr(this._helpFlags);return this._helpShortFlag=n.shortFlag,this._helpLongFlag=n.longFlag,this}help(e){this.outputHelp(e),this._exit(process.exitCode||0,"commander.help","(outputHelp)")}_helpAndError(){this.outputHelp(),this._exit(1,"commander.help","(outputHelp)")}};te=rr.exports=new $e;te.program=te;te.Command=$e;te.Option=Ye;te.CommanderError=Re;function Fi(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function yt(r,e){let t=Math.max(0,e-r.length);return r+Array(t+1).join(" ")}function er(r,e,t){let n=new RegExp(".{1,"+(e-1)+"}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)","g");return(r.match(n)||[]).map((i,a)=>(i.slice(-1)===`
12
+ `)}helpInformation(){if(this._name==="s")return"";let e=[];if(this._description){e=[this._description,""];let c=this._argsDescription;if(c&&this._args.length){let o=this.padWidth(),h=(process.stdout.columns||80)-o-5;e.push("Arguments:"),this._args.forEach(v=>{e.push(" "+yt(v.name,o)+" "+rr(c[v.name]||"",h,o+4))}),e.push("")}}let t=this._name;this._aliases[0]&&(t=t+"|"+this._aliases[0]);let n="";for(let c=this.parent;c;c=c.parent)n=c.name()+" "+n;let s=["Usage: "+n+t+" "+this.usage(),""],i=[],a=this.commandHelp();a&&(i=[a]);let l=[];return(this._hasHelpOption||this.options.length>0)&&(l=["Options:",""+this.optionHelp().replace(/^/gm," "),""]),s.concat(e).concat(l).concat(i).join(`
13
+ `)}outputHelp(e){e||(e=n=>n);let t=e(this.helpInformation());if(typeof t!="string"&&!Buffer.isBuffer(t))throw new Error("outputHelp callback must return a string or a Buffer");process.stdout.write(t),this.emit(this._helpLongFlag)}helpOption(e,t){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription;let n=nr(this._helpFlags);return this._helpShortFlag=n.shortFlag,this._helpLongFlag=n.longFlag,this}help(e){this.outputHelp(e),this._exit(process.exitCode||0,"commander.help","(outputHelp)")}_helpAndError(){this.outputHelp(),this._exit(1,"commander.help","(outputHelp)")}};te=ir.exports=new ue;te.program=te;te.Command=ue;te.Option=xe;te.CommanderError=ce;function Hi(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function yt(r,e){let t=Math.max(0,e-r.length);return r+Array(t+1).join(" ")}function rr(r,e,t){let n=new RegExp(".{1,"+(e-1)+"}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)","g");return(r.match(n)||[]).map((i,a)=>(i.slice(-1)===`
14
14
  `&&(i=i.slice(0,i.length-1)),(a>0&&t?Array(t+1).join(" "):"")+i.trimRight())).join(`
15
- `)}function Jt(r,e,t){return r.match(/[\n]\s+/)||e<40?r:er(r,e,t)}function Zt(r,e){r._hasHelpOption&&e.find(n=>n===r._helpLongFlag||n===r._helpShortFlag)&&(r.outputHelp(),r._exit(0,"commander.helpDisplayed","(outputHelp)"))}function Qt(r){let e=r.name+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}function tr(r){let e,t,n=r.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),t=n.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}function Kt(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",s="9229",i;return(i=e.match(/^(--inspect(-brk)?)$/))!==null?t=i[1]:(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=i[1],/^\d+$/.test(i[3])?s=i[3]:n=i[3]):(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],s=i[4]),t&&s!=="0"?`${t}=${n}:${parseInt(s)+1}`:e})}});var Ie=f((Yl,ir)=>{var Hi="2.0.0",Mi=Number.MAX_SAFE_INTEGER||9007199254740991,Gi=16;ir.exports={SEMVER_SPEC_VERSION:Hi,MAX_LENGTH:256,MAX_SAFE_INTEGER:Mi,MAX_SAFE_COMPONENT_LENGTH:Gi}});var Ae=f((Jl,sr)=>{var Vi=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};sr.exports=Vi});var re=f((W,or)=>{var{MAX_SAFE_COMPONENT_LENGTH:Et}=Ie(),ki=Ae();W=or.exports={};var Ui=W.re=[],p=W.src=[],d=W.t={},zi=0,_=(r,e,t)=>{let n=zi++;ki(n,e),d[r]=n,p[n]=e,Ui[n]=new RegExp(e,t?"g":void 0)};_("NUMERICIDENTIFIER","0|[1-9]\\d*");_("NUMERICIDENTIFIERLOOSE","[0-9]+");_("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");_("MAINVERSION",`(${p[d.NUMERICIDENTIFIER]})\\.(${p[d.NUMERICIDENTIFIER]})\\.(${p[d.NUMERICIDENTIFIER]})`);_("MAINVERSIONLOOSE",`(${p[d.NUMERICIDENTIFIERLOOSE]})\\.(${p[d.NUMERICIDENTIFIERLOOSE]})\\.(${p[d.NUMERICIDENTIFIERLOOSE]})`);_("PRERELEASEIDENTIFIER",`(?:${p[d.NUMERICIDENTIFIER]}|${p[d.NONNUMERICIDENTIFIER]})`);_("PRERELEASEIDENTIFIERLOOSE",`(?:${p[d.NUMERICIDENTIFIERLOOSE]}|${p[d.NONNUMERICIDENTIFIER]})`);_("PRERELEASE",`(?:-(${p[d.PRERELEASEIDENTIFIER]}(?:\\.${p[d.PRERELEASEIDENTIFIER]})*))`);_("PRERELEASELOOSE",`(?:-?(${p[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[d.PRERELEASEIDENTIFIERLOOSE]})*))`);_("BUILDIDENTIFIER","[0-9A-Za-z-]+");_("BUILD",`(?:\\+(${p[d.BUILDIDENTIFIER]}(?:\\.${p[d.BUILDIDENTIFIER]})*))`);_("FULLPLAIN",`v?${p[d.MAINVERSION]}${p[d.PRERELEASE]}?${p[d.BUILD]}?`);_("FULL",`^${p[d.FULLPLAIN]}$`);_("LOOSEPLAIN",`[v=\\s]*${p[d.MAINVERSIONLOOSE]}${p[d.PRERELEASELOOSE]}?${p[d.BUILD]}?`);_("LOOSE",`^${p[d.LOOSEPLAIN]}$`);_("GTLT","((?:<|>)?=?)");_("XRANGEIDENTIFIERLOOSE",`${p[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);_("XRANGEIDENTIFIER",`${p[d.NUMERICIDENTIFIER]}|x|X|\\*`);_("XRANGEPLAIN",`[v=\\s]*(${p[d.XRANGEIDENTIFIER]})(?:\\.(${p[d.XRANGEIDENTIFIER]})(?:\\.(${p[d.XRANGEIDENTIFIER]})(?:${p[d.PRERELEASE]})?${p[d.BUILD]}?)?)?`);_("XRANGEPLAINLOOSE",`[v=\\s]*(${p[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[d.XRANGEIDENTIFIERLOOSE]})(?:${p[d.PRERELEASELOOSE]})?${p[d.BUILD]}?)?)?`);_("XRANGE",`^${p[d.GTLT]}\\s*${p[d.XRANGEPLAIN]}$`);_("XRANGELOOSE",`^${p[d.GTLT]}\\s*${p[d.XRANGEPLAINLOOSE]}$`);_("COERCE",`(^|[^\\d])(\\d{1,${Et}})(?:\\.(\\d{1,${Et}}))?(?:\\.(\\d{1,${Et}}))?(?:$|[^\\d])`);_("COERCERTL",p[d.COERCE],!0);_("LONETILDE","(?:~>?)");_("TILDETRIM",`(\\s*)${p[d.LONETILDE]}\\s+`,!0);W.tildeTrimReplace="$1~";_("TILDE",`^${p[d.LONETILDE]}${p[d.XRANGEPLAIN]}$`);_("TILDELOOSE",`^${p[d.LONETILDE]}${p[d.XRANGEPLAINLOOSE]}$`);_("LONECARET","(?:\\^)");_("CARETTRIM",`(\\s*)${p[d.LONECARET]}\\s+`,!0);W.caretTrimReplace="$1^";_("CARET",`^${p[d.LONECARET]}${p[d.XRANGEPLAIN]}$`);_("CARETLOOSE",`^${p[d.LONECARET]}${p[d.XRANGEPLAINLOOSE]}$`);_("COMPARATORLOOSE",`^${p[d.GTLT]}\\s*(${p[d.LOOSEPLAIN]})$|^$`);_("COMPARATOR",`^${p[d.GTLT]}\\s*(${p[d.FULLPLAIN]})$|^$`);_("COMPARATORTRIM",`(\\s*)${p[d.GTLT]}\\s*(${p[d.LOOSEPLAIN]}|${p[d.XRANGEPLAIN]})`,!0);W.comparatorTrimReplace="$1$2$3";_("HYPHENRANGE",`^\\s*(${p[d.XRANGEPLAIN]})\\s+-\\s+(${p[d.XRANGEPLAIN]})\\s*$`);_("HYPHENRANGELOOSE",`^\\s*(${p[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${p[d.XRANGEPLAINLOOSE]})\\s*$`);_("STAR","(<|>)?=?\\s*\\*");_("GTE0","^\\s*>=\\s*0.0.0\\s*$");_("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")});var xe=f((Zl,ar)=>{var Xi=["includePrerelease","loose","rtl"],Bi=r=>r?typeof r!="object"?{loose:!0}:Xi.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};ar.exports=Bi});var Je=f((Ql,ur)=>{var lr=/^[0-9]+$/,cr=(r,e)=>{let t=lr.test(r),n=lr.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},Wi=(r,e)=>cr(e,r);ur.exports={compareIdentifiers:cr,rcompareIdentifiers:Wi}});var $=f((Kl,dr)=>{var Ze=Ae(),{MAX_LENGTH:hr,MAX_SAFE_INTEGER:Qe}=Ie(),{re:fr,t:pr}=re(),Yi=xe(),{compareIdentifiers:De}=Je(),L=class{constructor(e,t){if(t=Yi(t),e instanceof L){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>hr)throw new TypeError(`version is longer than ${hr} characters`);Ze("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?fr[pr.LOOSE]:fr[pr.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Qe||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Qe||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Qe||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let i=+s;if(i>=0&&i<Qe)return i}return s}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Ze("SemVer.compare",this.version,this.options,e),!(e instanceof L)){if(typeof e=="string"&&e===this.version)return 0;e=new L(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof L||(e=new L(e,this.options)),De(this.major,e.major)||De(this.minor,e.minor)||De(this.patch,e.patch)}comparePre(e){if(e instanceof L||(e=new L(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let n=this.prerelease[t],s=e.prerelease[t];if(Ze("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return De(n,s)}while(++t)}compareBuild(e){e instanceof L||(e=new L(e,this.options));let t=0;do{let n=this.build[t],s=e.build[t];if(Ze("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return De(n,s)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};dr.exports=L});var ne=f((ec,_r)=>{var{MAX_LENGTH:Ji}=Ie(),{re:mr,t:gr}=re(),vr=$(),Zi=xe(),Qi=(r,e)=>{if(e=Zi(e),r instanceof vr)return r;if(typeof r!="string"||r.length>Ji||!(e.loose?mr[gr.LOOSE]:mr[gr.FULL]).test(r))return null;try{return new vr(r,e)}catch{return null}};_r.exports=Qi});var Er=f((tc,yr)=>{var Ki=ne(),es=(r,e)=>{let t=Ki(r,e);return t?t.version:null};yr.exports=es});var wr=f((rc,br)=>{var ts=ne(),rs=(r,e)=>{let t=ts(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};br.exports=rs});var Sr=f((nc,Or)=>{var ns=$(),is=(r,e,t,n)=>{typeof t=="string"&&(n=t,t=void 0);try{return new ns(r,t).inc(e,n).version}catch{return null}};Or.exports=is});var P=f((ic,Rr)=>{var Cr=$(),ss=(r,e,t)=>new Cr(r,t).compare(new Cr(e,t));Rr.exports=ss});var Ke=f((sc,$r)=>{var os=P(),as=(r,e,t)=>os(r,e,t)===0;$r.exports=as});var xr=f((oc,Ar)=>{var Ir=ne(),ls=Ke(),cs=(r,e)=>{if(ls(r,e))return null;{let t=Ir(r),n=Ir(e),s=t.prerelease.length||n.prerelease.length,i=s?"pre":"",a=s?"prerelease":"";for(let l in t)if((l==="major"||l==="minor"||l==="patch")&&t[l]!==n[l])return i+l;return a}};Ar.exports=cs});var Nr=f((ac,Dr)=>{var us=$(),hs=(r,e)=>new us(r,e).major;Dr.exports=hs});var jr=f((lc,qr)=>{var fs=$(),ps=(r,e)=>new fs(r,e).minor;qr.exports=ps});var Pr=f((cc,Lr)=>{var ds=$(),ms=(r,e)=>new ds(r,e).patch;Lr.exports=ms});var Fr=f((uc,Tr)=>{var gs=ne(),vs=(r,e)=>{let t=gs(r,e);return t&&t.prerelease.length?t.prerelease:null};Tr.exports=vs});var Mr=f((hc,Hr)=>{var _s=P(),ys=(r,e,t)=>_s(e,r,t);Hr.exports=ys});var Vr=f((fc,Gr)=>{var Es=P(),bs=(r,e)=>Es(r,e,!0);Gr.exports=bs});var et=f((pc,Ur)=>{var kr=$(),ws=(r,e,t)=>{let n=new kr(r,t),s=new kr(e,t);return n.compare(s)||n.compareBuild(s)};Ur.exports=ws});var Xr=f((dc,zr)=>{var Os=et(),Ss=(r,e)=>r.sort((t,n)=>Os(t,n,e));zr.exports=Ss});var Wr=f((mc,Br)=>{var Cs=et(),Rs=(r,e)=>r.sort((t,n)=>Cs(n,t,e));Br.exports=Rs});var Ne=f((gc,Yr)=>{var $s=P(),Is=(r,e,t)=>$s(r,e,t)>0;Yr.exports=Is});var tt=f((vc,Jr)=>{var As=P(),xs=(r,e,t)=>As(r,e,t)<0;Jr.exports=xs});var bt=f((_c,Zr)=>{var Ds=P(),Ns=(r,e,t)=>Ds(r,e,t)!==0;Zr.exports=Ns});var rt=f((yc,Qr)=>{var qs=P(),js=(r,e,t)=>qs(r,e,t)>=0;Qr.exports=js});var nt=f((Ec,Kr)=>{var Ls=P(),Ps=(r,e,t)=>Ls(r,e,t)<=0;Kr.exports=Ps});var wt=f((bc,en)=>{var Ts=Ke(),Fs=bt(),Hs=Ne(),Ms=rt(),Gs=tt(),Vs=nt(),ks=(r,e,t,n)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return Ts(r,t,n);case"!=":return Fs(r,t,n);case">":return Hs(r,t,n);case">=":return Ms(r,t,n);case"<":return Gs(r,t,n);case"<=":return Vs(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};en.exports=ks});var rn=f((wc,tn)=>{var Us=$(),zs=ne(),{re:it,t:st}=re(),Xs=(r,e)=>{if(r instanceof Us)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(it[st.COERCE]);else{let n;for(;(n=it[st.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||n.index+n[0].length!==t.index+t[0].length)&&(t=n),it[st.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;it[st.COERCERTL].lastIndex=-1}return t===null?null:zs(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};tn.exports=Xs});var sn=f((Oc,nn)=>{"use strict";nn.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var an=f((Sc,on)=>{"use strict";on.exports=y;y.Node=ie;y.create=y;function y(r){var e=this;if(e instanceof y||(e=new y),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var t=0,n=arguments.length;t<n;t++)e.push(arguments[t]);return e}y.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var e=r.next,t=r.prev;return e&&(e.prev=t),t&&(t.next=e),r===this.head&&(this.head=e),r===this.tail&&(this.tail=t),r.list.length--,r.next=null,r.prev=null,r.list=null,e};y.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var e=this.head;r.list=this,r.next=e,e&&(e.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};y.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var e=this.tail;r.list=this,r.prev=e,e&&(e.next=r),this.tail=r,this.head||(this.head=r),this.length++}};y.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)Ws(this,arguments[r]);return this.length};y.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)Ys(this,arguments[r]);return this.length};y.prototype.pop=function(){if(!!this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}};y.prototype.shift=function(){if(!!this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}};y.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,n=0;t!==null;n++)r.call(e,t.value,n,this),t=t.next};y.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,n=this.length-1;t!==null;n--)r.call(e,t.value,n,this),t=t.prev};y.prototype.get=function(r){for(var e=0,t=this.head;t!==null&&e<r;e++)t=t.next;if(e===r&&t!==null)return t.value};y.prototype.getReverse=function(r){for(var e=0,t=this.tail;t!==null&&e<r;e++)t=t.prev;if(e===r&&t!==null)return t.value};y.prototype.map=function(r,e){e=e||this;for(var t=new y,n=this.head;n!==null;)t.push(r.call(e,n.value,this)),n=n.next;return t};y.prototype.mapReverse=function(r,e){e=e||this;for(var t=new y,n=this.tail;n!==null;)t.push(r.call(e,n.value,this)),n=n.prev;return t};y.prototype.reduce=function(r,e){var t,n=this.head;if(arguments.length>1)t=e;else if(this.head)n=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;n!==null;s++)t=r(t,n.value,s),n=n.next;return t};y.prototype.reduceReverse=function(r,e){var t,n=this.tail;if(arguments.length>1)t=e;else if(this.tail)n=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;n!==null;s--)t=r(t,n.value,s),n=n.prev;return t};y.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};y.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};y.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new y;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=0,s=this.head;s!==null&&n<r;n++)s=s.next;for(;s!==null&&n<e;n++,s=s.next)t.push(s.value);return t};y.prototype.sliceReverse=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new y;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=this.length,s=this.tail;s!==null&&n>e;n--)s=s.prev;for(;s!==null&&n>r;n--,s=s.prev)t.push(s.value);return t};y.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var n=0,s=this.head;s!==null&&n<r;n++)s=s.next;for(var i=[],n=0;s&&n<e;n++)i.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var n=0;n<t.length;n++)s=Bs(this,s,t[n]);return i};y.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var n=t.prev;t.prev=t.next,t.next=n}return this.head=e,this.tail=r,this};function Bs(r,e,t){var n=e===r.head?new ie(t,null,e,r):new ie(t,e,e.next,r);return n.next===null&&(r.tail=n),n.prev===null&&(r.head=n),r.length++,n}function Ws(r,e){r.tail=new ie(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function Ys(r,e){r.head=new ie(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function ie(r,e,t,n){if(!(this instanceof ie))return new ie(r,e,t,n);this.list=n,this.value=r,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}try{sn()(y)}catch{}});var dn=f((Cc,pn)=>{"use strict";var Js=an(),se=Symbol("max"),U=Symbol("length"),ce=Symbol("lengthCalculator"),je=Symbol("allowStale"),oe=Symbol("maxAge"),k=Symbol("dispose"),ln=Symbol("noDisposeOnSet"),C=Symbol("lruList"),F=Symbol("cache"),un=Symbol("updateAgeOnGet"),Ot=()=>1,hn=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[se]=e.max||1/0,n=e.length||Ot;if(this[ce]=typeof n!="function"?Ot:n,this[je]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[oe]=e.maxAge||0,this[k]=e.dispose,this[ln]=e.noDisposeOnSet||!1,this[un]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[se]=e||1/0,qe(this)}get max(){return this[se]}set allowStale(e){this[je]=!!e}get allowStale(){return this[je]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[oe]=e,qe(this)}get maxAge(){return this[oe]}set lengthCalculator(e){typeof e!="function"&&(e=Ot),e!==this[ce]&&(this[ce]=e,this[U]=0,this[C].forEach(t=>{t.length=this[ce](t.value,t.key),this[U]+=t.length})),qe(this)}get lengthCalculator(){return this[ce]}get length(){return this[U]}get itemCount(){return this[C].length}rforEach(e,t){t=t||this;for(let n=this[C].tail;n!==null;){let s=n.prev;cn(this,e,n,t),n=s}}forEach(e,t){t=t||this;for(let n=this[C].head;n!==null;){let s=n.next;cn(this,e,n,t),n=s}}keys(){return this[C].toArray().map(e=>e.key)}values(){return this[C].toArray().map(e=>e.value)}reset(){this[k]&&this[C]&&this[C].length&&this[C].forEach(e=>this[k](e.key,e.value)),this[F]=new Map,this[C]=new Js,this[U]=0}dump(){return this[C].map(e=>ot(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[C]}set(e,t,n){if(n=n||this[oe],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let s=n?Date.now():0,i=this[ce](t,e);if(this[F].has(e)){if(i>this[se])return ue(this,this[F].get(e)),!1;let c=this[F].get(e).value;return this[k]&&(this[ln]||this[k](e,c.value)),c.now=s,c.maxAge=n,c.value=t,this[U]+=i-c.length,c.length=i,this.get(e),qe(this),!0}let a=new fn(e,t,i,s,n);return a.length>this[se]?(this[k]&&this[k](e,t),!1):(this[U]+=a.length,this[C].unshift(a),this[F].set(e,this[C].head),qe(this),!0)}has(e){if(!this[F].has(e))return!1;let t=this[F].get(e).value;return!ot(this,t)}get(e){return St(this,e,!0)}peek(e){return St(this,e,!1)}pop(){let e=this[C].tail;return e?(ue(this,e),e.value):null}del(e){ue(this,this[F].get(e))}load(e){this.reset();let t=Date.now();for(let n=e.length-1;n>=0;n--){let s=e[n],i=s.e||0;if(i===0)this.set(s.k,s.v);else{let a=i-t;a>0&&this.set(s.k,s.v,a)}}}prune(){this[F].forEach((e,t)=>St(this,t,!1))}},St=(r,e,t)=>{let n=r[F].get(e);if(n){let s=n.value;if(ot(r,s)){if(ue(r,n),!r[je])return}else t&&(r[un]&&(n.value.now=Date.now()),r[C].unshiftNode(n));return s.value}},ot=(r,e)=>{if(!e||!e.maxAge&&!r[oe])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[oe]&&t>r[oe]},qe=r=>{if(r[U]>r[se])for(let e=r[C].tail;r[U]>r[se]&&e!==null;){let t=e.prev;ue(r,e),e=t}},ue=(r,e)=>{if(e){let t=e.value;r[k]&&r[k](t.key,t.value),r[U]-=t.length,r[F].delete(t.key),r[C].removeNode(e)}},fn=class{constructor(e,t,n,s,i){this.key=e,this.value=t,this.length=n,this.now=s,this.maxAge=i||0}},cn=(r,e,t,n)=>{let s=t.value;ot(r,s)&&(ue(r,t),r[je]||(s=void 0)),s&&e.call(n,s.value,s.key,r)};pn.exports=hn});var T=f((Rc,_n)=>{var he=class{constructor(e,t){if(t=Qs(t),e instanceof he)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new he(e.raw,t);if(e instanceof Ct)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!gn(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&no(s[0])){this.set=[s];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,s=mn.get(n);if(s)return s;let i=this.options.loose,a=i?I[R.HYPHENRANGELOOSE]:I[R.HYPHENRANGE];e=e.replace(a,po(this.options.includePrerelease)),O("hyphen replace",e),e=e.replace(I[R.COMPARATORTRIM],eo),O("comparator trim",e,I[R.COMPARATORTRIM]),e=e.replace(I[R.TILDETRIM],to),e=e.replace(I[R.CARETTRIM],ro),e=e.split(/\s+/).join(" ");let l=i?I[R.COMPARATORLOOSE]:I[R.COMPARATOR],c=e.split(" ").map(m=>io(m,this.options)).join(" ").split(/\s+/).map(m=>fo(m,this.options)).filter(this.options.loose?m=>!!m.match(l):()=>!0).map(m=>new Ct(m,this.options)),o=c.length,u=new Map;for(let m of c){if(gn(m))return[m];u.set(m.value,m)}u.size>1&&u.has("")&&u.delete("");let h=[...u.values()];return mn.set(n,h),h}intersects(e,t){if(!(e instanceof he))throw new TypeError("a Range is required");return this.set.some(n=>vn(n,t)&&e.set.some(s=>vn(s,t)&&n.every(i=>s.every(a=>i.intersects(a,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Ks(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(mo(this.set[t],e,this.options))return!0;return!1}};_n.exports=he;var Zs=dn(),mn=new Zs({max:1e3}),Qs=xe(),Ct=Le(),O=Ae(),Ks=$(),{re:I,t:R,comparatorTrimReplace:eo,tildeTrimReplace:to,caretTrimReplace:ro}=re(),gn=r=>r.value==="<0.0.0-0",no=r=>r.value==="",vn=(r,e)=>{let t=!0,n=r.slice(),s=n.pop();for(;t&&n.length;)t=n.every(i=>s.intersects(i,e)),s=n.pop();return t},io=(r,e)=>(O("comp",r,e),r=ao(r,e),O("caret",r),r=so(r,e),O("tildes",r),r=co(r,e),O("xrange",r),r=ho(r,e),O("stars",r),r),D=r=>!r||r.toLowerCase()==="x"||r==="*",so=(r,e)=>r.trim().split(/\s+/).map(t=>oo(t,e)).join(" "),oo=(r,e)=>{let t=e.loose?I[R.TILDELOOSE]:I[R.TILDE];return r.replace(t,(n,s,i,a,l)=>{O("tilde",r,n,s,i,a,l);let c;return D(s)?c="":D(i)?c=`>=${s}.0.0 <${+s+1}.0.0-0`:D(a)?c=`>=${s}.${i}.0 <${s}.${+i+1}.0-0`:l?(O("replaceTilde pr",l),c=`>=${s}.${i}.${a}-${l} <${s}.${+i+1}.0-0`):c=`>=${s}.${i}.${a} <${s}.${+i+1}.0-0`,O("tilde return",c),c})},ao=(r,e)=>r.trim().split(/\s+/).map(t=>lo(t,e)).join(" "),lo=(r,e)=>{O("caret",r,e);let t=e.loose?I[R.CARETLOOSE]:I[R.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(s,i,a,l,c)=>{O("caret",r,s,i,a,l,c);let o;return D(i)?o="":D(a)?o=`>=${i}.0.0${n} <${+i+1}.0.0-0`:D(l)?i==="0"?o=`>=${i}.${a}.0${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.0${n} <${+i+1}.0.0-0`:c?(O("replaceCaret pr",c),i==="0"?a==="0"?o=`>=${i}.${a}.${l}-${c} <${i}.${a}.${+l+1}-0`:o=`>=${i}.${a}.${l}-${c} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${l}-${c} <${+i+1}.0.0-0`):(O("no pr"),i==="0"?a==="0"?o=`>=${i}.${a}.${l}${n} <${i}.${a}.${+l+1}-0`:o=`>=${i}.${a}.${l}${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${l} <${+i+1}.0.0-0`),O("caret return",o),o})},co=(r,e)=>(O("replaceXRanges",r,e),r.split(/\s+/).map(t=>uo(t,e)).join(" ")),uo=(r,e)=>{r=r.trim();let t=e.loose?I[R.XRANGELOOSE]:I[R.XRANGE];return r.replace(t,(n,s,i,a,l,c)=>{O("xRange",r,n,s,i,a,l,c);let o=D(i),u=o||D(a),h=u||D(l),m=h;return s==="="&&m&&(s=""),c=e.includePrerelease?"-0":"",o?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&m?(u&&(a=0),l=0,s===">"?(s=">=",u?(i=+i+1,a=0,l=0):(a=+a+1,l=0)):s==="<="&&(s="<",u?i=+i+1:a=+a+1),s==="<"&&(c="-0"),n=`${s+i}.${a}.${l}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:h&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),O("xRange return",n),n})},ho=(r,e)=>(O("replaceStars",r,e),r.trim().replace(I[R.STAR],"")),fo=(r,e)=>(O("replaceGTE0",r,e),r.trim().replace(I[e.includePrerelease?R.GTE0PRE:R.GTE0],"")),po=r=>(e,t,n,s,i,a,l,c,o,u,h,m,g)=>(D(n)?t="":D(s)?t=`>=${n}.0.0${r?"-0":""}`:D(i)?t=`>=${n}.${s}.0${r?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,D(o)?c="":D(u)?c=`<${+o+1}.0.0-0`:D(h)?c=`<${o}.${+u+1}.0-0`:m?c=`<=${o}.${u}.${h}-${m}`:r?c=`<${o}.${u}.${+h+1}-0`:c=`<=${c}`,`${t} ${c}`.trim()),mo=(r,e,t)=>{for(let n=0;n<r.length;n++)if(!r[n].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let n=0;n<r.length;n++)if(O(r[n].semver),r[n].semver!==Ct.ANY&&r[n].semver.prerelease.length>0){let s=r[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}});var Le=f(($c,On)=>{var Pe=Symbol("SemVer ANY"),Te=class{static get ANY(){return Pe}constructor(e,t){if(t=go(t),e instanceof Te){if(e.loose===!!t.loose)return e;e=e.value}$t("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Pe?this.value="":this.value=this.operator+this.semver.version,$t("comp",this)}parse(e){let t=this.options.loose?yn[En.COMPARATORLOOSE]:yn[En.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new bn(n[2],this.options.loose):this.semver=Pe}toString(){return this.value}test(e){if($t("Comparator.test",e,this.options.loose),this.semver===Pe||e===Pe)return!0;if(typeof e=="string")try{e=new bn(e,this.options)}catch{return!1}return Rt(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Te))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new wn(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new wn(this.value,t).test(e.semver);let n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),i=this.semver.version===e.semver.version,a=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),l=Rt(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),c=Rt(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||s||i&&a||l||c}};On.exports=Te;var go=xe(),{re:yn,t:En}=re(),Rt=wt(),$t=Ae(),bn=$(),wn=T()});var Fe=f((Ic,Sn)=>{var vo=T(),_o=(r,e,t)=>{try{e=new vo(e,t)}catch{return!1}return e.test(r)};Sn.exports=_o});var Rn=f((Ac,Cn)=>{var yo=T(),Eo=(r,e)=>new yo(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));Cn.exports=Eo});var In=f((xc,$n)=>{var bo=$(),wo=T(),Oo=(r,e,t)=>{let n=null,s=null,i=null;try{i=new wo(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===-1)&&(n=a,s=new bo(n,t))}),n};$n.exports=Oo});var xn=f((Dc,An)=>{var So=$(),Co=T(),Ro=(r,e,t)=>{let n=null,s=null,i=null;try{i=new Co(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===1)&&(n=a,s=new So(n,t))}),n};An.exports=Ro});var qn=f((Nc,Nn)=>{var It=$(),$o=T(),Dn=Ne(),Io=(r,e)=>{r=new $o(r,e);let t=new It("0.0.0");if(r.test(t)||(t=new It("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n<r.set.length;++n){let s=r.set[n],i=null;s.forEach(a=>{let l=new It(a.semver.version);switch(a.operator){case">":l.prerelease.length===0?l.patch++:l.prerelease.push(0),l.raw=l.format();case"":case">=":(!i||Dn(l,i))&&(i=l);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),i&&(!t||Dn(t,i))&&(t=i)}return t&&r.test(t)?t:null};Nn.exports=Io});var Ln=f((qc,jn)=>{var Ao=T(),xo=(r,e)=>{try{return new Ao(r,e).range||"*"}catch{return null}};jn.exports=xo});var at=f((jc,Hn)=>{var Do=$(),Fn=Le(),{ANY:No}=Fn,qo=T(),jo=Fe(),Pn=Ne(),Tn=tt(),Lo=nt(),Po=rt(),To=(r,e,t,n)=>{r=new Do(r,n),e=new qo(e,n);let s,i,a,l,c;switch(t){case">":s=Pn,i=Lo,a=Tn,l=">",c=">=";break;case"<":s=Tn,i=Po,a=Pn,l="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(jo(r,e,n))return!1;for(let o=0;o<e.set.length;++o){let u=e.set[o],h=null,m=null;if(u.forEach(g=>{g.semver===No&&(g=new Fn(">=0.0.0")),h=h||g,m=m||g,s(g.semver,h.semver,n)?h=g:a(g.semver,m.semver,n)&&(m=g)}),h.operator===l||h.operator===c||(!m.operator||m.operator===l)&&i(r,m.semver))return!1;if(m.operator===c&&a(r,m.semver))return!1}return!0};Hn.exports=To});var Gn=f((Lc,Mn)=>{var Fo=at(),Ho=(r,e,t)=>Fo(r,e,">",t);Mn.exports=Ho});var kn=f((Pc,Vn)=>{var Mo=at(),Go=(r,e,t)=>Mo(r,e,"<",t);Vn.exports=Go});var Xn=f((Tc,zn)=>{var Un=T(),Vo=(r,e,t)=>(r=new Un(r,t),e=new Un(e,t),r.intersects(e));zn.exports=Vo});var Wn=f((Fc,Bn)=>{var ko=Fe(),Uo=P();Bn.exports=(r,e,t)=>{let n=[],s=null,i=null,a=r.sort((u,h)=>Uo(u,h,t));for(let u of a)ko(u,e,t)?(i=u,s||(s=u)):(i&&n.push([s,i]),i=null,s=null);s&&n.push([s,null]);let l=[];for(let[u,h]of n)u===h?l.push(u):!h&&u===a[0]?l.push("*"):h?u===a[0]?l.push(`<=${h}`):l.push(`${u} - ${h}`):l.push(`>=${u}`);let c=l.join(" || "),o=typeof e.raw=="string"?e.raw:String(e);return c.length<o.length?c:e}});var Kn=f((Hc,Qn)=>{var Yn=T(),lt=Le(),{ANY:At}=lt,He=Fe(),xt=P(),zo=(r,e,t={})=>{if(r===e)return!0;r=new Yn(r,t),e=new Yn(e,t);let n=!1;e:for(let s of r.set){for(let i of e.set){let a=Xo(s,i,t);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},Xo=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===At){if(e.length===1&&e[0].semver===At)return!0;t.includePrerelease?r=[new lt(">=0.0.0-0")]:r=[new lt(">=0.0.0")]}if(e.length===1&&e[0].semver===At){if(t.includePrerelease)return!0;e=[new lt(">=0.0.0")]}let n=new Set,s,i;for(let g of r)g.operator===">"||g.operator===">="?s=Jn(s,g,t):g.operator==="<"||g.operator==="<="?i=Zn(i,g,t):n.add(g.semver);if(n.size>1)return null;let a;if(s&&i){if(a=xt(s.semver,i.semver,t),a>0)return null;if(a===0&&(s.operator!==">="||i.operator!=="<="))return null}for(let g of n){if(s&&!He(g,String(s),t)||i&&!He(g,String(i),t))return null;for(let K of e)if(!He(g,String(K),t))return!1;return!0}let l,c,o,u,h=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1,m=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1;h&&h.prerelease.length===1&&i.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let g of e){if(u=u||g.operator===">"||g.operator===">=",o=o||g.operator==="<"||g.operator==="<=",s){if(m&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===m.major&&g.semver.minor===m.minor&&g.semver.patch===m.patch&&(m=!1),g.operator===">"||g.operator===">="){if(l=Jn(s,g,t),l===g&&l!==s)return!1}else if(s.operator===">="&&!He(s.semver,String(g),t))return!1}if(i){if(h&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===h.major&&g.semver.minor===h.minor&&g.semver.patch===h.patch&&(h=!1),g.operator==="<"||g.operator==="<="){if(c=Zn(i,g,t),c===g&&c!==i)return!1}else if(i.operator==="<="&&!He(i.semver,String(g),t))return!1}if(!g.operator&&(i||s)&&a!==0)return!1}return!(s&&o&&!i&&a!==0||i&&u&&!s&&a!==0||m||h)},Jn=(r,e,t)=>{if(!r)return e;let n=xt(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},Zn=(r,e,t)=>{if(!r)return e;let n=xt(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};Qn.exports=zo});var ti=f((Mc,ei)=>{var Dt=re();ei.exports={re:Dt.re,src:Dt.src,tokens:Dt.t,SEMVER_SPEC_VERSION:Ie().SEMVER_SPEC_VERSION,SemVer:$(),compareIdentifiers:Je().compareIdentifiers,rcompareIdentifiers:Je().rcompareIdentifiers,parse:ne(),valid:Er(),clean:wr(),inc:Sr(),diff:xr(),major:Nr(),minor:jr(),patch:Pr(),prerelease:Fr(),compare:P(),rcompare:Mr(),compareLoose:Vr(),compareBuild:et(),sort:Xr(),rsort:Wr(),gt:Ne(),lt:tt(),eq:Ke(),neq:bt(),gte:rt(),lte:nt(),cmp:wt(),coerce:rn(),Comparator:Le(),Range:T(),satisfies:Fe(),toComparators:Rn(),maxSatisfying:In(),minSatisfying:xn(),minVersion:qn(),validRange:Ln(),outside:at(),gtr:Gn(),ltr:kn(),intersects:Xn(),simplifyRange:Wn(),subset:Kn()}});var z=f(j=>{"use strict";var Bo=j&&j.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Wo=j&&j.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Yo=j&&j.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Bo(e,r,t);return Wo(e,r),e},ri=j&&j.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(j,"__esModule",{value:!0});j.getCoreVersion=void 0;var ni=ri(require("path")),ii=ri(require("fs")),Nt=Yo(require("@serverless-devs/core")),Jo=ti(),si=ni.default.join(Nt.getRootHome(),"cache","core"),qt=ni.default.join(si,"package.json");function Zo(){if(ii.default.existsSync(qt)){var r=require("@serverless-devs/core/package.json").version,e=oi();return Jo.gt(e,r)?require(si):Nt}return Nt}function oi(){return ii.default.existsSync(qt)?require(qt).version:void 0}j.getCoreVersion=oi;j.default=Zo()});var ut=f(q=>{"use strict";var Qo=q&&q.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},Ko=q&&q.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},ai=q&&q.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(q,"__esModule",{value:!0});q.handlerProfileFile=q.getConfig=q.setConfig=void 0;var li=ai(require("path")),Lt=ai(z()),M=Lt.default.fse,ct=Lt.default.jsyaml,jt=Lt.default.getRootHome;function ea(r){var e=ui();M.writeFileSync(e,ct.dump(r))}function ci(){var r=ui();if(!M.existsSync(r))return{};try{var e=ct.load(M.readFileSync(r,"utf8"))||{};return e}catch(t){throw t}}function ui(){var r=li.default.join(jt(),"set-config.yml");return M.existsSync(r)||M.createFileSync(r),r}function ta(r,e){var t=ci();t[r]=e,ea(t)}q.setConfig=ta;function ra(r,e){var t=ci();return t[r]||e}q.getConfig=ra;function na(r){return Qo(this,void 0,void 0,function(){var e,t,n,s,i,a,l;return Ko(this,function(c){switch(c.label){case 0:if(e=r.filePath||"set-config.yml",t=li.default.join(jt(),e),n=M.existsSync(t),s={},n)return[3,5];i=jt(),c.label=1;case 1:return c.trys.push([1,2,,4]),M.statSync(i),[3,4];case 2:return a=c.sent(),[4,M.mkdirSync(i)];case 3:return c.sent(),[3,4];case 4:return[3,6];case 5:try{s=ct.load(M.readFileSync(t,"utf8"))||{}}catch(o){throw o}c.label=6;case 6:return r.read?[2,s]:(l=r.configKey||"",s[l]=r.data,[4,M.writeFileSync(t,ct.dump(s))]);case 7:return c.sent(),[2,s]}})})}q.handlerProfileFile=na});var hi=f((kc,ia)=>{ia.exports={name:"@serverless-devs/s",version:"2.0.103",description:"Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",homepage:"https://www.serverless-devs.com",keywords:["serverless","alibaba","tencent","azure","baidu","huawei","google","function","faas","serverless-devs"],publishConfig:{access:"public",registry:"https://registry.npmjs.org"},license:"MIT",repository:{type:"git",url:"https://github.com/Serverless-Devs/Serverless-Devs"},bugs:{url:"https://github.com/Serverless-Devs/Serverless-Devs/issues"},scripts:{start:"npm run watch",prewatch:"rm -rf lib/* && cp -r ./src/daemon ./lib",watch:"tsc -w",test:"jest test/special-command.test",prebuild:"rm -rf lib/*",build:"tsc && cp -r ./src/daemon ./lib",postbuild:"./shell/postbuild.sh","test:cov":"jest --coverage",lint:"npm run typecheck && f2elint scan -i src",fix:"f2elint fix",typecheck:"npx tsc -p tsconfig.json --noEmit",update:"rm -rf yarn.lock && rm -rf package-lock.json && rm -rf node_modules && yarn",beta:"npm publish --tag=beta"},main:"./lib/index.js",bin:{s:"bin/s"},devDependencies:{"@serverless-devs/commander":"^6.0.0","@types/jest":"^27.4.0","@types/node":"^14.0.23","@typescript-eslint/eslint-plugin":"^4.14.1","@typescript-eslint/parser":"^4.14.1",ajv:"^8.10.0","babel-eslint":"^10.1.0",boxen:"^5.0.0",dotenv:"^10.0.0",esbuild:"^0.14.0",eslint:"^7.7.0","eslint-config-prettier":"^7.2.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2",husky:"^4.2.3",inquirer:"8.2.0","inquirer-autocomplete-prompt":"^1.3.0",jest:"^27.4.7","latest-version":"^5.1.0","lint-staged":"^10.0.8","os-locale":"5.0.0",prettier:"^2.2.1",semver:"^7.3.5","semver-diff":"^3.1.1","ts-jest":"^27.1.3","ts-node":"^9.1.1",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},dependencies:{"@serverless-devs/core":"latest"}}});var me=f(v=>{"use strict";var sa=v&&v.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),oa=v&&v.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),aa=v&&v.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&sa(e,r,t);return oa(e,r),e},fe=v&&v.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},pe=v&&v.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Tt=v&&v.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(v,"__esModule",{value:!0});v.specifyServiceHelp=v.getTempCommandStr=v.emoji=v.mark=v.replaceTemplate=v.replaceFun=v.getLang=v.printn=v.getFolderSize=v.getVersion=v.getPid=v.aiRequest=v.getCredentialWithAll=v.getCredentialWithExisted=v.getProcessArgv=v.bgRed=v.yellow=v.red=void 0;var la=Tt(require("path")),Me=Tt(require("fs")),ca=Tt(require("os")),A=aa(z()),ua=ut(),fi=hi(),de=A.default.colors,ha=A.default.got,fa=A.default.getMAC,pa=A.default.isDocker,da=A.default.isCiCdEnv,Y=A.default.lodash,pi=A.default.publishHelp,ma=Y.get,ga=Y.trim,va=Y.assign,_a=Y.filter,di=Y.includes,ya=Y.omit,Ea=Y.isPlainObject,ba=Y.isEmpty,wa=de.underline,Oa=de.bold;v.red=de.hex("#fd5750");v.yellow=de.hex("#F3F99D");v.bgRed=de.hex("#000").bgHex("#fd5750");var Sa=function(){var r=process.env.serverless_devs_temp_argv;try{var e=JSON.parse(r),t=A.default.getGlobalArgs(e);return process.argv=process.argv.slice(0,2).concat(t._argsObj),va({},t,{noHelpArgv:process.argv.slice(0,2).concat(_a(t._argsObj,function(n){return!di(["-h","--help"],n)}))})}catch{return{}}};v.getProcessArgv=Sa;var Ca=function(r){return fe(void 0,void 0,void 0,function(){var e,t;return pe(this,function(n){switch(n.label){case 0:return[4,A.default.getCredentialAliasList()];case 1:return e=n.sent(),di(e,r)?[4,A.default.getCredential(r)]:[3,3];case 2:return t=n.sent(),[2,t];case 3:return[2]}})})};v.getCredentialWithExisted=Ca;var Ra=function(){return fe(void 0,void 0,void 0,function(){var r,e,t,n,s,i;return pe(this,function(a){switch(a.label){case 0:return[4,A.default.getCredentialAliasList()];case 1:if(r=a.sent(),!(r.length>0))return[3,6];e={},t=0,n=r,a.label=2;case 2:return t<n.length?(s=n[t],[4,A.default.getCredential(s)]):[3,5];case 3:i=a.sent(),e[i.Alias]=ya(i,"Alias"),a.label=4;case 4:return t++,[3,2];case 5:return[2,e];case 6:return[2]}})})};v.getCredentialWithAll=Ra;var $a=function(r,e){return e===void 0&&(e="unknow"),fe(void 0,void 0,void 0,function(){var t,n,s,i;return pe(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t=(0,ua.getConfig)("analysis"),t!=="enable"?[2]:pa()||da()?[2]:[4,ha("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(e,"&code=TypeError&s=").concat(r),{timeout:2e3,json:!0})];case 1:return n=a.sent(),s=ma(n.body,"shorturl"),s&&console.log(`AI Tips:
16
- You can try to solve the problem through: `.concat(de.underline(s),`
17
- `)),[3,3];case 2:return i=a.sent(),[3,3];case 3:return[2]}})})};v.aiRequest=$a;var Ia=function(){try{return fa().replace(/:/g,"")}catch{return"unknown"}};v.getPid=Ia;function Aa(){var r=(0,A.getCoreVersion)(),e=["".concat(fi.name,": ").concat(fi.version),r?"core: ".concat(r):void 0,"s-home: ".concat(A.default.getRootHome()),"".concat(process.platform,"-").concat(process.arch),"node-".concat(process.version)];return e.filter(function(t){return t}).join(", ")}v.getVersion=Aa;function xa(r){return fe(this,void 0,void 0,function(){function e(s){return fe(this,void 0,void 0,function(){var i,a;return pe(this,function(l){switch(l.label){case 0:return i=Me.default.lstatSync(s),typeof i!="object"?[2]:(t.set(i.ino,i.size),i.isDirectory()?(a=Me.default.readdirSync(s),typeof a!="object"?[2]:[4,Promise.all(a.map(function(c){return e(la.default.join(s,c))}))]):[3,2]);case 1:l.sent(),l.label=2;case 2:return[2]}})})}var t,n;return pe(this,function(s){switch(s.label){case 0:return t=new Map,[4,e(r)];case 1:return s.sent(),n=Array.from(t.values()).reduce(function(i,a){return i+a},0),[2,n]}})})}v.getFolderSize=xa;function Da(r,e){e===void 0&&(e=" ");for(var t="",n=0;n<r;n++)t=t+e;return t}v.printn=Da;function Na(){return"en"}v.getLang=Na;function mi(r,e){var t=/\{\{(.*?)\}\}/g,n=r.match(t);if(n)for(var s=0;s<n.length;s++){var i=n[s].replace(/{{|}}/g,""),a=ga(i.split("|")[0]);e[a]&&(r=r.replace(n[s],e[a]))}return r}v.replaceFun=mi;function qa(r,e){r.forEach(function(t){if(Me.default.existsSync(t)){var n=Me.default.readFileSync(t,"utf-8"),s=mi(n,e);Me.default.writeFileSync(t,s,"utf-8")}})}v.replaceTemplate=qa;function ja(r){if(!r)return r;var e=r.slice(-4);return"***********".concat(e)}v.mark=ja;function Pt(r,e){return ca.default.platform()==="win32"?e||"\u25C6":"".concat(r," ")}v.emoji=Pt;function gi(r,e){var t=r.length,n=new Array(e-t).fill(" ");return"".concat(r).concat(n.join("")," : ")}v.getTempCommandStr=gi;function La(r){return fe(this,void 0,void 0,function(){var e,t,n,s,i,l,a,l;return pe(this,function(c){switch(c.label){case 0:return[4,A.default.getYamlContent(r)];case 1:if(e=c.sent(),console.log(`
18
- `.concat(Pt("\u{1F680}")," ").concat(e.Name,"@").concat(e.Version,": ").concat(e.Description,`
19
- `)),t=e.Commands,t){n=pi.maxLen(t),s=[],i={};for(l in t)a=t[l],Ea(a)?s.push(pi.helpInfo(a,wa(Oa(l)),n,4)):i[l]=a;if(s.length>0&&console.log(s.join(`
20
- `)),!ba(i)){for(l in i)console.log(" ".concat(gi(l,n)," ").concat(i[l]));console.log("")}console.log(e.HomePage?" ".concat(Pt("\u{1F9ED}")," ").concat(A.default.makeUnderLine("More information: "+e.HomePage)," ")+`
21
- `:"")}return[2]}})})}v.specifyServiceHelp=La});var vi=f(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.default={clean_up_the_environment:"\u6E05\u7406\u73AF\u5883",display_help_for_command:"\u663E\u793A\u547D\u4EE4\u5E2E\u52A9",remove_components:"\u5220\u9664\u7EC4\u4EF6",delete_the_file_under_the_cache:"\u5220\u9664\u7F13\u5B58\u91CC\u7684\u7684<dirname>\u6587\u4EF6",record_your_log_information:"\u662F\u5426\u8BB0\u5F55\u60A8\u7684\u65E5\u5FD7\u4FE1\u606F\uFF1F",init_pproject_deploy_tip:"\u662F\u5426\u7ACB\u5373\u90E8\u7F72\u8BE5\u9879\u76EE\uFF1F",tip_for_a_serverless_project:"\u68C0\u6D4B\u5230\u5F53\u524D\u76EE\u5F55\u4E0B\u5DF2\u5B58\u5728\u4E00\u4E2AServerless-Devs\u9879\u76EE\uFF0C\u8BF7\u901A\u8FC7 's deploy' \u8FDB\u884C\u90E8\u7F72\u6216\u901A\u8FC7 's -h' \u83B7\u53D6\u66F4\u591A\u4FE1\u606F",create_a_new_project:"\u672A\u68C0\u6D4B\u5230 Serverless-Devs \u9879\u76EE\uFF0C\u662F\u5426\u65B0\u5EFA\u4E00\u4E2A\u9879\u76EE\uFF1F",en:"English (en)",zh:"\u4E2D\u6587 (zh)",select_current_language:"\u8BF7\u9009\u62E9\u5F53\u524D\u8BED\u8A00","app-tip":"\u8BF7\u9009\u62E9\u60A8\u5E0C\u671B\u521B\u5EFA\u7684 Serverless-Devs \u5E94\u7528","template-tip":"\u8BF7\u9009\u62E9\u60A8\u559C\u6B22\u7684\u6A21\u7248","fc-runtime-starter":"fc-runtime-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A FC \u51FD\u6570","fc-custom-container-stater":"fc-custom-container-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A custom-container \u5E94\u7528",web:"web-framework-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Web \u6846\u67B6","static-site":"static-website-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","best-practice":"serverless-best-practice - \u5FEB\u901F\u4F53\u9A8C Serverless \u6700\u4F73\u5B9E\u8DF5","devs-template":"Serverless Devs \u5F00\u53D1\u6A21\u677F","fc-http-nodejs":"fc-http-nodejs - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nodejs12 \u51FD\u6570","fc-http-python":"fc-http-python - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A python3 \u51FD\u6570","fc-http-java":"fc-http-java - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A java8 \u51FD\u6570","fc-custom-container-event-python3":"fc-custom-container-event-python3 - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 python3 \u5E94\u7528","fc-custom-container-event-cpp":"fc-custom-container-event-cpp - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 cpp \u5E94\u7528","fc-custom-container-http-springboot":"fc-custom-container-http-springboot - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 springboot \u5E94\u7528","fc-custom-container-http-aspdotnetcore":"fc-custom-container-http-aspdotnetcore - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 aspdotnetcore \u5E94\u7528","express-starter":"express-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A express \u57FA\u7840\u5E94\u7528","koa-starter":"koa-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A koa \u57FA\u7840\u5E94\u7528","nuxtjs-starter":"nuxtjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nuxtjs \u57FA\u7840\u5E94\u7528","eggjs-starter":"eggjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A eggjs \u57FA\u7840\u5E94\u7528","flask-starter":"flask-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A flask \u57FA\u7840\u5E94\u7528","SpringBoot-starter":"SpringBoot-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A SpringBoot \u57FA\u7840\u5E94\u7528","Zblog-starter":"Zblog-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Zblog \u57FA\u7840\u5E94\u7528","website-starter":"website-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","react-starter":"react-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A React.js \u5E94\u7528","vue-starter":"vue-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Vue.js \u5E94\u7528",puppeteer:"puppeteer - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E puppeteer \u622A\u56FE\u7684 Web \u5E94\u7528",ffmpeg:"ffmpeg - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E ffmpeg \u5B9E\u73B0\u97F3\u89C6\u9891\u5904\u7406\u5E94\u7528",pdf2Img:"pdf2Img - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A pdf \u8F6C\u56FE\u7247\u5E94\u7528",tensorflow:"tensorflow - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A tensorflow \u5E94\u7528",todoList:"todoList - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E nodejs \u7684\u7F51\u9875 TodoList \u5E94\u7528"}});var _i=f(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.default={clean_up_the_environment:"Clean up the environment",display_help_for_command:"Display help for command",remove_components:"Remove component (like: fc, fc@0.0.1)",delete_the_file_under_the_cache:"Delete the <dirname> file in the cache",record_your_log_information:"Do you record your log information?",init_pproject_deploy_tip:"Do you want to deploy the project immediately?",tip_for_a_serverless_project:"A Serverless-Devs project is detected in the current directory, please deploy via 's deploy' or get more information via 's -h'",create_a_new_project:"No Serverless-Devs project is currently detected. Do you want to create a new project?",en:"English (en)",zh:"Chinese (zh)",select_current_language:"Please select current language","app-tip":"Hello, serverlesser. Which template do you like?","template-tip":"Which template do you like?","fc-runtime-starter":"fc-runtime-starter - Deploy FC function in 5 minutes","fc-custom-container-stater":"fc-custom-container-stater - Deploy FC function with custom-container",web:"web-framework-stater-Quickly deploy a web framework","static-site":"static-website-stater-Quickly deploy a static website","best-practice":"serverless-best-practice-Quickly experience serverless best practices","devs-template":"Serverless Develop scaffold","fc-http-nodejs":"fc-http-nodejs - Deploy FC nodejs12 runtime function","fc-http-python":"fc-http-python - Deploy FC python3 runtime function","fc-http-java":"fc-http-java - Deploy FC java8 runtime function","fc-custom-container-event-python3":"fc-custom-container-event-python3 - Deploy python3 event-triggered application","fc-custom-container-event-cpp":"fc-custom-container-event-cpp - Deploy cpp event-triggered application","fc-custom-container-http-springboot":"fc-custom-container-http-springboot - Deploy springboot HTTP Request-triggered application","fc-custom-container-http-aspdotnetcore":"fc-custom-container-http-aspdotnetcore - Deploy dotnetcore HTTP Request-triggered application","express-starter":"express-starter - Deploy express application","koa-starter":"koa-starter - Deploy koa application","nuxtjs-starter":"nuxtjs-starter - Deploy nuxtjs application","eggjs-starter":"eggjs-starter - Deploy eggjs application","flask-starter":"flask-starter - Deploy flask application","SpringBoot-starter":"SpringBoot-starter - Deploy SpringBoot application","Zblog-starter":"Zblog-starter - Deploy Zblog application","website-starter":"website-starter - Deploy static website","react-starter":"react-starter - Deploy React.js application","vue-starter":"vue-starter - Deploy Vue.js application",puppeteer:"puppeteer - Deploy screenshot application base on puppeteer + fc",ffmpeg:"ffmpeg - Deploy audio and video processing application base on ffmpeg + fc",pdf2Img:"pdf2Img - Deploy pdf to images application",tensorflow:"tensorflow - Deploy tensorflow application",todoList:"todoList - Deploy todoList application"}});var Gt=f(Ge=>{"use strict";var yi=Ge&&Ge.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ge,"__esModule",{value:!0});var Pa=me(),Ta=yi(vi()),Fa=yi(_i()),Mt={en:Fa.default,zh:Ta.default},Ha=function(r){var e=(0,Pa.getLang)(),t=Mt[e]?Mt[e][r]:Mt.en[r];return t||r};Ge.default=Ha});var ht=f(Ve=>{"use strict";var Ma=Ve&&Ve.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ve,"__esModule",{value:!0});var Ga=Ma(z()),Va=Ga.default.Logger,Vt=new Va("S-CLI");Vt.success=function(r){return Vt.log(r,"green")};Ve.default=Vt});var bi=f(x=>{"use strict";var ka=x&&x.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Ei=x&&x.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&ka(e,r,t)},kt=x&&x.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(x,"__esModule",{value:!0});x.registerCommandChecker=x.i18n=x.logger=void 0;var Ua=kt(ht());Ei(me(),x);Ei(ut(),x);var za=ht();Object.defineProperty(x,"logger",{enumerable:!0,get:function(){return kt(za).default}});var Xa=Gt();Object.defineProperty(x,"i18n",{enumerable:!0,get:function(){return kt(Xa).default}});function Ba(r){r.on("command:*",function(e){var t=r.commands.map(function(n){return n.name()});t.includes(e[0])||(Ua.default.error(" error: unknown command ".concat(e[0])),r.help())})}x.registerCommandChecker=Ba});var ae=f(ge=>{"use strict";var Wa=ge&&ge.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ge,"__esModule",{value:!0});ge.ServerlessError=void 0;var Ya=Wa(z()),Ja=Ya.default.Logger,Za=new Ja("S-CLI-ERROR"),Qa=function(){function r(e,t,n){Za.error(e+": "+t,n),process.exit(1)}return r}();ge.ServerlessError=Qa});var wi=f(ve=>{"use strict";var Ka=ve&&ve.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(ve,"__esModule",{value:!0});ve.CommandError=void 0;var el=ae(),tl=function(r){Ka(e,r);function e(t,n){return r.call(this,"Error",t,n)||this}return e}(el.ServerlessError);ve.CommandError=tl});var Oi=f(_e=>{"use strict";var rl=_e&&_e.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(_e,"__esModule",{value:!0});_e.ConfigDeleteError=void 0;var nl=ae(),il=function(r){rl(e,r);function e(t,n){return r.call(this,"Deletion failed",t,n)||this}return e}(nl.ServerlessError);_e.ConfigDeleteError=il});var Si=f(ye=>{"use strict";var sl=ye&&ye.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(ye,"__esModule",{value:!0});ye.ConfigError=void 0;var ol=ae(),al=function(r){sl(e,r);function e(t,n){return r.call(this,"Config failed",t,n)||this}return e}(ol.ServerlessError);ye.ConfigError=al});var Ci=f(Ee=>{"use strict";var ll=Ee&&Ee.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.ConfigGetError=void 0;var cl=ae(),ul=function(r){ll(e,r);function e(t,n){return r.call(this,"Get failed",t,n)||this}return e}(cl.ServerlessError);Ee.ConfigGetError=ul});var Ri=f(be=>{"use strict";var hl=be&&be.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(be,"__esModule",{value:!0});be.InitError=void 0;var fl=ae(),pl=function(r){hl(e,r);function e(t,n){return r.call(this,"Initialization failed",t,n)||this}return e}(fl.ServerlessError);be.InitError=pl});var Ii=f(G=>{"use strict";var dl=G&&G.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},ml=G&&G.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},gl=G&&G.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(G,"__esModule",{value:!0});G.HumanError=void 0;var $i=gl(z()),vl=me(),_l=$i.default.colors,yl=function(){function r(e){var t=e.errorMessage,n=e.tips;this.errorMessage=t,console.log(`
15
+ `)}function Qt(r,e,t){return r.match(/[\n]\s+/)||e<40?r:rr(r,e,t)}function Kt(r,e){r._hasHelpOption&&e.find(n=>n===r._helpLongFlag||n===r._helpShortFlag)&&(r.outputHelp(),r._exit(0,"commander.helpDisplayed","(outputHelp)"))}function er(r){let e=r.name+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}function nr(r){let e,t,n=r.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),t=n.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}function tr(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",s="9229",i;return(i=e.match(/^(--inspect(-brk)?)$/))!==null?t=i[1]:(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=i[1],/^\d+$/.test(i[3])?s=i[3]:n=i[3]):(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],s=i[4]),t&&s!=="0"?`${t}=${n}:${parseInt(s)+1}`:e})}});var De=f((Bl,or)=>{var Mi="2.0.0",Gi=Number.MAX_SAFE_INTEGER||9007199254740991,Vi=16;or.exports={SEMVER_SPEC_VERSION:Mi,MAX_LENGTH:256,MAX_SAFE_INTEGER:Gi,MAX_SAFE_COMPONENT_LENGTH:Vi}});var Ne=f((Wl,ar)=>{var ki=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};ar.exports=ki});var re=f((W,lr)=>{var{MAX_SAFE_COMPONENT_LENGTH:Et}=De(),Ui=Ne();W=lr.exports={};var zi=W.re=[],p=W.src=[],d=W.t={},Xi=0,_=(r,e,t)=>{let n=Xi++;Ui(r,n,e),d[r]=n,p[n]=e,zi[n]=new RegExp(e,t?"g":void 0)};_("NUMERICIDENTIFIER","0|[1-9]\\d*");_("NUMERICIDENTIFIERLOOSE","[0-9]+");_("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");_("MAINVERSION",`(${p[d.NUMERICIDENTIFIER]})\\.(${p[d.NUMERICIDENTIFIER]})\\.(${p[d.NUMERICIDENTIFIER]})`);_("MAINVERSIONLOOSE",`(${p[d.NUMERICIDENTIFIERLOOSE]})\\.(${p[d.NUMERICIDENTIFIERLOOSE]})\\.(${p[d.NUMERICIDENTIFIERLOOSE]})`);_("PRERELEASEIDENTIFIER",`(?:${p[d.NUMERICIDENTIFIER]}|${p[d.NONNUMERICIDENTIFIER]})`);_("PRERELEASEIDENTIFIERLOOSE",`(?:${p[d.NUMERICIDENTIFIERLOOSE]}|${p[d.NONNUMERICIDENTIFIER]})`);_("PRERELEASE",`(?:-(${p[d.PRERELEASEIDENTIFIER]}(?:\\.${p[d.PRERELEASEIDENTIFIER]})*))`);_("PRERELEASELOOSE",`(?:-?(${p[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[d.PRERELEASEIDENTIFIERLOOSE]})*))`);_("BUILDIDENTIFIER","[0-9A-Za-z-]+");_("BUILD",`(?:\\+(${p[d.BUILDIDENTIFIER]}(?:\\.${p[d.BUILDIDENTIFIER]})*))`);_("FULLPLAIN",`v?${p[d.MAINVERSION]}${p[d.PRERELEASE]}?${p[d.BUILD]}?`);_("FULL",`^${p[d.FULLPLAIN]}$`);_("LOOSEPLAIN",`[v=\\s]*${p[d.MAINVERSIONLOOSE]}${p[d.PRERELEASELOOSE]}?${p[d.BUILD]}?`);_("LOOSE",`^${p[d.LOOSEPLAIN]}$`);_("GTLT","((?:<|>)?=?)");_("XRANGEIDENTIFIERLOOSE",`${p[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);_("XRANGEIDENTIFIER",`${p[d.NUMERICIDENTIFIER]}|x|X|\\*`);_("XRANGEPLAIN",`[v=\\s]*(${p[d.XRANGEIDENTIFIER]})(?:\\.(${p[d.XRANGEIDENTIFIER]})(?:\\.(${p[d.XRANGEIDENTIFIER]})(?:${p[d.PRERELEASE]})?${p[d.BUILD]}?)?)?`);_("XRANGEPLAINLOOSE",`[v=\\s]*(${p[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[d.XRANGEIDENTIFIERLOOSE]})(?:${p[d.PRERELEASELOOSE]})?${p[d.BUILD]}?)?)?`);_("XRANGE",`^${p[d.GTLT]}\\s*${p[d.XRANGEPLAIN]}$`);_("XRANGELOOSE",`^${p[d.GTLT]}\\s*${p[d.XRANGEPLAINLOOSE]}$`);_("COERCE",`(^|[^\\d])(\\d{1,${Et}})(?:\\.(\\d{1,${Et}}))?(?:\\.(\\d{1,${Et}}))?(?:$|[^\\d])`);_("COERCERTL",p[d.COERCE],!0);_("LONETILDE","(?:~>?)");_("TILDETRIM",`(\\s*)${p[d.LONETILDE]}\\s+`,!0);W.tildeTrimReplace="$1~";_("TILDE",`^${p[d.LONETILDE]}${p[d.XRANGEPLAIN]}$`);_("TILDELOOSE",`^${p[d.LONETILDE]}${p[d.XRANGEPLAINLOOSE]}$`);_("LONECARET","(?:\\^)");_("CARETTRIM",`(\\s*)${p[d.LONECARET]}\\s+`,!0);W.caretTrimReplace="$1^";_("CARET",`^${p[d.LONECARET]}${p[d.XRANGEPLAIN]}$`);_("CARETLOOSE",`^${p[d.LONECARET]}${p[d.XRANGEPLAINLOOSE]}$`);_("COMPARATORLOOSE",`^${p[d.GTLT]}\\s*(${p[d.LOOSEPLAIN]})$|^$`);_("COMPARATOR",`^${p[d.GTLT]}\\s*(${p[d.FULLPLAIN]})$|^$`);_("COMPARATORTRIM",`(\\s*)${p[d.GTLT]}\\s*(${p[d.LOOSEPLAIN]}|${p[d.XRANGEPLAIN]})`,!0);W.comparatorTrimReplace="$1$2$3";_("HYPHENRANGE",`^\\s*(${p[d.XRANGEPLAIN]})\\s+-\\s+(${p[d.XRANGEPLAIN]})\\s*$`);_("HYPHENRANGELOOSE",`^\\s*(${p[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${p[d.XRANGEPLAINLOOSE]})\\s*$`);_("STAR","(<|>)?=?\\s*\\*");_("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");_("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var qe=f((Yl,cr)=>{var Bi=["includePrerelease","loose","rtl"],Wi=r=>r?typeof r!="object"?{loose:!0}:Bi.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};cr.exports=Wi});var Je=f((Jl,fr)=>{var ur=/^[0-9]+$/,hr=(r,e)=>{let t=ur.test(r),n=ur.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},Yi=(r,e)=>hr(e,r);fr.exports={compareIdentifiers:hr,rcompareIdentifiers:Yi}});var R=f((Zl,gr)=>{var Ze=Ne(),{MAX_LENGTH:pr,MAX_SAFE_INTEGER:Qe}=De(),{re:dr,t:mr}=re(),Ji=qe(),{compareIdentifiers:he}=Je(),j=class{constructor(e,t){if(t=Ji(t),e instanceof j){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>pr)throw new TypeError(`version is longer than ${pr} characters`);Ze("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?dr[mr.LOOSE]:dr[mr.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Qe||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Qe||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Qe||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let i=+s;if(i>=0&&i<Qe)return i}return s}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Ze("SemVer.compare",this.version,this.options,e),!(e instanceof j)){if(typeof e=="string"&&e===this.version)return 0;e=new j(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof j||(e=new j(e,this.options)),he(this.major,e.major)||he(this.minor,e.minor)||he(this.patch,e.patch)}comparePre(e){if(e instanceof j||(e=new j(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let n=this.prerelease[t],s=e.prerelease[t];if(Ze("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return he(n,s)}while(++t)}compareBuild(e){e instanceof j||(e=new j(e,this.options));let t=0;do{let n=this.build[t],s=e.build[t];if(Ze("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return he(n,s)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}t&&(he(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};gr.exports=j});var ne=f((Ql,Er)=>{var{MAX_LENGTH:Zi}=De(),{re:vr,t:_r}=re(),yr=R(),Qi=qe(),Ki=(r,e)=>{if(e=Qi(e),r instanceof yr)return r;if(typeof r!="string"||r.length>Zi||!(e.loose?vr[_r.LOOSE]:vr[_r.FULL]).test(r))return null;try{return new yr(r,e)}catch{return null}};Er.exports=Ki});var wr=f((Kl,br)=>{var es=ne(),ts=(r,e)=>{let t=es(r,e);return t?t.version:null};br.exports=ts});var Sr=f((ec,Or)=>{var rs=ne(),ns=(r,e)=>{let t=rs(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};Or.exports=ns});var $r=f((tc,Rr)=>{var Cr=R(),is=(r,e,t,n)=>{typeof t=="string"&&(n=t,t=void 0);try{return new Cr(r instanceof Cr?r.version:r,t).inc(e,n).version}catch{return null}};Rr.exports=is});var P=f((rc,Ar)=>{var Ir=R(),ss=(r,e,t)=>new Ir(r,t).compare(new Ir(e,t));Ar.exports=ss});var Ke=f((nc,xr)=>{var os=P(),as=(r,e,t)=>os(r,e,t)===0;xr.exports=as});var qr=f((ic,Nr)=>{var Dr=ne(),ls=Ke(),cs=(r,e)=>{if(ls(r,e))return null;{let t=Dr(r),n=Dr(e),s=t.prerelease.length||n.prerelease.length,i=s?"pre":"",a=s?"prerelease":"";for(let l in t)if((l==="major"||l==="minor"||l==="patch")&&t[l]!==n[l])return i+l;return a}};Nr.exports=cs});var Lr=f((sc,jr)=>{var us=R(),hs=(r,e)=>new us(r,e).major;jr.exports=hs});var Tr=f((oc,Pr)=>{var fs=R(),ps=(r,e)=>new fs(r,e).minor;Pr.exports=ps});var Hr=f((ac,Fr)=>{var ds=R(),ms=(r,e)=>new ds(r,e).patch;Fr.exports=ms});var Gr=f((lc,Mr)=>{var gs=ne(),vs=(r,e)=>{let t=gs(r,e);return t&&t.prerelease.length?t.prerelease:null};Mr.exports=vs});var kr=f((cc,Vr)=>{var _s=P(),ys=(r,e,t)=>_s(e,r,t);Vr.exports=ys});var zr=f((uc,Ur)=>{var Es=P(),bs=(r,e)=>Es(r,e,!0);Ur.exports=bs});var et=f((hc,Br)=>{var Xr=R(),ws=(r,e,t)=>{let n=new Xr(r,t),s=new Xr(e,t);return n.compare(s)||n.compareBuild(s)};Br.exports=ws});var Yr=f((fc,Wr)=>{var Os=et(),Ss=(r,e)=>r.sort((t,n)=>Os(t,n,e));Wr.exports=Ss});var Zr=f((pc,Jr)=>{var Cs=et(),Rs=(r,e)=>r.sort((t,n)=>Cs(n,t,e));Jr.exports=Rs});var je=f((dc,Qr)=>{var $s=P(),Is=(r,e,t)=>$s(r,e,t)>0;Qr.exports=Is});var tt=f((mc,Kr)=>{var As=P(),xs=(r,e,t)=>As(r,e,t)<0;Kr.exports=xs});var bt=f((gc,en)=>{var Ds=P(),Ns=(r,e,t)=>Ds(r,e,t)!==0;en.exports=Ns});var rt=f((vc,tn)=>{var qs=P(),js=(r,e,t)=>qs(r,e,t)>=0;tn.exports=js});var nt=f((_c,rn)=>{var Ls=P(),Ps=(r,e,t)=>Ls(r,e,t)<=0;rn.exports=Ps});var wt=f((yc,nn)=>{var Ts=Ke(),Fs=bt(),Hs=je(),Ms=rt(),Gs=tt(),Vs=nt(),ks=(r,e,t,n)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return Ts(r,t,n);case"!=":return Fs(r,t,n);case">":return Hs(r,t,n);case">=":return Ms(r,t,n);case"<":return Gs(r,t,n);case"<=":return Vs(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};nn.exports=ks});var on=f((Ec,sn)=>{var Us=R(),zs=ne(),{re:it,t:st}=re(),Xs=(r,e)=>{if(r instanceof Us)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(it[st.COERCE]);else{let n;for(;(n=it[st.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||n.index+n[0].length!==t.index+t[0].length)&&(t=n),it[st.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;it[st.COERCERTL].lastIndex=-1}return t===null?null:zs(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};sn.exports=Xs});var ln=f((bc,an)=>{"use strict";an.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var un=f((wc,cn)=>{"use strict";cn.exports=y;y.Node=ie;y.create=y;function y(r){var e=this;if(e instanceof y||(e=new y),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var t=0,n=arguments.length;t<n;t++)e.push(arguments[t]);return e}y.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var e=r.next,t=r.prev;return e&&(e.prev=t),t&&(t.next=e),r===this.head&&(this.head=e),r===this.tail&&(this.tail=t),r.list.length--,r.next=null,r.prev=null,r.list=null,e};y.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var e=this.head;r.list=this,r.next=e,e&&(e.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};y.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var e=this.tail;r.list=this,r.prev=e,e&&(e.next=r),this.tail=r,this.head||(this.head=r),this.length++}};y.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)Ws(this,arguments[r]);return this.length};y.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)Ys(this,arguments[r]);return this.length};y.prototype.pop=function(){if(!!this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}};y.prototype.shift=function(){if(!!this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}};y.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,n=0;t!==null;n++)r.call(e,t.value,n,this),t=t.next};y.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,n=this.length-1;t!==null;n--)r.call(e,t.value,n,this),t=t.prev};y.prototype.get=function(r){for(var e=0,t=this.head;t!==null&&e<r;e++)t=t.next;if(e===r&&t!==null)return t.value};y.prototype.getReverse=function(r){for(var e=0,t=this.tail;t!==null&&e<r;e++)t=t.prev;if(e===r&&t!==null)return t.value};y.prototype.map=function(r,e){e=e||this;for(var t=new y,n=this.head;n!==null;)t.push(r.call(e,n.value,this)),n=n.next;return t};y.prototype.mapReverse=function(r,e){e=e||this;for(var t=new y,n=this.tail;n!==null;)t.push(r.call(e,n.value,this)),n=n.prev;return t};y.prototype.reduce=function(r,e){var t,n=this.head;if(arguments.length>1)t=e;else if(this.head)n=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;n!==null;s++)t=r(t,n.value,s),n=n.next;return t};y.prototype.reduceReverse=function(r,e){var t,n=this.tail;if(arguments.length>1)t=e;else if(this.tail)n=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;n!==null;s--)t=r(t,n.value,s),n=n.prev;return t};y.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};y.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};y.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new y;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=0,s=this.head;s!==null&&n<r;n++)s=s.next;for(;s!==null&&n<e;n++,s=s.next)t.push(s.value);return t};y.prototype.sliceReverse=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new y;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=this.length,s=this.tail;s!==null&&n>e;n--)s=s.prev;for(;s!==null&&n>r;n--,s=s.prev)t.push(s.value);return t};y.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var n=0,s=this.head;s!==null&&n<r;n++)s=s.next;for(var i=[],n=0;s&&n<e;n++)i.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var n=0;n<t.length;n++)s=Bs(this,s,t[n]);return i};y.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var n=t.prev;t.prev=t.next,t.next=n}return this.head=e,this.tail=r,this};function Bs(r,e,t){var n=e===r.head?new ie(t,null,e,r):new ie(t,e,e.next,r);return n.next===null&&(r.tail=n),n.prev===null&&(r.head=n),r.length++,n}function Ws(r,e){r.tail=new ie(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function Ys(r,e){r.head=new ie(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function ie(r,e,t,n){if(!(this instanceof ie))return new ie(r,e,t,n);this.list=n,this.value=r,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}try{ln()(y)}catch{}});var mn=f((Oc,dn)=>{"use strict";var Js=un(),se=Symbol("max"),U=Symbol("length"),fe=Symbol("lengthCalculator"),Pe=Symbol("allowStale"),oe=Symbol("maxAge"),k=Symbol("dispose"),hn=Symbol("noDisposeOnSet"),C=Symbol("lruList"),F=Symbol("cache"),pn=Symbol("updateAgeOnGet"),Ot=()=>1,Ct=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[se]=e.max||1/0,n=e.length||Ot;if(this[fe]=typeof n!="function"?Ot:n,this[Pe]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[oe]=e.maxAge||0,this[k]=e.dispose,this[hn]=e.noDisposeOnSet||!1,this[pn]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[se]=e||1/0,Le(this)}get max(){return this[se]}set allowStale(e){this[Pe]=!!e}get allowStale(){return this[Pe]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[oe]=e,Le(this)}get maxAge(){return this[oe]}set lengthCalculator(e){typeof e!="function"&&(e=Ot),e!==this[fe]&&(this[fe]=e,this[U]=0,this[C].forEach(t=>{t.length=this[fe](t.value,t.key),this[U]+=t.length})),Le(this)}get lengthCalculator(){return this[fe]}get length(){return this[U]}get itemCount(){return this[C].length}rforEach(e,t){t=t||this;for(let n=this[C].tail;n!==null;){let s=n.prev;fn(this,e,n,t),n=s}}forEach(e,t){t=t||this;for(let n=this[C].head;n!==null;){let s=n.next;fn(this,e,n,t),n=s}}keys(){return this[C].toArray().map(e=>e.key)}values(){return this[C].toArray().map(e=>e.value)}reset(){this[k]&&this[C]&&this[C].length&&this[C].forEach(e=>this[k](e.key,e.value)),this[F]=new Map,this[C]=new Js,this[U]=0}dump(){return this[C].map(e=>ot(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[C]}set(e,t,n){if(n=n||this[oe],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let s=n?Date.now():0,i=this[fe](t,e);if(this[F].has(e)){if(i>this[se])return pe(this,this[F].get(e)),!1;let c=this[F].get(e).value;return this[k]&&(this[hn]||this[k](e,c.value)),c.now=s,c.maxAge=n,c.value=t,this[U]+=i-c.length,c.length=i,this.get(e),Le(this),!0}let a=new Rt(e,t,i,s,n);return a.length>this[se]?(this[k]&&this[k](e,t),!1):(this[U]+=a.length,this[C].unshift(a),this[F].set(e,this[C].head),Le(this),!0)}has(e){if(!this[F].has(e))return!1;let t=this[F].get(e).value;return!ot(this,t)}get(e){return St(this,e,!0)}peek(e){return St(this,e,!1)}pop(){let e=this[C].tail;return e?(pe(this,e),e.value):null}del(e){pe(this,this[F].get(e))}load(e){this.reset();let t=Date.now();for(let n=e.length-1;n>=0;n--){let s=e[n],i=s.e||0;if(i===0)this.set(s.k,s.v);else{let a=i-t;a>0&&this.set(s.k,s.v,a)}}}prune(){this[F].forEach((e,t)=>St(this,t,!1))}},St=(r,e,t)=>{let n=r[F].get(e);if(n){let s=n.value;if(ot(r,s)){if(pe(r,n),!r[Pe])return}else t&&(r[pn]&&(n.value.now=Date.now()),r[C].unshiftNode(n));return s.value}},ot=(r,e)=>{if(!e||!e.maxAge&&!r[oe])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[oe]&&t>r[oe]},Le=r=>{if(r[U]>r[se])for(let e=r[C].tail;r[U]>r[se]&&e!==null;){let t=e.prev;pe(r,e),e=t}},pe=(r,e)=>{if(e){let t=e.value;r[k]&&r[k](t.key,t.value),r[U]-=t.length,r[F].delete(t.key),r[C].removeNode(e)}},Rt=class{constructor(e,t,n,s,i){this.key=e,this.value=t,this.length=n,this.now=s,this.maxAge=i||0}},fn=(r,e,t,n)=>{let s=t.value;ot(r,s)&&(pe(r,t),r[Pe]||(s=void 0)),s&&e.call(n,s.value,s.key,r)};dn.exports=Ct});var T=f((Sc,yn)=>{var ae=class{constructor(e,t){if(t=Qs(t),e instanceof ae)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new ae(e.raw,t);if(e instanceof $t)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!vn(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&no(s[0])){this.set=[s];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,s=gn.get(n);if(s)return s;let i=this.options.loose,a=i?N[A.HYPHENRANGELOOSE]:N[A.HYPHENRANGE];e=e.replace(a,po(this.options.includePrerelease)),O("hyphen replace",e),e=e.replace(N[A.COMPARATORTRIM],eo),O("comparator trim",e),e=e.replace(N[A.TILDETRIM],to),e=e.replace(N[A.CARETTRIM],ro),e=e.split(/\s+/).join(" ");let l=e.split(" ").map(h=>io(h,this.options)).join(" ").split(/\s+/).map(h=>fo(h,this.options));i&&(l=l.filter(h=>(O("loose invalid filter",h,this.options),!!h.match(N[A.COMPARATORLOOSE])))),O("range list",l);let c=new Map,o=l.map(h=>new $t(h,this.options));for(let h of o){if(vn(h))return[h];c.set(h.value,h)}c.size>1&&c.has("")&&c.delete("");let u=[...c.values()];return gn.set(n,u),u}intersects(e,t){if(!(e instanceof ae))throw new TypeError("a Range is required");return this.set.some(n=>_n(n,t)&&e.set.some(s=>_n(s,t)&&n.every(i=>s.every(a=>i.intersects(a,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Ks(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(mo(this.set[t],e,this.options))return!0;return!1}};yn.exports=ae;var Zs=mn(),gn=new Zs({max:1e3}),Qs=qe(),$t=Te(),O=Ne(),Ks=R(),{re:N,t:A,comparatorTrimReplace:eo,tildeTrimReplace:to,caretTrimReplace:ro}=re(),vn=r=>r.value==="<0.0.0-0",no=r=>r.value==="",_n=(r,e)=>{let t=!0,n=r.slice(),s=n.pop();for(;t&&n.length;)t=n.every(i=>s.intersects(i,e)),s=n.pop();return t},io=(r,e)=>(O("comp",r,e),r=ao(r,e),O("caret",r),r=so(r,e),O("tildes",r),r=co(r,e),O("xrange",r),r=ho(r,e),O("stars",r),r),x=r=>!r||r.toLowerCase()==="x"||r==="*",so=(r,e)=>r.trim().split(/\s+/).map(t=>oo(t,e)).join(" "),oo=(r,e)=>{let t=e.loose?N[A.TILDELOOSE]:N[A.TILDE];return r.replace(t,(n,s,i,a,l)=>{O("tilde",r,n,s,i,a,l);let c;return x(s)?c="":x(i)?c=`>=${s}.0.0 <${+s+1}.0.0-0`:x(a)?c=`>=${s}.${i}.0 <${s}.${+i+1}.0-0`:l?(O("replaceTilde pr",l),c=`>=${s}.${i}.${a}-${l} <${s}.${+i+1}.0-0`):c=`>=${s}.${i}.${a} <${s}.${+i+1}.0-0`,O("tilde return",c),c})},ao=(r,e)=>r.trim().split(/\s+/).map(t=>lo(t,e)).join(" "),lo=(r,e)=>{O("caret",r,e);let t=e.loose?N[A.CARETLOOSE]:N[A.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(s,i,a,l,c)=>{O("caret",r,s,i,a,l,c);let o;return x(i)?o="":x(a)?o=`>=${i}.0.0${n} <${+i+1}.0.0-0`:x(l)?i==="0"?o=`>=${i}.${a}.0${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.0${n} <${+i+1}.0.0-0`:c?(O("replaceCaret pr",c),i==="0"?a==="0"?o=`>=${i}.${a}.${l}-${c} <${i}.${a}.${+l+1}-0`:o=`>=${i}.${a}.${l}-${c} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${l}-${c} <${+i+1}.0.0-0`):(O("no pr"),i==="0"?a==="0"?o=`>=${i}.${a}.${l}${n} <${i}.${a}.${+l+1}-0`:o=`>=${i}.${a}.${l}${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${l} <${+i+1}.0.0-0`),O("caret return",o),o})},co=(r,e)=>(O("replaceXRanges",r,e),r.split(/\s+/).map(t=>uo(t,e)).join(" ")),uo=(r,e)=>{r=r.trim();let t=e.loose?N[A.XRANGELOOSE]:N[A.XRANGE];return r.replace(t,(n,s,i,a,l,c)=>{O("xRange",r,n,s,i,a,l,c);let o=x(i),u=o||x(a),h=u||x(l),v=h;return s==="="&&v&&(s=""),c=e.includePrerelease?"-0":"",o?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&v?(u&&(a=0),l=0,s===">"?(s=">=",u?(i=+i+1,a=0,l=0):(a=+a+1,l=0)):s==="<="&&(s="<",u?i=+i+1:a=+a+1),s==="<"&&(c="-0"),n=`${s+i}.${a}.${l}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:h&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),O("xRange return",n),n})},ho=(r,e)=>(O("replaceStars",r,e),r.trim().replace(N[A.STAR],"")),fo=(r,e)=>(O("replaceGTE0",r,e),r.trim().replace(N[e.includePrerelease?A.GTE0PRE:A.GTE0],"")),po=r=>(e,t,n,s,i,a,l,c,o,u,h,v,m)=>(x(n)?t="":x(s)?t=`>=${n}.0.0${r?"-0":""}`:x(i)?t=`>=${n}.${s}.0${r?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,x(o)?c="":x(u)?c=`<${+o+1}.0.0-0`:x(h)?c=`<${o}.${+u+1}.0-0`:v?c=`<=${o}.${u}.${h}-${v}`:r?c=`<${o}.${u}.${+h+1}-0`:c=`<=${c}`,`${t} ${c}`.trim()),mo=(r,e,t)=>{for(let n=0;n<r.length;n++)if(!r[n].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let n=0;n<r.length;n++)if(O(r[n].semver),r[n].semver!==$t.ANY&&r[n].semver.prerelease.length>0){let s=r[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}});var Te=f((Cc,Sn)=>{var Fe=Symbol("SemVer ANY"),de=class{static get ANY(){return Fe}constructor(e,t){if(t=go(t),e instanceof de){if(e.loose===!!t.loose)return e;e=e.value}At("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Fe?this.value="":this.value=this.operator+this.semver.version,At("comp",this)}parse(e){let t=this.options.loose?En[bn.COMPARATORLOOSE]:En[bn.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new wn(n[2],this.options.loose):this.semver=Fe}toString(){return this.value}test(e){if(At("Comparator.test",e,this.options.loose),this.semver===Fe||e===Fe)return!0;if(typeof e=="string")try{e=new wn(e,this.options)}catch{return!1}return It(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof de))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new On(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new On(this.value,t).test(e.semver);let n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),i=this.semver.version===e.semver.version,a=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),l=It(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),c=It(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||s||i&&a||l||c}};Sn.exports=de;var go=qe(),{re:En,t:bn}=re(),It=wt(),At=Ne(),wn=R(),On=T()});var He=f((Rc,Cn)=>{var vo=T(),_o=(r,e,t)=>{try{e=new vo(e,t)}catch{return!1}return e.test(r)};Cn.exports=_o});var $n=f(($c,Rn)=>{var yo=T(),Eo=(r,e)=>new yo(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));Rn.exports=Eo});var An=f((Ic,In)=>{var bo=R(),wo=T(),Oo=(r,e,t)=>{let n=null,s=null,i=null;try{i=new wo(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===-1)&&(n=a,s=new bo(n,t))}),n};In.exports=Oo});var Dn=f((Ac,xn)=>{var So=R(),Co=T(),Ro=(r,e,t)=>{let n=null,s=null,i=null;try{i=new Co(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===1)&&(n=a,s=new So(n,t))}),n};xn.exports=Ro});var jn=f((xc,qn)=>{var xt=R(),$o=T(),Nn=je(),Io=(r,e)=>{r=new $o(r,e);let t=new xt("0.0.0");if(r.test(t)||(t=new xt("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n<r.set.length;++n){let s=r.set[n],i=null;s.forEach(a=>{let l=new xt(a.semver.version);switch(a.operator){case">":l.prerelease.length===0?l.patch++:l.prerelease.push(0),l.raw=l.format();case"":case">=":(!i||Nn(l,i))&&(i=l);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),i&&(!t||Nn(t,i))&&(t=i)}return t&&r.test(t)?t:null};qn.exports=Io});var Pn=f((Dc,Ln)=>{var Ao=T(),xo=(r,e)=>{try{return new Ao(r,e).range||"*"}catch{return null}};Ln.exports=xo});var at=f((Nc,Mn)=>{var Do=R(),Hn=Te(),{ANY:No}=Hn,qo=T(),jo=He(),Tn=je(),Fn=tt(),Lo=nt(),Po=rt(),To=(r,e,t,n)=>{r=new Do(r,n),e=new qo(e,n);let s,i,a,l,c;switch(t){case">":s=Tn,i=Lo,a=Fn,l=">",c=">=";break;case"<":s=Fn,i=Po,a=Tn,l="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(jo(r,e,n))return!1;for(let o=0;o<e.set.length;++o){let u=e.set[o],h=null,v=null;if(u.forEach(m=>{m.semver===No&&(m=new Hn(">=0.0.0")),h=h||m,v=v||m,s(m.semver,h.semver,n)?h=m:a(m.semver,v.semver,n)&&(v=m)}),h.operator===l||h.operator===c||(!v.operator||v.operator===l)&&i(r,v.semver))return!1;if(v.operator===c&&a(r,v.semver))return!1}return!0};Mn.exports=To});var Vn=f((qc,Gn)=>{var Fo=at(),Ho=(r,e,t)=>Fo(r,e,">",t);Gn.exports=Ho});var Un=f((jc,kn)=>{var Mo=at(),Go=(r,e,t)=>Mo(r,e,"<",t);kn.exports=Go});var Bn=f((Lc,Xn)=>{var zn=T(),Vo=(r,e,t)=>(r=new zn(r,t),e=new zn(e,t),r.intersects(e));Xn.exports=Vo});var Yn=f((Pc,Wn)=>{var ko=He(),Uo=P();Wn.exports=(r,e,t)=>{let n=[],s=null,i=null,a=r.sort((u,h)=>Uo(u,h,t));for(let u of a)ko(u,e,t)?(i=u,s||(s=u)):(i&&n.push([s,i]),i=null,s=null);s&&n.push([s,null]);let l=[];for(let[u,h]of n)u===h?l.push(u):!h&&u===a[0]?l.push("*"):h?u===a[0]?l.push(`<=${h}`):l.push(`${u} - ${h}`):l.push(`>=${u}`);let c=l.join(" || "),o=typeof e.raw=="string"?e.raw:String(e);return c.length<o.length?c:e}});var ei=f((Tc,Kn)=>{var Jn=T(),lt=Te(),{ANY:Dt}=lt,Me=He(),Nt=P(),zo=(r,e,t={})=>{if(r===e)return!0;r=new Jn(r,t),e=new Jn(e,t);let n=!1;e:for(let s of r.set){for(let i of e.set){let a=Xo(s,i,t);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},Xo=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===Dt){if(e.length===1&&e[0].semver===Dt)return!0;t.includePrerelease?r=[new lt(">=0.0.0-0")]:r=[new lt(">=0.0.0")]}if(e.length===1&&e[0].semver===Dt){if(t.includePrerelease)return!0;e=[new lt(">=0.0.0")]}let n=new Set,s,i;for(let m of r)m.operator===">"||m.operator===">="?s=Zn(s,m,t):m.operator==="<"||m.operator==="<="?i=Qn(i,m,t):n.add(m.semver);if(n.size>1)return null;let a;if(s&&i){if(a=Nt(s.semver,i.semver,t),a>0)return null;if(a===0&&(s.operator!==">="||i.operator!=="<="))return null}for(let m of n){if(s&&!Me(m,String(s),t)||i&&!Me(m,String(i),t))return null;for(let K of e)if(!Me(m,String(K),t))return!1;return!0}let l,c,o,u,h=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1,v=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1;h&&h.prerelease.length===1&&i.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let m of e){if(u=u||m.operator===">"||m.operator===">=",o=o||m.operator==="<"||m.operator==="<=",s){if(v&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===v.major&&m.semver.minor===v.minor&&m.semver.patch===v.patch&&(v=!1),m.operator===">"||m.operator===">="){if(l=Zn(s,m,t),l===m&&l!==s)return!1}else if(s.operator===">="&&!Me(s.semver,String(m),t))return!1}if(i){if(h&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===h.major&&m.semver.minor===h.minor&&m.semver.patch===h.patch&&(h=!1),m.operator==="<"||m.operator==="<="){if(c=Qn(i,m,t),c===m&&c!==i)return!1}else if(i.operator==="<="&&!Me(i.semver,String(m),t))return!1}if(!m.operator&&(i||s)&&a!==0)return!1}return!(s&&o&&!i&&a!==0||i&&u&&!s&&a!==0||v||h)},Zn=(r,e,t)=>{if(!r)return e;let n=Nt(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},Qn=(r,e,t)=>{if(!r)return e;let n=Nt(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};Kn.exports=zo});var ri=f((Fc,ti)=>{var qt=re();ti.exports={re:qt.re,src:qt.src,tokens:qt.t,SEMVER_SPEC_VERSION:De().SEMVER_SPEC_VERSION,SemVer:R(),compareIdentifiers:Je().compareIdentifiers,rcompareIdentifiers:Je().rcompareIdentifiers,parse:ne(),valid:wr(),clean:Sr(),inc:$r(),diff:qr(),major:Lr(),minor:Tr(),patch:Hr(),prerelease:Gr(),compare:P(),rcompare:kr(),compareLoose:zr(),compareBuild:et(),sort:Yr(),rsort:Zr(),gt:je(),lt:tt(),eq:Ke(),neq:bt(),gte:rt(),lte:nt(),cmp:wt(),coerce:on(),Comparator:Te(),Range:T(),satisfies:He(),toComparators:$n(),maxSatisfying:An(),minSatisfying:Dn(),minVersion:jn(),validRange:Pn(),outside:at(),gtr:Vn(),ltr:Un(),intersects:Bn(),simplifyRange:Yn(),subset:ei()}});var z=f(L=>{"use strict";var Bo=L&&L.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Wo=L&&L.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Yo=L&&L.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Bo(e,r,t);return Wo(e,r),e},ni=L&&L.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(L,"__esModule",{value:!0});L.getCoreVersion=void 0;var ii=ni(require("path")),si=ni(require("fs")),jt=Yo(require("@serverless-devs/core")),Jo=ri(),oi=ii.default.join(jt.getRootHome(),"cache","core"),Lt=ii.default.join(oi,"package.json");function Zo(){if(si.default.existsSync(Lt)){var r=require("@serverless-devs/core/package.json").version,e=ai();return Jo.gt(e,r)?require(oi):jt}return jt}function ai(){return si.default.existsSync(Lt)?require(Lt).version:void 0}L.getCoreVersion=ai;L.default=Zo()});var ut=f(q=>{"use strict";var Qo=q&&q.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},Ko=q&&q.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},li=q&&q.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(q,"__esModule",{value:!0});q.handlerProfileFile=q.getConfig=q.setConfig=void 0;var ci=li(require("path")),Tt=li(z()),M=Tt.default.fse,ct=Tt.default.jsyaml,Pt=Tt.default.getRootHome;function ea(r){var e=hi();M.writeFileSync(e,ct.dump(r))}function ui(){var r=hi();if(!M.existsSync(r))return{};try{var e=ct.load(M.readFileSync(r,"utf8"))||{};return e}catch(t){throw t}}function hi(){var r=ci.default.join(Pt(),"set-config.yml");return M.existsSync(r)||M.createFileSync(r),r}function ta(r,e){var t=ui();t[r]=e,ea(t)}q.setConfig=ta;function ra(r,e){var t=ui();return t[r]||e}q.getConfig=ra;function na(r){return Qo(this,void 0,void 0,function(){var e,t,n,s,i,a,l;return Ko(this,function(c){switch(c.label){case 0:if(e=r.filePath||"set-config.yml",t=ci.default.join(Pt(),e),n=M.existsSync(t),s={},n)return[3,5];i=Pt(),c.label=1;case 1:return c.trys.push([1,2,,4]),M.statSync(i),[3,4];case 2:return a=c.sent(),[4,M.mkdirSync(i)];case 3:return c.sent(),[3,4];case 4:return[3,6];case 5:try{s=ct.load(M.readFileSync(t,"utf8"))||{}}catch(o){throw o}c.label=6;case 6:return r.read?[2,s]:(l=r.configKey||"",s[l]=r.data,[4,M.writeFileSync(t,ct.dump(s))]);case 7:return c.sent(),[2,s]}})})}q.handlerProfileFile=na});var fi=f((Gc,ia)=>{ia.exports={name:"@serverless-devs/s",version:"2.1.0",description:"Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",homepage:"https://www.serverless-devs.com",keywords:["serverless","alibaba","tencent","azure","baidu","huawei","google","function","faas","serverless-devs"],publishConfig:{access:"public",registry:"https://registry.npmjs.org"},license:"MIT",repository:{type:"git",url:"https://github.com/Serverless-Devs/Serverless-Devs"},bugs:{url:"https://github.com/Serverless-Devs/Serverless-Devs/issues"},scripts:{start:"npm run watch",prewatch:"rm -rf lib/* && cp -r ./src/daemon ./lib",watch:"tsc -w",test:"jest test/special-command.test",prebuild:"rm -rf lib/*",build:"tsc && cp -r ./src/daemon ./lib",postbuild:"./shell/postbuild.sh","test:cov":"jest --coverage",lint:"npm run typecheck && f2elint scan -i src",fix:"f2elint fix",typecheck:"npx tsc -p tsconfig.json --noEmit",update:"rm -rf yarn.lock && rm -rf package-lock.json && rm -rf node_modules && yarn",beta:"npm publish --tag=beta"},main:"./lib/index.js",bin:{s:"bin/s"},devDependencies:{"@serverless-devs/commander":"^6.0.0","@types/jest":"^27.4.0","@types/node":"^14.0.23","@typescript-eslint/eslint-plugin":"^4.14.1","@typescript-eslint/parser":"^4.14.1",ajv:"^8.10.0","babel-eslint":"^10.1.0",boxen:"^5.0.0",dotenv:"^10.0.0",esbuild:"^0.14.0",eslint:"^7.7.0","eslint-config-prettier":"^7.2.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2",husky:"^4.2.3",inquirer:"8.2.0","inquirer-autocomplete-prompt":"^1.3.0",jest:"^27.4.7","latest-version":"^5.1.0","lint-staged":"^10.0.8","os-locale":"5.0.0",prettier:"^2.2.1",semver:"^7.3.5","semver-diff":"^3.1.1","ts-jest":"^27.1.3","ts-node":"^9.1.1",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},dependencies:{"@serverless-devs/core":"latest"}}});var _e=f(g=>{"use strict";var sa=g&&g.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),oa=g&&g.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),aa=g&&g.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&sa(e,r,t);return oa(e,r),e},me=g&&g.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},ge=g&&g.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Ht=g&&g.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(g,"__esModule",{value:!0});g.specifyServiceHelp=g.getTempCommandStr=g.emoji=g.mark=g.replaceTemplate=g.replaceFun=g.getLang=g.printn=g.getFolderSize=g.getVersion=g.getPid=g.aiRequest=g.getCredentialWithAll=g.getCredentialWithExisted=g.getProcessArgv=g.bgRed=g.yellow=g.red=void 0;var la=Ht(require("path")),Ge=Ht(require("fs")),ca=Ht(require("os")),$=aa(z()),ua=ut(),pi=fi(),ve=$.default.colors,ha=$.default.got,fa=$.default.getMAC,pa=$.default.isDocker,da=$.default.isCiCdEnv,Y=$.default.lodash,di=$.default.publishHelp,ma=Y.get,ga=Y.trim,va=Y.assign,_a=Y.filter,mi=Y.includes,ya=Y.omit,Ea=Y.isPlainObject,ba=Y.isEmpty,wa=ve.underline,Oa=ve.bold;g.red=ve.hex("#fd5750");g.yellow=ve.hex("#F3F99D");g.bgRed=ve.hex("#000").bgHex("#fd5750");var Sa=function(){var r=process.env.serverless_devs_temp_argv;try{var e=JSON.parse(r),t=$.default.getGlobalArgs(e);return process.argv=process.argv.slice(0,2).concat(t._argsObj),va({},t,{noHelpArgv:process.argv.slice(0,2).concat(_a(t._argsObj,function(n){return!mi(["-h","--help"],n)}))})}catch{return{}}};g.getProcessArgv=Sa;var Ca=function(r){return me(void 0,void 0,void 0,function(){var e,t;return ge(this,function(n){switch(n.label){case 0:return[4,$.default.getCredentialAliasList()];case 1:return e=n.sent(),mi(e,r)?[4,$.default.getCredential(r)]:[3,3];case 2:return t=n.sent(),[2,t];case 3:return[2]}})})};g.getCredentialWithExisted=Ca;var Ra=function(){return me(void 0,void 0,void 0,function(){var r,e,t,n,s,i;return ge(this,function(a){switch(a.label){case 0:return[4,$.default.getCredentialAliasList()];case 1:if(r=a.sent(),!(r.length>0))return[3,6];e={},t=0,n=r,a.label=2;case 2:return t<n.length?(s=n[t],[4,$.default.getCredential(s)]):[3,5];case 3:i=a.sent(),e[i.Alias]=ya(i,"Alias"),a.label=4;case 4:return t++,[3,2];case 5:return[2,e];case 6:return[2]}})})};g.getCredentialWithAll=Ra;var $a=function(r,e){return e===void 0&&(e="unknow"),me(void 0,void 0,void 0,function(){var t,n,s,i;return ge(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t=(0,ua.getConfig)("analysis"),t!=="enable"?[2]:pa()||da()?[2]:[4,ha("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(e,"&code=TypeError&s=").concat(r),{timeout:2e3,json:!0})];case 1:return n=a.sent(),s=ma(n.body,"shorturl"),s&&console.log(`AI Tips:
16
+ You can try to solve the problem through: `.concat(ve.underline(s),`
17
+ `)),[3,3];case 2:return i=a.sent(),[3,3];case 3:return[2]}})})};g.aiRequest=$a;var Ia=function(){try{return fa().replace(/:/g,"")}catch{return"unknown"}};g.getPid=Ia;function Aa(){var r=(0,$.getCoreVersion)(),e=["".concat(pi.name,": ").concat(pi.version),r?"core: ".concat(r):void 0,"s-home: ".concat($.default.getRootHome()),"".concat(process.platform,"-").concat(process.arch),"node-".concat(process.version)];return e.filter(function(t){return t}).join(", ")}g.getVersion=Aa;function xa(r){return me(this,void 0,void 0,function(){function e(s){return me(this,void 0,void 0,function(){var i,a;return ge(this,function(l){switch(l.label){case 0:return i=Ge.default.lstatSync(s),typeof i!="object"?[2]:(t.set(i.ino,i.size),i.isDirectory()?(a=Ge.default.readdirSync(s),typeof a!="object"?[2]:[4,Promise.all(a.map(function(c){return e(la.default.join(s,c))}))]):[3,2]);case 1:l.sent(),l.label=2;case 2:return[2]}})})}var t,n;return ge(this,function(s){switch(s.label){case 0:return t=new Map,[4,e(r)];case 1:return s.sent(),n=Array.from(t.values()).reduce(function(i,a){return i+a},0),[2,n]}})})}g.getFolderSize=xa;function Da(r,e){e===void 0&&(e=" ");for(var t="",n=0;n<r;n++)t=t+e;return t}g.printn=Da;function Na(){return"en"}g.getLang=Na;function gi(r,e){var t=/\{\{(.*?)\}\}/g,n=r.match(t);if(n)for(var s=0;s<n.length;s++){var i=n[s].replace(/{{|}}/g,""),a=ga(i.split("|")[0]);e[a]&&(r=r.replace(n[s],e[a]))}return r}g.replaceFun=gi;function qa(r,e){r.forEach(function(t){if(Ge.default.existsSync(t)){var n=Ge.default.readFileSync(t,"utf-8"),s=gi(n,e);Ge.default.writeFileSync(t,s,"utf-8")}})}g.replaceTemplate=qa;function ja(r){if(!r)return r;var e=r.slice(-4);return"***********".concat(e)}g.mark=ja;function Ft(r,e){return ca.default.platform()==="win32"?e||"\u25C6":"".concat(r," ")}g.emoji=Ft;function vi(r,e){var t=r.length,n=new Array(e-t).fill(" ");return"".concat(r).concat(n.join("")," : ")}g.getTempCommandStr=vi;function La(r){return me(this,void 0,void 0,function(){var e,t,n,s,i,l,a,l;return ge(this,function(c){switch(c.label){case 0:return[4,$.default.getYamlContent(r)];case 1:if(e=c.sent(),console.log(`
18
+ `.concat(Ft("\u{1F680}")," ").concat(e.Name,"@").concat(e.Version,": ").concat(e.Description,`
19
+ `)),t=e.Commands,t){n=di.maxLen(t),s=[],i={};for(l in t)a=t[l],Ea(a)?s.push(di.helpInfo(a,wa(Oa(l)),n,4)):i[l]=a;if(s.length>0&&console.log(s.join(`
20
+ `)),!ba(i)){for(l in i)console.log(" ".concat(vi(l,n)," ").concat(i[l]));console.log("")}console.log(e.HomePage?" ".concat(Ft("\u{1F9ED}")," ").concat($.default.makeUnderLine("More information: "+e.HomePage)," ")+`
21
+ `:"")}return[2]}})})}g.specifyServiceHelp=La});var _i=f(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.default={clean_up_the_environment:"\u6E05\u7406\u73AF\u5883",display_help_for_command:"\u663E\u793A\u547D\u4EE4\u5E2E\u52A9",remove_components:"\u5220\u9664\u7EC4\u4EF6",delete_the_file_under_the_cache:"\u5220\u9664\u7F13\u5B58\u91CC\u7684\u7684<dirname>\u6587\u4EF6",record_your_log_information:"\u662F\u5426\u8BB0\u5F55\u60A8\u7684\u65E5\u5FD7\u4FE1\u606F\uFF1F",init_pproject_deploy_tip:"\u662F\u5426\u7ACB\u5373\u90E8\u7F72\u8BE5\u9879\u76EE\uFF1F",tip_for_a_serverless_project:"\u68C0\u6D4B\u5230\u5F53\u524D\u76EE\u5F55\u4E0B\u5DF2\u5B58\u5728\u4E00\u4E2AServerless-Devs\u9879\u76EE\uFF0C\u8BF7\u901A\u8FC7 's deploy' \u8FDB\u884C\u90E8\u7F72\u6216\u901A\u8FC7 's -h' \u83B7\u53D6\u66F4\u591A\u4FE1\u606F",create_a_new_project:"\u672A\u68C0\u6D4B\u5230 Serverless-Devs \u9879\u76EE\uFF0C\u662F\u5426\u65B0\u5EFA\u4E00\u4E2A\u9879\u76EE\uFF1F",en:"English (en)",zh:"\u4E2D\u6587 (zh)",select_current_language:"\u8BF7\u9009\u62E9\u5F53\u524D\u8BED\u8A00","app-tip":"\u8BF7\u9009\u62E9\u60A8\u5E0C\u671B\u521B\u5EFA\u7684 Serverless-Devs \u5E94\u7528","template-tip":"\u8BF7\u9009\u62E9\u60A8\u559C\u6B22\u7684\u6A21\u7248","fc-runtime-starter":"fc-runtime-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A FC \u51FD\u6570","fc-custom-container-stater":"fc-custom-container-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A custom-container \u5E94\u7528",web:"web-framework-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Web \u6846\u67B6","static-site":"static-website-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","best-practice":"serverless-best-practice - \u5FEB\u901F\u4F53\u9A8C Serverless \u6700\u4F73\u5B9E\u8DF5","devs-template":"Serverless Devs \u5F00\u53D1\u6A21\u677F","fc-http-nodejs":"fc-http-nodejs - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nodejs12 \u51FD\u6570","fc-http-python":"fc-http-python - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A python3 \u51FD\u6570","fc-http-java":"fc-http-java - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A java8 \u51FD\u6570","fc-custom-container-event-python3":"fc-custom-container-event-python3 - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 python3 \u5E94\u7528","fc-custom-container-event-cpp":"fc-custom-container-event-cpp - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 cpp \u5E94\u7528","fc-custom-container-http-springboot":"fc-custom-container-http-springboot - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 springboot \u5E94\u7528","fc-custom-container-http-aspdotnetcore":"fc-custom-container-http-aspdotnetcore - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 aspdotnetcore \u5E94\u7528","express-starter":"express-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A express \u57FA\u7840\u5E94\u7528","koa-starter":"koa-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A koa \u57FA\u7840\u5E94\u7528","nuxtjs-starter":"nuxtjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nuxtjs \u57FA\u7840\u5E94\u7528","eggjs-starter":"eggjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A eggjs \u57FA\u7840\u5E94\u7528","flask-starter":"flask-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A flask \u57FA\u7840\u5E94\u7528","SpringBoot-starter":"SpringBoot-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A SpringBoot \u57FA\u7840\u5E94\u7528","Zblog-starter":"Zblog-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Zblog \u57FA\u7840\u5E94\u7528","website-starter":"website-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","react-starter":"react-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A React.js \u5E94\u7528","vue-starter":"vue-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Vue.js \u5E94\u7528",puppeteer:"puppeteer - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E puppeteer \u622A\u56FE\u7684 Web \u5E94\u7528",ffmpeg:"ffmpeg - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E ffmpeg \u5B9E\u73B0\u97F3\u89C6\u9891\u5904\u7406\u5E94\u7528",pdf2Img:"pdf2Img - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A pdf \u8F6C\u56FE\u7247\u5E94\u7528",tensorflow:"tensorflow - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A tensorflow \u5E94\u7528",todoList:"todoList - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E nodejs \u7684\u7F51\u9875 TodoList \u5E94\u7528"}});var yi=f(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.default={clean_up_the_environment:"Clean up the environment",display_help_for_command:"Display help for command",remove_components:"Remove component (like: fc, fc@0.0.1)",delete_the_file_under_the_cache:"Delete the <dirname> file in the cache",record_your_log_information:"Do you record your log information?",init_pproject_deploy_tip:"Do you want to deploy the project immediately?",tip_for_a_serverless_project:"A Serverless-Devs project is detected in the current directory, please deploy via 's deploy' or get more information via 's -h'",create_a_new_project:"No Serverless-Devs project is currently detected. Do you want to create a new project?",en:"English (en)",zh:"Chinese (zh)",select_current_language:"Please select current language","app-tip":"Hello, serverlesser. Which template do you like?","template-tip":"Which template do you like?","fc-runtime-starter":"fc-runtime-starter - Deploy FC function in 5 minutes","fc-custom-container-stater":"fc-custom-container-stater - Deploy FC function with custom-container",web:"web-framework-stater-Quickly deploy a web framework","static-site":"static-website-stater-Quickly deploy a static website","best-practice":"serverless-best-practice-Quickly experience serverless best practices","devs-template":"Serverless Develop scaffold","fc-http-nodejs":"fc-http-nodejs - Deploy FC nodejs12 runtime function","fc-http-python":"fc-http-python - Deploy FC python3 runtime function","fc-http-java":"fc-http-java - Deploy FC java8 runtime function","fc-custom-container-event-python3":"fc-custom-container-event-python3 - Deploy python3 event-triggered application","fc-custom-container-event-cpp":"fc-custom-container-event-cpp - Deploy cpp event-triggered application","fc-custom-container-http-springboot":"fc-custom-container-http-springboot - Deploy springboot HTTP Request-triggered application","fc-custom-container-http-aspdotnetcore":"fc-custom-container-http-aspdotnetcore - Deploy dotnetcore HTTP Request-triggered application","express-starter":"express-starter - Deploy express application","koa-starter":"koa-starter - Deploy koa application","nuxtjs-starter":"nuxtjs-starter - Deploy nuxtjs application","eggjs-starter":"eggjs-starter - Deploy eggjs application","flask-starter":"flask-starter - Deploy flask application","SpringBoot-starter":"SpringBoot-starter - Deploy SpringBoot application","Zblog-starter":"Zblog-starter - Deploy Zblog application","website-starter":"website-starter - Deploy static website","react-starter":"react-starter - Deploy React.js application","vue-starter":"vue-starter - Deploy Vue.js application",puppeteer:"puppeteer - Deploy screenshot application base on puppeteer + fc",ffmpeg:"ffmpeg - Deploy audio and video processing application base on ffmpeg + fc",pdf2Img:"pdf2Img - Deploy pdf to images application",tensorflow:"tensorflow - Deploy tensorflow application",todoList:"todoList - Deploy todoList application"}});var kt=f(Ve=>{"use strict";var Ei=Ve&&Ve.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ve,"__esModule",{value:!0});var Pa=_e(),Ta=Ei(_i()),Fa=Ei(yi()),Vt={en:Fa.default,zh:Ta.default},Ha=function(r){var e=(0,Pa.getLang)(),t=Vt[e]?Vt[e][r]:Vt.en[r];return t||r};Ve.default=Ha});var ht=f(ke=>{"use strict";var Ma=ke&&ke.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ke,"__esModule",{value:!0});var Ga=Ma(z()),Va=Ga.default.Logger,Ut=new Va("S-CLI");Ut.success=function(r){return Ut.log(r,"green")};ke.default=Ut});var wi=f(I=>{"use strict";var ka=I&&I.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),bi=I&&I.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&ka(e,r,t)},zt=I&&I.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(I,"__esModule",{value:!0});I.registerCommandChecker=I.i18n=I.logger=void 0;var Ua=zt(ht());bi(_e(),I);bi(ut(),I);var za=ht();Object.defineProperty(I,"logger",{enumerable:!0,get:function(){return zt(za).default}});var Xa=kt();Object.defineProperty(I,"i18n",{enumerable:!0,get:function(){return zt(Xa).default}});function Ba(r){r.on("command:*",function(e){var t=r.commands.map(function(n){return n.name()});t.includes(e[0])||(Ua.default.error(" error: unknown command ".concat(e[0])),r.help())})}I.registerCommandChecker=Ba});var le=f(ye=>{"use strict";var Wa=ye&&ye.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ye,"__esModule",{value:!0});ye.ServerlessError=void 0;var Ya=Wa(z()),Ja=Ya.default.Logger,Za=new Ja("S-CLI-ERROR"),Qa=function(){function r(e,t,n){Za.error(e+": "+t,n),process.exit(1)}return r}();ye.ServerlessError=Qa});var Oi=f(Ee=>{"use strict";var Ka=Ee&&Ee.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.CommandError=void 0;var el=le(),tl=function(r){Ka(e,r);function e(t,n){return r.call(this,"Error",t,n)||this}return e}(el.ServerlessError);Ee.CommandError=tl});var Si=f(be=>{"use strict";var rl=be&&be.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(be,"__esModule",{value:!0});be.ConfigDeleteError=void 0;var nl=le(),il=function(r){rl(e,r);function e(t,n){return r.call(this,"Deletion failed",t,n)||this}return e}(nl.ServerlessError);be.ConfigDeleteError=il});var Ci=f(we=>{"use strict";var sl=we&&we.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(we,"__esModule",{value:!0});we.ConfigError=void 0;var ol=le(),al=function(r){sl(e,r);function e(t,n){return r.call(this,"Config failed",t,n)||this}return e}(ol.ServerlessError);we.ConfigError=al});var Ri=f(Oe=>{"use strict";var ll=Oe&&Oe.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Oe,"__esModule",{value:!0});Oe.ConfigGetError=void 0;var cl=le(),ul=function(r){ll(e,r);function e(t,n){return r.call(this,"Get failed",t,n)||this}return e}(cl.ServerlessError);Oe.ConfigGetError=ul});var $i=f(Se=>{"use strict";var hl=Se&&Se.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Se,"__esModule",{value:!0});Se.InitError=void 0;var fl=le(),pl=function(r){hl(e,r);function e(t,n){return r.call(this,"Initialization failed",t,n)||this}return e}(fl.ServerlessError);Se.InitError=pl});var Ai=f(G=>{"use strict";var dl=G&&G.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},ml=G&&G.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},gl=G&&G.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(G,"__esModule",{value:!0});G.HumanError=void 0;var Ii=gl(z()),vl=_e(),_l=Ii.default.colors,yl=function(){function r(e){var t=e.errorMessage,n=e.tips;this.errorMessage=t,console.log(`
22
22
  `.concat((0,vl.bgRed)("ERROR:"))),console.log("TypeError: ".concat(t,`
23
23
  `)),n&&console.log("".concat(_l.gray(n),`
24
- `))}return r.prototype.report=function(e){return dl(this,void 0,void 0,function(){var t;return ml(this,function(n){switch(n.label){case 0:return t=e.error,[4,$i.default.report({type:"jsError",content:"".concat(this.errorMessage,"||").concat(t.stack)})];case 1:return n.sent(),[2]}})})},r}();G.HumanError=yl});var xi=f(we=>{"use strict";var El=we&&we.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(we,"__esModule",{value:!0});we.HumanWarning=void 0;var bl=El(z()),Ai=bl.default.colors,wl=function(){function r(e){var t=e.warningMessage,n=e.tips;console.log(`
25
- `.concat(Ai.hex("#000").bgYellow("WARNING:"))),console.log("".concat(t,`
26
- `)),n&&console.log("".concat(Ai.gray(n),`
27
- `))}return r}();we.HumanWarning=wl});var Di=f(E=>{"use strict";var Ol=E&&E.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},Sl=E&&E.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Cl=E&&E.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(E,"__esModule",{value:!0});E.HandleError=E.HumanWarning=E.HumanError=E.ServerlessError=E.InitError=E.ConfigGetError=E.ConfigError=E.ConfigDeleteError=E.CommandError=void 0;var V=bi(),ke=Cl(z()),J=ke.default.colors,Rl=ke.default.report,Ut=ke.default.isDebugMode,$l=ke.default.makeUnderLine,zt=ke.default.isDocker,Il=wi();Object.defineProperty(E,"CommandError",{enumerable:!0,get:function(){return Il.CommandError}});var Al=Oi();Object.defineProperty(E,"ConfigDeleteError",{enumerable:!0,get:function(){return Al.ConfigDeleteError}});var xl=Si();Object.defineProperty(E,"ConfigError",{enumerable:!0,get:function(){return xl.ConfigError}});var Dl=Ci();Object.defineProperty(E,"ConfigGetError",{enumerable:!0,get:function(){return Dl.ConfigGetError}});var Nl=Ri();Object.defineProperty(E,"InitError",{enumerable:!0,get:function(){return Nl.InitError}});var ql=ae();Object.defineProperty(E,"ServerlessError",{enumerable:!0,get:function(){return ql.ServerlessError}});var jl=Ii();Object.defineProperty(E,"HumanError",{enumerable:!0,get:function(){return jl.HumanError}});var Ll=xi();Object.defineProperty(E,"HumanWarning",{enumerable:!0,get:function(){return Ll.HumanWarning}});function Xt(r,e){return"".concat(J.gray(r)).concat(J.gray.underline(e))}var Pl=function(r){return Ol(void 0,void 0,void 0,function(){var e,t,n,s,i,a,l,c;return Sl(this,function(o){switch(o.label){case 0:e="Message:",t={traceId:"",catchableError:!1},n=r,s=(0,V.getConfig)("analysis"),s!=="disable"&&(t.traceId="".concat((0,V.getPid)()).concat(Date.now())),i=r.message?r.message:"";try{a=JSON.parse(i)}catch{}return a&&a.tips?(l=a.message?"Message: ".concat(a.message,`
24
+ `))}return r.prototype.report=function(e){return dl(this,void 0,void 0,function(){var t;return ml(this,function(n){switch(n.label){case 0:return t=e.error,[4,Ii.default.report({type:"jsError",content:"".concat(this.errorMessage,"||").concat(t.stack)})];case 1:return n.sent(),[2]}})})},r}();G.HumanError=yl});var Di=f(Ce=>{"use strict";var El=Ce&&Ce.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.HumanWarning=void 0;var bl=El(z()),xi=bl.default.colors,wl=function(){function r(e){var t=e.warningMessage,n=e.tips;console.log(`
25
+ `.concat(xi.hex("#000").bgYellow("WARNING:"))),console.log("".concat(t,`
26
+ `)),n&&console.log("".concat(xi.gray(n),`
27
+ `))}return r}();Ce.HumanWarning=wl});var Ni=f(E=>{"use strict";var Ol=E&&E.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},Sl=E&&E.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Cl=E&&E.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(E,"__esModule",{value:!0});E.HandleError=E.HumanWarning=E.HumanError=E.ServerlessError=E.InitError=E.ConfigGetError=E.ConfigError=E.ConfigDeleteError=E.CommandError=void 0;var V=wi(),Ue=Cl(z()),J=Ue.default.colors,Rl=Ue.default.report,Xt=Ue.default.isDebugMode,$l=Ue.default.makeUnderLine,Bt=Ue.default.isDocker,Il=Oi();Object.defineProperty(E,"CommandError",{enumerable:!0,get:function(){return Il.CommandError}});var Al=Si();Object.defineProperty(E,"ConfigDeleteError",{enumerable:!0,get:function(){return Al.ConfigDeleteError}});var xl=Ci();Object.defineProperty(E,"ConfigError",{enumerable:!0,get:function(){return xl.ConfigError}});var Dl=Ri();Object.defineProperty(E,"ConfigGetError",{enumerable:!0,get:function(){return Dl.ConfigGetError}});var Nl=$i();Object.defineProperty(E,"InitError",{enumerable:!0,get:function(){return Nl.InitError}});var ql=le();Object.defineProperty(E,"ServerlessError",{enumerable:!0,get:function(){return ql.ServerlessError}});var jl=Ai();Object.defineProperty(E,"HumanError",{enumerable:!0,get:function(){return jl.HumanError}});var Ll=Di();Object.defineProperty(E,"HumanWarning",{enumerable:!0,get:function(){return Ll.HumanWarning}});function Wt(r,e){return"".concat(J.gray(r)).concat(J.gray.underline(e))}var Pl=function(r){return Ol(void 0,void 0,void 0,function(){var e,t,n,s,i,a,l,c;return Sl(this,function(o){switch(o.label){case 0:e="Message:",t={traceId:"",catchableError:!1},n=r,s=(0,V.getConfig)("analysis"),s!=="disable"&&(t.traceId="".concat((0,V.getPid)()).concat(Date.now())),i=r.message?r.message:"";try{a=JSON.parse(i)}catch{}return a&&a.tips?(l=a.message?"Message: ".concat(a.message,`
28
28
  `):"",c=a.tips?"* ".concat($l(a.tips.replace(/\n/,`
29
29
  * `))):"",V.logger.log(`
30
30
  `.concat(J.hex("#000").bgYellow("WARNING:"),`
31
31
  ======================
32
32
  `).concat(c,`
33
- `),"yellow"),Ut()?console.log(r.stack):console.log(J.grey(l)),t.catchableError=!0,n=a,[3,5]):[3,1];case 1:return a&&a.code?(console.log((0,V.red)("\u2716 ".concat(a.prefix||e,`
33
+ `),"yellow"),Xt()?console.log(r.stack):console.log(J.grey(l)),t.catchableError=!0,n=a,[3,5]):[3,1];case 1:return a&&a.code?(console.log((0,V.red)("\u2716 ".concat(a.prefix||e,`
34
34
  `))),console.log("".concat((0,V.bgRed)("ERROR:"),`
35
- `)),Ut()?console.log("".concat(a.stack,`
35
+ `)),Xt()?console.log("".concat(a.stack,`
36
36
  `)):console.log("".concat(a.message,`
37
37
  `)),[4,(0,V.aiRequest)(a.message)]):[3,3];case 2:return o.sent(),n=a,[3,5];case 3:return console.log((0,V.red)("\u2716 ".concat(e,`
38
38
  `))),console.log("".concat((0,V.bgRed)("ERROR:"),`
39
- `)),console.log(Ut()||zt()?r.stack:"".concat(i,`
40
- `)),[4,(0,V.aiRequest)(i)];case 4:o.sent(),o.label=5;case 5:return t.catchableError||(t.traceId&&console.log(J.gray("TraceId: ".concat(t.traceId))),zt()||(console.log(J.gray("Environment: ".concat((0,V.getVersion)()))),console.log(Xt("Documents: ","https://www.serverless-devs.com")),console.log(Xt("Discussions: ","https://github.com/Serverless-Devs/Serverless-Devs/discussions")),console.log(Xt("Issues: ",`https://github.com/Serverless-Devs/Serverless-Devs/issues
41
- `)),t.traceId&&console.log(J.gray("Please copy traceId: ".concat(t.traceId," and join Dingding group: 33947367 for consultation."))))),!zt()&&console.log(J.gray("You can run 's clean --all' to clean Serverless devs.")),t.traceId&&!t.catchableError?[4,Rl({type:"jsError",content:"".concat(n.message,"||").concat(n.stack),traceId:t.traceId})]:[3,7];case 6:o.sent(),o.label=7;case 7:return process.exit(n.code||1),[2]}})})};E.HandleError=Pl});var ji=exports&&exports.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},Li=exports&&exports.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Xe=exports&&exports.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0});var Tl=Xe(nr()),le=Xe(z()),Fl=Xe(Gt()),H=Xe(require("path")),Z=Xe(ht()),Ue=me(),Hl=ut(),ft=me(),Ml=Di(),Gl=le.default.minimist,Vl=le.default.getYamlContent,Q=le.default.fse,Pi=le.default.colors,kl=le.default.getRootHome,Ni=le.default.tableLayout,Ul=le.default.lodash,zl=Ul.replace,Xl=`Get details of installed components.
39
+ `)),console.log(Xt()||Bt()?r.stack:"".concat(i,`
40
+ `)),[4,(0,V.aiRequest)(i)];case 4:o.sent(),o.label=5;case 5:return t.catchableError||(t.traceId&&console.log(J.gray("TraceId: ".concat(t.traceId))),Bt()||(console.log(J.gray("Environment: ".concat((0,V.getVersion)()))),console.log(Wt("Documents: ","https://www.serverless-devs.com")),console.log(Wt("Discussions: ","https://github.com/Serverless-Devs/Serverless-Devs/discussions")),console.log(Wt("Issues: ",`https://github.com/Serverless-Devs/Serverless-Devs/issues
41
+ `)),t.traceId&&console.log(J.gray("Please copy traceId: ".concat(t.traceId," and join Dingding group: 33947367 for consultation."))))),!Bt()&&console.log(J.gray("You can run 's clean --all' to clean Serverless devs.")),t.traceId&&!t.catchableError?[4,Rl({type:"jsError",content:"".concat(n.message,"||").concat(n.stack),traceId:t.traceId})]:[3,7];case 6:o.sent(),o.label=7;case 7:return process.exit(n.code||1),[2]}})})};E.HandleError=Pl});var Li=exports&&exports.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},Pi=exports&&exports.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Be=exports&&exports.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0});var Tl=Be(sr()),Re=Be(z()),Fl=Be(kt()),H=Be(require("path")),Z=Be(ht()),ze=_e(),Hl=ut(),ft=_e(),Ml=Ni(),Gl=Re.default.minimist,Vl=Re.default.getYamlContent,Q=Re.default.fse,Ti=Re.default.colors,kl=Re.default.getRootHome,qi=Re.default.tableLayout,Ul=`Get details of installed components.
42
42
 
43
43
  Example:
44
44
  $ s component
45
45
  $ s component --component fc-api
46
46
 
47
- `.concat((0,ft.emoji)("\u{1F4D6}")," Document: ").concat(Pi.underline("https://github.com/Serverless-Devs/Serverless-Devs/tree/master/docs/zh/command/component.md")),Bl=Tl.default.name("s component").usage("[options]").option("--component [componentName]","Gets the specified component information (like: fc, fc@0.0.1)").helpOption("-h, --help",(0,Fl.default)("display_help_for_command")).description(Xl).addHelpCommand(!1).parse(process.argv);function ze(r){return ji(this,void 0,void 0,function(){var e;return Li(this,function(t){switch(t.label){case 0:return[4,Vl(H.default.join(r,"publish.yaml"))];case 1:return e=t.sent(),e&&e.Type==="Component"?(e.isComponent=!0,[2,e]):[2,{isComponent:!1}]}})})}function qi(r){new Ml.HumanWarning({warningMessage:"the [".concat(r.component,"] component was not found."),tips:"Please enter the command 's component' to view all components, Serverless Devs' Component document can refer to\uFF1A".concat(Pi.underline("https://github.com/Serverless-Devs/Serverless-Devs/blob/master/docs/zh/command/component.md"))})}(function(){return ji(void 0,void 0,void 0,function(){var r,e,t,n,s,i,a,l,X,c,o,u,h,m,w,g,N,w,K,N,S,Bt,pt,Be,dt,X,mt,Wt,We,gt,Yt,w,Oe,N,S,B,Se,w,S,N,Ce,w,S,N,Ce;return Li(this,function(b){switch(b.label){case 0:if(r=kl(),e=H.default.join(r,"components"),t=H.default.join(e,"devsapp.cn"),n=H.default.join(e,"github.com"),process.argv.length!==2)return[3,21];if(!Q.existsSync(t))return[3,12];s=Q.readdirSync(t),i=[{Component:"Component",Version:"Version",Size:"Size",Description:"Description"}],a=0,l=s,b.label=1;case 1:if(!(a<l.length))return[3,11];if(X=l[a],X!=="devsapp")return[3,7];c=H.default.join(t,X),o=Q.readdirSync(c),u=0,h=o,b.label=2;case 2:return u<h.length?(m=h[u],w=H.default.join(c,m),[4,ze(w)]):[3,6];case 3:return g=b.sent(),g.isComponent?[4,(0,Ue.getFolderSize)(w)]:[3,5];case 4:N=b.sent(),i.push({Component:"devsapp/".concat(m),Version:g.Version,Size:"".concat((N/1e3/1e3).toFixed(2)," MB"),Description:g.Description}),b.label=5;case 5:return u++,[3,2];case 6:return[3,10];case 7:return w=H.default.join(t,X),[4,ze(w)];case 8:return K=b.sent(),K.isComponent?[4,(0,Ue.getFolderSize)(w)]:[3,10];case 9:N=b.sent(),i.push({Component:K.Name,Version:K.Version,Size:"".concat((N/1e3/1e3).toFixed(2)," MB"),Description:K.Description}),b.label=10;case 10:return a++,[3,1];case 11:Z.default.log(`
47
+ `.concat((0,ft.emoji)("\u{1F4D6}")," Document: ").concat(Ti.underline("https://github.com/Serverless-Devs/Serverless-Devs/tree/master/docs/zh/command/component.md")),zl=Tl.default.name("s component").usage("[options]").option("--component [componentName]","Gets the specified component information (like: fc, fc@0.0.1)").helpOption("-h, --help",(0,Fl.default)("display_help_for_command")).description(Ul).addHelpCommand(!1).parse(process.argv);function Xe(r){return Li(this,void 0,void 0,function(){var e;return Pi(this,function(t){switch(t.label){case 0:return[4,Vl(H.default.join(r,"publish.yaml"))];case 1:return e=t.sent(),e&&e.Type==="Component"?(e.isComponent=!0,[2,e]):[2,{isComponent:!1}]}})})}function ji(r){new Ml.HumanWarning({warningMessage:"the [".concat(r.component,"] component was not found."),tips:"Please enter the command 's component' to view all components, Serverless Devs' Component document can refer to\uFF1A".concat(Ti.underline("https://github.com/Serverless-Devs/Serverless-Devs/blob/master/docs/zh/command/component.md"))})}(function(){return Li(void 0,void 0,void 0,function(){var r,e,t,n,s,i,a,l,X,c,o,u,h,v,w,m,D,w,K,D,S,Yt,pt,We,dt,X,mt,Jt,Ye,gt,Zt,w,$e,D,S,B,Ie,w,S,D,Ae,w,S,D,Ae;return Pi(this,function(b){switch(b.label){case 0:if(r=kl(),e=H.default.join(r,"components"),t=H.default.join(e,"devsapp.cn"),n=H.default.join(e,"github.com"),process.argv.length!==2)return[3,21];if(!Q.existsSync(t))return[3,12];s=Q.readdirSync(t),i=[{Component:"Component",Version:"Version",Size:"Size",Description:"Description"}],a=0,l=s,b.label=1;case 1:if(!(a<l.length))return[3,11];if(X=l[a],X!=="devsapp")return[3,7];c=H.default.join(t,X),o=Q.readdirSync(c),u=0,h=o,b.label=2;case 2:return u<h.length?(v=h[u],w=H.default.join(c,v),[4,Xe(w)]):[3,6];case 3:return m=b.sent(),m.isComponent?[4,(0,ze.getFolderSize)(w)]:[3,5];case 4:D=b.sent(),i.push({Component:"devsapp/".concat(v),Version:m.Version,Size:"".concat((D/1e3/1e3).toFixed(2)," MB"),Description:m.Description}),b.label=5;case 5:return u++,[3,2];case 6:return[3,10];case 7:return w=H.default.join(t,X),[4,Xe(w)];case 8:return K=b.sent(),K.isComponent?[4,(0,ze.getFolderSize)(w)]:[3,10];case 9:D=b.sent(),i.push({Component:K.Name,Version:K.Version,Size:"".concat((D/1e3/1e3).toFixed(2)," MB"),Description:K.Description}),b.label=10;case 10:return a++,[3,1];case 11:Z.default.log(`
48
48
  `.concat((0,ft.emoji)("\u{1F50E}"),` serverless registry [http://registry.devsapp.cn/simple]
49
- `)),S=new Ni(JSON.parse(JSON.stringify(i))),Z.default.log(S.toString()),b.label=12;case 12:if(!Q.existsSync(n))return[3,20];Bt=Q.readdirSync(n),pt=[{Component:"Component",Version:"Version",Size:"Size",Description:"Description"}],Be=0,dt=Bt,b.label=13;case 13:if(!(Be<dt.length))return[3,19];X=dt[Be],mt=H.default.join(n,X),Wt=Q.readdirSync(mt),We=0,gt=Wt,b.label=14;case 14:return We<gt.length?(Yt=gt[We],w=H.default.join(mt,Yt),[4,ze(w)]):[3,18];case 15:return Oe=b.sent(),Oe.isComponent?[4,(0,Ue.getFolderSize)(w)]:[3,17];case 16:N=b.sent(),pt.push({Component:"".concat(X,"/").concat(Oe.Name),Version:Oe.Version,Size:"".concat((N/1e3/1e3).toFixed(2)," MB"),Description:Oe.Description}),b.label=17;case 17:return We++,[3,14];case 18:return Be++,[3,13];case 19:Z.default.log("".concat((0,ft.emoji)("\u{1F50E}"),` github registry [https://api.github.com/repos]
50
- `)),S=new Ni(JSON.parse(JSON.stringify(pt))),Z.default.log(S.toString()),b.label=20;case 20:return[2];case 21:return process.argv.length>2?(B=Gl(process.argv.slice(2),{string:["component"]}),B.component?(Se=(0,Hl.getConfig)("registry","http://registry.devsapp.cn/simple"),Se!=="http://registry.devsapp.cn/simple"?[3,26]:(w=H.default.join(t,zl(B.component,"devsapp","")),Q.existsSync(w)?[4,ze(w)]:[3,25])):[3,32]):[3,32];case 22:return S=b.sent(),S.isComponent?[4,(0,Ue.getFolderSize)(w)]:[3,24];case 23:N=b.sent(),Ce={Component:S.Name,Reigstry:"serverless registry [".concat(Se,"]"),Version:S.Version,Size:"".concat((N/1e3/1e3).toFixed(2)," MB"),Description:S.Description,Path:w,Hompage:S.HomePage},Z.default.output(Ce),Z.default.log(`
51
- \u{1F64B} Delete the component, please use the command [s clean --component `.concat(B.component,"]")),b.label=24;case 24:return[3,26];case 25:qi(B),b.label=26;case 26:return Se!=="https://api.github.com/repos"?[3,31]:(w=H.default.join(n,B.component),Q.existsSync(w)?[4,ze(w)]:[3,30]);case 27:return S=b.sent(),S.isComponent?[4,(0,Ue.getFolderSize)(w)]:[3,29];case 28:N=b.sent(),Ce={Component:S.Name,Reigstry:"github registry [".concat(Se,"]"),Version:S.Version,Size:"".concat((N/1e3/1e3).toFixed(2)," MB"),Description:S.Description,Path:w,Hompage:S.HomePage},Z.default.output(Ce),Z.default.log(`
52
- `.concat((0,ft.emoji)("\u{1F64B}")," Delete the component, please use the command [s clean --component ").concat(B.component,"]")),b.label=29;case 29:return[3,31];case 30:qi(B),b.label=31;case 31:return[2];case 32:return Bl.help(),[2]}})})})();
49
+ `)),S=new qi(JSON.parse(JSON.stringify(i))),Z.default.log(S.toString()),b.label=12;case 12:if(!Q.existsSync(n))return[3,20];Yt=Q.readdirSync(n),pt=[{Component:"Component",Version:"Version",Size:"Size",Description:"Description"}],We=0,dt=Yt,b.label=13;case 13:if(!(We<dt.length))return[3,19];X=dt[We],mt=H.default.join(n,X),Jt=Q.readdirSync(mt),Ye=0,gt=Jt,b.label=14;case 14:return Ye<gt.length?(Zt=gt[Ye],w=H.default.join(mt,Zt),[4,Xe(w)]):[3,18];case 15:return $e=b.sent(),$e.isComponent?[4,(0,ze.getFolderSize)(w)]:[3,17];case 16:D=b.sent(),pt.push({Component:"".concat(X,"/").concat($e.Name),Version:$e.Version,Size:"".concat((D/1e3/1e3).toFixed(2)," MB"),Description:$e.Description}),b.label=17;case 17:return Ye++,[3,14];case 18:return We++,[3,13];case 19:Z.default.log("".concat((0,ft.emoji)("\u{1F50E}"),` github registry [https://api.github.com/repos]
50
+ `)),S=new qi(JSON.parse(JSON.stringify(pt))),Z.default.log(S.toString()),b.label=20;case 20:return[2];case 21:return process.argv.length>2?(B=Gl(process.argv.slice(2),{string:["component"]}),B.component?(Ie=(0,Hl.getConfig)("registry","http://registry.devsapp.cn/simple"),Ie!=="http://registry.devsapp.cn/simple"?[3,26]:(w=H.default.join(t,B.component),Q.existsSync(w)?[4,Xe(w)]:[3,25])):[3,32]):[3,32];case 22:return S=b.sent(),S.isComponent?[4,(0,ze.getFolderSize)(w)]:[3,24];case 23:D=b.sent(),Ae={Component:S.Name,Reigstry:"serverless registry [".concat(Ie,"]"),Version:S.Version,Size:"".concat((D/1e3/1e3).toFixed(2)," MB"),Description:S.Description,Path:w,Hompage:S.HomePage},Z.default.output(Ae),Z.default.log(`
51
+ \u{1F64B} Delete the component, please use the command [s clean --component `.concat(B.component,"]")),b.label=24;case 24:return[3,26];case 25:ji(B),b.label=26;case 26:return Ie!=="https://api.github.com/repos"?[3,31]:(w=H.default.join(n,B.component),Q.existsSync(w)?[4,Xe(w)]:[3,30]);case 27:return S=b.sent(),S.isComponent?[4,(0,ze.getFolderSize)(w)]:[3,29];case 28:D=b.sent(),Ae={Component:S.Name,Reigstry:"github registry [".concat(Ie,"]"),Version:S.Version,Size:"".concat((D/1e3/1e3).toFixed(2)," MB"),Description:S.Description,Path:w,Hompage:S.HomePage},Z.default.output(Ae),Z.default.log(`
52
+ `.concat((0,ft.emoji)("\u{1F64B}")," Delete the component, please use the command [s clean --component ").concat(B.component,"]")),b.label=29;case 29:return[3,31];case 30:ji(B),b.label=31;case 31:return[2];case 32:return zl.help(),[2]}})})})();