@serverless-devs/s 2.0.100-beta.8 → 2.0.100-beta.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.
- package/lib/clean/index.js +1 -1
- package/lib/cli/index.js +1 -1
- package/lib/component/index.js +1 -1
- package/lib/config/add/index.js +1 -1
- package/lib/config/delete/index.js +1 -1
- package/lib/config/get/index.js +1 -1
- package/lib/config/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/init/index.js +1 -1
- package/lib/set/analysis/index.js +1 -1
- package/lib/set/index.js +1 -1
- package/lib/set/locale/index.js +1 -1
- package/lib/set/registry/index.js +1 -1
- package/lib/set/workspace/index.js +1 -1
- package/lib/update-notifier/index.js +1 -1
- package/lib/verify/index.js +20 -20
- package/package.json +1 -1
package/lib/clean/index.js
CHANGED
|
@@ -31,7 +31,7 @@ __p += '`),Y&&(O+=`' +
|
|
|
31
31
|
function print() { __p += __j.call(arguments, '') }
|
|
32
32
|
`:`;
|
|
33
33
|
`)+O+`return __p
|
|
34
|
-
}`;var G=il(function(){return Z(c,N+"return "+O).apply(i,p)});if(G.source=O,Ws(G))throw G;return G}function M0(e){return J(e).toLowerCase()}function H0(e){return J(e).toUpperCase()}function U0(e,t,n){if(e=J(e),e&&(n||t===i))return ho(e);if(!e||!(t=$e(t)))return e;var u=Ze(e),a=Ze(t),c=po(u,a),p=go(u,a)+1;return $t(u,c,p).join("")}function W0(e,t,n){if(e=J(e),e&&(n||t===i))return e.slice(0,mo(e)+1);if(!e||!(t=$e(t)))return e;var u=Ze(e),a=go(u,Ze(t))+1;return $t(u,0,a).join("")}function B0(e,t,n){if(e=J(e),e&&(n||t===i))return e.replace(Wi,"");if(!e||!(t=$e(t)))return e;var u=Ze(e),a=po(u,Ze(t));return $t(u,a).join("")}function G0(e,t){var n=Fc,u=Pc;if(re(t)){var a="separator"in t?t.separator:a;n="length"in t?B(t.length):n,u="omission"in t?$e(t.omission):u}e=J(e);var c=e.length;if(an(e)){var p=Ze(e);c=p.length}if(n>=c)return e;var d=n-ln(u);if(d<1)return u;var _=p?$t(p,0,d).join(""):e.slice(0,d);if(a===i)return _+u;if(p&&(d+=_.length-d),Bs(a)){if(e.slice(d).search(a)){var A,R=_;for(a.global||(a=is(a.source,J(Du.exec(a))+"g")),a.lastIndex=0;A=a.exec(R);)var O=A.index;_=_.slice(0,O===i?d:O)}}else if(e.indexOf($e(a),d)!=d){var I=_.lastIndexOf(a);I>-1&&(_=_.slice(0,I))}return _+u}function X0(e){return e=J(e),e&&th.test(e)?e.replace(Tu,Ep):e}var z0=gn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),zs=sa("toUpperCase");function rl(e,t,n){return e=J(e),t=n?i:t,t===i?dp(e)?xp(e):sp(e):e.match(t)||[]}var il=z(function(e,t){try{return Le(e,i,t)}catch(n){return Ws(n)?n:new U(n)}}),V0=_t(function(e,t){return Me(t,function(n){n=ut(n),dt(e,n,Hs(e[n],e))}),e});function j0(e){var t=e==null?0:e.length,n=F();return e=t?ne(e,function(u){if(typeof u[1]!="function")throw new He(f);return[n(u[0]),u[1]]}):[],z(function(u){for(var a=-1;++a<t;){var c=e[a];if(Le(c[0],this,u))return Le(c[1],this,u)}})}function Y0(e){return Ed(We(e,v))}function Vs(e){return function(){return e}}function K0(e,t){return e==null||e!==e?t:e}var Z0=oa(),J0=oa(!0);function Ie(e){return e}function js(e){return Po(typeof e=="function"?e:We(e,v))}function Q0(e){return Ho(We(e,v))}function k0(e,t){return Uo(e,We(t,v))}var ev=z(function(e,t){return function(n){return Wn(n,e,t)}}),tv=z(function(e,t){return function(n){return Wn(e,n,t)}});function Ys(e,t,n){var u=ce(t),a=zr(t,u);n==null&&!(re(t)&&(a.length||!u.length))&&(n=t,t=e,e=this,a=zr(t,ce(t)));var c=!(re(n)&&"chain"in n)||!!n.chain,p=vt(e);return Me(a,function(d){var _=t[d];e[d]=_,p&&(e.prototype[d]=function(){var A=this.__chain__;if(c||A){var R=e(this.__wrapped__),O=R.__actions__=Re(this.__actions__);return O.push({func:_,args:arguments,thisArg:e}),R.__chain__=A,R}return _.apply(e,Ot([this.value()],arguments))})}),e}function nv(){return fe._===this&&(fe._=bp),this}function Ks(){}function rv(e){return e=B(e),z(function(t){return Wo(t,e)})}var iv=Ss(ne),sv=Ss(oo),uv=Ss(Ji);function sl(e){return Ns(e)?Qi(ut(e)):Fd(e)}function ov(e){return function(t){return e==null?i:Gt(e,t)}}var av=la(),lv=la(!0);function Zs(){return[]}function Js(){return!1}function fv(){return{}}function cv(){return""}function hv(){return!0}function pv(e,t){if(e=B(e),e<1||e>At)return[];var n=rt,u=ge(e,rt);t=F(t),e-=rt;for(var a=ts(u,t);++n<e;)t(n);return a}function dv(e){return W(e)?ne(e,ut):Ne(e)?[e]:Re(Oa(J(e)))}function gv(e){var t=++Sp;return J(e)+t}var _v=Jr(function(e,t){return e+t},0),mv=Is("ceil"),vv=Jr(function(e,t){return e/t},1),Ev=Is("floor");function wv(e){return e&&e.length?Xr(e,Ie,hs):i}function yv(e,t){return e&&e.length?Xr(e,F(t,2),hs):i}function xv(e){return fo(e,Ie)}function Av(e,t){return fo(e,F(t,2))}function Rv(e){return e&&e.length?Xr(e,Ie,_s):i}function Ov(e,t){return e&&e.length?Xr(e,F(t,2),_s):i}var Sv=Jr(function(e,t){return e*t},1),Iv=Is("round"),bv=Jr(function(e,t){return e-t},0);function Cv(e){return e&&e.length?es(e,Ie):0}function Lv(e,t){return e&&e.length?es(e,F(t,2)):0}return l.after=Q_,l.ary=Fa,l.assign=Hm,l.assignIn=Za,l.assignInWith=fi,l.assignWith=Um,l.at=Wm,l.before=Pa,l.bind=Hs,l.bindAll=V0,l.bindKey=Ma,l.castArray=fm,l.chain=Na,l.chunk=Eg,l.compact=wg,l.concat=yg,l.cond=j0,l.conforms=Y0,l.constant=Vs,l.countBy=C_,l.create=Bm,l.curry=Ha,l.curryRight=Ua,l.debounce=Wa,l.defaults=Gm,l.defaultsDeep=Xm,l.defer=k_,l.delay=em,l.difference=xg,l.differenceBy=Ag,l.differenceWith=Rg,l.drop=Og,l.dropRight=Sg,l.dropRightWhile=Ig,l.dropWhile=bg,l.fill=Cg,l.filter=T_,l.flatMap=D_,l.flatMapDeep=q_,l.flatMapDepth=F_,l.flatten=Ca,l.flattenDeep=Lg,l.flattenDepth=Tg,l.flip=tm,l.flow=Z0,l.flowRight=J0,l.fromPairs=$g,l.functions=Jm,l.functionsIn=Qm,l.groupBy=P_,l.initial=Dg,l.intersection=qg,l.intersectionBy=Fg,l.intersectionWith=Pg,l.invert=e0,l.invertBy=t0,l.invokeMap=H_,l.iteratee=js,l.keyBy=U_,l.keys=ce,l.keysIn=Se,l.map=ii,l.mapKeys=r0,l.mapValues=i0,l.matches=Q0,l.matchesProperty=k0,l.memoize=ui,l.merge=s0,l.mergeWith=Ja,l.method=ev,l.methodOf=tv,l.mixin=Ys,l.negate=oi,l.nthArg=rv,l.omit=u0,l.omitBy=o0,l.once=nm,l.orderBy=W_,l.over=iv,l.overArgs=rm,l.overEvery=sv,l.overSome=uv,l.partial=Us,l.partialRight=Ba,l.partition=B_,l.pick=a0,l.pickBy=Qa,l.property=sl,l.propertyOf=ov,l.pull=Wg,l.pullAll=Ta,l.pullAllBy=Bg,l.pullAllWith=Gg,l.pullAt=Xg,l.range=av,l.rangeRight=lv,l.rearg=im,l.reject=z_,l.remove=zg,l.rest=sm,l.reverse=Ps,l.sampleSize=j_,l.set=f0,l.setWith=c0,l.shuffle=Y_,l.slice=Vg,l.sortBy=J_,l.sortedUniq=kg,l.sortedUniqBy=e_,l.split=D0,l.spread=um,l.tail=t_,l.take=n_,l.takeRight=r_,l.takeRightWhile=i_,l.takeWhile=s_,l.tap=w_,l.throttle=om,l.thru=ri,l.toArray=ja,l.toPairs=ka,l.toPairsIn=el,l.toPath=dv,l.toPlainObject=Ka,l.transform=h0,l.unary=am,l.union=u_,l.unionBy=o_,l.unionWith=a_,l.uniq=l_,l.uniqBy=f_,l.uniqWith=c_,l.unset=p0,l.unzip=Ms,l.unzipWith=$a,l.update=d0,l.updateWith=g0,l.values=vn,l.valuesIn=_0,l.without=h_,l.words=rl,l.wrap=lm,l.xor=p_,l.xorBy=d_,l.xorWith=g_,l.zip=__,l.zipObject=m_,l.zipObjectDeep=v_,l.zipWith=E_,l.entries=ka,l.entriesIn=el,l.extend=Za,l.extendWith=fi,Ys(l,l),l.add=_v,l.attempt=il,l.camelCase=w0,l.capitalize=tl,l.ceil=mv,l.clamp=m0,l.clone=cm,l.cloneDeep=pm,l.cloneDeepWith=dm,l.cloneWith=hm,l.conformsTo=gm,l.deburr=nl,l.defaultTo=K0,l.divide=vv,l.endsWith=y0,l.eq=Qe,l.escape=x0,l.escapeRegExp=A0,l.every=L_,l.find=$_,l.findIndex=Ia,l.findKey=zm,l.findLast=N_,l.findLastIndex=ba,l.findLastKey=Vm,l.floor=Ev,l.forEach=Da,l.forEachRight=qa,l.forIn=jm,l.forInRight=Ym,l.forOwn=Km,l.forOwnRight=Zm,l.get=Gs,l.gt=_m,l.gte=mm,l.has=km,l.hasIn=Xs,l.head=La,l.identity=Ie,l.includes=M_,l.indexOf=Ng,l.inRange=v0,l.invoke=n0,l.isArguments=Vt,l.isArray=W,l.isArrayBuffer=vm,l.isArrayLike=Oe,l.isArrayLikeObject=se,l.isBoolean=Em,l.isBuffer=Nt,l.isDate=wm,l.isElement=ym,l.isEmpty=xm,l.isEqual=Am,l.isEqualWith=Rm,l.isError=Ws,l.isFinite=Om,l.isFunction=vt,l.isInteger=Ga,l.isLength=ai,l.isMap=Xa,l.isMatch=Sm,l.isMatchWith=Im,l.isNaN=bm,l.isNative=Cm,l.isNil=Tm,l.isNull=Lm,l.isNumber=za,l.isObject=re,l.isObjectLike=ie,l.isPlainObject=jn,l.isRegExp=Bs,l.isSafeInteger=$m,l.isSet=Va,l.isString=li,l.isSymbol=Ne,l.isTypedArray=mn,l.isUndefined=Nm,l.isWeakMap=Dm,l.isWeakSet=qm,l.join=Mg,l.kebabCase=R0,l.last=Ge,l.lastIndexOf=Hg,l.lowerCase=O0,l.lowerFirst=S0,l.lt=Fm,l.lte=Pm,l.max=wv,l.maxBy=yv,l.mean=xv,l.meanBy=Av,l.min=Rv,l.minBy=Ov,l.stubArray=Zs,l.stubFalse=Js,l.stubObject=fv,l.stubString=cv,l.stubTrue=hv,l.multiply=Sv,l.nth=Ug,l.noConflict=nv,l.noop=Ks,l.now=si,l.pad=I0,l.padEnd=b0,l.padStart=C0,l.parseInt=L0,l.random=E0,l.reduce=G_,l.reduceRight=X_,l.repeat=T0,l.replace=$0,l.result=l0,l.round=Iv,l.runInContext=g,l.sample=V_,l.size=K_,l.snakeCase=N0,l.some=Z_,l.sortedIndex=jg,l.sortedIndexBy=Yg,l.sortedIndexOf=Kg,l.sortedLastIndex=Zg,l.sortedLastIndexBy=Jg,l.sortedLastIndexOf=Qg,l.startCase=q0,l.startsWith=F0,l.subtract=bv,l.sum=Cv,l.sumBy=Lv,l.template=P0,l.times=pv,l.toFinite=Et,l.toInteger=B,l.toLength=Ya,l.toLower=M0,l.toNumber=Xe,l.toSafeInteger=Mm,l.toString=J,l.toUpper=H0,l.trim=U0,l.trimEnd=W0,l.trimStart=B0,l.truncate=G0,l.unescape=X0,l.uniqueId=gv,l.upperCase=z0,l.upperFirst=zs,l.each=Da,l.eachRight=qa,l.first=La,Ys(l,function(){var e={};return it(l,function(t,n){Q.call(l.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),l.VERSION=r,Me(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){l[e].placeholder=l}),Me(["drop","take"],function(e,t){j.prototype[e]=function(n){n=n===i?1:le(B(n),0);var u=this.__filtered__&&!t?new j(this):this.clone();return u.__filtered__?u.__takeCount__=ge(n,u.__takeCount__):u.__views__.push({size:ge(n,rt),type:e+(u.__dir__<0?"Right":"")}),u},j.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Me(["filter","map","takeWhile"],function(e,t){var n=t+1,u=n==bu||n==Wc;j.prototype[e]=function(a){var c=this.clone();return c.__iteratees__.push({iteratee:F(a,3),type:n}),c.__filtered__=c.__filtered__||u,c}}),Me(["head","last"],function(e,t){var n="take"+(t?"Right":"");j.prototype[e]=function(){return this[n](1).value()[0]}}),Me(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");j.prototype[e]=function(){return this.__filtered__?new j(this):this[n](1)}}),j.prototype.compact=function(){return this.filter(Ie)},j.prototype.find=function(e){return this.filter(e).head()},j.prototype.findLast=function(e){return this.reverse().find(e)},j.prototype.invokeMap=z(function(e,t){return typeof e=="function"?new j(this):this.map(function(n){return Wn(n,e,t)})}),j.prototype.reject=function(e){return this.filter(oi(F(e)))},j.prototype.slice=function(e,t){e=B(e);var n=this;return n.__filtered__&&(e>0||t<0)?new j(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(t=B(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},j.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},j.prototype.toArray=function(){return this.take(rt)},it(j.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),u=/^(?:head|last)$/.test(t),a=l[u?"take"+(t=="last"?"Right":""):t],c=u||/^find/.test(t);!a||(l.prototype[t]=function(){var p=this.__wrapped__,d=u?[1]:arguments,_=p instanceof j,A=d[0],R=_||W(p),O=function(V){var Y=a.apply(l,Ot([V],d));return u&&I?Y[0]:Y};R&&n&&typeof A=="function"&&A.length!=1&&(_=R=!1);var I=this.__chain__,N=!!this.__actions__.length,P=c&&!I,G=_&&!N;if(!c&&R){p=G?p:new j(this);var M=e.apply(p,d);return M.__actions__.push({func:ri,args:[O],thisArg:i}),new Ue(M,I)}return P&&G?e.apply(this,d):(M=this.thru(O),P?u?M.value()[0]:M.value():M)})}),Me(["pop","push","shift","sort","splice","unshift"],function(e){var t=Cr[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",u=/^(?:pop|shift)$/.test(e);l.prototype[e]=function(){var a=arguments;if(u&&!this.__chain__){var c=this.value();return t.apply(W(c)?c:[],a)}return this[n](function(p){return t.apply(W(p)?p:[],a)})}}),it(j.prototype,function(e,t){var n=l[t];if(n){var u=n.name+"";Q.call(hn,u)||(hn[u]=[]),hn[u].push({name:t,func:n})}}),hn[Zr(i,Ft).name]=[{name:"wrapper",func:i}],j.prototype.clone=Xp,j.prototype.reverse=zp,j.prototype.value=Vp,l.prototype.at=y_,l.prototype.chain=x_,l.prototype.commit=A_,l.prototype.next=R_,l.prototype.plant=S_,l.prototype.reverse=I_,l.prototype.toJSON=l.prototype.valueOf=l.prototype.value=b_,l.prototype.first=l.prototype.head,Dn&&(l.prototype[Dn]=O_),l},It=Ap();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(fe._=It,define(function(){return It})):Mt?((Mt.exports=It)._=It,ji._=It):fe._=It}).call(xn)});var mu=q(be=>{"use strict";var zE=be&&be.__awaiter||function(i,r,s,o){function f(h){return h instanceof s?h:new s(function(m){m(h)})}return new(s||(s=Promise))(function(h,m){function y(S){try{v(o.next(S))}catch($){m($)}}function w(S){try{v(o.throw(S))}catch($){m($)}}function v(S){S.done?h(S.value):f(S.value).then(y,w)}v((o=o.apply(i,r||[])).next())})},VE=be&&be.__generator||function(i,r){var s={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},o,f,h,m;return m={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function y(v){return function(S){return w([v,S])}}function w(v){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,f&&(h=v[0]&2?f.return:v[0]?f.throw||((h=f.return)&&h.call(f),0):f.next)&&!(h=h.call(f,v[1])).done)return h;switch(f=0,h&&(v=[v[0]&2,h.value]),v[0]){case 0:case 1:h=v;break;case 4:return s.label++,{value:v[1],done:!1};case 5:s.label++,f=v[1],v=[0];continue;case 7:v=s.ops.pop(),s.trys.pop();continue;default:if(h=s.trys,!(h=h.length>0&&h[h.length-1])&&(v[0]===6||v[0]===2)){s=0;continue}if(v[0]===3&&(!h||v[1]>h[0]&&v[1]<h[3])){s.label=v[1];break}if(v[0]===6&&s.label<h[1]){s.label=h[1],h=v;break}if(h&&s.label<h[2]){s.label=h[2],s.ops.push(v);break}h[2]&&s.ops.pop(),s.trys.pop();continue}v=r.call(i,s)}catch(S){v=[6,S],f=0}finally{o=h=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}},Ec=be&&be.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(be,"__esModule",{value:!0});be.handlerProfileFile=be.getConfig=be.setConfig=void 0;var wc=Ec(require("path")),_u=Ec(ar()),ot=_u.default.fse,Oi=_u.default.jsyaml,gu=_u.default.getRootHome;function jE(i){var r=xc();ot.writeFileSync(r,Oi.dump(i))}function yc(){var i=xc();if(!ot.existsSync(i))return{};try{var r=Oi.load(ot.readFileSync(i,"utf8"))||{};return r}catch(s){throw s}}function xc(){var i=wc.default.join(gu(),"set-config.yml");return ot.existsSync(i)||ot.createFileSync(i),i}function YE(i,r){var s=yc();s[i]=r,jE(s)}be.setConfig=YE;function KE(i,r){var s=yc();return s[i]||r}be.getConfig=KE;function ZE(i){return zE(this,void 0,void 0,function(){var r,s,o,f,h,m,y;return VE(this,function(w){switch(w.label){case 0:if(r=i.filePath||"set-config.yml",s=wc.default.join(gu(),r),o=ot.existsSync(s),f={},o)return[3,5];h=gu(),w.label=1;case 1:return w.trys.push([1,2,,4]),ot.statSync(h),[3,4];case 2:return m=w.sent(),[4,ot.mkdirSync(h)];case 3:return w.sent(),[3,4];case 4:return[3,6];case 5:try{f=Oi.load(ot.readFileSync(s,"utf8"))||{}}catch(v){throw v}w.label=6;case 6:return i.read?[2,f]:(y=i.configKey||"",f[y]=i.data,[4,ot.writeFileSync(s,Oi.dump(f))]);case 7:return w.sent(),[2,f]}})})}be.handlerProfileFile=ZE});var Ac=q((Ty,JE)=>{JE.exports={name:"@serverless-devs/s",version:"2.0.100-beta.8",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/lodash":"^4.14.168","@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",lodash:"^4.17.20","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","tty-table":"^4.1.5",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},dependencies:{"@serverless-devs/core":"beta"}}});var Eu=q(H=>{"use strict";var QE=H&&H.__createBinding||(Object.create?function(i,r,s,o){o===void 0&&(o=s),Object.defineProperty(i,o,{enumerable:!0,get:function(){return r[s]}})}:function(i,r,s,o){o===void 0&&(o=s),i[o]=r[s]}),kE=H&&H.__setModuleDefault||(Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r}),ew=H&&H.__importStar||function(i){if(i&&i.__esModule)return i;var r={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&QE(r,i,s);return kE(r,i),r},cr=H&&H.__awaiter||function(i,r,s,o){function f(h){return h instanceof s?h:new s(function(m){m(h)})}return new(s||(s=Promise))(function(h,m){function y(S){try{v(o.next(S))}catch($){m($)}}function w(S){try{v(o.throw(S))}catch($){m($)}}function v(S){S.done?h(S.value):f(S.value).then(y,w)}v((o=o.apply(i,r||[])).next())})},hr=H&&H.__generator||function(i,r){var s={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},o,f,h,m;return m={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function y(v){return function(S){return w([v,S])}}function w(v){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,f&&(h=v[0]&2?f.return:v[0]?f.throw||((h=f.return)&&h.call(f),0):f.next)&&!(h=h.call(f,v[1])).done)return h;switch(f=0,h&&(v=[v[0]&2,h.value]),v[0]){case 0:case 1:h=v;break;case 4:return s.label++,{value:v[1],done:!1};case 5:s.label++,f=v[1],v=[0];continue;case 7:v=s.ops.pop(),s.trys.pop();continue;default:if(h=s.trys,!(h=h.length>0&&h[h.length-1])&&(v[0]===6||v[0]===2)){s=0;continue}if(v[0]===3&&(!h||v[1]>h[0]&&v[1]<h[3])){s.label=v[1];break}if(v[0]===6&&s.label<h[1]){s.label=h[1],h=v;break}if(h&&s.label<h[2]){s.label=h[2],s.ops.push(v);break}h[2]&&s.ops.pop(),s.trys.pop();continue}v=r.call(i,s)}catch(S){v=[6,S],f=0}finally{o=h=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}},vu=H&&H.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(H,"__esModule",{value:!0});H.emoji=H.mark=H.replaceTemplate=H.replaceFun=H.getLang=H.printn=H.getFolderSize=H.getVersion=H.getPid=H.aiRequest=H.getCredentialWithAll=H.getCredentialWithExisted=H.getProcessArgv=H.bgRed=H.yellow=H.red=void 0;var tw=vu(require("path")),fr=vu(require("fs")),qt=vc(),nw=vu(require("os")),at=ew(ar()),rw=mu(),Rc=Ac(),Si=at.default.colors,iw=at.default.got,sw=at.default.getMAC,uw=at.default.isDocker,ow=at.default.isCiCdEnv,aw=at.default.getGlobalArgs,Oc=at.default.getCredential,Sc=at.default.getCredentialAliasList;H.red=Si.hex("#fd5750");H.yellow=Si.hex("#F3F99D");H.bgRed=Si.hex("#000").bgHex("#fd5750");var lw=function(){var i=process.env.serverless_devs_temp_argv;try{var r=JSON.parse(i),s=aw(r);return process.argv=process.argv.slice(0,2).concat(s._argsObj),(0,qt.assign)({},s,{noHelpArgv:process.argv.slice(0,2).concat((0,qt.filter)(s._argsObj,function(o){return!(0,qt.includes)(["-h","--help"],o)}))})}catch{return{}}};H.getProcessArgv=lw;var fw=function(i){return cr(void 0,void 0,void 0,function(){var r,s;return hr(this,function(o){switch(o.label){case 0:return[4,Sc()];case 1:return r=o.sent(),(0,qt.includes)(r,i)?[4,Oc(i)]:[3,3];case 2:return s=o.sent(),[2,(0,qt.omit)(s,"Alias")];case 3:return[2]}})})};H.getCredentialWithExisted=fw;var cw=function(){return cr(void 0,void 0,void 0,function(){var i,r,s,o,f,h;return hr(this,function(m){switch(m.label){case 0:return[4,Sc()];case 1:if(i=m.sent(),!(i.length>0))return[3,6];r={},s=0,o=i,m.label=2;case 2:return s<o.length?(f=o[s],[4,Oc(f)]):[3,5];case 3:h=m.sent(),r[h.Alias]=(0,qt.omit)(h,"Alias"),m.label=4;case 4:return s++,[3,2];case 5:return[2,r];case 6:return[2]}})})};H.getCredentialWithAll=cw;var hw=function(i,r){return r===void 0&&(r="unknow"),cr(void 0,void 0,void 0,function(){var s,o,f,h;return hr(this,function(m){switch(m.label){case 0:return m.trys.push([0,2,,3]),s=(0,rw.getConfig)("analysis"),s!=="enable"?[2]:uw()||ow()?[2]:[4,iw("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(r,"&code=TypeError&s=").concat(i),{timeout:2e3,json:!0})];case 1:return o=m.sent(),f=(0,qt.get)(o.body,"shorturl"),f&&console.log(`AI Tips:
|
|
34
|
+
}`;var G=il(function(){return Z(c,N+"return "+O).apply(i,p)});if(G.source=O,Ws(G))throw G;return G}function M0(e){return J(e).toLowerCase()}function H0(e){return J(e).toUpperCase()}function U0(e,t,n){if(e=J(e),e&&(n||t===i))return ho(e);if(!e||!(t=$e(t)))return e;var u=Ze(e),a=Ze(t),c=po(u,a),p=go(u,a)+1;return $t(u,c,p).join("")}function W0(e,t,n){if(e=J(e),e&&(n||t===i))return e.slice(0,mo(e)+1);if(!e||!(t=$e(t)))return e;var u=Ze(e),a=go(u,Ze(t))+1;return $t(u,0,a).join("")}function B0(e,t,n){if(e=J(e),e&&(n||t===i))return e.replace(Wi,"");if(!e||!(t=$e(t)))return e;var u=Ze(e),a=po(u,Ze(t));return $t(u,a).join("")}function G0(e,t){var n=Fc,u=Pc;if(re(t)){var a="separator"in t?t.separator:a;n="length"in t?B(t.length):n,u="omission"in t?$e(t.omission):u}e=J(e);var c=e.length;if(an(e)){var p=Ze(e);c=p.length}if(n>=c)return e;var d=n-ln(u);if(d<1)return u;var _=p?$t(p,0,d).join(""):e.slice(0,d);if(a===i)return _+u;if(p&&(d+=_.length-d),Bs(a)){if(e.slice(d).search(a)){var A,R=_;for(a.global||(a=is(a.source,J(Du.exec(a))+"g")),a.lastIndex=0;A=a.exec(R);)var O=A.index;_=_.slice(0,O===i?d:O)}}else if(e.indexOf($e(a),d)!=d){var I=_.lastIndexOf(a);I>-1&&(_=_.slice(0,I))}return _+u}function X0(e){return e=J(e),e&&th.test(e)?e.replace(Tu,Ep):e}var z0=gn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),zs=sa("toUpperCase");function rl(e,t,n){return e=J(e),t=n?i:t,t===i?dp(e)?xp(e):sp(e):e.match(t)||[]}var il=z(function(e,t){try{return Le(e,i,t)}catch(n){return Ws(n)?n:new U(n)}}),V0=_t(function(e,t){return Me(t,function(n){n=ut(n),dt(e,n,Hs(e[n],e))}),e});function j0(e){var t=e==null?0:e.length,n=F();return e=t?ne(e,function(u){if(typeof u[1]!="function")throw new He(f);return[n(u[0]),u[1]]}):[],z(function(u){for(var a=-1;++a<t;){var c=e[a];if(Le(c[0],this,u))return Le(c[1],this,u)}})}function Y0(e){return Ed(We(e,v))}function Vs(e){return function(){return e}}function K0(e,t){return e==null||e!==e?t:e}var Z0=oa(),J0=oa(!0);function Ie(e){return e}function js(e){return Po(typeof e=="function"?e:We(e,v))}function Q0(e){return Ho(We(e,v))}function k0(e,t){return Uo(e,We(t,v))}var ev=z(function(e,t){return function(n){return Wn(n,e,t)}}),tv=z(function(e,t){return function(n){return Wn(e,n,t)}});function Ys(e,t,n){var u=ce(t),a=zr(t,u);n==null&&!(re(t)&&(a.length||!u.length))&&(n=t,t=e,e=this,a=zr(t,ce(t)));var c=!(re(n)&&"chain"in n)||!!n.chain,p=vt(e);return Me(a,function(d){var _=t[d];e[d]=_,p&&(e.prototype[d]=function(){var A=this.__chain__;if(c||A){var R=e(this.__wrapped__),O=R.__actions__=Re(this.__actions__);return O.push({func:_,args:arguments,thisArg:e}),R.__chain__=A,R}return _.apply(e,Ot([this.value()],arguments))})}),e}function nv(){return fe._===this&&(fe._=bp),this}function Ks(){}function rv(e){return e=B(e),z(function(t){return Wo(t,e)})}var iv=Ss(ne),sv=Ss(oo),uv=Ss(Ji);function sl(e){return Ns(e)?Qi(ut(e)):Fd(e)}function ov(e){return function(t){return e==null?i:Gt(e,t)}}var av=la(),lv=la(!0);function Zs(){return[]}function Js(){return!1}function fv(){return{}}function cv(){return""}function hv(){return!0}function pv(e,t){if(e=B(e),e<1||e>At)return[];var n=rt,u=ge(e,rt);t=F(t),e-=rt;for(var a=ts(u,t);++n<e;)t(n);return a}function dv(e){return W(e)?ne(e,ut):Ne(e)?[e]:Re(Oa(J(e)))}function gv(e){var t=++Sp;return J(e)+t}var _v=Jr(function(e,t){return e+t},0),mv=Is("ceil"),vv=Jr(function(e,t){return e/t},1),Ev=Is("floor");function wv(e){return e&&e.length?Xr(e,Ie,hs):i}function yv(e,t){return e&&e.length?Xr(e,F(t,2),hs):i}function xv(e){return fo(e,Ie)}function Av(e,t){return fo(e,F(t,2))}function Rv(e){return e&&e.length?Xr(e,Ie,_s):i}function Ov(e,t){return e&&e.length?Xr(e,F(t,2),_s):i}var Sv=Jr(function(e,t){return e*t},1),Iv=Is("round"),bv=Jr(function(e,t){return e-t},0);function Cv(e){return e&&e.length?es(e,Ie):0}function Lv(e,t){return e&&e.length?es(e,F(t,2)):0}return l.after=Q_,l.ary=Fa,l.assign=Hm,l.assignIn=Za,l.assignInWith=fi,l.assignWith=Um,l.at=Wm,l.before=Pa,l.bind=Hs,l.bindAll=V0,l.bindKey=Ma,l.castArray=fm,l.chain=Na,l.chunk=Eg,l.compact=wg,l.concat=yg,l.cond=j0,l.conforms=Y0,l.constant=Vs,l.countBy=C_,l.create=Bm,l.curry=Ha,l.curryRight=Ua,l.debounce=Wa,l.defaults=Gm,l.defaultsDeep=Xm,l.defer=k_,l.delay=em,l.difference=xg,l.differenceBy=Ag,l.differenceWith=Rg,l.drop=Og,l.dropRight=Sg,l.dropRightWhile=Ig,l.dropWhile=bg,l.fill=Cg,l.filter=T_,l.flatMap=D_,l.flatMapDeep=q_,l.flatMapDepth=F_,l.flatten=Ca,l.flattenDeep=Lg,l.flattenDepth=Tg,l.flip=tm,l.flow=Z0,l.flowRight=J0,l.fromPairs=$g,l.functions=Jm,l.functionsIn=Qm,l.groupBy=P_,l.initial=Dg,l.intersection=qg,l.intersectionBy=Fg,l.intersectionWith=Pg,l.invert=e0,l.invertBy=t0,l.invokeMap=H_,l.iteratee=js,l.keyBy=U_,l.keys=ce,l.keysIn=Se,l.map=ii,l.mapKeys=r0,l.mapValues=i0,l.matches=Q0,l.matchesProperty=k0,l.memoize=ui,l.merge=s0,l.mergeWith=Ja,l.method=ev,l.methodOf=tv,l.mixin=Ys,l.negate=oi,l.nthArg=rv,l.omit=u0,l.omitBy=o0,l.once=nm,l.orderBy=W_,l.over=iv,l.overArgs=rm,l.overEvery=sv,l.overSome=uv,l.partial=Us,l.partialRight=Ba,l.partition=B_,l.pick=a0,l.pickBy=Qa,l.property=sl,l.propertyOf=ov,l.pull=Wg,l.pullAll=Ta,l.pullAllBy=Bg,l.pullAllWith=Gg,l.pullAt=Xg,l.range=av,l.rangeRight=lv,l.rearg=im,l.reject=z_,l.remove=zg,l.rest=sm,l.reverse=Ps,l.sampleSize=j_,l.set=f0,l.setWith=c0,l.shuffle=Y_,l.slice=Vg,l.sortBy=J_,l.sortedUniq=kg,l.sortedUniqBy=e_,l.split=D0,l.spread=um,l.tail=t_,l.take=n_,l.takeRight=r_,l.takeRightWhile=i_,l.takeWhile=s_,l.tap=w_,l.throttle=om,l.thru=ri,l.toArray=ja,l.toPairs=ka,l.toPairsIn=el,l.toPath=dv,l.toPlainObject=Ka,l.transform=h0,l.unary=am,l.union=u_,l.unionBy=o_,l.unionWith=a_,l.uniq=l_,l.uniqBy=f_,l.uniqWith=c_,l.unset=p0,l.unzip=Ms,l.unzipWith=$a,l.update=d0,l.updateWith=g0,l.values=vn,l.valuesIn=_0,l.without=h_,l.words=rl,l.wrap=lm,l.xor=p_,l.xorBy=d_,l.xorWith=g_,l.zip=__,l.zipObject=m_,l.zipObjectDeep=v_,l.zipWith=E_,l.entries=ka,l.entriesIn=el,l.extend=Za,l.extendWith=fi,Ys(l,l),l.add=_v,l.attempt=il,l.camelCase=w0,l.capitalize=tl,l.ceil=mv,l.clamp=m0,l.clone=cm,l.cloneDeep=pm,l.cloneDeepWith=dm,l.cloneWith=hm,l.conformsTo=gm,l.deburr=nl,l.defaultTo=K0,l.divide=vv,l.endsWith=y0,l.eq=Qe,l.escape=x0,l.escapeRegExp=A0,l.every=L_,l.find=$_,l.findIndex=Ia,l.findKey=zm,l.findLast=N_,l.findLastIndex=ba,l.findLastKey=Vm,l.floor=Ev,l.forEach=Da,l.forEachRight=qa,l.forIn=jm,l.forInRight=Ym,l.forOwn=Km,l.forOwnRight=Zm,l.get=Gs,l.gt=_m,l.gte=mm,l.has=km,l.hasIn=Xs,l.head=La,l.identity=Ie,l.includes=M_,l.indexOf=Ng,l.inRange=v0,l.invoke=n0,l.isArguments=Vt,l.isArray=W,l.isArrayBuffer=vm,l.isArrayLike=Oe,l.isArrayLikeObject=se,l.isBoolean=Em,l.isBuffer=Nt,l.isDate=wm,l.isElement=ym,l.isEmpty=xm,l.isEqual=Am,l.isEqualWith=Rm,l.isError=Ws,l.isFinite=Om,l.isFunction=vt,l.isInteger=Ga,l.isLength=ai,l.isMap=Xa,l.isMatch=Sm,l.isMatchWith=Im,l.isNaN=bm,l.isNative=Cm,l.isNil=Tm,l.isNull=Lm,l.isNumber=za,l.isObject=re,l.isObjectLike=ie,l.isPlainObject=jn,l.isRegExp=Bs,l.isSafeInteger=$m,l.isSet=Va,l.isString=li,l.isSymbol=Ne,l.isTypedArray=mn,l.isUndefined=Nm,l.isWeakMap=Dm,l.isWeakSet=qm,l.join=Mg,l.kebabCase=R0,l.last=Ge,l.lastIndexOf=Hg,l.lowerCase=O0,l.lowerFirst=S0,l.lt=Fm,l.lte=Pm,l.max=wv,l.maxBy=yv,l.mean=xv,l.meanBy=Av,l.min=Rv,l.minBy=Ov,l.stubArray=Zs,l.stubFalse=Js,l.stubObject=fv,l.stubString=cv,l.stubTrue=hv,l.multiply=Sv,l.nth=Ug,l.noConflict=nv,l.noop=Ks,l.now=si,l.pad=I0,l.padEnd=b0,l.padStart=C0,l.parseInt=L0,l.random=E0,l.reduce=G_,l.reduceRight=X_,l.repeat=T0,l.replace=$0,l.result=l0,l.round=Iv,l.runInContext=g,l.sample=V_,l.size=K_,l.snakeCase=N0,l.some=Z_,l.sortedIndex=jg,l.sortedIndexBy=Yg,l.sortedIndexOf=Kg,l.sortedLastIndex=Zg,l.sortedLastIndexBy=Jg,l.sortedLastIndexOf=Qg,l.startCase=q0,l.startsWith=F0,l.subtract=bv,l.sum=Cv,l.sumBy=Lv,l.template=P0,l.times=pv,l.toFinite=Et,l.toInteger=B,l.toLength=Ya,l.toLower=M0,l.toNumber=Xe,l.toSafeInteger=Mm,l.toString=J,l.toUpper=H0,l.trim=U0,l.trimEnd=W0,l.trimStart=B0,l.truncate=G0,l.unescape=X0,l.uniqueId=gv,l.upperCase=z0,l.upperFirst=zs,l.each=Da,l.eachRight=qa,l.first=La,Ys(l,function(){var e={};return it(l,function(t,n){Q.call(l.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),l.VERSION=r,Me(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){l[e].placeholder=l}),Me(["drop","take"],function(e,t){j.prototype[e]=function(n){n=n===i?1:le(B(n),0);var u=this.__filtered__&&!t?new j(this):this.clone();return u.__filtered__?u.__takeCount__=ge(n,u.__takeCount__):u.__views__.push({size:ge(n,rt),type:e+(u.__dir__<0?"Right":"")}),u},j.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Me(["filter","map","takeWhile"],function(e,t){var n=t+1,u=n==bu||n==Wc;j.prototype[e]=function(a){var c=this.clone();return c.__iteratees__.push({iteratee:F(a,3),type:n}),c.__filtered__=c.__filtered__||u,c}}),Me(["head","last"],function(e,t){var n="take"+(t?"Right":"");j.prototype[e]=function(){return this[n](1).value()[0]}}),Me(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");j.prototype[e]=function(){return this.__filtered__?new j(this):this[n](1)}}),j.prototype.compact=function(){return this.filter(Ie)},j.prototype.find=function(e){return this.filter(e).head()},j.prototype.findLast=function(e){return this.reverse().find(e)},j.prototype.invokeMap=z(function(e,t){return typeof e=="function"?new j(this):this.map(function(n){return Wn(n,e,t)})}),j.prototype.reject=function(e){return this.filter(oi(F(e)))},j.prototype.slice=function(e,t){e=B(e);var n=this;return n.__filtered__&&(e>0||t<0)?new j(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(t=B(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},j.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},j.prototype.toArray=function(){return this.take(rt)},it(j.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),u=/^(?:head|last)$/.test(t),a=l[u?"take"+(t=="last"?"Right":""):t],c=u||/^find/.test(t);!a||(l.prototype[t]=function(){var p=this.__wrapped__,d=u?[1]:arguments,_=p instanceof j,A=d[0],R=_||W(p),O=function(V){var Y=a.apply(l,Ot([V],d));return u&&I?Y[0]:Y};R&&n&&typeof A=="function"&&A.length!=1&&(_=R=!1);var I=this.__chain__,N=!!this.__actions__.length,P=c&&!I,G=_&&!N;if(!c&&R){p=G?p:new j(this);var M=e.apply(p,d);return M.__actions__.push({func:ri,args:[O],thisArg:i}),new Ue(M,I)}return P&&G?e.apply(this,d):(M=this.thru(O),P?u?M.value()[0]:M.value():M)})}),Me(["pop","push","shift","sort","splice","unshift"],function(e){var t=Cr[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",u=/^(?:pop|shift)$/.test(e);l.prototype[e]=function(){var a=arguments;if(u&&!this.__chain__){var c=this.value();return t.apply(W(c)?c:[],a)}return this[n](function(p){return t.apply(W(p)?p:[],a)})}}),it(j.prototype,function(e,t){var n=l[t];if(n){var u=n.name+"";Q.call(hn,u)||(hn[u]=[]),hn[u].push({name:t,func:n})}}),hn[Zr(i,Ft).name]=[{name:"wrapper",func:i}],j.prototype.clone=Xp,j.prototype.reverse=zp,j.prototype.value=Vp,l.prototype.at=y_,l.prototype.chain=x_,l.prototype.commit=A_,l.prototype.next=R_,l.prototype.plant=S_,l.prototype.reverse=I_,l.prototype.toJSON=l.prototype.valueOf=l.prototype.value=b_,l.prototype.first=l.prototype.head,Dn&&(l.prototype[Dn]=O_),l},It=Ap();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(fe._=It,define(function(){return It})):Mt?((Mt.exports=It)._=It,ji._=It):fe._=It}).call(xn)});var mu=q(be=>{"use strict";var zE=be&&be.__awaiter||function(i,r,s,o){function f(h){return h instanceof s?h:new s(function(m){m(h)})}return new(s||(s=Promise))(function(h,m){function y(S){try{v(o.next(S))}catch($){m($)}}function w(S){try{v(o.throw(S))}catch($){m($)}}function v(S){S.done?h(S.value):f(S.value).then(y,w)}v((o=o.apply(i,r||[])).next())})},VE=be&&be.__generator||function(i,r){var s={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},o,f,h,m;return m={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function y(v){return function(S){return w([v,S])}}function w(v){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,f&&(h=v[0]&2?f.return:v[0]?f.throw||((h=f.return)&&h.call(f),0):f.next)&&!(h=h.call(f,v[1])).done)return h;switch(f=0,h&&(v=[v[0]&2,h.value]),v[0]){case 0:case 1:h=v;break;case 4:return s.label++,{value:v[1],done:!1};case 5:s.label++,f=v[1],v=[0];continue;case 7:v=s.ops.pop(),s.trys.pop();continue;default:if(h=s.trys,!(h=h.length>0&&h[h.length-1])&&(v[0]===6||v[0]===2)){s=0;continue}if(v[0]===3&&(!h||v[1]>h[0]&&v[1]<h[3])){s.label=v[1];break}if(v[0]===6&&s.label<h[1]){s.label=h[1],h=v;break}if(h&&s.label<h[2]){s.label=h[2],s.ops.push(v);break}h[2]&&s.ops.pop(),s.trys.pop();continue}v=r.call(i,s)}catch(S){v=[6,S],f=0}finally{o=h=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}},Ec=be&&be.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(be,"__esModule",{value:!0});be.handlerProfileFile=be.getConfig=be.setConfig=void 0;var wc=Ec(require("path")),_u=Ec(ar()),ot=_u.default.fse,Oi=_u.default.jsyaml,gu=_u.default.getRootHome;function jE(i){var r=xc();ot.writeFileSync(r,Oi.dump(i))}function yc(){var i=xc();if(!ot.existsSync(i))return{};try{var r=Oi.load(ot.readFileSync(i,"utf8"))||{};return r}catch(s){throw s}}function xc(){var i=wc.default.join(gu(),"set-config.yml");return ot.existsSync(i)||ot.createFileSync(i),i}function YE(i,r){var s=yc();s[i]=r,jE(s)}be.setConfig=YE;function KE(i,r){var s=yc();return s[i]||r}be.getConfig=KE;function ZE(i){return zE(this,void 0,void 0,function(){var r,s,o,f,h,m,y;return VE(this,function(w){switch(w.label){case 0:if(r=i.filePath||"set-config.yml",s=wc.default.join(gu(),r),o=ot.existsSync(s),f={},o)return[3,5];h=gu(),w.label=1;case 1:return w.trys.push([1,2,,4]),ot.statSync(h),[3,4];case 2:return m=w.sent(),[4,ot.mkdirSync(h)];case 3:return w.sent(),[3,4];case 4:return[3,6];case 5:try{f=Oi.load(ot.readFileSync(s,"utf8"))||{}}catch(v){throw v}w.label=6;case 6:return i.read?[2,f]:(y=i.configKey||"",f[y]=i.data,[4,ot.writeFileSync(s,Oi.dump(f))]);case 7:return w.sent(),[2,f]}})})}be.handlerProfileFile=ZE});var Ac=q((Ty,JE)=>{JE.exports={name:"@serverless-devs/s",version:"2.0.100-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/lodash":"^4.14.168","@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",lodash:"^4.17.20","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","tty-table":"^4.1.5",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},dependencies:{"@serverless-devs/core":"beta"}}});var Eu=q(H=>{"use strict";var QE=H&&H.__createBinding||(Object.create?function(i,r,s,o){o===void 0&&(o=s),Object.defineProperty(i,o,{enumerable:!0,get:function(){return r[s]}})}:function(i,r,s,o){o===void 0&&(o=s),i[o]=r[s]}),kE=H&&H.__setModuleDefault||(Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r}),ew=H&&H.__importStar||function(i){if(i&&i.__esModule)return i;var r={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&QE(r,i,s);return kE(r,i),r},cr=H&&H.__awaiter||function(i,r,s,o){function f(h){return h instanceof s?h:new s(function(m){m(h)})}return new(s||(s=Promise))(function(h,m){function y(S){try{v(o.next(S))}catch($){m($)}}function w(S){try{v(o.throw(S))}catch($){m($)}}function v(S){S.done?h(S.value):f(S.value).then(y,w)}v((o=o.apply(i,r||[])).next())})},hr=H&&H.__generator||function(i,r){var s={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},o,f,h,m;return m={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function y(v){return function(S){return w([v,S])}}function w(v){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,f&&(h=v[0]&2?f.return:v[0]?f.throw||((h=f.return)&&h.call(f),0):f.next)&&!(h=h.call(f,v[1])).done)return h;switch(f=0,h&&(v=[v[0]&2,h.value]),v[0]){case 0:case 1:h=v;break;case 4:return s.label++,{value:v[1],done:!1};case 5:s.label++,f=v[1],v=[0];continue;case 7:v=s.ops.pop(),s.trys.pop();continue;default:if(h=s.trys,!(h=h.length>0&&h[h.length-1])&&(v[0]===6||v[0]===2)){s=0;continue}if(v[0]===3&&(!h||v[1]>h[0]&&v[1]<h[3])){s.label=v[1];break}if(v[0]===6&&s.label<h[1]){s.label=h[1],h=v;break}if(h&&s.label<h[2]){s.label=h[2],s.ops.push(v);break}h[2]&&s.ops.pop(),s.trys.pop();continue}v=r.call(i,s)}catch(S){v=[6,S],f=0}finally{o=h=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}},vu=H&&H.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(H,"__esModule",{value:!0});H.emoji=H.mark=H.replaceTemplate=H.replaceFun=H.getLang=H.printn=H.getFolderSize=H.getVersion=H.getPid=H.aiRequest=H.getCredentialWithAll=H.getCredentialWithExisted=H.getProcessArgv=H.bgRed=H.yellow=H.red=void 0;var tw=vu(require("path")),fr=vu(require("fs")),qt=vc(),nw=vu(require("os")),at=ew(ar()),rw=mu(),Rc=Ac(),Si=at.default.colors,iw=at.default.got,sw=at.default.getMAC,uw=at.default.isDocker,ow=at.default.isCiCdEnv,aw=at.default.getGlobalArgs,Oc=at.default.getCredential,Sc=at.default.getCredentialAliasList;H.red=Si.hex("#fd5750");H.yellow=Si.hex("#F3F99D");H.bgRed=Si.hex("#000").bgHex("#fd5750");var lw=function(){var i=process.env.serverless_devs_temp_argv;try{var r=JSON.parse(i),s=aw(r);return process.argv=process.argv.slice(0,2).concat(s._argsObj),(0,qt.assign)({},s,{noHelpArgv:process.argv.slice(0,2).concat((0,qt.filter)(s._argsObj,function(o){return!(0,qt.includes)(["-h","--help"],o)}))})}catch{return{}}};H.getProcessArgv=lw;var fw=function(i){return cr(void 0,void 0,void 0,function(){var r,s;return hr(this,function(o){switch(o.label){case 0:return[4,Sc()];case 1:return r=o.sent(),(0,qt.includes)(r,i)?[4,Oc(i)]:[3,3];case 2:return s=o.sent(),[2,(0,qt.omit)(s,"Alias")];case 3:return[2]}})})};H.getCredentialWithExisted=fw;var cw=function(){return cr(void 0,void 0,void 0,function(){var i,r,s,o,f,h;return hr(this,function(m){switch(m.label){case 0:return[4,Sc()];case 1:if(i=m.sent(),!(i.length>0))return[3,6];r={},s=0,o=i,m.label=2;case 2:return s<o.length?(f=o[s],[4,Oc(f)]):[3,5];case 3:h=m.sent(),r[h.Alias]=(0,qt.omit)(h,"Alias"),m.label=4;case 4:return s++,[3,2];case 5:return[2,r];case 6:return[2]}})})};H.getCredentialWithAll=cw;var hw=function(i,r){return r===void 0&&(r="unknow"),cr(void 0,void 0,void 0,function(){var s,o,f,h;return hr(this,function(m){switch(m.label){case 0:return m.trys.push([0,2,,3]),s=(0,rw.getConfig)("analysis"),s!=="enable"?[2]:uw()||ow()?[2]:[4,iw("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(r,"&code=TypeError&s=").concat(i),{timeout:2e3,json:!0})];case 1:return o=m.sent(),f=(0,qt.get)(o.body,"shorturl"),f&&console.log(`AI Tips:
|
|
35
35
|
You can try to solve the problem through: `.concat(Si.underline(f),`
|
|
36
36
|
`)),[3,3];case 2:return h=m.sent(),[3,3];case 3:return[2]}})})};H.aiRequest=hw;var pw=function(){try{return sw().replace(/:/g,"")}catch{return"unknown"}};H.getPid=pw;function dw(){var i=(0,at.getCoreVersion)(),r="".concat(process.platform,"-").concat(process.arch),s="node-".concat(process.version),o="core: ".concat(i),f="s-home: ".concat(at.default.getRootHome()),h="".concat(Rc.name,": ").concat(Rc.version);return i?"".concat(h,", ").concat(o,", ").concat(f,", ").concat(r,", ").concat(s):"".concat(h,", ").concat(f,", ").concat(r,", ").concat(s)}H.getVersion=dw;function gw(i){return cr(this,void 0,void 0,function(){function r(f){return cr(this,void 0,void 0,function(){var h,m;return hr(this,function(y){switch(y.label){case 0:return h=fr.default.lstatSync(f),typeof h!="object"?[2]:(s.set(h.ino,h.size),h.isDirectory()?(m=fr.default.readdirSync(f),typeof m!="object"?[2]:[4,Promise.all(m.map(function(w){return r(tw.default.join(f,w))}))]):[3,2]);case 1:y.sent(),y.label=2;case 2:return[2]}})})}var s,o;return hr(this,function(f){switch(f.label){case 0:return s=new Map,[4,r(i)];case 1:return f.sent(),o=Array.from(s.values()).reduce(function(h,m){return h+m},0),[2,o]}})})}H.getFolderSize=gw;function _w(i,r){r===void 0&&(r=" ");for(var s="",o=0;o<i;o++)s=s+r;return s}H.printn=_w;function mw(){return"en"}H.getLang=mw;function Ic(i,r){var s=/\{\{(.*?)\}\}/g,o=i.match(s);if(o)for(var f=0;f<o.length;f++){var h=o[f].replace(/{{|}}/g,""),m=(0,qt.trim)(h.split("|")[0]);r[m]&&(i=i.replace(o[f],r[m]))}return i}H.replaceFun=Ic;function vw(i,r){i.forEach(function(s){if(fr.default.existsSync(s)){var o=fr.default.readFileSync(s,"utf-8"),f=Ic(o,r);fr.default.writeFileSync(s,f,"utf-8")}})}H.replaceTemplate=vw;function Ew(i){if(!i)return i;var r=i.slice(-4);return"***********".concat(r)}H.mark=Ew;function ww(i,r){return nw.default.platform()==="win32"?r||"\u25C6":"".concat(i," ")}H.emoji=ww});var bc=q(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.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 Cc=q(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.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 Tc=q(pr=>{"use strict";var Lc=pr&&pr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(pr,"__esModule",{value:!0});var yw=Eu(),xw=Lc(bc()),Aw=Lc(Cc()),xu={en:Aw.default,zh:xw.default},Rw=function(i){var r=(0,yw.getLang)(),s=xu[r]?xu[r][i]:xu.en[i];return s||i};pr.default=Rw});var $c=q(dr=>{"use strict";var Ow=dr&&dr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(dr,"__esModule",{value:!0});var Sw=Ow(ar()),Iw=Sw.default.Logger,Au=new Iw("S-CLI");Au.success=function(i){return Au.log(i,"green")};dr.default=Au});var _r=exports&&exports.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(exports,"__esModule",{value:!0});var bw=_r(dl()),mr=_r(ar()),Ii=_r(Tc()),lt=_r(require("path")),An=_r($c()),Cw=mu(),Lw=Eu(),Rn=mr.default.rimraf,Tw=mr.default.minimist,Ru=mr.default.fse,$w=mr.default.colors,Nw=mr.default.getRootHome,Dw=`Clean up the cache related functions of serverless devs. You can clean up the environment, unused dependent packages and related cache contents through this command.
|
|
37
37
|
|
package/lib/cli/index.js
CHANGED
|
@@ -31,7 +31,7 @@ __p += '`),Y&&(S+=`' +
|
|
|
31
31
|
function print() { __p += __j.call(arguments, '') }
|
|
32
32
|
`:`;
|
|
33
33
|
`)+S+`return __p
|
|
34
|
-
}`;var B=pl(function(){return Z(h,N+"return "+S).apply(i,g)});if(B.source=S,Ys(B))throw B;return B}function tv(e){return J(e).toLowerCase()}function nv(e){return J(e).toUpperCase()}function rv(e,t,n){if(e=J(e),e&&(n||t===i))return xo(e);if(!e||!(t=Ne(t)))return e;var u=tt(e),l=tt(t),h=Ao(u,l),g=Oo(u,l)+1;return Ft(u,h,g).join("")}function iv(e,t,n){if(e=J(e),e&&(n||t===i))return e.slice(0,So(e)+1);if(!e||!(t=Ne(t)))return e;var u=tt(e),l=Oo(u,tt(t))+1;return Ft(u,0,l).join("")}function sv(e,t,n){if(e=J(e),e&&(n||t===i))return e.replace(Yi,"");if(!e||!(t=Ne(t)))return e;var u=tt(e),l=Ao(u,tt(t));return Ft(u,l).join("")}function uv(e,t){var n=Qc,u=eh;if(ie(t)){var l="separator"in t?t.separator:l;n="length"in t?U(t.length):n,u="omission"in t?Ne(t.omission):u}e=J(e);var h=e.length;if(gn(e)){var g=tt(e);h=g.length}if(n>=h)return e;var _=n-dn(u);if(_<1)return u;var v=g?Ft(g,0,_).join(""):e.slice(0,_);if(l===i)return v+u;if(g&&(_+=v.length-_),Ks(l)){if(e.slice(_).search(l)){var O,b=v;for(l.global||(l=cs(l.source,J(Bu.exec(l))+"g")),l.lastIndex=0;O=l.exec(b);)var S=O.index;v=v.slice(0,S===i?_:S)}}else if(e.indexOf(Ne(l),_)!=_){var I=v.lastIndexOf(l);I>-1&&(v=v.slice(0,I))}return v+u}function ov(e){return e=J(e),e&&vh.test(e)?e.replace(Wu,qp):e}var av=wn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),ks=ga("toUpperCase");function hl(e,t,n){return e=J(e),t=n?i:t,t===i?Tp(e)?Hp(e):xp(e):e.match(t)||[]}var pl=X(function(e,t){try{return De(e,i,t)}catch(n){return Ys(n)?n:new W(n)}}),lv=yt(function(e,t){return Ue(t,function(n){n=lt(n),vt(e,n,zs(e[n],e))}),e});function fv(e){var t=e==null?0:e.length,n=q();return e=t?re(e,function(u){if(typeof u[1]!="function")throw new Be(f);return[n(u[0]),u[1]]}):[],X(function(u){for(var l=-1;++l<t;){var h=e[l];if(De(h[0],this,u))return De(h[1],this,u)}})}function cv(e){return qg(Xe(e,p))}function Qs(e){return function(){return e}}function hv(e,t){return e==null||e!==e?t:e}var pv=_a(),gv=_a(!0);function Le(e){return e}function eu(e){return zo(typeof e=="function"?e:Xe(e,p))}function dv(e){return Yo(Xe(e,p))}function _v(e,t){return Ko(e,Xe(t,p))}var mv=X(function(e,t){return function(n){return kn(n,e,t)}}),vv=X(function(e,t){return function(n){return kn(e,n,t)}});function tu(e,t,n){var u=pe(t),l=kr(t,u);n==null&&!(ie(t)&&(l.length||!u.length))&&(n=t,t=e,e=this,l=kr(t,pe(t)));var h=!(ie(n)&&"chain"in n)||!!n.chain,g=xt(e);return Ue(l,function(_){var v=t[_];e[_]=v,g&&(e.prototype[_]=function(){var O=this.__chain__;if(h||O){var b=e(this.__wrapped__),S=b.__actions__=Re(this.__actions__);return S.push({func:v,args:arguments,thisArg:e}),b.__chain__=O,b}return v.apply(e,Lt([this.value()],arguments))})}),e}function Ev(){return he._===this&&(he._=Xp),this}function nu(){}function yv(e){return e=U(e),X(function(t){return Zo(t,e)})}var wv=Ds(re),xv=Ds(mo),Av=Ds(is);function gl(e){return Ws(e)?ss(lt(e)):Qg(e)}function Ov(e){return function(t){return e==null?i:Kt(e,t)}}var bv=va(),Sv=va(!0);function ru(){return[]}function iu(){return!1}function Rv(){return{}}function Iv(){return""}function Cv(){return!0}function Lv(e,t){if(e=U(e),e<1||e>It)return[];var n=ut,u=ve(e,ut);t=q(t),e-=ut;for(var l=as(u,t);++n<e;)t(n);return l}function Tv(e){return G(e)?re(e,lt):qe(e)?[e]:Re(Pa(J(e)))}function $v(e){var t=++Bp;return J(e)+t}var Dv=ii(function(e,t){return e+t},0),Pv=Ps("ceil"),Nv=ii(function(e,t){return e/t},1),qv=Ps("floor");function Fv(e){return e&&e.length?Jr(e,Le,Es):i}function Mv(e,t){return e&&e.length?Jr(e,q(t,2),Es):i}function Hv(e){return yo(e,Le)}function Wv(e,t){return yo(e,q(t,2))}function Gv(e){return e&&e.length?Jr(e,Le,As):i}function Uv(e,t){return e&&e.length?Jr(e,q(t,2),As):i}var Bv=ii(function(e,t){return e*t},1),jv=Ps("round"),Xv=ii(function(e,t){return e-t},0);function zv(e){return e&&e.length?os(e,Le):0}function Vv(e,t){return e&&e.length?os(e,q(t,2)):0}return c.after=d0,c.ary=Xa,c.assign=nm,c.assignIn=sl,c.assignInWith=mi,c.assignWith=rm,c.at=im,c.before=za,c.bind=zs,c.bindAll=lv,c.bindKey=Va,c.castArray=R0,c.chain=Ua,c.chunk=qd,c.compact=Fd,c.concat=Md,c.cond=fv,c.conforms=cv,c.constant=Qs,c.countBy=z_,c.create=sm,c.curry=Ya,c.curryRight=Ka,c.debounce=Za,c.defaults=um,c.defaultsDeep=om,c.defer=_0,c.delay=m0,c.difference=Hd,c.differenceBy=Wd,c.differenceWith=Gd,c.drop=Ud,c.dropRight=Bd,c.dropRightWhile=jd,c.dropWhile=Xd,c.fill=zd,c.filter=Y_,c.flatMap=J_,c.flatMapDeep=k_,c.flatMapDepth=Q_,c.flatten=Ma,c.flattenDeep=Vd,c.flattenDepth=Yd,c.flip=v0,c.flow=pv,c.flowRight=gv,c.fromPairs=Kd,c.functions=gm,c.functionsIn=dm,c.groupBy=e0,c.initial=Jd,c.intersection=kd,c.intersectionBy=Qd,c.intersectionWith=e_,c.invert=mm,c.invertBy=vm,c.invokeMap=n0,c.iteratee=eu,c.keyBy=r0,c.keys=pe,c.keysIn=Ce,c.map=ci,c.mapKeys=ym,c.mapValues=wm,c.matches=dv,c.matchesProperty=_v,c.memoize=pi,c.merge=xm,c.mergeWith=ul,c.method=mv,c.methodOf=vv,c.mixin=tu,c.negate=gi,c.nthArg=yv,c.omit=Am,c.omitBy=Om,c.once=E0,c.orderBy=i0,c.over=wv,c.overArgs=y0,c.overEvery=xv,c.overSome=Av,c.partial=Vs,c.partialRight=Ja,c.partition=s0,c.pick=bm,c.pickBy=ol,c.property=gl,c.propertyOf=Ov,c.pull=i_,c.pullAll=Wa,c.pullAllBy=s_,c.pullAllWith=u_,c.pullAt=o_,c.range=bv,c.rangeRight=Sv,c.rearg=w0,c.reject=a0,c.remove=a_,c.rest=x0,c.reverse=js,c.sampleSize=f0,c.set=Rm,c.setWith=Im,c.shuffle=c0,c.slice=l_,c.sortBy=g0,c.sortedUniq=__,c.sortedUniqBy=m_,c.split=Jm,c.spread=A0,c.tail=v_,c.take=E_,c.takeRight=y_,c.takeRightWhile=w_,c.takeWhile=x_,c.tap=F_,c.throttle=O0,c.thru=fi,c.toArray=nl,c.toPairs=al,c.toPairsIn=ll,c.toPath=Tv,c.toPlainObject=il,c.transform=Cm,c.unary=b0,c.union=A_,c.unionBy=O_,c.unionWith=b_,c.uniq=S_,c.uniqBy=R_,c.uniqWith=I_,c.unset=Lm,c.unzip=Xs,c.unzipWith=Ga,c.update=Tm,c.updateWith=$m,c.values=On,c.valuesIn=Dm,c.without=C_,c.words=hl,c.wrap=S0,c.xor=L_,c.xorBy=T_,c.xorWith=$_,c.zip=D_,c.zipObject=P_,c.zipObjectDeep=N_,c.zipWith=q_,c.entries=al,c.entriesIn=ll,c.extend=sl,c.extendWith=mi,tu(c,c),c.add=Dv,c.attempt=pl,c.camelCase=Fm,c.capitalize=fl,c.ceil=Pv,c.clamp=Pm,c.clone=I0,c.cloneDeep=L0,c.cloneDeepWith=T0,c.cloneWith=C0,c.conformsTo=$0,c.deburr=cl,c.defaultTo=hv,c.divide=Nv,c.endsWith=Mm,c.eq=rt,c.escape=Hm,c.escapeRegExp=Wm,c.every=V_,c.find=K_,c.findIndex=qa,c.findKey=am,c.findLast=Z_,c.findLastIndex=Fa,c.findLastKey=lm,c.floor=qv,c.forEach=Ba,c.forEachRight=ja,c.forIn=fm,c.forInRight=cm,c.forOwn=hm,c.forOwnRight=pm,c.get=Zs,c.gt=D0,c.gte=P0,c.has=_m,c.hasIn=Js,c.head=Ha,c.identity=Le,c.includes=t0,c.indexOf=Zd,c.inRange=Nm,c.invoke=Em,c.isArguments=kt,c.isArray=G,c.isArrayBuffer=N0,c.isArrayLike=Ie,c.isArrayLikeObject=ue,c.isBoolean=q0,c.isBuffer=Mt,c.isDate=F0,c.isElement=M0,c.isEmpty=H0,c.isEqual=W0,c.isEqualWith=G0,c.isError=Ys,c.isFinite=U0,c.isFunction=xt,c.isInteger=ka,c.isLength=di,c.isMap=Qa,c.isMatch=B0,c.isMatchWith=j0,c.isNaN=X0,c.isNative=z0,c.isNil=Y0,c.isNull=V0,c.isNumber=el,c.isObject=ie,c.isObjectLike=se,c.isPlainObject=ir,c.isRegExp=Ks,c.isSafeInteger=K0,c.isSet=tl,c.isString=_i,c.isSymbol=qe,c.isTypedArray=An,c.isUndefined=Z0,c.isWeakMap=J0,c.isWeakSet=k0,c.join=t_,c.kebabCase=Gm,c.last=Ve,c.lastIndexOf=n_,c.lowerCase=Um,c.lowerFirst=Bm,c.lt=Q0,c.lte=em,c.max=Fv,c.maxBy=Mv,c.mean=Hv,c.meanBy=Wv,c.min=Gv,c.minBy=Uv,c.stubArray=ru,c.stubFalse=iu,c.stubObject=Rv,c.stubString=Iv,c.stubTrue=Cv,c.multiply=Bv,c.nth=r_,c.noConflict=Ev,c.noop=nu,c.now=hi,c.pad=jm,c.padEnd=Xm,c.padStart=zm,c.parseInt=Vm,c.random=qm,c.reduce=u0,c.reduceRight=o0,c.repeat=Ym,c.replace=Km,c.result=Sm,c.round=jv,c.runInContext=m,c.sample=l0,c.size=h0,c.snakeCase=Zm,c.some=p0,c.sortedIndex=f_,c.sortedIndexBy=c_,c.sortedIndexOf=h_,c.sortedLastIndex=p_,c.sortedLastIndexBy=g_,c.sortedLastIndexOf=d_,c.startCase=km,c.startsWith=Qm,c.subtract=Xv,c.sum=zv,c.sumBy=Vv,c.template=ev,c.times=Lv,c.toFinite=At,c.toInteger=U,c.toLength=rl,c.toLower=tv,c.toNumber=Ye,c.toSafeInteger=tm,c.toString=J,c.toUpper=nv,c.trim=rv,c.trimEnd=iv,c.trimStart=sv,c.truncate=uv,c.unescape=ov,c.uniqueId=$v,c.upperCase=av,c.upperFirst=ks,c.each=Ba,c.eachRight=ja,c.first=Ha,tu(c,function(){var e={};return ot(c,function(t,n){k.call(c.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),c.VERSION=r,Ue(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){c[e].placeholder=c}),Ue(["drop","take"],function(e,t){V.prototype[e]=function(n){n=n===i?1:fe(U(n),0);var u=this.__filtered__&&!t?new V(this):this.clone();return u.__filtered__?u.__takeCount__=ve(n,u.__takeCount__):u.__views__.push({size:ve(n,ut),type:e+(u.__dir__<0?"Right":"")}),u},V.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Ue(["filter","map","takeWhile"],function(e,t){var n=t+1,u=n==Fu||n==ih;V.prototype[e]=function(l){var h=this.clone();return h.__iteratees__.push({iteratee:q(l,3),type:n}),h.__filtered__=h.__filtered__||u,h}}),Ue(["head","last"],function(e,t){var n="take"+(t?"Right":"");V.prototype[e]=function(){return this[n](1).value()[0]}}),Ue(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");V.prototype[e]=function(){return this.__filtered__?new V(this):this[n](1)}}),V.prototype.compact=function(){return this.filter(Le)},V.prototype.find=function(e){return this.filter(e).head()},V.prototype.findLast=function(e){return this.reverse().find(e)},V.prototype.invokeMap=X(function(e,t){return typeof e=="function"?new V(this):this.map(function(n){return kn(n,e,t)})}),V.prototype.reject=function(e){return this.filter(gi(q(e)))},V.prototype.slice=function(e,t){e=U(e);var n=this;return n.__filtered__&&(e>0||t<0)?new V(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(t=U(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},V.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},V.prototype.toArray=function(){return this.take(ut)},ot(V.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),u=/^(?:head|last)$/.test(t),l=c[u?"take"+(t=="last"?"Right":""):t],h=u||/^find/.test(t);!l||(c.prototype[t]=function(){var g=this.__wrapped__,_=u?[1]:arguments,v=g instanceof V,O=_[0],b=v||G(g),S=function(z){var Y=l.apply(c,Lt([z],_));return u&&I?Y[0]:Y};b&&n&&typeof O=="function"&&O.length!=1&&(v=b=!1);var I=this.__chain__,N=!!this.__actions__.length,F=h&&!I,B=v&&!N;if(!h&&b){g=B?g:new V(this);var M=e.apply(g,_);return M.__actions__.push({func:fi,args:[S],thisArg:i}),new je(M,I)}return F&&B?e.apply(this,_):(M=this.thru(S),F?u?M.value()[0]:M.value():M)})}),Ue(["pop","push","shift","sort","splice","unshift"],function(e){var t=qr[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",u=/^(?:pop|shift)$/.test(e);c.prototype[e]=function(){var l=arguments;if(u&&!this.__chain__){var h=this.value();return t.apply(G(h)?h:[],l)}return this[n](function(g){return t.apply(G(g)?g:[],l)})}}),ot(V.prototype,function(e,t){var n=c[t];if(n){var u=n.name+"";k.call(vn,u)||(vn[u]=[]),vn[u].push({name:t,func:n})}}),vn[ri(i,ke).name]=[{name:"wrapper",func:i}],V.prototype.clone=og,V.prototype.reverse=ag,V.prototype.value=lg,c.prototype.at=M_,c.prototype.chain=H_,c.prototype.commit=W_,c.prototype.next=G_,c.prototype.plant=B_,c.prototype.reverse=j_,c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=X_,c.prototype.first=c.prototype.head,Xn&&(c.prototype[Xn]=U_),c},$t=Wp();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(he._=$t,define(function(){return $t})):jt?((jt.exports=$t)._=$t,es._=$t):he._=$t}).call(In)});var Ru=L(Te=>{"use strict";var cy=Te&&Te.__awaiter||function(i,r,s,o){function f(a){return a instanceof s?a:new s(function(d){d(a)})}return new(s||(s=Promise))(function(a,d){function E(x){try{p(o.next(x))}catch(R){d(R)}}function y(x){try{p(o.throw(x))}catch(R){d(R)}}function p(x){x.done?a(x.value):f(x.value).then(E,y)}p((o=o.apply(i,r||[])).next())})},hy=Te&&Te.__generator||function(i,r){var s={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,f,a,d;return d={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function E(p){return function(x){return y([p,x])}}function y(p){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,f&&(a=p[0]&2?f.return:p[0]?f.throw||((a=f.return)&&a.call(f),0):f.next)&&!(a=a.call(f,p[1])).done)return a;switch(f=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return s.label++,{value:p[1],done:!1};case 5:s.label++,f=p[1],p=[0];continue;case 7:p=s.ops.pop(),s.trys.pop();continue;default:if(a=s.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){s=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){s.label=p[1];break}if(p[0]===6&&s.label<a[1]){s.label=a[1],a=p;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(p);break}a[2]&&s.ops.pop(),s.trys.pop();continue}p=r.call(i,s)}catch(x){p=[6,x],f=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Rc=Te&&Te.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Te,"__esModule",{value:!0});Te.handlerProfileFile=Te.getConfig=Te.setConfig=void 0;var Ic=Rc(require("path")),Su=Rc(Rt()),ft=Su.default.fse,$i=Su.default.jsyaml,bu=Su.default.getRootHome;function py(i){var r=Lc();ft.writeFileSync(r,$i.dump(i))}function Cc(){var i=Lc();if(!ft.existsSync(i))return{};try{var r=$i.load(ft.readFileSync(i,"utf8"))||{};return r}catch(s){throw s}}function Lc(){var i=Ic.default.join(bu(),"set-config.yml");return ft.existsSync(i)||ft.createFileSync(i),i}function gy(i,r){var s=Cc();s[i]=r,py(s)}Te.setConfig=gy;function dy(i,r){var s=Cc();return s[i]||r}Te.getConfig=dy;function _y(i){return cy(this,void 0,void 0,function(){var r,s,o,f,a,d,E;return hy(this,function(y){switch(y.label){case 0:if(r=i.filePath||"set-config.yml",s=Ic.default.join(bu(),r),o=ft.existsSync(s),f={},o)return[3,5];a=bu(),y.label=1;case 1:return y.trys.push([1,2,,4]),ft.statSync(a),[3,4];case 2:return d=y.sent(),[4,ft.mkdirSync(a)];case 3:return y.sent(),[3,4];case 4:return[3,6];case 5:try{f=$i.load(ft.readFileSync(s,"utf8"))||{}}catch(p){throw p}y.label=6;case 6:return i.read?[2,f]:(E=i.configKey||"",f[E]=i.data,[4,ft.writeFileSync(s,$i.dump(f))]);case 7:return y.sent(),[2,f]}})})}Te.handlerProfileFile=_y});var Tc=L((Xx,my)=>{my.exports={name:"@serverless-devs/s",version:"2.0.100-beta.8",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/lodash":"^4.14.168","@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",lodash:"^4.17.20","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","tty-table":"^4.1.5",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},dependencies:{"@serverless-devs/core":"beta"}}});var Pi=L(H=>{"use strict";var vy=H&&H.__createBinding||(Object.create?function(i,r,s,o){o===void 0&&(o=s),Object.defineProperty(i,o,{enumerable:!0,get:function(){return r[s]}})}:function(i,r,s,o){o===void 0&&(o=s),i[o]=r[s]}),Ey=H&&H.__setModuleDefault||(Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r}),yy=H&&H.__importStar||function(i){if(i&&i.__esModule)return i;var r={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&vy(r,i,s);return Ey(r,i),r},xr=H&&H.__awaiter||function(i,r,s,o){function f(a){return a instanceof s?a:new s(function(d){d(a)})}return new(s||(s=Promise))(function(a,d){function E(x){try{p(o.next(x))}catch(R){d(R)}}function y(x){try{p(o.throw(x))}catch(R){d(R)}}function p(x){x.done?a(x.value):f(x.value).then(E,y)}p((o=o.apply(i,r||[])).next())})},Ar=H&&H.__generator||function(i,r){var s={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,f,a,d;return d={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function E(p){return function(x){return y([p,x])}}function y(p){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,f&&(a=p[0]&2?f.return:p[0]?f.throw||((a=f.return)&&a.call(f),0):f.next)&&!(a=a.call(f,p[1])).done)return a;switch(f=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return s.label++,{value:p[1],done:!1};case 5:s.label++,f=p[1],p=[0];continue;case 7:p=s.ops.pop(),s.trys.pop();continue;default:if(a=s.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){s=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){s.label=p[1];break}if(p[0]===6&&s.label<a[1]){s.label=a[1],a=p;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(p);break}a[2]&&s.ops.pop(),s.trys.pop();continue}p=r.call(i,s)}catch(x){p=[6,x],f=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Iu=H&&H.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(H,"__esModule",{value:!0});H.emoji=H.mark=H.replaceTemplate=H.replaceFun=H.getLang=H.printn=H.getFolderSize=H.getVersion=H.getPid=H.aiRequest=H.getCredentialWithAll=H.getCredentialWithExisted=H.getProcessArgv=H.bgRed=H.yellow=H.red=void 0;var wy=Iu(require("path")),wr=Iu(require("fs")),Wt=Ou(),xy=Iu(require("os")),ct=yy(Rt()),Ay=Ru(),$c=Tc(),Di=ct.default.colors,Oy=ct.default.got,by=ct.default.getMAC,Sy=ct.default.isDocker,Ry=ct.default.isCiCdEnv,Iy=ct.default.getGlobalArgs,Dc=ct.default.getCredential,Pc=ct.default.getCredentialAliasList;H.red=Di.hex("#fd5750");H.yellow=Di.hex("#F3F99D");H.bgRed=Di.hex("#000").bgHex("#fd5750");var Cy=function(){var i=process.env.serverless_devs_temp_argv;try{var r=JSON.parse(i),s=Iy(r);return process.argv=process.argv.slice(0,2).concat(s._argsObj),(0,Wt.assign)({},s,{noHelpArgv:process.argv.slice(0,2).concat((0,Wt.filter)(s._argsObj,function(o){return!(0,Wt.includes)(["-h","--help"],o)}))})}catch{return{}}};H.getProcessArgv=Cy;var Ly=function(i){return xr(void 0,void 0,void 0,function(){var r,s;return Ar(this,function(o){switch(o.label){case 0:return[4,Pc()];case 1:return r=o.sent(),(0,Wt.includes)(r,i)?[4,Dc(i)]:[3,3];case 2:return s=o.sent(),[2,(0,Wt.omit)(s,"Alias")];case 3:return[2]}})})};H.getCredentialWithExisted=Ly;var Ty=function(){return xr(void 0,void 0,void 0,function(){var i,r,s,o,f,a;return Ar(this,function(d){switch(d.label){case 0:return[4,Pc()];case 1:if(i=d.sent(),!(i.length>0))return[3,6];r={},s=0,o=i,d.label=2;case 2:return s<o.length?(f=o[s],[4,Dc(f)]):[3,5];case 3:a=d.sent(),r[a.Alias]=(0,Wt.omit)(a,"Alias"),d.label=4;case 4:return s++,[3,2];case 5:return[2,r];case 6:return[2]}})})};H.getCredentialWithAll=Ty;var $y=function(i,r){return r===void 0&&(r="unknow"),xr(void 0,void 0,void 0,function(){var s,o,f,a;return Ar(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),s=(0,Ay.getConfig)("analysis"),s!=="enable"?[2]:Sy()||Ry()?[2]:[4,Oy("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(r,"&code=TypeError&s=").concat(i),{timeout:2e3,json:!0})];case 1:return o=d.sent(),f=(0,Wt.get)(o.body,"shorturl"),f&&console.log(`AI Tips:
|
|
34
|
+
}`;var B=pl(function(){return Z(h,N+"return "+S).apply(i,g)});if(B.source=S,Ys(B))throw B;return B}function tv(e){return J(e).toLowerCase()}function nv(e){return J(e).toUpperCase()}function rv(e,t,n){if(e=J(e),e&&(n||t===i))return xo(e);if(!e||!(t=Ne(t)))return e;var u=tt(e),l=tt(t),h=Ao(u,l),g=Oo(u,l)+1;return Ft(u,h,g).join("")}function iv(e,t,n){if(e=J(e),e&&(n||t===i))return e.slice(0,So(e)+1);if(!e||!(t=Ne(t)))return e;var u=tt(e),l=Oo(u,tt(t))+1;return Ft(u,0,l).join("")}function sv(e,t,n){if(e=J(e),e&&(n||t===i))return e.replace(Yi,"");if(!e||!(t=Ne(t)))return e;var u=tt(e),l=Ao(u,tt(t));return Ft(u,l).join("")}function uv(e,t){var n=Qc,u=eh;if(ie(t)){var l="separator"in t?t.separator:l;n="length"in t?U(t.length):n,u="omission"in t?Ne(t.omission):u}e=J(e);var h=e.length;if(gn(e)){var g=tt(e);h=g.length}if(n>=h)return e;var _=n-dn(u);if(_<1)return u;var v=g?Ft(g,0,_).join(""):e.slice(0,_);if(l===i)return v+u;if(g&&(_+=v.length-_),Ks(l)){if(e.slice(_).search(l)){var O,b=v;for(l.global||(l=cs(l.source,J(Bu.exec(l))+"g")),l.lastIndex=0;O=l.exec(b);)var S=O.index;v=v.slice(0,S===i?_:S)}}else if(e.indexOf(Ne(l),_)!=_){var I=v.lastIndexOf(l);I>-1&&(v=v.slice(0,I))}return v+u}function ov(e){return e=J(e),e&&vh.test(e)?e.replace(Wu,qp):e}var av=wn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),ks=ga("toUpperCase");function hl(e,t,n){return e=J(e),t=n?i:t,t===i?Tp(e)?Hp(e):xp(e):e.match(t)||[]}var pl=X(function(e,t){try{return De(e,i,t)}catch(n){return Ys(n)?n:new W(n)}}),lv=yt(function(e,t){return Ue(t,function(n){n=lt(n),vt(e,n,zs(e[n],e))}),e});function fv(e){var t=e==null?0:e.length,n=q();return e=t?re(e,function(u){if(typeof u[1]!="function")throw new Be(f);return[n(u[0]),u[1]]}):[],X(function(u){for(var l=-1;++l<t;){var h=e[l];if(De(h[0],this,u))return De(h[1],this,u)}})}function cv(e){return qg(Xe(e,p))}function Qs(e){return function(){return e}}function hv(e,t){return e==null||e!==e?t:e}var pv=_a(),gv=_a(!0);function Le(e){return e}function eu(e){return zo(typeof e=="function"?e:Xe(e,p))}function dv(e){return Yo(Xe(e,p))}function _v(e,t){return Ko(e,Xe(t,p))}var mv=X(function(e,t){return function(n){return kn(n,e,t)}}),vv=X(function(e,t){return function(n){return kn(e,n,t)}});function tu(e,t,n){var u=pe(t),l=kr(t,u);n==null&&!(ie(t)&&(l.length||!u.length))&&(n=t,t=e,e=this,l=kr(t,pe(t)));var h=!(ie(n)&&"chain"in n)||!!n.chain,g=xt(e);return Ue(l,function(_){var v=t[_];e[_]=v,g&&(e.prototype[_]=function(){var O=this.__chain__;if(h||O){var b=e(this.__wrapped__),S=b.__actions__=Re(this.__actions__);return S.push({func:v,args:arguments,thisArg:e}),b.__chain__=O,b}return v.apply(e,Lt([this.value()],arguments))})}),e}function Ev(){return he._===this&&(he._=Xp),this}function nu(){}function yv(e){return e=U(e),X(function(t){return Zo(t,e)})}var wv=Ds(re),xv=Ds(mo),Av=Ds(is);function gl(e){return Ws(e)?ss(lt(e)):Qg(e)}function Ov(e){return function(t){return e==null?i:Kt(e,t)}}var bv=va(),Sv=va(!0);function ru(){return[]}function iu(){return!1}function Rv(){return{}}function Iv(){return""}function Cv(){return!0}function Lv(e,t){if(e=U(e),e<1||e>It)return[];var n=ut,u=ve(e,ut);t=q(t),e-=ut;for(var l=as(u,t);++n<e;)t(n);return l}function Tv(e){return G(e)?re(e,lt):qe(e)?[e]:Re(Pa(J(e)))}function $v(e){var t=++Bp;return J(e)+t}var Dv=ii(function(e,t){return e+t},0),Pv=Ps("ceil"),Nv=ii(function(e,t){return e/t},1),qv=Ps("floor");function Fv(e){return e&&e.length?Jr(e,Le,Es):i}function Mv(e,t){return e&&e.length?Jr(e,q(t,2),Es):i}function Hv(e){return yo(e,Le)}function Wv(e,t){return yo(e,q(t,2))}function Gv(e){return e&&e.length?Jr(e,Le,As):i}function Uv(e,t){return e&&e.length?Jr(e,q(t,2),As):i}var Bv=ii(function(e,t){return e*t},1),jv=Ps("round"),Xv=ii(function(e,t){return e-t},0);function zv(e){return e&&e.length?os(e,Le):0}function Vv(e,t){return e&&e.length?os(e,q(t,2)):0}return c.after=d0,c.ary=Xa,c.assign=nm,c.assignIn=sl,c.assignInWith=mi,c.assignWith=rm,c.at=im,c.before=za,c.bind=zs,c.bindAll=lv,c.bindKey=Va,c.castArray=R0,c.chain=Ua,c.chunk=qd,c.compact=Fd,c.concat=Md,c.cond=fv,c.conforms=cv,c.constant=Qs,c.countBy=z_,c.create=sm,c.curry=Ya,c.curryRight=Ka,c.debounce=Za,c.defaults=um,c.defaultsDeep=om,c.defer=_0,c.delay=m0,c.difference=Hd,c.differenceBy=Wd,c.differenceWith=Gd,c.drop=Ud,c.dropRight=Bd,c.dropRightWhile=jd,c.dropWhile=Xd,c.fill=zd,c.filter=Y_,c.flatMap=J_,c.flatMapDeep=k_,c.flatMapDepth=Q_,c.flatten=Ma,c.flattenDeep=Vd,c.flattenDepth=Yd,c.flip=v0,c.flow=pv,c.flowRight=gv,c.fromPairs=Kd,c.functions=gm,c.functionsIn=dm,c.groupBy=e0,c.initial=Jd,c.intersection=kd,c.intersectionBy=Qd,c.intersectionWith=e_,c.invert=mm,c.invertBy=vm,c.invokeMap=n0,c.iteratee=eu,c.keyBy=r0,c.keys=pe,c.keysIn=Ce,c.map=ci,c.mapKeys=ym,c.mapValues=wm,c.matches=dv,c.matchesProperty=_v,c.memoize=pi,c.merge=xm,c.mergeWith=ul,c.method=mv,c.methodOf=vv,c.mixin=tu,c.negate=gi,c.nthArg=yv,c.omit=Am,c.omitBy=Om,c.once=E0,c.orderBy=i0,c.over=wv,c.overArgs=y0,c.overEvery=xv,c.overSome=Av,c.partial=Vs,c.partialRight=Ja,c.partition=s0,c.pick=bm,c.pickBy=ol,c.property=gl,c.propertyOf=Ov,c.pull=i_,c.pullAll=Wa,c.pullAllBy=s_,c.pullAllWith=u_,c.pullAt=o_,c.range=bv,c.rangeRight=Sv,c.rearg=w0,c.reject=a0,c.remove=a_,c.rest=x0,c.reverse=js,c.sampleSize=f0,c.set=Rm,c.setWith=Im,c.shuffle=c0,c.slice=l_,c.sortBy=g0,c.sortedUniq=__,c.sortedUniqBy=m_,c.split=Jm,c.spread=A0,c.tail=v_,c.take=E_,c.takeRight=y_,c.takeRightWhile=w_,c.takeWhile=x_,c.tap=F_,c.throttle=O0,c.thru=fi,c.toArray=nl,c.toPairs=al,c.toPairsIn=ll,c.toPath=Tv,c.toPlainObject=il,c.transform=Cm,c.unary=b0,c.union=A_,c.unionBy=O_,c.unionWith=b_,c.uniq=S_,c.uniqBy=R_,c.uniqWith=I_,c.unset=Lm,c.unzip=Xs,c.unzipWith=Ga,c.update=Tm,c.updateWith=$m,c.values=On,c.valuesIn=Dm,c.without=C_,c.words=hl,c.wrap=S0,c.xor=L_,c.xorBy=T_,c.xorWith=$_,c.zip=D_,c.zipObject=P_,c.zipObjectDeep=N_,c.zipWith=q_,c.entries=al,c.entriesIn=ll,c.extend=sl,c.extendWith=mi,tu(c,c),c.add=Dv,c.attempt=pl,c.camelCase=Fm,c.capitalize=fl,c.ceil=Pv,c.clamp=Pm,c.clone=I0,c.cloneDeep=L0,c.cloneDeepWith=T0,c.cloneWith=C0,c.conformsTo=$0,c.deburr=cl,c.defaultTo=hv,c.divide=Nv,c.endsWith=Mm,c.eq=rt,c.escape=Hm,c.escapeRegExp=Wm,c.every=V_,c.find=K_,c.findIndex=qa,c.findKey=am,c.findLast=Z_,c.findLastIndex=Fa,c.findLastKey=lm,c.floor=qv,c.forEach=Ba,c.forEachRight=ja,c.forIn=fm,c.forInRight=cm,c.forOwn=hm,c.forOwnRight=pm,c.get=Zs,c.gt=D0,c.gte=P0,c.has=_m,c.hasIn=Js,c.head=Ha,c.identity=Le,c.includes=t0,c.indexOf=Zd,c.inRange=Nm,c.invoke=Em,c.isArguments=kt,c.isArray=G,c.isArrayBuffer=N0,c.isArrayLike=Ie,c.isArrayLikeObject=ue,c.isBoolean=q0,c.isBuffer=Mt,c.isDate=F0,c.isElement=M0,c.isEmpty=H0,c.isEqual=W0,c.isEqualWith=G0,c.isError=Ys,c.isFinite=U0,c.isFunction=xt,c.isInteger=ka,c.isLength=di,c.isMap=Qa,c.isMatch=B0,c.isMatchWith=j0,c.isNaN=X0,c.isNative=z0,c.isNil=Y0,c.isNull=V0,c.isNumber=el,c.isObject=ie,c.isObjectLike=se,c.isPlainObject=ir,c.isRegExp=Ks,c.isSafeInteger=K0,c.isSet=tl,c.isString=_i,c.isSymbol=qe,c.isTypedArray=An,c.isUndefined=Z0,c.isWeakMap=J0,c.isWeakSet=k0,c.join=t_,c.kebabCase=Gm,c.last=Ve,c.lastIndexOf=n_,c.lowerCase=Um,c.lowerFirst=Bm,c.lt=Q0,c.lte=em,c.max=Fv,c.maxBy=Mv,c.mean=Hv,c.meanBy=Wv,c.min=Gv,c.minBy=Uv,c.stubArray=ru,c.stubFalse=iu,c.stubObject=Rv,c.stubString=Iv,c.stubTrue=Cv,c.multiply=Bv,c.nth=r_,c.noConflict=Ev,c.noop=nu,c.now=hi,c.pad=jm,c.padEnd=Xm,c.padStart=zm,c.parseInt=Vm,c.random=qm,c.reduce=u0,c.reduceRight=o0,c.repeat=Ym,c.replace=Km,c.result=Sm,c.round=jv,c.runInContext=m,c.sample=l0,c.size=h0,c.snakeCase=Zm,c.some=p0,c.sortedIndex=f_,c.sortedIndexBy=c_,c.sortedIndexOf=h_,c.sortedLastIndex=p_,c.sortedLastIndexBy=g_,c.sortedLastIndexOf=d_,c.startCase=km,c.startsWith=Qm,c.subtract=Xv,c.sum=zv,c.sumBy=Vv,c.template=ev,c.times=Lv,c.toFinite=At,c.toInteger=U,c.toLength=rl,c.toLower=tv,c.toNumber=Ye,c.toSafeInteger=tm,c.toString=J,c.toUpper=nv,c.trim=rv,c.trimEnd=iv,c.trimStart=sv,c.truncate=uv,c.unescape=ov,c.uniqueId=$v,c.upperCase=av,c.upperFirst=ks,c.each=Ba,c.eachRight=ja,c.first=Ha,tu(c,function(){var e={};return ot(c,function(t,n){k.call(c.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),c.VERSION=r,Ue(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){c[e].placeholder=c}),Ue(["drop","take"],function(e,t){V.prototype[e]=function(n){n=n===i?1:fe(U(n),0);var u=this.__filtered__&&!t?new V(this):this.clone();return u.__filtered__?u.__takeCount__=ve(n,u.__takeCount__):u.__views__.push({size:ve(n,ut),type:e+(u.__dir__<0?"Right":"")}),u},V.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Ue(["filter","map","takeWhile"],function(e,t){var n=t+1,u=n==Fu||n==ih;V.prototype[e]=function(l){var h=this.clone();return h.__iteratees__.push({iteratee:q(l,3),type:n}),h.__filtered__=h.__filtered__||u,h}}),Ue(["head","last"],function(e,t){var n="take"+(t?"Right":"");V.prototype[e]=function(){return this[n](1).value()[0]}}),Ue(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");V.prototype[e]=function(){return this.__filtered__?new V(this):this[n](1)}}),V.prototype.compact=function(){return this.filter(Le)},V.prototype.find=function(e){return this.filter(e).head()},V.prototype.findLast=function(e){return this.reverse().find(e)},V.prototype.invokeMap=X(function(e,t){return typeof e=="function"?new V(this):this.map(function(n){return kn(n,e,t)})}),V.prototype.reject=function(e){return this.filter(gi(q(e)))},V.prototype.slice=function(e,t){e=U(e);var n=this;return n.__filtered__&&(e>0||t<0)?new V(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(t=U(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},V.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},V.prototype.toArray=function(){return this.take(ut)},ot(V.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),u=/^(?:head|last)$/.test(t),l=c[u?"take"+(t=="last"?"Right":""):t],h=u||/^find/.test(t);!l||(c.prototype[t]=function(){var g=this.__wrapped__,_=u?[1]:arguments,v=g instanceof V,O=_[0],b=v||G(g),S=function(z){var Y=l.apply(c,Lt([z],_));return u&&I?Y[0]:Y};b&&n&&typeof O=="function"&&O.length!=1&&(v=b=!1);var I=this.__chain__,N=!!this.__actions__.length,F=h&&!I,B=v&&!N;if(!h&&b){g=B?g:new V(this);var M=e.apply(g,_);return M.__actions__.push({func:fi,args:[S],thisArg:i}),new je(M,I)}return F&&B?e.apply(this,_):(M=this.thru(S),F?u?M.value()[0]:M.value():M)})}),Ue(["pop","push","shift","sort","splice","unshift"],function(e){var t=qr[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",u=/^(?:pop|shift)$/.test(e);c.prototype[e]=function(){var l=arguments;if(u&&!this.__chain__){var h=this.value();return t.apply(G(h)?h:[],l)}return this[n](function(g){return t.apply(G(g)?g:[],l)})}}),ot(V.prototype,function(e,t){var n=c[t];if(n){var u=n.name+"";k.call(vn,u)||(vn[u]=[]),vn[u].push({name:t,func:n})}}),vn[ri(i,ke).name]=[{name:"wrapper",func:i}],V.prototype.clone=og,V.prototype.reverse=ag,V.prototype.value=lg,c.prototype.at=M_,c.prototype.chain=H_,c.prototype.commit=W_,c.prototype.next=G_,c.prototype.plant=B_,c.prototype.reverse=j_,c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=X_,c.prototype.first=c.prototype.head,Xn&&(c.prototype[Xn]=U_),c},$t=Wp();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(he._=$t,define(function(){return $t})):jt?((jt.exports=$t)._=$t,es._=$t):he._=$t}).call(In)});var Ru=L(Te=>{"use strict";var cy=Te&&Te.__awaiter||function(i,r,s,o){function f(a){return a instanceof s?a:new s(function(d){d(a)})}return new(s||(s=Promise))(function(a,d){function E(x){try{p(o.next(x))}catch(R){d(R)}}function y(x){try{p(o.throw(x))}catch(R){d(R)}}function p(x){x.done?a(x.value):f(x.value).then(E,y)}p((o=o.apply(i,r||[])).next())})},hy=Te&&Te.__generator||function(i,r){var s={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,f,a,d;return d={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function E(p){return function(x){return y([p,x])}}function y(p){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,f&&(a=p[0]&2?f.return:p[0]?f.throw||((a=f.return)&&a.call(f),0):f.next)&&!(a=a.call(f,p[1])).done)return a;switch(f=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return s.label++,{value:p[1],done:!1};case 5:s.label++,f=p[1],p=[0];continue;case 7:p=s.ops.pop(),s.trys.pop();continue;default:if(a=s.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){s=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){s.label=p[1];break}if(p[0]===6&&s.label<a[1]){s.label=a[1],a=p;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(p);break}a[2]&&s.ops.pop(),s.trys.pop();continue}p=r.call(i,s)}catch(x){p=[6,x],f=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Rc=Te&&Te.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Te,"__esModule",{value:!0});Te.handlerProfileFile=Te.getConfig=Te.setConfig=void 0;var Ic=Rc(require("path")),Su=Rc(Rt()),ft=Su.default.fse,$i=Su.default.jsyaml,bu=Su.default.getRootHome;function py(i){var r=Lc();ft.writeFileSync(r,$i.dump(i))}function Cc(){var i=Lc();if(!ft.existsSync(i))return{};try{var r=$i.load(ft.readFileSync(i,"utf8"))||{};return r}catch(s){throw s}}function Lc(){var i=Ic.default.join(bu(),"set-config.yml");return ft.existsSync(i)||ft.createFileSync(i),i}function gy(i,r){var s=Cc();s[i]=r,py(s)}Te.setConfig=gy;function dy(i,r){var s=Cc();return s[i]||r}Te.getConfig=dy;function _y(i){return cy(this,void 0,void 0,function(){var r,s,o,f,a,d,E;return hy(this,function(y){switch(y.label){case 0:if(r=i.filePath||"set-config.yml",s=Ic.default.join(bu(),r),o=ft.existsSync(s),f={},o)return[3,5];a=bu(),y.label=1;case 1:return y.trys.push([1,2,,4]),ft.statSync(a),[3,4];case 2:return d=y.sent(),[4,ft.mkdirSync(a)];case 3:return y.sent(),[3,4];case 4:return[3,6];case 5:try{f=$i.load(ft.readFileSync(s,"utf8"))||{}}catch(p){throw p}y.label=6;case 6:return i.read?[2,f]:(E=i.configKey||"",f[E]=i.data,[4,ft.writeFileSync(s,$i.dump(f))]);case 7:return y.sent(),[2,f]}})})}Te.handlerProfileFile=_y});var Tc=L((Xx,my)=>{my.exports={name:"@serverless-devs/s",version:"2.0.100-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/lodash":"^4.14.168","@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",lodash:"^4.17.20","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","tty-table":"^4.1.5",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},dependencies:{"@serverless-devs/core":"beta"}}});var Pi=L(H=>{"use strict";var vy=H&&H.__createBinding||(Object.create?function(i,r,s,o){o===void 0&&(o=s),Object.defineProperty(i,o,{enumerable:!0,get:function(){return r[s]}})}:function(i,r,s,o){o===void 0&&(o=s),i[o]=r[s]}),Ey=H&&H.__setModuleDefault||(Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r}),yy=H&&H.__importStar||function(i){if(i&&i.__esModule)return i;var r={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&vy(r,i,s);return Ey(r,i),r},xr=H&&H.__awaiter||function(i,r,s,o){function f(a){return a instanceof s?a:new s(function(d){d(a)})}return new(s||(s=Promise))(function(a,d){function E(x){try{p(o.next(x))}catch(R){d(R)}}function y(x){try{p(o.throw(x))}catch(R){d(R)}}function p(x){x.done?a(x.value):f(x.value).then(E,y)}p((o=o.apply(i,r||[])).next())})},Ar=H&&H.__generator||function(i,r){var s={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,f,a,d;return d={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function E(p){return function(x){return y([p,x])}}function y(p){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,f&&(a=p[0]&2?f.return:p[0]?f.throw||((a=f.return)&&a.call(f),0):f.next)&&!(a=a.call(f,p[1])).done)return a;switch(f=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return s.label++,{value:p[1],done:!1};case 5:s.label++,f=p[1],p=[0];continue;case 7:p=s.ops.pop(),s.trys.pop();continue;default:if(a=s.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){s=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){s.label=p[1];break}if(p[0]===6&&s.label<a[1]){s.label=a[1],a=p;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(p);break}a[2]&&s.ops.pop(),s.trys.pop();continue}p=r.call(i,s)}catch(x){p=[6,x],f=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Iu=H&&H.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(H,"__esModule",{value:!0});H.emoji=H.mark=H.replaceTemplate=H.replaceFun=H.getLang=H.printn=H.getFolderSize=H.getVersion=H.getPid=H.aiRequest=H.getCredentialWithAll=H.getCredentialWithExisted=H.getProcessArgv=H.bgRed=H.yellow=H.red=void 0;var wy=Iu(require("path")),wr=Iu(require("fs")),Wt=Ou(),xy=Iu(require("os")),ct=yy(Rt()),Ay=Ru(),$c=Tc(),Di=ct.default.colors,Oy=ct.default.got,by=ct.default.getMAC,Sy=ct.default.isDocker,Ry=ct.default.isCiCdEnv,Iy=ct.default.getGlobalArgs,Dc=ct.default.getCredential,Pc=ct.default.getCredentialAliasList;H.red=Di.hex("#fd5750");H.yellow=Di.hex("#F3F99D");H.bgRed=Di.hex("#000").bgHex("#fd5750");var Cy=function(){var i=process.env.serverless_devs_temp_argv;try{var r=JSON.parse(i),s=Iy(r);return process.argv=process.argv.slice(0,2).concat(s._argsObj),(0,Wt.assign)({},s,{noHelpArgv:process.argv.slice(0,2).concat((0,Wt.filter)(s._argsObj,function(o){return!(0,Wt.includes)(["-h","--help"],o)}))})}catch{return{}}};H.getProcessArgv=Cy;var Ly=function(i){return xr(void 0,void 0,void 0,function(){var r,s;return Ar(this,function(o){switch(o.label){case 0:return[4,Pc()];case 1:return r=o.sent(),(0,Wt.includes)(r,i)?[4,Dc(i)]:[3,3];case 2:return s=o.sent(),[2,(0,Wt.omit)(s,"Alias")];case 3:return[2]}})})};H.getCredentialWithExisted=Ly;var Ty=function(){return xr(void 0,void 0,void 0,function(){var i,r,s,o,f,a;return Ar(this,function(d){switch(d.label){case 0:return[4,Pc()];case 1:if(i=d.sent(),!(i.length>0))return[3,6];r={},s=0,o=i,d.label=2;case 2:return s<o.length?(f=o[s],[4,Dc(f)]):[3,5];case 3:a=d.sent(),r[a.Alias]=(0,Wt.omit)(a,"Alias"),d.label=4;case 4:return s++,[3,2];case 5:return[2,r];case 6:return[2]}})})};H.getCredentialWithAll=Ty;var $y=function(i,r){return r===void 0&&(r="unknow"),xr(void 0,void 0,void 0,function(){var s,o,f,a;return Ar(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),s=(0,Ay.getConfig)("analysis"),s!=="enable"?[2]:Sy()||Ry()?[2]:[4,Oy("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(r,"&code=TypeError&s=").concat(i),{timeout:2e3,json:!0})];case 1:return o=d.sent(),f=(0,Wt.get)(o.body,"shorturl"),f&&console.log(`AI Tips:
|
|
35
35
|
You can try to solve the problem through: `.concat(Di.underline(f),`
|
|
36
36
|
`)),[3,3];case 2:return a=d.sent(),[3,3];case 3:return[2]}})})};H.aiRequest=$y;var Dy=function(){try{return by().replace(/:/g,"")}catch{return"unknown"}};H.getPid=Dy;function Py(){var i=(0,ct.getCoreVersion)(),r="".concat(process.platform,"-").concat(process.arch),s="node-".concat(process.version),o="core: ".concat(i),f="s-home: ".concat(ct.default.getRootHome()),a="".concat($c.name,": ").concat($c.version);return i?"".concat(a,", ").concat(o,", ").concat(f,", ").concat(r,", ").concat(s):"".concat(a,", ").concat(f,", ").concat(r,", ").concat(s)}H.getVersion=Py;function Ny(i){return xr(this,void 0,void 0,function(){function r(f){return xr(this,void 0,void 0,function(){var a,d;return Ar(this,function(E){switch(E.label){case 0:return a=wr.default.lstatSync(f),typeof a!="object"?[2]:(s.set(a.ino,a.size),a.isDirectory()?(d=wr.default.readdirSync(f),typeof d!="object"?[2]:[4,Promise.all(d.map(function(y){return r(wy.default.join(f,y))}))]):[3,2]);case 1:E.sent(),E.label=2;case 2:return[2]}})})}var s,o;return Ar(this,function(f){switch(f.label){case 0:return s=new Map,[4,r(i)];case 1:return f.sent(),o=Array.from(s.values()).reduce(function(a,d){return a+d},0),[2,o]}})})}H.getFolderSize=Ny;function qy(i,r){r===void 0&&(r=" ");for(var s="",o=0;o<i;o++)s=s+r;return s}H.printn=qy;function Fy(){return"en"}H.getLang=Fy;function Nc(i,r){var s=/\{\{(.*?)\}\}/g,o=i.match(s);if(o)for(var f=0;f<o.length;f++){var a=o[f].replace(/{{|}}/g,""),d=(0,Wt.trim)(a.split("|")[0]);r[d]&&(i=i.replace(o[f],r[d]))}return i}H.replaceFun=Nc;function My(i,r){i.forEach(function(s){if(wr.default.existsSync(s)){var o=wr.default.readFileSync(s,"utf-8"),f=Nc(o,r);wr.default.writeFileSync(s,f,"utf-8")}})}H.replaceTemplate=My;function Hy(i){if(!i)return i;var r=i.slice(-4);return"***********".concat(r)}H.mark=Hy;function Wy(i,r){return xy.default.platform()==="win32"?r||"\u25C6":"".concat(i," ")}H.emoji=Wy});var qc=L(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.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 Fc=L(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});Lu.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 Hc=L(Or=>{"use strict";var Mc=Or&&Or.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Or,"__esModule",{value:!0});var Gy=Pi(),Uy=Mc(qc()),By=Mc(Fc()),Tu={en:By.default,zh:Uy.default},jy=function(i){var r=(0,Gy.getLang)(),s=Tu[r]?Tu[r][i]:Tu.en[i];return s||i};Or.default=jy});var Du=L(xe=>{"use strict";var Xy=xe&&xe.__createBinding||(Object.create?function(i,r,s,o){o===void 0&&(o=s),Object.defineProperty(i,o,{enumerable:!0,get:function(){return r[s]}})}:function(i,r,s,o){o===void 0&&(o=s),i[o]=r[s]}),Wc=xe&&xe.__exportStar||function(i,r){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(r,s)&&Xy(r,i,s)},$u=xe&&xe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(xe,"__esModule",{value:!0});xe.registerCommandChecker=xe.i18n=xe.logger=void 0;var zy=$u(Au());Wc(Pi(),xe);Wc(Ru(),xe);var Vy=Au();Object.defineProperty(xe,"logger",{enumerable:!0,get:function(){return $u(Vy).default}});var Yy=Hc();Object.defineProperty(xe,"i18n",{enumerable:!0,get:function(){return $u(Yy).default}});function Ky(i){i.on("command:*",function(r){var s=i.commands.map(function(o){return o.name()});s.includes(r[0])||(zy.default.error(" error: unknown command ".concat(r[0])),i.help())})}xe.registerCommandChecker=Ky});var on=L(Cn=>{"use strict";var Zy=Cn&&Cn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.ServerlessError=void 0;var Jy=Zy(Rt()),ky=Jy.default.Logger,Qy=new ky("S-CLI-ERROR"),ew=function(){function i(r,s,o){Qy.error(r+": "+s,o),process.exit(1)}return i}();Cn.ServerlessError=ew});var Gc=L(Ln=>{"use strict";var tw=Ln&&Ln.__extends||function(){var i=function(r,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,f){o.__proto__=f}||function(o,f){for(var a in f)Object.prototype.hasOwnProperty.call(f,a)&&(o[a]=f[a])},i(r,s)};return function(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(r,s);function o(){this.constructor=r}r.prototype=s===null?Object.create(s):(o.prototype=s.prototype,new o)}}();Object.defineProperty(Ln,"__esModule",{value:!0});Ln.CommandError=void 0;var nw=on(),rw=function(i){tw(r,i);function r(s,o){return i.call(this,"Error",s,o)||this}return r}(nw.ServerlessError);Ln.CommandError=rw});var Uc=L(Tn=>{"use strict";var iw=Tn&&Tn.__extends||function(){var i=function(r,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,f){o.__proto__=f}||function(o,f){for(var a in f)Object.prototype.hasOwnProperty.call(f,a)&&(o[a]=f[a])},i(r,s)};return function(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(r,s);function o(){this.constructor=r}r.prototype=s===null?Object.create(s):(o.prototype=s.prototype,new o)}}();Object.defineProperty(Tn,"__esModule",{value:!0});Tn.ConfigDeleteError=void 0;var sw=on(),uw=function(i){iw(r,i);function r(s,o){return i.call(this,"Deletion failed",s,o)||this}return r}(sw.ServerlessError);Tn.ConfigDeleteError=uw});var Bc=L($n=>{"use strict";var ow=$n&&$n.__extends||function(){var i=function(r,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,f){o.__proto__=f}||function(o,f){for(var a in f)Object.prototype.hasOwnProperty.call(f,a)&&(o[a]=f[a])},i(r,s)};return function(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(r,s);function o(){this.constructor=r}r.prototype=s===null?Object.create(s):(o.prototype=s.prototype,new o)}}();Object.defineProperty($n,"__esModule",{value:!0});$n.ConfigError=void 0;var aw=on(),lw=function(i){ow(r,i);function r(s,o){return i.call(this,"Config failed",s,o)||this}return r}(aw.ServerlessError);$n.ConfigError=lw});var jc=L(Dn=>{"use strict";var fw=Dn&&Dn.__extends||function(){var i=function(r,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,f){o.__proto__=f}||function(o,f){for(var a in f)Object.prototype.hasOwnProperty.call(f,a)&&(o[a]=f[a])},i(r,s)};return function(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(r,s);function o(){this.constructor=r}r.prototype=s===null?Object.create(s):(o.prototype=s.prototype,new o)}}();Object.defineProperty(Dn,"__esModule",{value:!0});Dn.ConfigGetError=void 0;var cw=on(),hw=function(i){fw(r,i);function r(s,o){return i.call(this,"Get failed",s,o)||this}return r}(cw.ServerlessError);Dn.ConfigGetError=hw});var Xc=L(Pn=>{"use strict";var pw=Pn&&Pn.__extends||function(){var i=function(r,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,f){o.__proto__=f}||function(o,f){for(var a in f)Object.prototype.hasOwnProperty.call(f,a)&&(o[a]=f[a])},i(r,s)};return function(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(r,s);function o(){this.constructor=r}r.prototype=s===null?Object.create(s):(o.prototype=s.prototype,new o)}}();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.InitError=void 0;var gw=on(),dw=function(i){pw(r,i);function r(s,o){return i.call(this,"Initialization failed",s,o)||this}return r}(gw.ServerlessError);Pn.InitError=dw});var Vc=L(ht=>{"use strict";var _w=ht&&ht.__awaiter||function(i,r,s,o){function f(a){return a instanceof s?a:new s(function(d){d(a)})}return new(s||(s=Promise))(function(a,d){function E(x){try{p(o.next(x))}catch(R){d(R)}}function y(x){try{p(o.throw(x))}catch(R){d(R)}}function p(x){x.done?a(x.value):f(x.value).then(E,y)}p((o=o.apply(i,r||[])).next())})},mw=ht&&ht.__generator||function(i,r){var s={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,f,a,d;return d={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function E(p){return function(x){return y([p,x])}}function y(p){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,f&&(a=p[0]&2?f.return:p[0]?f.throw||((a=f.return)&&a.call(f),0):f.next)&&!(a=a.call(f,p[1])).done)return a;switch(f=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return s.label++,{value:p[1],done:!1};case 5:s.label++,f=p[1],p=[0];continue;case 7:p=s.ops.pop(),s.trys.pop();continue;default:if(a=s.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){s=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){s.label=p[1];break}if(p[0]===6&&s.label<a[1]){s.label=a[1],a=p;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(p);break}a[2]&&s.ops.pop(),s.trys.pop();continue}p=r.call(i,s)}catch(x){p=[6,x],f=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},vw=ht&&ht.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ht,"__esModule",{value:!0});ht.HumanError=void 0;var zc=vw(Rt()),Ew=Pi(),yw=zc.default.colors,ww=function(){function i(r){var s=r.errorMessage,o=r.tips;this.errorMessage=s,console.log(`
|
|
37
37
|
`.concat((0,Ew.bgRed)("ERROR:"))),console.log("TypeError: ".concat(s,`
|
package/lib/component/index.js
CHANGED
|
@@ -31,7 +31,7 @@ __p += '`),Y&&(O+=`' +
|
|
|
31
31
|
function print() { __p += __j.call(arguments, '') }
|
|
32
32
|
`:`;
|
|
33
33
|
`)+O+`return __p
|
|
34
|
-
}`;var U=Al(function(){return J(h,N+"return "+O).apply(i,g)});if(U.source=O,lo(U))throw U;return U}function lv(e){return k(e).toLowerCase()}function cv(e){return k(e).toUpperCase()}function fv(e,t,n){if(e=k(e),e&&(n||t===i))return Pu(e);if(!e||!(t=We(t)))return e;var o=st(e),l=st(t),h=$u(o,l),g=Nu(o,l)+1;return zt(o,h,g).join("")}function hv(e,t,n){if(e=k(e),e&&(n||t===i))return e.slice(0,Fu(e)+1);if(!e||!(t=We(t)))return e;var o=st(e),l=Nu(o,st(t))+1;return zt(o,0,l).join("")}function pv(e,t,n){if(e=k(e),e&&(n||t===i))return e.replace(ls,"");if(!e||!(t=We(t)))return e;var o=st(e),l=$u(o,st(t));return zt(o,l).join("")}function gv(e,t){var n=Hr,o=Qt;if(oe(t)){var l="separator"in t?t.separator:l;n="length"in t?B(t.length):n,o="omission"in t?We(t.omission):o}e=k(e);var h=e.length;if(An(e)){var g=st(e);h=g.length}if(n>=h)return e;var _=n-Sn(o);if(_<1)return o;var v=g?zt(g,0,_).join(""):e.slice(0,_);if(l===i)return v+o;if(g&&(_+=v.length-_),co(l)){if(e.slice(_).search(l)){var A,S=v;for(l.global||(l=Os(l.source,k(tu.exec(l))+"g")),l.lastIndex=0;A=l.exec(S);)var O=A.index;v=v.slice(0,O===i?_:O)}}else if(e.indexOf(We(l),_)!=_){var C=v.lastIndexOf(l);C>-1&&(v=v.slice(0,C))}return v+o}function dv(e){return e=k(e),e&&Oh.test(e)?e.replace(ko,jp):e}var _v=Tn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),po=Sa("toUpperCase");function bl(e,t,n){return e=k(e),t=n?i:t,t===i?Hp(e)?Xp(e):Lp(e):e.match(t)||[]}var Al=z(function(e,t){try{return Me(e,i,t)}catch(n){return lo(n)?n:new W(n)}}),mv=It(function(e,t){return Xe(t,function(n){n=yt(n),Rt(e,n,uo(e[n],e))}),e});function vv(e){var t=e==null?0:e.length,n=q();return e=t?se(e,function(o){if(typeof o[1]!="function")throw new Ye(c);return[n(o[0]),o[1]]}):[],z(function(o){for(var l=-1;++l<t;){var h=e[l];if(Me(h[0],this,o))return Me(h[1],this,o)}})}function yv(e){return jg(Ze(e,p))}function go(e){return function(){return e}}function Ev(e,t){return e==null||e!==e?t:e}var wv=Ra(),xv=Ra(!0);function Ne(e){return e}function _o(e){return ra(typeof e=="function"?e:Ze(e,p))}function bv(e){return sa(Ze(e,p))}function Av(e,t){return oa(e,Ze(t,p))}var Sv=z(function(e,t){return function(n){return lr(n,e,t)}}),Ov=z(function(e,t){return function(n){return lr(e,n,t)}});function mo(e,t,n){var o=me(t),l=pi(t,o);n==null&&!(oe(t)&&(l.length||!o.length))&&(n=t,t=e,e=this,l=pi(t,me(t)));var h=!(oe(n)&&"chain"in n)||!!n.chain,g=Tt(e);return Xe(l,function(_){var v=t[_];e[_]=v,g&&(e.prototype[_]=function(){var A=this.__chain__;if(h||A){var S=e(this.__wrapped__),O=S.__actions__=De(this.__actions__);return O.push({func:v,args:arguments,thisArg:e}),S.__chain__=A,S}return v.apply(e,Mt([this.value()],arguments))})}),e}function Rv(){return _e._===this&&(_e._=Qp),this}function vo(){}function Cv(e){return e=B(e),z(function(t){return ua(t,e)})}var Iv=Ys(se),Lv=Ys(Cu),Tv=Ys(ys);function Sl(e){return to(e)?Es(yt(e)):ud(e)}function Dv(e){return function(t){return e==null?i:un(e,t)}}var Pv=Ia(),$v=Ia(!0);function yo(){return[]}function Eo(){return!1}function Nv(){return{}}function qv(){return""}function Fv(){return!0}function Mv(e,t){if(e=B(e),e<1||e>K)return[];var n=_t,o=xe(e,_t);t=q(t),e-=_t;for(var l=bs(o,t);++n<e;)t(n);return l}function Hv(e){return G(e)?se(e,yt):Ge(e)?[e]:De(za(k(e)))}function Wv(e){var t=++Jp;return k(e)+t}var Gv=yi(function(e,t){return e+t},0),Bv=Ks("ceil"),Uv=yi(function(e,t){return e/t},1),jv=Ks("floor");function zv(e){return e&&e.length?hi(e,Ne,$s):i}function Vv(e,t){return e&&e.length?hi(e,q(t,2),$s):i}function Xv(e){return Tu(e,Ne)}function Yv(e,t){return Tu(e,q(t,2))}function Kv(e){return e&&e.length?hi(e,Ne,Ms):i}function Zv(e,t){return e&&e.length?hi(e,q(t,2),Ms):i}var Jv=yi(function(e,t){return e*t},1),kv=Ks("round"),Qv=yi(function(e,t){return e-t},0);function e1(e){return e&&e.length?xs(e,Ne):0}function t1(e,t){return e&&e.length?xs(e,q(t,2)):0}return f.after=b0,f.ary=nl,f.assign=cm,f.assignIn=_l,f.assignInWith=Di,f.assignWith=fm,f.at=hm,f.before=rl,f.bind=uo,f.bindAll=mv,f.bindKey=il,f.castArray=N0,f.chain=Qa,f.chunk=jd,f.compact=zd,f.concat=Vd,f.cond=vv,f.conforms=yv,f.constant=go,f.countBy=e0,f.create=pm,f.curry=sl,f.curryRight=ol,f.debounce=ul,f.defaults=gm,f.defaultsDeep=dm,f.defer=A0,f.delay=S0,f.difference=Xd,f.differenceBy=Yd,f.differenceWith=Kd,f.drop=Zd,f.dropRight=Jd,f.dropRightWhile=kd,f.dropWhile=Qd,f.fill=e_,f.filter=n0,f.flatMap=s0,f.flatMapDeep=o0,f.flatMapDepth=u0,f.flatten=Ka,f.flattenDeep=t_,f.flattenDepth=n_,f.flip=O0,f.flow=wv,f.flowRight=xv,f.fromPairs=r_,f.functions=xm,f.functionsIn=bm,f.groupBy=a0,f.initial=s_,f.intersection=o_,f.intersectionBy=u_,f.intersectionWith=a_,f.invert=Sm,f.invertBy=Om,f.invokeMap=c0,f.iteratee=_o,f.keyBy=f0,f.keys=me,f.keysIn=$e,f.map=Oi,f.mapKeys=Cm,f.mapValues=Im,f.matches=bv,f.matchesProperty=Av,f.memoize=Ci,f.merge=Lm,f.mergeWith=ml,f.method=Sv,f.methodOf=Ov,f.mixin=mo,f.negate=Ii,f.nthArg=Cv,f.omit=Tm,f.omitBy=Dm,f.once=R0,f.orderBy=h0,f.over=Iv,f.overArgs=C0,f.overEvery=Lv,f.overSome=Tv,f.partial=ao,f.partialRight=al,f.partition=p0,f.pick=Pm,f.pickBy=vl,f.property=Sl,f.propertyOf=Dv,f.pull=h_,f.pullAll=Ja,f.pullAllBy=p_,f.pullAllWith=g_,f.pullAt=d_,f.range=Pv,f.rangeRight=$v,f.rearg=I0,f.reject=_0,f.remove=__,f.rest=L0,f.reverse=so,f.sampleSize=v0,f.set=Nm,f.setWith=qm,f.shuffle=y0,f.slice=m_,f.sortBy=x0,f.sortedUniq=A_,f.sortedUniqBy=S_,f.split=sv,f.spread=T0,f.tail=O_,f.take=R_,f.takeRight=C_,f.takeRightWhile=I_,f.takeWhile=L_,f.tap=z_,f.throttle=D0,f.thru=Si,f.toArray=pl,f.toPairs=yl,f.toPairsIn=El,f.toPath=Hv,f.toPlainObject=dl,f.transform=Fm,f.unary=P0,f.union=T_,f.unionBy=D_,f.unionWith=P_,f.uniq=$_,f.uniqBy=N_,f.uniqWith=q_,f.unset=Mm,f.unzip=oo,f.unzipWith=ka,f.update=Hm,f.updateWith=Wm,f.values=$n,f.valuesIn=Gm,f.without=F_,f.words=bl,f.wrap=$0,f.xor=M_,f.xorBy=H_,f.xorWith=W_,f.zip=G_,f.zipObject=B_,f.zipObjectDeep=U_,f.zipWith=j_,f.entries=yl,f.entriesIn=El,f.extend=_l,f.extendWith=Di,mo(f,f),f.add=Gv,f.attempt=Al,f.camelCase=zm,f.capitalize=wl,f.ceil=Bv,f.clamp=Bm,f.clone=q0,f.cloneDeep=M0,f.cloneDeepWith=H0,f.cloneWith=F0,f.conformsTo=W0,f.deburr=xl,f.defaultTo=Ev,f.divide=Uv,f.endsWith=Vm,f.eq=ut,f.escape=Xm,f.escapeRegExp=Ym,f.every=t0,f.find=r0,f.findIndex=Xa,f.findKey=_m,f.findLast=i0,f.findLastIndex=Ya,f.findLastKey=mm,f.floor=jv,f.forEach=el,f.forEachRight=tl,f.forIn=vm,f.forInRight=ym,f.forOwn=Em,f.forOwnRight=wm,f.get=fo,f.gt=G0,f.gte=B0,f.has=Am,f.hasIn=ho,f.head=Za,f.identity=Ne,f.includes=l0,f.indexOf=i_,f.inRange=Um,f.invoke=Rm,f.isArguments=cn,f.isArray=G,f.isArrayBuffer=U0,f.isArrayLike=Pe,f.isArrayLikeObject=le,f.isBoolean=j0,f.isBuffer=Vt,f.isDate=z0,f.isElement=V0,f.isEmpty=X0,f.isEqual=Y0,f.isEqualWith=K0,f.isError=lo,f.isFinite=Z0,f.isFunction=Tt,f.isInteger=ll,f.isLength=Li,f.isMap=cl,f.isMatch=J0,f.isMatchWith=k0,f.isNaN=Q0,f.isNative=em,f.isNil=nm,f.isNull=tm,f.isNumber=fl,f.isObject=oe,f.isObjectLike=ue,f.isPlainObject=dr,f.isRegExp=co,f.isSafeInteger=rm,f.isSet=hl,f.isString=Ti,f.isSymbol=Ge,f.isTypedArray=Pn,f.isUndefined=im,f.isWeakMap=sm,f.isWeakSet=om,f.join=l_,f.kebabCase=Km,f.last=ke,f.lastIndexOf=c_,f.lowerCase=Zm,f.lowerFirst=Jm,f.lt=um,f.lte=am,f.max=zv,f.maxBy=Vv,f.mean=Xv,f.meanBy=Yv,f.min=Kv,f.minBy=Zv,f.stubArray=yo,f.stubFalse=Eo,f.stubObject=Nv,f.stubString=qv,f.stubTrue=Fv,f.multiply=Jv,f.nth=f_,f.noConflict=Rv,f.noop=vo,f.now=Ri,f.pad=km,f.padEnd=Qm,f.padStart=ev,f.parseInt=tv,f.random=jm,f.reduce=g0,f.reduceRight=d0,f.repeat=nv,f.replace=rv,f.result=$m,f.round=kv,f.runInContext=m,f.sample=m0,f.size=E0,f.snakeCase=iv,f.some=w0,f.sortedIndex=v_,f.sortedIndexBy=y_,f.sortedIndexOf=E_,f.sortedLastIndex=w_,f.sortedLastIndexBy=x_,f.sortedLastIndexOf=b_,f.startCase=ov,f.startsWith=uv,f.subtract=Qv,f.sum=e1,f.sumBy=t1,f.template=av,f.times=Mv,f.toFinite=Dt,f.toInteger=B,f.toLength=gl,f.toLower=lv,f.toNumber=Qe,f.toSafeInteger=lm,f.toString=k,f.toUpper=cv,f.trim=fv,f.trimEnd=hv,f.trimStart=pv,f.truncate=gv,f.unescape=dv,f.uniqueId=Wv,f.upperCase=_v,f.upperFirst=po,f.each=el,f.eachRight=tl,f.first=Za,mo(f,function(){var e={};return mt(f,function(t,n){Q.call(f.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),f.VERSION=r,Xe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){f[e].placeholder=f}),Xe(["drop","take"],function(e,t){X.prototype[e]=function(n){n=n===i?1:de(B(n),0);var o=this.__filtered__&&!t?new X(this):this.clone();return o.__filtered__?o.__takeCount__=xe(n,o.__takeCount__):o.__views__.push({size:xe(n,_t),type:e+(o.__dir__<0?"Right":"")}),o},X.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Xe(["filter","map","takeWhile"],function(e,t){var n=t+1,o=n==te||n==we;X.prototype[e]=function(l){var h=this.clone();return h.__iteratees__.push({iteratee:q(l,3),type:n}),h.__filtered__=h.__filtered__||o,h}}),Xe(["head","last"],function(e,t){var n="take"+(t?"Right":"");X.prototype[e]=function(){return this[n](1).value()[0]}}),Xe(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");X.prototype[e]=function(){return this.__filtered__?new X(this):this[n](1)}}),X.prototype.compact=function(){return this.filter(Ne)},X.prototype.find=function(e){return this.filter(e).head()},X.prototype.findLast=function(e){return this.reverse().find(e)},X.prototype.invokeMap=z(function(e,t){return typeof e=="function"?new X(this):this.map(function(n){return lr(n,e,t)})}),X.prototype.reject=function(e){return this.filter(Ii(q(e)))},X.prototype.slice=function(e,t){e=B(e);var n=this;return n.__filtered__&&(e>0||t<0)?new X(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(t=B(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},X.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},X.prototype.toArray=function(){return this.take(_t)},mt(X.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),l=f[o?"take"+(t=="last"?"Right":""):t],h=o||/^find/.test(t);!l||(f.prototype[t]=function(){var g=this.__wrapped__,_=o?[1]:arguments,v=g instanceof X,A=_[0],S=v||G(g),O=function(V){var Y=l.apply(f,Mt([V],_));return o&&C?Y[0]:Y};S&&n&&typeof A=="function"&&A.length!=1&&(v=S=!1);var C=this.__chain__,N=!!this.__actions__.length,F=h&&!C,U=v&&!N;if(!h&&S){g=U?g:new X(this);var M=e.apply(g,_);return M.__actions__.push({func:Si,args:[O],thisArg:i}),new Ke(M,C)}return F&&U?e.apply(this,_):(M=this.thru(O),F?o?M.value()[0]:M.value():M)})}),Xe(["pop","push","shift","sort","splice","unshift"],function(e){var t=Jr[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);f.prototype[e]=function(){var l=arguments;if(o&&!this.__chain__){var h=this.value();return t.apply(G(h)?h:[],l)}return this[n](function(g){return t.apply(G(g)?g:[],l)})}}),mt(X.prototype,function(e,t){var n=f[t];if(n){var o=n.name+"";Q.call(Cn,o)||(Cn[o]=[]),Cn[o].push({name:t,func:n})}}),Cn[vi(i,ft).name]=[{name:"wrapper",func:i}],X.prototype.clone=dg,X.prototype.reverse=_g,X.prototype.value=mg,f.prototype.at=V_,f.prototype.chain=X_,f.prototype.commit=Y_,f.prototype.next=K_,f.prototype.plant=J_,f.prototype.reverse=k_,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=Q_,f.prototype.first=f.prototype.head,nr&&(f.prototype[nr]=Z_),f},Wt=Yp();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(_e._=Wt,define(function(){return Wt})):tn?((tn.exports=Wt)._=Wt,ds._=Wt):_e._=Wt}).call(Mn)});var Yi=L(qe=>{"use strict";var _E=qe&&qe.__awaiter||function(i,r,s,u){function c(a){return a instanceof s?a:new s(function(d){d(a)})}return new(s||(s=Promise))(function(a,d){function y(x){try{p(u.next(x))}catch(R){d(R)}}function E(x){try{p(u.throw(x))}catch(R){d(R)}}function p(x){x.done?a(x.value):c(x.value).then(y,E)}p((u=u.apply(i,r||[])).next())})},mE=qe&&qe.__generator||function(i,r){var s={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},u,c,a,d;return d={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function y(p){return function(x){return E([p,x])}}function E(p){if(u)throw new TypeError("Generator is already executing.");for(;s;)try{if(u=1,c&&(a=p[0]&2?c.return:p[0]?c.throw||((a=c.return)&&a.call(c),0):c.next)&&!(a=a.call(c,p[1])).done)return a;switch(c=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return s.label++,{value:p[1],done:!1};case 5:s.label++,c=p[1],p=[0];continue;case 7:p=s.ops.pop(),s.trys.pop();continue;default:if(a=s.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){s=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){s.label=p[1];break}if(p[0]===6&&s.label<a[1]){s.label=a[1],a=p;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(p);break}a[2]&&s.ops.pop(),s.trys.pop();continue}p=r.call(i,s)}catch(x){p=[6,x],c=0}finally{u=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Mf=qe&&qe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(qe,"__esModule",{value:!0});qe.handlerProfileFile=qe.getConfig=qe.setConfig=void 0;var Hf=Mf(require("path")),Wo=Mf(qt()),Et=Wo.default.fse,Xi=Wo.default.jsyaml,Ho=Wo.default.getRootHome;function vE(i){var r=Gf();Et.writeFileSync(r,Xi.dump(i))}function Wf(){var i=Gf();if(!Et.existsSync(i))return{};try{var r=Xi.load(Et.readFileSync(i,"utf8"))||{};return r}catch(s){throw s}}function Gf(){var i=Hf.default.join(Ho(),"set-config.yml");return Et.existsSync(i)||Et.createFileSync(i),i}function yE(i,r){var s=Wf();s[i]=r,vE(s)}qe.setConfig=yE;function EE(i,r){var s=Wf();return s[i]||r}qe.getConfig=EE;function wE(i){return _E(this,void 0,void 0,function(){var r,s,u,c,a,d,y;return mE(this,function(E){switch(E.label){case 0:if(r=i.filePath||"set-config.yml",s=Hf.default.join(Ho(),r),u=Et.existsSync(s),c={},u)return[3,5];a=Ho(),E.label=1;case 1:return E.trys.push([1,2,,4]),Et.statSync(a),[3,4];case 2:return d=E.sent(),[4,Et.mkdirSync(a)];case 3:return E.sent(),[3,4];case 4:return[3,6];case 5:try{c=Xi.load(Et.readFileSync(s,"utf8"))||{}}catch(p){throw p}E.label=6;case 6:return i.read?[2,c]:(y=i.configKey||"",c[y]=i.data,[4,Et.writeFileSync(s,Xi.dump(c))]);case 7:return E.sent(),[2,c]}})})}qe.handlerProfileFile=wE});var Bf=L((kx,xE)=>{xE.exports={name:"@serverless-devs/s",version:"2.0.100-beta.8",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/lodash":"^4.14.168","@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",lodash:"^4.17.20","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","tty-table":"^4.1.5",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},dependencies:{"@serverless-devs/core":"beta"}}});var Hn=L(H=>{"use strict";var bE=H&&H.__createBinding||(Object.create?function(i,r,s,u){u===void 0&&(u=s),Object.defineProperty(i,u,{enumerable:!0,get:function(){return r[s]}})}:function(i,r,s,u){u===void 0&&(u=s),i[u]=r[s]}),AE=H&&H.__setModuleDefault||(Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r}),SE=H&&H.__importStar||function(i){if(i&&i.__esModule)return i;var r={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&bE(r,i,s);return AE(r,i),r},Dr=H&&H.__awaiter||function(i,r,s,u){function c(a){return a instanceof s?a:new s(function(d){d(a)})}return new(s||(s=Promise))(function(a,d){function y(x){try{p(u.next(x))}catch(R){d(R)}}function E(x){try{p(u.throw(x))}catch(R){d(R)}}function p(x){x.done?a(x.value):c(x.value).then(y,E)}p((u=u.apply(i,r||[])).next())})},Pr=H&&H.__generator||function(i,r){var s={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},u,c,a,d;return d={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function y(p){return function(x){return E([p,x])}}function E(p){if(u)throw new TypeError("Generator is already executing.");for(;s;)try{if(u=1,c&&(a=p[0]&2?c.return:p[0]?c.throw||((a=c.return)&&a.call(c),0):c.next)&&!(a=a.call(c,p[1])).done)return a;switch(c=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return s.label++,{value:p[1],done:!1};case 5:s.label++,c=p[1],p=[0];continue;case 7:p=s.ops.pop(),s.trys.pop();continue;default:if(a=s.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){s=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){s.label=p[1];break}if(p[0]===6&&s.label<a[1]){s.label=a[1],a=p;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(p);break}a[2]&&s.ops.pop(),s.trys.pop();continue}p=r.call(i,s)}catch(x){p=[6,x],c=0}finally{u=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Go=H&&H.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(H,"__esModule",{value:!0});H.emoji=H.mark=H.replaceTemplate=H.replaceFun=H.getLang=H.printn=H.getFolderSize=H.getVersion=H.getPid=H.aiRequest=H.getCredentialWithAll=H.getCredentialWithExisted=H.getProcessArgv=H.bgRed=H.yellow=H.red=void 0;var OE=Go(require("path")),Tr=Go(require("fs")),Yt=Mo(),RE=Go(require("os")),wt=SE(qt()),CE=Yi(),Uf=Bf(),Ki=wt.default.colors,IE=wt.default.got,LE=wt.default.getMAC,TE=wt.default.isDocker,DE=wt.default.isCiCdEnv,PE=wt.default.getGlobalArgs,jf=wt.default.getCredential,zf=wt.default.getCredentialAliasList;H.red=Ki.hex("#fd5750");H.yellow=Ki.hex("#F3F99D");H.bgRed=Ki.hex("#000").bgHex("#fd5750");var $E=function(){var i=process.env.serverless_devs_temp_argv;try{var r=JSON.parse(i),s=PE(r);return process.argv=process.argv.slice(0,2).concat(s._argsObj),(0,Yt.assign)({},s,{noHelpArgv:process.argv.slice(0,2).concat((0,Yt.filter)(s._argsObj,function(u){return!(0,Yt.includes)(["-h","--help"],u)}))})}catch{return{}}};H.getProcessArgv=$E;var NE=function(i){return Dr(void 0,void 0,void 0,function(){var r,s;return Pr(this,function(u){switch(u.label){case 0:return[4,zf()];case 1:return r=u.sent(),(0,Yt.includes)(r,i)?[4,jf(i)]:[3,3];case 2:return s=u.sent(),[2,(0,Yt.omit)(s,"Alias")];case 3:return[2]}})})};H.getCredentialWithExisted=NE;var qE=function(){return Dr(void 0,void 0,void 0,function(){var i,r,s,u,c,a;return Pr(this,function(d){switch(d.label){case 0:return[4,zf()];case 1:if(i=d.sent(),!(i.length>0))return[3,6];r={},s=0,u=i,d.label=2;case 2:return s<u.length?(c=u[s],[4,jf(c)]):[3,5];case 3:a=d.sent(),r[a.Alias]=(0,Yt.omit)(a,"Alias"),d.label=4;case 4:return s++,[3,2];case 5:return[2,r];case 6:return[2]}})})};H.getCredentialWithAll=qE;var FE=function(i,r){return r===void 0&&(r="unknow"),Dr(void 0,void 0,void 0,function(){var s,u,c,a;return Pr(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),s=(0,CE.getConfig)("analysis"),s!=="enable"?[2]:TE()||DE()?[2]:[4,IE("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(r,"&code=TypeError&s=").concat(i),{timeout:2e3,json:!0})];case 1:return u=d.sent(),c=(0,Yt.get)(u.body,"shorturl"),c&&console.log(`AI Tips:
|
|
34
|
+
}`;var U=Al(function(){return J(h,N+"return "+O).apply(i,g)});if(U.source=O,lo(U))throw U;return U}function lv(e){return k(e).toLowerCase()}function cv(e){return k(e).toUpperCase()}function fv(e,t,n){if(e=k(e),e&&(n||t===i))return Pu(e);if(!e||!(t=We(t)))return e;var o=st(e),l=st(t),h=$u(o,l),g=Nu(o,l)+1;return zt(o,h,g).join("")}function hv(e,t,n){if(e=k(e),e&&(n||t===i))return e.slice(0,Fu(e)+1);if(!e||!(t=We(t)))return e;var o=st(e),l=Nu(o,st(t))+1;return zt(o,0,l).join("")}function pv(e,t,n){if(e=k(e),e&&(n||t===i))return e.replace(ls,"");if(!e||!(t=We(t)))return e;var o=st(e),l=$u(o,st(t));return zt(o,l).join("")}function gv(e,t){var n=Hr,o=Qt;if(oe(t)){var l="separator"in t?t.separator:l;n="length"in t?B(t.length):n,o="omission"in t?We(t.omission):o}e=k(e);var h=e.length;if(An(e)){var g=st(e);h=g.length}if(n>=h)return e;var _=n-Sn(o);if(_<1)return o;var v=g?zt(g,0,_).join(""):e.slice(0,_);if(l===i)return v+o;if(g&&(_+=v.length-_),co(l)){if(e.slice(_).search(l)){var A,S=v;for(l.global||(l=Os(l.source,k(tu.exec(l))+"g")),l.lastIndex=0;A=l.exec(S);)var O=A.index;v=v.slice(0,O===i?_:O)}}else if(e.indexOf(We(l),_)!=_){var C=v.lastIndexOf(l);C>-1&&(v=v.slice(0,C))}return v+o}function dv(e){return e=k(e),e&&Oh.test(e)?e.replace(ko,jp):e}var _v=Tn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),po=Sa("toUpperCase");function bl(e,t,n){return e=k(e),t=n?i:t,t===i?Hp(e)?Xp(e):Lp(e):e.match(t)||[]}var Al=z(function(e,t){try{return Me(e,i,t)}catch(n){return lo(n)?n:new W(n)}}),mv=It(function(e,t){return Xe(t,function(n){n=yt(n),Rt(e,n,uo(e[n],e))}),e});function vv(e){var t=e==null?0:e.length,n=q();return e=t?se(e,function(o){if(typeof o[1]!="function")throw new Ye(c);return[n(o[0]),o[1]]}):[],z(function(o){for(var l=-1;++l<t;){var h=e[l];if(Me(h[0],this,o))return Me(h[1],this,o)}})}function yv(e){return jg(Ze(e,p))}function go(e){return function(){return e}}function Ev(e,t){return e==null||e!==e?t:e}var wv=Ra(),xv=Ra(!0);function Ne(e){return e}function _o(e){return ra(typeof e=="function"?e:Ze(e,p))}function bv(e){return sa(Ze(e,p))}function Av(e,t){return oa(e,Ze(t,p))}var Sv=z(function(e,t){return function(n){return lr(n,e,t)}}),Ov=z(function(e,t){return function(n){return lr(e,n,t)}});function mo(e,t,n){var o=me(t),l=pi(t,o);n==null&&!(oe(t)&&(l.length||!o.length))&&(n=t,t=e,e=this,l=pi(t,me(t)));var h=!(oe(n)&&"chain"in n)||!!n.chain,g=Tt(e);return Xe(l,function(_){var v=t[_];e[_]=v,g&&(e.prototype[_]=function(){var A=this.__chain__;if(h||A){var S=e(this.__wrapped__),O=S.__actions__=De(this.__actions__);return O.push({func:v,args:arguments,thisArg:e}),S.__chain__=A,S}return v.apply(e,Mt([this.value()],arguments))})}),e}function Rv(){return _e._===this&&(_e._=Qp),this}function vo(){}function Cv(e){return e=B(e),z(function(t){return ua(t,e)})}var Iv=Ys(se),Lv=Ys(Cu),Tv=Ys(ys);function Sl(e){return to(e)?Es(yt(e)):ud(e)}function Dv(e){return function(t){return e==null?i:un(e,t)}}var Pv=Ia(),$v=Ia(!0);function yo(){return[]}function Eo(){return!1}function Nv(){return{}}function qv(){return""}function Fv(){return!0}function Mv(e,t){if(e=B(e),e<1||e>K)return[];var n=_t,o=xe(e,_t);t=q(t),e-=_t;for(var l=bs(o,t);++n<e;)t(n);return l}function Hv(e){return G(e)?se(e,yt):Ge(e)?[e]:De(za(k(e)))}function Wv(e){var t=++Jp;return k(e)+t}var Gv=yi(function(e,t){return e+t},0),Bv=Ks("ceil"),Uv=yi(function(e,t){return e/t},1),jv=Ks("floor");function zv(e){return e&&e.length?hi(e,Ne,$s):i}function Vv(e,t){return e&&e.length?hi(e,q(t,2),$s):i}function Xv(e){return Tu(e,Ne)}function Yv(e,t){return Tu(e,q(t,2))}function Kv(e){return e&&e.length?hi(e,Ne,Ms):i}function Zv(e,t){return e&&e.length?hi(e,q(t,2),Ms):i}var Jv=yi(function(e,t){return e*t},1),kv=Ks("round"),Qv=yi(function(e,t){return e-t},0);function e1(e){return e&&e.length?xs(e,Ne):0}function t1(e,t){return e&&e.length?xs(e,q(t,2)):0}return f.after=b0,f.ary=nl,f.assign=cm,f.assignIn=_l,f.assignInWith=Di,f.assignWith=fm,f.at=hm,f.before=rl,f.bind=uo,f.bindAll=mv,f.bindKey=il,f.castArray=N0,f.chain=Qa,f.chunk=jd,f.compact=zd,f.concat=Vd,f.cond=vv,f.conforms=yv,f.constant=go,f.countBy=e0,f.create=pm,f.curry=sl,f.curryRight=ol,f.debounce=ul,f.defaults=gm,f.defaultsDeep=dm,f.defer=A0,f.delay=S0,f.difference=Xd,f.differenceBy=Yd,f.differenceWith=Kd,f.drop=Zd,f.dropRight=Jd,f.dropRightWhile=kd,f.dropWhile=Qd,f.fill=e_,f.filter=n0,f.flatMap=s0,f.flatMapDeep=o0,f.flatMapDepth=u0,f.flatten=Ka,f.flattenDeep=t_,f.flattenDepth=n_,f.flip=O0,f.flow=wv,f.flowRight=xv,f.fromPairs=r_,f.functions=xm,f.functionsIn=bm,f.groupBy=a0,f.initial=s_,f.intersection=o_,f.intersectionBy=u_,f.intersectionWith=a_,f.invert=Sm,f.invertBy=Om,f.invokeMap=c0,f.iteratee=_o,f.keyBy=f0,f.keys=me,f.keysIn=$e,f.map=Oi,f.mapKeys=Cm,f.mapValues=Im,f.matches=bv,f.matchesProperty=Av,f.memoize=Ci,f.merge=Lm,f.mergeWith=ml,f.method=Sv,f.methodOf=Ov,f.mixin=mo,f.negate=Ii,f.nthArg=Cv,f.omit=Tm,f.omitBy=Dm,f.once=R0,f.orderBy=h0,f.over=Iv,f.overArgs=C0,f.overEvery=Lv,f.overSome=Tv,f.partial=ao,f.partialRight=al,f.partition=p0,f.pick=Pm,f.pickBy=vl,f.property=Sl,f.propertyOf=Dv,f.pull=h_,f.pullAll=Ja,f.pullAllBy=p_,f.pullAllWith=g_,f.pullAt=d_,f.range=Pv,f.rangeRight=$v,f.rearg=I0,f.reject=_0,f.remove=__,f.rest=L0,f.reverse=so,f.sampleSize=v0,f.set=Nm,f.setWith=qm,f.shuffle=y0,f.slice=m_,f.sortBy=x0,f.sortedUniq=A_,f.sortedUniqBy=S_,f.split=sv,f.spread=T0,f.tail=O_,f.take=R_,f.takeRight=C_,f.takeRightWhile=I_,f.takeWhile=L_,f.tap=z_,f.throttle=D0,f.thru=Si,f.toArray=pl,f.toPairs=yl,f.toPairsIn=El,f.toPath=Hv,f.toPlainObject=dl,f.transform=Fm,f.unary=P0,f.union=T_,f.unionBy=D_,f.unionWith=P_,f.uniq=$_,f.uniqBy=N_,f.uniqWith=q_,f.unset=Mm,f.unzip=oo,f.unzipWith=ka,f.update=Hm,f.updateWith=Wm,f.values=$n,f.valuesIn=Gm,f.without=F_,f.words=bl,f.wrap=$0,f.xor=M_,f.xorBy=H_,f.xorWith=W_,f.zip=G_,f.zipObject=B_,f.zipObjectDeep=U_,f.zipWith=j_,f.entries=yl,f.entriesIn=El,f.extend=_l,f.extendWith=Di,mo(f,f),f.add=Gv,f.attempt=Al,f.camelCase=zm,f.capitalize=wl,f.ceil=Bv,f.clamp=Bm,f.clone=q0,f.cloneDeep=M0,f.cloneDeepWith=H0,f.cloneWith=F0,f.conformsTo=W0,f.deburr=xl,f.defaultTo=Ev,f.divide=Uv,f.endsWith=Vm,f.eq=ut,f.escape=Xm,f.escapeRegExp=Ym,f.every=t0,f.find=r0,f.findIndex=Xa,f.findKey=_m,f.findLast=i0,f.findLastIndex=Ya,f.findLastKey=mm,f.floor=jv,f.forEach=el,f.forEachRight=tl,f.forIn=vm,f.forInRight=ym,f.forOwn=Em,f.forOwnRight=wm,f.get=fo,f.gt=G0,f.gte=B0,f.has=Am,f.hasIn=ho,f.head=Za,f.identity=Ne,f.includes=l0,f.indexOf=i_,f.inRange=Um,f.invoke=Rm,f.isArguments=cn,f.isArray=G,f.isArrayBuffer=U0,f.isArrayLike=Pe,f.isArrayLikeObject=le,f.isBoolean=j0,f.isBuffer=Vt,f.isDate=z0,f.isElement=V0,f.isEmpty=X0,f.isEqual=Y0,f.isEqualWith=K0,f.isError=lo,f.isFinite=Z0,f.isFunction=Tt,f.isInteger=ll,f.isLength=Li,f.isMap=cl,f.isMatch=J0,f.isMatchWith=k0,f.isNaN=Q0,f.isNative=em,f.isNil=nm,f.isNull=tm,f.isNumber=fl,f.isObject=oe,f.isObjectLike=ue,f.isPlainObject=dr,f.isRegExp=co,f.isSafeInteger=rm,f.isSet=hl,f.isString=Ti,f.isSymbol=Ge,f.isTypedArray=Pn,f.isUndefined=im,f.isWeakMap=sm,f.isWeakSet=om,f.join=l_,f.kebabCase=Km,f.last=ke,f.lastIndexOf=c_,f.lowerCase=Zm,f.lowerFirst=Jm,f.lt=um,f.lte=am,f.max=zv,f.maxBy=Vv,f.mean=Xv,f.meanBy=Yv,f.min=Kv,f.minBy=Zv,f.stubArray=yo,f.stubFalse=Eo,f.stubObject=Nv,f.stubString=qv,f.stubTrue=Fv,f.multiply=Jv,f.nth=f_,f.noConflict=Rv,f.noop=vo,f.now=Ri,f.pad=km,f.padEnd=Qm,f.padStart=ev,f.parseInt=tv,f.random=jm,f.reduce=g0,f.reduceRight=d0,f.repeat=nv,f.replace=rv,f.result=$m,f.round=kv,f.runInContext=m,f.sample=m0,f.size=E0,f.snakeCase=iv,f.some=w0,f.sortedIndex=v_,f.sortedIndexBy=y_,f.sortedIndexOf=E_,f.sortedLastIndex=w_,f.sortedLastIndexBy=x_,f.sortedLastIndexOf=b_,f.startCase=ov,f.startsWith=uv,f.subtract=Qv,f.sum=e1,f.sumBy=t1,f.template=av,f.times=Mv,f.toFinite=Dt,f.toInteger=B,f.toLength=gl,f.toLower=lv,f.toNumber=Qe,f.toSafeInteger=lm,f.toString=k,f.toUpper=cv,f.trim=fv,f.trimEnd=hv,f.trimStart=pv,f.truncate=gv,f.unescape=dv,f.uniqueId=Wv,f.upperCase=_v,f.upperFirst=po,f.each=el,f.eachRight=tl,f.first=Za,mo(f,function(){var e={};return mt(f,function(t,n){Q.call(f.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),f.VERSION=r,Xe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){f[e].placeholder=f}),Xe(["drop","take"],function(e,t){X.prototype[e]=function(n){n=n===i?1:de(B(n),0);var o=this.__filtered__&&!t?new X(this):this.clone();return o.__filtered__?o.__takeCount__=xe(n,o.__takeCount__):o.__views__.push({size:xe(n,_t),type:e+(o.__dir__<0?"Right":"")}),o},X.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Xe(["filter","map","takeWhile"],function(e,t){var n=t+1,o=n==te||n==we;X.prototype[e]=function(l){var h=this.clone();return h.__iteratees__.push({iteratee:q(l,3),type:n}),h.__filtered__=h.__filtered__||o,h}}),Xe(["head","last"],function(e,t){var n="take"+(t?"Right":"");X.prototype[e]=function(){return this[n](1).value()[0]}}),Xe(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");X.prototype[e]=function(){return this.__filtered__?new X(this):this[n](1)}}),X.prototype.compact=function(){return this.filter(Ne)},X.prototype.find=function(e){return this.filter(e).head()},X.prototype.findLast=function(e){return this.reverse().find(e)},X.prototype.invokeMap=z(function(e,t){return typeof e=="function"?new X(this):this.map(function(n){return lr(n,e,t)})}),X.prototype.reject=function(e){return this.filter(Ii(q(e)))},X.prototype.slice=function(e,t){e=B(e);var n=this;return n.__filtered__&&(e>0||t<0)?new X(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(t=B(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},X.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},X.prototype.toArray=function(){return this.take(_t)},mt(X.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),l=f[o?"take"+(t=="last"?"Right":""):t],h=o||/^find/.test(t);!l||(f.prototype[t]=function(){var g=this.__wrapped__,_=o?[1]:arguments,v=g instanceof X,A=_[0],S=v||G(g),O=function(V){var Y=l.apply(f,Mt([V],_));return o&&C?Y[0]:Y};S&&n&&typeof A=="function"&&A.length!=1&&(v=S=!1);var C=this.__chain__,N=!!this.__actions__.length,F=h&&!C,U=v&&!N;if(!h&&S){g=U?g:new X(this);var M=e.apply(g,_);return M.__actions__.push({func:Si,args:[O],thisArg:i}),new Ke(M,C)}return F&&U?e.apply(this,_):(M=this.thru(O),F?o?M.value()[0]:M.value():M)})}),Xe(["pop","push","shift","sort","splice","unshift"],function(e){var t=Jr[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);f.prototype[e]=function(){var l=arguments;if(o&&!this.__chain__){var h=this.value();return t.apply(G(h)?h:[],l)}return this[n](function(g){return t.apply(G(g)?g:[],l)})}}),mt(X.prototype,function(e,t){var n=f[t];if(n){var o=n.name+"";Q.call(Cn,o)||(Cn[o]=[]),Cn[o].push({name:t,func:n})}}),Cn[vi(i,ft).name]=[{name:"wrapper",func:i}],X.prototype.clone=dg,X.prototype.reverse=_g,X.prototype.value=mg,f.prototype.at=V_,f.prototype.chain=X_,f.prototype.commit=Y_,f.prototype.next=K_,f.prototype.plant=J_,f.prototype.reverse=k_,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=Q_,f.prototype.first=f.prototype.head,nr&&(f.prototype[nr]=Z_),f},Wt=Yp();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(_e._=Wt,define(function(){return Wt})):tn?((tn.exports=Wt)._=Wt,ds._=Wt):_e._=Wt}).call(Mn)});var Yi=L(qe=>{"use strict";var _E=qe&&qe.__awaiter||function(i,r,s,u){function c(a){return a instanceof s?a:new s(function(d){d(a)})}return new(s||(s=Promise))(function(a,d){function y(x){try{p(u.next(x))}catch(R){d(R)}}function E(x){try{p(u.throw(x))}catch(R){d(R)}}function p(x){x.done?a(x.value):c(x.value).then(y,E)}p((u=u.apply(i,r||[])).next())})},mE=qe&&qe.__generator||function(i,r){var s={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},u,c,a,d;return d={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function y(p){return function(x){return E([p,x])}}function E(p){if(u)throw new TypeError("Generator is already executing.");for(;s;)try{if(u=1,c&&(a=p[0]&2?c.return:p[0]?c.throw||((a=c.return)&&a.call(c),0):c.next)&&!(a=a.call(c,p[1])).done)return a;switch(c=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return s.label++,{value:p[1],done:!1};case 5:s.label++,c=p[1],p=[0];continue;case 7:p=s.ops.pop(),s.trys.pop();continue;default:if(a=s.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){s=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){s.label=p[1];break}if(p[0]===6&&s.label<a[1]){s.label=a[1],a=p;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(p);break}a[2]&&s.ops.pop(),s.trys.pop();continue}p=r.call(i,s)}catch(x){p=[6,x],c=0}finally{u=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Mf=qe&&qe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(qe,"__esModule",{value:!0});qe.handlerProfileFile=qe.getConfig=qe.setConfig=void 0;var Hf=Mf(require("path")),Wo=Mf(qt()),Et=Wo.default.fse,Xi=Wo.default.jsyaml,Ho=Wo.default.getRootHome;function vE(i){var r=Gf();Et.writeFileSync(r,Xi.dump(i))}function Wf(){var i=Gf();if(!Et.existsSync(i))return{};try{var r=Xi.load(Et.readFileSync(i,"utf8"))||{};return r}catch(s){throw s}}function Gf(){var i=Hf.default.join(Ho(),"set-config.yml");return Et.existsSync(i)||Et.createFileSync(i),i}function yE(i,r){var s=Wf();s[i]=r,vE(s)}qe.setConfig=yE;function EE(i,r){var s=Wf();return s[i]||r}qe.getConfig=EE;function wE(i){return _E(this,void 0,void 0,function(){var r,s,u,c,a,d,y;return mE(this,function(E){switch(E.label){case 0:if(r=i.filePath||"set-config.yml",s=Hf.default.join(Ho(),r),u=Et.existsSync(s),c={},u)return[3,5];a=Ho(),E.label=1;case 1:return E.trys.push([1,2,,4]),Et.statSync(a),[3,4];case 2:return d=E.sent(),[4,Et.mkdirSync(a)];case 3:return E.sent(),[3,4];case 4:return[3,6];case 5:try{c=Xi.load(Et.readFileSync(s,"utf8"))||{}}catch(p){throw p}E.label=6;case 6:return i.read?[2,c]:(y=i.configKey||"",c[y]=i.data,[4,Et.writeFileSync(s,Xi.dump(c))]);case 7:return E.sent(),[2,c]}})})}qe.handlerProfileFile=wE});var Bf=L((kx,xE)=>{xE.exports={name:"@serverless-devs/s",version:"2.0.100-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/lodash":"^4.14.168","@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",lodash:"^4.17.20","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","tty-table":"^4.1.5",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},dependencies:{"@serverless-devs/core":"beta"}}});var Hn=L(H=>{"use strict";var bE=H&&H.__createBinding||(Object.create?function(i,r,s,u){u===void 0&&(u=s),Object.defineProperty(i,u,{enumerable:!0,get:function(){return r[s]}})}:function(i,r,s,u){u===void 0&&(u=s),i[u]=r[s]}),AE=H&&H.__setModuleDefault||(Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r}),SE=H&&H.__importStar||function(i){if(i&&i.__esModule)return i;var r={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&bE(r,i,s);return AE(r,i),r},Dr=H&&H.__awaiter||function(i,r,s,u){function c(a){return a instanceof s?a:new s(function(d){d(a)})}return new(s||(s=Promise))(function(a,d){function y(x){try{p(u.next(x))}catch(R){d(R)}}function E(x){try{p(u.throw(x))}catch(R){d(R)}}function p(x){x.done?a(x.value):c(x.value).then(y,E)}p((u=u.apply(i,r||[])).next())})},Pr=H&&H.__generator||function(i,r){var s={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},u,c,a,d;return d={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function y(p){return function(x){return E([p,x])}}function E(p){if(u)throw new TypeError("Generator is already executing.");for(;s;)try{if(u=1,c&&(a=p[0]&2?c.return:p[0]?c.throw||((a=c.return)&&a.call(c),0):c.next)&&!(a=a.call(c,p[1])).done)return a;switch(c=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return s.label++,{value:p[1],done:!1};case 5:s.label++,c=p[1],p=[0];continue;case 7:p=s.ops.pop(),s.trys.pop();continue;default:if(a=s.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){s=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){s.label=p[1];break}if(p[0]===6&&s.label<a[1]){s.label=a[1],a=p;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(p);break}a[2]&&s.ops.pop(),s.trys.pop();continue}p=r.call(i,s)}catch(x){p=[6,x],c=0}finally{u=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Go=H&&H.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(H,"__esModule",{value:!0});H.emoji=H.mark=H.replaceTemplate=H.replaceFun=H.getLang=H.printn=H.getFolderSize=H.getVersion=H.getPid=H.aiRequest=H.getCredentialWithAll=H.getCredentialWithExisted=H.getProcessArgv=H.bgRed=H.yellow=H.red=void 0;var OE=Go(require("path")),Tr=Go(require("fs")),Yt=Mo(),RE=Go(require("os")),wt=SE(qt()),CE=Yi(),Uf=Bf(),Ki=wt.default.colors,IE=wt.default.got,LE=wt.default.getMAC,TE=wt.default.isDocker,DE=wt.default.isCiCdEnv,PE=wt.default.getGlobalArgs,jf=wt.default.getCredential,zf=wt.default.getCredentialAliasList;H.red=Ki.hex("#fd5750");H.yellow=Ki.hex("#F3F99D");H.bgRed=Ki.hex("#000").bgHex("#fd5750");var $E=function(){var i=process.env.serverless_devs_temp_argv;try{var r=JSON.parse(i),s=PE(r);return process.argv=process.argv.slice(0,2).concat(s._argsObj),(0,Yt.assign)({},s,{noHelpArgv:process.argv.slice(0,2).concat((0,Yt.filter)(s._argsObj,function(u){return!(0,Yt.includes)(["-h","--help"],u)}))})}catch{return{}}};H.getProcessArgv=$E;var NE=function(i){return Dr(void 0,void 0,void 0,function(){var r,s;return Pr(this,function(u){switch(u.label){case 0:return[4,zf()];case 1:return r=u.sent(),(0,Yt.includes)(r,i)?[4,jf(i)]:[3,3];case 2:return s=u.sent(),[2,(0,Yt.omit)(s,"Alias")];case 3:return[2]}})})};H.getCredentialWithExisted=NE;var qE=function(){return Dr(void 0,void 0,void 0,function(){var i,r,s,u,c,a;return Pr(this,function(d){switch(d.label){case 0:return[4,zf()];case 1:if(i=d.sent(),!(i.length>0))return[3,6];r={},s=0,u=i,d.label=2;case 2:return s<u.length?(c=u[s],[4,jf(c)]):[3,5];case 3:a=d.sent(),r[a.Alias]=(0,Yt.omit)(a,"Alias"),d.label=4;case 4:return s++,[3,2];case 5:return[2,r];case 6:return[2]}})})};H.getCredentialWithAll=qE;var FE=function(i,r){return r===void 0&&(r="unknow"),Dr(void 0,void 0,void 0,function(){var s,u,c,a;return Pr(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),s=(0,CE.getConfig)("analysis"),s!=="enable"?[2]:TE()||DE()?[2]:[4,IE("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(r,"&code=TypeError&s=").concat(i),{timeout:2e3,json:!0})];case 1:return u=d.sent(),c=(0,Yt.get)(u.body,"shorturl"),c&&console.log(`AI Tips:
|
|
35
35
|
You can try to solve the problem through: `.concat(Ki.underline(c),`
|
|
36
36
|
`)),[3,3];case 2:return a=d.sent(),[3,3];case 3:return[2]}})})};H.aiRequest=FE;var ME=function(){try{return LE().replace(/:/g,"")}catch{return"unknown"}};H.getPid=ME;function HE(){var i=(0,wt.getCoreVersion)(),r="".concat(process.platform,"-").concat(process.arch),s="node-".concat(process.version),u="core: ".concat(i),c="s-home: ".concat(wt.default.getRootHome()),a="".concat(Uf.name,": ").concat(Uf.version);return i?"".concat(a,", ").concat(u,", ").concat(c,", ").concat(r,", ").concat(s):"".concat(a,", ").concat(c,", ").concat(r,", ").concat(s)}H.getVersion=HE;function WE(i){return Dr(this,void 0,void 0,function(){function r(c){return Dr(this,void 0,void 0,function(){var a,d;return Pr(this,function(y){switch(y.label){case 0:return a=Tr.default.lstatSync(c),typeof a!="object"?[2]:(s.set(a.ino,a.size),a.isDirectory()?(d=Tr.default.readdirSync(c),typeof d!="object"?[2]:[4,Promise.all(d.map(function(E){return r(OE.default.join(c,E))}))]):[3,2]);case 1:y.sent(),y.label=2;case 2:return[2]}})})}var s,u;return Pr(this,function(c){switch(c.label){case 0:return s=new Map,[4,r(i)];case 1:return c.sent(),u=Array.from(s.values()).reduce(function(a,d){return a+d},0),[2,u]}})})}H.getFolderSize=WE;function GE(i,r){r===void 0&&(r=" ");for(var s="",u=0;u<i;u++)s=s+r;return s}H.printn=GE;function BE(){return"en"}H.getLang=BE;function Vf(i,r){var s=/\{\{(.*?)\}\}/g,u=i.match(s);if(u)for(var c=0;c<u.length;c++){var a=u[c].replace(/{{|}}/g,""),d=(0,Yt.trim)(a.split("|")[0]);r[d]&&(i=i.replace(u[c],r[d]))}return i}H.replaceFun=Vf;function UE(i,r){i.forEach(function(s){if(Tr.default.existsSync(s)){var u=Tr.default.readFileSync(s,"utf-8"),c=Vf(u,r);Tr.default.writeFileSync(s,c,"utf-8")}})}H.replaceTemplate=UE;function jE(i){if(!i)return i;var r=i.slice(-4);return"***********".concat(r)}H.mark=jE;function zE(i,r){return RE.default.platform()==="win32"?r||"\u25C6":"".concat(i," ")}H.emoji=zE});var Xf=L(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.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 Yf=L(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.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 zo=L($r=>{"use strict";var Kf=$r&&$r.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty($r,"__esModule",{value:!0});var VE=Hn(),XE=Kf(Xf()),YE=Kf(Yf()),jo={en:YE.default,zh:XE.default},KE=function(i){var r=(0,VE.getLang)(),s=jo[r]?jo[r][i]:jo.en[i];return s||i};$r.default=KE});var Zi=L(Nr=>{"use strict";var ZE=Nr&&Nr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Nr,"__esModule",{value:!0});var JE=ZE(qt()),kE=JE.default.Logger,Vo=new kE("S-CLI");Vo.success=function(i){return Vo.log(i,"green")};Nr.default=Vo});var Jf=L(Oe=>{"use strict";var QE=Oe&&Oe.__createBinding||(Object.create?function(i,r,s,u){u===void 0&&(u=s),Object.defineProperty(i,u,{enumerable:!0,get:function(){return r[s]}})}:function(i,r,s,u){u===void 0&&(u=s),i[u]=r[s]}),Zf=Oe&&Oe.__exportStar||function(i,r){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(r,s)&&QE(r,i,s)},Xo=Oe&&Oe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.registerCommandChecker=Oe.i18n=Oe.logger=void 0;var ew=Xo(Zi());Zf(Hn(),Oe);Zf(Yi(),Oe);var tw=Zi();Object.defineProperty(Oe,"logger",{enumerable:!0,get:function(){return Xo(tw).default}});var nw=zo();Object.defineProperty(Oe,"i18n",{enumerable:!0,get:function(){return Xo(nw).default}});function rw(i){i.on("command:*",function(r){var s=i.commands.map(function(u){return u.name()});s.includes(r[0])||(ew.default.error(" error: unknown command ".concat(r[0])),i.help())})}Oe.registerCommandChecker=rw});var vn=L(Wn=>{"use strict";var iw=Wn&&Wn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.ServerlessError=void 0;var sw=iw(qt()),ow=sw.default.Logger,uw=new ow("S-CLI-ERROR"),aw=function(){function i(r,s,u){uw.error(r+": "+s,u),process.exit(1)}return i}();Wn.ServerlessError=aw});var kf=L(Gn=>{"use strict";var lw=Gn&&Gn.__extends||function(){var i=function(r,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(u[a]=c[a])},i(r,s)};return function(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(r,s);function u(){this.constructor=r}r.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}();Object.defineProperty(Gn,"__esModule",{value:!0});Gn.CommandError=void 0;var cw=vn(),fw=function(i){lw(r,i);function r(s,u){return i.call(this,"Error",s,u)||this}return r}(cw.ServerlessError);Gn.CommandError=fw});var Qf=L(Bn=>{"use strict";var hw=Bn&&Bn.__extends||function(){var i=function(r,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(u[a]=c[a])},i(r,s)};return function(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(r,s);function u(){this.constructor=r}r.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}();Object.defineProperty(Bn,"__esModule",{value:!0});Bn.ConfigDeleteError=void 0;var pw=vn(),gw=function(i){hw(r,i);function r(s,u){return i.call(this,"Deletion failed",s,u)||this}return r}(pw.ServerlessError);Bn.ConfigDeleteError=gw});var eh=L(Un=>{"use strict";var dw=Un&&Un.__extends||function(){var i=function(r,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(u[a]=c[a])},i(r,s)};return function(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(r,s);function u(){this.constructor=r}r.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}();Object.defineProperty(Un,"__esModule",{value:!0});Un.ConfigError=void 0;var _w=vn(),mw=function(i){dw(r,i);function r(s,u){return i.call(this,"Config failed",s,u)||this}return r}(_w.ServerlessError);Un.ConfigError=mw});var th=L(jn=>{"use strict";var vw=jn&&jn.__extends||function(){var i=function(r,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(u[a]=c[a])},i(r,s)};return function(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(r,s);function u(){this.constructor=r}r.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}();Object.defineProperty(jn,"__esModule",{value:!0});jn.ConfigGetError=void 0;var yw=vn(),Ew=function(i){vw(r,i);function r(s,u){return i.call(this,"Get failed",s,u)||this}return r}(yw.ServerlessError);jn.ConfigGetError=Ew});var nh=L(zn=>{"use strict";var ww=zn&&zn.__extends||function(){var i=function(r,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(u[a]=c[a])},i(r,s)};return function(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(r,s);function u(){this.constructor=r}r.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}();Object.defineProperty(zn,"__esModule",{value:!0});zn.InitError=void 0;var xw=vn(),bw=function(i){ww(r,i);function r(s,u){return i.call(this,"Initialization failed",s,u)||this}return r}(xw.ServerlessError);zn.InitError=bw});var ih=L(xt=>{"use strict";var Aw=xt&&xt.__awaiter||function(i,r,s,u){function c(a){return a instanceof s?a:new s(function(d){d(a)})}return new(s||(s=Promise))(function(a,d){function y(x){try{p(u.next(x))}catch(R){d(R)}}function E(x){try{p(u.throw(x))}catch(R){d(R)}}function p(x){x.done?a(x.value):c(x.value).then(y,E)}p((u=u.apply(i,r||[])).next())})},Sw=xt&&xt.__generator||function(i,r){var s={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},u,c,a,d;return d={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function y(p){return function(x){return E([p,x])}}function E(p){if(u)throw new TypeError("Generator is already executing.");for(;s;)try{if(u=1,c&&(a=p[0]&2?c.return:p[0]?c.throw||((a=c.return)&&a.call(c),0):c.next)&&!(a=a.call(c,p[1])).done)return a;switch(c=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return s.label++,{value:p[1],done:!1};case 5:s.label++,c=p[1],p=[0];continue;case 7:p=s.ops.pop(),s.trys.pop();continue;default:if(a=s.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){s=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){s.label=p[1];break}if(p[0]===6&&s.label<a[1]){s.label=a[1],a=p;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(p);break}a[2]&&s.ops.pop(),s.trys.pop();continue}p=r.call(i,s)}catch(x){p=[6,x],c=0}finally{u=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Ow=xt&&xt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(xt,"__esModule",{value:!0});xt.HumanError=void 0;var rh=Ow(qt()),Rw=Hn(),Cw=rh.default.colors,Iw=function(){function i(r){var s=r.errorMessage,u=r.tips;this.errorMessage=s,console.log(`
|
|
37
37
|
`.concat((0,Rw.bgRed)("ERROR:"))),console.log("TypeError: ".concat(s,`
|