@serverless-devs/s 2.1.2-beta.2 → 2.1.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_config.yml +1 -1
- package/lib/clean/index.js +1 -1
- package/lib/cli/index.js +2 -2
- package/lib/component/index.js +1 -1
- package/lib/config/add/index.js +1 -1
- package/lib/config/delete/index.js +1 -1
- package/lib/config/get/index.js +1 -1
- package/lib/config/index.js +1 -1
- package/lib/edit/index.js +27 -27
- package/lib/index.js +83 -83
- package/lib/init/index.js +60 -60
- package/lib/init/init-config.js +112 -4
- package/lib/set/analysis/index.js +1 -1
- package/lib/set/index.js +1 -1
- package/lib/set/locale/index.js +1 -1
- package/lib/set/registry/index.js +1 -1
- package/lib/set/workspace/index.js +1 -1
- package/lib/update-notifier/index.js +19 -19
- package/lib/verify/index.js +32 -32
- package/package.json +1 -1
- package/readme.md +10 -6
package/lib/edit/index.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var f=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Yt=f((U,zt)=>{var Mi=require("events").EventEmitter,et=require("child_process").spawn,X=require("path"),tt=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=Bt(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 Gi(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 Mi{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 i=t,s=n;typeof i=="object"&&i!==null&&(s=i,i=null),s=s||{};let a=e.split(/ +/),l=this.createCommand(a.shift());return i&&(l.description(i),l._executableHandler=!0),s.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(s.noHelp||s.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=s.executableFile||null,this.commands.push(l),l._parseExpectedArgs(a),l.parent=this,i?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(i){i.forEach(s=>{if(s._executableHandler&&!s._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${s.name()}`);n(s.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 i=this._args.length,s=n.slice(0,i);this._passCommandToAction?s[i]=this:s[i]=this.opts(),n.length>i&&s.push(n.slice(i));let a=e.apply(this,s),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 i=e.long.replace(/^--no-/,"--");n=!this._findOption(i)}else if(e.long){let i=e.long.replace(/^--/,"--no-");n=!this._findOption(i)}if(n)throw new Error(`option '${e.name()}' clashes with existing property '${e.attributeName()}' on Command
|
|
2
2
|
- call storeOptionsAsProperties(false) to store option values safely,
|
|
3
3
|
- or call storeOptionsAsProperties(true) to suppress this check,
|
|
4
4
|
- or change option name
|
|
5
5
|
|
|
6
|
-
Read more on https://git.io/JJc0W`)}_optionEx(e,t,n,i,s){let a=new
|
|
6
|
+
Read more on https://git.io/JJc0W`)}_optionEx(e,t,n,i,s){let a=new ve(t,n),l=a.name(),c=a.attributeName();if(a.mandatory=!!e.mandatory,this._checkForOptionNameClash(a),typeof i!="function")if(i instanceof RegExp){let o=i;i=(u,h)=>{let v=o.exec(u);return v?v[0]:h}}else s=i,i=null;if(a.negate||a.optional||a.required||typeof s=="boolean"){if(a.negate){let o=a.long.replace(/^--no-/,"--");s=this._findOption(o)?this._getOptionValue(c):!0}s!==void 0&&(this._setOptionValue(c,s),a.defaultValue=s)}return this.options.push(a),this.on("option:"+l,o=>{let u=this._getOptionValue(c);o!==null&&i?o=i(o,u===void 0?s:u):o!==null&&a.variadic&&(u===s||!Array.isArray(u)?o=[o]:o=u.concat(o)),typeof u=="boolean"||typeof u>"u"?o==null?this._setOptionValue(c,a.negate?!1:s||!0):this._setOptionValue(c,o):o!==null&&this._setOptionValue(c,a.negate?!1:o)}),this}option(e,t,n,i){return this._optionEx({},e,t,n,i)}requiredOption(e,t,n,i){return this._optionEx({mandatory:!0},e,t,n,i)}combineFlagAndOptionalValue(e){return this._combineFlagAndOptionalValue=e===void 0||e,this}allowUnknownOption(e){return this._allowUnknownOption=e===void 0||e,this}storeOptionsAsProperties(e){if(this._storeOptionsAsPropertiesCalled=!0,this._storeOptionsAsProperties=e===void 0||e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}passCommandToAction(e){return this._passCommandToAction=e===void 0||e,this}_setOptionValue(e,t){this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t}_getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}parse(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");t=t||{},e===void 0&&(e=process.argv,process.versions&&process.versions.electron&&(t.from="electron")),this.rawArgs=e.slice();let 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&&X.basename(this._scriptPath,X.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,i=[".js",".ts",".tsx",".mjs"];this._checkForMissingMandatoryOptions();let s=this._scriptPath;!s&&process.mainModule&&(s=process.mainModule.filename);let a;try{let v=tt.realpathSync(s);a=X.dirname(v)}catch{a="."}let l=X.basename(s,X.extname(s))+"-"+e._name;e._executableFile&&(l=e._executableFile);let c=X.join(a,l);tt.existsSync(c)?l=c:i.forEach(v=>{tt.existsSync(`${c}${v}`)&&(l=`${c}${v}`)}),n=i.includes(X.extname(l));let o;process.platform!=="win32"?n?(t.unshift(l),t=Ut(process.execArgv).concat(t),o=et(process.argv[0],t,{stdio:"inherit"})):o=et(l,t,{stdio:"inherit"}):(t.unshift(l),t=Ut(process.execArgv).concat(t),o=et(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
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
|
|
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=>
|
|
10
|
-
`)}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";let e=this.prepareCommands(),t=this.padWidth(),i=(process.stdout.columns||80)-t-4;return["Commands:",e.map(s=>{let a=s[1]?" "+s[1]:"";return(a?
|
|
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 i=this._findCommand(e);i||this._helpAndError(),i._executableHandler?this._executeSubCommand(i,t.concat(n)):i._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)Vt(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);else if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this._helpAndError(),Vt(this,n.unknown),this._checkForMissingMandatoryOptions(),n.unknown.length>0&&this.unknownOption(n.unknown[0]),this._actionHandler){let i=this.args.slice();this._args.forEach((s,a)=>{s.required&&i[a]==null?this.missingArgument(s.name):s.variadic&&(i[a]=i.splice(a))}),this._actionHandler(i),this.emit("command:"+this.name(),e,t)}else e.length?this._findCommand("*")?this._dispatchSubcommand("*",e,t):this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length&&this.unknownCommand():this.commands.length&&this._helpAndError()}_findCommand(e){if(!!e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(t=>{t.mandatory&&e._getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})}parseOptions(e){let t=[],n=[],i=t,s=e.slice();function a(c){return c.length>1&&c[0]==="-"}let l=null;for(;s.length;){let c=s.shift();if(c==="--"){i===n&&i.push(c),i.push(...s);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=s.shift();u===void 0&&this.optionMissingArgument(o),this.emit(`option:${o.name()}`,u)}else if(o.optional){let u=null;s.length>0&&!a(s[0])&&(u=s.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()}`),s.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]==="-"&&(i=n),i.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 i=this.options[n].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}missingArgument(e){let t=`error: missing required argument '${e}'`;console.error(t),this._exit(1,"commander.missingArgument",t)}optionMissingArgument(e,t){let 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 i=this.parent;i;i=i.parent)e.unshift(i.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 i=new ve(t,n);return this._versionOptionName=i.attributeName(),this.options.push(i),this.on("option:"+i.name(),()=>{process.stdout.write(e+`
|
|
9
|
+
`),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,this._argsDescription=t,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this._args.map(n=>Xt(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(i=>Xt(i)).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 i(c,o){return rt(c,e)+" "+kt(o,n,e+2)}let s=this.options.map(c=>{let o=c.description+(!c.negate&&c.defaultValue!==void 0?" (default: "+JSON.stringify(c.defaultValue)+")":"");return i(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,s.push(i(c,this._helpDescription))}return s.join(`
|
|
10
|
+
`)}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";let e=this.prepareCommands(),t=this.padWidth(),i=(process.stdout.columns||80)-t-4;return["Commands:",e.map(s=>{let a=s[1]?" "+s[1]:"";return(a?rt(s[0],t):s[0])+kt(a,i,t+2)}).join(`
|
|
11
11
|
`).replace(/^/gm," "),""].join(`
|
|
12
|
-
`)}helpInformation(){if(this._name==="s")return"";let e=[];if(this._description){e=[this._description,""];let 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(" "+
|
|
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=
|
|
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(" "+rt(v.name,o)+" "+Wt(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 i=["Usage: "+n+t+" "+this.usage(),""],s=[],a=this.commandHelp();a&&(s=[a]);let l=[];return(this._hasHelpOption||this.options.length>0)&&(l=["Options:",""+this.optionHelp().replace(/^/gm," "),""]),i.concat(e).concat(l).concat(s).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=Bt(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)")}};U=zt.exports=new ee;U.program=U;U.Command=ee;U.Option=ve;U.CommanderError=Q;function Gi(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function rt(r,e){let t=Math.max(0,e-r.length);return r+Array(t+1).join(" ")}function Wt(r,e,t){let n=new RegExp(".{1,"+(e-1)+"}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)","g");return(r.match(n)||[]).map((s,a)=>(s.slice(-1)===`
|
|
14
14
|
`&&(s=s.slice(0,s.length-1)),(a>0&&t?Array(t+1).join(" "):"")+s.trimRight())).join(`
|
|
15
|
-
`)}function Wt(r,e,t){return r.match(/[\n]\s+/)||e<40?r:Zt(r,e,t)}function Bt(r,e){r._hasHelpOption&&e.find(n=>n===r._helpLongFlag||n===r._helpShortFlag)&&(r.outputHelp(),r._exit(0,"commander.helpDisplayed","(outputHelp)"))}function zt(r){let e=r.name+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}function Jt(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 Yt(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",i="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?i=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],n=s[3],i=s[4]),t&&i!=="0"?`${t}=${n}:${parseInt(i)+1}`:e})}});var Ee=f((ac,er)=>{var Ji="2.0.0",Ki=Number.MAX_SAFE_INTEGER||9007199254740991,Qi=16;er.exports={SEMVER_SPEC_VERSION:Ji,MAX_LENGTH:256,MAX_SAFE_INTEGER:Ki,MAX_SAFE_COMPONENT_LENGTH:Qi}});var we=f((lc,tr)=>{var es=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};tr.exports=es});var W=f((G,rr)=>{var{MAX_SAFE_COMPONENT_LENGTH:st}=Ee(),ts=we();G=rr.exports={};var rs=G.re=[],p=G.src=[],d=G.t={},ns=0,_=(r,e,t)=>{let n=ns++;ts(r,n,e),d[r]=n,p[n]=e,rs[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,${st}})(?:\\.(\\d{1,${st}}))?(?:\\.(\\d{1,${st}}))?(?:$|[^\\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 be=f((cc,nr)=>{var is=["includePrerelease","loose","rtl"],ss=r=>r?typeof r!="object"?{loose:!0}:is.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};nr.exports=ss});var Le=f((uc,or)=>{var ir=/^[0-9]+$/,sr=(r,e)=>{let t=ir.test(r),n=ir.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},os=(r,e)=>sr(e,r);or.exports={compareIdentifiers:sr,rcompareIdentifiers:os}});var S=f((hc,ur)=>{var Te=we(),{MAX_LENGTH:ar,MAX_SAFE_INTEGER:je}=Ee(),{re:lr,t:cr}=W(),as=be(),{compareIdentifiers:re}=Le(),q=class{constructor(e,t){if(t=as(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>ar)throw new TypeError(`version is longer than ${ar} characters`);Te("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?lr[cr.LOOSE]:lr[cr.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>je||this.major<0)throw new TypeError("Invalid major version");if(this.minor>je||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>je||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let s=+i;if(s>=0&&s<je)return s}return i}):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(Te("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)),re(this.major,e.major)||re(this.minor,e.minor)||re(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],i=e.prerelease[t];if(Te("prerelease compare",t,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return re(n,i)}while(++t)}compareBuild(e){e instanceof q||(e=new q(e,this.options));let t=0;do{let n=this.build[t],i=e.build[t];if(Te("prerelease compare",t,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return re(n,i)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}t&&(re(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}};ur.exports=q});var B=f((fc,dr)=>{var{MAX_LENGTH:ls}=Ee(),{re:hr,t:fr}=W(),pr=S(),cs=be(),us=(r,e)=>{if(e=cs(e),r instanceof pr)return r;if(typeof r!="string"||r.length>ls||!(e.loose?hr[fr.LOOSE]:hr[fr.FULL]).test(r))return null;try{return new pr(r,e)}catch{return null}};dr.exports=us});var gr=f((pc,mr)=>{var hs=B(),fs=(r,e)=>{let t=hs(r,e);return t?t.version:null};mr.exports=fs});var _r=f((dc,vr)=>{var ps=B(),ds=(r,e)=>{let t=ps(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};vr.exports=ds});var wr=f((mc,Er)=>{var yr=S(),ms=(r,e,t,n)=>{typeof t=="string"&&(n=t,t=void 0);try{return new yr(r instanceof yr?r.version:r,t).inc(e,n).version}catch{return null}};Er.exports=ms});var P=f((gc,Or)=>{var br=S(),gs=(r,e,t)=>new br(r,t).compare(new br(e,t));Or.exports=gs});var Fe=f((vc,Sr)=>{var vs=P(),_s=(r,e,t)=>vs(r,e,t)===0;Sr.exports=_s});var Cr=f((_c,xr)=>{var Ar=B(),ys=Fe(),Es=(r,e)=>{if(ys(r,e))return null;{let t=Ar(r),n=Ar(e),i=t.prerelease.length||n.prerelease.length,s=i?"pre":"",a=i?"prerelease":"";for(let l in t)if((l==="major"||l==="minor"||l==="patch")&&t[l]!==n[l])return s+l;return a}};xr.exports=Es});var Ir=f((yc,$r)=>{var ws=S(),bs=(r,e)=>new ws(r,e).major;$r.exports=bs});var qr=f((Ec,Rr)=>{var Os=S(),Ss=(r,e)=>new Os(r,e).minor;Rr.exports=Ss});var Pr=f((wc,Nr)=>{var As=S(),xs=(r,e)=>new As(r,e).patch;Nr.exports=xs});var Lr=f((bc,Dr)=>{var Cs=B(),$s=(r,e)=>{let t=Cs(r,e);return t&&t.prerelease.length?t.prerelease:null};Dr.exports=$s});var jr=f((Oc,Tr)=>{var Is=P(),Rs=(r,e,t)=>Is(e,r,t);Tr.exports=Rs});var Hr=f((Sc,Fr)=>{var qs=P(),Ns=(r,e)=>qs(r,e,!0);Fr.exports=Ns});var He=f((Ac,Gr)=>{var Mr=S(),Ps=(r,e,t)=>{let n=new Mr(r,t),i=new Mr(e,t);return n.compare(i)||n.compareBuild(i)};Gr.exports=Ps});var Vr=f((xc,kr)=>{var Ds=He(),Ls=(r,e)=>r.sort((t,n)=>Ds(t,n,e));kr.exports=Ls});var Ur=f((Cc,Xr)=>{var Ts=He(),js=(r,e)=>r.sort((t,n)=>Ts(n,t,e));Xr.exports=js});var Oe=f(($c,Wr)=>{var Fs=P(),Hs=(r,e,t)=>Fs(r,e,t)>0;Wr.exports=Hs});var Me=f((Ic,Br)=>{var Ms=P(),Gs=(r,e,t)=>Ms(r,e,t)<0;Br.exports=Gs});var ot=f((Rc,zr)=>{var ks=P(),Vs=(r,e,t)=>ks(r,e,t)!==0;zr.exports=Vs});var Ge=f((qc,Yr)=>{var Xs=P(),Us=(r,e,t)=>Xs(r,e,t)>=0;Yr.exports=Us});var ke=f((Nc,Zr)=>{var Ws=P(),Bs=(r,e,t)=>Ws(r,e,t)<=0;Zr.exports=Bs});var at=f((Pc,Jr)=>{var zs=Fe(),Ys=ot(),Zs=Oe(),Js=Ge(),Ks=Me(),Qs=ke(),eo=(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 zs(r,t,n);case"!=":return Ys(r,t,n);case">":return Zs(r,t,n);case">=":return Js(r,t,n);case"<":return Ks(r,t,n);case"<=":return Qs(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};Jr.exports=eo});var Qr=f((Dc,Kr)=>{var to=S(),ro=B(),{re:Ve,t:Xe}=W(),no=(r,e)=>{if(r instanceof to)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(Ve[Xe.COERCE]);else{let n;for(;(n=Ve[Xe.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||n.index+n[0].length!==t.index+t[0].length)&&(t=n),Ve[Xe.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Ve[Xe.COERCERTL].lastIndex=-1}return t===null?null:ro(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};Kr.exports=no});var tn=f((Lc,en)=>{"use strict";en.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var nn=f((Tc,rn)=>{"use strict";rn.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(i){e.push(i)});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++)so(this,arguments[r]);return this.length};y.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)oo(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 i=0;n!==null;i++)t=r(t,n.value,i),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 i=this.length-1;n!==null;i--)t=r(t,n.value,i),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,i=this.head;i!==null&&n<r;n++)i=i.next;for(;i!==null&&n<e;n++,i=i.next)t.push(i.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,i=this.tail;i!==null&&n>e;n--)i=i.prev;for(;i!==null&&n>r;n--,i=i.prev)t.push(i.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,i=this.head;i!==null&&n<r;n++)i=i.next;for(var s=[],n=0;i&&n<e;n++)s.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var n=0;n<t.length;n++)i=io(this,i,t[n]);return s};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 io(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 so(r,e){r.tail=new z(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function oo(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{tn()(y)}catch{}});var cn=f((jc,ln)=>{"use strict";var ao=nn(),Y=Symbol("max"),H=Symbol("length"),ne=Symbol("lengthCalculator"),Ae=Symbol("allowStale"),Z=Symbol("maxAge"),F=Symbol("dispose"),sn=Symbol("noDisposeOnSet"),O=Symbol("lruList"),L=Symbol("cache"),an=Symbol("updateAgeOnGet"),lt=()=>1,ut=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||lt;if(this[ne]=typeof n!="function"?lt:n,this[Ae]=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[sn]=e.noDisposeOnSet||!1,this[an]=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,Se(this)}get max(){return this[Y]}set allowStale(e){this[Ae]=!!e}get allowStale(){return this[Ae]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Z]=e,Se(this)}get maxAge(){return this[Z]}set lengthCalculator(e){typeof e!="function"&&(e=lt),e!==this[ne]&&(this[ne]=e,this[H]=0,this[O].forEach(t=>{t.length=this[ne](t.value,t.key),this[H]+=t.length})),Se(this)}get lengthCalculator(){return this[ne]}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 i=n.prev;on(this,e,n,t),n=i}}forEach(e,t){t=t||this;for(let n=this[O].head;n!==null;){let i=n.next;on(this,e,n,t),n=i}}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 ao,this[H]=0}dump(){return this[O].map(e=>Ue(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 i=n?Date.now():0,s=this[ne](t,e);if(this[L].has(e)){if(s>this[Y])return ie(this,this[L].get(e)),!1;let c=this[L].get(e).value;return this[F]&&(this[sn]||this[F](e,c.value)),c.now=i,c.maxAge=n,c.value=t,this[H]+=s-c.length,c.length=s,this.get(e),Se(this),!0}let a=new ht(e,t,s,i,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),Se(this),!0)}has(e){if(!this[L].has(e))return!1;let t=this[L].get(e).value;return!Ue(this,t)}get(e){return ct(this,e,!0)}peek(e){return ct(this,e,!1)}pop(){let e=this[O].tail;return e?(ie(this,e),e.value):null}del(e){ie(this,this[L].get(e))}load(e){this.reset();let t=Date.now();for(let n=e.length-1;n>=0;n--){let i=e[n],s=i.e||0;if(s===0)this.set(i.k,i.v);else{let a=s-t;a>0&&this.set(i.k,i.v,a)}}}prune(){this[L].forEach((e,t)=>ct(this,t,!1))}},ct=(r,e,t)=>{let n=r[L].get(e);if(n){let i=n.value;if(Ue(r,i)){if(ie(r,n),!r[Ae])return}else t&&(r[an]&&(n.value.now=Date.now()),r[O].unshiftNode(n));return i.value}},Ue=(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]},Se=r=>{if(r[H]>r[Y])for(let e=r[O].tail;r[H]>r[Y]&&e!==null;){let t=e.prev;ie(r,e),e=t}},ie=(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)}},ht=class{constructor(e,t,n,i,s){this.key=e,this.value=t,this.length=n,this.now=i,this.maxAge=s||0}},on=(r,e,t,n)=>{let i=t.value;Ue(r,i)&&(ie(r,t),r[Ae]||(i=void 0)),i&&e.call(n,i.value,i.key,r)};ln.exports=ut});var D=f((Fc,pn)=>{var J=class{constructor(e,t){if(t=co(t),e instanceof J)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new J(e.raw,t);if(e instanceof ft)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(i=>!hn(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&mo(i[0])){this.set=[i];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=un.get(n);if(i)return i;let s=this.options.loose,a=s?I[x.HYPHENRANGELOOSE]:I[x.HYPHENRANGE];e=e.replace(a,Ao(this.options.includePrerelease)),b("hyphen replace",e),e=e.replace(I[x.COMPARATORTRIM],ho),b("comparator trim",e),e=e.replace(I[x.TILDETRIM],fo),e=e.replace(I[x.CARETTRIM],po),e=e.split(/\s+/).join(" ");let l=e.split(" ").map(h=>go(h,this.options)).join(" ").split(/\s+/).map(h=>So(h,this.options));s&&(l=l.filter(h=>(b("loose invalid filter",h,this.options),!!h.match(I[x.COMPARATORLOOSE])))),b("range list",l);let c=new Map,o=l.map(h=>new ft(h,this.options));for(let h of o){if(hn(h))return[h];c.set(h.value,h)}c.size>1&&c.has("")&&c.delete("");let u=[...c.values()];return un.set(n,u),u}intersects(e,t){if(!(e instanceof J))throw new TypeError("a Range is required");return this.set.some(n=>fn(n,t)&&e.set.some(i=>fn(i,t)&&n.every(s=>i.every(a=>s.intersects(a,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new uo(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(xo(this.set[t],e,this.options))return!0;return!1}};pn.exports=J;var lo=cn(),un=new lo({max:1e3}),co=be(),ft=xe(),b=we(),uo=S(),{re:I,t:x,comparatorTrimReplace:ho,tildeTrimReplace:fo,caretTrimReplace:po}=W(),hn=r=>r.value==="<0.0.0-0",mo=r=>r.value==="",fn=(r,e)=>{let t=!0,n=r.slice(),i=n.pop();for(;t&&n.length;)t=n.every(s=>i.intersects(s,e)),i=n.pop();return t},go=(r,e)=>(b("comp",r,e),r=yo(r,e),b("caret",r),r=vo(r,e),b("tildes",r),r=wo(r,e),b("xrange",r),r=Oo(r,e),b("stars",r),r),C=r=>!r||r.toLowerCase()==="x"||r==="*",vo=(r,e)=>r.trim().split(/\s+/).map(t=>_o(t,e)).join(" "),_o=(r,e)=>{let t=e.loose?I[x.TILDELOOSE]:I[x.TILDE];return r.replace(t,(n,i,s,a,l)=>{b("tilde",r,n,i,s,a,l);let c;return C(i)?c="":C(s)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:C(a)?c=`>=${i}.${s}.0 <${i}.${+s+1}.0-0`:l?(b("replaceTilde pr",l),c=`>=${i}.${s}.${a}-${l} <${i}.${+s+1}.0-0`):c=`>=${i}.${s}.${a} <${i}.${+s+1}.0-0`,b("tilde return",c),c})},yo=(r,e)=>r.trim().split(/\s+/).map(t=>Eo(t,e)).join(" "),Eo=(r,e)=>{b("caret",r,e);let t=e.loose?I[x.CARETLOOSE]:I[x.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(i,s,a,l,c)=>{b("caret",r,i,s,a,l,c);let o;return C(s)?o="":C(a)?o=`>=${s}.0.0${n} <${+s+1}.0.0-0`:C(l)?s==="0"?o=`>=${s}.${a}.0${n} <${s}.${+a+1}.0-0`:o=`>=${s}.${a}.0${n} <${+s+1}.0.0-0`:c?(b("replaceCaret pr",c),s==="0"?a==="0"?o=`>=${s}.${a}.${l}-${c} <${s}.${a}.${+l+1}-0`:o=`>=${s}.${a}.${l}-${c} <${s}.${+a+1}.0-0`:o=`>=${s}.${a}.${l}-${c} <${+s+1}.0.0-0`):(b("no pr"),s==="0"?a==="0"?o=`>=${s}.${a}.${l}${n} <${s}.${a}.${+l+1}-0`:o=`>=${s}.${a}.${l}${n} <${s}.${+a+1}.0-0`:o=`>=${s}.${a}.${l} <${+s+1}.0.0-0`),b("caret return",o),o})},wo=(r,e)=>(b("replaceXRanges",r,e),r.split(/\s+/).map(t=>bo(t,e)).join(" ")),bo=(r,e)=>{r=r.trim();let t=e.loose?I[x.XRANGELOOSE]:I[x.XRANGE];return r.replace(t,(n,i,s,a,l,c)=>{b("xRange",r,n,i,s,a,l,c);let o=C(s),u=o||C(a),h=u||C(l),v=h;return i==="="&&v&&(i=""),c=e.includePrerelease?"-0":"",o?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&v?(u&&(a=0),l=0,i===">"?(i=">=",u?(s=+s+1,a=0,l=0):(a=+a+1,l=0)):i==="<="&&(i="<",u?s=+s+1:a=+a+1),i==="<"&&(c="-0"),n=`${i+s}.${a}.${l}${c}`):u?n=`>=${s}.0.0${c} <${+s+1}.0.0-0`:h&&(n=`>=${s}.${a}.0${c} <${s}.${+a+1}.0-0`),b("xRange return",n),n})},Oo=(r,e)=>(b("replaceStars",r,e),r.trim().replace(I[x.STAR],"")),So=(r,e)=>(b("replaceGTE0",r,e),r.trim().replace(I[e.includePrerelease?x.GTE0PRE:x.GTE0],"")),Ao=r=>(e,t,n,i,s,a,l,c,o,u,h,v,m)=>(C(n)?t="":C(i)?t=`>=${n}.0.0${r?"-0":""}`:C(s)?t=`>=${n}.${i}.0${r?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,C(o)?c="":C(u)?c=`<${+o+1}.0.0-0`:C(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()),xo=(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!==ft.ANY&&r[n].semver.prerelease.length>0){let i=r[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var xe=f((Hc,_n)=>{var Ce=Symbol("SemVer ANY"),se=class{static get ANY(){return Ce}constructor(e,t){if(t=Co(t),e instanceof se){if(e.loose===!!t.loose)return e;e=e.value}dt("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,dt("comp",this)}parse(e){let t=this.options.loose?dn[mn.COMPARATORLOOSE]:dn[mn.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 gn(n[2],this.options.loose):this.semver=Ce}toString(){return this.value}test(e){if(dt("Comparator.test",e,this.options.loose),this.semver===Ce||e===Ce)return!0;if(typeof e=="string")try{e=new gn(e,this.options)}catch{return!1}return pt(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof se))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new vn(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new vn(this.value,t).test(e.semver);let n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),s=this.semver.version===e.semver.version,a=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),l=pt(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),c=pt(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||s&&a||l||c}};_n.exports=se;var Co=be(),{re:dn,t:mn}=W(),pt=at(),dt=we(),gn=S(),vn=D()});var $e=f((Mc,yn)=>{var $o=D(),Io=(r,e,t)=>{try{e=new $o(e,t)}catch{return!1}return e.test(r)};yn.exports=Io});var wn=f((Gc,En)=>{var Ro=D(),qo=(r,e)=>new Ro(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));En.exports=qo});var On=f((kc,bn)=>{var No=S(),Po=D(),Do=(r,e,t)=>{let n=null,i=null,s=null;try{s=new Po(e,t)}catch{return null}return r.forEach(a=>{s.test(a)&&(!n||i.compare(a)===-1)&&(n=a,i=new No(n,t))}),n};bn.exports=Do});var An=f((Vc,Sn)=>{var Lo=S(),To=D(),jo=(r,e,t)=>{let n=null,i=null,s=null;try{s=new To(e,t)}catch{return null}return r.forEach(a=>{s.test(a)&&(!n||i.compare(a)===1)&&(n=a,i=new Lo(n,t))}),n};Sn.exports=jo});var $n=f((Xc,Cn)=>{var mt=S(),Fo=D(),xn=Oe(),Ho=(r,e)=>{r=new Fo(r,e);let t=new mt("0.0.0");if(r.test(t)||(t=new mt("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n<r.set.length;++n){let i=r.set[n],s=null;i.forEach(a=>{let l=new mt(a.semver.version);switch(a.operator){case">":l.prerelease.length===0?l.patch++:l.prerelease.push(0),l.raw=l.format();case"":case">=":(!s||xn(l,s))&&(s=l);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),s&&(!t||xn(t,s))&&(t=s)}return t&&r.test(t)?t:null};Cn.exports=Ho});var Rn=f((Uc,In)=>{var Mo=D(),Go=(r,e)=>{try{return new Mo(r,e).range||"*"}catch{return null}};In.exports=Go});var We=f((Wc,Dn)=>{var ko=S(),Pn=xe(),{ANY:Vo}=Pn,Xo=D(),Uo=$e(),qn=Oe(),Nn=Me(),Wo=ke(),Bo=Ge(),zo=(r,e,t,n)=>{r=new ko(r,n),e=new Xo(e,n);let i,s,a,l,c;switch(t){case">":i=qn,s=Wo,a=Nn,l=">",c=">=";break;case"<":i=Nn,s=Bo,a=qn,l="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Uo(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===Vo&&(m=new Pn(">=0.0.0")),h=h||m,v=v||m,i(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)&&s(r,v.semver))return!1;if(v.operator===c&&a(r,v.semver))return!1}return!0};Dn.exports=zo});var Tn=f((Bc,Ln)=>{var Yo=We(),Zo=(r,e,t)=>Yo(r,e,">",t);Ln.exports=Zo});var Fn=f((zc,jn)=>{var Jo=We(),Ko=(r,e,t)=>Jo(r,e,"<",t);jn.exports=Ko});var Gn=f((Yc,Mn)=>{var Hn=D(),Qo=(r,e,t)=>(r=new Hn(r,t),e=new Hn(e,t),r.intersects(e));Mn.exports=Qo});var Vn=f((Zc,kn)=>{var ea=$e(),ta=P();kn.exports=(r,e,t)=>{let n=[],i=null,s=null,a=r.sort((u,h)=>ta(u,h,t));for(let u of a)ea(u,e,t)?(s=u,i||(i=u)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,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 zn=f((Jc,Bn)=>{var Xn=D(),Be=xe(),{ANY:gt}=Be,Ie=$e(),vt=P(),ra=(r,e,t={})=>{if(r===e)return!0;r=new Xn(r,t),e=new Xn(e,t);let n=!1;e:for(let i of r.set){for(let s of e.set){let a=na(i,s,t);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},na=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===gt){if(e.length===1&&e[0].semver===gt)return!0;t.includePrerelease?r=[new Be(">=0.0.0-0")]:r=[new Be(">=0.0.0")]}if(e.length===1&&e[0].semver===gt){if(t.includePrerelease)return!0;e=[new Be(">=0.0.0")]}let n=new Set,i,s;for(let m of r)m.operator===">"||m.operator===">="?i=Un(i,m,t):m.operator==="<"||m.operator==="<="?s=Wn(s,m,t):n.add(m.semver);if(n.size>1)return null;let a;if(i&&s){if(a=vt(i.semver,s.semver,t),a>0)return null;if(a===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let m of n){if(i&&!Ie(m,String(i),t)||s&&!Ie(m,String(s),t))return null;for(let Vi of e)if(!Ie(m,String(Vi),t))return!1;return!0}let l,c,o,u,h=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,v=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1;h&&h.prerelease.length===1&&s.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==="<=",i){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=Un(i,m,t),l===m&&l!==i)return!1}else if(i.operator===">="&&!Ie(i.semver,String(m),t))return!1}if(s){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=Wn(s,m,t),c===m&&c!==s)return!1}else if(s.operator==="<="&&!Ie(s.semver,String(m),t))return!1}if(!m.operator&&(s||i)&&a!==0)return!1}return!(i&&o&&!s&&a!==0||s&&u&&!i&&a!==0||v||h)},Un=(r,e,t)=>{if(!r)return e;let n=vt(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},Wn=(r,e,t)=>{if(!r)return e;let n=vt(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};Bn.exports=ra});var Zn=f((Kc,Yn)=>{var _t=W();Yn.exports={re:_t.re,src:_t.src,tokens:_t.t,SEMVER_SPEC_VERSION:Ee().SEMVER_SPEC_VERSION,SemVer:S(),compareIdentifiers:Le().compareIdentifiers,rcompareIdentifiers:Le().rcompareIdentifiers,parse:B(),valid:gr(),clean:_r(),inc:wr(),diff:Cr(),major:Ir(),minor:qr(),patch:Pr(),prerelease:Lr(),compare:P(),rcompare:jr(),compareLoose:Hr(),compareBuild:He(),sort:Vr(),rsort:Ur(),gt:Oe(),lt:Me(),eq:Fe(),neq:ot(),gte:Ge(),lte:ke(),cmp:at(),coerce:Qr(),Comparator:xe(),Range:D(),satisfies:$e(),toComparators:wn(),maxSatisfying:On(),minSatisfying:An(),minVersion:$n(),validRange:Rn(),outside:We(),gtr:Tn(),ltr:Fn(),intersects:Gn(),simplifyRange:Vn(),subset:zn()}});var M=f(N=>{"use strict";var ia=N&&N.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),sa=N&&N.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),oa=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)&&ia(e,r,t);return sa(e,r),e},Jn=N&&N.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(N,"__esModule",{value:!0});N.getCoreVersion=void 0;var Kn=Jn(require("path")),Qn=Jn(require("fs")),yt=oa(require("@serverless-devs/core")),aa=Zn(),ei=Kn.default.join(yt.getRootHome(),"cache","core"),Et=Kn.default.join(ei,"package.json");function la(){if(Qn.default.existsSync(Et)){var r=require("@serverless-devs/core/package.json").version,e=ti();return aa.gt(e,r)?require(ei):yt}return yt}function ti(){return Qn.default.existsSync(Et)?require(Et).version:void 0}N.getCoreVersion=ti;N.default=la()});var ze=f(Re=>{"use strict";var ca=Re&&Re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Re,"__esModule",{value:!0});var ua=ca(M()),ha=ua.default.Logger,wt=new ha("S-CLI");wt.success=function(r){return wt.log(r,"green")};Re.default=wt});var St=f(R=>{"use strict";var fa=R&&R.__awaiter||function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,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?s(u.value):i(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},pa=R&&R.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,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,i&&(s=o[0]&2?i.return:o[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;switch(i=0,s&&(o=[o[0]&2,s.value]),o[0]){case 0:case 1:s=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,i=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){t.label=o[1];break}if(o[0]===6&&t.label<s[1]){t.label=s[1],s=o;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(o);break}s[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],i=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},ri=R&&R.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(R,"__esModule",{value:!0});R.handlerProfileFile=R.getConfig=R.setConfig=void 0;var ni=ri(require("path")),Ot=ri(M()),T=Ot.default.fse,Ye=Ot.default.jsyaml,bt=Ot.default.getRootHome;function da(r){var e=si();T.writeFileSync(e,Ye.dump(r))}function ii(){var r=si();if(!T.existsSync(r))return{};try{var e=Ye.load(T.readFileSync(r,"utf8"))||{};return e}catch(t){throw t}}function si(){var r=ni.default.join(bt(),"set-config.yml");return T.existsSync(r)||T.createFileSync(r),r}function ma(r,e){var t=ii();t[r]=e,da(t)}R.setConfig=ma;function ga(r,e){var t=ii();return t[r]||e}R.getConfig=ga;function va(r){return fa(this,void 0,void 0,function(){var e,t,n,i,s,a,l;return pa(this,function(c){switch(c.label){case 0:if(e=r.filePath||"set-config.yml",t=ni.default.join(bt(),e),n=T.existsSync(t),i={},n)return[3,5];s=bt(),c.label=1;case 1:return c.trys.push([1,2,,4]),T.statSync(s),[3,4];case 2:return a=c.sent(),[4,T.mkdirSync(s)];case 3:return c.sent(),[3,4];case 4:return[3,6];case 5:try{i=Ye.load(T.readFileSync(t,"utf8"))||{}}catch(o){throw o}c.label=6;case 6:return r.read?[2,i]:(l=r.configKey||"",i[l]=r.data,[4,T.writeFileSync(t,Ye.dump(i))]);case 7:return c.sent(),[2,i]}})})}R.handlerProfileFile=va});var oi=f((ru,_a)=>{_a.exports={name:"@serverless-devs/s",version:"2.1.2-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:"MIT",repository:{type:"git",url:"https://github.com/Serverless-Devs/Serverless-Devs"},bugs:{url:"https://github.com/Serverless-Devs/Serverless-Devs/issues"},scripts:{start:"npm run watch",prewatch:"rm -rf lib/* && cp -r ./src/daemon ./lib",watch:"tsc -w",test:"jest test/special-command.test",prebuild:"rm -rf lib/*",build:"tsc && cp -r ./src/daemon ./lib",postbuild:"./shell/postbuild.sh","test:cov":"jest --coverage",lint:"npm run typecheck && f2elint scan -i src",fix:"f2elint fix",typecheck:"npx tsc -p tsconfig.json --noEmit",update:"rm -rf yarn.lock && rm -rf package-lock.json && rm -rf node_modules && yarn",beta:"npm publish --tag=beta"},main:"./lib/index.js",bin:{s:"bin/s"},devDependencies:{"@serverless-devs/commander":"^6.0.0","@types/jest":"^27.4.0","@types/node":"^14.0.23","@typescript-eslint/eslint-plugin":"^4.14.1","@typescript-eslint/parser":"^4.14.1",ajv:"^8.10.0","babel-eslint":"^10.1.0",boxen:"^5.0.0",dotenv:"^10.0.0",esbuild:"^0.14.0",eslint:"^7.7.0","eslint-config-prettier":"^7.2.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2",husky:"^4.2.3",inquirer:"8.2.0","inquirer-autocomplete-prompt":"^1.3.0",jest:"^27.4.7","latest-version":"^5.1.0","lint-staged":"^10.0.8",open:"^8.4.0","os-locale":"5.0.0",prettier:"^2.2.1",semver:"^7.3.5","semver-diff":"^3.1.1","ts-jest":"^27.1.3","ts-node":"^9.1.1",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},dependencies:{"@serverless-devs/core":"beta","@serverless-devs/ui":"beta"}}});var xt=f(g=>{"use strict";var ya=g&&g.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Ea=g&&g.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),wa=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)&&ya(e,r,t);return Ea(e,r),e},ae=g&&g.__awaiter||function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,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?s(u.value):i(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},le=g&&g.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,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,i&&(s=o[0]&2?i.return:o[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;switch(i=0,s&&(o=[o[0]&2,s.value]),o[0]){case 0:case 1:s=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,i=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){t.label=o[1];break}if(o[0]===6&&t.label<s[1]){t.label=s[1],s=o;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(o);break}s[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],i=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Ze=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 ba=Ze(require("path")),qe=Ze(require("fs")),Oa=Ze(require("os")),$=wa(M()),Sa=St(),oe=Ze(ze()),ai=oi(),ce=$.default.colors,Aa=$.default.got,xa=$.default.isDocker,Ca=$.default.isCiCdEnv,k=$.default.lodash,li=$.default.publishHelp,$a=k.get,Ia=k.trim,Ra=k.assign,qa=k.filter,ci=k.includes,Na=k.omit,Pa=k.isPlainObject,Da=k.isEmpty,La=ce.underline,Ta=ce.bold;g.red=ce.hex("#fd5750");g.yellow=ce.hex("#F3F99D");g.bgRed=ce.hex("#000").bgHex("#fd5750");var ja=function(){var r=process.env.serverless_devs_temp_argv;try{var e=JSON.parse(r),t=$.default.getGlobalArgs(e);return process.argv=process.argv.slice(0,2).concat(t._argsObj),Ra({},t,{noHelpArgv:process.argv.slice(0,2).concat(qa(t._argsObj,function(n){return!ci(["-h","--help"],n)}))})}catch{return{}}};g.getProcessArgv=ja;var Fa=function(r){return ae(void 0,void 0,void 0,function(){var e,t;return le(this,function(n){switch(n.label){case 0:return[4,$.default.getCredentialAliasList()];case 1:return e=n.sent(),ci(e,r)?[4,$.default.getCredential(r)]:[3,3];case 2:return t=n.sent(),[2,t];case 3:return[2]}})})};g.getCredentialWithExisted=Fa;var Ha=function(){return ae(void 0,void 0,void 0,function(){var r,e,t,n,i,s;return le(this,function(a){switch(a.label){case 0:return[4,$.default.getCredentialAliasList()];case 1:if(r=a.sent(),!(r.length>0))return[3,6];e={},t=0,n=r,a.label=2;case 2:return t<n.length?(i=n[t],[4,$.default.getCredential(i)]):[3,5];case 3:s=a.sent(),e[s.Alias]=Na(s,"Alias"),a.label=4;case 4:return t++,[3,2];case 5:return[2,e];case 6:return[2]}})})};g.getCredentialWithAll=Ha;var Ma=function(r,e){return e===void 0&&(e="unknow"),ae(void 0,void 0,void 0,function(){var t,n,i,s;return le(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t=(0,Sa.getConfig)("analysis"),t!=="enable"?[2]:xa()||Ca()?[2]:[4,Aa("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(),i=$a(n.body,"shorturl"),i&&oe.default.log(`AI Tips:
|
|
16
|
-
You can try to solve the problem through: `.concat(
|
|
17
|
-
`)),[3,3];case 2:return s=a.sent(),[3,3];case 3:return[2]}})})};g.aiRequest=
|
|
18
|
-
`.concat(
|
|
19
|
-
`)),t=e.Commands,t){n=
|
|
20
|
-
`)),!
|
|
21
|
-
`:"")}return[2]}})})}g.specifyServiceHelp=Ba});var fi=f(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.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 pi=f($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.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 mi=f(Ne=>{"use strict";var di=Ne&&Ne.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ne,"__esModule",{value:!0});var za=xt(),Ya=di(fi()),Za=di(pi()),It={en:Za.default,zh:Ya.default},Ja=function(r){var e=(0,za.getLang)(),t=It[e]?It[e][r]:It.en[r];return t||r};Ne.default=Ja});var Pe=f(A=>{"use strict";var Ka=A&&A.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),gi=A&&A.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Ka(e,r,t)},Rt=A&&A.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(A,"__esModule",{value:!0});A.registerCommandChecker=A.i18n=A.logger=void 0;var Qa=Rt(ze());gi(xt(),A);gi(St(),A);var el=ze();Object.defineProperty(A,"logger",{enumerable:!0,get:function(){return Rt(el).default}});var tl=mi();Object.defineProperty(A,"i18n",{enumerable:!0,get:function(){return Rt(tl).default}});function rl(r){r.on("command:*",function(e){var t=r.commands.map(function(n){return n.name()});t.includes(e[0])||(Qa.default.error(" error: unknown command ".concat(e[0])),r.help())})}A.registerCommandChecker=rl});var K=f(ue=>{"use strict";var nl=ue&&ue.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ue,"__esModule",{value:!0});ue.ServerlessError=void 0;var il=nl(M()),sl=il.default.Logger,ol=new sl("S-CLI-ERROR"),al=function(){function r(e,t,n){ol.error(e+": "+t,n),process.exit(1)}return r}();ue.ServerlessError=al});var vi=f(he=>{"use strict";var ll=he&&he.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},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.CommandError=void 0;var cl=K(),ul=function(r){ll(e,r);function e(t,n){return r.call(this,"Error",t,n)||this}return e}(cl.ServerlessError);he.CommandError=ul});var _i=f(fe=>{"use strict";var hl=fe&&fe.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},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.ConfigDeleteError=void 0;var fl=K(),pl=function(r){hl(e,r);function e(t,n){return r.call(this,"Deletion failed",t,n)||this}return e}(fl.ServerlessError);fe.ConfigDeleteError=pl});var yi=f(pe=>{"use strict";var dl=pe&&pe.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},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.ConfigError=void 0;var ml=K(),gl=function(r){dl(e,r);function e(t,n){return r.call(this,"Config failed",t,n)||this}return e}(ml.ServerlessError);pe.ConfigError=gl});var Ei=f(de=>{"use strict";var vl=de&&de.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},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.ConfigGetError=void 0;var _l=K(),yl=function(r){vl(e,r);function e(t,n){return r.call(this,"Get failed",t,n)||this}return e}(_l.ServerlessError);de.ConfigGetError=yl});var wi=f(me=>{"use strict";var El=me&&me.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},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(me,"__esModule",{value:!0});me.InitError=void 0;var wl=K(),bl=function(r){El(e,r);function e(t,n){return r.call(this,"Initialization failed",t,n)||this}return e}(wl.ServerlessError);me.InitError=bl});var Oi=f(j=>{"use strict";var Ol=j&&j.__awaiter||function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,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?s(u.value):i(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},Sl=j&&j.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,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,i&&(s=o[0]&2?i.return:o[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;switch(i=0,s&&(o=[o[0]&2,s.value]),o[0]){case 0:case 1:s=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,i=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){t.label=o[1];break}if(o[0]===6&&t.label<s[1]){t.label=s[1],s=o;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(o);break}s[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],i=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Al=j&&j.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(j,"__esModule",{value:!0});j.HumanError=void 0;var bi=Al(M()),Je=Pe(),xl=bi.default.colors,Cl=function(){function r(e){var t=e.errorMessage,n=e.tips;this.errorMessage=t,Je.logger.log(`
|
|
22
|
-
`.concat((0,
|
|
23
|
-
`)),n&&
|
|
24
|
-
`))}return r.prototype.report=function(e){return
|
|
25
|
-
`.concat(
|
|
26
|
-
`)),n&&
|
|
27
|
-
`))}return r}();
|
|
28
|
-
`):"",c=a.tips?"* ".concat(
|
|
15
|
+
`)}function kt(r,e,t){return r.match(/[\n]\s+/)||e<40?r:Wt(r,e,t)}function Vt(r,e){r._hasHelpOption&&e.find(n=>n===r._helpLongFlag||n===r._helpShortFlag)&&(r.outputHelp(),r._exit(0,"commander.helpDisplayed","(outputHelp)"))}function Xt(r){let e=r.name+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}function Bt(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 Ut(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",i="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?i=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],n=s[3],i=s[4]),t&&i!=="0"?`${t}=${n}:${parseInt(i)+1}`:e})}});var _e=f((Kl,Zt)=>{var ki="2.0.0",Vi=Number.MAX_SAFE_INTEGER||9007199254740991,Xi=16;Zt.exports={SEMVER_SPEC_VERSION:ki,MAX_LENGTH:256,MAX_SAFE_INTEGER:Vi,MAX_SAFE_COMPONENT_LENGTH:Xi}});var ye=f((Ql,Jt)=>{var Ui=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Jt.exports=Ui});var W=f((G,Kt)=>{var{MAX_SAFE_COMPONENT_LENGTH:nt}=_e(),Wi=ye();G=Kt.exports={};var Bi=G.re=[],p=G.src=[],d=G.t={},zi=0,_=(r,e,t)=>{let n=zi++;Wi(r,n,e),d[r]=n,p[n]=e,Bi[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,${nt}})(?:\\.(\\d{1,${nt}}))?(?:\\.(\\d{1,${nt}}))?(?:$|[^\\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((ec,Qt)=>{var Yi=["includePrerelease","loose","rtl"],Zi=r=>r?typeof r!="object"?{loose:!0}:Yi.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};Qt.exports=Zi});var Pe=f((tc,rr)=>{var er=/^[0-9]+$/,tr=(r,e)=>{let t=er.test(r),n=er.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},Ji=(r,e)=>tr(e,r);rr.exports={compareIdentifiers:tr,rcompareIdentifiers:Ji}});var S=f((rc,or)=>{var De=ye(),{MAX_LENGTH:nr,MAX_SAFE_INTEGER:Le}=_e(),{re:ir,t:sr}=W(),Ki=Ee(),{compareIdentifiers:te}=Pe(),q=class{constructor(e,t){if(t=Ki(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>nr)throw new TypeError(`version is longer than ${nr} characters`);De("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?ir[sr.LOOSE]:ir[sr.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>Le||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Le||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Le||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let s=+i;if(s>=0&&s<Le)return s}return i}):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(De("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],i=e.prerelease[t];if(De("prerelease compare",t,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return te(n,i)}while(++t)}compareBuild(e){e instanceof q||(e=new q(e,this.options));let t=0;do{let n=this.build[t],i=e.build[t];if(De("prerelease compare",t,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return te(n,i)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let 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}};or.exports=q});var B=f((nc,ur)=>{var{MAX_LENGTH:Qi}=_e(),{re:ar,t:lr}=W(),cr=S(),es=Ee(),ts=(r,e)=>{if(e=es(e),r instanceof cr)return r;if(typeof r!="string"||r.length>Qi||!(e.loose?ar[lr.LOOSE]:ar[lr.FULL]).test(r))return null;try{return new cr(r,e)}catch{return null}};ur.exports=ts});var fr=f((ic,hr)=>{var rs=B(),ns=(r,e)=>{let t=rs(r,e);return t?t.version:null};hr.exports=ns});var dr=f((sc,pr)=>{var is=B(),ss=(r,e)=>{let t=is(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};pr.exports=ss});var vr=f((oc,gr)=>{var mr=S(),os=(r,e,t,n)=>{typeof t=="string"&&(n=t,t=void 0);try{return new mr(r instanceof mr?r.version:r,t).inc(e,n).version}catch{return null}};gr.exports=os});var P=f((ac,yr)=>{var _r=S(),as=(r,e,t)=>new _r(r,t).compare(new _r(e,t));yr.exports=as});var Te=f((lc,Er)=>{var ls=P(),cs=(r,e,t)=>ls(r,e,t)===0;Er.exports=cs});var Or=f((cc,br)=>{var wr=B(),us=Te(),hs=(r,e)=>{if(us(r,e))return null;{let t=wr(r),n=wr(e),i=t.prerelease.length||n.prerelease.length,s=i?"pre":"",a=i?"prerelease":"";for(let l in t)if((l==="major"||l==="minor"||l==="patch")&&t[l]!==n[l])return s+l;return a}};br.exports=hs});var Ar=f((uc,Sr)=>{var fs=S(),ps=(r,e)=>new fs(r,e).major;Sr.exports=ps});var Cr=f((hc,xr)=>{var ds=S(),ms=(r,e)=>new ds(r,e).minor;xr.exports=ms});var Ir=f((fc,$r)=>{var gs=S(),vs=(r,e)=>new gs(r,e).patch;$r.exports=vs});var qr=f((pc,Rr)=>{var _s=B(),ys=(r,e)=>{let t=_s(r,e);return t&&t.prerelease.length?t.prerelease:null};Rr.exports=ys});var Pr=f((dc,Nr)=>{var Es=P(),ws=(r,e,t)=>Es(e,r,t);Nr.exports=ws});var Lr=f((mc,Dr)=>{var bs=P(),Os=(r,e)=>bs(r,e,!0);Dr.exports=Os});var je=f((gc,jr)=>{var Tr=S(),Ss=(r,e,t)=>{let n=new Tr(r,t),i=new Tr(e,t);return n.compare(i)||n.compareBuild(i)};jr.exports=Ss});var Hr=f((vc,Fr)=>{var As=je(),xs=(r,e)=>r.sort((t,n)=>As(t,n,e));Fr.exports=xs});var Gr=f((_c,Mr)=>{var Cs=je(),$s=(r,e)=>r.sort((t,n)=>Cs(n,t,e));Mr.exports=$s});var we=f((yc,kr)=>{var Is=P(),Rs=(r,e,t)=>Is(r,e,t)>0;kr.exports=Rs});var Fe=f((Ec,Vr)=>{var qs=P(),Ns=(r,e,t)=>qs(r,e,t)<0;Vr.exports=Ns});var it=f((wc,Xr)=>{var Ps=P(),Ds=(r,e,t)=>Ps(r,e,t)!==0;Xr.exports=Ds});var He=f((bc,Ur)=>{var Ls=P(),Ts=(r,e,t)=>Ls(r,e,t)>=0;Ur.exports=Ts});var Me=f((Oc,Wr)=>{var js=P(),Fs=(r,e,t)=>js(r,e,t)<=0;Wr.exports=Fs});var st=f((Sc,Br)=>{var Hs=Te(),Ms=it(),Gs=we(),ks=He(),Vs=Fe(),Xs=Me(),Us=(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 Hs(r,t,n);case"!=":return Ms(r,t,n);case">":return Gs(r,t,n);case">=":return ks(r,t,n);case"<":return Vs(r,t,n);case"<=":return Xs(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};Br.exports=Us});var Yr=f((Ac,zr)=>{var Ws=S(),Bs=B(),{re:Ge,t:ke}=W(),zs=(r,e)=>{if(r instanceof Ws)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(Ge[ke.COERCE]);else{let n;for(;(n=Ge[ke.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||n.index+n[0].length!==t.index+t[0].length)&&(t=n),Ge[ke.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Ge[ke.COERCERTL].lastIndex=-1}return t===null?null:Bs(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};zr.exports=zs});var Jr=f((xc,Zr)=>{"use strict";Zr.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Qr=f((Cc,Kr)=>{"use strict";Kr.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(i){e.push(i)});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++)Zs(this,arguments[r]);return this.length};y.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)Js(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 i=0;n!==null;i++)t=r(t,n.value,i),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 i=this.length-1;n!==null;i--)t=r(t,n.value,i),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,i=this.head;i!==null&&n<r;n++)i=i.next;for(;i!==null&&n<e;n++,i=i.next)t.push(i.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,i=this.tail;i!==null&&n>e;n--)i=i.prev;for(;i!==null&&n>r;n--,i=i.prev)t.push(i.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,i=this.head;i!==null&&n<r;n++)i=i.next;for(var s=[],n=0;i&&n<e;n++)s.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var n=0;n<t.length;n++)i=Ys(this,i,t[n]);return s};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 Ys(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 Zs(r,e){r.tail=new z(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function Js(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{Jr()(y)}catch{}});var sn=f(($c,nn)=>{"use strict";var Ks=Qr(),Y=Symbol("max"),H=Symbol("length"),re=Symbol("lengthCalculator"),Oe=Symbol("allowStale"),Z=Symbol("maxAge"),F=Symbol("dispose"),en=Symbol("noDisposeOnSet"),O=Symbol("lruList"),L=Symbol("cache"),rn=Symbol("updateAgeOnGet"),ot=()=>1,lt=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||ot;if(this[re]=typeof n!="function"?ot: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[en]=e.noDisposeOnSet||!1,this[rn]=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,be(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,be(this)}get maxAge(){return this[Z]}set lengthCalculator(e){typeof e!="function"&&(e=ot),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})),be(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 i=n.prev;tn(this,e,n,t),n=i}}forEach(e,t){t=t||this;for(let n=this[O].head;n!==null;){let i=n.next;tn(this,e,n,t),n=i}}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 Ks,this[H]=0}dump(){return this[O].map(e=>Ve(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 i=n?Date.now():0,s=this[re](t,e);if(this[L].has(e)){if(s>this[Y])return ne(this,this[L].get(e)),!1;let c=this[L].get(e).value;return this[F]&&(this[en]||this[F](e,c.value)),c.now=i,c.maxAge=n,c.value=t,this[H]+=s-c.length,c.length=s,this.get(e),be(this),!0}let a=new ct(e,t,s,i,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),be(this),!0)}has(e){if(!this[L].has(e))return!1;let t=this[L].get(e).value;return!Ve(this,t)}get(e){return at(this,e,!0)}peek(e){return at(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 i=e[n],s=i.e||0;if(s===0)this.set(i.k,i.v);else{let a=s-t;a>0&&this.set(i.k,i.v,a)}}}prune(){this[L].forEach((e,t)=>at(this,t,!1))}},at=(r,e,t)=>{let n=r[L].get(e);if(n){let i=n.value;if(Ve(r,i)){if(ne(r,n),!r[Oe])return}else t&&(r[rn]&&(n.value.now=Date.now()),r[O].unshiftNode(n));return i.value}},Ve=(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]},be=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)}},ct=class{constructor(e,t,n,i,s){this.key=e,this.value=t,this.length=n,this.now=i,this.maxAge=s||0}},tn=(r,e,t,n)=>{let i=t.value;Ve(r,i)&&(ne(r,t),r[Oe]||(i=void 0)),i&&e.call(n,i.value,i.key,r)};nn.exports=lt});var D=f((Ic,cn)=>{var J=class{constructor(e,t){if(t=eo(t),e instanceof J)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new J(e.raw,t);if(e instanceof ut)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(i=>!an(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&so(i[0])){this.set=[i];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=on.get(n);if(i)return i;let s=this.options.loose,a=s?I[x.HYPHENRANGELOOSE]:I[x.HYPHENRANGE];e=e.replace(a,go(this.options.includePrerelease)),b("hyphen replace",e),e=e.replace(I[x.COMPARATORTRIM],ro),b("comparator trim",e),e=e.replace(I[x.TILDETRIM],no),e=e.replace(I[x.CARETTRIM],io),e=e.split(/\s+/).join(" ");let l=e.split(" ").map(h=>oo(h,this.options)).join(" ").split(/\s+/).map(h=>mo(h,this.options));s&&(l=l.filter(h=>(b("loose invalid filter",h,this.options),!!h.match(I[x.COMPARATORLOOSE])))),b("range list",l);let c=new Map,o=l.map(h=>new ut(h,this.options));for(let h of o){if(an(h))return[h];c.set(h.value,h)}c.size>1&&c.has("")&&c.delete("");let u=[...c.values()];return on.set(n,u),u}intersects(e,t){if(!(e instanceof J))throw new TypeError("a Range is required");return this.set.some(n=>ln(n,t)&&e.set.some(i=>ln(i,t)&&n.every(s=>i.every(a=>s.intersects(a,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new to(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(vo(this.set[t],e,this.options))return!0;return!1}};cn.exports=J;var Qs=sn(),on=new Qs({max:1e3}),eo=Ee(),ut=Se(),b=ye(),to=S(),{re:I,t:x,comparatorTrimReplace:ro,tildeTrimReplace:no,caretTrimReplace:io}=W(),an=r=>r.value==="<0.0.0-0",so=r=>r.value==="",ln=(r,e)=>{let t=!0,n=r.slice(),i=n.pop();for(;t&&n.length;)t=n.every(s=>i.intersects(s,e)),i=n.pop();return t},oo=(r,e)=>(b("comp",r,e),r=co(r,e),b("caret",r),r=ao(r,e),b("tildes",r),r=ho(r,e),b("xrange",r),r=po(r,e),b("stars",r),r),C=r=>!r||r.toLowerCase()==="x"||r==="*",ao=(r,e)=>r.trim().split(/\s+/).map(t=>lo(t,e)).join(" "),lo=(r,e)=>{let t=e.loose?I[x.TILDELOOSE]:I[x.TILDE];return r.replace(t,(n,i,s,a,l)=>{b("tilde",r,n,i,s,a,l);let c;return C(i)?c="":C(s)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:C(a)?c=`>=${i}.${s}.0 <${i}.${+s+1}.0-0`:l?(b("replaceTilde pr",l),c=`>=${i}.${s}.${a}-${l} <${i}.${+s+1}.0-0`):c=`>=${i}.${s}.${a} <${i}.${+s+1}.0-0`,b("tilde return",c),c})},co=(r,e)=>r.trim().split(/\s+/).map(t=>uo(t,e)).join(" "),uo=(r,e)=>{b("caret",r,e);let t=e.loose?I[x.CARETLOOSE]:I[x.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(i,s,a,l,c)=>{b("caret",r,i,s,a,l,c);let o;return C(s)?o="":C(a)?o=`>=${s}.0.0${n} <${+s+1}.0.0-0`:C(l)?s==="0"?o=`>=${s}.${a}.0${n} <${s}.${+a+1}.0-0`:o=`>=${s}.${a}.0${n} <${+s+1}.0.0-0`:c?(b("replaceCaret pr",c),s==="0"?a==="0"?o=`>=${s}.${a}.${l}-${c} <${s}.${a}.${+l+1}-0`:o=`>=${s}.${a}.${l}-${c} <${s}.${+a+1}.0-0`:o=`>=${s}.${a}.${l}-${c} <${+s+1}.0.0-0`):(b("no pr"),s==="0"?a==="0"?o=`>=${s}.${a}.${l}${n} <${s}.${a}.${+l+1}-0`:o=`>=${s}.${a}.${l}${n} <${s}.${+a+1}.0-0`:o=`>=${s}.${a}.${l} <${+s+1}.0.0-0`),b("caret return",o),o})},ho=(r,e)=>(b("replaceXRanges",r,e),r.split(/\s+/).map(t=>fo(t,e)).join(" ")),fo=(r,e)=>{r=r.trim();let t=e.loose?I[x.XRANGELOOSE]:I[x.XRANGE];return r.replace(t,(n,i,s,a,l,c)=>{b("xRange",r,n,i,s,a,l,c);let o=C(s),u=o||C(a),h=u||C(l),v=h;return i==="="&&v&&(i=""),c=e.includePrerelease?"-0":"",o?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&v?(u&&(a=0),l=0,i===">"?(i=">=",u?(s=+s+1,a=0,l=0):(a=+a+1,l=0)):i==="<="&&(i="<",u?s=+s+1:a=+a+1),i==="<"&&(c="-0"),n=`${i+s}.${a}.${l}${c}`):u?n=`>=${s}.0.0${c} <${+s+1}.0.0-0`:h&&(n=`>=${s}.${a}.0${c} <${s}.${+a+1}.0-0`),b("xRange return",n),n})},po=(r,e)=>(b("replaceStars",r,e),r.trim().replace(I[x.STAR],"")),mo=(r,e)=>(b("replaceGTE0",r,e),r.trim().replace(I[e.includePrerelease?x.GTE0PRE:x.GTE0],"")),go=r=>(e,t,n,i,s,a,l,c,o,u,h,v,m)=>(C(n)?t="":C(i)?t=`>=${n}.0.0${r?"-0":""}`:C(s)?t=`>=${n}.${i}.0${r?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,C(o)?c="":C(u)?c=`<${+o+1}.0.0-0`:C(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()),vo=(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!==ut.ANY&&r[n].semver.prerelease.length>0){let i=r[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var Se=f((Rc,dn)=>{var Ae=Symbol("SemVer ANY"),ie=class{static get ANY(){return Ae}constructor(e,t){if(t=_o(t),e instanceof ie){if(e.loose===!!t.loose)return e;e=e.value}ft("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Ae?this.value="":this.value=this.operator+this.semver.version,ft("comp",this)}parse(e){let t=this.options.loose?un[hn.COMPARATORLOOSE]:un[hn.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 fn(n[2],this.options.loose):this.semver=Ae}toString(){return this.value}test(e){if(ft("Comparator.test",e,this.options.loose),this.semver===Ae||e===Ae)return!0;if(typeof e=="string")try{e=new fn(e,this.options)}catch{return!1}return ht(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 pn(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new pn(this.value,t).test(e.semver);let n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),s=this.semver.version===e.semver.version,a=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),l=ht(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),c=ht(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||s&&a||l||c}};dn.exports=ie;var _o=Ee(),{re:un,t:hn}=W(),ht=st(),ft=ye(),fn=S(),pn=D()});var xe=f((qc,mn)=>{var yo=D(),Eo=(r,e,t)=>{try{e=new yo(e,t)}catch{return!1}return e.test(r)};mn.exports=Eo});var vn=f((Nc,gn)=>{var wo=D(),bo=(r,e)=>new wo(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));gn.exports=bo});var yn=f((Pc,_n)=>{var Oo=S(),So=D(),Ao=(r,e,t)=>{let n=null,i=null,s=null;try{s=new So(e,t)}catch{return null}return r.forEach(a=>{s.test(a)&&(!n||i.compare(a)===-1)&&(n=a,i=new Oo(n,t))}),n};_n.exports=Ao});var wn=f((Dc,En)=>{var xo=S(),Co=D(),$o=(r,e,t)=>{let n=null,i=null,s=null;try{s=new Co(e,t)}catch{return null}return r.forEach(a=>{s.test(a)&&(!n||i.compare(a)===1)&&(n=a,i=new xo(n,t))}),n};En.exports=$o});var Sn=f((Lc,On)=>{var pt=S(),Io=D(),bn=we(),Ro=(r,e)=>{r=new Io(r,e);let t=new pt("0.0.0");if(r.test(t)||(t=new pt("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n<r.set.length;++n){let i=r.set[n],s=null;i.forEach(a=>{let l=new pt(a.semver.version);switch(a.operator){case">":l.prerelease.length===0?l.patch++:l.prerelease.push(0),l.raw=l.format();case"":case">=":(!s||bn(l,s))&&(s=l);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),s&&(!t||bn(t,s))&&(t=s)}return t&&r.test(t)?t:null};On.exports=Ro});var xn=f((Tc,An)=>{var qo=D(),No=(r,e)=>{try{return new qo(r,e).range||"*"}catch{return null}};An.exports=No});var Xe=f((jc,Rn)=>{var Po=S(),In=Se(),{ANY:Do}=In,Lo=D(),To=xe(),Cn=we(),$n=Fe(),jo=Me(),Fo=He(),Ho=(r,e,t,n)=>{r=new Po(r,n),e=new Lo(e,n);let i,s,a,l,c;switch(t){case">":i=Cn,s=jo,a=$n,l=">",c=">=";break;case"<":i=$n,s=Fo,a=Cn,l="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(To(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===Do&&(m=new In(">=0.0.0")),h=h||m,v=v||m,i(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)&&s(r,v.semver))return!1;if(v.operator===c&&a(r,v.semver))return!1}return!0};Rn.exports=Ho});var Nn=f((Fc,qn)=>{var Mo=Xe(),Go=(r,e,t)=>Mo(r,e,">",t);qn.exports=Go});var Dn=f((Hc,Pn)=>{var ko=Xe(),Vo=(r,e,t)=>ko(r,e,"<",t);Pn.exports=Vo});var jn=f((Mc,Tn)=>{var Ln=D(),Xo=(r,e,t)=>(r=new Ln(r,t),e=new Ln(e,t),r.intersects(e));Tn.exports=Xo});var Hn=f((Gc,Fn)=>{var Uo=xe(),Wo=P();Fn.exports=(r,e,t)=>{let n=[],i=null,s=null,a=r.sort((u,h)=>Wo(u,h,t));for(let u of a)Uo(u,e,t)?(s=u,i||(i=u)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,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 Xn=f((kc,Vn)=>{var Mn=D(),Ue=Se(),{ANY:dt}=Ue,Ce=xe(),mt=P(),Bo=(r,e,t={})=>{if(r===e)return!0;r=new Mn(r,t),e=new Mn(e,t);let n=!1;e:for(let i of r.set){for(let s of e.set){let a=zo(i,s,t);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},zo=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===dt){if(e.length===1&&e[0].semver===dt)return!0;t.includePrerelease?r=[new Ue(">=0.0.0-0")]:r=[new Ue(">=0.0.0")]}if(e.length===1&&e[0].semver===dt){if(t.includePrerelease)return!0;e=[new Ue(">=0.0.0")]}let n=new Set,i,s;for(let m of r)m.operator===">"||m.operator===">="?i=Gn(i,m,t):m.operator==="<"||m.operator==="<="?s=kn(s,m,t):n.add(m.semver);if(n.size>1)return null;let a;if(i&&s){if(a=mt(i.semver,s.semver,t),a>0)return null;if(a===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let m of n){if(i&&!Ce(m,String(i),t)||s&&!Ce(m,String(s),t))return null;for(let Hi of e)if(!Ce(m,String(Hi),t))return!1;return!0}let l,c,o,u,h=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,v=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1;h&&h.prerelease.length===1&&s.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==="<=",i){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=Gn(i,m,t),l===m&&l!==i)return!1}else if(i.operator===">="&&!Ce(i.semver,String(m),t))return!1}if(s){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=kn(s,m,t),c===m&&c!==s)return!1}else if(s.operator==="<="&&!Ce(s.semver,String(m),t))return!1}if(!m.operator&&(s||i)&&a!==0)return!1}return!(i&&o&&!s&&a!==0||s&&u&&!i&&a!==0||v||h)},Gn=(r,e,t)=>{if(!r)return e;let n=mt(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},kn=(r,e,t)=>{if(!r)return e;let n=mt(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};Vn.exports=Bo});var Wn=f((Vc,Un)=>{var gt=W();Un.exports={re:gt.re,src:gt.src,tokens:gt.t,SEMVER_SPEC_VERSION:_e().SEMVER_SPEC_VERSION,SemVer:S(),compareIdentifiers:Pe().compareIdentifiers,rcompareIdentifiers:Pe().rcompareIdentifiers,parse:B(),valid:fr(),clean:dr(),inc:vr(),diff:Or(),major:Ar(),minor:Cr(),patch:Ir(),prerelease:qr(),compare:P(),rcompare:Pr(),compareLoose:Lr(),compareBuild:je(),sort:Hr(),rsort:Gr(),gt:we(),lt:Fe(),eq:Te(),neq:it(),gte:He(),lte:Me(),cmp:st(),coerce:Yr(),Comparator:Se(),Range:D(),satisfies:xe(),toComparators:vn(),maxSatisfying:yn(),minSatisfying:wn(),minVersion:Sn(),validRange:xn(),outside:Xe(),gtr:Nn(),ltr:Dn(),intersects:jn(),simplifyRange:Hn(),subset:Xn()}});var M=f(N=>{"use strict";var Yo=N&&N.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Zo=N&&N.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Jo=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)&&Yo(e,r,t);return Zo(e,r),e},Bn=N&&N.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(N,"__esModule",{value:!0});N.getCoreVersion=void 0;var zn=Bn(require("path")),Yn=Bn(require("fs")),vt=Jo(require("@serverless-devs/core")),Ko=Wn(),Zn=zn.default.join(vt.getRootHome(),"cache","core"),_t=zn.default.join(Zn,"package.json");function Qo(){if(Yn.default.existsSync(_t)){var r=require("@serverless-devs/core/package.json").version,e=Jn();return Ko.gt(e,r)?require(Zn):vt}return vt}function Jn(){return Yn.default.existsSync(_t)?require(_t).version:void 0}N.getCoreVersion=Jn;N.default=Qo()});var We=f($e=>{"use strict";var ea=$e&&$e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($e,"__esModule",{value:!0});var ta=ea(M()),ra=ta.default.Logger,yt=new ra("S-CLI");yt.success=function(r){return yt.log(r,"green")};$e.default=yt});var bt=f(R=>{"use strict";var na=R&&R.__awaiter||function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,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?s(u.value):i(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},ia=R&&R.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,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,i&&(s=o[0]&2?i.return:o[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;switch(i=0,s&&(o=[o[0]&2,s.value]),o[0]){case 0:case 1:s=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,i=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){t.label=o[1];break}if(o[0]===6&&t.label<s[1]){t.label=s[1],s=o;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(o);break}s[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],i=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Kn=R&&R.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(R,"__esModule",{value:!0});R.handlerProfileFile=R.getConfig=R.setConfig=void 0;var Qn=Kn(require("path")),wt=Kn(M()),T=wt.default.fse,Be=wt.default.jsyaml,Et=wt.default.getRootHome;function sa(r){var e=ti();T.writeFileSync(e,Be.dump(r))}function ei(){var r=ti();if(!T.existsSync(r))return{};try{var e=Be.load(T.readFileSync(r,"utf8"))||{};return e}catch(t){throw t}}function ti(){var r=Qn.default.join(Et(),"set-config.yml");return T.existsSync(r)||T.createFileSync(r),r}function oa(r,e){var t=ei();t[r]=e,sa(t)}R.setConfig=oa;function aa(r,e){var t=ei();return t[r]||e}R.getConfig=aa;function la(r){return na(this,void 0,void 0,function(){var e,t,n,i,s,a,l;return ia(this,function(c){switch(c.label){case 0:if(e=r.filePath||"set-config.yml",t=Qn.default.join(Et(),e),n=T.existsSync(t),i={},n)return[3,5];s=Et(),c.label=1;case 1:return c.trys.push([1,2,,4]),T.statSync(s),[3,4];case 2:return a=c.sent(),[4,T.mkdirSync(s)];case 3:return c.sent(),[3,4];case 4:return[3,6];case 5:try{i=Be.load(T.readFileSync(t,"utf8"))||{}}catch(o){throw o}c.label=6;case 6:return r.read?[2,i]:(l=r.configKey||"",i[l]=r.data,[4,T.writeFileSync(t,Be.dump(i))]);case 7:return c.sent(),[2,i]}})})}R.handlerProfileFile=la});var ri=f((Bc,ca)=>{ca.exports={name:"@serverless-devs/s",version:"2.1.3-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:"MIT",repository:{type:"git",url:"https://github.com/Serverless-Devs/Serverless-Devs"},bugs:{url:"https://github.com/Serverless-Devs/Serverless-Devs/issues"},scripts:{start:"npm run watch",prewatch:"rm -rf lib/* && cp -r ./src/daemon ./lib",watch:"tsc -w",test:"jest test/special-command.test",prebuild:"rm -rf lib/*",build:"tsc && cp -r ./src/daemon ./lib",postbuild:"./shell/postbuild.sh","test:cov":"jest --coverage",lint:"npm run typecheck && f2elint scan -i src",fix:"f2elint fix",typecheck:"npx tsc -p tsconfig.json --noEmit",update:"rm -rf yarn.lock && rm -rf package-lock.json && rm -rf node_modules && yarn",beta:"npm publish --tag=beta"},main:"./lib/index.js",bin:{s:"bin/s"},devDependencies:{"@serverless-devs/commander":"^6.0.0","@types/jest":"^27.4.0","@types/node":"^14.0.23","@typescript-eslint/eslint-plugin":"^4.14.1","@typescript-eslint/parser":"^4.14.1",ajv:"^8.10.0","babel-eslint":"^10.1.0",boxen:"^5.0.0",dotenv:"^10.0.0",esbuild:"^0.14.0",eslint:"^7.7.0","eslint-config-prettier":"^7.2.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2",husky:"^4.2.3",inquirer:"8.2.0","inquirer-autocomplete-prompt":"^1.3.0",jest:"^27.4.7","latest-version":"^5.1.0","lint-staged":"^10.0.8",open:"^8.4.0","os-locale":"5.0.0",prettier:"^2.2.1",semver:"^7.3.5","semver-diff":"^3.1.1","ts-jest":"^27.1.3","ts-node":"^9.1.1",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},dependencies:{"@serverless-devs/core":"beta","@serverless-devs/ui":"beta"}}});var St=f(g=>{"use strict";var ua=g&&g.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),ha=g&&g.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),fa=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)&&ua(e,r,t);return ha(e,r),e},oe=g&&g.__awaiter||function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,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?s(u.value):i(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(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,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,i&&(s=o[0]&2?i.return:o[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;switch(i=0,s&&(o=[o[0]&2,s.value]),o[0]){case 0:case 1:s=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,i=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){t.label=o[1];break}if(o[0]===6&&t.label<s[1]){t.label=s[1],s=o;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(o);break}s[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],i=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},ze=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 pa=ze(require("path")),Ie=ze(require("fs")),da=ze(require("os")),$=fa(M()),ma=bt(),se=ze(We()),ni=ri(),le=$.default.colors,ga=$.default.got,va=$.default.isDocker,_a=$.default.isCiCdEnv,k=$.default.lodash,ii=$.default.publishHelp,ya=k.get,Ea=k.trim,wa=k.assign,ba=k.filter,si=k.includes,Oa=k.omit,Sa=k.isPlainObject,Aa=k.isEmpty,xa=le.underline,Ca=le.bold;g.red=le.hex("#fd5750");g.yellow=le.hex("#F3F99D");g.bgRed=le.hex("#000").bgHex("#fd5750");var $a=function(){var r=process.env.serverless_devs_temp_argv;try{var e=JSON.parse(r),t=$.default.getGlobalArgs(e);return process.argv=process.argv.slice(0,2).concat(t._argsObj),wa({},t,{noHelpArgv:process.argv.slice(0,2).concat(ba(t._argsObj,function(n){return!si(["-h","--help"],n)}))})}catch{return{}}};g.getProcessArgv=$a;var Ia=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,$.default.getCredentialAliasList()];case 1:return e=n.sent(),si(e,r)?[4,$.default.getCredential(r)]:[3,3];case 2:return t=n.sent(),[2,t];case 3:return[2]}})})};g.getCredentialWithExisted=Ia;var Ra=function(){return oe(void 0,void 0,void 0,function(){var r,e,t,n,i,s;return ae(this,function(a){switch(a.label){case 0:return[4,$.default.getCredentialAliasList()];case 1:if(r=a.sent(),!(r.length>0))return[3,6];e={},t=0,n=r,a.label=2;case 2:return t<n.length?(i=n[t],[4,$.default.getCredential(i)]):[3,5];case 3:s=a.sent(),e[s.Alias]=Oa(s,"Alias"),a.label=4;case 4:return t++,[3,2];case 5:return[2,e];case 6:return[2]}})})};g.getCredentialWithAll=Ra;var qa=function(r,e){return e===void 0&&(e="unknow"),oe(void 0,void 0,void 0,function(){var t,n,i,s;return ae(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t=(0,ma.getConfig)("analysis"),t!=="enable"?[2]:va()||_a()?[2]:[4,ga("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(),i=ya(n.body,"shorturl"),i&&se.default.log(`AI Tips:
|
|
16
|
+
You can try to solve the problem through: `.concat(le.underline(i),`
|
|
17
|
+
`)),[3,3];case 2:return s=a.sent(),[3,3];case 3:return[2]}})})};g.aiRequest=qa;function Na(){var r=(0,$.getCoreVersion)(),e=["".concat(ni.name,": ").concat(ni.version),r?"core: ".concat(r):void 0,"s-home: ".concat($.default.getRootHome()),"".concat(process.platform,"-").concat(process.arch),"node-".concat(process.version)];return e.filter(function(t){return t}).join(", ")}g.getVersion=Na;function Pa(r){return oe(this,void 0,void 0,function(){function e(i){return oe(this,void 0,void 0,function(){var s,a;return ae(this,function(l){switch(l.label){case 0:return s=Ie.default.lstatSync(i),typeof s!="object"?[2]:(t.set(s.ino,s.size),s.isDirectory()?(a=Ie.default.readdirSync(i),typeof a!="object"?[2]:[4,Promise.all(a.map(function(c){return e(pa.default.join(i,c))}))]):[3,2]);case 1:l.sent(),l.label=2;case 2:return[2]}})})}var t,n;return ae(this,function(i){switch(i.label){case 0:return t=new Map,[4,e(r)];case 1:return i.sent(),n=Array.from(t.values()).reduce(function(s,a){return s+a},0),[2,n]}})})}g.getFolderSize=Pa;function Da(r,e){e===void 0&&(e=" ");for(var t="",n=0;n<r;n++)t=t+e;return t}g.printn=Da;function La(){return"en"}g.getLang=La;function oi(r,e){var t=/\{\{(.*?)\}\}/g,n=r.match(t);if(n)for(var i=0;i<n.length;i++){var s=n[i].replace(/{{|}}/g,""),a=Ea(s.split("|")[0]);e[a]&&(r=r.replace(n[i],e[a]))}return r}g.replaceFun=oi;function Ta(r,e){r.forEach(function(t){if(Ie.default.existsSync(t)){var n=Ie.default.readFileSync(t,"utf-8"),i=oi(n,e);Ie.default.writeFileSync(t,i,"utf-8")}})}g.replaceTemplate=Ta;function ja(r){if(!r)return r;var e=r.slice(-4);return"***********".concat(e)}g.mark=ja;function Ot(r,e){return da.default.platform()==="win32"?e||"\u25C6":"".concat(r," ")}g.emoji=Ot;function ai(r,e){var t=r.length,n=new Array(e-t).fill(" ");return"".concat(r).concat(n.join("")," : ")}g.getTempCommandStr=ai;function Fa(r){return oe(this,void 0,void 0,function(){var e,t,n,i,s,l,a,l;return ae(this,function(c){switch(c.label){case 0:return[4,$.default.getYamlContent(r)];case 1:if(e=c.sent(),se.default.log(`
|
|
18
|
+
`.concat(Ot("\u{1F680}")," ").concat(e.Name,"@").concat(e.Version,": ").concat(e.Description,`
|
|
19
|
+
`)),t=e.Commands,t){n=ii.maxLen(t),i=[],s={};for(l in t)a=t[l],Sa(a)?i.push(ii.helpInfo(a,xa(Ca(l)),n,4)):s[l]=a;if(i.length>0&&se.default.log(i.join(`
|
|
20
|
+
`)),!Aa(s)){for(l in s)se.default.log(" ".concat(ai(l,n)," ").concat(s[l]));se.default.log("")}se.default.log(e.HomePage?" ".concat(Ot("\u{1F9ED}")," ").concat($.default.makeUnderLine("More information: "+e.HomePage)," ")+`
|
|
21
|
+
`:"")}return[2]}})})}g.specifyServiceHelp=Fa});var li=f(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.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 ci=f(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.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 hi=f(Re=>{"use strict";var ui=Re&&Re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Re,"__esModule",{value:!0});var Ha=St(),Ma=ui(li()),Ga=ui(ci()),Ct={en:Ga.default,zh:Ma.default},ka=function(r){var e=(0,Ha.getLang)(),t=Ct[e]?Ct[e][r]:Ct.en[r];return t||r};Re.default=ka});var qe=f(A=>{"use strict";var Va=A&&A.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),fi=A&&A.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Va(e,r,t)},$t=A&&A.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(A,"__esModule",{value:!0});A.registerCommandChecker=A.i18n=A.logger=void 0;var Xa=$t(We());fi(St(),A);fi(bt(),A);var Ua=We();Object.defineProperty(A,"logger",{enumerable:!0,get:function(){return $t(Ua).default}});var Wa=hi();Object.defineProperty(A,"i18n",{enumerable:!0,get:function(){return $t(Wa).default}});function Ba(r){r.on("command:*",function(e){var t=r.commands.map(function(n){return n.name()});t.includes(e[0])||(Xa.default.error(" error: unknown command ".concat(e[0])),r.help())})}A.registerCommandChecker=Ba});var K=f(ce=>{"use strict";var za=ce&&ce.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ce,"__esModule",{value:!0});ce.ServerlessError=void 0;var Ya=za(M()),Za=Ya.default.Logger,Ja=new Za("S-CLI-ERROR"),Ka=function(){function r(e,t,n){Ja.error(e+": "+t,n),process.exit(1)}return r}();ce.ServerlessError=Ka});var pi=f(ue=>{"use strict";var Qa=ue&&ue.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},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 el=K(),tl=function(r){Qa(e,r);function e(t,n){return r.call(this,"Error",t,n)||this}return e}(el.ServerlessError);ue.CommandError=tl});var di=f(he=>{"use strict";var rl=he&&he.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},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 nl=K(),il=function(r){rl(e,r);function e(t,n){return r.call(this,"Deletion failed",t,n)||this}return e}(nl.ServerlessError);he.ConfigDeleteError=il});var mi=f(fe=>{"use strict";var sl=fe&&fe.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},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 ol=K(),al=function(r){sl(e,r);function e(t,n){return r.call(this,"Config failed",t,n)||this}return e}(ol.ServerlessError);fe.ConfigError=al});var gi=f(pe=>{"use strict";var ll=pe&&pe.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},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 cl=K(),ul=function(r){ll(e,r);function e(t,n){return r.call(this,"Get failed",t,n)||this}return e}(cl.ServerlessError);pe.ConfigGetError=ul});var vi=f(de=>{"use strict";var hl=de&&de.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},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 fl=K(),pl=function(r){hl(e,r);function e(t,n){return r.call(this,"Initialization failed",t,n)||this}return e}(fl.ServerlessError);de.InitError=pl});var yi=f(j=>{"use strict";var dl=j&&j.__awaiter||function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,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?s(u.value):i(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},ml=j&&j.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,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,i&&(s=o[0]&2?i.return:o[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;switch(i=0,s&&(o=[o[0]&2,s.value]),o[0]){case 0:case 1:s=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,i=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){t.label=o[1];break}if(o[0]===6&&t.label<s[1]){t.label=s[1],s=o;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(o);break}s[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],i=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},gl=j&&j.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(j,"__esModule",{value:!0});j.HumanError=void 0;var _i=gl(M()),Ye=qe(),vl=_i.default.colors,_l=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(vl.gray(n),`
|
|
24
|
+
`))}return r.prototype.report=function(e){return dl(this,void 0,void 0,function(){var t;return ml(this,function(n){switch(n.label){case 0:return t=e.error,[4,_i.default.report({type:"jsError",content:"".concat(this.errorMessage,"||").concat(t.stack)})];case 1:return n.sent(),[2]}})})},r}();j.HumanError=_l});var wi=f(me=>{"use strict";var yl=me&&me.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(me,"__esModule",{value:!0});me.HumanWarning=void 0;var El=yl(M()),It=qe(),Ei=El.default.colors,wl=function(){function r(e){var t=e.warningMessage,n=e.tips;It.logger.log(`
|
|
25
|
+
`.concat(Ei.hex("#000").bgYellow("WARNING:"))),It.logger.log("".concat(t,`
|
|
26
|
+
`)),n&&It.logger.log("".concat(Ei.gray(n),`
|
|
27
|
+
`))}return r}();me.HumanWarning=wl});var bi=f(w=>{"use strict";var bl=w&&w.__awaiter||function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,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?s(u.value):i(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},Ol=w&&w.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,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,i&&(s=o[0]&2?i.return:o[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;switch(i=0,s&&(o=[o[0]&2,s.value]),o[0]){case 0:case 1:s=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,i=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){t.label=o[1];break}if(o[0]===6&&t.label<s[1]){t.label=s[1],s=o;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(o);break}s[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],i=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Sl=w&&w.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(w,"__esModule",{value:!0});w.HandleError=w.HumanWarning=w.HumanError=w.ServerlessError=w.InitError=w.ConfigGetError=w.ConfigError=w.ConfigDeleteError=w.CommandError=void 0;var E=qe(),Ne=Sl(M()),V=Ne.default.colors,Al=Ne.default.report,Rt=Ne.default.isDebugMode,xl=Ne.default.makeUnderLine,qt=Ne.default.isDocker,Cl=pi();Object.defineProperty(w,"CommandError",{enumerable:!0,get:function(){return Cl.CommandError}});var $l=di();Object.defineProperty(w,"ConfigDeleteError",{enumerable:!0,get:function(){return $l.ConfigDeleteError}});var Il=mi();Object.defineProperty(w,"ConfigError",{enumerable:!0,get:function(){return Il.ConfigError}});var Rl=gi();Object.defineProperty(w,"ConfigGetError",{enumerable:!0,get:function(){return Rl.ConfigGetError}});var ql=vi();Object.defineProperty(w,"InitError",{enumerable:!0,get:function(){return ql.InitError}});var Nl=K();Object.defineProperty(w,"ServerlessError",{enumerable:!0,get:function(){return Nl.ServerlessError}});var Pl=yi();Object.defineProperty(w,"HumanError",{enumerable:!0,get:function(){return Pl.HumanError}});var Dl=wi();Object.defineProperty(w,"HumanWarning",{enumerable:!0,get:function(){return Dl.HumanWarning}});function Ze(r,e){return"".concat(V.gray(r)).concat(V.gray.underline(e))}var Ll=function(r){return bl(void 0,void 0,void 0,function(){var e,t,n,i,s,a,l,c;return Ol(this,function(o){switch(o.label){case 0:e="Message:",t={traceId:"",catchableError:!1},n=r,i=(0,E.getConfig)("analysis"),i!=="disable"&&(t.traceId=process.env.serverless_devs_trace_id),s=r.message?r.message:"";try{a=JSON.parse(s)}catch{}return a&&a.tips?(l=a.message?"Message: ".concat(a.message,`
|
|
28
|
+
`):"",c=a.tips?"* ".concat(xl(a.tips.replace(/\n/,`
|
|
29
29
|
* `))):"",E.logger.log(`
|
|
30
30
|
`.concat(V.hex("#000").bgYellow("WARNING:"),`
|
|
31
31
|
======================
|
|
32
32
|
`).concat(c,`
|
|
33
|
-
`),"yellow"),
|
|
33
|
+
`),"yellow"),Rt()?E.logger.log(r.stack):E.logger.log(V.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
34
|
`))),E.logger.log("".concat((0,E.bgRed)("ERROR:"),`
|
|
35
|
-
`)),
|
|
35
|
+
`)),Rt()?E.logger.log("".concat(a.stack,`
|
|
36
36
|
`)):E.logger.log("".concat(a.message,`
|
|
37
37
|
`)),[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
38
|
`))),E.logger.log("".concat((0,E.bgRed)("ERROR:"),`
|
|
39
|
-
`)),E.logger.log(
|
|
40
|
-
`)),[4,(0,E.aiRequest)(s)];case 4:o.sent(),o.label=5;case 5:return t.catchableError||(t.traceId&&E.logger.log(V.gray("TraceId: ".concat(t.traceId))),
|
|
41
|
-
`)),t.traceId&&E.logger.log(V.gray("Please copy traceId: ".concat(t.traceId," and join Dingding group: 33947367 for consultation."))))),!
|
|
39
|
+
`)),E.logger.log(Rt()||qt()?r.stack:"".concat(s,`
|
|
40
|
+
`)),[4,(0,E.aiRequest)(s)];case 4:o.sent(),o.label=5;case 5:return t.catchableError||(t.traceId&&E.logger.log(V.gray("TraceId: ".concat(t.traceId))),qt()||(E.logger.log(V.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(V.gray("Please copy traceId: ".concat(t.traceId," and join Dingding group: 33947367 for consultation."))))),!qt()&&E.logger.log(V.gray("You can run 's clean --all' to clean Serverless devs.")),t.traceId&&!t.catchableError?[4,Al({type:"jsError",content:"".concat(n.message,"||").concat(n.stack),traceId:t.traceId})]:[3,7];case 6:o.sent(),o.label=7;case 7:return process.exit(n.code||1),[2]}})})};w.HandleError=Ll});var Pt=f((lu,Si)=>{"use strict";var Oi=require("fs"),Nt;function Tl(){try{return Oi.statSync("/.dockerenv"),!0}catch{return!1}}function jl(){try{return Oi.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Si.exports=()=>(Nt===void 0&&(Nt=Tl()||jl()),Nt)});var Ci=f((cu,Dt)=>{"use strict";var Fl=require("os"),Hl=require("fs"),Ai=Pt(),xi=()=>{if(process.platform!=="linux")return!1;if(Fl.release().toLowerCase().includes("microsoft"))return!Ai();try{return Hl.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!Ai():!1}catch{return!1}};process.env.__IS_WSL_TEST__?Dt.exports=xi:Dt.exports=xi()});var Ii=f((uu,$i)=>{"use strict";$i.exports=(r,e,t)=>{let n=i=>Object.defineProperty(r,e,{value:i,enumerable:!0,writable:!0});return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get(){let i=t();return n(i),i},set(i){n(i)}}),r}});var Ti=f((hu,Li)=>{var Ml=require("path"),Gl=require("child_process"),{promises:Lt,constants:Di}=require("fs"),Je=Ci(),kl=Pt(),Tt=Ii(),Ri=Ml.join(__dirname,"xdg-open"),{platform:ge,arch:qi}=process,Vl=(()=>{let r="/mnt/",e;return async function(){if(e)return e;let t="/etc/wsl.conf",n=!1;try{await Lt.access(t,Di.F_OK),n=!0}catch{}if(!n)return r;let i=await Lt.readFile(t,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):r}})(),Ni=async(r,e)=>{let t;for(let n of r)try{return await e(n)}catch(i){t=i}throw t},Ke=async r=>{if(r={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...r},Array.isArray(r.app))return Ni(r.app,l=>Ke({...r,app:l}));let{name:e,arguments:t=[]}=r.app||{};if(t=[...t],Array.isArray(e))return Ni(e,l=>Ke({...r,app:{name:l,arguments:t}}));let n,i=[],s={};if(ge==="darwin")n="open",r.wait&&i.push("--wait-apps"),r.background&&i.push("--background"),r.newInstance&&i.push("--new"),e&&i.push("-a",e);else if(ge==="win32"||Je&&!kl()){let l=await Vl();n=Je?`${l}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,i.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),Je||(s.windowsVerbatimArguments=!0);let c=["Start"];r.wait&&c.push("-Wait"),e?(c.push(`"\`"${e}\`""`,"-ArgumentList"),r.target&&t.unshift(r.target)):r.target&&c.push(`"${r.target}"`),t.length>0&&(t=t.map(o=>`"\`"${o}\`""`),c.push(t.join(","))),r.target=Buffer.from(c.join(" "),"utf16le").toString("base64")}else{if(e)n=e;else{let l=!__dirname||__dirname==="/",c=!1;try{await Lt.access(Ri,Di.X_OK),c=!0}catch{}n=process.versions.electron||ge==="android"||l||!c?"xdg-open":Ri}t.length>0&&i.push(...t),r.wait||(s.stdio="ignore",s.detached=!0)}r.target&&i.push(r.target),ge==="darwin"&&t.length>0&&i.push("--args",...t);let a=Gl.spawn(n,i,s);return r.wait?new Promise((l,c)=>{a.once("error",c),a.once("close",o=>{if(r.allowNonzeroExitCode&&o>0){c(new Error(`Exited with code ${o}`));return}l(a)})}):(a.unref(),a)},jt=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a `target`");return Ke({...e,target:r})},Xl=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a `name`");let{arguments:t=[]}=e||{};if(t!=null&&!Array.isArray(t))throw new TypeError("Expected `appArguments` as Array type");return Ke({...e,app:{name:r,arguments:t}})};function Pi(r){if(typeof r=="string"||Array.isArray(r))return r;let{[qi]:e}=r;if(!e)throw new Error(`${qi} is not supported`);return e}function Ft({[ge]:r},{wsl:e}){if(e&&Je)return Pi(e);if(!r)throw new Error(`${ge} is not supported`);return Pi(r)}var Qe={};Tt(Qe,"chrome",()=>Ft({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));Tt(Qe,"firefox",()=>Ft({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));Tt(Qe,"edge",()=>Ft({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));jt.apps=Qe;jt.openApp=Xl;Li.exports=jt});var ji=exports&&exports.__awaiter||function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,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?s(u.value):i(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},Fi=exports&&exports.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,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,i&&(s=o[0]&2?i.return:o[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;switch(i=0,s&&(o=[o[0]&2,s.value]),o[0]){case 0:case 1:s=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,i=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){t.label=o[1];break}if(o[0]===6&&t.label<s[1]){t.label=s[1],s=o;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(o);break}s[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],i=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Mt=exports&&exports.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0});var Ul=Mt(Yt()),Ht=Mt(M()),Gt=qe(),Wl=bi(),Bl=Mt(Ti()),zl=Ht.default.colors,Yl=`Application editing.
|
|
42
42
|
|
|
43
43
|
Example:
|
|
44
44
|
$ s edit
|
|
45
45
|
|
|
46
|
-
`.concat((0,
|
|
46
|
+
`.concat((0,Gt.emoji)("\u{1F4D6}")," Document: ").concat(zl.underline("https://github.com/Serverless-Devs/Serverless-Devs/tree/master/docs/zh/command/edit.md")),Zl=Ul.default.name("s edit").usage("[options]").option("-t, --template <templatePath>","Specify the template file.").helpOption("-h, --help",(0,Gt.i18n)("display_help_for_command")).description(Yl).addHelpCommand(!1).parse(process.argv);(function(){return ji(void 0,void 0,void 0,function(){var r,e,t,n,i,s;return Fi(this,function(a){switch(a.label){case 0:return r=(0,Gt.getProcessArgv)(),e=r.help,t=r.template,e&&Zl.help(),[4,Ht.default.getTemplatePath(t)];case 1:return n=a.sent(),process.env.template=n,[4,Ht.default.getAvailablePort(7e3)];case 2:return i=a.sent(),s=require("@serverless-devs/ui"),s.listen(i,function(){console.log("server start at http://localhost:".concat(i)),(0,Bl.default)("http://localhost:".concat(i))}),[2]}})})})().catch(function(r){return ji(void 0,void 0,void 0,function(){return Fi(this,function(e){switch(e.label){case 0:return[4,(0,Wl.HandleError)(r)];case 1:return e.sent(),[2]}})})});
|