@serverless-devs/s 2.1.5 → 2.1.6-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -21
- package/OWNERS +33 -0
- package/bin/s-set-proxy +2 -0
- package/lib/check-node-version/index.js +15 -0
- package/lib/clean/index.js +23 -22
- package/lib/cli/index.js +23 -22
- package/lib/component/index.js +28 -27
- package/lib/config/add/index.js +24 -23
- package/lib/config/delete/index.js +26 -25
- package/lib/config/get/index.js +29 -28
- package/lib/config/index.js +15 -15
- package/lib/config/rename/index.js +25 -24
- package/lib/edit/index.js +23 -22
- package/lib/error/human-error.js +3 -2
- package/lib/error/index.js +7 -2
- package/lib/global-agent/index.js +22 -0
- package/lib/index.js +89 -83
- package/lib/init/index.js +55 -54
- package/lib/init/init-config.js +4 -4
- package/lib/init/init-manager.js +3 -3
- package/lib/set/analysis/index.js +28 -27
- package/lib/set/index.js +14 -14
- package/lib/set/locale/index.js +28 -27
- package/lib/set/proxy/index.js +49 -0
- package/lib/set/registry/index.js +28 -27
- package/lib/set/workspace/index.js +26 -25
- package/lib/update-notifier/index.js +18 -18
- package/lib/verify/index.js +27 -26
- package/package.json +4 -3
- package/readme.md +16 -5
- package/shell/postbuild.sh +1 -0
- package/CNAME +0 -1
package/lib/set/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";var m=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var lt=m((H,at)=>{var
|
|
1
|
+
"use strict";var m=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var lt=m((H,at)=>{var Ss=require("events").EventEmitter,Ne=require("child_process").spawn,j=require("path"),Le=require("fs"),re=class{constructor(e,t){this.flags=e,this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let s=ot(e);this.short=s.shortFlag,this.long=s.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 Is(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}},W=class extends Error{constructor(e,t,s){super(s),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},k=class extends Ss{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,s){let i=t,n=s;typeof i=="object"&&i!==null&&(n=i,i=null),n=n||{};let o=e.split(/ +/),l=this.createCommand(o.shift());return i&&(l.description(i),l._executableHandler=!0),n.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(n.noHelp||n.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=n.executableFile||null,this.commands.push(l),l._parseExpectedArgs(o),l.parent=this,i?this:l}createCommand(e){return new k(e)}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");function s(i){i.forEach(n=>{if(n._executableHandler&&!n._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${n.name()}`);s(n.commands)})}return s(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 s={required:!1,name:"",variadic:!1};switch(t[0]){case"<":s.required=!0,s.name=t.slice(1,-1);break;case"[":s.name=t.slice(1,-1);break}s.name.length>3&&s.name.slice(-3)==="..."&&(s.variadic=!0,s.name=s.name.slice(0,-3)),s.name&&this._args.push(s)}),this._args.forEach((t,s)=>{if(t.variadic&&s<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,s){this._exitCallback&&this._exitCallback(new W(e,t,s)),process.exit(e)}action(e){let t=s=>{let i=this._args.length,n=s.slice(0,i);this._passCommandToAction?n[i]=this:n[i]=this.opts(),s.length>i&&n.push(s.slice(i));let o=e.apply(this,n),l=this;for(;l.parent;)l=l.parent;l._actionResults.push(o)};return this._actionHandler=t,this}_checkForOptionNameClash(e){if(!this._storeOptionsAsProperties||this._storeOptionsAsPropertiesCalled||e.name()==="help"||this._getOptionValue(e.attributeName())===void 0)return;let s=!0;if(e.negate){let i=e.long.replace(/^--no-/,"--");s=!this._findOption(i)}else if(e.long){let i=e.long.replace(/^--/,"--no-");s=!this._findOption(i)}if(s)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,i,
|
|
6
|
+
Read more on https://git.io/JJc0W`)}_optionEx(e,t,s,i,n){let o=new re(t,s),l=o.name(),c=o.attributeName();if(o.mandatory=!!e.mandatory,this._checkForOptionNameClash(o),typeof i!="function")if(i instanceof RegExp){let a=i;i=(u,h)=>{let v=a.exec(u);return v?v[0]:h}}else n=i,i=null;if(o.negate||o.optional||o.required||typeof n=="boolean"){if(o.negate){let a=o.long.replace(/^--no-/,"--");n=this._findOption(a)?this._getOptionValue(c):!0}n!==void 0&&(this._setOptionValue(c,n),o.defaultValue=n)}return this.options.push(o),this.on("option:"+l,a=>{let u=this._getOptionValue(c);a!==null&&i?a=i(a,u===void 0?n:u):a!==null&&o.variadic&&(u===n||!Array.isArray(u)?a=[a]:a=u.concat(a)),typeof u=="boolean"||typeof u>"u"?a==null?this._setOptionValue(c,o.negate?!1:n||!0):this._setOptionValue(c,a):a!==null&&this._setOptionValue(c,o.negate?!1:a)}),this}option(e,t,s,i){return this._optionEx({},e,t,s,i)}requiredOption(e,t,s,i){return this._optionEx({mandatory:!0},e,t,s,i)}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 s;switch(t.from){case void 0:case"node":this._scriptPath=e[1],s=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],s=e.slice(2)):s=e.slice(1);break;case"user":s=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&&j.basename(this._scriptPath,j.extname(this._scriptPath)),this._parseCommand([],s),this}parseAsync(e,t){return this.parse(e,t),Promise.all(this._actionResults).then(()=>this)}_executeSubCommand(e,t){t=t.slice();let s=!1,i=[".js",".ts",".tsx",".mjs"];this._checkForMissingMandatoryOptions();let n=this._scriptPath;!n&&process.mainModule&&(n=process.mainModule.filename);let o;try{let v=Le.realpathSync(n);o=j.dirname(v)}catch{o="."}let l=j.basename(n,j.extname(n))+"-"+e._name;e._executableFile&&(l=e._executableFile);let c=j.join(o,l);Le.existsSync(c)?l=c:i.forEach(v=>{Le.existsSync(`${c}${v}`)&&(l=`${c}${v}`)}),s=i.includes(j.extname(l));let a;process.platform!=="win32"?s?(t.unshift(l),t=it(process.execArgv).concat(t),a=Ne(process.argv[0],t,{stdio:"inherit"})):a=Ne(l,t,{stdio:"inherit"}):(t.unshift(l),t=it(process.execArgv).concat(t),a=Ne(process.execPath,t,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(v=>{process.on(v,()=>{a.killed===!1&&a.exitCode===null&&a.kill(v)})});let h=this._exitCallback;h?a.on("close",()=>{h(new W(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):a.on("close",process.exit.bind(process)),a.on("error",v=>{if(v.code==="ENOENT"){let d=`'${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(d)}else if(v.code==="EACCES")throw new Error(`'${l}' not executable`);if(!h)process.exit(1);else{let d=new W(1,"commander.executeSubCommandAsync","(error)");d.nestedError=v,h(d)}}),this.runningCommand=a}_dispatchSubcommand(e,t,
|
|
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(
|
|
10
|
-
`)}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";let e=this.prepareCommands(),t=this.padWidth(),
|
|
8
|
+
- if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(d)}else if(v.code==="EACCES")throw new Error(`'${l}' not executable`);if(!h)process.exit(1);else{let d=new W(1,"commander.executeSubCommandAsync","(error)");d.nestedError=v,h(d)}}),this.runningCommand=a}_dispatchSubcommand(e,t,s){let i=this._findCommand(e);i||this._helpAndError(),i._executableHandler?this._executeSubCommand(i,t.concat(s)):i._parseCommand(t,s)}_parseCommand(e,t){let s=this.parseOptions(t);if(e=e.concat(s.operands),t=s.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)rt(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);else if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this._helpAndError(),rt(this,s.unknown),this._checkForMissingMandatoryOptions(),s.unknown.length>0&&this.unknownOption(s.unknown[0]),this._actionHandler){let i=this.args.slice();this._args.forEach((n,o)=>{n.required&&i[o]==null?this.missingArgument(n.name):n.variadic&&(i[o]=i.splice(o))}),this._actionHandler(i),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=[],s=[],i=t,n=e.slice();function o(c){return c.length>1&&c[0]==="-"}let l=null;for(;n.length;){let c=n.shift();if(c==="--"){i===s&&i.push(c),i.push(...n);break}if(l&&!o(c)){this.emit(`option:${l.name()}`,c);continue}if(l=null,o(c)){let a=this._findOption(c);if(a){if(a.required){let u=n.shift();u===void 0&&this.optionMissingArgument(a),this.emit(`option:${a.name()}`,u)}else if(a.optional){let u=null;n.length>0&&!o(n[0])&&(u=n.shift()),this.emit(`option:${a.name()}`,u)}else this.emit(`option:${a.name()}`);l=a.variadic?a:null;continue}}if(c.length>2&&c[0]==="-"&&c[1]!=="-"){let a=this._findOption(`-${c[1]}`);if(a){a.required||a.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${a.name()}`,c.slice(2)):(this.emit(`option:${a.name()}`),n.unshift(`-${c.slice(2)}`));continue}}if(/^--[^=]+=/.test(c)){let a=c.indexOf("="),u=this._findOption(c.slice(0,a));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,c.slice(a+1));continue}}c.length>1&&c[0]==="-"&&(i=s),i.push(c)}return{operands:t,unknown:s}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let s=0;s<t;s++){let i=this.options[s].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}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 s;t?s=`error: option '${e.flags}' argument missing, got '${t}'`:s=`error: option '${e.flags}' argument missing`,console.error(s),this._exit(1,"commander.optionMissingArgument",s)}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 i=this.parent;i;i=i.parent)e.unshift(i.name());let t=e.join(" "),s=`error: unknown command '${this.args[0]}'.`+(this._hasHelpOption?` See '${t} ${this._helpLongFlag}'.`:"");console.error(s),this._exit(1,"commander.unknownCommand",s)}version(e,t,s){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",s=s||"output the version number";let i=new re(t,s);return this._versionOptionName=i.attributeName(),this.options.push(i),this.on("option:"+i.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(s=>st(s));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 s=t._args.map(i=>st(i)).join(" ");return[t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(s?" "+s:""),t._description]});return this._lazyHasImplicitHelpCommand()&&e.push([this._helpCommandnameAndArgs,this._helpCommandDescription]),e}largestCommandLength(){return this.prepareCommands().reduce((t,s)=>Math.max(t,s[0].length),0)}largestOptionLength(){let e=[].slice.call(this.options);return e.push({flags:this._helpFlags}),e.reduce((t,s)=>Math.max(t,s.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(),s=(process.stdout.columns||80)-e-4;function i(c,a){return qe(c,e)+" "+tt(a,s,e+2)}let n=this.options.map(c=>{let a=c.description+(!c.negate&&c.defaultValue!==void 0?" (default: "+JSON.stringify(c.defaultValue)+")":"");return i(c.flags,a)}),o=this._hasHelpOption&&this._helpShortFlag&&!this._findOption(this._helpShortFlag),l=this._hasHelpOption&&!this._findOption(this._helpLongFlag);if(o||l){let c=this._helpFlags;o?l||(c=this._helpShortFlag):c=this._helpLongFlag,n.push(i(c,this._helpDescription))}return n.join(`
|
|
10
|
+
`)}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";let e=this.prepareCommands(),t=this.padWidth(),i=(process.stdout.columns||80)-t-4;return["Commands:",e.map(n=>{let o=n[1]?" "+n[1]:"";return(o?qe(n[0],t):n[0])+tt(o,i,t+2)}).join(`
|
|
11
11
|
`).replace(/^/gm," "),""].join(`
|
|
12
|
-
`)}helpInformation(){if(this._name==="s")return"";let e=[];if(this._description){e=[this._description,""];let
|
|
13
|
-
`)}outputHelp(e){e||(e=
|
|
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 a=this.padWidth(),h=(process.stdout.columns||80)-a-5;e.push("Arguments:"),this._args.forEach(v=>{e.push(" "+qe(v.name,a)+" "+nt(c[v.name]||"",h,a+4))}),e.push("")}}let t=this._name;this._aliases[0]&&(t=t+"|"+this._aliases[0]);let s="";for(let c=this.parent;c;c=c.parent)s=c.name()+" "+s;let i=["Usage: "+s+t+" "+this.usage(),""],n=[],o=this.commandHelp();o&&(n=[o]);let l=[];return(this._hasHelpOption||this.options.length>0)&&(l=["Options:",""+this.optionHelp().replace(/^/gm," "),""]),i.concat(e).concat(l).concat(n).join(`
|
|
13
|
+
`)}outputHelp(e){e||(e=s=>s);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 s=ot(this._helpFlags);return this._helpShortFlag=s.shortFlag,this._helpLongFlag=s.longFlag,this}help(e){this.outputHelp(e),this._exit(process.exitCode||0,"commander.help","(outputHelp)")}_helpAndError(){this.outputHelp(),this._exit(1,"commander.help","(outputHelp)")}};H=at.exports=new k;H.program=H;H.Command=k;H.Option=re;H.CommanderError=W;function Is(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function qe(r,e){let t=Math.max(0,e-r.length);return r+Array(t+1).join(" ")}function nt(r,e,t){let s=new RegExp(".{1,"+(e-1)+"}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)","g");return(r.match(s)||[]).map((n,o)=>(n.slice(-1)===`
|
|
14
14
|
`&&(n=n.slice(0,n.length-1)),(o>0&&t?Array(t+1).join(" "):"")+n.trimRight())).join(`
|
|
15
|
-
`)}function tt(r,e,t){return r.match(/[\n]\s+/)||e<40?r:nt(r,e,t)}function rt(r,e){r._hasHelpOption&&e.find(i=>i===r._helpLongFlag||i===r._helpShortFlag)&&(r.outputHelp(),r._exit(0,"commander.helpDisplayed","(outputHelp)"))}function it(r){let e=r.name+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}function ot(r){let e,t,i=r.split(/[ |,]+/);return i.length>1&&!/^[[<]/.test(i[1])&&(e=i.shift()),t=i.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}function st(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,i="127.0.0.1",s="9229",n;return(n=e.match(/^(--inspect(-brk)?)$/))!==null?t=n[1]:(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=n[1],/^\d+$/.test(n[3])?s=n[3]:i=n[3]):(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=n[1],i=n[3],s=n[4]),t&&s!=="0"?`${t}=${i}:${parseInt(s)+1}`:e})}});var ie=m((Co,ut)=>{var Si="2.0.0",wi=Number.MAX_SAFE_INTEGER||9007199254740991,xi=16;ut.exports={SEMVER_SPEC_VERSION:Si,MAX_LENGTH:256,MAX_SAFE_INTEGER:wi,MAX_SAFE_COMPONENT_LENGTH:xi}});var se=m((No,ct)=>{var Ci=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};ct.exports=Ci});var G=m((D,ht)=>{var{MAX_SAFE_COMPONENT_LENGTH:Pe}=ie(),Ni=se();D=ht.exports={};var Li=D.re=[],f=D.src=[],p=D.t={},qi=0,E=(r,e,t)=>{let i=qi++;Ni(r,i,e),p[r]=i,f[i]=e,Li[i]=new RegExp(e,t?"g":void 0)};E("NUMERICIDENTIFIER","0|[1-9]\\d*");E("NUMERICIDENTIFIERLOOSE","[0-9]+");E("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");E("MAINVERSION",`(${f[p.NUMERICIDENTIFIER]})\\.(${f[p.NUMERICIDENTIFIER]})\\.(${f[p.NUMERICIDENTIFIER]})`);E("MAINVERSIONLOOSE",`(${f[p.NUMERICIDENTIFIERLOOSE]})\\.(${f[p.NUMERICIDENTIFIERLOOSE]})\\.(${f[p.NUMERICIDENTIFIERLOOSE]})`);E("PRERELEASEIDENTIFIER",`(?:${f[p.NUMERICIDENTIFIER]}|${f[p.NONNUMERICIDENTIFIER]})`);E("PRERELEASEIDENTIFIERLOOSE",`(?:${f[p.NUMERICIDENTIFIERLOOSE]}|${f[p.NONNUMERICIDENTIFIER]})`);E("PRERELEASE",`(?:-(${f[p.PRERELEASEIDENTIFIER]}(?:\\.${f[p.PRERELEASEIDENTIFIER]})*))`);E("PRERELEASELOOSE",`(?:-?(${f[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${f[p.PRERELEASEIDENTIFIERLOOSE]})*))`);E("BUILDIDENTIFIER","[0-9A-Za-z-]+");E("BUILD",`(?:\\+(${f[p.BUILDIDENTIFIER]}(?:\\.${f[p.BUILDIDENTIFIER]})*))`);E("FULLPLAIN",`v?${f[p.MAINVERSION]}${f[p.PRERELEASE]}?${f[p.BUILD]}?`);E("FULL",`^${f[p.FULLPLAIN]}$`);E("LOOSEPLAIN",`[v=\\s]*${f[p.MAINVERSIONLOOSE]}${f[p.PRERELEASELOOSE]}?${f[p.BUILD]}?`);E("LOOSE",`^${f[p.LOOSEPLAIN]}$`);E("GTLT","((?:<|>)?=?)");E("XRANGEIDENTIFIERLOOSE",`${f[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);E("XRANGEIDENTIFIER",`${f[p.NUMERICIDENTIFIER]}|x|X|\\*`);E("XRANGEPLAIN",`[v=\\s]*(${f[p.XRANGEIDENTIFIER]})(?:\\.(${f[p.XRANGEIDENTIFIER]})(?:\\.(${f[p.XRANGEIDENTIFIER]})(?:${f[p.PRERELEASE]})?${f[p.BUILD]}?)?)?`);E("XRANGEPLAINLOOSE",`[v=\\s]*(${f[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${f[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${f[p.XRANGEIDENTIFIERLOOSE]})(?:${f[p.PRERELEASELOOSE]})?${f[p.BUILD]}?)?)?`);E("XRANGE",`^${f[p.GTLT]}\\s*${f[p.XRANGEPLAIN]}$`);E("XRANGELOOSE",`^${f[p.GTLT]}\\s*${f[p.XRANGEPLAINLOOSE]}$`);E("COERCE",`(^|[^\\d])(\\d{1,${Pe}})(?:\\.(\\d{1,${Pe}}))?(?:\\.(\\d{1,${Pe}}))?(?:$|[^\\d])`);E("COERCERTL",f[p.COERCE],!0);E("LONETILDE","(?:~>?)");E("TILDETRIM",`(\\s*)${f[p.LONETILDE]}\\s+`,!0);D.tildeTrimReplace="$1~";E("TILDE",`^${f[p.LONETILDE]}${f[p.XRANGEPLAIN]}$`);E("TILDELOOSE",`^${f[p.LONETILDE]}${f[p.XRANGEPLAINLOOSE]}$`);E("LONECARET","(?:\\^)");E("CARETTRIM",`(\\s*)${f[p.LONECARET]}\\s+`,!0);D.caretTrimReplace="$1^";E("CARET",`^${f[p.LONECARET]}${f[p.XRANGEPLAIN]}$`);E("CARETLOOSE",`^${f[p.LONECARET]}${f[p.XRANGEPLAINLOOSE]}$`);E("COMPARATORLOOSE",`^${f[p.GTLT]}\\s*(${f[p.LOOSEPLAIN]})$|^$`);E("COMPARATOR",`^${f[p.GTLT]}\\s*(${f[p.FULLPLAIN]})$|^$`);E("COMPARATORTRIM",`(\\s*)${f[p.GTLT]}\\s*(${f[p.LOOSEPLAIN]}|${f[p.XRANGEPLAIN]})`,!0);D.comparatorTrimReplace="$1$2$3";E("HYPHENRANGE",`^\\s*(${f[p.XRANGEPLAIN]})\\s+-\\s+(${f[p.XRANGEPLAIN]})\\s*$`);E("HYPHENRANGELOOSE",`^\\s*(${f[p.XRANGEPLAINLOOSE]})\\s+-\\s+(${f[p.XRANGEPLAINLOOSE]})\\s*$`);E("STAR","(<|>)?=?\\s*\\*");E("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");E("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var ne=m((Lo,ft)=>{var Ti=["includePrerelease","loose","rtl"],Pi=r=>r?typeof r!="object"?{loose:!0}:Ti.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};ft.exports=Pi});var ge=m((qo,dt)=>{var pt=/^[0-9]+$/,mt=(r,e)=>{let t=pt.test(r),i=pt.test(e);return t&&i&&(r=+r,e=+e),r===e?0:t&&!i?-1:i&&!t?1:r<e?-1:1},Di=(r,e)=>mt(e,r);dt.exports={compareIdentifiers:mt,rcompareIdentifiers:Di}});var $=m((To,_t)=>{var ve=se(),{MAX_LENGTH:gt,MAX_SAFE_INTEGER:Ee}=ie(),{re:vt,t:Et}=G(),Fi=ne(),{compareIdentifiers:z}=ge(),w=class{constructor(e,t){if(t=Fi(t),e instanceof w){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>gt)throw new TypeError(`version is longer than ${gt} characters`);ve("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?vt[Et.LOOSE]:vt[Et.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Ee||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ee||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ee||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let n=+s;if(n>=0&&n<Ee)return n}return s}):this.prerelease=[],this.build=i[5]?i[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(ve("SemVer.compare",this.version,this.options,e),!(e instanceof w)){if(typeof e=="string"&&e===this.version)return 0;e=new w(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof w||(e=new w(e,this.options)),z(this.major,e.major)||z(this.minor,e.minor)||z(this.patch,e.patch)}comparePre(e){if(e instanceof w||(e=new w(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 i=this.prerelease[t],s=e.prerelease[t];if(ve("prerelease compare",t,i,s),i===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(i===void 0)return-1;if(i===s)continue;return z(i,s)}while(++t)}compareBuild(e){e instanceof w||(e=new w(e,this.options));let t=0;do{let i=this.build[t],s=e.build[t];if(ve("prerelease compare",t,i,s),i===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(i===void 0)return-1;if(i===s)continue;return z(i,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 i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);i===-1&&this.prerelease.push(0)}t&&(z(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}};_t.exports=w});var V=m((Po,bt)=>{var{MAX_LENGTH:ji}=ie(),{re:yt,t:Ot}=G(),$t=$(),Hi=ne(),Gi=(r,e)=>{if(e=Hi(e),r instanceof $t)return r;if(typeof r!="string"||r.length>ji||!(e.loose?yt[Ot.LOOSE]:yt[Ot.FULL]).test(r))return null;try{return new $t(r,e)}catch{return null}};bt.exports=Gi});var Rt=m((Do,At)=>{var Vi=V(),Mi=(r,e)=>{let t=Vi(r,e);return t?t.version:null};At.exports=Mi});var St=m((Fo,It)=>{var Ui=V(),Xi=(r,e)=>{let t=Ui(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};It.exports=Xi});var Ct=m((jo,xt)=>{var wt=$(),Bi=(r,e,t,i)=>{typeof t=="string"&&(i=t,t=void 0);try{return new wt(r instanceof wt?r.version:r,t).inc(e,i).version}catch{return null}};xt.exports=Bi});var C=m((Ho,Lt)=>{var Nt=$(),Wi=(r,e,t)=>new Nt(r,t).compare(new Nt(e,t));Lt.exports=Wi});var _e=m((Go,qt)=>{var ki=C(),zi=(r,e,t)=>ki(r,e,t)===0;qt.exports=zi});var Dt=m((Vo,Pt)=>{var Tt=V(),Yi=_e(),Ji=(r,e)=>{if(Yi(r,e))return null;{let t=Tt(r),i=Tt(e),s=t.prerelease.length||i.prerelease.length,n=s?"pre":"",o=s?"prerelease":"";for(let l in t)if((l==="major"||l==="minor"||l==="patch")&&t[l]!==i[l])return n+l;return o}};Pt.exports=Ji});var jt=m((Mo,Ft)=>{var Zi=$(),Ki=(r,e)=>new Zi(r,e).major;Ft.exports=Ki});var Gt=m((Uo,Ht)=>{var Qi=$(),es=(r,e)=>new Qi(r,e).minor;Ht.exports=es});var Mt=m((Xo,Vt)=>{var ts=$(),rs=(r,e)=>new ts(r,e).patch;Vt.exports=rs});var Xt=m((Bo,Ut)=>{var is=V(),ss=(r,e)=>{let t=is(r,e);return t&&t.prerelease.length?t.prerelease:null};Ut.exports=ss});var Wt=m((Wo,Bt)=>{var ns=C(),os=(r,e,t)=>ns(e,r,t);Bt.exports=os});var zt=m((ko,kt)=>{var as=C(),ls=(r,e)=>as(r,e,!0);kt.exports=ls});var ye=m((zo,Jt)=>{var Yt=$(),us=(r,e,t)=>{let i=new Yt(r,t),s=new Yt(e,t);return i.compare(s)||i.compareBuild(s)};Jt.exports=us});var Kt=m((Yo,Zt)=>{var cs=ye(),hs=(r,e)=>r.sort((t,i)=>cs(t,i,e));Zt.exports=hs});var er=m((Jo,Qt)=>{var fs=ye(),ps=(r,e)=>r.sort((t,i)=>fs(i,t,e));Qt.exports=ps});var oe=m((Zo,tr)=>{var ms=C(),ds=(r,e,t)=>ms(r,e,t)>0;tr.exports=ds});var Oe=m((Ko,rr)=>{var gs=C(),vs=(r,e,t)=>gs(r,e,t)<0;rr.exports=vs});var De=m((Qo,ir)=>{var Es=C(),_s=(r,e,t)=>Es(r,e,t)!==0;ir.exports=_s});var $e=m((ea,sr)=>{var ys=C(),Os=(r,e,t)=>ys(r,e,t)>=0;sr.exports=Os});var be=m((ta,nr)=>{var $s=C(),bs=(r,e,t)=>$s(r,e,t)<=0;nr.exports=bs});var Fe=m((ra,or)=>{var As=_e(),Rs=De(),Is=oe(),Ss=$e(),ws=Oe(),xs=be(),Cs=(r,e,t,i)=>{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 As(r,t,i);case"!=":return Rs(r,t,i);case">":return Is(r,t,i);case">=":return Ss(r,t,i);case"<":return ws(r,t,i);case"<=":return xs(r,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};or.exports=Cs});var lr=m((ia,ar)=>{var Ns=$(),Ls=V(),{re:Ae,t:Re}=G(),qs=(r,e)=>{if(r instanceof Ns)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(Ae[Re.COERCE]);else{let i;for(;(i=Ae[Re.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||i.index+i[0].length!==t.index+t[0].length)&&(t=i),Ae[Re.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;Ae[Re.COERCERTL].lastIndex=-1}return t===null?null:Ls(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};ar.exports=qs});var cr=m((sa,ur)=>{"use strict";ur.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var fr=m((na,hr)=>{"use strict";hr.exports=_;_.Node=M;_.create=_;function _(r){var e=this;if(e instanceof _||(e=new _),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,i=arguments.length;t<i;t++)e.push(arguments[t]);return e}_.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};_.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++}};_.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++}};_.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)Ps(this,arguments[r]);return this.length};_.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)Ds(this,arguments[r]);return this.length};_.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}};_.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}};_.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,i=0;t!==null;i++)r.call(e,t.value,i,this),t=t.next};_.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,i=this.length-1;t!==null;i--)r.call(e,t.value,i,this),t=t.prev};_.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};_.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};_.prototype.map=function(r,e){e=e||this;for(var t=new _,i=this.head;i!==null;)t.push(r.call(e,i.value,this)),i=i.next;return t};_.prototype.mapReverse=function(r,e){e=e||this;for(var t=new _,i=this.tail;i!==null;)t.push(r.call(e,i.value,this)),i=i.prev;return t};_.prototype.reduce=function(r,e){var t,i=this.head;if(arguments.length>1)t=e;else if(this.head)i=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;i!==null;s++)t=r(t,i.value,s),i=i.next;return t};_.prototype.reduceReverse=function(r,e){var t,i=this.tail;if(arguments.length>1)t=e;else if(this.tail)i=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;i!==null;s--)t=r(t,i.value,s),i=i.prev;return t};_.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};_.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};_.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 _;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var i=0,s=this.head;s!==null&&i<r;i++)s=s.next;for(;s!==null&&i<e;i++,s=s.next)t.push(s.value);return t};_.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 _;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var i=this.length,s=this.tail;s!==null&&i>e;i--)s=s.prev;for(;s!==null&&i>r;i--,s=s.prev)t.push(s.value);return t};_.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var i=0,s=this.head;s!==null&&i<r;i++)s=s.next;for(var n=[],i=0;s&&i<e;i++)n.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var i=0;i<t.length;i++)s=Ts(this,s,t[i]);return n};_.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var i=t.prev;t.prev=t.next,t.next=i}return this.head=e,this.tail=r,this};function Ts(r,e,t){var i=e===r.head?new M(t,null,e,r):new M(t,e,e.next,r);return i.next===null&&(r.tail=i),i.prev===null&&(r.head=i),r.length++,i}function Ps(r,e){r.tail=new M(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function Ds(r,e){r.head=new M(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function M(r,e,t,i){if(!(this instanceof M))return new M(r,e,t,i);this.list=i,this.value=r,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}try{cr()(_)}catch{}});var vr=m((oa,gr)=>{"use strict";var Fs=fr(),U=Symbol("max"),P=Symbol("length"),Y=Symbol("lengthCalculator"),le=Symbol("allowStale"),X=Symbol("maxAge"),T=Symbol("dispose"),pr=Symbol("noDisposeOnSet"),O=Symbol("lruList"),L=Symbol("cache"),dr=Symbol("updateAgeOnGet"),je=()=>1,Ge=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[U]=e.max||1/0,i=e.length||je;if(this[Y]=typeof i!="function"?je:i,this[le]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[X]=e.maxAge||0,this[T]=e.dispose,this[pr]=e.noDisposeOnSet||!1,this[dr]=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[U]=e||1/0,ae(this)}get max(){return this[U]}set allowStale(e){this[le]=!!e}get allowStale(){return this[le]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[X]=e,ae(this)}get maxAge(){return this[X]}set lengthCalculator(e){typeof e!="function"&&(e=je),e!==this[Y]&&(this[Y]=e,this[P]=0,this[O].forEach(t=>{t.length=this[Y](t.value,t.key),this[P]+=t.length})),ae(this)}get lengthCalculator(){return this[Y]}get length(){return this[P]}get itemCount(){return this[O].length}rforEach(e,t){t=t||this;for(let i=this[O].tail;i!==null;){let s=i.prev;mr(this,e,i,t),i=s}}forEach(e,t){t=t||this;for(let i=this[O].head;i!==null;){let s=i.next;mr(this,e,i,t),i=s}}keys(){return this[O].toArray().map(e=>e.key)}values(){return this[O].toArray().map(e=>e.value)}reset(){this[T]&&this[O]&&this[O].length&&this[O].forEach(e=>this[T](e.key,e.value)),this[L]=new Map,this[O]=new Fs,this[P]=0}dump(){return this[O].map(e=>Ie(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[O]}set(e,t,i){if(i=i||this[X],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let s=i?Date.now():0,n=this[Y](t,e);if(this[L].has(e)){if(n>this[U])return J(this,this[L].get(e)),!1;let u=this[L].get(e).value;return this[T]&&(this[pr]||this[T](e,u.value)),u.now=s,u.maxAge=i,u.value=t,this[P]+=n-u.length,u.length=n,this.get(e),ae(this),!0}let o=new Ve(e,t,n,s,i);return o.length>this[U]?(this[T]&&this[T](e,t),!1):(this[P]+=o.length,this[O].unshift(o),this[L].set(e,this[O].head),ae(this),!0)}has(e){if(!this[L].has(e))return!1;let t=this[L].get(e).value;return!Ie(this,t)}get(e){return He(this,e,!0)}peek(e){return He(this,e,!1)}pop(){let e=this[O].tail;return e?(J(this,e),e.value):null}del(e){J(this,this[L].get(e))}load(e){this.reset();let t=Date.now();for(let i=e.length-1;i>=0;i--){let s=e[i],n=s.e||0;if(n===0)this.set(s.k,s.v);else{let o=n-t;o>0&&this.set(s.k,s.v,o)}}}prune(){this[L].forEach((e,t)=>He(this,t,!1))}},He=(r,e,t)=>{let i=r[L].get(e);if(i){let s=i.value;if(Ie(r,s)){if(J(r,i),!r[le])return}else t&&(r[dr]&&(i.value.now=Date.now()),r[O].unshiftNode(i));return s.value}},Ie=(r,e)=>{if(!e||!e.maxAge&&!r[X])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[X]&&t>r[X]},ae=r=>{if(r[P]>r[U])for(let e=r[O].tail;r[P]>r[U]&&e!==null;){let t=e.prev;J(r,e),e=t}},J=(r,e)=>{if(e){let t=e.value;r[T]&&r[T](t.key,t.value),r[P]-=t.length,r[L].delete(t.key),r[O].removeNode(e)}},Ve=class{constructor(e,t,i,s,n){this.key=e,this.value=t,this.length=i,this.now=s,this.maxAge=n||0}},mr=(r,e,t,i)=>{let s=t.value;Ie(r,s)&&(J(r,t),r[le]||(s=void 0)),s&&e.call(i,s.value,s.key,r)};gr.exports=Ge});var N=m((aa,Or)=>{var B=class{constructor(e,t){if(t=Hs(t),e instanceof B)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new B(e.raw,t);if(e instanceof Me)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(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(s=>!_r(s[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&Xs(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 i=`parseRange:${Object.keys(this.options).join(",")}:${e}`,s=Er.get(i);if(s)return s;let n=this.options.loose,o=n?I[b.HYPHENRANGELOOSE]:I[b.HYPHENRANGE];e=e.replace(o,en(this.options.includePrerelease)),y("hyphen replace",e),e=e.replace(I[b.COMPARATORTRIM],Vs),y("comparator trim",e),e=e.replace(I[b.TILDETRIM],Ms),e=e.replace(I[b.CARETTRIM],Us),e=e.split(/\s+/).join(" ");let l=e.split(" ").map(h=>Bs(h,this.options)).join(" ").split(/\s+/).map(h=>Qs(h,this.options));n&&(l=l.filter(h=>(y("loose invalid filter",h,this.options),!!h.match(I[b.COMPARATORLOOSE])))),y("range list",l);let u=new Map,a=l.map(h=>new Me(h,this.options));for(let h of a){if(_r(h))return[h];u.set(h.value,h)}u.size>1&&u.has("")&&u.delete("");let c=[...u.values()];return Er.set(i,c),c}intersects(e,t){if(!(e instanceof B))throw new TypeError("a Range is required");return this.set.some(i=>yr(i,t)&&e.set.some(s=>yr(s,t)&&i.every(n=>s.every(o=>n.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Gs(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(tn(this.set[t],e,this.options))return!0;return!1}};Or.exports=B;var js=vr(),Er=new js({max:1e3}),Hs=ne(),Me=ue(),y=se(),Gs=$(),{re:I,t:b,comparatorTrimReplace:Vs,tildeTrimReplace:Ms,caretTrimReplace:Us}=G(),_r=r=>r.value==="<0.0.0-0",Xs=r=>r.value==="",yr=(r,e)=>{let t=!0,i=r.slice(),s=i.pop();for(;t&&i.length;)t=i.every(n=>s.intersects(n,e)),s=i.pop();return t},Bs=(r,e)=>(y("comp",r,e),r=zs(r,e),y("caret",r),r=Ws(r,e),y("tildes",r),r=Js(r,e),y("xrange",r),r=Ks(r,e),y("stars",r),r),A=r=>!r||r.toLowerCase()==="x"||r==="*",Ws=(r,e)=>r.trim().split(/\s+/).map(t=>ks(t,e)).join(" "),ks=(r,e)=>{let t=e.loose?I[b.TILDELOOSE]:I[b.TILDE];return r.replace(t,(i,s,n,o,l)=>{y("tilde",r,i,s,n,o,l);let u;return A(s)?u="":A(n)?u=`>=${s}.0.0 <${+s+1}.0.0-0`:A(o)?u=`>=${s}.${n}.0 <${s}.${+n+1}.0-0`:l?(y("replaceTilde pr",l),u=`>=${s}.${n}.${o}-${l} <${s}.${+n+1}.0-0`):u=`>=${s}.${n}.${o} <${s}.${+n+1}.0-0`,y("tilde return",u),u})},zs=(r,e)=>r.trim().split(/\s+/).map(t=>Ys(t,e)).join(" "),Ys=(r,e)=>{y("caret",r,e);let t=e.loose?I[b.CARETLOOSE]:I[b.CARET],i=e.includePrerelease?"-0":"";return r.replace(t,(s,n,o,l,u)=>{y("caret",r,s,n,o,l,u);let a;return A(n)?a="":A(o)?a=`>=${n}.0.0${i} <${+n+1}.0.0-0`:A(l)?n==="0"?a=`>=${n}.${o}.0${i} <${n}.${+o+1}.0-0`:a=`>=${n}.${o}.0${i} <${+n+1}.0.0-0`:u?(y("replaceCaret pr",u),n==="0"?o==="0"?a=`>=${n}.${o}.${l}-${u} <${n}.${o}.${+l+1}-0`:a=`>=${n}.${o}.${l}-${u} <${n}.${+o+1}.0-0`:a=`>=${n}.${o}.${l}-${u} <${+n+1}.0.0-0`):(y("no pr"),n==="0"?o==="0"?a=`>=${n}.${o}.${l}${i} <${n}.${o}.${+l+1}-0`:a=`>=${n}.${o}.${l}${i} <${n}.${+o+1}.0-0`:a=`>=${n}.${o}.${l} <${+n+1}.0.0-0`),y("caret return",a),a})},Js=(r,e)=>(y("replaceXRanges",r,e),r.split(/\s+/).map(t=>Zs(t,e)).join(" ")),Zs=(r,e)=>{r=r.trim();let t=e.loose?I[b.XRANGELOOSE]:I[b.XRANGE];return r.replace(t,(i,s,n,o,l,u)=>{y("xRange",r,i,s,n,o,l,u);let a=A(n),c=a||A(o),h=c||A(l),v=h;return s==="="&&v&&(s=""),u=e.includePrerelease?"-0":"",a?s===">"||s==="<"?i="<0.0.0-0":i="*":s&&v?(c&&(o=0),l=0,s===">"?(s=">=",c?(n=+n+1,o=0,l=0):(o=+o+1,l=0)):s==="<="&&(s="<",c?n=+n+1:o=+o+1),s==="<"&&(u="-0"),i=`${s+n}.${o}.${l}${u}`):c?i=`>=${n}.0.0${u} <${+n+1}.0.0-0`:h&&(i=`>=${n}.${o}.0${u} <${n}.${+o+1}.0-0`),y("xRange return",i),i})},Ks=(r,e)=>(y("replaceStars",r,e),r.trim().replace(I[b.STAR],"")),Qs=(r,e)=>(y("replaceGTE0",r,e),r.trim().replace(I[e.includePrerelease?b.GTE0PRE:b.GTE0],"")),en=r=>(e,t,i,s,n,o,l,u,a,c,h,v,d)=>(A(i)?t="":A(s)?t=`>=${i}.0.0${r?"-0":""}`:A(n)?t=`>=${i}.${s}.0${r?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,A(a)?u="":A(c)?u=`<${+a+1}.0.0-0`:A(h)?u=`<${a}.${+c+1}.0-0`:v?u=`<=${a}.${c}.${h}-${v}`:r?u=`<${a}.${c}.${+h+1}-0`:u=`<=${u}`,`${t} ${u}`.trim()),tn=(r,e,t)=>{for(let i=0;i<r.length;i++)if(!r[i].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let i=0;i<r.length;i++)if(y(r[i].semver),r[i].semver!==Me.ANY&&r[i].semver.prerelease.length>0){let s=r[i].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}});var ue=m((la,Ir)=>{var ce=Symbol("SemVer ANY"),Z=class{static get ANY(){return ce}constructor(e,t){if(t=rn(t),e instanceof Z){if(e.loose===!!t.loose)return e;e=e.value}Xe("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ce?this.value="":this.value=this.operator+this.semver.version,Xe("comp",this)}parse(e){let t=this.options.loose?$r[br.COMPARATORLOOSE]:$r[br.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new Ar(i[2],this.options.loose):this.semver=ce}toString(){return this.value}test(e){if(Xe("Comparator.test",e,this.options.loose),this.semver===ce||e===ce)return!0;if(typeof e=="string")try{e=new Ar(e,this.options)}catch{return!1}return Ue(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Z))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Rr(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new Rr(this.value,t).test(e.semver);let i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),n=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),l=Ue(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),u=Ue(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||s||n&&o||l||u}};Ir.exports=Z;var rn=ne(),{re:$r,t:br}=G(),Ue=Fe(),Xe=se(),Ar=$(),Rr=N()});var he=m((ua,Sr)=>{var sn=N(),nn=(r,e,t)=>{try{e=new sn(e,t)}catch{return!1}return e.test(r)};Sr.exports=nn});var xr=m((ca,wr)=>{var on=N(),an=(r,e)=>new on(r,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));wr.exports=an});var Nr=m((ha,Cr)=>{var ln=$(),un=N(),cn=(r,e,t)=>{let i=null,s=null,n=null;try{n=new un(e,t)}catch{return null}return r.forEach(o=>{n.test(o)&&(!i||s.compare(o)===-1)&&(i=o,s=new ln(i,t))}),i};Cr.exports=cn});var qr=m((fa,Lr)=>{var hn=$(),fn=N(),pn=(r,e,t)=>{let i=null,s=null,n=null;try{n=new fn(e,t)}catch{return null}return r.forEach(o=>{n.test(o)&&(!i||s.compare(o)===1)&&(i=o,s=new hn(i,t))}),i};Lr.exports=pn});var Dr=m((pa,Pr)=>{var Be=$(),mn=N(),Tr=oe(),dn=(r,e)=>{r=new mn(r,e);let t=new Be("0.0.0");if(r.test(t)||(t=new Be("0.0.0-0"),r.test(t)))return t;t=null;for(let i=0;i<r.set.length;++i){let s=r.set[i],n=null;s.forEach(o=>{let l=new Be(o.semver.version);switch(o.operator){case">":l.prerelease.length===0?l.patch++:l.prerelease.push(0),l.raw=l.format();case"":case">=":(!n||Tr(l,n))&&(n=l);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),n&&(!t||Tr(t,n))&&(t=n)}return t&&r.test(t)?t:null};Pr.exports=dn});var jr=m((ma,Fr)=>{var gn=N(),vn=(r,e)=>{try{return new gn(r,e).range||"*"}catch{return null}};Fr.exports=vn});var Se=m((da,Mr)=>{var En=$(),Vr=ue(),{ANY:_n}=Vr,yn=N(),On=he(),Hr=oe(),Gr=Oe(),$n=be(),bn=$e(),An=(r,e,t,i)=>{r=new En(r,i),e=new yn(e,i);let s,n,o,l,u;switch(t){case">":s=Hr,n=$n,o=Gr,l=">",u=">=";break;case"<":s=Gr,n=bn,o=Hr,l="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(On(r,e,i))return!1;for(let a=0;a<e.set.length;++a){let c=e.set[a],h=null,v=null;if(c.forEach(d=>{d.semver===_n&&(d=new Vr(">=0.0.0")),h=h||d,v=v||d,s(d.semver,h.semver,i)?h=d:o(d.semver,v.semver,i)&&(v=d)}),h.operator===l||h.operator===u||(!v.operator||v.operator===l)&&n(r,v.semver))return!1;if(v.operator===u&&o(r,v.semver))return!1}return!0};Mr.exports=An});var Xr=m((ga,Ur)=>{var Rn=Se(),In=(r,e,t)=>Rn(r,e,">",t);Ur.exports=In});var Wr=m((va,Br)=>{var Sn=Se(),wn=(r,e,t)=>Sn(r,e,"<",t);Br.exports=wn});var Yr=m((Ea,zr)=>{var kr=N(),xn=(r,e,t)=>(r=new kr(r,t),e=new kr(e,t),r.intersects(e));zr.exports=xn});var Zr=m((_a,Jr)=>{var Cn=he(),Nn=C();Jr.exports=(r,e,t)=>{let i=[],s=null,n=null,o=r.sort((c,h)=>Nn(c,h,t));for(let c of o)Cn(c,e,t)?(n=c,s||(s=c)):(n&&i.push([s,n]),n=null,s=null);s&&i.push([s,null]);let l=[];for(let[c,h]of i)c===h?l.push(c):!h&&c===o[0]?l.push("*"):h?c===o[0]?l.push(`<=${h}`):l.push(`${c} - ${h}`):l.push(`>=${c}`);let u=l.join(" || "),a=typeof e.raw=="string"?e.raw:String(e);return u.length<a.length?u:e}});var ri=m((ya,ti)=>{var Kr=N(),we=ue(),{ANY:We}=we,fe=he(),ke=C(),Ln=(r,e,t={})=>{if(r===e)return!0;r=new Kr(r,t),e=new Kr(e,t);let i=!1;e:for(let s of r.set){for(let n of e.set){let o=qn(s,n,t);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},qn=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===We){if(e.length===1&&e[0].semver===We)return!0;t.includePrerelease?r=[new we(">=0.0.0-0")]:r=[new we(">=0.0.0")]}if(e.length===1&&e[0].semver===We){if(t.includePrerelease)return!0;e=[new we(">=0.0.0")]}let i=new Set,s,n;for(let d of r)d.operator===">"||d.operator===">="?s=Qr(s,d,t):d.operator==="<"||d.operator==="<="?n=ei(n,d,t):i.add(d.semver);if(i.size>1)return null;let o;if(s&&n){if(o=ke(s.semver,n.semver,t),o>0)return null;if(o===0&&(s.operator!==">="||n.operator!=="<="))return null}for(let d of i){if(s&&!fe(d,String(s),t)||n&&!fe(d,String(n),t))return null;for(let Ai of e)if(!fe(d,String(Ai),t))return!1;return!0}let l,u,a,c,h=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1,v=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1;h&&h.prerelease.length===1&&n.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let d of e){if(c=c||d.operator===">"||d.operator===">=",a=a||d.operator==="<"||d.operator==="<=",s){if(v&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===v.major&&d.semver.minor===v.minor&&d.semver.patch===v.patch&&(v=!1),d.operator===">"||d.operator===">="){if(l=Qr(s,d,t),l===d&&l!==s)return!1}else if(s.operator===">="&&!fe(s.semver,String(d),t))return!1}if(n){if(h&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===h.major&&d.semver.minor===h.minor&&d.semver.patch===h.patch&&(h=!1),d.operator==="<"||d.operator==="<="){if(u=ei(n,d,t),u===d&&u!==n)return!1}else if(n.operator==="<="&&!fe(n.semver,String(d),t))return!1}if(!d.operator&&(n||s)&&o!==0)return!1}return!(s&&a&&!n&&o!==0||n&&c&&!s&&o!==0||v||h)},Qr=(r,e,t)=>{if(!r)return e;let i=ke(r.semver,e.semver,t);return i>0?r:i<0||e.operator===">"&&r.operator===">="?e:r},ei=(r,e,t)=>{if(!r)return e;let i=ke(r.semver,e.semver,t);return i<0?r:i>0||e.operator==="<"&&r.operator==="<="?e:r};ti.exports=Ln});var si=m((Oa,ii)=>{var ze=G();ii.exports={re:ze.re,src:ze.src,tokens:ze.t,SEMVER_SPEC_VERSION:ie().SEMVER_SPEC_VERSION,SemVer:$(),compareIdentifiers:ge().compareIdentifiers,rcompareIdentifiers:ge().rcompareIdentifiers,parse:V(),valid:Rt(),clean:St(),inc:Ct(),diff:Dt(),major:jt(),minor:Gt(),patch:Mt(),prerelease:Xt(),compare:C(),rcompare:Wt(),compareLoose:zt(),compareBuild:ye(),sort:Kt(),rsort:er(),gt:oe(),lt:Oe(),eq:_e(),neq:De(),gte:$e(),lte:be(),cmp:Fe(),coerce:lr(),Comparator:ue(),Range:N(),satisfies:he(),toComparators:xr(),maxSatisfying:Nr(),minSatisfying:qr(),minVersion:Dr(),validRange:jr(),outside:Se(),gtr:Xr(),ltr:Wr(),intersects:Yr(),simplifyRange:Zr(),subset:ri()}});var pe=m(x=>{"use strict";var Tn=x&&x.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=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,i,s)}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),Pn=x&&x.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Dn=x&&x.__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)&&Tn(e,r,t);return Pn(e,r),e},ni=x&&x.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(x,"__esModule",{value:!0});x.getCoreVersion=void 0;var oi=ni(require("path")),ai=ni(require("fs")),Ye=Dn(require("@serverless-devs/core")),Fn=si(),li=oi.default.join(Ye.getRootHome(),"cache","core"),Je=oi.default.join(li,"package.json");function jn(){if(ai.default.existsSync(Je)){var r=require("@serverless-devs/core/package.json").version,e=ui();return Fn.gt(e,r)?require(li):Ye}return Ye}function ui(){return ai.default.existsSync(Je)?require(Je).version:void 0}x.getCoreVersion=ui;x.default=jn()});var mi=m(S=>{"use strict";var Hn=S&&S.__awaiter||function(r,e,t,i){function s(n){return n instanceof t?n:new t(function(o){o(n)})}return new(t||(t=Promise))(function(n,o){function l(c){try{a(i.next(c))}catch(h){o(h)}}function u(c){try{a(i.throw(c))}catch(h){o(h)}}function a(c){c.done?n(c.value):s(c.value).then(l,u)}a((i=i.apply(r,e||[])).next())})},Gn=S&&S.__generator||function(r,e){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,s,n,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(c){return u([a,c])}}function u(a){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,s&&(n=a[0]&2?s.return:a[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,a[1])).done)return n;switch(s=0,n&&(a=[a[0]&2,n.value]),a[0]){case 0:case 1:n=a;break;case 4:return t.label++,{value:a[1],done:!1};case 5:t.label++,s=a[1],a=[0];continue;case 7:a=t.ops.pop(),t.trys.pop();continue;default:if(n=t.trys,!(n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){t.label=a[1];break}if(a[0]===6&&t.label<n[1]){t.label=n[1],n=a;break}if(n&&t.label<n[2]){t.label=n[2],t.ops.push(a);break}n[2]&&t.ops.pop(),t.trys.pop();continue}a=e.call(r,t)}catch(c){a=[6,c],s=0}finally{i=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},ci=S&&S.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(S,"__esModule",{value:!0});S.handlerProfileFile=S.getConfig=S.setConfig=void 0;var hi=ci(require("path")),Ke=ci(pe()),q=Ke.default.fse,xe=Ke.default.jsyaml,Ze=Ke.default.getRootHome;function Vn(r){var e=pi();q.writeFileSync(e,xe.dump(r))}function fi(){var r=pi();if(!q.existsSync(r))return{};try{var e=xe.load(q.readFileSync(r,"utf8"))||{};return e}catch(t){throw t}}function pi(){var r=hi.default.join(Ze(),"set-config.yml");return q.existsSync(r)||q.createFileSync(r),r}function Mn(r,e){var t=fi();t[r]=e,Vn(t)}S.setConfig=Mn;function Un(r,e){var t=fi();return t[r]||e}S.getConfig=Un;function Xn(r){return Hn(this,void 0,void 0,function(){var e,t,i,s,n,o,l;return Gn(this,function(u){switch(u.label){case 0:if(e=r.filePath||"set-config.yml",t=hi.default.join(Ze(),e),i=q.existsSync(t),s={},i)return[3,5];n=Ze(),u.label=1;case 1:return u.trys.push([1,2,,4]),q.statSync(n),[3,4];case 2:return o=u.sent(),[4,q.mkdirSync(n)];case 3:return u.sent(),[3,4];case 4:return[3,6];case 5:try{s=xe.load(q.readFileSync(t,"utf8"))||{}}catch(a){throw a}u.label=6;case 6:return r.read?[2,s]:(l=r.configKey||"",s[l]=r.data,[4,q.writeFileSync(t,xe.dump(s))]);case 7:return u.sent(),[2,s]}})})}S.handlerProfileFile=Xn});var di=m(me=>{"use strict";var Bn=me&&me.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(me,"__esModule",{value:!0});var Wn=Bn(pe()),kn=Wn.default.Logger,Qe=new kn("S-CLI");Qe.success=function(r){return Qe.log(r,"green")};me.default=Qe});var gi=m((Ra,zn)=>{zn.exports={name:"@serverless-devs/s",version:"2.1.5",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",open:"^8.4.0","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","@serverless-devs/ui":"latest"}}});var $i=m(g=>{"use strict";var Yn=g&&g.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=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,i,s)}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),Jn=g&&g.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Zn=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)&&Yn(e,r,t);return Jn(e,r),e},Q=g&&g.__awaiter||function(r,e,t,i){function s(n){return n instanceof t?n:new t(function(o){o(n)})}return new(t||(t=Promise))(function(n,o){function l(c){try{a(i.next(c))}catch(h){o(h)}}function u(c){try{a(i.throw(c))}catch(h){o(h)}}function a(c){c.done?n(c.value):s(c.value).then(l,u)}a((i=i.apply(r,e||[])).next())})},ee=g&&g.__generator||function(r,e){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,s,n,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(c){return u([a,c])}}function u(a){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,s&&(n=a[0]&2?s.return:a[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,a[1])).done)return n;switch(s=0,n&&(a=[a[0]&2,n.value]),a[0]){case 0:case 1:n=a;break;case 4:return t.label++,{value:a[1],done:!1};case 5:t.label++,s=a[1],a=[0];continue;case 7:a=t.ops.pop(),t.trys.pop();continue;default:if(n=t.trys,!(n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){t.label=a[1];break}if(a[0]===6&&t.label<n[1]){t.label=n[1],n=a;break}if(n&&t.label<n[2]){t.label=n[2],t.ops.push(a);break}n[2]&&t.ops.pop(),t.trys.pop();continue}a=e.call(r,t)}catch(c){a=[6,c],s=0}finally{i=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Ce=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.aiRequest=g.getCredentialWithAll=g.getCredentialWithExisted=g.getProcessArgv=g.bgRed=g.yellow=g.red=void 0;var Kn=Ce(require("path")),de=Ce(require("fs")),Qn=Ce(require("os")),R=Zn(pe()),eo=mi(),K=Ce(di()),vi=gi(),te=R.default.colors,to=R.default.got,ro=R.default.isDocker,io=R.default.isCiCdEnv,F=R.default.lodash,Ei=R.default.publishHelp,so=F.get,no=F.trim,oo=F.assign,ao=F.filter,_i=F.includes,lo=F.omit,uo=F.isPlainObject,co=F.isEmpty,ho=te.underline,fo=te.bold;g.red=te.hex("#fd5750");g.yellow=te.hex("#F3F99D");g.bgRed=te.hex("#000").bgHex("#fd5750");var po=function(){var r=process.env.serverless_devs_temp_argv;try{var e=JSON.parse(r),t=R.default.getGlobalArgs(e);return process.argv=process.argv.slice(0,2).concat(t._argsObj),oo({},t,{noHelpArgv:process.argv.slice(0,2).concat(ao(t._argsObj,function(i){return!_i(["-h","--help"],i)}))})}catch{return{}}};g.getProcessArgv=po;var mo=function(r){return Q(void 0,void 0,void 0,function(){var e,t;return ee(this,function(i){switch(i.label){case 0:return[4,R.default.getCredentialAliasList()];case 1:return e=i.sent(),_i(e,r)?[4,R.default.getCredential(r)]:[3,3];case 2:return t=i.sent(),[2,t];case 3:return[2]}})})};g.getCredentialWithExisted=mo;var go=function(){return Q(void 0,void 0,void 0,function(){var r,e,t,i,s,n;return ee(this,function(o){switch(o.label){case 0:return[4,R.default.getCredentialAliasList()];case 1:if(r=o.sent(),!(r.length>0))return[3,6];e={},t=0,i=r,o.label=2;case 2:return t<i.length?(s=i[t],[4,R.default.getCredential(s)]):[3,5];case 3:n=o.sent(),e[n.Alias]=lo(n,"Alias"),o.label=4;case 4:return t++,[3,2];case 5:return[2,e];case 6:return[2]}})})};g.getCredentialWithAll=go;var vo=function(r,e){return e===void 0&&(e="unknow"),Q(void 0,void 0,void 0,function(){var t,i,s,n;return ee(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=(0,eo.getConfig)("analysis"),t!=="enable"?[2]:ro()||io()?[2]:[4,to("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(e,"&code=TypeError&s=").concat(r),{timeout:2e3,json:!0})];case 1:return i=o.sent(),s=so(i.body,"shorturl"),s&&K.default.log(`AI Tips:
|
|
16
|
-
You can try to solve the problem through: `.concat(te.underline(
|
|
17
|
-
`)),[3,3];case 2:return n=o.sent(),[3,3];case 3:return[2]}})})};g.aiRequest=
|
|
15
|
+
`)}function tt(r,e,t){return r.match(/[\n]\s+/)||e<40?r:nt(r,e,t)}function rt(r,e){r._hasHelpOption&&e.find(s=>s===r._helpLongFlag||s===r._helpShortFlag)&&(r.outputHelp(),r._exit(0,"commander.helpDisplayed","(outputHelp)"))}function st(r){let e=r.name+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}function ot(r){let e,t,s=r.split(/[ |,]+/);return s.length>1&&!/^[[<]/.test(s[1])&&(e=s.shift()),t=s.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}function it(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,s="127.0.0.1",i="9229",n;return(n=e.match(/^(--inspect(-brk)?)$/))!==null?t=n[1]:(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=n[1],/^\d+$/.test(n[3])?i=n[3]:s=n[3]):(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=n[1],s=n[3],i=n[4]),t&&i!=="0"?`${t}=${s}:${parseInt(i)+1}`:e})}});var se=m((ga,ct)=>{var ws="2.0.0",xs=Number.MAX_SAFE_INTEGER||9007199254740991,Cs=16;ct.exports={SEMVER_SPEC_VERSION:ws,MAX_LENGTH:256,MAX_SAFE_INTEGER:xs,MAX_SAFE_COMPONENT_LENGTH:Cs}});var ie=m((va,ut)=>{var Ns=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};ut.exports=Ns});var G=m((D,ht)=>{var{MAX_SAFE_COMPONENT_LENGTH:Te}=se(),Ls=ie();D=ht.exports={};var qs=D.re=[],f=D.src=[],p=D.t={},Ts=0,E=(r,e,t)=>{let s=Ts++;Ls(r,s,e),p[r]=s,f[s]=e,qs[s]=new RegExp(e,t?"g":void 0)};E("NUMERICIDENTIFIER","0|[1-9]\\d*");E("NUMERICIDENTIFIERLOOSE","[0-9]+");E("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");E("MAINVERSION",`(${f[p.NUMERICIDENTIFIER]})\\.(${f[p.NUMERICIDENTIFIER]})\\.(${f[p.NUMERICIDENTIFIER]})`);E("MAINVERSIONLOOSE",`(${f[p.NUMERICIDENTIFIERLOOSE]})\\.(${f[p.NUMERICIDENTIFIERLOOSE]})\\.(${f[p.NUMERICIDENTIFIERLOOSE]})`);E("PRERELEASEIDENTIFIER",`(?:${f[p.NUMERICIDENTIFIER]}|${f[p.NONNUMERICIDENTIFIER]})`);E("PRERELEASEIDENTIFIERLOOSE",`(?:${f[p.NUMERICIDENTIFIERLOOSE]}|${f[p.NONNUMERICIDENTIFIER]})`);E("PRERELEASE",`(?:-(${f[p.PRERELEASEIDENTIFIER]}(?:\\.${f[p.PRERELEASEIDENTIFIER]})*))`);E("PRERELEASELOOSE",`(?:-?(${f[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${f[p.PRERELEASEIDENTIFIERLOOSE]})*))`);E("BUILDIDENTIFIER","[0-9A-Za-z-]+");E("BUILD",`(?:\\+(${f[p.BUILDIDENTIFIER]}(?:\\.${f[p.BUILDIDENTIFIER]})*))`);E("FULLPLAIN",`v?${f[p.MAINVERSION]}${f[p.PRERELEASE]}?${f[p.BUILD]}?`);E("FULL",`^${f[p.FULLPLAIN]}$`);E("LOOSEPLAIN",`[v=\\s]*${f[p.MAINVERSIONLOOSE]}${f[p.PRERELEASELOOSE]}?${f[p.BUILD]}?`);E("LOOSE",`^${f[p.LOOSEPLAIN]}$`);E("GTLT","((?:<|>)?=?)");E("XRANGEIDENTIFIERLOOSE",`${f[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);E("XRANGEIDENTIFIER",`${f[p.NUMERICIDENTIFIER]}|x|X|\\*`);E("XRANGEPLAIN",`[v=\\s]*(${f[p.XRANGEIDENTIFIER]})(?:\\.(${f[p.XRANGEIDENTIFIER]})(?:\\.(${f[p.XRANGEIDENTIFIER]})(?:${f[p.PRERELEASE]})?${f[p.BUILD]}?)?)?`);E("XRANGEPLAINLOOSE",`[v=\\s]*(${f[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${f[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${f[p.XRANGEIDENTIFIERLOOSE]})(?:${f[p.PRERELEASELOOSE]})?${f[p.BUILD]}?)?)?`);E("XRANGE",`^${f[p.GTLT]}\\s*${f[p.XRANGEPLAIN]}$`);E("XRANGELOOSE",`^${f[p.GTLT]}\\s*${f[p.XRANGEPLAINLOOSE]}$`);E("COERCE",`(^|[^\\d])(\\d{1,${Te}})(?:\\.(\\d{1,${Te}}))?(?:\\.(\\d{1,${Te}}))?(?:$|[^\\d])`);E("COERCERTL",f[p.COERCE],!0);E("LONETILDE","(?:~>?)");E("TILDETRIM",`(\\s*)${f[p.LONETILDE]}\\s+`,!0);D.tildeTrimReplace="$1~";E("TILDE",`^${f[p.LONETILDE]}${f[p.XRANGEPLAIN]}$`);E("TILDELOOSE",`^${f[p.LONETILDE]}${f[p.XRANGEPLAINLOOSE]}$`);E("LONECARET","(?:\\^)");E("CARETTRIM",`(\\s*)${f[p.LONECARET]}\\s+`,!0);D.caretTrimReplace="$1^";E("CARET",`^${f[p.LONECARET]}${f[p.XRANGEPLAIN]}$`);E("CARETLOOSE",`^${f[p.LONECARET]}${f[p.XRANGEPLAINLOOSE]}$`);E("COMPARATORLOOSE",`^${f[p.GTLT]}\\s*(${f[p.LOOSEPLAIN]})$|^$`);E("COMPARATOR",`^${f[p.GTLT]}\\s*(${f[p.FULLPLAIN]})$|^$`);E("COMPARATORTRIM",`(\\s*)${f[p.GTLT]}\\s*(${f[p.LOOSEPLAIN]}|${f[p.XRANGEPLAIN]})`,!0);D.comparatorTrimReplace="$1$2$3";E("HYPHENRANGE",`^\\s*(${f[p.XRANGEPLAIN]})\\s+-\\s+(${f[p.XRANGEPLAIN]})\\s*$`);E("HYPHENRANGELOOSE",`^\\s*(${f[p.XRANGEPLAINLOOSE]})\\s+-\\s+(${f[p.XRANGEPLAINLOOSE]})\\s*$`);E("STAR","(<|>)?=?\\s*\\*");E("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");E("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var ne=m((Ea,ft)=>{var Ps=["includePrerelease","loose","rtl"],Ds=r=>r?typeof r!="object"?{loose:!0}:Ps.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};ft.exports=Ds});var Pe=m((_a,dt)=>{var pt=/^[0-9]+$/,mt=(r,e)=>{let t=pt.test(r),s=pt.test(e);return t&&s&&(r=+r,e=+e),r===e?0:t&&!s?-1:s&&!t?1:r<e?-1:1},Fs=(r,e)=>mt(e,r);dt.exports={compareIdentifiers:mt,rcompareIdentifiers:Fs}});var $=m((ya,_t)=>{var ve=ie(),{MAX_LENGTH:gt,MAX_SAFE_INTEGER:Ee}=se(),{re:vt,t:Et}=G(),js=ne(),{compareIdentifiers:z}=Pe(),w=class{constructor(e,t){if(t=js(t),e instanceof w){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>gt)throw new TypeError(`version is longer than ${gt} characters`);ve("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let s=e.trim().match(t.loose?vt[Et.LOOSE]:vt[Et.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>Ee||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ee||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ee||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<Ee)return n}return i}):this.prerelease=[],this.build=s[5]?s[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(ve("SemVer.compare",this.version,this.options,e),!(e instanceof w)){if(typeof e=="string"&&e===this.version)return 0;e=new w(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof w||(e=new w(e,this.options)),z(this.major,e.major)||z(this.minor,e.minor)||z(this.patch,e.patch)}comparePre(e){if(e instanceof w||(e=new w(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 s=this.prerelease[t],i=e.prerelease[t];if(ve("prerelease compare",t,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return z(s,i)}while(++t)}compareBuild(e){e instanceof w||(e=new w(e,this.options));let t=0;do{let s=this.build[t],i=e.build[t];if(ve("prerelease compare",t,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return z(s,i)}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 s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);s===-1&&this.prerelease.push(0)}t&&(z(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}};_t.exports=w});var V=m((Oa,bt)=>{var{MAX_LENGTH:Hs}=se(),{re:yt,t:Ot}=G(),$t=$(),Gs=ne(),Vs=(r,e)=>{if(e=Gs(e),r instanceof $t)return r;if(typeof r!="string"||r.length>Hs||!(e.loose?yt[Ot.LOOSE]:yt[Ot.FULL]).test(r))return null;try{return new $t(r,e)}catch{return null}};bt.exports=Vs});var Rt=m(($a,At)=>{var Ms=V(),Us=(r,e)=>{let t=Ms(r,e);return t?t.version:null};At.exports=Us});var It=m((ba,St)=>{var Xs=V(),Bs=(r,e)=>{let t=Xs(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};St.exports=Bs});var Ct=m((Aa,xt)=>{var wt=$(),Ws=(r,e,t,s)=>{typeof t=="string"&&(s=t,t=void 0);try{return new wt(r instanceof wt?r.version:r,t).inc(e,s).version}catch{return null}};xt.exports=Ws});var C=m((Ra,Lt)=>{var Nt=$(),ks=(r,e,t)=>new Nt(r,t).compare(new Nt(e,t));Lt.exports=ks});var _e=m((Sa,qt)=>{var zs=C(),Ys=(r,e,t)=>zs(r,e,t)===0;qt.exports=Ys});var Dt=m((Ia,Pt)=>{var Tt=V(),Js=_e(),Zs=(r,e)=>{if(Js(r,e))return null;{let t=Tt(r),s=Tt(e),i=t.prerelease.length||s.prerelease.length,n=i?"pre":"",o=i?"prerelease":"";for(let l in t)if((l==="major"||l==="minor"||l==="patch")&&t[l]!==s[l])return n+l;return o}};Pt.exports=Zs});var jt=m((wa,Ft)=>{var Ks=$(),Qs=(r,e)=>new Ks(r,e).major;Ft.exports=Qs});var Gt=m((xa,Ht)=>{var ei=$(),ti=(r,e)=>new ei(r,e).minor;Ht.exports=ti});var Mt=m((Ca,Vt)=>{var ri=$(),si=(r,e)=>new ri(r,e).patch;Vt.exports=si});var Xt=m((Na,Ut)=>{var ii=V(),ni=(r,e)=>{let t=ii(r,e);return t&&t.prerelease.length?t.prerelease:null};Ut.exports=ni});var Wt=m((La,Bt)=>{var oi=C(),ai=(r,e,t)=>oi(e,r,t);Bt.exports=ai});var zt=m((qa,kt)=>{var li=C(),ci=(r,e)=>li(r,e,!0);kt.exports=ci});var ye=m((Ta,Jt)=>{var Yt=$(),ui=(r,e,t)=>{let s=new Yt(r,t),i=new Yt(e,t);return s.compare(i)||s.compareBuild(i)};Jt.exports=ui});var Kt=m((Pa,Zt)=>{var hi=ye(),fi=(r,e)=>r.sort((t,s)=>hi(t,s,e));Zt.exports=fi});var er=m((Da,Qt)=>{var pi=ye(),mi=(r,e)=>r.sort((t,s)=>pi(s,t,e));Qt.exports=mi});var oe=m((Fa,tr)=>{var di=C(),gi=(r,e,t)=>di(r,e,t)>0;tr.exports=gi});var Oe=m((ja,rr)=>{var vi=C(),Ei=(r,e,t)=>vi(r,e,t)<0;rr.exports=Ei});var De=m((Ha,sr)=>{var _i=C(),yi=(r,e,t)=>_i(r,e,t)!==0;sr.exports=yi});var $e=m((Ga,ir)=>{var Oi=C(),$i=(r,e,t)=>Oi(r,e,t)>=0;ir.exports=$i});var be=m((Va,nr)=>{var bi=C(),Ai=(r,e,t)=>bi(r,e,t)<=0;nr.exports=Ai});var Fe=m((Ma,or)=>{var Ri=_e(),Si=De(),Ii=oe(),wi=$e(),xi=Oe(),Ci=be(),Ni=(r,e,t,s)=>{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 Ri(r,t,s);case"!=":return Si(r,t,s);case">":return Ii(r,t,s);case">=":return wi(r,t,s);case"<":return xi(r,t,s);case"<=":return Ci(r,t,s);default:throw new TypeError(`Invalid operator: ${e}`)}};or.exports=Ni});var lr=m((Ua,ar)=>{var Li=$(),qi=V(),{re:Ae,t:Re}=G(),Ti=(r,e)=>{if(r instanceof Li)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(Ae[Re.COERCE]);else{let s;for(;(s=Ae[Re.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||s.index+s[0].length!==t.index+t[0].length)&&(t=s),Ae[Re.COERCERTL].lastIndex=s.index+s[1].length+s[2].length;Ae[Re.COERCERTL].lastIndex=-1}return t===null?null:qi(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};ar.exports=Ti});var ur=m((Xa,cr)=>{"use strict";cr.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var fr=m((Ba,hr)=>{"use strict";hr.exports=_;_.Node=M;_.create=_;function _(r){var e=this;if(e instanceof _||(e=new _),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var t=0,s=arguments.length;t<s;t++)e.push(arguments[t]);return e}_.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};_.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++}};_.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++}};_.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)Di(this,arguments[r]);return this.length};_.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)Fi(this,arguments[r]);return this.length};_.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}};_.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}};_.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,s=0;t!==null;s++)r.call(e,t.value,s,this),t=t.next};_.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,s=this.length-1;t!==null;s--)r.call(e,t.value,s,this),t=t.prev};_.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};_.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};_.prototype.map=function(r,e){e=e||this;for(var t=new _,s=this.head;s!==null;)t.push(r.call(e,s.value,this)),s=s.next;return t};_.prototype.mapReverse=function(r,e){e=e||this;for(var t=new _,s=this.tail;s!==null;)t.push(r.call(e,s.value,this)),s=s.prev;return t};_.prototype.reduce=function(r,e){var t,s=this.head;if(arguments.length>1)t=e;else if(this.head)s=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;s!==null;i++)t=r(t,s.value,i),s=s.next;return t};_.prototype.reduceReverse=function(r,e){var t,s=this.tail;if(arguments.length>1)t=e;else if(this.tail)s=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;s!==null;i--)t=r(t,s.value,i),s=s.prev;return t};_.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};_.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};_.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 _;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var s=0,i=this.head;i!==null&&s<r;s++)i=i.next;for(;i!==null&&s<e;s++,i=i.next)t.push(i.value);return t};_.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 _;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var s=this.length,i=this.tail;i!==null&&s>e;s--)i=i.prev;for(;i!==null&&s>r;s--,i=i.prev)t.push(i.value);return t};_.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var s=0,i=this.head;i!==null&&s<r;s++)i=i.next;for(var n=[],s=0;i&&s<e;s++)n.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var s=0;s<t.length;s++)i=Pi(this,i,t[s]);return n};_.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var s=t.prev;t.prev=t.next,t.next=s}return this.head=e,this.tail=r,this};function Pi(r,e,t){var s=e===r.head?new M(t,null,e,r):new M(t,e,e.next,r);return s.next===null&&(r.tail=s),s.prev===null&&(r.head=s),r.length++,s}function Di(r,e){r.tail=new M(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function Fi(r,e){r.head=new M(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function M(r,e,t,s){if(!(this instanceof M))return new M(r,e,t,s);this.list=s,this.value=r,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}try{ur()(_)}catch{}});var vr=m((Wa,gr)=>{"use strict";var ji=fr(),U=Symbol("max"),P=Symbol("length"),Y=Symbol("lengthCalculator"),le=Symbol("allowStale"),X=Symbol("maxAge"),T=Symbol("dispose"),pr=Symbol("noDisposeOnSet"),O=Symbol("lruList"),L=Symbol("cache"),dr=Symbol("updateAgeOnGet"),je=()=>1,Ge=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[U]=e.max||1/0,s=e.length||je;if(this[Y]=typeof s!="function"?je:s,this[le]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[X]=e.maxAge||0,this[T]=e.dispose,this[pr]=e.noDisposeOnSet||!1,this[dr]=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[U]=e||1/0,ae(this)}get max(){return this[U]}set allowStale(e){this[le]=!!e}get allowStale(){return this[le]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[X]=e,ae(this)}get maxAge(){return this[X]}set lengthCalculator(e){typeof e!="function"&&(e=je),e!==this[Y]&&(this[Y]=e,this[P]=0,this[O].forEach(t=>{t.length=this[Y](t.value,t.key),this[P]+=t.length})),ae(this)}get lengthCalculator(){return this[Y]}get length(){return this[P]}get itemCount(){return this[O].length}rforEach(e,t){t=t||this;for(let s=this[O].tail;s!==null;){let i=s.prev;mr(this,e,s,t),s=i}}forEach(e,t){t=t||this;for(let s=this[O].head;s!==null;){let i=s.next;mr(this,e,s,t),s=i}}keys(){return this[O].toArray().map(e=>e.key)}values(){return this[O].toArray().map(e=>e.value)}reset(){this[T]&&this[O]&&this[O].length&&this[O].forEach(e=>this[T](e.key,e.value)),this[L]=new Map,this[O]=new ji,this[P]=0}dump(){return this[O].map(e=>Se(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[O]}set(e,t,s){if(s=s||this[X],s&&typeof s!="number")throw new TypeError("maxAge must be a number");let i=s?Date.now():0,n=this[Y](t,e);if(this[L].has(e)){if(n>this[U])return J(this,this[L].get(e)),!1;let c=this[L].get(e).value;return this[T]&&(this[pr]||this[T](e,c.value)),c.now=i,c.maxAge=s,c.value=t,this[P]+=n-c.length,c.length=n,this.get(e),ae(this),!0}let o=new Ve(e,t,n,i,s);return o.length>this[U]?(this[T]&&this[T](e,t),!1):(this[P]+=o.length,this[O].unshift(o),this[L].set(e,this[O].head),ae(this),!0)}has(e){if(!this[L].has(e))return!1;let t=this[L].get(e).value;return!Se(this,t)}get(e){return He(this,e,!0)}peek(e){return He(this,e,!1)}pop(){let e=this[O].tail;return e?(J(this,e),e.value):null}del(e){J(this,this[L].get(e))}load(e){this.reset();let t=Date.now();for(let s=e.length-1;s>=0;s--){let i=e[s],n=i.e||0;if(n===0)this.set(i.k,i.v);else{let o=n-t;o>0&&this.set(i.k,i.v,o)}}}prune(){this[L].forEach((e,t)=>He(this,t,!1))}},He=(r,e,t)=>{let s=r[L].get(e);if(s){let i=s.value;if(Se(r,i)){if(J(r,s),!r[le])return}else t&&(r[dr]&&(s.value.now=Date.now()),r[O].unshiftNode(s));return i.value}},Se=(r,e)=>{if(!e||!e.maxAge&&!r[X])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[X]&&t>r[X]},ae=r=>{if(r[P]>r[U])for(let e=r[O].tail;r[P]>r[U]&&e!==null;){let t=e.prev;J(r,e),e=t}},J=(r,e)=>{if(e){let t=e.value;r[T]&&r[T](t.key,t.value),r[P]-=t.length,r[L].delete(t.key),r[O].removeNode(e)}},Ve=class{constructor(e,t,s,i,n){this.key=e,this.value=t,this.length=s,this.now=i,this.maxAge=n||0}},mr=(r,e,t,s)=>{let i=t.value;Se(r,i)&&(J(r,t),r[le]||(i=void 0)),i&&e.call(s,i.value,i.key,r)};gr.exports=Ge});var N=m((ka,Or)=>{var B=class{constructor(e,t){if(t=Gi(t),e instanceof B)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new B(e.raw,t);if(e instanceof Me)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(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(i=>!_r(i[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&Bi(i[0])){this.set=[i];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 s=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=Er.get(s);if(i)return i;let n=this.options.loose,o=n?S[b.HYPHENRANGELOOSE]:S[b.HYPHENRANGE];e=e.replace(o,tn(this.options.includePrerelease)),y("hyphen replace",e),e=e.replace(S[b.COMPARATORTRIM],Mi),y("comparator trim",e),e=e.replace(S[b.TILDETRIM],Ui),e=e.replace(S[b.CARETTRIM],Xi),e=e.split(/\s+/).join(" ");let l=e.split(" ").map(h=>Wi(h,this.options)).join(" ").split(/\s+/).map(h=>en(h,this.options));n&&(l=l.filter(h=>(y("loose invalid filter",h,this.options),!!h.match(S[b.COMPARATORLOOSE])))),y("range list",l);let c=new Map,a=l.map(h=>new Me(h,this.options));for(let h of a){if(_r(h))return[h];c.set(h.value,h)}c.size>1&&c.has("")&&c.delete("");let u=[...c.values()];return Er.set(s,u),u}intersects(e,t){if(!(e instanceof B))throw new TypeError("a Range is required");return this.set.some(s=>yr(s,t)&&e.set.some(i=>yr(i,t)&&s.every(n=>i.every(o=>n.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Vi(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(rn(this.set[t],e,this.options))return!0;return!1}};Or.exports=B;var Hi=vr(),Er=new Hi({max:1e3}),Gi=ne(),Me=ce(),y=ie(),Vi=$(),{re:S,t:b,comparatorTrimReplace:Mi,tildeTrimReplace:Ui,caretTrimReplace:Xi}=G(),_r=r=>r.value==="<0.0.0-0",Bi=r=>r.value==="",yr=(r,e)=>{let t=!0,s=r.slice(),i=s.pop();for(;t&&s.length;)t=s.every(n=>i.intersects(n,e)),i=s.pop();return t},Wi=(r,e)=>(y("comp",r,e),r=Yi(r,e),y("caret",r),r=ki(r,e),y("tildes",r),r=Zi(r,e),y("xrange",r),r=Qi(r,e),y("stars",r),r),A=r=>!r||r.toLowerCase()==="x"||r==="*",ki=(r,e)=>r.trim().split(/\s+/).map(t=>zi(t,e)).join(" "),zi=(r,e)=>{let t=e.loose?S[b.TILDELOOSE]:S[b.TILDE];return r.replace(t,(s,i,n,o,l)=>{y("tilde",r,s,i,n,o,l);let c;return A(i)?c="":A(n)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:A(o)?c=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:l?(y("replaceTilde pr",l),c=`>=${i}.${n}.${o}-${l} <${i}.${+n+1}.0-0`):c=`>=${i}.${n}.${o} <${i}.${+n+1}.0-0`,y("tilde return",c),c})},Yi=(r,e)=>r.trim().split(/\s+/).map(t=>Ji(t,e)).join(" "),Ji=(r,e)=>{y("caret",r,e);let t=e.loose?S[b.CARETLOOSE]:S[b.CARET],s=e.includePrerelease?"-0":"";return r.replace(t,(i,n,o,l,c)=>{y("caret",r,i,n,o,l,c);let a;return A(n)?a="":A(o)?a=`>=${n}.0.0${s} <${+n+1}.0.0-0`:A(l)?n==="0"?a=`>=${n}.${o}.0${s} <${n}.${+o+1}.0-0`:a=`>=${n}.${o}.0${s} <${+n+1}.0.0-0`:c?(y("replaceCaret pr",c),n==="0"?o==="0"?a=`>=${n}.${o}.${l}-${c} <${n}.${o}.${+l+1}-0`:a=`>=${n}.${o}.${l}-${c} <${n}.${+o+1}.0-0`:a=`>=${n}.${o}.${l}-${c} <${+n+1}.0.0-0`):(y("no pr"),n==="0"?o==="0"?a=`>=${n}.${o}.${l}${s} <${n}.${o}.${+l+1}-0`:a=`>=${n}.${o}.${l}${s} <${n}.${+o+1}.0-0`:a=`>=${n}.${o}.${l} <${+n+1}.0.0-0`),y("caret return",a),a})},Zi=(r,e)=>(y("replaceXRanges",r,e),r.split(/\s+/).map(t=>Ki(t,e)).join(" ")),Ki=(r,e)=>{r=r.trim();let t=e.loose?S[b.XRANGELOOSE]:S[b.XRANGE];return r.replace(t,(s,i,n,o,l,c)=>{y("xRange",r,s,i,n,o,l,c);let a=A(n),u=a||A(o),h=u||A(l),v=h;return i==="="&&v&&(i=""),c=e.includePrerelease?"-0":"",a?i===">"||i==="<"?s="<0.0.0-0":s="*":i&&v?(u&&(o=0),l=0,i===">"?(i=">=",u?(n=+n+1,o=0,l=0):(o=+o+1,l=0)):i==="<="&&(i="<",u?n=+n+1:o=+o+1),i==="<"&&(c="-0"),s=`${i+n}.${o}.${l}${c}`):u?s=`>=${n}.0.0${c} <${+n+1}.0.0-0`:h&&(s=`>=${n}.${o}.0${c} <${n}.${+o+1}.0-0`),y("xRange return",s),s})},Qi=(r,e)=>(y("replaceStars",r,e),r.trim().replace(S[b.STAR],"")),en=(r,e)=>(y("replaceGTE0",r,e),r.trim().replace(S[e.includePrerelease?b.GTE0PRE:b.GTE0],"")),tn=r=>(e,t,s,i,n,o,l,c,a,u,h,v,d)=>(A(s)?t="":A(i)?t=`>=${s}.0.0${r?"-0":""}`:A(n)?t=`>=${s}.${i}.0${r?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,A(a)?c="":A(u)?c=`<${+a+1}.0.0-0`:A(h)?c=`<${a}.${+u+1}.0-0`:v?c=`<=${a}.${u}.${h}-${v}`:r?c=`<${a}.${u}.${+h+1}-0`:c=`<=${c}`,`${t} ${c}`.trim()),rn=(r,e,t)=>{for(let s=0;s<r.length;s++)if(!r[s].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let s=0;s<r.length;s++)if(y(r[s].semver),r[s].semver!==Me.ANY&&r[s].semver.prerelease.length>0){let i=r[s].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var ce=m((za,Sr)=>{var ue=Symbol("SemVer ANY"),Z=class{static get ANY(){return ue}constructor(e,t){if(t=sn(t),e instanceof Z){if(e.loose===!!t.loose)return e;e=e.value}Xe("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ue?this.value="":this.value=this.operator+this.semver.version,Xe("comp",this)}parse(e){let t=this.options.loose?$r[br.COMPARATORLOOSE]:$r[br.COMPARATOR],s=e.match(t);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Ar(s[2],this.options.loose):this.semver=ue}toString(){return this.value}test(e){if(Xe("Comparator.test",e,this.options.loose),this.semver===ue||e===ue)return!0;if(typeof e=="string")try{e=new Ar(e,this.options)}catch{return!1}return Ue(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Z))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Rr(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new Rr(this.value,t).test(e.semver);let s=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),n=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),l=Ue(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),c=Ue(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return s||i||n&&o||l||c}};Sr.exports=Z;var sn=ne(),{re:$r,t:br}=G(),Ue=Fe(),Xe=ie(),Ar=$(),Rr=N()});var he=m((Ya,Ir)=>{var nn=N(),on=(r,e,t)=>{try{e=new nn(e,t)}catch{return!1}return e.test(r)};Ir.exports=on});var xr=m((Ja,wr)=>{var an=N(),ln=(r,e)=>new an(r,e).set.map(t=>t.map(s=>s.value).join(" ").trim().split(" "));wr.exports=ln});var Nr=m((Za,Cr)=>{var cn=$(),un=N(),hn=(r,e,t)=>{let s=null,i=null,n=null;try{n=new un(e,t)}catch{return null}return r.forEach(o=>{n.test(o)&&(!s||i.compare(o)===-1)&&(s=o,i=new cn(s,t))}),s};Cr.exports=hn});var qr=m((Ka,Lr)=>{var fn=$(),pn=N(),mn=(r,e,t)=>{let s=null,i=null,n=null;try{n=new pn(e,t)}catch{return null}return r.forEach(o=>{n.test(o)&&(!s||i.compare(o)===1)&&(s=o,i=new fn(s,t))}),s};Lr.exports=mn});var Dr=m((Qa,Pr)=>{var Be=$(),dn=N(),Tr=oe(),gn=(r,e)=>{r=new dn(r,e);let t=new Be("0.0.0");if(r.test(t)||(t=new Be("0.0.0-0"),r.test(t)))return t;t=null;for(let s=0;s<r.set.length;++s){let i=r.set[s],n=null;i.forEach(o=>{let l=new Be(o.semver.version);switch(o.operator){case">":l.prerelease.length===0?l.patch++:l.prerelease.push(0),l.raw=l.format();case"":case">=":(!n||Tr(l,n))&&(n=l);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),n&&(!t||Tr(t,n))&&(t=n)}return t&&r.test(t)?t:null};Pr.exports=gn});var jr=m((el,Fr)=>{var vn=N(),En=(r,e)=>{try{return new vn(r,e).range||"*"}catch{return null}};Fr.exports=En});var Ie=m((tl,Mr)=>{var _n=$(),Vr=ce(),{ANY:yn}=Vr,On=N(),$n=he(),Hr=oe(),Gr=Oe(),bn=be(),An=$e(),Rn=(r,e,t,s)=>{r=new _n(r,s),e=new On(e,s);let i,n,o,l,c;switch(t){case">":i=Hr,n=bn,o=Gr,l=">",c=">=";break;case"<":i=Gr,n=An,o=Hr,l="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if($n(r,e,s))return!1;for(let a=0;a<e.set.length;++a){let u=e.set[a],h=null,v=null;if(u.forEach(d=>{d.semver===yn&&(d=new Vr(">=0.0.0")),h=h||d,v=v||d,i(d.semver,h.semver,s)?h=d:o(d.semver,v.semver,s)&&(v=d)}),h.operator===l||h.operator===c||(!v.operator||v.operator===l)&&n(r,v.semver))return!1;if(v.operator===c&&o(r,v.semver))return!1}return!0};Mr.exports=Rn});var Xr=m((rl,Ur)=>{var Sn=Ie(),In=(r,e,t)=>Sn(r,e,">",t);Ur.exports=In});var Wr=m((sl,Br)=>{var wn=Ie(),xn=(r,e,t)=>wn(r,e,"<",t);Br.exports=xn});var Yr=m((il,zr)=>{var kr=N(),Cn=(r,e,t)=>(r=new kr(r,t),e=new kr(e,t),r.intersects(e));zr.exports=Cn});var Zr=m((nl,Jr)=>{var Nn=he(),Ln=C();Jr.exports=(r,e,t)=>{let s=[],i=null,n=null,o=r.sort((u,h)=>Ln(u,h,t));for(let u of o)Nn(u,e,t)?(n=u,i||(i=u)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let l=[];for(let[u,h]of s)u===h?l.push(u):!h&&u===o[0]?l.push("*"):h?u===o[0]?l.push(`<=${h}`):l.push(`${u} - ${h}`):l.push(`>=${u}`);let c=l.join(" || "),a=typeof e.raw=="string"?e.raw:String(e);return c.length<a.length?c:e}});var rs=m((ol,ts)=>{var Kr=N(),we=ce(),{ANY:We}=we,fe=he(),ke=C(),qn=(r,e,t={})=>{if(r===e)return!0;r=new Kr(r,t),e=new Kr(e,t);let s=!1;e:for(let i of r.set){for(let n of e.set){let o=Tn(i,n,t);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},Tn=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===We){if(e.length===1&&e[0].semver===We)return!0;t.includePrerelease?r=[new we(">=0.0.0-0")]:r=[new we(">=0.0.0")]}if(e.length===1&&e[0].semver===We){if(t.includePrerelease)return!0;e=[new we(">=0.0.0")]}let s=new Set,i,n;for(let d of r)d.operator===">"||d.operator===">="?i=Qr(i,d,t):d.operator==="<"||d.operator==="<="?n=es(n,d,t):s.add(d.semver);if(s.size>1)return null;let o;if(i&&n){if(o=ke(i.semver,n.semver,t),o>0)return null;if(o===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let d of s){if(i&&!fe(d,String(i),t)||n&&!fe(d,String(n),t))return null;for(let Rs of e)if(!fe(d,String(Rs),t))return!1;return!0}let l,c,a,u,h=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1,v=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1;h&&h.prerelease.length===1&&n.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let d of e){if(u=u||d.operator===">"||d.operator===">=",a=a||d.operator==="<"||d.operator==="<=",i){if(v&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===v.major&&d.semver.minor===v.minor&&d.semver.patch===v.patch&&(v=!1),d.operator===">"||d.operator===">="){if(l=Qr(i,d,t),l===d&&l!==i)return!1}else if(i.operator===">="&&!fe(i.semver,String(d),t))return!1}if(n){if(h&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===h.major&&d.semver.minor===h.minor&&d.semver.patch===h.patch&&(h=!1),d.operator==="<"||d.operator==="<="){if(c=es(n,d,t),c===d&&c!==n)return!1}else if(n.operator==="<="&&!fe(n.semver,String(d),t))return!1}if(!d.operator&&(n||i)&&o!==0)return!1}return!(i&&a&&!n&&o!==0||n&&u&&!i&&o!==0||v||h)},Qr=(r,e,t)=>{if(!r)return e;let s=ke(r.semver,e.semver,t);return s>0?r:s<0||e.operator===">"&&r.operator===">="?e:r},es=(r,e,t)=>{if(!r)return e;let s=ke(r.semver,e.semver,t);return s<0?r:s>0||e.operator==="<"&&r.operator==="<="?e:r};ts.exports=qn});var ns=m((al,is)=>{var ze=G(),Pn=se(),Dn=$(),ss=Pe(),Fn=V(),jn=Rt(),Hn=It(),Gn=Ct(),Vn=Dt(),Mn=jt(),Un=Gt(),Xn=Mt(),Bn=Xt(),Wn=C(),kn=Wt(),zn=zt(),Yn=ye(),Jn=Kt(),Zn=er(),Kn=oe(),Qn=Oe(),eo=_e(),to=De(),ro=$e(),so=be(),io=Fe(),no=lr(),oo=ce(),ao=N(),lo=he(),co=xr(),uo=Nr(),ho=qr(),fo=Dr(),po=jr(),mo=Ie(),go=Xr(),vo=Wr(),Eo=Yr(),_o=Zr(),yo=rs();is.exports={parse:Fn,valid:jn,clean:Hn,inc:Gn,diff:Vn,major:Mn,minor:Un,patch:Xn,prerelease:Bn,compare:Wn,rcompare:kn,compareLoose:zn,compareBuild:Yn,sort:Jn,rsort:Zn,gt:Kn,lt:Qn,eq:eo,neq:to,gte:ro,lte:so,cmp:io,coerce:no,Comparator:oo,Range:ao,satisfies:lo,toComparators:co,maxSatisfying:uo,minSatisfying:ho,minVersion:fo,validRange:po,outside:mo,gtr:go,ltr:vo,intersects:Eo,simplifyRange:_o,subset:yo,SemVer:Dn,re:ze.re,src:ze.src,tokens:ze.t,SEMVER_SPEC_VERSION:Pn.SEMVER_SPEC_VERSION,compareIdentifiers:ss.compareIdentifiers,rcompareIdentifiers:ss.rcompareIdentifiers}});var pe=m(x=>{"use strict";var Oo=x&&x.__createBinding||(Object.create?function(r,e,t,s){s===void 0&&(s=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,s,i)}:function(r,e,t,s){s===void 0&&(s=t),r[s]=e[t]}),$o=x&&x.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),bo=x&&x.__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)&&Oo(e,r,t);return $o(e,r),e},os=x&&x.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(x,"__esModule",{value:!0});x.getCoreVersion=void 0;var as=os(require("path")),ls=os(require("fs")),Ye=bo(require("@serverless-devs/core")),Ao=ns(),cs=as.default.join(Ye.getRootHome(),"cache","core"),Je=as.default.join(cs,"package.json");function Ro(){if(ls.default.existsSync(Je)){var r=require("@serverless-devs/core/package.json").version,e=us();return Ao.gt(e,r)?require(cs):Ye}return Ye}function us(){return ls.default.existsSync(Je)?require(Je).version:void 0}x.getCoreVersion=us;x.default=Ro()});var ds=m(I=>{"use strict";var So=I&&I.__awaiter||function(r,e,t,s){function i(n){return n instanceof t?n:new t(function(o){o(n)})}return new(t||(t=Promise))(function(n,o){function l(u){try{a(s.next(u))}catch(h){o(h)}}function c(u){try{a(s.throw(u))}catch(h){o(h)}}function a(u){u.done?n(u.value):i(u.value).then(l,c)}a((s=s.apply(r,e||[])).next())})},Io=I&&I.__generator||function(r,e){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},s,i,n,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(u){return c([a,u])}}function c(a){if(s)throw new TypeError("Generator is already executing.");for(;t;)try{if(s=1,i&&(n=a[0]&2?i.return:a[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,a[1])).done)return n;switch(i=0,n&&(a=[a[0]&2,n.value]),a[0]){case 0:case 1:n=a;break;case 4:return t.label++,{value:a[1],done:!1};case 5:t.label++,i=a[1],a=[0];continue;case 7:a=t.ops.pop(),t.trys.pop();continue;default:if(n=t.trys,!(n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){t.label=a[1];break}if(a[0]===6&&t.label<n[1]){t.label=n[1],n=a;break}if(n&&t.label<n[2]){t.label=n[2],t.ops.push(a);break}n[2]&&t.ops.pop(),t.trys.pop();continue}a=e.call(r,t)}catch(u){a=[6,u],i=0}finally{s=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},hs=I&&I.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(I,"__esModule",{value:!0});I.handlerProfileFile=I.getConfig=I.setConfig=void 0;var fs=hs(require("path")),Ke=hs(pe()),q=Ke.default.fse,xe=Ke.default.jsyaml,Ze=Ke.default.getRootHome;function wo(r){var e=ms();q.writeFileSync(e,xe.dump(r))}function ps(){var r=ms();if(!q.existsSync(r))return{};try{var e=xe.load(q.readFileSync(r,"utf8"))||{};return e}catch(t){throw t}}function ms(){var r=fs.default.join(Ze(),"set-config.yml");return q.existsSync(r)||q.createFileSync(r),r}function xo(r,e){var t=ps();t[r]=e,wo(t)}I.setConfig=xo;function Co(r,e){var t=ps();return t[r]||e}I.getConfig=Co;function No(r){return So(this,void 0,void 0,function(){var e,t,s,i,n,o,l;return Io(this,function(c){switch(c.label){case 0:if(e=r.filePath||"set-config.yml",t=fs.default.join(Ze(),e),s=q.existsSync(t),i={},s)return[3,5];n=Ze(),c.label=1;case 1:return c.trys.push([1,2,,4]),q.statSync(n),[3,4];case 2:return o=c.sent(),[4,q.mkdirSync(n)];case 3:return c.sent(),[3,4];case 4:return[3,6];case 5:try{i=xe.load(q.readFileSync(t,"utf8"))||{}}catch(a){throw a}c.label=6;case 6:return r.read?[2,i]:(l=r.configKey||"",i[l]=r.data,[4,q.writeFileSync(t,xe.dump(i))]);case 7:return c.sent(),[2,i]}})})}I.handlerProfileFile=No});var gs=m(me=>{"use strict";var Lo=me&&me.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(me,"__esModule",{value:!0});var qo=Lo(pe()),To=qo.default.Logger,Qe=new To("S-CLI");Qe.success=function(r){return Qe.log(r,"green")};me.default=Qe});var vs=m((hl,Po)=>{Po.exports={name:"@serverless-devs/s",version:"2.1.6-beta.2",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:"Apache 2.0",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","global-agent":"^3.0.0",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",open:"^8.4.0","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":"beta","@serverless-devs/ui":"latest"}}});var bs=m(g=>{"use strict";var Do=g&&g.__createBinding||(Object.create?function(r,e,t,s){s===void 0&&(s=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,s,i)}:function(r,e,t,s){s===void 0&&(s=t),r[s]=e[t]}),Fo=g&&g.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),jo=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)&&Do(e,r,t);return Fo(e,r),e},Q=g&&g.__awaiter||function(r,e,t,s){function i(n){return n instanceof t?n:new t(function(o){o(n)})}return new(t||(t=Promise))(function(n,o){function l(u){try{a(s.next(u))}catch(h){o(h)}}function c(u){try{a(s.throw(u))}catch(h){o(h)}}function a(u){u.done?n(u.value):i(u.value).then(l,c)}a((s=s.apply(r,e||[])).next())})},ee=g&&g.__generator||function(r,e){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},s,i,n,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(u){return c([a,u])}}function c(a){if(s)throw new TypeError("Generator is already executing.");for(;t;)try{if(s=1,i&&(n=a[0]&2?i.return:a[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,a[1])).done)return n;switch(i=0,n&&(a=[a[0]&2,n.value]),a[0]){case 0:case 1:n=a;break;case 4:return t.label++,{value:a[1],done:!1};case 5:t.label++,i=a[1],a=[0];continue;case 7:a=t.ops.pop(),t.trys.pop();continue;default:if(n=t.trys,!(n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){t.label=a[1];break}if(a[0]===6&&t.label<n[1]){t.label=n[1],n=a;break}if(n&&t.label<n[2]){t.label=n[2],t.ops.push(a);break}n[2]&&t.ops.pop(),t.trys.pop();continue}a=e.call(r,t)}catch(u){a=[6,u],i=0}finally{s=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Ce=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.aiRequest=g.getCredentialWithAll=g.getCredentialWithExisted=g.getProcessArgv=g.bgRed=g.yellow=g.red=void 0;var Ho=Ce(require("path")),de=Ce(require("fs")),Go=Ce(require("os")),R=jo(pe()),Vo=ds(),K=Ce(gs()),Es=vs(),te=R.default.colors,Mo=R.default.got,Uo=R.default.isDocker,Xo=R.default.isCiCdEnv,F=R.default.lodash,_s=R.default.publishHelp,Bo=F.get,Wo=F.trim,ko=F.assign,zo=F.filter,ys=F.includes,Yo=F.omit,Jo=F.isPlainObject,Zo=F.isEmpty,Ko=te.underline,Qo=te.bold;g.red=te.hex("#fd5750");g.yellow=te.hex("#F3F99D");g.bgRed=te.hex("#000").bgHex("#fd5750");var ea=function(){var r=process.env.serverless_devs_temp_argv;try{var e=JSON.parse(r),t=R.default.getGlobalArgs(e);return process.argv=process.argv.slice(0,2).concat(t._argsObj),ko({},t,{noHelpArgv:process.argv.slice(0,2).concat(zo(t._argsObj,function(s){return!ys(["-h","--help"],s)}))})}catch{return{}}};g.getProcessArgv=ea;var ta=function(r){return Q(void 0,void 0,void 0,function(){var e,t;return ee(this,function(s){switch(s.label){case 0:return[4,R.default.getCredentialAliasList()];case 1:return e=s.sent(),ys(e,r)?[4,R.default.getCredential(r)]:[3,3];case 2:return t=s.sent(),[2,t];case 3:return[2]}})})};g.getCredentialWithExisted=ta;var ra=function(){return Q(void 0,void 0,void 0,function(){var r,e,t,s,i,n;return ee(this,function(o){switch(o.label){case 0:return[4,R.default.getCredentialAliasList()];case 1:if(r=o.sent(),!(r.length>0))return[3,6];e={},t=0,s=r,o.label=2;case 2:return t<s.length?(i=s[t],[4,R.default.getCredential(i)]):[3,5];case 3:n=o.sent(),e[n.Alias]=Yo(n,"Alias"),o.label=4;case 4:return t++,[3,2];case 5:return[2,e];case 6:return[2]}})})};g.getCredentialWithAll=ra;var sa=function(r,e){return e===void 0&&(e="unknow"),Q(void 0,void 0,void 0,function(){var t,s,i,n;return ee(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=(0,Vo.getConfig)("analysis"),t!=="enable"?[2]:Uo()||Xo()?[2]:[4,Mo("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(e,"&code=TypeError&s=").concat(r),{timeout:2e3,json:!0})];case 1:return s=o.sent(),i=Bo(s.body,"shorturl"),i&&K.default.log(`AI Tips:
|
|
16
|
+
You can try to solve the problem through: `.concat(te.underline(i),`
|
|
17
|
+
`)),[3,3];case 2:return n=o.sent(),[3,3];case 3:return[2]}})})};g.aiRequest=sa;function ia(){var r=(0,R.getCoreVersion)(),e=["".concat(Es.name,": ").concat(Es.version),r?"core: ".concat(r):void 0,"s-home: ".concat(R.default.getRootHome()),"".concat(process.platform,"-").concat(process.arch),"node-".concat(process.version)];return e.filter(function(t){return t}).join(", ")}g.getVersion=ia;function na(r){return Q(this,void 0,void 0,function(){function e(i){return Q(this,void 0,void 0,function(){var n,o;return ee(this,function(l){switch(l.label){case 0:return n=de.default.lstatSync(i),typeof n!="object"?[2]:(t.set(n.ino,n.size),n.isDirectory()?(o=de.default.readdirSync(i),typeof o!="object"?[2]:[4,Promise.all(o.map(function(c){return e(Ho.default.join(i,c))}))]):[3,2]);case 1:l.sent(),l.label=2;case 2:return[2]}})})}var t,s;return ee(this,function(i){switch(i.label){case 0:return t=new Map,[4,e(r)];case 1:return i.sent(),s=Array.from(t.values()).reduce(function(n,o){return n+o},0),[2,s]}})})}g.getFolderSize=na;function oa(r,e){e===void 0&&(e=" ");for(var t="",s=0;s<r;s++)t=t+e;return t}g.printn=oa;function aa(){return"en"}g.getLang=aa;function Os(r,e){var t=/\{\{(.*?)\}\}/g,s=r.match(t);if(s)for(var i=0;i<s.length;i++){var n=s[i].replace(/{{|}}/g,""),o=Wo(n.split("|")[0]);e[o]&&(r=r.replace(s[i],e[o]))}return r}g.replaceFun=Os;function la(r,e){r.forEach(function(t){if(de.default.existsSync(t)){var s=de.default.readFileSync(t,"utf-8"),i=Os(s,e);de.default.writeFileSync(t,i,"utf-8")}})}g.replaceTemplate=la;function ca(r){if(!r)return r;var e=r.slice(-4);return"***********".concat(e)}g.mark=ca;function et(r,e){return Go.default.platform()==="win32"?e||"\u25C6":"".concat(r," ")}g.emoji=et;function $s(r,e){var t=r.length,s=new Array(e-t).fill(" ");return"".concat(r).concat(s.join("")," : ")}g.getTempCommandStr=$s;function ua(r){return Q(this,void 0,void 0,function(){var e,t,s,i,n,l,o,l;return ee(this,function(c){switch(c.label){case 0:return[4,R.default.getYamlContent(r)];case 1:if(e=c.sent(),K.default.log(`
|
|
18
18
|
`.concat(et("\u{1F680}")," ").concat(e.Name,"@").concat(e.Version,": ").concat(e.Description,`
|
|
19
|
-
`)),t=e.Commands,t){
|
|
20
|
-
`)),!
|
|
21
|
-
`:"")}return[2]}})})}g.specifyServiceHelp=
|
|
19
|
+
`)),t=e.Commands,t){s=_s.maxLen(t),i=[],n={};for(l in t)o=t[l],Jo(o)?i.push(_s.helpInfo(o,Ko(Qo(l)),s,4)):n[l]=o;if(i.length>0&&K.default.log(i.join(`
|
|
20
|
+
`)),!Zo(n)){for(l in n)K.default.log(" ".concat($s(l,s)," ").concat(n[l]));K.default.log("")}K.default.log(e.HomePage?" ".concat(et("\u{1F9ED}")," ").concat(R.default.makeUnderLine("More information: "+e.HomePage)," ")+`
|
|
21
|
+
`:"")}return[2]}})})}g.specifyServiceHelp=ua});var As=exports&&exports.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0});var ha=As(lt()),ge=bs(),fa=As(pe()),pa=fa.default.colors,ma=`You can make some default settings for the tool here.
|
|
22
22
|
|
|
23
|
-
`.concat((0,
|
|
23
|
+
`.concat((0,ge.emoji)("\u{1F4D6}")," Document: ").concat(pa.underline("https://github.com/Serverless-Devs/Serverless-Devs/tree/master/docs/zh/command/set.md"));ha.default.name("s set").usage("[commands] [options]").command("registry","".concat((0,ge.emoji)("\u{1F440}")," Set registry information")).command("proxy","".concat((0,ge.emoji)("\u{1F527}")," Set proxy information")).command("analysis","".concat((0,ge.emoji)("\u{1F449}")," Set to enable or disable analysis")).command("workspace","".concat((0,ge.emoji)("\u{1F64A}")," Set workspace path")).helpOption("-h, --help","Display help for command").addHelpCommand(!1).description(ma).parse(process.argv);
|