@serverless-devs/s 2.1.8-beta.2 → 2.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,36 +1,118 @@
1
- "use strict";var h=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var pe=h((Vl,wt)=>{var ni="2.0.0",ii=Number.MAX_SAFE_INTEGER||9007199254740991,si=16;wt.exports={SEMVER_SPEC_VERSION:ni,MAX_LENGTH:256,MAX_SAFE_INTEGER:ii,MAX_SAFE_COMPONENT_LENGTH:si}});var de=h((Ul,St)=>{var oi=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};St.exports=oi});var U=h((H,Ot)=>{var{MAX_SAFE_COMPONENT_LENGTH:ze}=pe(),ai=de();H=Ot.exports={};var li=H.re=[],p=H.src=[],d=H.t={},ci=0,m=(r,e,t)=>{let n=ci++;ai(r,n,e),d[r]=n,p[n]=e,li[n]=new RegExp(e,t?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*");m("NUMERICIDENTIFIERLOOSE","[0-9]+");m("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");m("MAINVERSION",`(${p[d.NUMERICIDENTIFIER]})\\.(${p[d.NUMERICIDENTIFIER]})\\.(${p[d.NUMERICIDENTIFIER]})`);m("MAINVERSIONLOOSE",`(${p[d.NUMERICIDENTIFIERLOOSE]})\\.(${p[d.NUMERICIDENTIFIERLOOSE]})\\.(${p[d.NUMERICIDENTIFIERLOOSE]})`);m("PRERELEASEIDENTIFIER",`(?:${p[d.NUMERICIDENTIFIER]}|${p[d.NONNUMERICIDENTIFIER]})`);m("PRERELEASEIDENTIFIERLOOSE",`(?:${p[d.NUMERICIDENTIFIERLOOSE]}|${p[d.NONNUMERICIDENTIFIER]})`);m("PRERELEASE",`(?:-(${p[d.PRERELEASEIDENTIFIER]}(?:\\.${p[d.PRERELEASEIDENTIFIER]})*))`);m("PRERELEASELOOSE",`(?:-?(${p[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[d.PRERELEASEIDENTIFIERLOOSE]})*))`);m("BUILDIDENTIFIER","[0-9A-Za-z-]+");m("BUILD",`(?:\\+(${p[d.BUILDIDENTIFIER]}(?:\\.${p[d.BUILDIDENTIFIER]})*))`);m("FULLPLAIN",`v?${p[d.MAINVERSION]}${p[d.PRERELEASE]}?${p[d.BUILD]}?`);m("FULL",`^${p[d.FULLPLAIN]}$`);m("LOOSEPLAIN",`[v=\\s]*${p[d.MAINVERSIONLOOSE]}${p[d.PRERELEASELOOSE]}?${p[d.BUILD]}?`);m("LOOSE",`^${p[d.LOOSEPLAIN]}$`);m("GTLT","((?:<|>)?=?)");m("XRANGEIDENTIFIERLOOSE",`${p[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);m("XRANGEIDENTIFIER",`${p[d.NUMERICIDENTIFIER]}|x|X|\\*`);m("XRANGEPLAIN",`[v=\\s]*(${p[d.XRANGEIDENTIFIER]})(?:\\.(${p[d.XRANGEIDENTIFIER]})(?:\\.(${p[d.XRANGEIDENTIFIER]})(?:${p[d.PRERELEASE]})?${p[d.BUILD]}?)?)?`);m("XRANGEPLAINLOOSE",`[v=\\s]*(${p[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[d.XRANGEIDENTIFIERLOOSE]})(?:${p[d.PRERELEASELOOSE]})?${p[d.BUILD]}?)?)?`);m("XRANGE",`^${p[d.GTLT]}\\s*${p[d.XRANGEPLAIN]}$`);m("XRANGELOOSE",`^${p[d.GTLT]}\\s*${p[d.XRANGEPLAINLOOSE]}$`);m("COERCE",`(^|[^\\d])(\\d{1,${ze}})(?:\\.(\\d{1,${ze}}))?(?:\\.(\\d{1,${ze}}))?(?:$|[^\\d])`);m("COERCERTL",p[d.COERCE],!0);m("LONETILDE","(?:~>?)");m("TILDETRIM",`(\\s*)${p[d.LONETILDE]}\\s+`,!0);H.tildeTrimReplace="$1~";m("TILDE",`^${p[d.LONETILDE]}${p[d.XRANGEPLAIN]}$`);m("TILDELOOSE",`^${p[d.LONETILDE]}${p[d.XRANGEPLAINLOOSE]}$`);m("LONECARET","(?:\\^)");m("CARETTRIM",`(\\s*)${p[d.LONECARET]}\\s+`,!0);H.caretTrimReplace="$1^";m("CARET",`^${p[d.LONECARET]}${p[d.XRANGEPLAIN]}$`);m("CARETLOOSE",`^${p[d.LONECARET]}${p[d.XRANGEPLAINLOOSE]}$`);m("COMPARATORLOOSE",`^${p[d.GTLT]}\\s*(${p[d.LOOSEPLAIN]})$|^$`);m("COMPARATOR",`^${p[d.GTLT]}\\s*(${p[d.FULLPLAIN]})$|^$`);m("COMPARATORTRIM",`(\\s*)${p[d.GTLT]}\\s*(${p[d.LOOSEPLAIN]}|${p[d.XRANGEPLAIN]})`,!0);H.comparatorTrimReplace="$1$2$3";m("HYPHENRANGE",`^\\s*(${p[d.XRANGEPLAIN]})\\s+-\\s+(${p[d.XRANGEPLAIN]})\\s*$`);m("HYPHENRANGELOOSE",`^\\s*(${p[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${p[d.XRANGEPLAINLOOSE]})\\s*$`);m("STAR","(<|>)?=?\\s*\\*");m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var ve=h((Bl,Rt)=>{var ui=["includePrerelease","loose","rtl"],fi=r=>r?typeof r!="object"?{loose:!0}:ui.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};Rt.exports=fi});var ke=h((zl,qt)=>{var It=/^[0-9]+$/,$t=(r,e)=>{let t=It.test(r),n=It.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},hi=(r,e)=>$t(e,r);qt.exports={compareIdentifiers:$t,rcompareIdentifiers:hi}});var O=h((kl,At)=>{var $e=de(),{MAX_LENGTH:jt,MAX_SAFE_INTEGER:qe}=pe(),{re:Nt,t:Tt}=U(),pi=ve(),{compareIdentifiers:Q}=ke(),T=class{constructor(e,t){if(t=pi(t),e instanceof T){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>jt)throw new TypeError(`version is longer than ${jt} characters`);$e("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?Nt[Tt.LOOSE]:Nt[Tt.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>qe||this.major<0)throw new TypeError("Invalid major version");if(this.minor>qe||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>qe||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let i=+s;if(i>=0&&i<qe)return i}return s}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if($e("SemVer.compare",this.version,this.options,e),!(e instanceof T)){if(typeof e=="string"&&e===this.version)return 0;e=new T(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof T||(e=new T(e,this.options)),Q(this.major,e.major)||Q(this.minor,e.minor)||Q(this.patch,e.patch)}comparePre(e){if(e instanceof T||(e=new T(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let n=this.prerelease[t],s=e.prerelease[t];if($e("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return Q(n,s)}while(++t)}compareBuild(e){e instanceof T||(e=new T(e,this.options));let t=0;do{let n=this.build[t],s=e.build[t];if($e("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return Q(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&&(Q(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}};At.exports=T});var B=h((Wl,xt)=>{var{MAX_LENGTH:di}=pe(),{re:Dt,t:Lt}=U(),Ct=O(),vi=ve(),gi=(r,e)=>{if(e=vi(e),r instanceof Ct)return r;if(typeof r!="string"||r.length>di||!(e.loose?Dt[Lt.LOOSE]:Dt[Lt.FULL]).test(r))return null;try{return new Ct(r,e)}catch{return null}};xt.exports=gi});var Gt=h((Yl,Pt)=>{var mi=B(),Ei=(r,e)=>{let t=mi(r,e);return t?t.version:null};Pt.exports=Ei});var Mt=h((Zl,Ft)=>{var yi=B(),_i=(r,e)=>{let t=yi(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};Ft.exports=_i});var Vt=h((Ql,Xt)=>{var Ht=O(),bi=(r,e,t,n)=>{typeof t=="string"&&(n=t,t=void 0);try{return new Ht(r instanceof Ht?r.version:r,t).inc(e,n).version}catch{return null}};Xt.exports=bi});var D=h((Jl,Bt)=>{var Ut=O(),wi=(r,e,t)=>new Ut(r,t).compare(new Ut(e,t));Bt.exports=wi});var je=h((Kl,zt)=>{var Si=D(),Oi=(r,e,t)=>Si(r,e,t)===0;zt.exports=Oi});var Yt=h((ec,Wt)=>{var kt=B(),Ri=je(),Ii=(r,e)=>{if(Ri(r,e))return null;{let t=kt(r),n=kt(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}};Wt.exports=Ii});var Qt=h((tc,Zt)=>{var $i=O(),qi=(r,e)=>new $i(r,e).major;Zt.exports=qi});var Kt=h((rc,Jt)=>{var ji=O(),Ni=(r,e)=>new ji(r,e).minor;Jt.exports=Ni});var tr=h((nc,er)=>{var Ti=O(),Ai=(r,e)=>new Ti(r,e).patch;er.exports=Ai});var nr=h((ic,rr)=>{var Di=B(),Li=(r,e)=>{let t=Di(r,e);return t&&t.prerelease.length?t.prerelease:null};rr.exports=Li});var sr=h((sc,ir)=>{var Ci=D(),xi=(r,e,t)=>Ci(e,r,t);ir.exports=xi});var ar=h((oc,or)=>{var Pi=D(),Gi=(r,e)=>Pi(r,e,!0);or.exports=Gi});var Ne=h((ac,cr)=>{var lr=O(),Fi=(r,e,t)=>{let n=new lr(r,t),s=new lr(e,t);return n.compare(s)||n.compareBuild(s)};cr.exports=Fi});var fr=h((lc,ur)=>{var Mi=Ne(),Hi=(r,e)=>r.sort((t,n)=>Mi(t,n,e));ur.exports=Hi});var pr=h((cc,hr)=>{var Xi=Ne(),Vi=(r,e)=>r.sort((t,n)=>Xi(n,t,e));hr.exports=Vi});var ge=h((uc,dr)=>{var Ui=D(),Bi=(r,e,t)=>Ui(r,e,t)>0;dr.exports=Bi});var Te=h((fc,vr)=>{var zi=D(),ki=(r,e,t)=>zi(r,e,t)<0;vr.exports=ki});var We=h((hc,gr)=>{var Wi=D(),Yi=(r,e,t)=>Wi(r,e,t)!==0;gr.exports=Yi});var Ae=h((pc,mr)=>{var Zi=D(),Qi=(r,e,t)=>Zi(r,e,t)>=0;mr.exports=Qi});var De=h((dc,Er)=>{var Ji=D(),Ki=(r,e,t)=>Ji(r,e,t)<=0;Er.exports=Ki});var Ye=h((vc,yr)=>{var es=je(),ts=We(),rs=ge(),ns=Ae(),is=Te(),ss=De(),os=(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 es(r,t,n);case"!=":return ts(r,t,n);case">":return rs(r,t,n);case">=":return ns(r,t,n);case"<":return is(r,t,n);case"<=":return ss(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};yr.exports=os});var br=h((gc,_r)=>{var as=O(),ls=B(),{re:Le,t:Ce}=U(),cs=(r,e)=>{if(r instanceof as)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(Le[Ce.COERCE]);else{let n;for(;(n=Le[Ce.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||n.index+n[0].length!==t.index+t[0].length)&&(t=n),Le[Ce.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Le[Ce.COERCERTL].lastIndex=-1}return t===null?null:ls(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};_r.exports=cs});var Sr=h((mc,wr)=>{"use strict";wr.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Rr=h((Ec,Or)=>{"use strict";Or.exports=E;E.Node=z;E.create=E;function E(r){var e=this;if(e instanceof E||(e=new E),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}E.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var e=r.next,t=r.prev;return e&&(e.prev=t),t&&(t.next=e),r===this.head&&(this.head=e),r===this.tail&&(this.tail=t),r.list.length--,r.next=null,r.prev=null,r.list=null,e};E.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var e=this.head;r.list=this,r.next=e,e&&(e.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};E.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++}};E.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)fs(this,arguments[r]);return this.length};E.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)hs(this,arguments[r]);return this.length};E.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}};E.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}};E.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};E.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};E.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};E.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};E.prototype.map=function(r,e){e=e||this;for(var t=new E,n=this.head;n!==null;)t.push(r.call(e,n.value,this)),n=n.next;return t};E.prototype.mapReverse=function(r,e){e=e||this;for(var t=new E,n=this.tail;n!==null;)t.push(r.call(e,n.value,this)),n=n.prev;return t};E.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};E.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};E.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};E.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};E.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 E;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};E.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 E;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};E.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=us(this,s,t[n]);return i};E.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 us(r,e,t){var n=e===r.head?new z(t,null,e,r):new z(t,e,e.next,r);return n.next===null&&(r.tail=n),n.prev===null&&(r.head=n),r.length++,n}function fs(r,e){r.tail=new z(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function hs(r,e){r.head=new z(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function z(r,e,t,n){if(!(this instanceof z))return new z(r,e,t,n);this.list=n,this.value=r,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}try{Sr()(E)}catch{}});var Nr=h((yc,jr)=>{"use strict";var ps=Rr(),k=Symbol("max"),F=Symbol("length"),J=Symbol("lengthCalculator"),Ee=Symbol("allowStale"),W=Symbol("maxAge"),G=Symbol("dispose"),Ir=Symbol("noDisposeOnSet"),S=Symbol("lruList"),C=Symbol("cache"),qr=Symbol("updateAgeOnGet"),Ze=()=>1,Je=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[k]=e.max||1/0,n=e.length||Ze;if(this[J]=typeof n!="function"?Ze:n,this[Ee]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[W]=e.maxAge||0,this[G]=e.dispose,this[Ir]=e.noDisposeOnSet||!1,this[qr]=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[k]=e||1/0,me(this)}get max(){return this[k]}set allowStale(e){this[Ee]=!!e}get allowStale(){return this[Ee]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[W]=e,me(this)}get maxAge(){return this[W]}set lengthCalculator(e){typeof e!="function"&&(e=Ze),e!==this[J]&&(this[J]=e,this[F]=0,this[S].forEach(t=>{t.length=this[J](t.value,t.key),this[F]+=t.length})),me(this)}get lengthCalculator(){return this[J]}get length(){return this[F]}get itemCount(){return this[S].length}rforEach(e,t){t=t||this;for(let n=this[S].tail;n!==null;){let s=n.prev;$r(this,e,n,t),n=s}}forEach(e,t){t=t||this;for(let n=this[S].head;n!==null;){let s=n.next;$r(this,e,n,t),n=s}}keys(){return this[S].toArray().map(e=>e.key)}values(){return this[S].toArray().map(e=>e.value)}reset(){this[G]&&this[S]&&this[S].length&&this[S].forEach(e=>this[G](e.key,e.value)),this[C]=new Map,this[S]=new ps,this[F]=0}dump(){return this[S].map(e=>xe(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[S]}set(e,t,n){if(n=n||this[W],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let s=n?Date.now():0,i=this[J](t,e);if(this[C].has(e)){if(i>this[k])return K(this,this[C].get(e)),!1;let c=this[C].get(e).value;return this[G]&&(this[Ir]||this[G](e,c.value)),c.now=s,c.maxAge=n,c.value=t,this[F]+=i-c.length,c.length=i,this.get(e),me(this),!0}let a=new Ke(e,t,i,s,n);return a.length>this[k]?(this[G]&&this[G](e,t),!1):(this[F]+=a.length,this[S].unshift(a),this[C].set(e,this[S].head),me(this),!0)}has(e){if(!this[C].has(e))return!1;let t=this[C].get(e).value;return!xe(this,t)}get(e){return Qe(this,e,!0)}peek(e){return Qe(this,e,!1)}pop(){let e=this[S].tail;return e?(K(this,e),e.value):null}del(e){K(this,this[C].get(e))}load(e){this.reset();let t=Date.now();for(let n=e.length-1;n>=0;n--){let s=e[n],i=s.e||0;if(i===0)this.set(s.k,s.v);else{let a=i-t;a>0&&this.set(s.k,s.v,a)}}}prune(){this[C].forEach((e,t)=>Qe(this,t,!1))}},Qe=(r,e,t)=>{let n=r[C].get(e);if(n){let s=n.value;if(xe(r,s)){if(K(r,n),!r[Ee])return}else t&&(r[qr]&&(n.value.now=Date.now()),r[S].unshiftNode(n));return s.value}},xe=(r,e)=>{if(!e||!e.maxAge&&!r[W])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[W]&&t>r[W]},me=r=>{if(r[F]>r[k])for(let e=r[S].tail;r[F]>r[k]&&e!==null;){let t=e.prev;K(r,e),e=t}},K=(r,e)=>{if(e){let t=e.value;r[G]&&r[G](t.key,t.value),r[F]-=t.length,r[C].delete(t.key),r[S].removeNode(e)}},Ke=class{constructor(e,t,n,s,i){this.key=e,this.value=t,this.length=n,this.now=s,this.maxAge=i||0}},$r=(r,e,t,n)=>{let s=t.value;xe(r,s)&&(K(r,t),r[Ee]||(s=void 0)),s&&e.call(n,s.value,s.key,r)};jr.exports=Je});var L=h((_c,Lr)=>{var Y=class{constructor(e,t){if(t=vs(t),e instanceof Y)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Y(e.raw,t);if(e instanceof et)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!Ar(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&&_s(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=Tr.get(n);if(s)return s;let i=this.options.loose,a=i?j[I.HYPHENRANGELOOSE]:j[I.HYPHENRANGE];e=e.replace(a,Ns(this.options.includePrerelease)),b("hyphen replace",e),e=e.replace(j[I.COMPARATORTRIM],ms),b("comparator trim",e),e=e.replace(j[I.TILDETRIM],Es),e=e.replace(j[I.CARETTRIM],ys),e=e.split(/\s+/).join(" ");let l=e.split(" ").map(f=>bs(f,this.options)).join(" ").split(/\s+/).map(f=>js(f,this.options));i&&(l=l.filter(f=>(b("loose invalid filter",f,this.options),!!f.match(j[I.COMPARATORLOOSE])))),b("range list",l);let c=new Map,o=l.map(f=>new et(f,this.options));for(let f of o){if(Ar(f))return[f];c.set(f.value,f)}c.size>1&&c.has("")&&c.delete("");let u=[...c.values()];return Tr.set(n,u),u}intersects(e,t){if(!(e instanceof Y))throw new TypeError("a Range is required");return this.set.some(n=>Dr(n,t)&&e.set.some(s=>Dr(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 gs(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(Ts(this.set[t],e,this.options))return!0;return!1}};Lr.exports=Y;var ds=Nr(),Tr=new ds({max:1e3}),vs=ve(),et=ye(),b=de(),gs=O(),{re:j,t:I,comparatorTrimReplace:ms,tildeTrimReplace:Es,caretTrimReplace:ys}=U(),Ar=r=>r.value==="<0.0.0-0",_s=r=>r.value==="",Dr=(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},bs=(r,e)=>(b("comp",r,e),r=Os(r,e),b("caret",r),r=ws(r,e),b("tildes",r),r=Is(r,e),b("xrange",r),r=qs(r,e),b("stars",r),r),$=r=>!r||r.toLowerCase()==="x"||r==="*",ws=(r,e)=>r.trim().split(/\s+/).map(t=>Ss(t,e)).join(" "),Ss=(r,e)=>{let t=e.loose?j[I.TILDELOOSE]:j[I.TILDE];return r.replace(t,(n,s,i,a,l)=>{b("tilde",r,n,s,i,a,l);let c;return $(s)?c="":$(i)?c=`>=${s}.0.0 <${+s+1}.0.0-0`:$(a)?c=`>=${s}.${i}.0 <${s}.${+i+1}.0-0`:l?(b("replaceTilde pr",l),c=`>=${s}.${i}.${a}-${l} <${s}.${+i+1}.0-0`):c=`>=${s}.${i}.${a} <${s}.${+i+1}.0-0`,b("tilde return",c),c})},Os=(r,e)=>r.trim().split(/\s+/).map(t=>Rs(t,e)).join(" "),Rs=(r,e)=>{b("caret",r,e);let t=e.loose?j[I.CARETLOOSE]:j[I.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(s,i,a,l,c)=>{b("caret",r,s,i,a,l,c);let o;return $(i)?o="":$(a)?o=`>=${i}.0.0${n} <${+i+1}.0.0-0`:$(l)?i==="0"?o=`>=${i}.${a}.0${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.0${n} <${+i+1}.0.0-0`:c?(b("replaceCaret pr",c),i==="0"?a==="0"?o=`>=${i}.${a}.${l}-${c} <${i}.${a}.${+l+1}-0`:o=`>=${i}.${a}.${l}-${c} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${l}-${c} <${+i+1}.0.0-0`):(b("no pr"),i==="0"?a==="0"?o=`>=${i}.${a}.${l}${n} <${i}.${a}.${+l+1}-0`:o=`>=${i}.${a}.${l}${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${l} <${+i+1}.0.0-0`),b("caret return",o),o})},Is=(r,e)=>(b("replaceXRanges",r,e),r.split(/\s+/).map(t=>$s(t,e)).join(" ")),$s=(r,e)=>{r=r.trim();let t=e.loose?j[I.XRANGELOOSE]:j[I.XRANGE];return r.replace(t,(n,s,i,a,l,c)=>{b("xRange",r,n,s,i,a,l,c);let o=$(i),u=o||$(a),f=u||$(l),w=f;return s==="="&&w&&(s=""),c=e.includePrerelease?"-0":"",o?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&w?(u&&(a=0),l=0,s===">"?(s=">=",u?(i=+i+1,a=0,l=0):(a=+a+1,l=0)):s==="<="&&(s="<",u?i=+i+1:a=+a+1),s==="<"&&(c="-0"),n=`${s+i}.${a}.${l}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:f&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),b("xRange return",n),n})},qs=(r,e)=>(b("replaceStars",r,e),r.trim().replace(j[I.STAR],"")),js=(r,e)=>(b("replaceGTE0",r,e),r.trim().replace(j[e.includePrerelease?I.GTE0PRE:I.GTE0],"")),Ns=r=>(e,t,n,s,i,a,l,c,o,u,f,w,g)=>($(n)?t="":$(s)?t=`>=${n}.0.0${r?"-0":""}`:$(i)?t=`>=${n}.${s}.0${r?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,$(o)?c="":$(u)?c=`<${+o+1}.0.0-0`:$(f)?c=`<${o}.${+u+1}.0-0`:w?c=`<=${o}.${u}.${f}-${w}`:r?c=`<${o}.${u}.${+f+1}-0`:c=`<=${c}`,`${t} ${c}`.trim()),Ts=(r,e,t)=>{for(let n=0;n<r.length;n++)if(!r[n].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let n=0;n<r.length;n++)if(b(r[n].semver),r[n].semver!==et.ANY&&r[n].semver.prerelease.length>0){let s=r[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}});var ye=h((bc,Fr)=>{var _e=Symbol("SemVer ANY"),ee=class{static get ANY(){return _e}constructor(e,t){if(t=As(t),e instanceof ee){if(e.loose===!!t.loose)return e;e=e.value}rt("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===_e?this.value="":this.value=this.operator+this.semver.version,rt("comp",this)}parse(e){let t=this.options.loose?Cr[xr.COMPARATORLOOSE]:Cr[xr.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 Pr(n[2],this.options.loose):this.semver=_e}toString(){return this.value}test(e){if(rt("Comparator.test",e,this.options.loose),this.semver===_e||e===_e)return!0;if(typeof e=="string")try{e=new Pr(e,this.options)}catch{return!1}return tt(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof ee))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Gr(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new Gr(this.value,t).test(e.semver);let n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),i=this.semver.version===e.semver.version,a=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),l=tt(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),c=tt(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||s||i&&a||l||c}};Fr.exports=ee;var As=ve(),{re:Cr,t:xr}=U(),tt=Ye(),rt=de(),Pr=O(),Gr=L()});var be=h((wc,Mr)=>{var Ds=L(),Ls=(r,e,t)=>{try{e=new Ds(e,t)}catch{return!1}return e.test(r)};Mr.exports=Ls});var Xr=h((Sc,Hr)=>{var Cs=L(),xs=(r,e)=>new Cs(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));Hr.exports=xs});var Ur=h((Oc,Vr)=>{var Ps=O(),Gs=L(),Fs=(r,e,t)=>{let n=null,s=null,i=null;try{i=new Gs(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===-1)&&(n=a,s=new Ps(n,t))}),n};Vr.exports=Fs});var zr=h((Rc,Br)=>{var Ms=O(),Hs=L(),Xs=(r,e,t)=>{let n=null,s=null,i=null;try{i=new Hs(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===1)&&(n=a,s=new Ms(n,t))}),n};Br.exports=Xs});var Yr=h((Ic,Wr)=>{var nt=O(),Vs=L(),kr=ge(),Us=(r,e)=>{r=new Vs(r,e);let t=new nt("0.0.0");if(r.test(t)||(t=new nt("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n<r.set.length;++n){let s=r.set[n],i=null;s.forEach(a=>{let l=new nt(a.semver.version);switch(a.operator){case">":l.prerelease.length===0?l.patch++:l.prerelease.push(0),l.raw=l.format();case"":case">=":(!i||kr(l,i))&&(i=l);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),i&&(!t||kr(t,i))&&(t=i)}return t&&r.test(t)?t:null};Wr.exports=Us});var Qr=h(($c,Zr)=>{var Bs=L(),zs=(r,e)=>{try{return new Bs(r,e).range||"*"}catch{return null}};Zr.exports=zs});var Pe=h((qc,tn)=>{var ks=O(),en=ye(),{ANY:Ws}=en,Ys=L(),Zs=be(),Jr=ge(),Kr=Te(),Qs=De(),Js=Ae(),Ks=(r,e,t,n)=>{r=new ks(r,n),e=new Ys(e,n);let s,i,a,l,c;switch(t){case">":s=Jr,i=Qs,a=Kr,l=">",c=">=";break;case"<":s=Kr,i=Js,a=Jr,l="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Zs(r,e,n))return!1;for(let o=0;o<e.set.length;++o){let u=e.set[o],f=null,w=null;if(u.forEach(g=>{g.semver===Ws&&(g=new en(">=0.0.0")),f=f||g,w=w||g,s(g.semver,f.semver,n)?f=g:a(g.semver,w.semver,n)&&(w=g)}),f.operator===l||f.operator===c||(!w.operator||w.operator===l)&&i(r,w.semver))return!1;if(w.operator===c&&a(r,w.semver))return!1}return!0};tn.exports=Ks});var nn=h((jc,rn)=>{var eo=Pe(),to=(r,e,t)=>eo(r,e,">",t);rn.exports=to});var on=h((Nc,sn)=>{var ro=Pe(),no=(r,e,t)=>ro(r,e,"<",t);sn.exports=no});var cn=h((Tc,ln)=>{var an=L(),io=(r,e,t)=>(r=new an(r,t),e=new an(e,t),r.intersects(e));ln.exports=io});var fn=h((Ac,un)=>{var so=be(),oo=D();un.exports=(r,e,t)=>{let n=[],s=null,i=null,a=r.sort((u,f)=>oo(u,f,t));for(let u of a)so(u,e,t)?(i=u,s||(s=u)):(i&&n.push([s,i]),i=null,s=null);s&&n.push([s,null]);let l=[];for(let[u,f]of n)u===f?l.push(u):!f&&u===a[0]?l.push("*"):f?u===a[0]?l.push(`<=${f}`):l.push(`${u} - ${f}`):l.push(`>=${u}`);let c=l.join(" || "),o=typeof e.raw=="string"?e.raw:String(e);return c.length<o.length?c:e}});var gn=h((Dc,vn)=>{var hn=L(),Ge=ye(),{ANY:it}=Ge,we=be(),st=D(),ao=(r,e,t={})=>{if(r===e)return!0;r=new hn(r,t),e=new hn(e,t);let n=!1;e:for(let s of r.set){for(let i of e.set){let a=lo(s,i,t);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},lo=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===it){if(e.length===1&&e[0].semver===it)return!0;t.includePrerelease?r=[new Ge(">=0.0.0-0")]:r=[new Ge(">=0.0.0")]}if(e.length===1&&e[0].semver===it){if(t.includePrerelease)return!0;e=[new Ge(">=0.0.0")]}let n=new Set,s,i;for(let g of r)g.operator===">"||g.operator===">="?s=pn(s,g,t):g.operator==="<"||g.operator==="<="?i=dn(i,g,t):n.add(g.semver);if(n.size>1)return null;let a;if(s&&i){if(a=st(s.semver,i.semver,t),a>0)return null;if(a===0&&(s.operator!==">="||i.operator!=="<="))return null}for(let g of n){if(s&&!we(g,String(s),t)||i&&!we(g,String(i),t))return null;for(let ri of e)if(!we(g,String(ri),t))return!1;return!0}let l,c,o,u,f=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1,w=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1;f&&f.prerelease.length===1&&i.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let g of e){if(u=u||g.operator===">"||g.operator===">=",o=o||g.operator==="<"||g.operator==="<=",s){if(w&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===w.major&&g.semver.minor===w.minor&&g.semver.patch===w.patch&&(w=!1),g.operator===">"||g.operator===">="){if(l=pn(s,g,t),l===g&&l!==s)return!1}else if(s.operator===">="&&!we(s.semver,String(g),t))return!1}if(i){if(f&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===f.major&&g.semver.minor===f.minor&&g.semver.patch===f.patch&&(f=!1),g.operator==="<"||g.operator==="<="){if(c=dn(i,g,t),c===g&&c!==i)return!1}else if(i.operator==="<="&&!we(i.semver,String(g),t))return!1}if(!g.operator&&(i||s)&&a!==0)return!1}return!(s&&o&&!i&&a!==0||i&&u&&!s&&a!==0||w||f)},pn=(r,e,t)=>{if(!r)return e;let n=st(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},dn=(r,e,t)=>{if(!r)return e;let n=st(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};vn.exports=ao});var yn=h((Lc,En)=>{var ot=U(),co=pe(),uo=O(),mn=ke(),fo=B(),ho=Gt(),po=Mt(),vo=Vt(),go=Yt(),mo=Qt(),Eo=Kt(),yo=tr(),_o=nr(),bo=D(),wo=sr(),So=ar(),Oo=Ne(),Ro=fr(),Io=pr(),$o=ge(),qo=Te(),jo=je(),No=We(),To=Ae(),Ao=De(),Do=Ye(),Lo=br(),Co=ye(),xo=L(),Po=be(),Go=Xr(),Fo=Ur(),Mo=zr(),Ho=Yr(),Xo=Qr(),Vo=Pe(),Uo=nn(),Bo=on(),zo=cn(),ko=fn(),Wo=gn();En.exports={parse:fo,valid:ho,clean:po,inc:vo,diff:go,major:mo,minor:Eo,patch:yo,prerelease:_o,compare:bo,rcompare:wo,compareLoose:So,compareBuild:Oo,sort:Ro,rsort:Io,gt:$o,lt:qo,eq:jo,neq:No,gte:To,lte:Ao,cmp:Do,coerce:Lo,Comparator:Co,Range:xo,satisfies:Po,toComparators:Go,maxSatisfying:Fo,minSatisfying:Mo,minVersion:Ho,validRange:Xo,outside:Vo,gtr:Uo,ltr:Bo,intersects:zo,simplifyRange:ko,subset:Wo,SemVer:uo,re:ot.re,src:ot.src,tokens:ot.t,SEMVER_SPEC_VERSION:co.SEMVER_SPEC_VERSION,compareIdentifiers:mn.compareIdentifiers,rcompareIdentifiers:mn.rcompareIdentifiers}});var M=h(A=>{"use strict";var Yo=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]}),Zo=A&&A.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Qo=A&&A.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Yo(e,r,t);return Zo(e,r),e},_n=A&&A.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(A,"__esModule",{value:!0});A.getCoreVersion=void 0;var bn=_n(require("path")),wn=_n(require("fs")),at=Qo(require("@serverless-devs/core")),Jo=yn(),Sn=bn.default.join(at.getRootHome(),"cache","core"),lt=bn.default.join(Sn,"package.json");function Ko(){if(wn.default.existsSync(lt)){var r=require("@serverless-devs/core/package.json").version,e=On();return Jo.gt(e,r)?require(Sn):at}return at}function On(){return wn.default.existsSync(lt)?require(lt).version:void 0}A.getCoreVersion=On;A.default=Ko()});var Oe=h(Se=>{"use strict";var ea=Se&&Se.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Se,"__esModule",{value:!0});var ta=ea(M()),ra=ta.default.Logger,ct=new ra("S-CLI");ct.success=function(r){return ct.log(r,"green")};Se.default=ct});var Me=h(N=>{"use strict";var na=N&&N.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(f){a(f)}}function c(u){try{o(n.throw(u))}catch(f){a(f)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},ia=N&&N.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(t=0)),t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Rn=N&&N.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(N,"__esModule",{value:!0});N.handlerProfileFile=N.getConfig=N.setConfig=void 0;var In=Rn(require("path")),ft=Rn(M()),x=ft.default.fse,Fe=ft.default.jsyaml,ut=ft.default.getRootHome;function sa(r){var e=qn();x.writeFileSync(e,Fe.dump(r))}function $n(){var r=qn();if(!x.existsSync(r))return{};try{var e=Fe.load(x.readFileSync(r,"utf8"))||{};return e}catch(t){throw t}}function qn(){var r=In.default.join(ut(),"set-config.yml");return x.existsSync(r)||x.createFileSync(r),r}function oa(r,e){var t=$n();t[r]=e,sa(t)}N.setConfig=oa;function aa(r,e){var t=$n();return t[r]||e}N.getConfig=aa;function la(r){return na(this,void 0,void 0,function(){var e,t,n,s,i,a,l;return ia(this,function(c){switch(c.label){case 0:if(e=r.filePath||"set-config.yml",t=In.default.join(ut(),e),n=x.existsSync(t),s={},n)return[3,5];i=ut(),c.label=1;case 1:return c.trys.push([1,2,,4]),x.statSync(i),[3,4];case 2:return a=c.sent(),[4,x.mkdirSync(i)];case 3:return c.sent(),[3,4];case 4:return[3,6];case 5:try{s=Fe.load(x.readFileSync(t,"utf8"))||{}}catch(o){throw o}c.label=6;case 6:return r.read?[2,s]:(l=r.configKey||"",s[l]=r.data,[4,x.writeFileSync(t,Fe.dump(s))]);case 7:return c.sent(),[2,s]}})})}N.handlerProfileFile=la});var jn=h((Gc,ca)=>{ca.exports={name:"@serverless-devs/s",version:"2.1.8-beta.2",description:"Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",homepage:"https://www.serverless-devs.com",keywords:["serverless","alibaba","tencent","azure","baidu","huawei","google","function","faas","serverless-devs"],publishConfig:{access:"public",registry:"https://registry.npmjs.org"},license:"Apache 2.0",repository:{type:"git",url:"https://github.com/Serverless-Devs/Serverless-Devs"},bugs:{url:"https://github.com/Serverless-Devs/Serverless-Devs/issues"},scripts:{start:"npm run watch",prewatch:"rm -rf lib/* && cp -r ./src/daemon ./lib",watch:"tsc -w",test:"jest test/special-command.test",prebuild:"rm -rf lib/*",build:"tsc && cp -r ./src/daemon ./lib",postbuild:"./script/postbuild.sh","test:cov":"jest --coverage",lint:"npm run typecheck && f2elint scan -i src",fix:"f2elint fix",typecheck:"npx tsc -p tsconfig.json --noEmit",update:"rm -rf yarn.lock && rm -rf package-lock.json && rm -rf node_modules && yarn",beta:"npm publish --tag=beta",pkg:"tsc && pkg bin/s"},main:"./lib/index.js",bin:{s:"bin/s"},devDependencies:{"@serverless-devs/commander":"^6.2.6","@types/jest":"^27.4.0","@types/node":"^14.0.23","@typescript-eslint/eslint-plugin":"^4.14.1","@typescript-eslint/parser":"^4.14.1",ajv:"^8.10.0","babel-eslint":"^10.1.0",boxen:"^5.0.0",dotenv:"^10.0.0",esbuild:"^0.14.0",eslint:"^7.7.0","eslint-config-prettier":"^7.2.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2","global-agent":"^3.0.0",husky:"^4.2.3",inquirer:"8.2.0","inquirer-autocomplete-prompt":"^1.3.0",jest:"^27.4.7","latest-version":"^5.1.0","lint-staged":"^10.0.8",open:"^8.4.0","os-locale":"5.0.0",pkg:"^5.8.0",prettier:"^2.2.1",semver:"^7.3.5","semver-diff":"^3.1.1","ts-jest":"^27.1.3","ts-node":"^9.1.1",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},dependencies:{"@serverless-devs/core":"latest","@serverless-devs/ui":"latest"}}});var Xe=h(v=>{"use strict";var ua=v&&v.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),fa=v&&v.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),ha=v&&v.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&ua(e,r,t);return fa(e,r),e},re=v&&v.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(f){a(f)}}function c(u){try{o(n.throw(u))}catch(f){a(f)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},ne=v&&v.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(t=0)),t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},He=v&&v.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(v,"__esModule",{value:!0});v.specifyServiceHelp=v.getTempCommandStr=v.emoji=v.mark=v.replaceTemplate=v.replaceFun=v.getLang=v.printn=v.getFolderSize=v.getVersion=v.aiRequest=v.getCredentialWithAll=v.getCredentialWithExisted=v.getProcessArgv=v.bgRed=v.yellow=v.red=void 0;var pa=He(require("path")),Re=He(require("fs")),da=He(require("os")),q=ha(M()),va=Me(),te=He(Oe()),Nn=jn(),ie=q.default.colors,ga=q.default.got,ma=q.default.isDocker,Ea=q.default.isCiCdEnv,X=q.default.lodash,Tn=q.default.publishHelp,ya=X.get,_a=X.trim,ba=X.assign,wa=X.filter,An=X.includes,Sa=X.omit,Oa=X.isPlainObject,Ra=X.isEmpty,Ia=ie.underline,$a=ie.bold;v.red=ie.hex("#fd5750");v.yellow=ie.hex("#F3F99D");v.bgRed=ie.hex("#000").bgHex("#fd5750");var qa=function(){var r=process.env.serverless_devs_temp_argv;try{var e=JSON.parse(r),t=q.default.getGlobalArgs(e);return process.argv=process.argv.slice(0,2).concat(t._argsObj),ba({},t,{noHelpArgv:process.argv.slice(0,2).concat(wa(t._argsObj,function(n){return!An(["-h","--help"],n)}))})}catch{return{}}};v.getProcessArgv=qa;var ja=function(r){return re(void 0,void 0,void 0,function(){var e,t;return ne(this,function(n){switch(n.label){case 0:return[4,q.default.getCredentialAliasList()];case 1:return e=n.sent(),An(e,r)?[4,q.default.getCredential(r)]:[3,3];case 2:return t=n.sent(),[2,t];case 3:return[2]}})})};v.getCredentialWithExisted=ja;var Na=function(){return re(void 0,void 0,void 0,function(){var r,e,t,n,s,i;return ne(this,function(a){switch(a.label){case 0:return[4,q.default.getCredentialAliasList()];case 1:if(r=a.sent(),!(r.length>0))return[3,6];e={},t=0,n=r,a.label=2;case 2:return t<n.length?(s=n[t],[4,q.default.getCredential(s)]):[3,5];case 3:i=a.sent(),e[i.Alias]=Sa(i,"Alias"),a.label=4;case 4:return t++,[3,2];case 5:return[2,e];case 6:return[2]}})})};v.getCredentialWithAll=Na;var Ta=function(r,e){return e===void 0&&(e="unknow"),re(void 0,void 0,void 0,function(){var t,n,s,i;return ne(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t=(0,va.getConfig)("analysis"),t!=="enable"?[2]:ma()||Ea()?[2]:[4,ga("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(e,"&code=TypeError&s=").concat(r),{timeout:2e3,json:!0})];case 1:return n=a.sent(),s=ya(n.body,"shorturl"),s&&te.default.log(`AI Tips:
2
- You can try to solve the problem through: `.concat(ie.underline(s),`
3
- `)),[3,3];case 2:return i=a.sent(),[3,3];case 3:return[2]}})})};v.aiRequest=Ta;function Aa(){var r=(0,q.getCoreVersion)(),e=["".concat(Nn.name,": ").concat(Nn.version),r?"core: ".concat(r):void 0,"s-home: ".concat(q.default.getRootHome()),"".concat(process.platform,"-").concat(process.arch),"node-".concat(process.version)];return e.filter(function(t){return t}).join(", ")}v.getVersion=Aa;function Da(r){return re(this,void 0,void 0,function(){function e(s){return re(this,void 0,void 0,function(){var i,a;return ne(this,function(l){switch(l.label){case 0:return i=Re.default.lstatSync(s),typeof i!="object"?[2]:(t.set(i.ino,i.size),i.isDirectory()?(a=Re.default.readdirSync(s),typeof a!="object"?[2]:[4,Promise.all(a.map(function(c){return e(pa.default.join(s,c))}))]):[3,2]);case 1:l.sent(),l.label=2;case 2:return[2]}})})}var t,n;return ne(this,function(s){switch(s.label){case 0:return t=new Map,[4,e(r)];case 1:return s.sent(),n=Array.from(t.values()).reduce(function(i,a){return i+a},0),[2,n]}})})}v.getFolderSize=Da;function La(r,e){e===void 0&&(e=" ");for(var t="",n=0;n<r;n++)t=t+e;return t}v.printn=La;function Ca(){return"en"}v.getLang=Ca;function Dn(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=_a(i.split("|")[0]);e[a]&&(r=r.replace(n[s],e[a]))}return r}v.replaceFun=Dn;function xa(r,e){r.forEach(function(t){if(Re.default.existsSync(t)){var n=Re.default.readFileSync(t,"utf-8"),s=Dn(n,e);Re.default.writeFileSync(t,s,"utf-8")}})}v.replaceTemplate=xa;function Pa(r){if(!r)return r;var e=r.slice(-4);return"***********".concat(e)}v.mark=Pa;function ht(r,e){return da.default.platform()==="win32"?e||"\u25C6":"".concat(r," ")}v.emoji=ht;function Ln(r,e){var t=r.length,n=new Array(e-t).fill(" ");return"".concat(r).concat(n.join("")," : ")}v.getTempCommandStr=Ln;function Ga(r){return re(this,void 0,void 0,function(){var e,t,n,s,i,l,a,l;return ne(this,function(c){switch(c.label){case 0:return[4,q.default.getYamlContent(r)];case 1:if(e=c.sent(),te.default.log(`
4
- `.concat(ht("\u{1F680}")," ").concat(e.Name,"@").concat(e.Version,": ").concat(e.Description,`
5
- `)),t=e.Commands,t){n=Tn.maxLen(t),s=[],i={};for(l in t)a=t[l],Oa(a)?s.push(Tn.helpInfo(a,Ia($a(l)),n,4)):i[l]=a;if(s.length>0&&te.default.log(s.join(`
6
- `)),!Ra(i)){for(l in i)te.default.log(" ".concat(Ln(l,n)," ").concat(i[l]));te.default.log("")}te.default.log(e.HomePage?" ".concat(ht("\u{1F9ED}")," ").concat(q.default.makeUnderLine("More information: "+e.HomePage)," ")+`
7
- `:"")}return[2]}})})}v.specifyServiceHelp=Ga});var Cn=h(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.default={clean_up_the_environment:"\u6E05\u7406\u73AF\u5883",display_help_for_command:"\u663E\u793A\u547D\u4EE4\u5E2E\u52A9",remove_components:"\u5220\u9664\u7EC4\u4EF6",delete_the_file_under_the_cache:"\u5220\u9664\u7F13\u5B58\u91CC\u7684\u7684<dirname>\u6587\u4EF6",record_your_log_information:"\u662F\u5426\u8BB0\u5F55\u60A8\u7684\u65E5\u5FD7\u4FE1\u606F\uFF1F",init_pproject_deploy_tip:"\u662F\u5426\u7ACB\u5373\u90E8\u7F72\u8BE5\u9879\u76EE\uFF1F",tip_for_a_serverless_project:"\u68C0\u6D4B\u5230\u5F53\u524D\u76EE\u5F55\u4E0B\u5DF2\u5B58\u5728\u4E00\u4E2AServerless-Devs\u9879\u76EE\uFF0C\u8BF7\u901A\u8FC7 's deploy' \u8FDB\u884C\u90E8\u7F72\u6216\u901A\u8FC7 's -h' \u83B7\u53D6\u66F4\u591A\u4FE1\u606F",create_a_new_project:"\u672A\u68C0\u6D4B\u5230 Serverless-Devs \u9879\u76EE\uFF0C\u662F\u5426\u65B0\u5EFA\u4E00\u4E2A\u9879\u76EE\uFF1F",en:"English (en)",zh:"\u4E2D\u6587 (zh)",select_current_language:"\u8BF7\u9009\u62E9\u5F53\u524D\u8BED\u8A00","app-tip":"\u8BF7\u9009\u62E9\u60A8\u5E0C\u671B\u521B\u5EFA\u7684 Serverless-Devs \u5E94\u7528","template-tip":"\u8BF7\u9009\u62E9\u60A8\u559C\u6B22\u7684\u6A21\u7248","fc-runtime-starter":"fc-runtime-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A FC \u51FD\u6570","fc-custom-container-stater":"fc-custom-container-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A custom-container \u5E94\u7528",web:"web-framework-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Web \u6846\u67B6","static-site":"static-website-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","best-practice":"serverless-best-practice - \u5FEB\u901F\u4F53\u9A8C Serverless \u6700\u4F73\u5B9E\u8DF5","devs-template":"Serverless Devs \u5F00\u53D1\u6A21\u677F","fc-http-nodejs":"fc-http-nodejs - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nodejs12 \u51FD\u6570","fc-http-python":"fc-http-python - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A python3 \u51FD\u6570","fc-http-java":"fc-http-java - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A java8 \u51FD\u6570","fc-custom-container-event-python3":"fc-custom-container-event-python3 - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 python3 \u5E94\u7528","fc-custom-container-event-cpp":"fc-custom-container-event-cpp - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 cpp \u5E94\u7528","fc-custom-container-http-springboot":"fc-custom-container-http-springboot - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 springboot \u5E94\u7528","fc-custom-container-http-aspdotnetcore":"fc-custom-container-http-aspdotnetcore - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 aspdotnetcore \u5E94\u7528","express-starter":"express-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A express \u57FA\u7840\u5E94\u7528","koa-starter":"koa-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A koa \u57FA\u7840\u5E94\u7528","nuxtjs-starter":"nuxtjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nuxtjs \u57FA\u7840\u5E94\u7528","eggjs-starter":"eggjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A eggjs \u57FA\u7840\u5E94\u7528","flask-starter":"flask-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A flask \u57FA\u7840\u5E94\u7528","SpringBoot-starter":"SpringBoot-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A SpringBoot \u57FA\u7840\u5E94\u7528","Zblog-starter":"Zblog-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Zblog \u57FA\u7840\u5E94\u7528","website-starter":"website-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","react-starter":"react-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A React.js \u5E94\u7528","vue-starter":"vue-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Vue.js \u5E94\u7528",puppeteer:"puppeteer - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E puppeteer \u622A\u56FE\u7684 Web \u5E94\u7528",ffmpeg:"ffmpeg - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E ffmpeg \u5B9E\u73B0\u97F3\u89C6\u9891\u5904\u7406\u5E94\u7528",pdf2Img:"pdf2Img - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A pdf \u8F6C\u56FE\u7247\u5E94\u7528",tensorflow:"tensorflow - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A tensorflow \u5E94\u7528",todoList:"todoList - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E nodejs \u7684\u7F51\u9875 TodoList \u5E94\u7528"}});var xn=h(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 Gn=h(Ie=>{"use strict";var Pn=Ie&&Ie.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ie,"__esModule",{value:!0});var Fa=Xe(),Ma=Pn(Cn()),Ha=Pn(xn()),vt={en:Ha.default,zh:Ma.default},Xa=function(r){var e=(0,Fa.getLang)(),t=vt[e]?vt[e][r]:vt.en[r];return t||r};Ie.default=Xa});var Ve=h(R=>{"use strict";var Va=R&&R.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Fn=R&&R.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Va(e,r,t)},gt=R&&R.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(R,"__esModule",{value:!0});R.registerCommandChecker=R.i18n=R.logger=void 0;var Ua=gt(Oe());Fn(Xe(),R);Fn(Me(),R);var Ba=Oe();Object.defineProperty(R,"logger",{enumerable:!0,get:function(){return gt(Ba).default}});var za=Gn();Object.defineProperty(R,"i18n",{enumerable:!0,get:function(){return gt(za).default}});function ka(r){r.on("command:*",function(e){var t=r.commands.map(function(n){return n.name()});t.includes(e[0])||(Ua.default.error(" error: unknown command ".concat(e[0])),r.help())})}R.registerCommandChecker=ka});var Z=h(se=>{"use strict";var Wa=se&&se.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(se,"__esModule",{value:!0});se.ServerlessError=void 0;var Ya=Wa(M()),Za=Ya.default.Logger,Qa=new Za("S-CLI-ERROR"),Ja=function(){function r(e,t,n){Qa.error(e+": "+t,n),process.exit(1)}return r}();se.ServerlessError=Ja});var Mn=h(oe=>{"use strict";var Ka=oe&&oe.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(oe,"__esModule",{value:!0});oe.CommandError=void 0;var el=Z(),tl=function(r){Ka(e,r);function e(t,n){return r.call(this,"Error",t,n)||this}return e}(el.ServerlessError);oe.CommandError=tl});var Hn=h(ae=>{"use strict";var rl=ae&&ae.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(ae,"__esModule",{value:!0});ae.ConfigDeleteError=void 0;var nl=Z(),il=function(r){rl(e,r);function e(t,n){return r.call(this,"Deletion failed",t,n)||this}return e}(nl.ServerlessError);ae.ConfigDeleteError=il});var Xn=h(le=>{"use strict";var sl=le&&le.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(le,"__esModule",{value:!0});le.ConfigError=void 0;var ol=Z(),al=function(r){sl(e,r);function e(t,n){return r.call(this,"Config failed",t,n)||this}return e}(ol.ServerlessError);le.ConfigError=al});var Vn=h(ce=>{"use strict";var ll=ce&&ce.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(ce,"__esModule",{value:!0});ce.ConfigGetError=void 0;var cl=Z(),ul=function(r){ll(e,r);function e(t,n){return r.call(this,"Get failed",t,n)||this}return e}(cl.ServerlessError);ce.ConfigGetError=ul});var Un=h(ue=>{"use strict";var fl=ue&&ue.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(ue,"__esModule",{value:!0});ue.InitError=void 0;var hl=Z(),pl=function(r){fl(e,r);function e(t,n){return r.call(this,"Initialization failed",t,n)||this}return e}(hl.ServerlessError);ue.InitError=pl});var zn=h(P=>{"use strict";var dl=P&&P.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(f){a(f)}}function c(u){try{o(n.throw(u))}catch(f){a(f)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},vl=P&&P.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(t=0)),t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},gl=P&&P.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(P,"__esModule",{value:!0});P.HumanError=void 0;var Bn=gl(M()),Ue=Ve(),ml=Bn.default.colors,El=function(){function r(e){var t=e.errorMessage,n=e.tips;this.errorMessage=t,Ue.logger.log(`
8
- `.concat((0,Ue.bgRed)("ERROR:"))),Ue.logger.log("TypeError: ".concat(t,`
9
- `)),n&&Ue.logger.log("".concat(ml.gray(n),`
10
- `))}return r.prototype.report=function(e){return dl(this,void 0,void 0,function(){var t;return vl(this,function(n){switch(n.label){case 0:return t=e.error,[4,Bn.default.report({type:"jsError",errorMessage:this.errorMessage,errorStack:t.stack})];case 1:return n.sent(),[2]}})})},r}();P.HumanError=El});var Wn=h(fe=>{"use strict";var yl=fe&&fe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fe,"__esModule",{value:!0});fe.HumanWarning=void 0;var _l=yl(M()),mt=Ve(),kn=_l.default.colors,bl=function(){function r(e){var t=e.warningMessage,n=e.tips;mt.logger.log(`
11
- `.concat(kn.hex("#000").bgYellow("WARNING:"))),mt.logger.log("".concat(t,`
12
- `)),n&&mt.logger.log("".concat(kn.gray(n),`
13
- `))}return r}();fe.HumanWarning=bl});var Zn=h(_=>{"use strict";var wl=_&&_.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(f){a(f)}}function c(u){try{o(n.throw(u))}catch(f){a(f)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},Sl=_&&_.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(t=0)),t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Yn=_&&_.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_,"__esModule",{value:!0});_.HandleError=_.HumanWarning=_.HumanError=_.ServerlessError=_.InitError=_.ConfigGetError=_.ConfigError=_.ConfigDeleteError=_.CommandError=void 0;var y=Ve(),Ol=Yn(require("path")),he=Yn(M()),V=he.default.colors,Rl=he.default.report,Et=he.default.isDebugMode,Il=he.default.makeUnderLine,yt=he.default.isDocker,$l=Mn();Object.defineProperty(_,"CommandError",{enumerable:!0,get:function(){return $l.CommandError}});var ql=Hn();Object.defineProperty(_,"ConfigDeleteError",{enumerable:!0,get:function(){return ql.ConfigDeleteError}});var jl=Xn();Object.defineProperty(_,"ConfigError",{enumerable:!0,get:function(){return jl.ConfigError}});var Nl=Vn();Object.defineProperty(_,"ConfigGetError",{enumerable:!0,get:function(){return Nl.ConfigGetError}});var Tl=Un();Object.defineProperty(_,"InitError",{enumerable:!0,get:function(){return Tl.InitError}});var Al=Z();Object.defineProperty(_,"ServerlessError",{enumerable:!0,get:function(){return Al.ServerlessError}});var Dl=zn();Object.defineProperty(_,"HumanError",{enumerable:!0,get:function(){return Dl.HumanError}});var Ll=Wn();Object.defineProperty(_,"HumanWarning",{enumerable:!0,get:function(){return Ll.HumanWarning}});function Be(r,e){return"".concat(V.gray(r)).concat(V.gray.underline(e))}var Cl=function(r){return wl(void 0,void 0,void 0,function(){var e,t,n,s,i,a,l,c;return Sl(this,function(o){switch(o.label){case 0:e="Message:",t={traceId:"",catchableError:!1},n=r,s=(0,y.getConfig)("analysis"),s!=="disable"&&(t.traceId=process.env.serverless_devs_trace_id),i=r.message?r.message:"";try{a=JSON.parse(i)}catch{}return a&&a.tips?(l=a.message?"Message: ".concat(a.message,`
14
- `):"",c=a.tips?"* ".concat(Il(a.tips.replace(/\n/,`
15
- * `))):"",y.logger.log(`
16
- `.concat(V.hex("#000").bgYellow("WARNING:"),`
17
- ======================
18
- `).concat(c,`
19
- `),"yellow"),Et()?y.logger.log(r.stack):y.logger.log(V.grey(l)),t.catchableError=!0,n=a,[3,5]):[3,1];case 1:return a&&a.code?(y.logger.log((0,y.red)("\u2716 ".concat(a.prefix||e,`
20
- `))),y.logger.log("".concat((0,y.bgRed)("ERROR:"),`
21
- `)),Et()?y.logger.log("".concat(a.stack,`
22
- `)):y.logger.log("".concat(a.message,`
23
- `)),[4,(0,y.aiRequest)(a.message)]):[3,3];case 2:return o.sent(),n=a,[3,5];case 3:return y.logger.log((0,y.red)("\u2716 ".concat(e,`
24
- `))),y.logger.log("".concat((0,y.bgRed)("ERROR:"),`
25
- `)),y.logger.log(Et()||yt()?r.stack:"".concat(i,`
26
- `)),[4,(0,y.aiRequest)(i)];case 4:o.sent(),o.label=5;case 5:return t.catchableError||(t.traceId&&y.logger.log(V.gray("TraceId: ".concat(t.traceId))),yt()||(y.logger.log(V.gray("Environment: ".concat((0,y.getVersion)()))),y.logger.log(Be("Documents: ","https://www.serverless-devs.com")),y.logger.log(Be("Discussions: ","https://github.com/Serverless-Devs/Serverless-Devs/discussions")),y.logger.log(Be("Issues: ","https://github.com/Serverless-Devs/Serverless-Devs/issues")),y.logger.log(Be("Regsitry: ",`https://registry.serverless-devs.com
27
- `)),t.traceId&&y.logger.log(V.gray("Please copy traceId: ".concat(t.traceId," and join Dingding group: 33947367 for consultation."))),process.env.serverless_devs_trace_id&&y.logger.log("A complete log of this run can be found in: ".concat(Ol.default.join(he.default.getRootHome(),"logs","".concat(process.env.serverless_devs_trace_id,".log")),`
28
- `)))),!yt()&&y.logger.log(V.gray("You can run 's clean --all' to clean Serverless devs.")),t.traceId&&!t.catchableError?[4,Rl({type:"jsError",errorMessage:n.message,errorStack:n.stack,traceId:t.traceId})]:[3,7];case 6:o.sent(),o.label=7;case 7:return process.exit(n.code||1),[2]}})})};_.HandleError=Cl});var Qn=exports&&exports.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function l(u){try{o(n.next(u))}catch(f){a(f)}}function c(u){try{o(n.throw(u))}catch(f){a(f)}}function o(u){u.done?i(u.value):s(u.value).then(l,c)}o((n=n.apply(r,e||[])).next())})},Jn=exports&&exports.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(o){return function(u){return c([o,u])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(t=0)),t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(u){o=[6,u],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},ei=exports&&exports.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},xl=Zn(),Kn=ei(Oe()),bt=ei(M()),ti=Xe(),Pl=bt.default.inquirer,Gl=bt.default.colors,_t=Me(),Fl=`Set analysis action.
29
-
30
- Example:
31
- $ s set analysis
32
- $ s set analysis disable
33
-
34
- `.concat((0,ti.emoji)("\u{1F4D6}")," Document: ").concat(Gl.underline("https://github.com/Serverless-Devs/Serverless-Devs/tree/master/docs/zh/command/set.md")),Ml=[{type:"list",name:"analysis",message:"Choose a action?",choices:[{name:"enable",value:"enable"},{name:"disable",value:"disable"}]}];function Hl(r){var e=this,t=r.command("analysis").helpOption("-h, --help","Display help for command").addHelpCommand(!1).description(Fl).action(function(){return Qn(e,void 0,void 0,function(){var s;return Jn(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,n()];case 1:return i.sent(),[3,3];case 2:throw s=i.sent(),new xl.CommandError(s.message);case 3:return[2]}})})}),n=function(){return Qn(e,void 0,void 0,function(){var s,i,a,l;return Jn(this,function(c){switch(c.label){case 0:return s=process.argv.splice(2),i=bt.default.minimist(s,{alias:{help:"h"}}).help,i&&t.help(),s.length!==2?[3,2]:(Kn.default.log(`
35
- `.concat((0,ti.emoji)("\u{1F4DD}")," Current analysis action: ").concat((0,_t.getConfig)("analysis","enable"),`
36
- `)),[4,Pl.prompt(Ml)]);case 1:a=c.sent(),(0,_t.setConfig)("analysis",a.analysis),c.label=2;case 2:return s.length>2&&(l=s[2],l&&((0,_t.setConfig)("analysis",l),Kn.default.log("Setup succeeded","green"))),[2]}})})}}module.exports=Hl;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ var error_1 = require("../../error");
42
+ var logger_1 = __importDefault(require("../../utils/logger"));
43
+ var core_1 = __importDefault(require("../../utils/core"));
44
+ var common_1 = require("../../utils/common");
45
+ var inquirer = core_1.default.inquirer, colors = core_1.default.colors;
46
+ var handler_set_config_1 = require("../../utils/handler-set-config");
47
+ var description = "Set analysis action.\n\n Example:\n $ s set analysis\n $ s set analysis disable\n \n".concat((0, common_1.emoji)('📖'), " Document: ").concat(colors.underline('https://github.com/Serverless-Devs/Serverless-Devs/tree/master/docs/zh/command/set.md'));
48
+ var promptOption = [
49
+ {
50
+ type: 'list',
51
+ name: 'analysis',
52
+ message: 'Choose a action?',
53
+ choices: [
54
+ {
55
+ name: 'enable',
56
+ value: 'enable',
57
+ },
58
+ {
59
+ name: 'disable',
60
+ value: 'disable',
61
+ },
62
+ ],
63
+ },
64
+ ];
65
+ function run(program) {
66
+ var _this = this;
67
+ var command = program
68
+ .command('analysis')
69
+ .helpOption('-h, --help', 'Display help for command')
70
+ .addHelpCommand(false)
71
+ .description(description)
72
+ .action(function () { return __awaiter(_this, void 0, void 0, function () {
73
+ var error_2;
74
+ return __generator(this, function (_a) {
75
+ switch (_a.label) {
76
+ case 0:
77
+ _a.trys.push([0, 2, , 3]);
78
+ return [4 /*yield*/, doAction()];
79
+ case 1:
80
+ _a.sent();
81
+ return [3 /*break*/, 3];
82
+ case 2:
83
+ error_2 = _a.sent();
84
+ throw new error_1.CommandError(error_2.message);
85
+ case 3: return [2 /*return*/];
86
+ }
87
+ });
88
+ }); });
89
+ var doAction = function () { return __awaiter(_this, void 0, void 0, function () {
90
+ var argv, help, answers, val;
91
+ return __generator(this, function (_a) {
92
+ switch (_a.label) {
93
+ case 0:
94
+ argv = process.argv.splice(2);
95
+ help = core_1.default.minimist(argv, { alias: { help: 'h' } }).help;
96
+ help && command.help();
97
+ if (!(argv.length === 2)) return [3 /*break*/, 2];
98
+ logger_1.default.log("\n".concat((0, common_1.emoji)('📝'), " Current analysis action: ").concat((0, handler_set_config_1.getConfig)('analysis', 'enable'), "\n"));
99
+ return [4 /*yield*/, inquirer.prompt(promptOption)];
100
+ case 1:
101
+ answers = _a.sent();
102
+ (0, handler_set_config_1.setConfig)('analysis', answers.analysis);
103
+ _a.label = 2;
104
+ case 2:
105
+ if (argv.length > 2) {
106
+ val = argv[2];
107
+ if (val) {
108
+ (0, handler_set_config_1.setConfig)('analysis', val);
109
+ logger_1.default.log('Setup succeeded', 'green');
110
+ }
111
+ }
112
+ return [2 /*return*/];
113
+ }
114
+ });
115
+ }); };
116
+ }
117
+ module.exports = run;
118
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc2V0L2FuYWx5c2lzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFDQSxxQ0FBMkM7QUFDM0MsOERBQXdDO0FBQ3hDLDBEQUFvQztBQUNwQyw2Q0FBMkM7QUFDbkMsSUFBQSxRQUFRLEdBQWEsY0FBSSxTQUFqQixFQUFFLE1BQU0sR0FBSyxjQUFJLE9BQVQsQ0FBVTtBQUNsQyxxRUFBc0U7QUFFdEUsSUFBTSxXQUFXLEdBQUcsc0hBTWxCLElBQUEsY0FBSyxFQUFDLElBQUksQ0FBQyx3QkFBYyxNQUFNLENBQUMsU0FBUyxDQUN6Qyx1RkFBdUYsQ0FDeEYsQ0FBRSxDQUFDO0FBRUosSUFBTSxZQUFZLEdBQUc7SUFDbkI7UUFDRSxJQUFJLEVBQUUsTUFBTTtRQUNaLElBQUksRUFBRSxVQUFVO1FBQ2hCLE9BQU8sRUFBRSxrQkFBa0I7UUFDM0IsT0FBTyxFQUFFO1lBQ1A7Z0JBQ0UsSUFBSSxFQUFFLFFBQVE7Z0JBQ2QsS0FBSyxFQUFFLFFBQVE7YUFDaEI7WUFDRDtnQkFDRSxJQUFJLEVBQUUsU0FBUztnQkFDZixLQUFLLEVBQUUsU0FBUzthQUNqQjtTQUNGO0tBQ0Y7Q0FDRixDQUFDO0FBRUYsU0FBUyxHQUFHLENBQUMsT0FBZ0I7SUFBN0IsaUJBK0JDO0lBOUJDLElBQU0sT0FBTyxHQUFHLE9BQU87U0FDcEIsT0FBTyxDQUFDLFVBQVUsQ0FBQztTQUNuQixVQUFVLENBQUMsWUFBWSxFQUFFLDBCQUEwQixDQUFDO1NBQ3BELGNBQWMsQ0FBQyxLQUFLLENBQUM7U0FDckIsV0FBVyxDQUFDLFdBQVcsQ0FBQztTQUN4QixNQUFNLENBQUM7Ozs7OztvQkFFSixxQkFBTSxRQUFRLEVBQUUsRUFBQTs7b0JBQWhCLFNBQWdCLENBQUM7Ozs7b0JBRWpCLE1BQU0sSUFBSSxvQkFBWSxDQUFDLE9BQUssQ0FBQyxPQUFPLENBQUMsQ0FBQzs7OztTQUV6QyxDQUFDLENBQUM7SUFFTCxJQUFNLFFBQVEsR0FBRzs7Ozs7b0JBQ1QsSUFBSSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDO29CQUM1QixJQUFJLEdBQUssY0FBSSxDQUFDLFFBQVEsQ0FBQyxJQUFJLEVBQUUsRUFBRSxLQUFLLEVBQUUsRUFBRSxJQUFJLEVBQUUsR0FBRyxFQUFFLEVBQUUsQ0FBQyxLQUFsRCxDQUFtRDtvQkFDL0QsSUFBSSxJQUFJLE9BQU8sQ0FBQyxJQUFJLEVBQUUsQ0FBQzt5QkFDbkIsQ0FBQSxJQUFJLENBQUMsTUFBTSxLQUFLLENBQUMsQ0FBQSxFQUFqQix3QkFBaUI7b0JBQ25CLGdCQUFNLENBQUMsR0FBRyxDQUFDLFlBQUssSUFBQSxjQUFLLEVBQUMsSUFBSSxDQUFDLHVDQUE2QixJQUFBLDhCQUFTLEVBQUMsVUFBVSxFQUFFLFFBQVEsQ0FBQyxPQUFJLENBQUMsQ0FBQztvQkFDN0UscUJBQU0sUUFBUSxDQUFDLE1BQU0sQ0FBQyxZQUFZLENBQUMsRUFBQTs7b0JBQTdDLE9BQU8sR0FBRyxTQUFtQztvQkFDbkQsSUFBQSw4QkFBUyxFQUFDLFVBQVUsRUFBRSxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUM7OztvQkFFMUMsSUFBSSxJQUFJLENBQUMsTUFBTSxHQUFHLENBQUMsRUFBRTt3QkFDYixHQUFHLEdBQUcsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO3dCQUNwQixJQUFJLEdBQUcsRUFBRTs0QkFDUCxJQUFBLDhCQUFTLEVBQUMsVUFBVSxFQUFFLEdBQUcsQ0FBQyxDQUFDOzRCQUMzQixnQkFBTSxDQUFDLEdBQUcsQ0FBQyxpQkFBaUIsRUFBRSxPQUFPLENBQUMsQ0FBQzt5QkFDeEM7cUJBQ0Y7Ozs7U0FDRixDQUFDO0FBQ0osQ0FBQztBQUVELGlCQUFTLEdBQUcsQ0FBQyJ9