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