@serverless-devs/s 2.1.1-beta.9 → 2.1.1
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/lib/clean/index.js +16 -16
- package/lib/cli/index.js +15 -15
- package/lib/component/index.js +17 -17
- package/lib/config/add/index.js +15 -15
- package/lib/config/delete/index.js +15 -15
- package/lib/config/get/index.js +19 -19
- package/lib/config/index.js +10 -10
- package/lib/edit/index.js +33 -38
- package/lib/help/index.js +2 -2
- package/lib/index.js +76 -76
- package/lib/init/index.js +33 -33
- package/lib/set/analysis/index.js +16 -16
- package/lib/set/index.js +10 -10
- package/lib/set/locale/index.js +16 -16
- package/lib/set/registry/index.js +16 -16
- package/lib/set/workspace/index.js +17 -17
- package/lib/update-notifier/index.js +1 -1
- package/lib/utils/common.js +2 -23
- package/lib/verify/index.js +19 -19
- package/package.json +4 -4
- package/shell/postbuild.sh +17 -18
- package/bin/s-set-autocomplete +0 -2
- package/lib/set/autocomplete/index.js +0 -47
- package/lib/tab/index.js +0 -159
- package/shell/postinstall.js +0 -18
package/lib/config/add/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
"use strict";var f=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Ut=f((B,Kt)=>{var Si=require("events").EventEmitter,it=require("child_process").spawn,X=require("path"),st=require("fs"),be=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=Vt(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 Ai(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}},
|
|
1
|
+
"use strict";var f=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Ut=f((B,Kt)=>{var Si=require("events").EventEmitter,it=require("child_process").spawn,X=require("path"),st=require("fs"),be=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=Vt(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 Ai(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}},re=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},ne=class extends Si{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._args=[],this.rawArgs=null,this._scriptPath=null,this._name=e||"",this._optionValues={},this._storeOptionsAsProperties=!0,this._storeOptionsAsPropertiesCalled=!1,this._passCommandToAction=!0,this._actionResults=[],this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._hasImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command"}command(e,t,n){let s=t,i=n;typeof s=="object"&&s!==null&&(i=s,s=null),i=i||{};let a=e.split(/ +/),l=this.createCommand(a.shift());return s&&(l.description(s),l._executableHandler=!0),i.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(i.noHelp||i.hidden),l._hasHelpOption=this._hasHelpOption,l._helpFlags=this._helpFlags,l._helpDescription=this._helpDescription,l._helpShortFlag=this._helpShortFlag,l._helpLongFlag=this._helpLongFlag,l._helpCommandName=this._helpCommandName,l._helpCommandnameAndArgs=this._helpCommandnameAndArgs,l._helpCommandDescription=this._helpCommandDescription,l._exitCallback=this._exitCallback,l._storeOptionsAsProperties=this._storeOptionsAsProperties,l._passCommandToAction=this._passCommandToAction,l._combineFlagAndOptionalValue=this._combineFlagAndOptionalValue,l._executableFile=i.executableFile||null,this.commands.push(l),l._parseExpectedArgs(a),l.parent=this,s?this:l}createCommand(e){return new ne(e)}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");function n(s){s.forEach(i=>{if(i._executableHandler&&!i._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${i.name()}`);n(i.commands)})}return n(e.commands),t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}arguments(e){return this._parseExpectedArgs(e.split(/ +/))}addHelpCommand(e,t){return e===!1?this._hasImplicitHelpCommand=!1:(this._hasImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}_lazyHasImplicitHelpCommand(){return this._hasImplicitHelpCommand===void 0&&(this._hasImplicitHelpCommand=this.commands.length&&!this._actionHandler&&!this._findCommand("help")),this._hasImplicitHelpCommand}_parseExpectedArgs(e){if(!!e.length)return e.forEach(t=>{let n={required:!1,name:"",variadic:!1};switch(t[0]){case"<":n.required=!0,n.name=t.slice(1,-1);break;case"[":n.name=t.slice(1,-1);break}n.name.length>3&&n.name.slice(-3)==="..."&&(n.variadic=!0,n.name=n.name.slice(0,-3)),n.name&&this._args.push(n)}),this._args.forEach((t,n)=>{if(t.variadic&&n<this._args.length-1)throw new Error(`only the last argument can be variadic '${t.name}'`)}),this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new re(e,t,n)),process.exit(e)}action(e){let t=n=>{let s=this._args.length,i=n.slice(0,s);this._passCommandToAction?i[s]=this:i[s]=this.opts(),n.length>s&&i.push(n.slice(s));let a=e.apply(this,i),l=this;for(;l.parent;)l=l.parent;l._actionResults.push(a)};return this._actionHandler=t,this}_checkForOptionNameClash(e){if(!this._storeOptionsAsProperties||this._storeOptionsAsPropertiesCalled||e.name()==="help"||this._getOptionValue(e.attributeName())===void 0)return;let n=!0;if(e.negate){let s=e.long.replace(/^--no-/,"--");n=!this._findOption(s)}else if(e.long){let s=e.long.replace(/^--/,"--no-");n=!this._findOption(s)}if(n)throw new Error(`option '${e.name()}' clashes with existing property '${e.attributeName()}' on Command
|
|
2
2
|
- call storeOptionsAsProperties(false) to store option values safely,
|
|
3
3
|
- or call storeOptionsAsProperties(true) to suppress this check,
|
|
4
4
|
- or change option name
|
|
5
5
|
|
|
6
|
-
Read more on https://git.io/JJc0W`)}_optionEx(e,t,n,s,i){let a=new be(t,n),l=a.name(),c=a.attributeName();if(a.mandatory=!!e.mandatory,this._checkForOptionNameClash(a),typeof s!="function")if(s instanceof RegExp){let o=s;s=(u,h)=>{let v=o.exec(u);return v?v[0]:h}}else i=s,s=null;if(a.negate||a.optional||a.required||typeof i=="boolean"){if(a.negate){let o=a.long.replace(/^--no-/,"--");i=this._findOption(o)?this._getOptionValue(c):!0}i!==void 0&&(this._setOptionValue(c,i),a.defaultValue=i)}return this.options.push(a),this.on("option:"+l,o=>{let u=this._getOptionValue(c);o!==null&&s?o=s(o,u===void 0?i:u):o!==null&&a.variadic&&(u===i||!Array.isArray(u)?o=[o]:o=u.concat(o)),typeof u=="boolean"||typeof u>"u"?o==null?this._setOptionValue(c,a.negate?!1:i||!0):this._setOptionValue(c,o):o!==null&&this._setOptionValue(c,a.negate?!1:o)}),this}option(e,t,n,s){return this._optionEx({},e,t,n,s)}requiredOption(e,t,n,s){return this._optionEx({mandatory:!0},e,t,n,s)}combineFlagAndOptionalValue(e){return this._combineFlagAndOptionalValue=e===void 0||e,this}allowUnknownOption(e){return this._allowUnknownOption=e===void 0||e,this}storeOptionsAsProperties(e){if(this._storeOptionsAsPropertiesCalled=!0,this._storeOptionsAsProperties=e===void 0||e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}passCommandToAction(e){return this._passCommandToAction=e===void 0||e,this}_setOptionValue(e,t){this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t}_getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}parse(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");t=t||{},e===void 0&&(e=process.argv,process.versions&&process.versions.electron&&(t.from="electron")),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._scriptPath&&process.mainModule&&(this._scriptPath=process.mainModule.filename),this._name=this._name||this._scriptPath&&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,s=[".js",".ts",".tsx",".mjs"];this._checkForMissingMandatoryOptions();let i=this._scriptPath;!i&&process.mainModule&&(i=process.mainModule.filename);let a;try{let v=st.realpathSync(i);a=X.dirname(v)}catch{a="."}let l=X.basename(i,X.extname(i))+"-"+e._name;e._executableFile&&(l=e._executableFile);let c=X.join(a,l);st.existsSync(c)?l=c:s.forEach(v=>{st.existsSync(`${c}${v}`)&&(l=`${c}${v}`)}),n=s.includes(X.extname(l));let o;process.platform!=="win32"?n?(t.unshift(l),t=Mt(process.execArgv).concat(t),o=it(process.argv[0],t,{stdio:"inherit"})):o=it(l,t,{stdio:"inherit"}):(t.unshift(l),t=Mt(process.execArgv).concat(t),o=it(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
|
|
6
|
+
Read more on https://git.io/JJc0W`)}_optionEx(e,t,n,s,i){let a=new be(t,n),l=a.name(),c=a.attributeName();if(a.mandatory=!!e.mandatory,this._checkForOptionNameClash(a),typeof s!="function")if(s instanceof RegExp){let o=s;s=(u,h)=>{let v=o.exec(u);return v?v[0]:h}}else i=s,s=null;if(a.negate||a.optional||a.required||typeof i=="boolean"){if(a.negate){let o=a.long.replace(/^--no-/,"--");i=this._findOption(o)?this._getOptionValue(c):!0}i!==void 0&&(this._setOptionValue(c,i),a.defaultValue=i)}return this.options.push(a),this.on("option:"+l,o=>{let u=this._getOptionValue(c);o!==null&&s?o=s(o,u===void 0?i:u):o!==null&&a.variadic&&(u===i||!Array.isArray(u)?o=[o]:o=u.concat(o)),typeof u=="boolean"||typeof u>"u"?o==null?this._setOptionValue(c,a.negate?!1:i||!0):this._setOptionValue(c,o):o!==null&&this._setOptionValue(c,a.negate?!1:o)}),this}option(e,t,n,s){return this._optionEx({},e,t,n,s)}requiredOption(e,t,n,s){return this._optionEx({mandatory:!0},e,t,n,s)}combineFlagAndOptionalValue(e){return this._combineFlagAndOptionalValue=e===void 0||e,this}allowUnknownOption(e){return this._allowUnknownOption=e===void 0||e,this}storeOptionsAsProperties(e){if(this._storeOptionsAsPropertiesCalled=!0,this._storeOptionsAsProperties=e===void 0||e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}passCommandToAction(e){return this._passCommandToAction=e===void 0||e,this}_setOptionValue(e,t){this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t}_getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}parse(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");t=t||{},e===void 0&&(e=process.argv,process.versions&&process.versions.electron&&(t.from="electron")),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._scriptPath&&process.mainModule&&(this._scriptPath=process.mainModule.filename),this._name=this._name||this._scriptPath&&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,s=[".js",".ts",".tsx",".mjs"];this._checkForMissingMandatoryOptions();let i=this._scriptPath;!i&&process.mainModule&&(i=process.mainModule.filename);let a;try{let v=st.realpathSync(i);a=X.dirname(v)}catch{a="."}let l=X.basename(i,X.extname(i))+"-"+e._name;e._executableFile&&(l=e._executableFile);let c=X.join(a,l);st.existsSync(c)?l=c:s.forEach(v=>{st.existsSync(`${c}${v}`)&&(l=`${c}${v}`)}),n=s.includes(X.extname(l));let o;process.platform!=="win32"?n?(t.unshift(l),t=Mt(process.execArgv).concat(t),o=it(process.argv[0],t,{stdio:"inherit"})):o=it(l,t,{stdio:"inherit"}):(t.unshift(l),t=Mt(process.execArgv).concat(t),o=it(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 re(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
|
|
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 re(1,"commander.executeSubCommandAsync","(error)");m.nestedError=v,h(m)}}),this.runningCommand=o}_dispatchSubcommand(e,t,n){let s=this._findCommand(e);s||this._helpAndError(),s._executableHandler?this._executeSubCommand(s,t.concat(n)):s._parseCommand(t,n)}_parseCommand(e,t){let n=this.parseOptions(t);if(e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))this._dispatchSubcommand(e[0],e.slice(1),t);else if(this._lazyHasImplicitHelpCommand()&&e[0]===this._helpCommandName)e.length===1?this.help():this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);else if(this._defaultCommandName)Ht(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);else if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this._helpAndError(),Ht(this,n.unknown),this._checkForMissingMandatoryOptions(),n.unknown.length>0&&this.unknownOption(n.unknown[0]),this._actionHandler){let s=this.args.slice();this._args.forEach((i,a)=>{i.required&&s[a]==null?this.missingArgument(i.name):i.variadic&&(s[a]=s.splice(a))}),this._actionHandler(s),this.emit("command:"+this.name(),e,t)}else e.length?this._findCommand("*")?this._dispatchSubcommand("*",e,t):this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length&&this.unknownCommand():this.commands.length&&this._helpAndError()}_findCommand(e){if(!!e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(t=>{t.mandatory&&e._getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})}parseOptions(e){let t=[],n=[],s=t,i=e.slice();function a(c){return c.length>1&&c[0]==="-"}let l=null;for(;i.length;){let c=i.shift();if(c==="--"){s===n&&s.push(c),s.push(...i);break}if(l&&!a(c)){this.emit(`option:${l.name()}`,c);continue}if(l=null,a(c)){let o=this._findOption(c);if(o){if(o.required){let u=i.shift();u===void 0&&this.optionMissingArgument(o),this.emit(`option:${o.name()}`,u)}else if(o.optional){let u=null;i.length>0&&!a(i[0])&&(u=i.shift()),this.emit(`option:${o.name()}`,u)}else this.emit(`option:${o.name()}`);l=o.variadic?o:null;continue}}if(c.length>2&&c[0]==="-"&&c[1]!=="-"){let o=this._findOption(`-${c[1]}`);if(o){o.required||o.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${o.name()}`,c.slice(2)):(this.emit(`option:${o.name()}`),i.unshift(`-${c.slice(2)}`));continue}}if(/^--[^=]+=/.test(c)){let o=c.indexOf("="),u=this._findOption(c.slice(0,o));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,c.slice(o+1));continue}}c.length>1&&c[0]==="-"&&(s=n),s.push(c)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let s=this.options[n].attributeName();e[s]=s===this._versionOptionName?this._version:this[s]}return e}return this._optionValues}missingArgument(e){let t=`error: missing required argument '${e}'`;console.error(t),this._exit(1,"commander.missingArgument",t)}optionMissingArgument(e,t){let n;t?n=`error: option '${e.flags}' argument missing, got '${t}'`:n=`error: option '${e.flags}' argument missing`,console.error(n),this._exit(1,"commander.optionMissingArgument",n)}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;console.error(t),this._exit(1,"commander.missingMandatoryOptionValue",t)}unknownOption(e){if(this._allowUnknownOption)return;let t=`error: unknown option '${e}'`;console.error(t),this._exit(1,"commander.unknownOption",t)}unknownCommand(){let e=[this.name()];for(let s=this.parent;s;s=s.parent)e.unshift(s.name());let t=e.join(" "),n=`error: unknown command '${this.args[0]}'.`+(this._hasHelpOption?` See '${t} ${this._helpLongFlag}'.`:"");console.error(n),this._exit(1,"commander.unknownCommand",n)}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let s=new be(t,n);return this._versionOptionName=s.attributeName(),this.options.push(s),this.on("option:"+s.name(),()=>{process.stdout.write(e+`
|
|
9
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=>kt(n));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}prepareCommands(){let e=this.commands.filter(t=>!t._hidden).map(t=>{let n=t._args.map(s=>kt(s)).join(" ");return[t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(n?" "+n:""),t._description]});return this._lazyHasImplicitHelpCommand()&&e.push([this._helpCommandnameAndArgs,this._helpCommandDescription]),e}largestCommandLength(){return this.prepareCommands().reduce((t,n)=>Math.max(t,n[0].length),0)}largestOptionLength(){let e=[].slice.call(this.options);return e.push({flags:this._helpFlags}),e.reduce((t,n)=>Math.max(t,n.flags.length),0)}largestArgLength(){return this._args.reduce((e,t)=>Math.max(e,t.name.length),0)}padWidth(){let e=this.largestOptionLength();return this._argsDescription&&this._args.length&&this.largestArgLength()>e&&(e=this.largestArgLength()),this.commands&&this.commands.length&&this.largestCommandLength()>e&&(e=this.largestCommandLength()),e}optionHelp(){let e=this.padWidth(),n=(process.stdout.columns||80)-e-4;function s(c,o){return ot(c,e)+" "+Ft(o,n,e+2)}let i=this.options.map(c=>{let o=c.description+(!c.negate&&c.defaultValue!==void 0?" (default: "+JSON.stringify(c.defaultValue)+")":"");return s(c.flags,o)}),a=this._hasHelpOption&&this._helpShortFlag&&!this._findOption(this._helpShortFlag),l=this._hasHelpOption&&!this._findOption(this._helpLongFlag);if(a||l){let c=this._helpFlags;a?l||(c=this._helpShortFlag):c=this._helpLongFlag,i.push(s(c,this._helpDescription))}return i.join(`
|
|
10
10
|
`)}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";let e=this.prepareCommands(),t=this.padWidth(),s=(process.stdout.columns||80)-t-4;return["Commands:",e.map(i=>{let a=i[1]?" "+i[1]:"";return(a?ot(i[0],t):i[0])+Ft(a,s,t+2)}).join(`
|
|
11
11
|
`).replace(/^/gm," "),""].join(`
|
|
12
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(" "+ot(v.name,o)+" "+Gt(c[v.name]||"",h,o+4))}),e.push("")}}let t=this._name;this._aliases[0]&&(t=t+"|"+this._aliases[0]);let n="";for(let c=this.parent;c;c=c.parent)n=c.name()+" "+n;let s=["Usage: "+n+t+" "+this.usage(),""],i=[],a=this.commandHelp();a&&(i=[a]);let l=[];return(this._hasHelpOption||this.options.length>0)&&(l=["Options:",""+this.optionHelp().replace(/^/gm," "),""]),s.concat(e).concat(l).concat(i).join(`
|
|
13
|
-
`)}outputHelp(e){e||(e=n=>n);let t=e(this.helpInformation());if(typeof t!="string"&&!Buffer.isBuffer(t))throw new Error("outputHelp callback must return a string or a Buffer");process.stdout.write(t),this.emit(this._helpLongFlag)}helpOption(e,t){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription;let n=Vt(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)")}};B=Kt.exports=new
|
|
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=Vt(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)")}};B=Kt.exports=new ne;B.program=B;B.Command=ne;B.Option=be;B.CommanderError=re;function Ai(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function ot(r,e){let t=Math.max(0,e-r.length);return r+Array(t+1).join(" ")}function Gt(r,e,t){let n=new RegExp(".{1,"+(e-1)+"}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)","g");return(r.match(n)||[]).map((i,a)=>(i.slice(-1)===`
|
|
14
14
|
`&&(i=i.slice(0,i.length-1)),(a>0&&t?Array(t+1).join(" "):"")+i.trimRight())).join(`
|
|
15
|
-
`)}function Ft(r,e,t){return r.match(/[\n]\s+/)||e<40?r:Gt(r,e,t)}function Ht(r,e){r._hasHelpOption&&e.find(n=>n===r._helpLongFlag||n===r._helpShortFlag)&&(r.outputHelp(),r._exit(0,"commander.helpDisplayed","(outputHelp)"))}function kt(r){let e=r.name+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}function Vt(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 Mt(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",s="9229",i;return(i=e.match(/^(--inspect(-brk)?)$/))!==null?t=i[1]:(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=i[1],/^\d+$/.test(i[3])?s=i[3]:n=i[3]):(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],s=i[4]),t&&s!=="0"?`${t}=${n}:${parseInt(s)+1}`:e})}});var we=f((Dl,Xt)=>{var Ii="2.0.0",Ci=Number.MAX_SAFE_INTEGER||9007199254740991,$i=16;Xt.exports={SEMVER_SPEC_VERSION:Ii,MAX_LENGTH:256,MAX_SAFE_INTEGER:Ci,MAX_SAFE_COMPONENT_LENGTH:$i}});var Oe=f((xl,Bt)=>{var Ri=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Bt.exports=Ri});var W=f((V,Wt)=>{var{MAX_SAFE_COMPONENT_LENGTH:at}=we(),Di=Oe();V=Wt.exports={};var xi=V.re=[],p=V.src=[],d=V.t={},qi=0,_=(r,e,t)=>{let n=qi++;Di(r,n,e),d[r]=n,p[n]=e,xi[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,${at}})(?:\\.(\\d{1,${at}}))?(?:\\.(\\d{1,${at}}))?(?:$|[^\\d])`);_("COERCERTL",p[d.COERCE],!0);_("LONETILDE","(?:~>?)");_("TILDETRIM",`(\\s*)${p[d.LONETILDE]}\\s+`,!0);V.tildeTrimReplace="$1~";_("TILDE",`^${p[d.LONETILDE]}${p[d.XRANGEPLAIN]}$`);_("TILDELOOSE",`^${p[d.LONETILDE]}${p[d.XRANGEPLAINLOOSE]}$`);_("LONECARET","(?:\\^)");_("CARETTRIM",`(\\s*)${p[d.LONECARET]}\\s+`,!0);V.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);V.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 Se=f((ql,zt)=>{var Li=["includePrerelease","loose","rtl"],Ni=r=>r?typeof r!="object"?{loose:!0}:Li.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};zt.exports=Ni});var He=f((Ll,Jt)=>{var Yt=/^[0-9]+$/,Zt=(r,e)=>{let t=Yt.test(r),n=Yt.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},Ti=(r,e)=>Zt(e,r);Jt.exports={compareIdentifiers:Zt,rcompareIdentifiers:Ti}});var A=f((Nl,rr)=>{var ke=Oe(),{MAX_LENGTH:Qt,MAX_SAFE_INTEGER:Me}=we(),{re:er,t:tr}=W(),ji=Se(),{compareIdentifiers:oe}=He(),q=class{constructor(e,t){if(t=ji(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>Qt)throw new TypeError(`version is longer than ${Qt} characters`);ke("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?er[tr.LOOSE]:er[tr.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>Me||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Me||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Me||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let i=+s;if(i>=0&&i<Me)return i}return s}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(ke("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)),oe(this.major,e.major)||oe(this.minor,e.minor)||oe(this.patch,e.patch)}comparePre(e){if(e instanceof q||(e=new q(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let n=this.prerelease[t],s=e.prerelease[t];if(ke("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return oe(n,s)}while(++t)}compareBuild(e){e instanceof q||(e=new q(e,this.options));let t=0;do{let n=this.build[t],s=e.build[t];if(ke("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return oe(n,s)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}t&&(oe(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}};rr.exports=q});var z=f((Tl,or)=>{var{MAX_LENGTH:Pi}=we(),{re:nr,t:ir}=W(),sr=A(),Fi=Se(),Hi=(r,e)=>{if(e=Fi(e),r instanceof sr)return r;if(typeof r!="string"||r.length>Pi||!(e.loose?nr[ir.LOOSE]:nr[ir.FULL]).test(r))return null;try{return new sr(r,e)}catch{return null}};or.exports=Hi});var lr=f((jl,ar)=>{var ki=z(),Mi=(r,e)=>{let t=ki(r,e);return t?t.version:null};ar.exports=Mi});var ur=f((Pl,cr)=>{var Gi=z(),Vi=(r,e)=>{let t=Gi(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};cr.exports=Vi});var pr=f((Fl,fr)=>{var hr=A(),Ki=(r,e,t,n)=>{typeof t=="string"&&(n=t,t=void 0);try{return new hr(r instanceof hr?r.version:r,t).inc(e,n).version}catch{return null}};fr.exports=Ki});var T=f((Hl,mr)=>{var dr=A(),Ui=(r,e,t)=>new dr(r,t).compare(new dr(e,t));mr.exports=Ui});var Ge=f((kl,gr)=>{var Xi=T(),Bi=(r,e,t)=>Xi(r,e,t)===0;gr.exports=Bi});var yr=f((Ml,_r)=>{var vr=z(),Wi=Ge(),zi=(r,e)=>{if(Wi(r,e))return null;{let t=vr(r),n=vr(e),s=t.prerelease.length||n.prerelease.length,i=s?"pre":"",a=s?"prerelease":"";for(let l in t)if((l==="major"||l==="minor"||l==="patch")&&t[l]!==n[l])return i+l;return a}};_r.exports=zi});var br=f((Gl,Er)=>{var Yi=A(),Zi=(r,e)=>new Yi(r,e).major;Er.exports=Zi});var Or=f((Vl,wr)=>{var Ji=A(),Qi=(r,e)=>new Ji(r,e).minor;wr.exports=Qi});var Ar=f((Kl,Sr)=>{var es=A(),ts=(r,e)=>new es(r,e).patch;Sr.exports=ts});var Cr=f((Ul,Ir)=>{var rs=z(),ns=(r,e)=>{let t=rs(r,e);return t&&t.prerelease.length?t.prerelease:null};Ir.exports=ns});var Rr=f((Xl,$r)=>{var is=T(),ss=(r,e,t)=>is(e,r,t);$r.exports=ss});var xr=f((Bl,Dr)=>{var os=T(),as=(r,e)=>os(r,e,!0);Dr.exports=as});var Ve=f((Wl,Lr)=>{var qr=A(),ls=(r,e,t)=>{let n=new qr(r,t),s=new qr(e,t);return n.compare(s)||n.compareBuild(s)};Lr.exports=ls});var Tr=f((zl,Nr)=>{var cs=Ve(),us=(r,e)=>r.sort((t,n)=>cs(t,n,e));Nr.exports=us});var Pr=f((Yl,jr)=>{var hs=Ve(),fs=(r,e)=>r.sort((t,n)=>hs(n,t,e));jr.exports=fs});var Ae=f((Zl,Fr)=>{var ps=T(),ds=(r,e,t)=>ps(r,e,t)>0;Fr.exports=ds});var Ke=f((Jl,Hr)=>{var ms=T(),gs=(r,e,t)=>ms(r,e,t)<0;Hr.exports=gs});var lt=f((Ql,kr)=>{var vs=T(),_s=(r,e,t)=>vs(r,e,t)!==0;kr.exports=_s});var Ue=f((ec,Mr)=>{var ys=T(),Es=(r,e,t)=>ys(r,e,t)>=0;Mr.exports=Es});var Xe=f((tc,Gr)=>{var bs=T(),ws=(r,e,t)=>bs(r,e,t)<=0;Gr.exports=ws});var ct=f((rc,Vr)=>{var Os=Ge(),Ss=lt(),As=Ae(),Is=Ue(),Cs=Ke(),$s=Xe(),Rs=(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 Os(r,t,n);case"!=":return Ss(r,t,n);case">":return As(r,t,n);case">=":return Is(r,t,n);case"<":return Cs(r,t,n);case"<=":return $s(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};Vr.exports=Rs});var Ur=f((nc,Kr)=>{var Ds=A(),xs=z(),{re:Be,t:We}=W(),qs=(r,e)=>{if(r instanceof Ds)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(Be[We.COERCE]);else{let n;for(;(n=Be[We.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||n.index+n[0].length!==t.index+t[0].length)&&(t=n),Be[We.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Be[We.COERCERTL].lastIndex=-1}return t===null?null:xs(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};Kr.exports=qs});var Br=f((ic,Xr)=>{"use strict";Xr.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var zr=f((sc,Wr)=>{"use strict";Wr.exports=y;y.Node=Y;y.create=y;function y(r){var e=this;if(e instanceof y||(e=new y),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var t=0,n=arguments.length;t<n;t++)e.push(arguments[t]);return e}y.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var e=r.next,t=r.prev;return e&&(e.prev=t),t&&(t.next=e),r===this.head&&(this.head=e),r===this.tail&&(this.tail=t),r.list.length--,r.next=null,r.prev=null,r.list=null,e};y.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var e=this.head;r.list=this,r.next=e,e&&(e.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};y.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var e=this.tail;r.list=this,r.prev=e,e&&(e.next=r),this.tail=r,this.head||(this.head=r),this.length++}};y.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)Ns(this,arguments[r]);return this.length};y.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)Ts(this,arguments[r]);return this.length};y.prototype.pop=function(){if(!!this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}};y.prototype.shift=function(){if(!!this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}};y.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,n=0;t!==null;n++)r.call(e,t.value,n,this),t=t.next};y.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,n=this.length-1;t!==null;n--)r.call(e,t.value,n,this),t=t.prev};y.prototype.get=function(r){for(var e=0,t=this.head;t!==null&&e<r;e++)t=t.next;if(e===r&&t!==null)return t.value};y.prototype.getReverse=function(r){for(var e=0,t=this.tail;t!==null&&e<r;e++)t=t.prev;if(e===r&&t!==null)return t.value};y.prototype.map=function(r,e){e=e||this;for(var t=new y,n=this.head;n!==null;)t.push(r.call(e,n.value,this)),n=n.next;return t};y.prototype.mapReverse=function(r,e){e=e||this;for(var t=new y,n=this.tail;n!==null;)t.push(r.call(e,n.value,this)),n=n.prev;return t};y.prototype.reduce=function(r,e){var t,n=this.head;if(arguments.length>1)t=e;else if(this.head)n=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;n!==null;s++)t=r(t,n.value,s),n=n.next;return t};y.prototype.reduceReverse=function(r,e){var t,n=this.tail;if(arguments.length>1)t=e;else if(this.tail)n=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;n!==null;s--)t=r(t,n.value,s),n=n.prev;return t};y.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};y.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};y.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new y;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=0,s=this.head;s!==null&&n<r;n++)s=s.next;for(;s!==null&&n<e;n++,s=s.next)t.push(s.value);return t};y.prototype.sliceReverse=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new y;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=this.length,s=this.tail;s!==null&&n>e;n--)s=s.prev;for(;s!==null&&n>r;n--,s=s.prev)t.push(s.value);return t};y.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var n=0,s=this.head;s!==null&&n<r;n++)s=s.next;for(var i=[],n=0;s&&n<e;n++)i.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var n=0;n<t.length;n++)s=Ls(this,s,t[n]);return i};y.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var n=t.prev;t.prev=t.next,t.next=n}return this.head=e,this.tail=r,this};function Ls(r,e,t){var n=e===r.head?new Y(t,null,e,r):new Y(t,e,e.next,r);return n.next===null&&(r.tail=n),n.prev===null&&(r.head=n),r.length++,n}function Ns(r,e){r.tail=new Y(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function Ts(r,e){r.head=new Y(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function Y(r,e,t,n){if(!(this instanceof Y))return new Y(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{Br()(y)}catch{}});var en=f((oc,Qr)=>{"use strict";var js=zr(),Z=Symbol("max"),M=Symbol("length"),ae=Symbol("lengthCalculator"),Ce=Symbol("allowStale"),J=Symbol("maxAge"),k=Symbol("dispose"),Yr=Symbol("noDisposeOnSet"),O=Symbol("lruList"),P=Symbol("cache"),Jr=Symbol("updateAgeOnGet"),ut=()=>1,ft=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[Z]=e.max||1/0,n=e.length||ut;if(this[ae]=typeof n!="function"?ut:n,this[Ce]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[J]=e.maxAge||0,this[k]=e.dispose,this[Yr]=e.noDisposeOnSet||!1,this[Jr]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Z]=e||1/0,Ie(this)}get max(){return this[Z]}set allowStale(e){this[Ce]=!!e}get allowStale(){return this[Ce]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[J]=e,Ie(this)}get maxAge(){return this[J]}set lengthCalculator(e){typeof e!="function"&&(e=ut),e!==this[ae]&&(this[ae]=e,this[M]=0,this[O].forEach(t=>{t.length=this[ae](t.value,t.key),this[M]+=t.length})),Ie(this)}get lengthCalculator(){return this[ae]}get length(){return this[M]}get itemCount(){return this[O].length}rforEach(e,t){t=t||this;for(let n=this[O].tail;n!==null;){let s=n.prev;Zr(this,e,n,t),n=s}}forEach(e,t){t=t||this;for(let n=this[O].head;n!==null;){let s=n.next;Zr(this,e,n,t),n=s}}keys(){return this[O].toArray().map(e=>e.key)}values(){return this[O].toArray().map(e=>e.value)}reset(){this[k]&&this[O]&&this[O].length&&this[O].forEach(e=>this[k](e.key,e.value)),this[P]=new Map,this[O]=new js,this[M]=0}dump(){return this[O].map(e=>ze(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[J],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let s=n?Date.now():0,i=this[ae](t,e);if(this[P].has(e)){if(i>this[Z])return le(this,this[P].get(e)),!1;let c=this[P].get(e).value;return this[k]&&(this[Yr]||this[k](e,c.value)),c.now=s,c.maxAge=n,c.value=t,this[M]+=i-c.length,c.length=i,this.get(e),Ie(this),!0}let a=new pt(e,t,i,s,n);return a.length>this[Z]?(this[k]&&this[k](e,t),!1):(this[M]+=a.length,this[O].unshift(a),this[P].set(e,this[O].head),Ie(this),!0)}has(e){if(!this[P].has(e))return!1;let t=this[P].get(e).value;return!ze(this,t)}get(e){return ht(this,e,!0)}peek(e){return ht(this,e,!1)}pop(){let e=this[O].tail;return e?(le(this,e),e.value):null}del(e){le(this,this[P].get(e))}load(e){this.reset();let t=Date.now();for(let n=e.length-1;n>=0;n--){let s=e[n],i=s.e||0;if(i===0)this.set(s.k,s.v);else{let a=i-t;a>0&&this.set(s.k,s.v,a)}}}prune(){this[P].forEach((e,t)=>ht(this,t,!1))}},ht=(r,e,t)=>{let n=r[P].get(e);if(n){let s=n.value;if(ze(r,s)){if(le(r,n),!r[Ce])return}else t&&(r[Jr]&&(n.value.now=Date.now()),r[O].unshiftNode(n));return s.value}},ze=(r,e)=>{if(!e||!e.maxAge&&!r[J])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[J]&&t>r[J]},Ie=r=>{if(r[M]>r[Z])for(let e=r[O].tail;r[M]>r[Z]&&e!==null;){let t=e.prev;le(r,e),e=t}},le=(r,e)=>{if(e){let t=e.value;r[k]&&r[k](t.key,t.value),r[M]-=t.length,r[P].delete(t.key),r[O].removeNode(e)}},pt=class{constructor(e,t,n,s,i){this.key=e,this.value=t,this.length=n,this.now=s,this.maxAge=i||0}},Zr=(r,e,t,n)=>{let s=t.value;ze(r,s)&&(le(r,t),r[Ce]||(s=void 0)),s&&e.call(n,s.value,s.key,r)};Qr.exports=ft});var j=f((ac,sn)=>{var Q=class{constructor(e,t){if(t=Fs(t),e instanceof Q)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Q(e.raw,t);if(e instanceof dt)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!rn(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&Vs(s[0])){this.set=[s];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,s=tn.get(n);if(s)return s;let i=this.options.loose,a=i?D[$.HYPHENRANGELOOSE]:D[$.HYPHENRANGE];e=e.replace(a,Qs(this.options.includePrerelease)),w("hyphen replace",e),e=e.replace(D[$.COMPARATORTRIM],ks),w("comparator trim",e),e=e.replace(D[$.TILDETRIM],Ms),e=e.replace(D[$.CARETTRIM],Gs),e=e.split(/\s+/).join(" ");let l=e.split(" ").map(h=>Ks(h,this.options)).join(" ").split(/\s+/).map(h=>Js(h,this.options));i&&(l=l.filter(h=>(w("loose invalid filter",h,this.options),!!h.match(D[$.COMPARATORLOOSE])))),w("range list",l);let c=new Map,o=l.map(h=>new dt(h,this.options));for(let h of o){if(rn(h))return[h];c.set(h.value,h)}c.size>1&&c.has("")&&c.delete("");let u=[...c.values()];return tn.set(n,u),u}intersects(e,t){if(!(e instanceof Q))throw new TypeError("a Range is required");return this.set.some(n=>nn(n,t)&&e.set.some(s=>nn(s,t)&&n.every(i=>s.every(a=>i.intersects(a,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Hs(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(eo(this.set[t],e,this.options))return!0;return!1}};sn.exports=Q;var Ps=en(),tn=new Ps({max:1e3}),Fs=Se(),dt=$e(),w=Oe(),Hs=A(),{re:D,t:$,comparatorTrimReplace:ks,tildeTrimReplace:Ms,caretTrimReplace:Gs}=W(),rn=r=>r.value==="<0.0.0-0",Vs=r=>r.value==="",nn=(r,e)=>{let t=!0,n=r.slice(),s=n.pop();for(;t&&n.length;)t=n.every(i=>s.intersects(i,e)),s=n.pop();return t},Ks=(r,e)=>(w("comp",r,e),r=Bs(r,e),w("caret",r),r=Us(r,e),w("tildes",r),r=zs(r,e),w("xrange",r),r=Zs(r,e),w("stars",r),r),R=r=>!r||r.toLowerCase()==="x"||r==="*",Us=(r,e)=>r.trim().split(/\s+/).map(t=>Xs(t,e)).join(" "),Xs=(r,e)=>{let t=e.loose?D[$.TILDELOOSE]:D[$.TILDE];return r.replace(t,(n,s,i,a,l)=>{w("tilde",r,n,s,i,a,l);let c;return R(s)?c="":R(i)?c=`>=${s}.0.0 <${+s+1}.0.0-0`:R(a)?c=`>=${s}.${i}.0 <${s}.${+i+1}.0-0`:l?(w("replaceTilde pr",l),c=`>=${s}.${i}.${a}-${l} <${s}.${+i+1}.0-0`):c=`>=${s}.${i}.${a} <${s}.${+i+1}.0-0`,w("tilde return",c),c})},Bs=(r,e)=>r.trim().split(/\s+/).map(t=>Ws(t,e)).join(" "),Ws=(r,e)=>{w("caret",r,e);let t=e.loose?D[$.CARETLOOSE]:D[$.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(s,i,a,l,c)=>{w("caret",r,s,i,a,l,c);let o;return R(i)?o="":R(a)?o=`>=${i}.0.0${n} <${+i+1}.0.0-0`:R(l)?i==="0"?o=`>=${i}.${a}.0${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.0${n} <${+i+1}.0.0-0`:c?(w("replaceCaret pr",c),i==="0"?a==="0"?o=`>=${i}.${a}.${l}-${c} <${i}.${a}.${+l+1}-0`:o=`>=${i}.${a}.${l}-${c} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${l}-${c} <${+i+1}.0.0-0`):(w("no pr"),i==="0"?a==="0"?o=`>=${i}.${a}.${l}${n} <${i}.${a}.${+l+1}-0`:o=`>=${i}.${a}.${l}${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${l} <${+i+1}.0.0-0`),w("caret return",o),o})},zs=(r,e)=>(w("replaceXRanges",r,e),r.split(/\s+/).map(t=>Ys(t,e)).join(" ")),Ys=(r,e)=>{r=r.trim();let t=e.loose?D[$.XRANGELOOSE]:D[$.XRANGE];return r.replace(t,(n,s,i,a,l,c)=>{w("xRange",r,n,s,i,a,l,c);let o=R(i),u=o||R(a),h=u||R(l),v=h;return s==="="&&v&&(s=""),c=e.includePrerelease?"-0":"",o?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&v?(u&&(a=0),l=0,s===">"?(s=">=",u?(i=+i+1,a=0,l=0):(a=+a+1,l=0)):s==="<="&&(s="<",u?i=+i+1:a=+a+1),s==="<"&&(c="-0"),n=`${s+i}.${a}.${l}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:h&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),w("xRange return",n),n})},Zs=(r,e)=>(w("replaceStars",r,e),r.trim().replace(D[$.STAR],"")),Js=(r,e)=>(w("replaceGTE0",r,e),r.trim().replace(D[e.includePrerelease?$.GTE0PRE:$.GTE0],"")),Qs=r=>(e,t,n,s,i,a,l,c,o,u,h,v,m)=>(R(n)?t="":R(s)?t=`>=${n}.0.0${r?"-0":""}`:R(i)?t=`>=${n}.${s}.0${r?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,R(o)?c="":R(u)?c=`<${+o+1}.0.0-0`:R(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()),eo=(r,e,t)=>{for(let n=0;n<r.length;n++)if(!r[n].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let n=0;n<r.length;n++)if(w(r[n].semver),r[n].semver!==dt.ANY&&r[n].semver.prerelease.length>0){let s=r[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}});var $e=f((lc,un)=>{var Re=Symbol("SemVer ANY"),ce=class{static get ANY(){return Re}constructor(e,t){if(t=to(t),e instanceof ce){if(e.loose===!!t.loose)return e;e=e.value}gt("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Re?this.value="":this.value=this.operator+this.semver.version,gt("comp",this)}parse(e){let t=this.options.loose?on[an.COMPARATORLOOSE]:on[an.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 ln(n[2],this.options.loose):this.semver=Re}toString(){return this.value}test(e){if(gt("Comparator.test",e,this.options.loose),this.semver===Re||e===Re)return!0;if(typeof e=="string")try{e=new ln(e,this.options)}catch{return!1}return mt(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof ce))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new cn(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new cn(this.value,t).test(e.semver);let n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),i=this.semver.version===e.semver.version,a=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),l=mt(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),c=mt(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||s||i&&a||l||c}};un.exports=ce;var to=Se(),{re:on,t:an}=W(),mt=ct(),gt=Oe(),ln=A(),cn=j()});var De=f((cc,hn)=>{var ro=j(),no=(r,e,t)=>{try{e=new ro(e,t)}catch{return!1}return e.test(r)};hn.exports=no});var pn=f((uc,fn)=>{var io=j(),so=(r,e)=>new io(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));fn.exports=so});var mn=f((hc,dn)=>{var oo=A(),ao=j(),lo=(r,e,t)=>{let n=null,s=null,i=null;try{i=new ao(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===-1)&&(n=a,s=new oo(n,t))}),n};dn.exports=lo});var vn=f((fc,gn)=>{var co=A(),uo=j(),ho=(r,e,t)=>{let n=null,s=null,i=null;try{i=new uo(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===1)&&(n=a,s=new co(n,t))}),n};gn.exports=ho});var En=f((pc,yn)=>{var vt=A(),fo=j(),_n=Ae(),po=(r,e)=>{r=new fo(r,e);let t=new vt("0.0.0");if(r.test(t)||(t=new vt("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n<r.set.length;++n){let s=r.set[n],i=null;s.forEach(a=>{let l=new vt(a.semver.version);switch(a.operator){case">":l.prerelease.length===0?l.patch++:l.prerelease.push(0),l.raw=l.format();case"":case">=":(!i||_n(l,i))&&(i=l);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),i&&(!t||_n(t,i))&&(t=i)}return t&&r.test(t)?t:null};yn.exports=po});var wn=f((dc,bn)=>{var mo=j(),go=(r,e)=>{try{return new mo(r,e).range||"*"}catch{return null}};bn.exports=go});var Ye=f((mc,In)=>{var vo=A(),An=$e(),{ANY:_o}=An,yo=j(),Eo=De(),On=Ae(),Sn=Ke(),bo=Xe(),wo=Ue(),Oo=(r,e,t,n)=>{r=new vo(r,n),e=new yo(e,n);let s,i,a,l,c;switch(t){case">":s=On,i=bo,a=Sn,l=">",c=">=";break;case"<":s=Sn,i=wo,a=On,l="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Eo(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===_o&&(m=new An(">=0.0.0")),h=h||m,v=v||m,s(m.semver,h.semver,n)?h=m:a(m.semver,v.semver,n)&&(v=m)}),h.operator===l||h.operator===c||(!v.operator||v.operator===l)&&i(r,v.semver))return!1;if(v.operator===c&&a(r,v.semver))return!1}return!0};In.exports=Oo});var $n=f((gc,Cn)=>{var So=Ye(),Ao=(r,e,t)=>So(r,e,">",t);Cn.exports=Ao});var Dn=f((vc,Rn)=>{var Io=Ye(),Co=(r,e,t)=>Io(r,e,"<",t);Rn.exports=Co});var Ln=f((_c,qn)=>{var xn=j(),$o=(r,e,t)=>(r=new xn(r,t),e=new xn(e,t),r.intersects(e));qn.exports=$o});var Tn=f((yc,Nn)=>{var Ro=De(),Do=T();Nn.exports=(r,e,t)=>{let n=[],s=null,i=null,a=r.sort((u,h)=>Do(u,h,t));for(let u of a)Ro(u,e,t)?(i=u,s||(s=u)):(i&&n.push([s,i]),i=null,s=null);s&&n.push([s,null]);let l=[];for(let[u,h]of n)u===h?l.push(u):!h&&u===a[0]?l.push("*"):h?u===a[0]?l.push(`<=${h}`):l.push(`${u} - ${h}`):l.push(`>=${u}`);let c=l.join(" || "),o=typeof e.raw=="string"?e.raw:String(e);return c.length<o.length?c:e}});var kn=f((Ec,Hn)=>{var jn=j(),Ze=$e(),{ANY:_t}=Ze,xe=De(),yt=T(),xo=(r,e,t={})=>{if(r===e)return!0;r=new jn(r,t),e=new jn(e,t);let n=!1;e:for(let s of r.set){for(let i of e.set){let a=qo(s,i,t);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},qo=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===_t){if(e.length===1&&e[0].semver===_t)return!0;t.includePrerelease?r=[new Ze(">=0.0.0-0")]:r=[new Ze(">=0.0.0")]}if(e.length===1&&e[0].semver===_t){if(t.includePrerelease)return!0;e=[new Ze(">=0.0.0")]}let n=new Set,s,i;for(let m of r)m.operator===">"||m.operator===">="?s=Pn(s,m,t):m.operator==="<"||m.operator==="<="?i=Fn(i,m,t):n.add(m.semver);if(n.size>1)return null;let a;if(s&&i){if(a=yt(s.semver,i.semver,t),a>0)return null;if(a===0&&(s.operator!==">="||i.operator!=="<="))return null}for(let m of n){if(s&&!xe(m,String(s),t)||i&&!xe(m,String(i),t))return null;for(let Pe of e)if(!xe(m,String(Pe),t))return!1;return!0}let l,c,o,u,h=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1,v=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1;h&&h.prerelease.length===1&&i.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let m of e){if(u=u||m.operator===">"||m.operator===">=",o=o||m.operator==="<"||m.operator==="<=",s){if(v&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===v.major&&m.semver.minor===v.minor&&m.semver.patch===v.patch&&(v=!1),m.operator===">"||m.operator===">="){if(l=Pn(s,m,t),l===m&&l!==s)return!1}else if(s.operator===">="&&!xe(s.semver,String(m),t))return!1}if(i){if(h&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===h.major&&m.semver.minor===h.minor&&m.semver.patch===h.patch&&(h=!1),m.operator==="<"||m.operator==="<="){if(c=Fn(i,m,t),c===m&&c!==i)return!1}else if(i.operator==="<="&&!xe(i.semver,String(m),t))return!1}if(!m.operator&&(i||s)&&a!==0)return!1}return!(s&&o&&!i&&a!==0||i&&u&&!s&&a!==0||v||h)},Pn=(r,e,t)=>{if(!r)return e;let n=yt(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},Fn=(r,e,t)=>{if(!r)return e;let n=yt(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};Hn.exports=xo});var Gn=f((bc,Mn)=>{var Et=W();Mn.exports={re:Et.re,src:Et.src,tokens:Et.t,SEMVER_SPEC_VERSION:we().SEMVER_SPEC_VERSION,SemVer:A(),compareIdentifiers:He().compareIdentifiers,rcompareIdentifiers:He().rcompareIdentifiers,parse:z(),valid:lr(),clean:ur(),inc:pr(),diff:yr(),major:br(),minor:Or(),patch:Ar(),prerelease:Cr(),compare:T(),rcompare:Rr(),compareLoose:xr(),compareBuild:Ve(),sort:Tr(),rsort:Pr(),gt:Ae(),lt:Ke(),eq:Ge(),neq:lt(),gte:Ue(),lte:Xe(),cmp:ct(),coerce:Ur(),Comparator:$e(),Range:j(),satisfies:De(),toComparators:pn(),maxSatisfying:mn(),minSatisfying:vn(),minVersion:En(),validRange:wn(),outside:Ye(),gtr:$n(),ltr:Dn(),intersects:Ln(),simplifyRange:Tn(),subset:kn()}});var G=f(L=>{"use strict";var Lo=L&&L.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),No=L&&L.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),To=L&&L.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Lo(e,r,t);return No(e,r),e},Vn=L&&L.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(L,"__esModule",{value:!0});L.getCoreVersion=void 0;var Kn=Vn(require("path")),Un=Vn(require("fs")),bt=To(require("@serverless-devs/core")),jo=Gn(),Xn=Kn.default.join(bt.getRootHome(),"cache","core"),wt=Kn.default.join(Xn,"package.json");function Po(){if(Un.default.existsSync(wt)){var r=require("@serverless-devs/core/package.json").version,e=Bn();return jo.gt(e,r)?require(Xn):bt}return bt}function Bn(){return Un.default.existsSync(wt)?require(wt).version:void 0}L.getCoreVersion=Bn;L.default=Po()});var Je=f(qe=>{"use strict";var Fo=qe&&qe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qe,"__esModule",{value:!0});var Ho=Fo(G()),ko=Ho.default.Logger,Ot=new ko("S-CLI");Ot.success=function(r){return Ot.log(r,"green")};qe.default=Ot});var It=f(x=>{"use strict";var Mo=x&&x.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},Go=x&&x.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Wn=x&&x.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(x,"__esModule",{value:!0});x.handlerProfileFile=x.getConfig=x.setConfig=void 0;var zn=Wn(require("path")),At=Wn(G()),F=At.default.fse,Qe=At.default.jsyaml,St=At.default.getRootHome;function Vo(r){var e=Zn();F.writeFileSync(e,Qe.dump(r))}function Yn(){var r=Zn();if(!F.existsSync(r))return{};try{var e=Qe.load(F.readFileSync(r,"utf8"))||{};return e}catch(t){throw t}}function Zn(){var r=zn.default.join(St(),"set-config.yml");return F.existsSync(r)||F.createFileSync(r),r}function Ko(r,e){var t=Yn();t[r]=e,Vo(t)}x.setConfig=Ko;function Uo(r,e){var t=Yn();return t[r]||e}x.getConfig=Uo;function Xo(r){return Mo(this,void 0,void 0,function(){var e,t,n,s,i,a,l;return Go(this,function(c){switch(c.label){case 0:if(e=r.filePath||"set-config.yml",t=zn.default.join(St(),e),n=F.existsSync(t),s={},n)return[3,5];i=St(),c.label=1;case 1:return c.trys.push([1,2,,4]),F.statSync(i),[3,4];case 2:return a=c.sent(),[4,F.mkdirSync(i)];case 3:return c.sent(),[3,4];case 4:return[3,6];case 5:try{s=Qe.load(F.readFileSync(t,"utf8"))||{}}catch(o){throw o}c.label=6;case 6:return r.read?[2,s]:(l=r.configKey||"",s[l]=r.data,[4,F.writeFileSync(t,Qe.dump(s))]);case 7:return c.sent(),[2,s]}})})}x.handlerProfileFile=Xo});var Jn=f((Ac,Bo)=>{Bo.exports={name:"@serverless-devs/s",version:"2.1.1-beta.9",description:"Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",homepage:"https://www.serverless-devs.com",keywords:["serverless","alibaba","tencent","azure","baidu","huawei","google","function","faas","serverless-devs"],publishConfig:{access:"public",registry:"https://registry.npmjs.org"},license:"MIT",repository:{type:"git",url:"https://github.com/Serverless-Devs/Serverless-Devs"},bugs:{url:"https://github.com/Serverless-Devs/Serverless-Devs/issues"},scripts:{start:"npm run watch",prewatch:"rm -rf lib/* && cp -r ./src/daemon ./lib",watch:"tsc -w",test:"jest test/special-command.test",prebuild:"rm -rf lib/*",build:"tsc && cp -r ./src/daemon ./lib",postbuild:"./shell/postbuild.sh","test:cov":"jest --coverage",lint:"npm run typecheck && f2elint scan -i src",fix:"f2elint fix",typecheck:"npx tsc -p tsconfig.json --noEmit",update:"rm -rf yarn.lock && rm -rf package-lock.json && rm -rf node_modules && yarn",beta:"npm publish --tag=beta"},main:"./lib/index.js",bin:{s:"bin/s"},devDependencies:{"@serverless-devs/commander":"^6.0.0","@types/jest":"^27.4.0","@types/node":"^14.0.23","@typescript-eslint/eslint-plugin":"^4.14.1","@typescript-eslint/parser":"^4.14.1",ajv:"^8.10.0","babel-eslint":"^10.1.0",boxen:"^5.0.0",dotenv:"^10.0.0",esbuild:"^0.14.0",eslint:"^7.7.0","eslint-config-prettier":"^7.2.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2",husky:"^4.2.3",inquirer:"8.2.0","inquirer-autocomplete-prompt":"^1.3.0",jest:"^27.4.7","latest-version":"^5.1.0","lint-staged":"^10.0.8","os-locale":"5.0.0",prettier:"^2.2.1",semver:"^7.3.5","semver-diff":"^3.1.1","ts-jest":"^27.1.3","ts-node":"^9.1.1",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},dependencies:{"@serverless-devs/core":"beta","@serverless-devs/ui":"beta",tabtab:"^3.0.2"}}});var $t=f(g=>{"use strict";var Wo=g&&g.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),zo=g&&g.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Yo=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)&&Wo(e,r,t);return zo(e,r),e},ee=g&&g.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},te=g&&g.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},et=g&&g.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(g,"__esModule",{value:!0});g.getYamlPath=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 Zo=et(require("path")),Le=et(require("fs")),Jo=et(require("os")),S=Yo(G()),Qo=It(),ue=et(Je()),Qn=Jn(),he=S.default.colors,ea=S.default.got,ta=S.default.isDocker,ra=S.default.isCiCdEnv,K=S.default.lodash,ei=S.default.publishHelp,na=K.get,ia=K.trim,sa=K.assign,oa=K.filter,ti=K.includes,aa=K.omit,la=K.isPlainObject,ca=K.isEmpty,ua=he.underline,ha=he.bold;g.red=he.hex("#fd5750");g.yellow=he.hex("#F3F99D");g.bgRed=he.hex("#000").bgHex("#fd5750");var fa=function(){var r=process.env.serverless_devs_temp_argv;try{var e=JSON.parse(r),t=S.default.getGlobalArgs(e);return process.argv=process.argv.slice(0,2).concat(t._argsObj),sa({},t,{noHelpArgv:process.argv.slice(0,2).concat(oa(t._argsObj,function(n){return!ti(["-h","--help"],n)}))})}catch{return{}}};g.getProcessArgv=fa;var pa=function(r){return ee(void 0,void 0,void 0,function(){var e,t;return te(this,function(n){switch(n.label){case 0:return[4,S.default.getCredentialAliasList()];case 1:return e=n.sent(),ti(e,r)?[4,S.default.getCredential(r)]:[3,3];case 2:return t=n.sent(),[2,t];case 3:return[2]}})})};g.getCredentialWithExisted=pa;var da=function(){return ee(void 0,void 0,void 0,function(){var r,e,t,n,s,i;return te(this,function(a){switch(a.label){case 0:return[4,S.default.getCredentialAliasList()];case 1:if(r=a.sent(),!(r.length>0))return[3,6];e={},t=0,n=r,a.label=2;case 2:return t<n.length?(s=n[t],[4,S.default.getCredential(s)]):[3,5];case 3:i=a.sent(),e[i.Alias]=aa(i,"Alias"),a.label=4;case 4:return t++,[3,2];case 5:return[2,e];case 6:return[2]}})})};g.getCredentialWithAll=da;var ma=function(r,e){return e===void 0&&(e="unknow"),ee(void 0,void 0,void 0,function(){var t,n,s,i;return te(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t=(0,Qo.getConfig)("analysis"),t!=="enable"?[2]:ta()||ra()?[2]:[4,ea("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(e,"&code=TypeError&s=").concat(r),{timeout:2e3,json:!0})];case 1:return n=a.sent(),s=na(n.body,"shorturl"),s&&ue.default.log(`AI Tips:
|
|
15
|
+
`)}function Ft(r,e,t){return r.match(/[\n]\s+/)||e<40?r:Gt(r,e,t)}function Ht(r,e){r._hasHelpOption&&e.find(n=>n===r._helpLongFlag||n===r._helpShortFlag)&&(r.outputHelp(),r._exit(0,"commander.helpDisplayed","(outputHelp)"))}function kt(r){let e=r.name+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}function Vt(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 Mt(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",s="9229",i;return(i=e.match(/^(--inspect(-brk)?)$/))!==null?t=i[1]:(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=i[1],/^\d+$/.test(i[3])?s=i[3]:n=i[3]):(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],s=i[4]),t&&s!=="0"?`${t}=${n}:${parseInt(s)+1}`:e})}});var we=f((Rl,Xt)=>{var Ii="2.0.0",Ci=Number.MAX_SAFE_INTEGER||9007199254740991,$i=16;Xt.exports={SEMVER_SPEC_VERSION:Ii,MAX_LENGTH:256,MAX_SAFE_INTEGER:Ci,MAX_SAFE_COMPONENT_LENGTH:$i}});var Oe=f((Dl,Bt)=>{var Ri=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Bt.exports=Ri});var W=f((V,Wt)=>{var{MAX_SAFE_COMPONENT_LENGTH:at}=we(),Di=Oe();V=Wt.exports={};var xi=V.re=[],p=V.src=[],d=V.t={},qi=0,_=(r,e,t)=>{let n=qi++;Di(r,n,e),d[r]=n,p[n]=e,xi[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,${at}})(?:\\.(\\d{1,${at}}))?(?:\\.(\\d{1,${at}}))?(?:$|[^\\d])`);_("COERCERTL",p[d.COERCE],!0);_("LONETILDE","(?:~>?)");_("TILDETRIM",`(\\s*)${p[d.LONETILDE]}\\s+`,!0);V.tildeTrimReplace="$1~";_("TILDE",`^${p[d.LONETILDE]}${p[d.XRANGEPLAIN]}$`);_("TILDELOOSE",`^${p[d.LONETILDE]}${p[d.XRANGEPLAINLOOSE]}$`);_("LONECARET","(?:\\^)");_("CARETTRIM",`(\\s*)${p[d.LONECARET]}\\s+`,!0);V.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);V.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 Se=f((xl,zt)=>{var Li=["includePrerelease","loose","rtl"],Ni=r=>r?typeof r!="object"?{loose:!0}:Li.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};zt.exports=Ni});var He=f((ql,Jt)=>{var Yt=/^[0-9]+$/,Zt=(r,e)=>{let t=Yt.test(r),n=Yt.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},Ti=(r,e)=>Zt(e,r);Jt.exports={compareIdentifiers:Zt,rcompareIdentifiers:Ti}});var S=f((Ll,rr)=>{var ke=Oe(),{MAX_LENGTH:Qt,MAX_SAFE_INTEGER:Me}=we(),{re:er,t:tr}=W(),ji=Se(),{compareIdentifiers:ie}=He(),q=class{constructor(e,t){if(t=ji(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>Qt)throw new TypeError(`version is longer than ${Qt} characters`);ke("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?er[tr.LOOSE]:er[tr.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>Me||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Me||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Me||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let i=+s;if(i>=0&&i<Me)return i}return s}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(ke("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)),ie(this.major,e.major)||ie(this.minor,e.minor)||ie(this.patch,e.patch)}comparePre(e){if(e instanceof q||(e=new q(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let n=this.prerelease[t],s=e.prerelease[t];if(ke("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return ie(n,s)}while(++t)}compareBuild(e){e instanceof q||(e=new q(e,this.options));let t=0;do{let n=this.build[t],s=e.build[t];if(ke("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return ie(n,s)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}t&&(ie(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}};rr.exports=q});var z=f((Nl,or)=>{var{MAX_LENGTH:Pi}=we(),{re:nr,t:ir}=W(),sr=S(),Fi=Se(),Hi=(r,e)=>{if(e=Fi(e),r instanceof sr)return r;if(typeof r!="string"||r.length>Pi||!(e.loose?nr[ir.LOOSE]:nr[ir.FULL]).test(r))return null;try{return new sr(r,e)}catch{return null}};or.exports=Hi});var lr=f((Tl,ar)=>{var ki=z(),Mi=(r,e)=>{let t=ki(r,e);return t?t.version:null};ar.exports=Mi});var ur=f((jl,cr)=>{var Gi=z(),Vi=(r,e)=>{let t=Gi(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};cr.exports=Vi});var pr=f((Pl,fr)=>{var hr=S(),Ki=(r,e,t,n)=>{typeof t=="string"&&(n=t,t=void 0);try{return new hr(r instanceof hr?r.version:r,t).inc(e,n).version}catch{return null}};fr.exports=Ki});var T=f((Fl,mr)=>{var dr=S(),Ui=(r,e,t)=>new dr(r,t).compare(new dr(e,t));mr.exports=Ui});var Ge=f((Hl,gr)=>{var Xi=T(),Bi=(r,e,t)=>Xi(r,e,t)===0;gr.exports=Bi});var yr=f((kl,_r)=>{var vr=z(),Wi=Ge(),zi=(r,e)=>{if(Wi(r,e))return null;{let t=vr(r),n=vr(e),s=t.prerelease.length||n.prerelease.length,i=s?"pre":"",a=s?"prerelease":"";for(let l in t)if((l==="major"||l==="minor"||l==="patch")&&t[l]!==n[l])return i+l;return a}};_r.exports=zi});var br=f((Ml,Er)=>{var Yi=S(),Zi=(r,e)=>new Yi(r,e).major;Er.exports=Zi});var Or=f((Gl,wr)=>{var Ji=S(),Qi=(r,e)=>new Ji(r,e).minor;wr.exports=Qi});var Ar=f((Vl,Sr)=>{var es=S(),ts=(r,e)=>new es(r,e).patch;Sr.exports=ts});var Cr=f((Kl,Ir)=>{var rs=z(),ns=(r,e)=>{let t=rs(r,e);return t&&t.prerelease.length?t.prerelease:null};Ir.exports=ns});var Rr=f((Ul,$r)=>{var is=T(),ss=(r,e,t)=>is(e,r,t);$r.exports=ss});var xr=f((Xl,Dr)=>{var os=T(),as=(r,e)=>os(r,e,!0);Dr.exports=as});var Ve=f((Bl,Lr)=>{var qr=S(),ls=(r,e,t)=>{let n=new qr(r,t),s=new qr(e,t);return n.compare(s)||n.compareBuild(s)};Lr.exports=ls});var Tr=f((Wl,Nr)=>{var cs=Ve(),us=(r,e)=>r.sort((t,n)=>cs(t,n,e));Nr.exports=us});var Pr=f((zl,jr)=>{var hs=Ve(),fs=(r,e)=>r.sort((t,n)=>hs(n,t,e));jr.exports=fs});var Ae=f((Yl,Fr)=>{var ps=T(),ds=(r,e,t)=>ps(r,e,t)>0;Fr.exports=ds});var Ke=f((Zl,Hr)=>{var ms=T(),gs=(r,e,t)=>ms(r,e,t)<0;Hr.exports=gs});var lt=f((Jl,kr)=>{var vs=T(),_s=(r,e,t)=>vs(r,e,t)!==0;kr.exports=_s});var Ue=f((Ql,Mr)=>{var ys=T(),Es=(r,e,t)=>ys(r,e,t)>=0;Mr.exports=Es});var Xe=f((ec,Gr)=>{var bs=T(),ws=(r,e,t)=>bs(r,e,t)<=0;Gr.exports=ws});var ct=f((tc,Vr)=>{var Os=Ge(),Ss=lt(),As=Ae(),Is=Ue(),Cs=Ke(),$s=Xe(),Rs=(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 Os(r,t,n);case"!=":return Ss(r,t,n);case">":return As(r,t,n);case">=":return Is(r,t,n);case"<":return Cs(r,t,n);case"<=":return $s(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};Vr.exports=Rs});var Ur=f((rc,Kr)=>{var Ds=S(),xs=z(),{re:Be,t:We}=W(),qs=(r,e)=>{if(r instanceof Ds)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(Be[We.COERCE]);else{let n;for(;(n=Be[We.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||n.index+n[0].length!==t.index+t[0].length)&&(t=n),Be[We.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Be[We.COERCERTL].lastIndex=-1}return t===null?null:xs(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};Kr.exports=qs});var Br=f((nc,Xr)=>{"use strict";Xr.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var zr=f((ic,Wr)=>{"use strict";Wr.exports=y;y.Node=Y;y.create=y;function y(r){var e=this;if(e instanceof y||(e=new y),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var t=0,n=arguments.length;t<n;t++)e.push(arguments[t]);return e}y.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var e=r.next,t=r.prev;return e&&(e.prev=t),t&&(t.next=e),r===this.head&&(this.head=e),r===this.tail&&(this.tail=t),r.list.length--,r.next=null,r.prev=null,r.list=null,e};y.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var e=this.head;r.list=this,r.next=e,e&&(e.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};y.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var e=this.tail;r.list=this,r.prev=e,e&&(e.next=r),this.tail=r,this.head||(this.head=r),this.length++}};y.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)Ns(this,arguments[r]);return this.length};y.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)Ts(this,arguments[r]);return this.length};y.prototype.pop=function(){if(!!this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}};y.prototype.shift=function(){if(!!this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}};y.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,n=0;t!==null;n++)r.call(e,t.value,n,this),t=t.next};y.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,n=this.length-1;t!==null;n--)r.call(e,t.value,n,this),t=t.prev};y.prototype.get=function(r){for(var e=0,t=this.head;t!==null&&e<r;e++)t=t.next;if(e===r&&t!==null)return t.value};y.prototype.getReverse=function(r){for(var e=0,t=this.tail;t!==null&&e<r;e++)t=t.prev;if(e===r&&t!==null)return t.value};y.prototype.map=function(r,e){e=e||this;for(var t=new y,n=this.head;n!==null;)t.push(r.call(e,n.value,this)),n=n.next;return t};y.prototype.mapReverse=function(r,e){e=e||this;for(var t=new y,n=this.tail;n!==null;)t.push(r.call(e,n.value,this)),n=n.prev;return t};y.prototype.reduce=function(r,e){var t,n=this.head;if(arguments.length>1)t=e;else if(this.head)n=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;n!==null;s++)t=r(t,n.value,s),n=n.next;return t};y.prototype.reduceReverse=function(r,e){var t,n=this.tail;if(arguments.length>1)t=e;else if(this.tail)n=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;n!==null;s--)t=r(t,n.value,s),n=n.prev;return t};y.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};y.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};y.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new y;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=0,s=this.head;s!==null&&n<r;n++)s=s.next;for(;s!==null&&n<e;n++,s=s.next)t.push(s.value);return t};y.prototype.sliceReverse=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new y;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=this.length,s=this.tail;s!==null&&n>e;n--)s=s.prev;for(;s!==null&&n>r;n--,s=s.prev)t.push(s.value);return t};y.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var n=0,s=this.head;s!==null&&n<r;n++)s=s.next;for(var i=[],n=0;s&&n<e;n++)i.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var n=0;n<t.length;n++)s=Ls(this,s,t[n]);return i};y.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var n=t.prev;t.prev=t.next,t.next=n}return this.head=e,this.tail=r,this};function Ls(r,e,t){var n=e===r.head?new Y(t,null,e,r):new Y(t,e,e.next,r);return n.next===null&&(r.tail=n),n.prev===null&&(r.head=n),r.length++,n}function Ns(r,e){r.tail=new Y(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function Ts(r,e){r.head=new Y(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function Y(r,e,t,n){if(!(this instanceof Y))return new Y(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{Br()(y)}catch{}});var en=f((sc,Qr)=>{"use strict";var js=zr(),Z=Symbol("max"),M=Symbol("length"),se=Symbol("lengthCalculator"),Ce=Symbol("allowStale"),J=Symbol("maxAge"),k=Symbol("dispose"),Yr=Symbol("noDisposeOnSet"),O=Symbol("lruList"),P=Symbol("cache"),Jr=Symbol("updateAgeOnGet"),ut=()=>1,ft=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[Z]=e.max||1/0,n=e.length||ut;if(this[se]=typeof n!="function"?ut:n,this[Ce]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[J]=e.maxAge||0,this[k]=e.dispose,this[Yr]=e.noDisposeOnSet||!1,this[Jr]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Z]=e||1/0,Ie(this)}get max(){return this[Z]}set allowStale(e){this[Ce]=!!e}get allowStale(){return this[Ce]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[J]=e,Ie(this)}get maxAge(){return this[J]}set lengthCalculator(e){typeof e!="function"&&(e=ut),e!==this[se]&&(this[se]=e,this[M]=0,this[O].forEach(t=>{t.length=this[se](t.value,t.key),this[M]+=t.length})),Ie(this)}get lengthCalculator(){return this[se]}get length(){return this[M]}get itemCount(){return this[O].length}rforEach(e,t){t=t||this;for(let n=this[O].tail;n!==null;){let s=n.prev;Zr(this,e,n,t),n=s}}forEach(e,t){t=t||this;for(let n=this[O].head;n!==null;){let s=n.next;Zr(this,e,n,t),n=s}}keys(){return this[O].toArray().map(e=>e.key)}values(){return this[O].toArray().map(e=>e.value)}reset(){this[k]&&this[O]&&this[O].length&&this[O].forEach(e=>this[k](e.key,e.value)),this[P]=new Map,this[O]=new js,this[M]=0}dump(){return this[O].map(e=>ze(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[J],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let s=n?Date.now():0,i=this[se](t,e);if(this[P].has(e)){if(i>this[Z])return oe(this,this[P].get(e)),!1;let c=this[P].get(e).value;return this[k]&&(this[Yr]||this[k](e,c.value)),c.now=s,c.maxAge=n,c.value=t,this[M]+=i-c.length,c.length=i,this.get(e),Ie(this),!0}let a=new pt(e,t,i,s,n);return a.length>this[Z]?(this[k]&&this[k](e,t),!1):(this[M]+=a.length,this[O].unshift(a),this[P].set(e,this[O].head),Ie(this),!0)}has(e){if(!this[P].has(e))return!1;let t=this[P].get(e).value;return!ze(this,t)}get(e){return ht(this,e,!0)}peek(e){return ht(this,e,!1)}pop(){let e=this[O].tail;return e?(oe(this,e),e.value):null}del(e){oe(this,this[P].get(e))}load(e){this.reset();let t=Date.now();for(let n=e.length-1;n>=0;n--){let s=e[n],i=s.e||0;if(i===0)this.set(s.k,s.v);else{let a=i-t;a>0&&this.set(s.k,s.v,a)}}}prune(){this[P].forEach((e,t)=>ht(this,t,!1))}},ht=(r,e,t)=>{let n=r[P].get(e);if(n){let s=n.value;if(ze(r,s)){if(oe(r,n),!r[Ce])return}else t&&(r[Jr]&&(n.value.now=Date.now()),r[O].unshiftNode(n));return s.value}},ze=(r,e)=>{if(!e||!e.maxAge&&!r[J])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[J]&&t>r[J]},Ie=r=>{if(r[M]>r[Z])for(let e=r[O].tail;r[M]>r[Z]&&e!==null;){let t=e.prev;oe(r,e),e=t}},oe=(r,e)=>{if(e){let t=e.value;r[k]&&r[k](t.key,t.value),r[M]-=t.length,r[P].delete(t.key),r[O].removeNode(e)}},pt=class{constructor(e,t,n,s,i){this.key=e,this.value=t,this.length=n,this.now=s,this.maxAge=i||0}},Zr=(r,e,t,n)=>{let s=t.value;ze(r,s)&&(oe(r,t),r[Ce]||(s=void 0)),s&&e.call(n,s.value,s.key,r)};Qr.exports=ft});var j=f((oc,sn)=>{var Q=class{constructor(e,t){if(t=Fs(t),e instanceof Q)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Q(e.raw,t);if(e instanceof dt)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!rn(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&Vs(s[0])){this.set=[s];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,s=tn.get(n);if(s)return s;let i=this.options.loose,a=i?D[C.HYPHENRANGELOOSE]:D[C.HYPHENRANGE];e=e.replace(a,Qs(this.options.includePrerelease)),w("hyphen replace",e),e=e.replace(D[C.COMPARATORTRIM],ks),w("comparator trim",e),e=e.replace(D[C.TILDETRIM],Ms),e=e.replace(D[C.CARETTRIM],Gs),e=e.split(/\s+/).join(" ");let l=e.split(" ").map(h=>Ks(h,this.options)).join(" ").split(/\s+/).map(h=>Js(h,this.options));i&&(l=l.filter(h=>(w("loose invalid filter",h,this.options),!!h.match(D[C.COMPARATORLOOSE])))),w("range list",l);let c=new Map,o=l.map(h=>new dt(h,this.options));for(let h of o){if(rn(h))return[h];c.set(h.value,h)}c.size>1&&c.has("")&&c.delete("");let u=[...c.values()];return tn.set(n,u),u}intersects(e,t){if(!(e instanceof Q))throw new TypeError("a Range is required");return this.set.some(n=>nn(n,t)&&e.set.some(s=>nn(s,t)&&n.every(i=>s.every(a=>i.intersects(a,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Hs(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(eo(this.set[t],e,this.options))return!0;return!1}};sn.exports=Q;var Ps=en(),tn=new Ps({max:1e3}),Fs=Se(),dt=$e(),w=Oe(),Hs=S(),{re:D,t:C,comparatorTrimReplace:ks,tildeTrimReplace:Ms,caretTrimReplace:Gs}=W(),rn=r=>r.value==="<0.0.0-0",Vs=r=>r.value==="",nn=(r,e)=>{let t=!0,n=r.slice(),s=n.pop();for(;t&&n.length;)t=n.every(i=>s.intersects(i,e)),s=n.pop();return t},Ks=(r,e)=>(w("comp",r,e),r=Bs(r,e),w("caret",r),r=Us(r,e),w("tildes",r),r=zs(r,e),w("xrange",r),r=Zs(r,e),w("stars",r),r),$=r=>!r||r.toLowerCase()==="x"||r==="*",Us=(r,e)=>r.trim().split(/\s+/).map(t=>Xs(t,e)).join(" "),Xs=(r,e)=>{let t=e.loose?D[C.TILDELOOSE]:D[C.TILDE];return r.replace(t,(n,s,i,a,l)=>{w("tilde",r,n,s,i,a,l);let c;return $(s)?c="":$(i)?c=`>=${s}.0.0 <${+s+1}.0.0-0`:$(a)?c=`>=${s}.${i}.0 <${s}.${+i+1}.0-0`:l?(w("replaceTilde pr",l),c=`>=${s}.${i}.${a}-${l} <${s}.${+i+1}.0-0`):c=`>=${s}.${i}.${a} <${s}.${+i+1}.0-0`,w("tilde return",c),c})},Bs=(r,e)=>r.trim().split(/\s+/).map(t=>Ws(t,e)).join(" "),Ws=(r,e)=>{w("caret",r,e);let t=e.loose?D[C.CARETLOOSE]:D[C.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(s,i,a,l,c)=>{w("caret",r,s,i,a,l,c);let o;return $(i)?o="":$(a)?o=`>=${i}.0.0${n} <${+i+1}.0.0-0`:$(l)?i==="0"?o=`>=${i}.${a}.0${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.0${n} <${+i+1}.0.0-0`:c?(w("replaceCaret pr",c),i==="0"?a==="0"?o=`>=${i}.${a}.${l}-${c} <${i}.${a}.${+l+1}-0`:o=`>=${i}.${a}.${l}-${c} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${l}-${c} <${+i+1}.0.0-0`):(w("no pr"),i==="0"?a==="0"?o=`>=${i}.${a}.${l}${n} <${i}.${a}.${+l+1}-0`:o=`>=${i}.${a}.${l}${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${l} <${+i+1}.0.0-0`),w("caret return",o),o})},zs=(r,e)=>(w("replaceXRanges",r,e),r.split(/\s+/).map(t=>Ys(t,e)).join(" ")),Ys=(r,e)=>{r=r.trim();let t=e.loose?D[C.XRANGELOOSE]:D[C.XRANGE];return r.replace(t,(n,s,i,a,l,c)=>{w("xRange",r,n,s,i,a,l,c);let o=$(i),u=o||$(a),h=u||$(l),v=h;return s==="="&&v&&(s=""),c=e.includePrerelease?"-0":"",o?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&v?(u&&(a=0),l=0,s===">"?(s=">=",u?(i=+i+1,a=0,l=0):(a=+a+1,l=0)):s==="<="&&(s="<",u?i=+i+1:a=+a+1),s==="<"&&(c="-0"),n=`${s+i}.${a}.${l}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:h&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),w("xRange return",n),n})},Zs=(r,e)=>(w("replaceStars",r,e),r.trim().replace(D[C.STAR],"")),Js=(r,e)=>(w("replaceGTE0",r,e),r.trim().replace(D[e.includePrerelease?C.GTE0PRE:C.GTE0],"")),Qs=r=>(e,t,n,s,i,a,l,c,o,u,h,v,m)=>($(n)?t="":$(s)?t=`>=${n}.0.0${r?"-0":""}`:$(i)?t=`>=${n}.${s}.0${r?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,$(o)?c="":$(u)?c=`<${+o+1}.0.0-0`:$(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()),eo=(r,e,t)=>{for(let n=0;n<r.length;n++)if(!r[n].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let n=0;n<r.length;n++)if(w(r[n].semver),r[n].semver!==dt.ANY&&r[n].semver.prerelease.length>0){let s=r[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}});var $e=f((ac,un)=>{var Re=Symbol("SemVer ANY"),ae=class{static get ANY(){return Re}constructor(e,t){if(t=to(t),e instanceof ae){if(e.loose===!!t.loose)return e;e=e.value}gt("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Re?this.value="":this.value=this.operator+this.semver.version,gt("comp",this)}parse(e){let t=this.options.loose?on[an.COMPARATORLOOSE]:on[an.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 ln(n[2],this.options.loose):this.semver=Re}toString(){return this.value}test(e){if(gt("Comparator.test",e,this.options.loose),this.semver===Re||e===Re)return!0;if(typeof e=="string")try{e=new ln(e,this.options)}catch{return!1}return mt(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof ae))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new cn(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new cn(this.value,t).test(e.semver);let n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),i=this.semver.version===e.semver.version,a=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),l=mt(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),c=mt(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||s||i&&a||l||c}};un.exports=ae;var to=Se(),{re:on,t:an}=W(),mt=ct(),gt=Oe(),ln=S(),cn=j()});var De=f((lc,hn)=>{var ro=j(),no=(r,e,t)=>{try{e=new ro(e,t)}catch{return!1}return e.test(r)};hn.exports=no});var pn=f((cc,fn)=>{var io=j(),so=(r,e)=>new io(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));fn.exports=so});var mn=f((uc,dn)=>{var oo=S(),ao=j(),lo=(r,e,t)=>{let n=null,s=null,i=null;try{i=new ao(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===-1)&&(n=a,s=new oo(n,t))}),n};dn.exports=lo});var vn=f((hc,gn)=>{var co=S(),uo=j(),ho=(r,e,t)=>{let n=null,s=null,i=null;try{i=new uo(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===1)&&(n=a,s=new co(n,t))}),n};gn.exports=ho});var En=f((fc,yn)=>{var vt=S(),fo=j(),_n=Ae(),po=(r,e)=>{r=new fo(r,e);let t=new vt("0.0.0");if(r.test(t)||(t=new vt("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n<r.set.length;++n){let s=r.set[n],i=null;s.forEach(a=>{let l=new vt(a.semver.version);switch(a.operator){case">":l.prerelease.length===0?l.patch++:l.prerelease.push(0),l.raw=l.format();case"":case">=":(!i||_n(l,i))&&(i=l);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),i&&(!t||_n(t,i))&&(t=i)}return t&&r.test(t)?t:null};yn.exports=po});var wn=f((pc,bn)=>{var mo=j(),go=(r,e)=>{try{return new mo(r,e).range||"*"}catch{return null}};bn.exports=go});var Ye=f((dc,In)=>{var vo=S(),An=$e(),{ANY:_o}=An,yo=j(),Eo=De(),On=Ae(),Sn=Ke(),bo=Xe(),wo=Ue(),Oo=(r,e,t,n)=>{r=new vo(r,n),e=new yo(e,n);let s,i,a,l,c;switch(t){case">":s=On,i=bo,a=Sn,l=">",c=">=";break;case"<":s=Sn,i=wo,a=On,l="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Eo(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===_o&&(m=new An(">=0.0.0")),h=h||m,v=v||m,s(m.semver,h.semver,n)?h=m:a(m.semver,v.semver,n)&&(v=m)}),h.operator===l||h.operator===c||(!v.operator||v.operator===l)&&i(r,v.semver))return!1;if(v.operator===c&&a(r,v.semver))return!1}return!0};In.exports=Oo});var $n=f((mc,Cn)=>{var So=Ye(),Ao=(r,e,t)=>So(r,e,">",t);Cn.exports=Ao});var Dn=f((gc,Rn)=>{var Io=Ye(),Co=(r,e,t)=>Io(r,e,"<",t);Rn.exports=Co});var Ln=f((vc,qn)=>{var xn=j(),$o=(r,e,t)=>(r=new xn(r,t),e=new xn(e,t),r.intersects(e));qn.exports=$o});var Tn=f((_c,Nn)=>{var Ro=De(),Do=T();Nn.exports=(r,e,t)=>{let n=[],s=null,i=null,a=r.sort((u,h)=>Do(u,h,t));for(let u of a)Ro(u,e,t)?(i=u,s||(s=u)):(i&&n.push([s,i]),i=null,s=null);s&&n.push([s,null]);let l=[];for(let[u,h]of n)u===h?l.push(u):!h&&u===a[0]?l.push("*"):h?u===a[0]?l.push(`<=${h}`):l.push(`${u} - ${h}`):l.push(`>=${u}`);let c=l.join(" || "),o=typeof e.raw=="string"?e.raw:String(e);return c.length<o.length?c:e}});var kn=f((yc,Hn)=>{var jn=j(),Ze=$e(),{ANY:_t}=Ze,xe=De(),yt=T(),xo=(r,e,t={})=>{if(r===e)return!0;r=new jn(r,t),e=new jn(e,t);let n=!1;e:for(let s of r.set){for(let i of e.set){let a=qo(s,i,t);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},qo=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===_t){if(e.length===1&&e[0].semver===_t)return!0;t.includePrerelease?r=[new Ze(">=0.0.0-0")]:r=[new Ze(">=0.0.0")]}if(e.length===1&&e[0].semver===_t){if(t.includePrerelease)return!0;e=[new Ze(">=0.0.0")]}let n=new Set,s,i;for(let m of r)m.operator===">"||m.operator===">="?s=Pn(s,m,t):m.operator==="<"||m.operator==="<="?i=Fn(i,m,t):n.add(m.semver);if(n.size>1)return null;let a;if(s&&i){if(a=yt(s.semver,i.semver,t),a>0)return null;if(a===0&&(s.operator!==">="||i.operator!=="<="))return null}for(let m of n){if(s&&!xe(m,String(s),t)||i&&!xe(m,String(i),t))return null;for(let Pe of e)if(!xe(m,String(Pe),t))return!1;return!0}let l,c,o,u,h=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1,v=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1;h&&h.prerelease.length===1&&i.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let m of e){if(u=u||m.operator===">"||m.operator===">=",o=o||m.operator==="<"||m.operator==="<=",s){if(v&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===v.major&&m.semver.minor===v.minor&&m.semver.patch===v.patch&&(v=!1),m.operator===">"||m.operator===">="){if(l=Pn(s,m,t),l===m&&l!==s)return!1}else if(s.operator===">="&&!xe(s.semver,String(m),t))return!1}if(i){if(h&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===h.major&&m.semver.minor===h.minor&&m.semver.patch===h.patch&&(h=!1),m.operator==="<"||m.operator==="<="){if(c=Fn(i,m,t),c===m&&c!==i)return!1}else if(i.operator==="<="&&!xe(i.semver,String(m),t))return!1}if(!m.operator&&(i||s)&&a!==0)return!1}return!(s&&o&&!i&&a!==0||i&&u&&!s&&a!==0||v||h)},Pn=(r,e,t)=>{if(!r)return e;let n=yt(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},Fn=(r,e,t)=>{if(!r)return e;let n=yt(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};Hn.exports=xo});var Gn=f((Ec,Mn)=>{var Et=W();Mn.exports={re:Et.re,src:Et.src,tokens:Et.t,SEMVER_SPEC_VERSION:we().SEMVER_SPEC_VERSION,SemVer:S(),compareIdentifiers:He().compareIdentifiers,rcompareIdentifiers:He().rcompareIdentifiers,parse:z(),valid:lr(),clean:ur(),inc:pr(),diff:yr(),major:br(),minor:Or(),patch:Ar(),prerelease:Cr(),compare:T(),rcompare:Rr(),compareLoose:xr(),compareBuild:Ve(),sort:Tr(),rsort:Pr(),gt:Ae(),lt:Ke(),eq:Ge(),neq:lt(),gte:Ue(),lte:Xe(),cmp:ct(),coerce:Ur(),Comparator:$e(),Range:j(),satisfies:De(),toComparators:pn(),maxSatisfying:mn(),minSatisfying:vn(),minVersion:En(),validRange:wn(),outside:Ye(),gtr:$n(),ltr:Dn(),intersects:Ln(),simplifyRange:Tn(),subset:kn()}});var G=f(L=>{"use strict";var Lo=L&&L.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),No=L&&L.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),To=L&&L.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Lo(e,r,t);return No(e,r),e},Vn=L&&L.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(L,"__esModule",{value:!0});L.getCoreVersion=void 0;var Kn=Vn(require("path")),Un=Vn(require("fs")),bt=To(require("@serverless-devs/core")),jo=Gn(),Xn=Kn.default.join(bt.getRootHome(),"cache","core"),wt=Kn.default.join(Xn,"package.json");function Po(){if(Un.default.existsSync(wt)){var r=require("@serverless-devs/core/package.json").version,e=Bn();return jo.gt(e,r)?require(Xn):bt}return bt}function Bn(){return Un.default.existsSync(wt)?require(wt).version:void 0}L.getCoreVersion=Bn;L.default=Po()});var Je=f(qe=>{"use strict";var Fo=qe&&qe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qe,"__esModule",{value:!0});var Ho=Fo(G()),ko=Ho.default.Logger,Ot=new ko("S-CLI");Ot.success=function(r){return Ot.log(r,"green")};qe.default=Ot});var It=f(x=>{"use strict";var Mo=x&&x.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},Go=x&&x.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Wn=x&&x.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(x,"__esModule",{value:!0});x.handlerProfileFile=x.getConfig=x.setConfig=void 0;var zn=Wn(require("path")),At=Wn(G()),F=At.default.fse,Qe=At.default.jsyaml,St=At.default.getRootHome;function Vo(r){var e=Zn();F.writeFileSync(e,Qe.dump(r))}function Yn(){var r=Zn();if(!F.existsSync(r))return{};try{var e=Qe.load(F.readFileSync(r,"utf8"))||{};return e}catch(t){throw t}}function Zn(){var r=zn.default.join(St(),"set-config.yml");return F.existsSync(r)||F.createFileSync(r),r}function Ko(r,e){var t=Yn();t[r]=e,Vo(t)}x.setConfig=Ko;function Uo(r,e){var t=Yn();return t[r]||e}x.getConfig=Uo;function Xo(r){return Mo(this,void 0,void 0,function(){var e,t,n,s,i,a,l;return Go(this,function(c){switch(c.label){case 0:if(e=r.filePath||"set-config.yml",t=zn.default.join(St(),e),n=F.existsSync(t),s={},n)return[3,5];i=St(),c.label=1;case 1:return c.trys.push([1,2,,4]),F.statSync(i),[3,4];case 2:return a=c.sent(),[4,F.mkdirSync(i)];case 3:return c.sent(),[3,4];case 4:return[3,6];case 5:try{s=Qe.load(F.readFileSync(t,"utf8"))||{}}catch(o){throw o}c.label=6;case 6:return r.read?[2,s]:(l=r.configKey||"",s[l]=r.data,[4,F.writeFileSync(t,Qe.dump(s))]);case 7:return c.sent(),[2,s]}})})}x.handlerProfileFile=Xo});var Jn=f((Sc,Bo)=>{Bo.exports={name:"@serverless-devs/s",version:"2.1.1",description:"Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",homepage:"https://www.serverless-devs.com",keywords:["serverless","alibaba","tencent","azure","baidu","huawei","google","function","faas","serverless-devs"],publishConfig:{access:"public",registry:"https://registry.npmjs.org"},license:"MIT",repository:{type:"git",url:"https://github.com/Serverless-Devs/Serverless-Devs"},bugs:{url:"https://github.com/Serverless-Devs/Serverless-Devs/issues"},scripts:{start:"npm run watch",prewatch:"rm -rf lib/* && cp -r ./src/daemon ./lib",watch:"tsc -w",test:"jest test/special-command.test",prebuild:"rm -rf lib/*",build:"tsc && cp -r ./src/daemon ./lib",postbuild:"./shell/postbuild.sh","test:cov":"jest --coverage",lint:"npm run typecheck && f2elint scan -i src",fix:"f2elint fix",typecheck:"npx tsc -p tsconfig.json --noEmit",update:"rm -rf yarn.lock && rm -rf package-lock.json && rm -rf node_modules && yarn",beta:"npm publish --tag=beta"},main:"./lib/index.js",bin:{s:"bin/s"},devDependencies:{"@serverless-devs/commander":"^6.0.0","@types/jest":"^27.4.0","@types/node":"^14.0.23","@typescript-eslint/eslint-plugin":"^4.14.1","@typescript-eslint/parser":"^4.14.1",ajv:"^8.10.0","babel-eslint":"^10.1.0",boxen:"^5.0.0",dotenv:"^10.0.0",esbuild:"^0.14.0",eslint:"^7.7.0","eslint-config-prettier":"^7.2.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2",husky:"^4.2.3",inquirer:"8.2.0","inquirer-autocomplete-prompt":"^1.3.0",jest:"^27.4.7","latest-version":"^5.1.0","lint-staged":"^10.0.8",open:"^8.4.0","os-locale":"5.0.0",prettier:"^2.2.1",semver:"^7.3.5","semver-diff":"^3.1.1","ts-jest":"^27.1.3","ts-node":"^9.1.1",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},dependencies:{"@serverless-devs/core":"latest","@serverless-devs/ui":"latest"}}});var $t=f(g=>{"use strict";var Wo=g&&g.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),zo=g&&g.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Yo=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)&&Wo(e,r,t);return zo(e,r),e},ce=g&&g.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},ue=g&&g.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},et=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 Zo=et(require("path")),Le=et(require("fs")),Jo=et(require("os")),R=Yo(G()),Qo=It(),le=et(Je()),Qn=Jn(),he=R.default.colors,ea=R.default.got,ta=R.default.isDocker,ra=R.default.isCiCdEnv,K=R.default.lodash,ei=R.default.publishHelp,na=K.get,ia=K.trim,sa=K.assign,oa=K.filter,ti=K.includes,aa=K.omit,la=K.isPlainObject,ca=K.isEmpty,ua=he.underline,ha=he.bold;g.red=he.hex("#fd5750");g.yellow=he.hex("#F3F99D");g.bgRed=he.hex("#000").bgHex("#fd5750");var fa=function(){var r=process.env.serverless_devs_temp_argv;try{var e=JSON.parse(r),t=R.default.getGlobalArgs(e);return process.argv=process.argv.slice(0,2).concat(t._argsObj),sa({},t,{noHelpArgv:process.argv.slice(0,2).concat(oa(t._argsObj,function(n){return!ti(["-h","--help"],n)}))})}catch{return{}}};g.getProcessArgv=fa;var pa=function(r){return ce(void 0,void 0,void 0,function(){var e,t;return ue(this,function(n){switch(n.label){case 0:return[4,R.default.getCredentialAliasList()];case 1:return e=n.sent(),ti(e,r)?[4,R.default.getCredential(r)]:[3,3];case 2:return t=n.sent(),[2,t];case 3:return[2]}})})};g.getCredentialWithExisted=pa;var da=function(){return ce(void 0,void 0,void 0,function(){var r,e,t,n,s,i;return ue(this,function(a){switch(a.label){case 0:return[4,R.default.getCredentialAliasList()];case 1:if(r=a.sent(),!(r.length>0))return[3,6];e={},t=0,n=r,a.label=2;case 2:return t<n.length?(s=n[t],[4,R.default.getCredential(s)]):[3,5];case 3:i=a.sent(),e[i.Alias]=aa(i,"Alias"),a.label=4;case 4:return t++,[3,2];case 5:return[2,e];case 6:return[2]}})})};g.getCredentialWithAll=da;var ma=function(r,e){return e===void 0&&(e="unknow"),ce(void 0,void 0,void 0,function(){var t,n,s,i;return ue(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t=(0,Qo.getConfig)("analysis"),t!=="enable"?[2]:ta()||ra()?[2]:[4,ea("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(e,"&code=TypeError&s=").concat(r),{timeout:2e3,json:!0})];case 1:return n=a.sent(),s=na(n.body,"shorturl"),s&&le.default.log(`AI Tips:
|
|
16
16
|
You can try to solve the problem through: `.concat(he.underline(s),`
|
|
17
|
-
`)),[3,3];case 2:return i=a.sent(),[3,3];case 3:return[2]}})})};g.aiRequest=ma;function ga(){var r=(0,
|
|
17
|
+
`)),[3,3];case 2:return i=a.sent(),[3,3];case 3:return[2]}})})};g.aiRequest=ma;function ga(){var r=(0,R.getCoreVersion)(),e=["".concat(Qn.name,": ").concat(Qn.version),r?"core: ".concat(r):void 0,"s-home: ".concat(R.default.getRootHome()),"".concat(process.platform,"-").concat(process.arch),"node-".concat(process.version)];return e.filter(function(t){return t}).join(", ")}g.getVersion=ga;function va(r){return ce(this,void 0,void 0,function(){function e(s){return ce(this,void 0,void 0,function(){var i,a;return ue(this,function(l){switch(l.label){case 0:return i=Le.default.lstatSync(s),typeof i!="object"?[2]:(t.set(i.ino,i.size),i.isDirectory()?(a=Le.default.readdirSync(s),typeof a!="object"?[2]:[4,Promise.all(a.map(function(c){return e(Zo.default.join(s,c))}))]):[3,2]);case 1:l.sent(),l.label=2;case 2:return[2]}})})}var t,n;return ue(this,function(s){switch(s.label){case 0:return t=new Map,[4,e(r)];case 1:return s.sent(),n=Array.from(t.values()).reduce(function(i,a){return i+a},0),[2,n]}})})}g.getFolderSize=va;function _a(r,e){e===void 0&&(e=" ");for(var t="",n=0;n<r;n++)t=t+e;return t}g.printn=_a;function ya(){return"en"}g.getLang=ya;function ri(r,e){var t=/\{\{(.*?)\}\}/g,n=r.match(t);if(n)for(var s=0;s<n.length;s++){var i=n[s].replace(/{{|}}/g,""),a=ia(i.split("|")[0]);e[a]&&(r=r.replace(n[s],e[a]))}return r}g.replaceFun=ri;function Ea(r,e){r.forEach(function(t){if(Le.default.existsSync(t)){var n=Le.default.readFileSync(t,"utf-8"),s=ri(n,e);Le.default.writeFileSync(t,s,"utf-8")}})}g.replaceTemplate=Ea;function ba(r){if(!r)return r;var e=r.slice(-4);return"***********".concat(e)}g.mark=ba;function Ct(r,e){return Jo.default.platform()==="win32"?e||"\u25C6":"".concat(r," ")}g.emoji=Ct;function ni(r,e){var t=r.length,n=new Array(e-t).fill(" ");return"".concat(r).concat(n.join("")," : ")}g.getTempCommandStr=ni;function wa(r){return ce(this,void 0,void 0,function(){var e,t,n,s,i,l,a,l;return ue(this,function(c){switch(c.label){case 0:return[4,R.default.getYamlContent(r)];case 1:if(e=c.sent(),le.default.log(`
|
|
18
18
|
`.concat(Ct("\u{1F680}")," ").concat(e.Name,"@").concat(e.Version,": ").concat(e.Description,`
|
|
19
|
-
`)),t=e.Commands,t){n=ei.maxLen(t),s=[],i={};for(l in t)a=t[l],la(a)?s.push(ei.helpInfo(a,ua(ha(l)),n,4)):i[l]=a;if(s.length>0&&
|
|
20
|
-
`)),!ca(i)){for(l in i)
|
|
21
|
-
`:"")}return[2]}})})}g.specifyServiceHelp=wa;function Oa(r){return ee(this,void 0,void 0,function(){var e,t;return te(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,S.default.getTemplatePath(r)];case 1:return e=n.sent(),[4,S.default.transforYamlPath(e)];case 2:return[2,n.sent()];case 3:return t=n.sent(),[3,4];case 4:return[2]}})})}g.getYamlPath=Oa});var ii=f(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.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 si=f(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.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 ai=f(Ne=>{"use strict";var oi=Ne&&Ne.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ne,"__esModule",{value:!0});var Sa=$t(),Aa=oi(ii()),Ia=oi(si()),xt={en:Ia.default,zh:Aa.default},Ca=function(r){var e=(0,Sa.getLang)(),t=xt[e]?xt[e][r]:xt.en[r];return t||r};Ne.default=Ca});var Te=f(I=>{"use strict";var $a=I&&I.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),li=I&&I.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&$a(e,r,t)},qt=I&&I.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(I,"__esModule",{value:!0});I.registerCommandChecker=I.i18n=I.logger=void 0;var Ra=qt(Je());li($t(),I);li(It(),I);var Da=Je();Object.defineProperty(I,"logger",{enumerable:!0,get:function(){return qt(Da).default}});var xa=ai();Object.defineProperty(I,"i18n",{enumerable:!0,get:function(){return qt(xa).default}});function qa(r){r.on("command:*",function(e){var t=r.commands.map(function(n){return n.name()});t.includes(e[0])||(Ra.default.error(" error: unknown command ".concat(e[0])),r.help())})}I.registerCommandChecker=qa});var re=f(fe=>{"use strict";var La=fe&&fe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fe,"__esModule",{value:!0});fe.ServerlessError=void 0;var Na=La(G()),Ta=Na.default.Logger,ja=new Ta("S-CLI-ERROR"),Pa=function(){function r(e,t,n){ja.error(e+": "+t,n),process.exit(1)}return r}();fe.ServerlessError=Pa});var ci=f(pe=>{"use strict";var Fa=pe&&pe.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(pe,"__esModule",{value:!0});pe.CommandError=void 0;var Ha=re(),ka=function(r){Fa(e,r);function e(t,n){return r.call(this,"Error",t,n)||this}return e}(Ha.ServerlessError);pe.CommandError=ka});var ui=f(de=>{"use strict";var Ma=de&&de.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(de,"__esModule",{value:!0});de.ConfigDeleteError=void 0;var Ga=re(),Va=function(r){Ma(e,r);function e(t,n){return r.call(this,"Deletion failed",t,n)||this}return e}(Ga.ServerlessError);de.ConfigDeleteError=Va});var hi=f(me=>{"use strict";var Ka=me&&me.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(me,"__esModule",{value:!0});me.ConfigError=void 0;var Ua=re(),Xa=function(r){Ka(e,r);function e(t,n){return r.call(this,"Config failed",t,n)||this}return e}(Ua.ServerlessError);me.ConfigError=Xa});var fi=f(ge=>{"use strict";var Ba=ge&&ge.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(ge,"__esModule",{value:!0});ge.ConfigGetError=void 0;var Wa=re(),za=function(r){Ba(e,r);function e(t,n){return r.call(this,"Get failed",t,n)||this}return e}(Wa.ServerlessError);ge.ConfigGetError=za});var pi=f(ve=>{"use strict";var Ya=ve&&ve.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(ve,"__esModule",{value:!0});ve.InitError=void 0;var Za=re(),Ja=function(r){Ya(e,r);function e(t,n){return r.call(this,"Initialization failed",t,n)||this}return e}(Za.ServerlessError);ve.InitError=Ja});var mi=f(H=>{"use strict";var Qa=H&&H.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},el=H&&H.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},tl=H&&H.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(H,"__esModule",{value:!0});H.HumanError=void 0;var di=tl(G()),tt=Te(),rl=di.default.colors,nl=function(){function r(e){var t=e.errorMessage,n=e.tips;this.errorMessage=t,tt.logger.log(`
|
|
19
|
+
`)),t=e.Commands,t){n=ei.maxLen(t),s=[],i={};for(l in t)a=t[l],la(a)?s.push(ei.helpInfo(a,ua(ha(l)),n,4)):i[l]=a;if(s.length>0&&le.default.log(s.join(`
|
|
20
|
+
`)),!ca(i)){for(l in i)le.default.log(" ".concat(ni(l,n)," ").concat(i[l]));le.default.log("")}le.default.log(e.HomePage?" ".concat(Ct("\u{1F9ED}")," ").concat(R.default.makeUnderLine("More information: "+e.HomePage)," ")+`
|
|
21
|
+
`:"")}return[2]}})})}g.specifyServiceHelp=wa});var ii=f(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.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 si=f(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.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 ai=f(Ne=>{"use strict";var oi=Ne&&Ne.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ne,"__esModule",{value:!0});var Oa=$t(),Sa=oi(ii()),Aa=oi(si()),xt={en:Aa.default,zh:Sa.default},Ia=function(r){var e=(0,Oa.getLang)(),t=xt[e]?xt[e][r]:xt.en[r];return t||r};Ne.default=Ia});var Te=f(A=>{"use strict";var Ca=A&&A.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),li=A&&A.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Ca(e,r,t)},qt=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 $a=qt(Je());li($t(),A);li(It(),A);var Ra=Je();Object.defineProperty(A,"logger",{enumerable:!0,get:function(){return qt(Ra).default}});var Da=ai();Object.defineProperty(A,"i18n",{enumerable:!0,get:function(){return qt(Da).default}});function xa(r){r.on("command:*",function(e){var t=r.commands.map(function(n){return n.name()});t.includes(e[0])||($a.default.error(" error: unknown command ".concat(e[0])),r.help())})}A.registerCommandChecker=xa});var ee=f(fe=>{"use strict";var qa=fe&&fe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fe,"__esModule",{value:!0});fe.ServerlessError=void 0;var La=qa(G()),Na=La.default.Logger,Ta=new Na("S-CLI-ERROR"),ja=function(){function r(e,t,n){Ta.error(e+": "+t,n),process.exit(1)}return r}();fe.ServerlessError=ja});var ci=f(pe=>{"use strict";var Pa=pe&&pe.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(pe,"__esModule",{value:!0});pe.CommandError=void 0;var Fa=ee(),Ha=function(r){Pa(e,r);function e(t,n){return r.call(this,"Error",t,n)||this}return e}(Fa.ServerlessError);pe.CommandError=Ha});var ui=f(de=>{"use strict";var ka=de&&de.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(de,"__esModule",{value:!0});de.ConfigDeleteError=void 0;var Ma=ee(),Ga=function(r){ka(e,r);function e(t,n){return r.call(this,"Deletion failed",t,n)||this}return e}(Ma.ServerlessError);de.ConfigDeleteError=Ga});var hi=f(me=>{"use strict";var Va=me&&me.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(me,"__esModule",{value:!0});me.ConfigError=void 0;var Ka=ee(),Ua=function(r){Va(e,r);function e(t,n){return r.call(this,"Config failed",t,n)||this}return e}(Ka.ServerlessError);me.ConfigError=Ua});var fi=f(ge=>{"use strict";var Xa=ge&&ge.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(ge,"__esModule",{value:!0});ge.ConfigGetError=void 0;var Ba=ee(),Wa=function(r){Xa(e,r);function e(t,n){return r.call(this,"Get failed",t,n)||this}return e}(Ba.ServerlessError);ge.ConfigGetError=Wa});var pi=f(ve=>{"use strict";var za=ve&&ve.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(ve,"__esModule",{value:!0});ve.InitError=void 0;var Ya=ee(),Za=function(r){za(e,r);function e(t,n){return r.call(this,"Initialization failed",t,n)||this}return e}(Ya.ServerlessError);ve.InitError=Za});var mi=f(H=>{"use strict";var Ja=H&&H.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},Qa=H&&H.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},el=H&&H.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(H,"__esModule",{value:!0});H.HumanError=void 0;var di=el(G()),tt=Te(),tl=di.default.colors,rl=function(){function r(e){var t=e.errorMessage,n=e.tips;this.errorMessage=t,tt.logger.log(`
|
|
22
22
|
`.concat((0,tt.bgRed)("ERROR:"))),tt.logger.log("TypeError: ".concat(t,`
|
|
23
|
-
`)),n&&tt.logger.log("".concat(
|
|
24
|
-
`))}return r.prototype.report=function(e){return
|
|
23
|
+
`)),n&&tt.logger.log("".concat(tl.gray(n),`
|
|
24
|
+
`))}return r.prototype.report=function(e){return Ja(this,void 0,void 0,function(){var t;return Qa(this,function(n){switch(n.label){case 0:return t=e.error,[4,di.default.report({type:"jsError",content:"".concat(this.errorMessage,"||").concat(t.stack)})];case 1:return n.sent(),[2]}})})},r}();H.HumanError=rl});var vi=f(_e=>{"use strict";var nl=_e&&_e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_e,"__esModule",{value:!0});_e.HumanWarning=void 0;var il=nl(G()),Lt=Te(),gi=il.default.colors,sl=function(){function r(e){var t=e.warningMessage,n=e.tips;Lt.logger.log(`
|
|
25
25
|
`.concat(gi.hex("#000").bgYellow("WARNING:"))),Lt.logger.log("".concat(t,`
|
|
26
26
|
`)),n&&Lt.logger.log("".concat(gi.gray(n),`
|
|
27
|
-
`))}return r}();_e.HumanWarning=
|
|
28
|
-
`):"",c=a.tips?"* ".concat(
|
|
27
|
+
`))}return r}();_e.HumanWarning=sl});var jt=f(b=>{"use strict";var ol=b&&b.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},al=b&&b.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},ll=b&&b.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(b,"__esModule",{value:!0});b.HandleError=b.HumanWarning=b.HumanError=b.ServerlessError=b.InitError=b.ConfigGetError=b.ConfigError=b.ConfigDeleteError=b.CommandError=void 0;var E=Te(),je=ll(G()),U=je.default.colors,cl=je.default.report,Nt=je.default.isDebugMode,ul=je.default.makeUnderLine,Tt=je.default.isDocker,hl=ci();Object.defineProperty(b,"CommandError",{enumerable:!0,get:function(){return hl.CommandError}});var fl=ui();Object.defineProperty(b,"ConfigDeleteError",{enumerable:!0,get:function(){return fl.ConfigDeleteError}});var pl=hi();Object.defineProperty(b,"ConfigError",{enumerable:!0,get:function(){return pl.ConfigError}});var dl=fi();Object.defineProperty(b,"ConfigGetError",{enumerable:!0,get:function(){return dl.ConfigGetError}});var ml=pi();Object.defineProperty(b,"InitError",{enumerable:!0,get:function(){return ml.InitError}});var gl=ee();Object.defineProperty(b,"ServerlessError",{enumerable:!0,get:function(){return gl.ServerlessError}});var vl=mi();Object.defineProperty(b,"HumanError",{enumerable:!0,get:function(){return vl.HumanError}});var _l=vi();Object.defineProperty(b,"HumanWarning",{enumerable:!0,get:function(){return _l.HumanWarning}});function rt(r,e){return"".concat(U.gray(r)).concat(U.gray.underline(e))}var yl=function(r){return ol(void 0,void 0,void 0,function(){var e,t,n,s,i,a,l,c;return al(this,function(o){switch(o.label){case 0:e="Message:",t={traceId:"",catchableError:!1},n=r,s=(0,E.getConfig)("analysis"),s!=="disable"&&(t.traceId=process.env.serverless_devs_trace_id),i=r.message?r.message:"";try{a=JSON.parse(i)}catch{}return a&&a.tips?(l=a.message?"Message: ".concat(a.message,`
|
|
28
|
+
`):"",c=a.tips?"* ".concat(ul(a.tips.replace(/\n/,`
|
|
29
29
|
* `))):"",E.logger.log(`
|
|
30
30
|
`.concat(U.hex("#000").bgYellow("WARNING:"),`
|
|
31
31
|
======================
|
|
@@ -38,7 +38,7 @@ You can try to solve the problem through: `.concat(he.underline(s),`
|
|
|
38
38
|
`))),E.logger.log("".concat((0,E.bgRed)("ERROR:"),`
|
|
39
39
|
`)),E.logger.log(Nt()||Tt()?r.stack:"".concat(i,`
|
|
40
40
|
`)),[4,(0,E.aiRequest)(i)];case 4:o.sent(),o.label=5;case 5:return t.catchableError||(t.traceId&&E.logger.log(U.gray("TraceId: ".concat(t.traceId))),Tt()||(E.logger.log(U.gray("Environment: ".concat((0,E.getVersion)()))),E.logger.log(rt("Documents: ","https://www.serverless-devs.com")),E.logger.log(rt("Discussions: ","https://github.com/Serverless-Devs/Serverless-Devs/discussions")),E.logger.log(rt("Issues: ","https://github.com/Serverless-Devs/Serverless-Devs/issues")),E.logger.log(rt("Regsitry: ",`https://registry.serverless-devs.com
|
|
41
|
-
`)),t.traceId&&E.logger.log(U.gray("Please copy traceId: ".concat(t.traceId," and join Dingding group: 33947367 for consultation."))))),!Tt()&&E.logger.log(U.gray("You can run 's clean --all' to clean Serverless devs.")),t.traceId&&!t.catchableError?[4,
|
|
41
|
+
`)),t.traceId&&E.logger.log(U.gray("Please copy traceId: ".concat(t.traceId," and join Dingding group: 33947367 for consultation."))))),!Tt()&&E.logger.log(U.gray("You can run 's clean --all' to clean Serverless devs.")),t.traceId&&!t.catchableError?[4,cl({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]}})})};b.HandleError=yl});var _i=exports&&exports.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(h){a(h)}}function c(u){try{o(n.throw(u))}catch(h){a(h)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},yi=exports&&exports.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},bi=exports&&exports.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0});var N=bi(Ut()),El=jt(),wi=Te(),ye=bi(G()),bl=ye.default.setCredential,wl=ye.default.setKnownCredential,Ol=ye.default.colors,Sl=ye.default.getAccountId,Al=ye.default.getCommand,Il=ye.default.chalk,Ei=jt(),Cl=`You can add an account
|
|
42
42
|
|
|
43
43
|
Example:
|
|
44
44
|
$ s config add
|
|
@@ -54,4 +54,4 @@ You can try to solve the problem through: `.concat(he.underline(s),`
|
|
|
54
54
|
google: PrivateKeyData
|
|
55
55
|
tencent: AccountID, SecretID, SecretKey
|
|
56
56
|
|
|
57
|
-
`.concat((0,wi.emoji)("\u{1F9ED}")," How to get the key: ").concat(
|
|
57
|
+
`.concat((0,wi.emoji)("\u{1F9ED}")," How to get the key: ").concat(Ol.underline("https://github.com/Serverless-Devs/docs/tree/master/zh/others/provider-config"));(function(){return _i(void 0,void 0,void 0,function(){var r,e,t,n,s,i,a,l,c,o,u,h,v,m,Pe,I,Fe,nt,Ee,Pt,Oi;return yi(this,function(te){switch(te.label){case 0:return r=(0,wi.getProcessArgv)(),e=r.access,t=r.aliasName,N.default.name("s config add").usage("[options]").option("--AccountID <AccountID>","AccountID of key information").option("--AccessKeyID <AccessKeyID>","AccessKeyID of key information").option("--AccessKeySecret <AccessKeySecret>","AccessKeySecret of key information").option("--SecurityToken <SecurityToken>","SecurityToken of key information").option("--SecretAccessKey <SecretAccessKey>","SecretAccessKey of key information").option("--AccessKey <AccessKey>","AccessKey of key information").option("--SecretKey <SecretKey>","SecretKey of key information").option("--SecretID <SecretID>","SecretID of key information").option("--PrivateKeyData <PrivateKeyData>","PrivateKeyData of key information").option("-kl, --keyList <keyList>","Keys of key information, like: -kl key1,key2,key3").option("-il, --infoList <infoList>","Values of key information, like: -il info1,info2,info3").option("-a, --access <aliasName>","Specify the access alias name.").option("-f","Mandatory overwrite key information").helpOption("-h, --help","Display help for command").allowUnknownOption().description(Cl).addHelpCommand(!1).parse(process.argv),n=N.default.AccountID,s=N.default.AccessKeyID,i=N.default.AccessKeySecret,a=N.default.SecretAccessKey,l=N.default.AccessKey,c=N.default.SecretKey,o=N.default.PrivateKeyData,u=N.default.SecretID,h=N.default.keyList,v=N.default.infoList,m=N.default.SecurityToken,Pe=N.default.f,process.argv.length!==2?[3,2]:[4,bl()];case 1:return[2,te.sent()];case 2:if(I={},h&&v)if(Fe=h.split(","),nt=v.split(","),Fe.length===nt.length)for(Ee=0;Ee<Fe.length;Ee++)I[Fe[Ee]]=nt[Ee];else throw new El.CommandError("Please make sure -kl/--keyList is as long as -il/--infoList");if(s&&(I.AccessKeyID=s),i&&(I.AccessKeySecret=i),m&&(I.SecurityToken=m),!(s&&i&&!n))return[3,6];te.label=3;case 3:return te.trys.push([3,5,,6]),[4,Sl({AccessKeyID:s,AccessKeySecret:i,SecurityToken:m})];case 4:return Pt=te.sent(),I.AccountID=Pt.AccountId,[3,6];case 5:return Oi=te.sent(),Pe||(new Ei.HumanWarning({warningMessage:"You may be configuring an incorrect Alibaba Cloud SecretKey.",tips:"Please check the accuracy of Alibaba Cloud SecretKey. If your configuration is not an Alibaba Cloud SecretKey, you can force writing by adding the -f parameter. Or execute ".concat(Il.yellow("".concat(Al()," -f")))}),process.exit(1)),[3,6];case 6:return n&&(I.AccountID=n),a&&(I.SecretAccessKey=a),l&&(I.AccessKey=l),c&&(I.SecretKey=c),c&&(I.SecretKey=c),u&&(I.SecretID=u),o&&(I.PrivateKeyData=o),Object.keys(I).length>0&&wl(I,e||t),[2]}})})})().catch(function(r){return _i(void 0,void 0,void 0,function(){return yi(this,function(e){switch(e.label){case 0:return[4,(0,Ei.HandleError)(r)];case 1:return e.sent(),[2]}})})});
|