@serverless-devs/s 2.0.100-beta.7 → 2.0.100-beta.8
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 +60 -60
- package/lib/init/index.js +42 -42
- package/lib/init/init-manager.js +10 -27
- package/lib/onboarding/index.js +16 -8
- 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 +1 -1
- package/package.json +1 -1
package/lib/config/add/index.js
CHANGED
|
@@ -31,7 +31,7 @@ __p += '`),z&&(O+=`' +
|
|
|
31
31
|
function print() { __p += __j.call(arguments, '') }
|
|
32
32
|
`:`;
|
|
33
33
|
`)+O+`return __p
|
|
34
|
-
}`;var B=hl(function(){return Y(h,N+"return "+O).apply(i,g)});if(B.source=O,zs(B))throw B;return B}function rm(e){return Z(e).toLowerCase()}function im(e){return Z(e).toUpperCase()}function sm(e,t,n){if(e=Z(e),e&&(n||t===i))return wo(e);if(!e||!(t=Ne(t)))return e;var u=tt(e),l=tt(t),h=Ao(u,l),g=xo(u,l)+1;return Ht(u,h,g).join("")}function um(e,t,n){if(e=Z(e),e&&(n||t===i))return e.slice(0,bo(e)+1);if(!e||!(t=Ne(t)))return e;var u=tt(e),l=xo(u,tt(t))+1;return Ht(u,0,l).join("")}function om(e,t,n){if(e=Z(e),e&&(n||t===i))return e.replace(zi,"");if(!e||!(t=Ne(t)))return e;var u=tt(e),l=Ao(u,tt(t));return Ht(u,l).join("")}function am(e,t){var n=th,u=nh;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=Z(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 m=g?Ht(g,0,_).join(""):e.slice(0,_);if(l===i)return m+u;if(g&&(_+=m.length-_),Vs(l)){if(e.slice(_).search(l)){var S,b=m;for(l.global||(l=fs(l.source,Z(Uu.exec(l))+"g")),l.lastIndex=0;S=l.exec(b);)var O=S.index;m=m.slice(0,O===i?_:O)}}else if(e.indexOf(Ne(l),_)!=_){var R=m.lastIndexOf(l);R>-1&&(m=m.slice(0,R))}return m+u}function lm(e){return e=Z(e),e&&Eh.test(e)?e.replace(Hu,Mp):e}var cm=wn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Js=pa("toUpperCase");function fl(e,t,n){return e=Z(e),t=n?i:t,t===i?$p(e)?Gp(e):Sp(e):e.match(t)||[]}var hl=j(function(e,t){try{return $e(e,i,t)}catch(n){return zs(n)?n:new W(n)}}),fm=Et(function(e,t){return Ue(t,function(n){n=lt(n),mt(e,n,Xs(e[n],e))}),e});function hm(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(c);return[n(u[0]),u[1]]}):[],j(function(u){for(var l=-1;++l<t;){var h=e[l];if($e(h[0],this,u))return $e(h[1],this,u)}})}function pm(e){return Mg(je(e,p))}function Qs(e){return function(){return e}}function gm(e,t){return e==null||e!==e?t:e}var dm=da(),_m=da(!0);function Le(e){return e}function eu(e){return jo(typeof e=="function"?e:je(e,p))}function vm(e){return ko(je(e,p))}function mm(e,t){return zo(e,je(t,p))}var ym=j(function(e,t){return function(n){return Qn(n,e,t)}}),Em=j(function(e,t){return function(n){return Qn(e,n,t)}});function tu(e,t,n){var u=pe(t),l=Qr(t,u);n==null&&!(ie(t)&&(l.length||!u.length))&&(n=t,t=e,e=this,l=Qr(t,pe(t)));var h=!(ie(n)&&"chain"in n)||!!n.chain,g=At(e);return Ue(l,function(_){var m=t[_];e[_]=m,g&&(e.prototype[_]=function(){var S=this.__chain__;if(h||S){var b=e(this.__wrapped__),O=b.__actions__=Ie(this.__actions__);return O.push({func:m,args:arguments,thisArg:e}),b.__chain__=S,b}return m.apply(e,Dt([this.value()],arguments))})}),e}function wm(){return he._===this&&(he._=kp),this}function nu(){}function Am(e){return e=U(e),j(function(t){return Vo(t,e)})}var xm=$s(re),Sm=$s(_o),bm=$s(is);function pl(e){return Ws(e)?ss(lt(e)):td(e)}function Om(e){return function(t){return e==null?i:Yt(e,t)}}var Im=va(),Rm=va(!0);function ru(){return[]}function iu(){return!1}function Cm(){return{}}function Lm(){return""}function Tm(){return!0}function Dm(e,t){if(e=U(e),e<1||e>Lt)return[];var n=ut,u=me(e,ut);t=q(t),e-=ut;for(var l=as(u,t);++n<e;)t(n);return l}function $m(e){return G(e)?re(e,lt):qe(e)?[e]:Ie($a(Z(e)))}function Pm(e){var t=++jp;return Z(e)+t}var Nm=si(function(e,t){return e+t},0),qm=Ps("ceil"),Fm=si(function(e,t){return e/t},1),Mm=Ps("floor");function Hm(e){return e&&e.length?Jr(e,Le,ys):i}function Wm(e,t){return e&&e.length?Jr(e,q(t,2),ys):i}function Gm(e){return yo(e,Le)}function Um(e,t){return yo(e,q(t,2))}function Bm(e){return e&&e.length?Jr(e,Le,xs):i}function Km(e,t){return e&&e.length?Jr(e,q(t,2),xs):i}var jm=si(function(e,t){return e*t},1),Xm=Ps("round"),km=si(function(e,t){return e-t},0);function zm(e){return e&&e.length?os(e,Le):0}function Vm(e,t){return e&&e.length?os(e,q(t,2)):0}return f.after=v0,f.ary=Ka,f.assign=iv,f.assignIn=il,f.assignInWith=mi,f.assignWith=sv,f.at=uv,f.before=ja,f.bind=Xs,f.bindAll=fm,f.bindKey=Xa,f.castArray=C0,f.chain=Ga,f.chunk=Md,f.compact=Hd,f.concat=Wd,f.cond=hm,f.conforms=pm,f.constant=Qs,f.countBy=z_,f.create=ov,f.curry=ka,f.curryRight=za,f.debounce=Va,f.defaults=av,f.defaultsDeep=lv,f.defer=m0,f.delay=y0,f.difference=Gd,f.differenceBy=Ud,f.differenceWith=Bd,f.drop=Kd,f.dropRight=jd,f.dropRightWhile=Xd,f.dropWhile=kd,f.fill=zd,f.filter=Y_,f.flatMap=Q_,f.flatMapDeep=e0,f.flatMapDepth=t0,f.flatten=Fa,f.flattenDeep=Vd,f.flattenDepth=Yd,f.flip=E0,f.flow=dm,f.flowRight=_m,f.fromPairs=Zd,f.functions=_v,f.functionsIn=vv,f.groupBy=n0,f.initial=Qd,f.intersection=e_,f.intersectionBy=t_,f.intersectionWith=n_,f.invert=yv,f.invertBy=Ev,f.invokeMap=i0,f.iteratee=eu,f.keyBy=s0,f.keys=pe,f.keysIn=Ce,f.map=hi,f.mapKeys=Av,f.mapValues=xv,f.matches=vm,f.matchesProperty=mm,f.memoize=gi,f.merge=Sv,f.mergeWith=sl,f.method=ym,f.methodOf=Em,f.mixin=tu,f.negate=di,f.nthArg=Am,f.omit=bv,f.omitBy=Ov,f.once=w0,f.orderBy=u0,f.over=xm,f.overArgs=A0,f.overEvery=Sm,f.overSome=bm,f.partial=ks,f.partialRight=Ya,f.partition=o0,f.pick=Iv,f.pickBy=ul,f.property=pl,f.propertyOf=Om,f.pull=u_,f.pullAll=Ha,f.pullAllBy=o_,f.pullAllWith=a_,f.pullAt=l_,f.range=Im,f.rangeRight=Rm,f.rearg=x0,f.reject=c0,f.remove=c_,f.rest=S0,f.reverse=Ks,f.sampleSize=h0,f.set=Cv,f.setWith=Lv,f.shuffle=p0,f.slice=f_,f.sortBy=_0,f.sortedUniq=m_,f.sortedUniqBy=y_,f.split=Qv,f.spread=b0,f.tail=E_,f.take=w_,f.takeRight=A_,f.takeRightWhile=x_,f.takeWhile=S_,f.tap=H_,f.throttle=O0,f.thru=fi,f.toArray=tl,f.toPairs=ol,f.toPairsIn=al,f.toPath=$m,f.toPlainObject=rl,f.transform=Tv,f.unary=I0,f.union=b_,f.unionBy=O_,f.unionWith=I_,f.uniq=R_,f.uniqBy=C_,f.uniqWith=L_,f.unset=Dv,f.unzip=js,f.unzipWith=Wa,f.update=$v,f.updateWith=Pv,f.values=Sn,f.valuesIn=Nv,f.without=T_,f.words=fl,f.wrap=R0,f.xor=D_,f.xorBy=$_,f.xorWith=P_,f.zip=N_,f.zipObject=q_,f.zipObjectDeep=F_,f.zipWith=M_,f.entries=ol,f.entriesIn=al,f.extend=il,f.extendWith=mi,tu(f,f),f.add=Nm,f.attempt=hl,f.camelCase=Hv,f.capitalize=ll,f.ceil=qm,f.clamp=qv,f.clone=L0,f.cloneDeep=D0,f.cloneDeepWith=$0,f.cloneWith=T0,f.conformsTo=P0,f.deburr=cl,f.defaultTo=gm,f.divide=Fm,f.endsWith=Wv,f.eq=rt,f.escape=Gv,f.escapeRegExp=Uv,f.every=V_,f.find=Z_,f.findIndex=Na,f.findKey=cv,f.findLast=J_,f.findLastIndex=qa,f.findLastKey=fv,f.floor=Mm,f.forEach=Ua,f.forEachRight=Ba,f.forIn=hv,f.forInRight=pv,f.forOwn=gv,f.forOwnRight=dv,f.get=Ys,f.gt=N0,f.gte=q0,f.has=mv,f.hasIn=Zs,f.head=Ma,f.identity=Le,f.includes=r0,f.indexOf=Jd,f.inRange=Fv,f.invoke=wv,f.isArguments=Qt,f.isArray=G,f.isArrayBuffer=F0,f.isArrayLike=Re,f.isArrayLikeObject=ue,f.isBoolean=M0,f.isBuffer=Wt,f.isDate=H0,f.isElement=W0,f.isEmpty=G0,f.isEqual=U0,f.isEqualWith=B0,f.isError=zs,f.isFinite=K0,f.isFunction=At,f.isInteger=Za,f.isLength=_i,f.isMap=Ja,f.isMatch=j0,f.isMatchWith=X0,f.isNaN=k0,f.isNative=z0,f.isNil=Y0,f.isNull=V0,f.isNumber=Qa,f.isObject=ie,f.isObjectLike=se,f.isPlainObject=sr,f.isRegExp=Vs,f.isSafeInteger=Z0,f.isSet=el,f.isString=vi,f.isSymbol=qe,f.isTypedArray=xn,f.isUndefined=J0,f.isWeakMap=Q0,f.isWeakSet=ev,f.join=r_,f.kebabCase=Bv,f.last=ke,f.lastIndexOf=i_,f.lowerCase=Kv,f.lowerFirst=jv,f.lt=tv,f.lte=nv,f.max=Hm,f.maxBy=Wm,f.mean=Gm,f.meanBy=Um,f.min=Bm,f.minBy=Km,f.stubArray=ru,f.stubFalse=iu,f.stubObject=Cm,f.stubString=Lm,f.stubTrue=Tm,f.multiply=jm,f.nth=s_,f.noConflict=wm,f.noop=nu,f.now=pi,f.pad=Xv,f.padEnd=kv,f.padStart=zv,f.parseInt=Vv,f.random=Mv,f.reduce=a0,f.reduceRight=l0,f.repeat=Yv,f.replace=Zv,f.result=Rv,f.round=Xm,f.runInContext=v,f.sample=f0,f.size=g0,f.snakeCase=Jv,f.some=d0,f.sortedIndex=h_,f.sortedIndexBy=p_,f.sortedIndexOf=g_,f.sortedLastIndex=d_,f.sortedLastIndexBy=__,f.sortedLastIndexOf=v_,f.startCase=em,f.startsWith=tm,f.subtract=km,f.sum=zm,f.sumBy=Vm,f.template=nm,f.times=Dm,f.toFinite=xt,f.toInteger=U,f.toLength=nl,f.toLower=rm,f.toNumber=ze,f.toSafeInteger=rv,f.toString=Z,f.toUpper=im,f.trim=sm,f.trimEnd=um,f.trimStart=om,f.truncate=am,f.unescape=lm,f.uniqueId=Pm,f.upperCase=cm,f.upperFirst=Js,f.each=Ua,f.eachRight=Ba,f.first=Ma,tu(f,function(){var e={};return ot(f,function(t,n){J.call(f.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),f.VERSION=r,Ue(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){f[e].placeholder=f}),Ue(["drop","take"],function(e,t){k.prototype[e]=function(n){n=n===i?1:fe(U(n),0);var u=this.__filtered__&&!t?new k(this):this.clone();return u.__filtered__?u.__takeCount__=me(n,u.__takeCount__):u.__views__.push({size:me(n,ut),type:e+(u.__dir__<0?"Right":"")}),u},k.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Ue(["filter","map","takeWhile"],function(e,t){var n=t+1,u=n==qu||n==uh;k.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":"");k.prototype[e]=function(){return this[n](1).value()[0]}}),Ue(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");k.prototype[e]=function(){return this.__filtered__?new k(this):this[n](1)}}),k.prototype.compact=function(){return this.filter(Le)},k.prototype.find=function(e){return this.filter(e).head()},k.prototype.findLast=function(e){return this.reverse().find(e)},k.prototype.invokeMap=j(function(e,t){return typeof e=="function"?new k(this):this.map(function(n){return Qn(n,e,t)})}),k.prototype.reject=function(e){return this.filter(di(q(e)))},k.prototype.slice=function(e,t){e=U(e);var n=this;return n.__filtered__&&(e>0||t<0)?new k(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)},k.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},k.prototype.toArray=function(){return this.take(ut)},ot(k.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),u=/^(?:head|last)$/.test(t),l=f[u?"take"+(t=="last"?"Right":""):t],h=u||/^find/.test(t);!l||(f.prototype[t]=function(){var g=this.__wrapped__,_=u?[1]:arguments,m=g instanceof k,S=_[0],b=m||G(g),O=function(X){var z=l.apply(f,Dt([X],_));return u&&R?z[0]:z};b&&n&&typeof S=="function"&&S.length!=1&&(m=b=!1);var R=this.__chain__,N=!!this.__actions__.length,F=h&&!R,B=m&&!N;if(!h&&b){g=B?g:new k(this);var M=e.apply(g,_);return M.__actions__.push({func:fi,args:[O],thisArg:i}),new Ke(M,R)}return F&&B?e.apply(this,_):(M=this.thru(O),F?u?M.value()[0]:M.value():M)})}),Ue(["pop","push","shift","sort","splice","unshift"],function(e){var t=Fr[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",u=/^(?:pop|shift)$/.test(e);f.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(k.prototype,function(e,t){var n=f[t];if(n){var u=n.name+"";J.call(mn,u)||(mn[u]=[]),mn[u].push({name:t,func:n})}}),mn[ii(i,Je).name]=[{name:"wrapper",func:i}],k.prototype.clone=lg,k.prototype.reverse=cg,k.prototype.value=fg,f.prototype.at=W_,f.prototype.chain=G_,f.prototype.commit=U_,f.prototype.next=B_,f.prototype.plant=j_,f.prototype.reverse=X_,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=k_,f.prototype.first=f.prototype.head,Xn&&(f.prototype[Xn]=K_),f},Pt=Up();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(he._=Pt,define(function(){return Pt})):jt?((jt.exports=Pt)._=Pt,es._=Pt):he._=Pt}).call(Rn)});var Ou=T(Te=>{"use strict";var pE=Te&&Te.__awaiter||function(i,r,s,o){function c(a){return a instanceof s?a:new s(function(d){d(a)})}return new(s||(s=Promise))(function(a,d){function y(A){try{p(o.next(A))}catch(I){d(I)}}function E(A){try{p(o.throw(A))}catch(I){d(I)}}function p(A){A.done?a(A.value):c(A.value).then(y,E)}p((o=o.apply(i,r||[])).next())})},gE=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,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(A){return E([p,A])}}function E(p){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=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(A){p=[6,A],c=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},If=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 Rf=If(require("path")),bu=If(It()),ct=bu.default.fse,$i=bu.default.jsyaml,Su=bu.default.getRootHome;function dE(i){var r=Lf();ct.writeFileSync(r,$i.dump(i))}function Cf(){var i=Lf();if(!ct.existsSync(i))return{};try{var r=$i.load(ct.readFileSync(i,"utf8"))||{};return r}catch(s){throw s}}function Lf(){var i=Rf.default.join(Su(),"set-config.yml");return ct.existsSync(i)||ct.createFileSync(i),i}function _E(i,r){var s=Cf();s[i]=r,dE(s)}Te.setConfig=_E;function vE(i,r){var s=Cf();return s[i]||r}Te.getConfig=vE;function mE(i){return pE(this,void 0,void 0,function(){var r,s,o,c,a,d,y;return gE(this,function(E){switch(E.label){case 0:if(r=i.filePath||"set-config.yml",s=Rf.default.join(Su(),r),o=ct.existsSync(s),c={},o)return[3,5];a=Su(),E.label=1;case 1:return E.trys.push([1,2,,4]),ct.statSync(a),[3,4];case 2:return d=E.sent(),[4,ct.mkdirSync(a)];case 3:return E.sent(),[3,4];case 4:return[3,6];case 5:try{c=$i.load(ct.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,ct.writeFileSync(s,$i.dump(c))]);case 7:return E.sent(),[2,c]}})})}Te.handlerProfileFile=mE});var Tf=T((jA,yE)=>{yE.exports={name:"@serverless-devs/s",version:"2.0.100-beta.7",description:"Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",homepage:"https://www.serverless-devs.com",keywords:["serverless","alibaba","tencent","azure","baidu","huawei","google","function","faas","serverless-devs"],publishConfig:{access:"public",registry:"https://registry.npmjs.org"},license:"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 Ni=T(H=>{"use strict";var EE=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]}),wE=H&&H.__setModuleDefault||(Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r}),AE=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)&&EE(r,i,s);return wE(r,i),r},xr=H&&H.__awaiter||function(i,r,s,o){function c(a){return a instanceof s?a:new s(function(d){d(a)})}return new(s||(s=Promise))(function(a,d){function y(A){try{p(o.next(A))}catch(I){d(I)}}function E(A){try{p(o.throw(A))}catch(I){d(I)}}function p(A){A.done?a(A.value):c(A.value).then(y,E)}p((o=o.apply(i,r||[])).next())})},Sr=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,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(A){return E([p,A])}}function E(p){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=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(A){p=[6,A],c=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 xE=Iu(require("path")),Ar=Iu(require("fs")),Ut=Of(),SE=Iu(require("os")),ft=AE(It()),bE=Ou(),Df=Tf(),Pi=ft.default.colors,OE=ft.default.got,IE=ft.default.getMAC,RE=ft.default.isDocker,CE=ft.default.isCiCdEnv,LE=ft.default.getGlobalArgs,$f=ft.default.getCredential,Pf=ft.default.getCredentialAliasList;H.red=Pi.hex("#fd5750");H.yellow=Pi.hex("#F3F99D");H.bgRed=Pi.hex("#000").bgHex("#fd5750");var TE=function(){var i=process.env.serverless_devs_temp_argv;try{var r=JSON.parse(i),s=LE(r);return process.argv=process.argv.slice(0,2).concat(s._argsObj),(0,Ut.assign)({},s,{noHelpArgv:process.argv.slice(0,2).concat((0,Ut.filter)(s._argsObj,function(o){return!(0,Ut.includes)(["-h","--help"],o)}))})}catch{return{}}};H.getProcessArgv=TE;var DE=function(i){return xr(void 0,void 0,void 0,function(){var r,s;return Sr(this,function(o){switch(o.label){case 0:return[4,Pf()];case 1:return r=o.sent(),(0,Ut.includes)(r,i)?[4,$f(i)]:[3,3];case 2:return s=o.sent(),[2,(0,Ut.omit)(s,"Alias")];case 3:return[2]}})})};H.getCredentialWithExisted=DE;var $E=function(){return xr(void 0,void 0,void 0,function(){var i,r,s,o,c,a;return Sr(this,function(d){switch(d.label){case 0:return[4,Pf()];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?(c=o[s],[4,$f(c)]):[3,5];case 3:a=d.sent(),r[a.Alias]=(0,Ut.omit)(a,"Alias"),d.label=4;case 4:return s++,[3,2];case 5:return[2,r];case 6:return[2]}})})};H.getCredentialWithAll=$E;var PE=function(i,r){return r===void 0&&(r="unknow"),xr(void 0,void 0,void 0,function(){var s,o,c,a;return Sr(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),s=(0,bE.getConfig)("analysis"),s!=="enable"?[2]:RE()||CE()?[2]:[4,OE("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(),c=(0,Ut.get)(o.body,"shorturl"),c&&console.log(`AI Tips:
|
|
34
|
+
}`;var B=hl(function(){return Y(h,N+"return "+O).apply(i,g)});if(B.source=O,zs(B))throw B;return B}function rm(e){return Z(e).toLowerCase()}function im(e){return Z(e).toUpperCase()}function sm(e,t,n){if(e=Z(e),e&&(n||t===i))return wo(e);if(!e||!(t=Ne(t)))return e;var u=tt(e),l=tt(t),h=Ao(u,l),g=xo(u,l)+1;return Ht(u,h,g).join("")}function um(e,t,n){if(e=Z(e),e&&(n||t===i))return e.slice(0,bo(e)+1);if(!e||!(t=Ne(t)))return e;var u=tt(e),l=xo(u,tt(t))+1;return Ht(u,0,l).join("")}function om(e,t,n){if(e=Z(e),e&&(n||t===i))return e.replace(zi,"");if(!e||!(t=Ne(t)))return e;var u=tt(e),l=Ao(u,tt(t));return Ht(u,l).join("")}function am(e,t){var n=th,u=nh;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=Z(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 m=g?Ht(g,0,_).join(""):e.slice(0,_);if(l===i)return m+u;if(g&&(_+=m.length-_),Vs(l)){if(e.slice(_).search(l)){var S,b=m;for(l.global||(l=fs(l.source,Z(Uu.exec(l))+"g")),l.lastIndex=0;S=l.exec(b);)var O=S.index;m=m.slice(0,O===i?_:O)}}else if(e.indexOf(Ne(l),_)!=_){var R=m.lastIndexOf(l);R>-1&&(m=m.slice(0,R))}return m+u}function lm(e){return e=Z(e),e&&Eh.test(e)?e.replace(Hu,Mp):e}var cm=wn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Js=pa("toUpperCase");function fl(e,t,n){return e=Z(e),t=n?i:t,t===i?$p(e)?Gp(e):Sp(e):e.match(t)||[]}var hl=j(function(e,t){try{return $e(e,i,t)}catch(n){return zs(n)?n:new W(n)}}),fm=Et(function(e,t){return Ue(t,function(n){n=lt(n),mt(e,n,Xs(e[n],e))}),e});function hm(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(c);return[n(u[0]),u[1]]}):[],j(function(u){for(var l=-1;++l<t;){var h=e[l];if($e(h[0],this,u))return $e(h[1],this,u)}})}function pm(e){return Mg(je(e,p))}function Qs(e){return function(){return e}}function gm(e,t){return e==null||e!==e?t:e}var dm=da(),_m=da(!0);function Le(e){return e}function eu(e){return jo(typeof e=="function"?e:je(e,p))}function vm(e){return ko(je(e,p))}function mm(e,t){return zo(e,je(t,p))}var ym=j(function(e,t){return function(n){return Qn(n,e,t)}}),Em=j(function(e,t){return function(n){return Qn(e,n,t)}});function tu(e,t,n){var u=pe(t),l=Qr(t,u);n==null&&!(ie(t)&&(l.length||!u.length))&&(n=t,t=e,e=this,l=Qr(t,pe(t)));var h=!(ie(n)&&"chain"in n)||!!n.chain,g=At(e);return Ue(l,function(_){var m=t[_];e[_]=m,g&&(e.prototype[_]=function(){var S=this.__chain__;if(h||S){var b=e(this.__wrapped__),O=b.__actions__=Ie(this.__actions__);return O.push({func:m,args:arguments,thisArg:e}),b.__chain__=S,b}return m.apply(e,Dt([this.value()],arguments))})}),e}function wm(){return he._===this&&(he._=kp),this}function nu(){}function Am(e){return e=U(e),j(function(t){return Vo(t,e)})}var xm=$s(re),Sm=$s(_o),bm=$s(is);function pl(e){return Ws(e)?ss(lt(e)):td(e)}function Om(e){return function(t){return e==null?i:Yt(e,t)}}var Im=va(),Rm=va(!0);function ru(){return[]}function iu(){return!1}function Cm(){return{}}function Lm(){return""}function Tm(){return!0}function Dm(e,t){if(e=U(e),e<1||e>Lt)return[];var n=ut,u=me(e,ut);t=q(t),e-=ut;for(var l=as(u,t);++n<e;)t(n);return l}function $m(e){return G(e)?re(e,lt):qe(e)?[e]:Ie($a(Z(e)))}function Pm(e){var t=++jp;return Z(e)+t}var Nm=si(function(e,t){return e+t},0),qm=Ps("ceil"),Fm=si(function(e,t){return e/t},1),Mm=Ps("floor");function Hm(e){return e&&e.length?Jr(e,Le,ys):i}function Wm(e,t){return e&&e.length?Jr(e,q(t,2),ys):i}function Gm(e){return yo(e,Le)}function Um(e,t){return yo(e,q(t,2))}function Bm(e){return e&&e.length?Jr(e,Le,xs):i}function Km(e,t){return e&&e.length?Jr(e,q(t,2),xs):i}var jm=si(function(e,t){return e*t},1),Xm=Ps("round"),km=si(function(e,t){return e-t},0);function zm(e){return e&&e.length?os(e,Le):0}function Vm(e,t){return e&&e.length?os(e,q(t,2)):0}return f.after=v0,f.ary=Ka,f.assign=iv,f.assignIn=il,f.assignInWith=mi,f.assignWith=sv,f.at=uv,f.before=ja,f.bind=Xs,f.bindAll=fm,f.bindKey=Xa,f.castArray=C0,f.chain=Ga,f.chunk=Md,f.compact=Hd,f.concat=Wd,f.cond=hm,f.conforms=pm,f.constant=Qs,f.countBy=z_,f.create=ov,f.curry=ka,f.curryRight=za,f.debounce=Va,f.defaults=av,f.defaultsDeep=lv,f.defer=m0,f.delay=y0,f.difference=Gd,f.differenceBy=Ud,f.differenceWith=Bd,f.drop=Kd,f.dropRight=jd,f.dropRightWhile=Xd,f.dropWhile=kd,f.fill=zd,f.filter=Y_,f.flatMap=Q_,f.flatMapDeep=e0,f.flatMapDepth=t0,f.flatten=Fa,f.flattenDeep=Vd,f.flattenDepth=Yd,f.flip=E0,f.flow=dm,f.flowRight=_m,f.fromPairs=Zd,f.functions=_v,f.functionsIn=vv,f.groupBy=n0,f.initial=Qd,f.intersection=e_,f.intersectionBy=t_,f.intersectionWith=n_,f.invert=yv,f.invertBy=Ev,f.invokeMap=i0,f.iteratee=eu,f.keyBy=s0,f.keys=pe,f.keysIn=Ce,f.map=hi,f.mapKeys=Av,f.mapValues=xv,f.matches=vm,f.matchesProperty=mm,f.memoize=gi,f.merge=Sv,f.mergeWith=sl,f.method=ym,f.methodOf=Em,f.mixin=tu,f.negate=di,f.nthArg=Am,f.omit=bv,f.omitBy=Ov,f.once=w0,f.orderBy=u0,f.over=xm,f.overArgs=A0,f.overEvery=Sm,f.overSome=bm,f.partial=ks,f.partialRight=Ya,f.partition=o0,f.pick=Iv,f.pickBy=ul,f.property=pl,f.propertyOf=Om,f.pull=u_,f.pullAll=Ha,f.pullAllBy=o_,f.pullAllWith=a_,f.pullAt=l_,f.range=Im,f.rangeRight=Rm,f.rearg=x0,f.reject=c0,f.remove=c_,f.rest=S0,f.reverse=Ks,f.sampleSize=h0,f.set=Cv,f.setWith=Lv,f.shuffle=p0,f.slice=f_,f.sortBy=_0,f.sortedUniq=m_,f.sortedUniqBy=y_,f.split=Qv,f.spread=b0,f.tail=E_,f.take=w_,f.takeRight=A_,f.takeRightWhile=x_,f.takeWhile=S_,f.tap=H_,f.throttle=O0,f.thru=fi,f.toArray=tl,f.toPairs=ol,f.toPairsIn=al,f.toPath=$m,f.toPlainObject=rl,f.transform=Tv,f.unary=I0,f.union=b_,f.unionBy=O_,f.unionWith=I_,f.uniq=R_,f.uniqBy=C_,f.uniqWith=L_,f.unset=Dv,f.unzip=js,f.unzipWith=Wa,f.update=$v,f.updateWith=Pv,f.values=Sn,f.valuesIn=Nv,f.without=T_,f.words=fl,f.wrap=R0,f.xor=D_,f.xorBy=$_,f.xorWith=P_,f.zip=N_,f.zipObject=q_,f.zipObjectDeep=F_,f.zipWith=M_,f.entries=ol,f.entriesIn=al,f.extend=il,f.extendWith=mi,tu(f,f),f.add=Nm,f.attempt=hl,f.camelCase=Hv,f.capitalize=ll,f.ceil=qm,f.clamp=qv,f.clone=L0,f.cloneDeep=D0,f.cloneDeepWith=$0,f.cloneWith=T0,f.conformsTo=P0,f.deburr=cl,f.defaultTo=gm,f.divide=Fm,f.endsWith=Wv,f.eq=rt,f.escape=Gv,f.escapeRegExp=Uv,f.every=V_,f.find=Z_,f.findIndex=Na,f.findKey=cv,f.findLast=J_,f.findLastIndex=qa,f.findLastKey=fv,f.floor=Mm,f.forEach=Ua,f.forEachRight=Ba,f.forIn=hv,f.forInRight=pv,f.forOwn=gv,f.forOwnRight=dv,f.get=Ys,f.gt=N0,f.gte=q0,f.has=mv,f.hasIn=Zs,f.head=Ma,f.identity=Le,f.includes=r0,f.indexOf=Jd,f.inRange=Fv,f.invoke=wv,f.isArguments=Qt,f.isArray=G,f.isArrayBuffer=F0,f.isArrayLike=Re,f.isArrayLikeObject=ue,f.isBoolean=M0,f.isBuffer=Wt,f.isDate=H0,f.isElement=W0,f.isEmpty=G0,f.isEqual=U0,f.isEqualWith=B0,f.isError=zs,f.isFinite=K0,f.isFunction=At,f.isInteger=Za,f.isLength=_i,f.isMap=Ja,f.isMatch=j0,f.isMatchWith=X0,f.isNaN=k0,f.isNative=z0,f.isNil=Y0,f.isNull=V0,f.isNumber=Qa,f.isObject=ie,f.isObjectLike=se,f.isPlainObject=sr,f.isRegExp=Vs,f.isSafeInteger=Z0,f.isSet=el,f.isString=vi,f.isSymbol=qe,f.isTypedArray=xn,f.isUndefined=J0,f.isWeakMap=Q0,f.isWeakSet=ev,f.join=r_,f.kebabCase=Bv,f.last=ke,f.lastIndexOf=i_,f.lowerCase=Kv,f.lowerFirst=jv,f.lt=tv,f.lte=nv,f.max=Hm,f.maxBy=Wm,f.mean=Gm,f.meanBy=Um,f.min=Bm,f.minBy=Km,f.stubArray=ru,f.stubFalse=iu,f.stubObject=Cm,f.stubString=Lm,f.stubTrue=Tm,f.multiply=jm,f.nth=s_,f.noConflict=wm,f.noop=nu,f.now=pi,f.pad=Xv,f.padEnd=kv,f.padStart=zv,f.parseInt=Vv,f.random=Mv,f.reduce=a0,f.reduceRight=l0,f.repeat=Yv,f.replace=Zv,f.result=Rv,f.round=Xm,f.runInContext=v,f.sample=f0,f.size=g0,f.snakeCase=Jv,f.some=d0,f.sortedIndex=h_,f.sortedIndexBy=p_,f.sortedIndexOf=g_,f.sortedLastIndex=d_,f.sortedLastIndexBy=__,f.sortedLastIndexOf=v_,f.startCase=em,f.startsWith=tm,f.subtract=km,f.sum=zm,f.sumBy=Vm,f.template=nm,f.times=Dm,f.toFinite=xt,f.toInteger=U,f.toLength=nl,f.toLower=rm,f.toNumber=ze,f.toSafeInteger=rv,f.toString=Z,f.toUpper=im,f.trim=sm,f.trimEnd=um,f.trimStart=om,f.truncate=am,f.unescape=lm,f.uniqueId=Pm,f.upperCase=cm,f.upperFirst=Js,f.each=Ua,f.eachRight=Ba,f.first=Ma,tu(f,function(){var e={};return ot(f,function(t,n){J.call(f.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),f.VERSION=r,Ue(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){f[e].placeholder=f}),Ue(["drop","take"],function(e,t){k.prototype[e]=function(n){n=n===i?1:fe(U(n),0);var u=this.__filtered__&&!t?new k(this):this.clone();return u.__filtered__?u.__takeCount__=me(n,u.__takeCount__):u.__views__.push({size:me(n,ut),type:e+(u.__dir__<0?"Right":"")}),u},k.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Ue(["filter","map","takeWhile"],function(e,t){var n=t+1,u=n==qu||n==uh;k.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":"");k.prototype[e]=function(){return this[n](1).value()[0]}}),Ue(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");k.prototype[e]=function(){return this.__filtered__?new k(this):this[n](1)}}),k.prototype.compact=function(){return this.filter(Le)},k.prototype.find=function(e){return this.filter(e).head()},k.prototype.findLast=function(e){return this.reverse().find(e)},k.prototype.invokeMap=j(function(e,t){return typeof e=="function"?new k(this):this.map(function(n){return Qn(n,e,t)})}),k.prototype.reject=function(e){return this.filter(di(q(e)))},k.prototype.slice=function(e,t){e=U(e);var n=this;return n.__filtered__&&(e>0||t<0)?new k(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)},k.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},k.prototype.toArray=function(){return this.take(ut)},ot(k.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),u=/^(?:head|last)$/.test(t),l=f[u?"take"+(t=="last"?"Right":""):t],h=u||/^find/.test(t);!l||(f.prototype[t]=function(){var g=this.__wrapped__,_=u?[1]:arguments,m=g instanceof k,S=_[0],b=m||G(g),O=function(X){var z=l.apply(f,Dt([X],_));return u&&R?z[0]:z};b&&n&&typeof S=="function"&&S.length!=1&&(m=b=!1);var R=this.__chain__,N=!!this.__actions__.length,F=h&&!R,B=m&&!N;if(!h&&b){g=B?g:new k(this);var M=e.apply(g,_);return M.__actions__.push({func:fi,args:[O],thisArg:i}),new Ke(M,R)}return F&&B?e.apply(this,_):(M=this.thru(O),F?u?M.value()[0]:M.value():M)})}),Ue(["pop","push","shift","sort","splice","unshift"],function(e){var t=Fr[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",u=/^(?:pop|shift)$/.test(e);f.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(k.prototype,function(e,t){var n=f[t];if(n){var u=n.name+"";J.call(mn,u)||(mn[u]=[]),mn[u].push({name:t,func:n})}}),mn[ii(i,Je).name]=[{name:"wrapper",func:i}],k.prototype.clone=lg,k.prototype.reverse=cg,k.prototype.value=fg,f.prototype.at=W_,f.prototype.chain=G_,f.prototype.commit=U_,f.prototype.next=B_,f.prototype.plant=j_,f.prototype.reverse=X_,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=k_,f.prototype.first=f.prototype.head,Xn&&(f.prototype[Xn]=K_),f},Pt=Up();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(he._=Pt,define(function(){return Pt})):jt?((jt.exports=Pt)._=Pt,es._=Pt):he._=Pt}).call(Rn)});var Ou=T(Te=>{"use strict";var pE=Te&&Te.__awaiter||function(i,r,s,o){function c(a){return a instanceof s?a:new s(function(d){d(a)})}return new(s||(s=Promise))(function(a,d){function y(A){try{p(o.next(A))}catch(I){d(I)}}function E(A){try{p(o.throw(A))}catch(I){d(I)}}function p(A){A.done?a(A.value):c(A.value).then(y,E)}p((o=o.apply(i,r||[])).next())})},gE=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,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(A){return E([p,A])}}function E(p){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=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(A){p=[6,A],c=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},If=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 Rf=If(require("path")),bu=If(It()),ct=bu.default.fse,$i=bu.default.jsyaml,Su=bu.default.getRootHome;function dE(i){var r=Lf();ct.writeFileSync(r,$i.dump(i))}function Cf(){var i=Lf();if(!ct.existsSync(i))return{};try{var r=$i.load(ct.readFileSync(i,"utf8"))||{};return r}catch(s){throw s}}function Lf(){var i=Rf.default.join(Su(),"set-config.yml");return ct.existsSync(i)||ct.createFileSync(i),i}function _E(i,r){var s=Cf();s[i]=r,dE(s)}Te.setConfig=_E;function vE(i,r){var s=Cf();return s[i]||r}Te.getConfig=vE;function mE(i){return pE(this,void 0,void 0,function(){var r,s,o,c,a,d,y;return gE(this,function(E){switch(E.label){case 0:if(r=i.filePath||"set-config.yml",s=Rf.default.join(Su(),r),o=ct.existsSync(s),c={},o)return[3,5];a=Su(),E.label=1;case 1:return E.trys.push([1,2,,4]),ct.statSync(a),[3,4];case 2:return d=E.sent(),[4,ct.mkdirSync(a)];case 3:return E.sent(),[3,4];case 4:return[3,6];case 5:try{c=$i.load(ct.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,ct.writeFileSync(s,$i.dump(c))]);case 7:return E.sent(),[2,c]}})})}Te.handlerProfileFile=mE});var Tf=T((jA,yE)=>{yE.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 Ni=T(H=>{"use strict";var EE=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]}),wE=H&&H.__setModuleDefault||(Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r}),AE=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)&&EE(r,i,s);return wE(r,i),r},xr=H&&H.__awaiter||function(i,r,s,o){function c(a){return a instanceof s?a:new s(function(d){d(a)})}return new(s||(s=Promise))(function(a,d){function y(A){try{p(o.next(A))}catch(I){d(I)}}function E(A){try{p(o.throw(A))}catch(I){d(I)}}function p(A){A.done?a(A.value):c(A.value).then(y,E)}p((o=o.apply(i,r||[])).next())})},Sr=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,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(A){return E([p,A])}}function E(p){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=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(A){p=[6,A],c=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 xE=Iu(require("path")),Ar=Iu(require("fs")),Ut=Of(),SE=Iu(require("os")),ft=AE(It()),bE=Ou(),Df=Tf(),Pi=ft.default.colors,OE=ft.default.got,IE=ft.default.getMAC,RE=ft.default.isDocker,CE=ft.default.isCiCdEnv,LE=ft.default.getGlobalArgs,$f=ft.default.getCredential,Pf=ft.default.getCredentialAliasList;H.red=Pi.hex("#fd5750");H.yellow=Pi.hex("#F3F99D");H.bgRed=Pi.hex("#000").bgHex("#fd5750");var TE=function(){var i=process.env.serverless_devs_temp_argv;try{var r=JSON.parse(i),s=LE(r);return process.argv=process.argv.slice(0,2).concat(s._argsObj),(0,Ut.assign)({},s,{noHelpArgv:process.argv.slice(0,2).concat((0,Ut.filter)(s._argsObj,function(o){return!(0,Ut.includes)(["-h","--help"],o)}))})}catch{return{}}};H.getProcessArgv=TE;var DE=function(i){return xr(void 0,void 0,void 0,function(){var r,s;return Sr(this,function(o){switch(o.label){case 0:return[4,Pf()];case 1:return r=o.sent(),(0,Ut.includes)(r,i)?[4,$f(i)]:[3,3];case 2:return s=o.sent(),[2,(0,Ut.omit)(s,"Alias")];case 3:return[2]}})})};H.getCredentialWithExisted=DE;var $E=function(){return xr(void 0,void 0,void 0,function(){var i,r,s,o,c,a;return Sr(this,function(d){switch(d.label){case 0:return[4,Pf()];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?(c=o[s],[4,$f(c)]):[3,5];case 3:a=d.sent(),r[a.Alias]=(0,Ut.omit)(a,"Alias"),d.label=4;case 4:return s++,[3,2];case 5:return[2,r];case 6:return[2]}})})};H.getCredentialWithAll=$E;var PE=function(i,r){return r===void 0&&(r="unknow"),xr(void 0,void 0,void 0,function(){var s,o,c,a;return Sr(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),s=(0,bE.getConfig)("analysis"),s!=="enable"?[2]:RE()||CE()?[2]:[4,OE("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(),c=(0,Ut.get)(o.body,"shorturl"),c&&console.log(`AI Tips:
|
|
35
35
|
You can try to solve the problem through: `.concat(Pi.underline(c),`
|
|
36
36
|
`)),[3,3];case 2:return a=d.sent(),[3,3];case 3:return[2]}})})};H.aiRequest=PE;var NE=function(){try{return IE().replace(/:/g,"")}catch{return"unknown"}};H.getPid=NE;function qE(){var i=(0,ft.getCoreVersion)(),r="".concat(process.platform,"-").concat(process.arch),s="node-".concat(process.version),o="core: ".concat(i),c="s-home: ".concat(ft.default.getRootHome()),a="".concat(Df.name,": ").concat(Df.version);return i?"".concat(a,", ").concat(o,", ").concat(c,", ").concat(r,", ").concat(s):"".concat(a,", ").concat(c,", ").concat(r,", ").concat(s)}H.getVersion=qE;function FE(i){return xr(this,void 0,void 0,function(){function r(c){return xr(this,void 0,void 0,function(){var a,d;return Sr(this,function(y){switch(y.label){case 0:return a=Ar.default.lstatSync(c),typeof a!="object"?[2]:(s.set(a.ino,a.size),a.isDirectory()?(d=Ar.default.readdirSync(c),typeof d!="object"?[2]:[4,Promise.all(d.map(function(E){return r(xE.default.join(c,E))}))]):[3,2]);case 1:y.sent(),y.label=2;case 2:return[2]}})})}var s,o;return Sr(this,function(c){switch(c.label){case 0:return s=new Map,[4,r(i)];case 1:return c.sent(),o=Array.from(s.values()).reduce(function(a,d){return a+d},0),[2,o]}})})}H.getFolderSize=FE;function ME(i,r){r===void 0&&(r=" ");for(var s="",o=0;o<i;o++)s=s+r;return s}H.printn=ME;function HE(){return"en"}H.getLang=HE;function Nf(i,r){var s=/\{\{(.*?)\}\}/g,o=i.match(s);if(o)for(var c=0;c<o.length;c++){var a=o[c].replace(/{{|}}/g,""),d=(0,Ut.trim)(a.split("|")[0]);r[d]&&(i=i.replace(o[c],r[d]))}return i}H.replaceFun=Nf;function WE(i,r){i.forEach(function(s){if(Ar.default.existsSync(s)){var o=Ar.default.readFileSync(s,"utf-8"),c=Nf(o,r);Ar.default.writeFileSync(s,c,"utf-8")}})}H.replaceTemplate=WE;function GE(i){if(!i)return i;var r=i.slice(-4);return"***********".concat(r)}H.mark=GE;function UE(i,r){return SE.default.platform()==="win32"?r||"\u25C6":"".concat(i," ")}H.emoji=UE});var qf=T(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.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 Ff=T(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.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 Hf=T(br=>{"use strict";var Mf=br&&br.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(br,"__esModule",{value:!0});var BE=Ni(),KE=Mf(qf()),jE=Mf(Ff()),Lu={en:jE.default,zh:KE.default},XE=function(i){var r=(0,BE.getLang)(),s=Lu[r]?Lu[r][i]:Lu.en[i];return s||i};br.default=XE});var Du=T(Ae=>{"use strict";var kE=Ae&&Ae.__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]}),Wf=Ae&&Ae.__exportStar||function(i,r){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(r,s)&&kE(r,i,s)},Tu=Ae&&Ae.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.registerCommandChecker=Ae.i18n=Ae.logger=void 0;var zE=Tu(xu());Wf(Ni(),Ae);Wf(Ou(),Ae);var VE=xu();Object.defineProperty(Ae,"logger",{enumerable:!0,get:function(){return Tu(VE).default}});var YE=Hf();Object.defineProperty(Ae,"i18n",{enumerable:!0,get:function(){return Tu(YE).default}});function ZE(i){i.on("command:*",function(r){var s=i.commands.map(function(o){return o.name()});s.includes(r[0])||(zE.default.error(" error: unknown command ".concat(r[0])),i.help())})}Ae.registerCommandChecker=ZE});var an=T(Cn=>{"use strict";var JE=Cn&&Cn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.ServerlessError=void 0;var QE=JE(It()),ew=QE.default.Logger,tw=new ew("S-CLI-ERROR"),nw=function(){function i(r,s,o){tw.error(r+": "+s,o),process.exit(1)}return i}();Cn.ServerlessError=nw});var Gf=T(Ln=>{"use strict";var rw=Ln&&Ln.__extends||function(){var i=function(r,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(o[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 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 iw=an(),sw=function(i){rw(r,i);function r(s,o){return i.call(this,"Error",s,o)||this}return r}(iw.ServerlessError);Ln.CommandError=sw});var Uf=T(Tn=>{"use strict";var uw=Tn&&Tn.__extends||function(){var i=function(r,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(o[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 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 ow=an(),aw=function(i){uw(r,i);function r(s,o){return i.call(this,"Deletion failed",s,o)||this}return r}(ow.ServerlessError);Tn.ConfigDeleteError=aw});var Bf=T(Dn=>{"use strict";var lw=Dn&&Dn.__extends||function(){var i=function(r,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(o[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 o(){this.constructor=r}r.prototype=s===null?Object.create(s):(o.prototype=s.prototype,new o)}}();Object.defineProperty(Dn,"__esModule",{value:!0});Dn.ConfigError=void 0;var cw=an(),fw=function(i){lw(r,i);function r(s,o){return i.call(this,"Config failed",s,o)||this}return r}(cw.ServerlessError);Dn.ConfigError=fw});var Kf=T($n=>{"use strict";var hw=$n&&$n.__extends||function(){var i=function(r,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(o[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 o(){this.constructor=r}r.prototype=s===null?Object.create(s):(o.prototype=s.prototype,new o)}}();Object.defineProperty($n,"__esModule",{value:!0});$n.ConfigGetError=void 0;var pw=an(),gw=function(i){hw(r,i);function r(s,o){return i.call(this,"Get failed",s,o)||this}return r}(pw.ServerlessError);$n.ConfigGetError=gw});var jf=T(Pn=>{"use strict";var dw=Pn&&Pn.__extends||function(){var i=function(r,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(o[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 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 _w=an(),vw=function(i){dw(r,i);function r(s,o){return i.call(this,"Initialization failed",s,o)||this}return r}(_w.ServerlessError);Pn.InitError=vw});var kf=T(ht=>{"use strict";var mw=ht&&ht.__awaiter||function(i,r,s,o){function c(a){return a instanceof s?a:new s(function(d){d(a)})}return new(s||(s=Promise))(function(a,d){function y(A){try{p(o.next(A))}catch(I){d(I)}}function E(A){try{p(o.throw(A))}catch(I){d(I)}}function p(A){A.done?a(A.value):c(A.value).then(y,E)}p((o=o.apply(i,r||[])).next())})},yw=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,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(A){return E([p,A])}}function E(p){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=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(A){p=[6,A],c=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Ew=ht&&ht.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ht,"__esModule",{value:!0});ht.HumanError=void 0;var Xf=Ew(It()),ww=Ni(),Aw=Xf.default.colors,xw=function(){function i(r){var s=r.errorMessage,o=r.tips;this.errorMessage=s,console.log(`
|
|
37
37
|
`.concat((0,ww.bgRed)("ERROR:"))),console.log("TypeError: ".concat(s,`
|
|
@@ -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=cl(function(){return Z(h,P+"return "+S).apply(i,g)});if(B.source=S,Ys(B))throw B;return B}function sm(e){return J(e).toLowerCase()}function um(e){return J(e).toUpperCase()}function om(e,t,n){if(e=J(e),e&&(n||t===i))return yo(e);if(!e||!(t=De(t)))return e;var u=Je(e),l=Je(t),h=wo(u,l),g=xo(u,l)+1;return Nt(u,h,g).join("")}function am(e,t,n){if(e=J(e),e&&(n||t===i))return e.slice(0,Oo(e)+1);if(!e||!(t=De(t)))return e;var u=Je(e),l=xo(u,Je(t))+1;return Nt(u,0,l).join("")}function lm(e,t,n){if(e=J(e),e&&(n||t===i))return e.replace(Yi,"");if(!e||!(t=De(t)))return e;var u=Je(e),l=wo(u,Je(t));return Nt(u,l).join("")}function fm(e,t){var n=rh,u=ih;if(ie(t)){var l="separator"in t?t.separator:l;n="length"in t?U(t.length):n,u="omission"in t?De(t.omission):u}e=J(e);var h=e.length;if(hn(e)){var g=Je(e);h=g.length}if(n>=h)return e;var _=n-pn(u);if(_<1)return u;var m=g?Nt(g,0,_).join(""):e.slice(0,_);if(l===i)return m+u;if(g&&(_+=m.length-_),Ks(l)){if(e.slice(_).search(l)){var O,b=m;for(l.global||(l=cs(l.source,J(Gu.exec(l))+"g")),l.lastIndex=0;O=l.exec(b);)var S=O.index;m=m.slice(0,S===i?_:S)}}else if(e.indexOf(De(l),_)!=_){var R=m.lastIndexOf(l);R>-1&&(m=m.slice(0,R))}return m+u}function cm(e){return e=J(e),e&&xh.test(e)?e.replace(Mu,Wp):e}var hm=En(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),ks=ha("toUpperCase");function fl(e,t,n){return e=J(e),t=n?i:t,t===i?Np(e)?Bp(e):Sp(e):e.match(t)||[]}var cl=X(function(e,t){try{return Te(e,i,t)}catch(n){return Ys(n)?n:new W(n)}}),pm=mt(function(e,t){return He(t,function(n){n=ot(n),_t(e,n,zs(e[n],e))}),e});function gm(e){var t=e==null?0:e.length,n=q();return e=t?re(e,function(u){if(typeof u[1]!="function")throw new We(f);return[n(u[0]),u[1]]}):[],X(function(u){for(var l=-1;++l<t;){var h=e[l];if(Te(h[0],this,u))return Te(h[1],this,u)}})}function dm(e){return Wg(Ue(e,p))}function Qs(e){return function(){return e}}function _m(e,t){return e==null||e!==e?t:e}var vm=ga(),mm=ga(!0);function Ce(e){return e}function eu(e){return jo(typeof e=="function"?e:Ue(e,p))}function Em(e){return zo(Ue(e,p))}function ym(e,t){return Vo(e,Ue(t,p))}var wm=X(function(e,t){return function(n){return Zn(n,e,t)}}),xm=X(function(e,t){return function(n){return Zn(e,n,t)}});function tu(e,t,n){var u=he(t),l=Zr(t,u);n==null&&!(ie(t)&&(l.length||!u.length))&&(n=t,t=e,e=this,l=Zr(t,he(t)));var h=!(ie(n)&&"chain"in n)||!!n.chain,g=yt(e);return He(l,function(_){var m=t[_];e[_]=m,g&&(e.prototype[_]=function(){var O=this.__chain__;if(h||O){var b=e(this.__wrapped__),S=b.__actions__=Se(this.__actions__);return S.push({func:m,args:arguments,thisArg:e}),b.__chain__=O,b}return m.apply(e,It([this.value()],arguments))})}),e}function Am(){return ce._===this&&(ce._=Kp),this}function nu(){}function Om(e){return e=U(e),X(function(t){return Yo(t,e)})}var bm=Ds(re),Sm=Ds(go),Rm=Ds(is);function hl(e){return Ws(e)?ss(ot(e)):rd(e)}function Im(e){return function(t){return e==null?i:Vt(e,t)}}var Cm=_a(),Lm=_a(!0);function ru(){return[]}function iu(){return!1}function Tm(){return{}}function $m(){return""}function Dm(){return!0}function Pm(e,t){if(e=U(e),e<1||e>St)return[];var n=it,u=_e(e,it);t=q(t),e-=it;for(var l=as(u,t);++n<e;)t(n);return l}function Nm(e){return G(e)?re(e,ot):Pe(e)?[e]:Se($a(J(e)))}function qm(e){var t=++Vp;return J(e)+t}var Fm=ni(function(e,t){return e+t},0),Mm=Ps("ceil"),Hm=ni(function(e,t){return e/t},1),Wm=Ps("floor");function Gm(e){return e&&e.length?Kr(e,Ce,Es):i}function Um(e,t){return e&&e.length?Kr(e,q(t,2),Es):i}function Bm(e){return mo(e,Ce)}function jm(e,t){return mo(e,q(t,2))}function Xm(e){return e&&e.length?Kr(e,Ce,As):i}function zm(e,t){return e&&e.length?Kr(e,q(t,2),As):i}var Vm=ni(function(e,t){return e*t},1),Ym=Ps("round"),Km=ni(function(e,t){return e-t},0);function Zm(e){return e&&e.length?os(e,Ce):0}function Jm(e,t){return e&&e.length?os(e,q(t,2)):0}return c.after=E0,c.ary=Ba,c.assign=uv,c.assignIn=rl,c.assignInWith=di,c.assignWith=ov,c.at=av,c.before=ja,c.bind=zs,c.bindAll=pm,c.bindKey=Xa,c.castArray=T0,c.chain=Wa,c.chunk=Wd,c.compact=Gd,c.concat=Ud,c.cond=gm,c.conforms=dm,c.constant=Qs,c.countBy=Z_,c.create=lv,c.curry=za,c.curryRight=Va,c.debounce=Ya,c.defaults=fv,c.defaultsDeep=cv,c.defer=y0,c.delay=w0,c.difference=Bd,c.differenceBy=jd,c.differenceWith=Xd,c.drop=zd,c.dropRight=Vd,c.dropRightWhile=Yd,c.dropWhile=Kd,c.fill=Zd,c.filter=k_,c.flatMap=t0,c.flatMapDeep=n0,c.flatMapDepth=r0,c.flatten=qa,c.flattenDeep=Jd,c.flattenDepth=kd,c.flip=x0,c.flow=vm,c.flowRight=mm,c.fromPairs=Qd,c.functions=mv,c.functionsIn=Ev,c.groupBy=i0,c.initial=t_,c.intersection=n_,c.intersectionBy=r_,c.intersectionWith=i_,c.invert=wv,c.invertBy=xv,c.invokeMap=u0,c.iteratee=eu,c.keyBy=o0,c.keys=he,c.keysIn=Ie,c.map=li,c.mapKeys=Ov,c.mapValues=bv,c.matches=Em,c.matchesProperty=ym,c.memoize=ci,c.merge=Sv,c.mergeWith=il,c.method=wm,c.methodOf=xm,c.mixin=tu,c.negate=hi,c.nthArg=Om,c.omit=Rv,c.omitBy=Iv,c.once=A0,c.orderBy=a0,c.over=bm,c.overArgs=O0,c.overEvery=Sm,c.overSome=Rm,c.partial=Vs,c.partialRight=Ka,c.partition=l0,c.pick=Cv,c.pickBy=sl,c.property=hl,c.propertyOf=Im,c.pull=a_,c.pullAll=Ma,c.pullAllBy=l_,c.pullAllWith=f_,c.pullAt=c_,c.range=Cm,c.rangeRight=Lm,c.rearg=b0,c.reject=h0,c.remove=h_,c.rest=S0,c.reverse=js,c.sampleSize=g0,c.set=Tv,c.setWith=$v,c.shuffle=d0,c.slice=p_,c.sortBy=m0,c.sortedUniq=y_,c.sortedUniqBy=w_,c.split=tm,c.spread=R0,c.tail=x_,c.take=A_,c.takeRight=O_,c.takeRightWhile=b_,c.takeWhile=S_,c.tap=G_,c.throttle=I0,c.thru=ai,c.toArray=el,c.toPairs=ul,c.toPairsIn=ol,c.toPath=Nm,c.toPlainObject=nl,c.transform=Dv,c.unary=C0,c.union=R_,c.unionBy=I_,c.unionWith=C_,c.uniq=L_,c.uniqBy=T_,c.uniqWith=$_,c.unset=Pv,c.unzip=Xs,c.unzipWith=Ha,c.update=Nv,c.updateWith=qv,c.values=xn,c.valuesIn=Fv,c.without=D_,c.words=fl,c.wrap=L0,c.xor=P_,c.xorBy=N_,c.xorWith=q_,c.zip=F_,c.zipObject=M_,c.zipObjectDeep=H_,c.zipWith=W_,c.entries=ul,c.entriesIn=ol,c.extend=rl,c.extendWith=di,tu(c,c),c.add=Fm,c.attempt=cl,c.camelCase=Gv,c.capitalize=al,c.ceil=Mm,c.clamp=Mv,c.clone=$0,c.cloneDeep=P0,c.cloneDeepWith=N0,c.cloneWith=D0,c.conformsTo=q0,c.deburr=ll,c.defaultTo=_m,c.divide=Hm,c.endsWith=Uv,c.eq=Qe,c.escape=Bv,c.escapeRegExp=jv,c.every=J_,c.find=Q_,c.findIndex=Pa,c.findKey=hv,c.findLast=e0,c.findLastIndex=Na,c.findLastKey=pv,c.floor=Wm,c.forEach=Ga,c.forEachRight=Ua,c.forIn=gv,c.forInRight=dv,c.forOwn=_v,c.forOwnRight=vv,c.get=Zs,c.gt=F0,c.gte=M0,c.has=yv,c.hasIn=Js,c.head=Fa,c.identity=Ce,c.includes=s0,c.indexOf=e_,c.inRange=Hv,c.invoke=Av,c.isArguments=Zt,c.isArray=G,c.isArrayBuffer=H0,c.isArrayLike=Re,c.isArrayLikeObject=ue,c.isBoolean=W0,c.isBuffer=qt,c.isDate=G0,c.isElement=U0,c.isEmpty=B0,c.isEqual=j0,c.isEqualWith=X0,c.isError=Ys,c.isFinite=z0,c.isFunction=yt,c.isInteger=Za,c.isLength=pi,c.isMap=Ja,c.isMatch=V0,c.isMatchWith=Y0,c.isNaN=K0,c.isNative=Z0,c.isNil=k0,c.isNull=J0,c.isNumber=ka,c.isObject=ie,c.isObjectLike=se,c.isPlainObject=nr,c.isRegExp=Ks,c.isSafeInteger=Q0,c.isSet=Qa,c.isString=gi,c.isSymbol=Pe,c.isTypedArray=wn,c.isUndefined=ev,c.isWeakMap=tv,c.isWeakSet=nv,c.join=s_,c.kebabCase=Xv,c.last=je,c.lastIndexOf=u_,c.lowerCase=zv,c.lowerFirst=Vv,c.lt=rv,c.lte=iv,c.max=Gm,c.maxBy=Um,c.mean=Bm,c.meanBy=jm,c.min=Xm,c.minBy=zm,c.stubArray=ru,c.stubFalse=iu,c.stubObject=Tm,c.stubString=$m,c.stubTrue=Dm,c.multiply=Vm,c.nth=o_,c.noConflict=Am,c.noop=nu,c.now=fi,c.pad=Yv,c.padEnd=Kv,c.padStart=Zv,c.parseInt=Jv,c.random=Wv,c.reduce=f0,c.reduceRight=c0,c.repeat=kv,c.replace=Qv,c.result=Lv,c.round=Ym,c.runInContext=v,c.sample=p0,c.size=_0,c.snakeCase=em,c.some=v0,c.sortedIndex=g_,c.sortedIndexBy=d_,c.sortedIndexOf=__,c.sortedLastIndex=v_,c.sortedLastIndexBy=m_,c.sortedLastIndexOf=E_,c.startCase=nm,c.startsWith=rm,c.subtract=Km,c.sum=Zm,c.sumBy=Jm,c.template=im,c.times=Pm,c.toFinite=wt,c.toInteger=U,c.toLength=tl,c.toLower=sm,c.toNumber=Xe,c.toSafeInteger=sv,c.toString=J,c.toUpper=um,c.trim=om,c.trimEnd=am,c.trimStart=lm,c.truncate=fm,c.unescape=cm,c.uniqueId=qm,c.upperCase=hm,c.upperFirst=ks,c.each=Ga,c.eachRight=Ua,c.first=Fa,tu(c,function(){var e={};return st(c,function(t,n){k.call(c.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),c.VERSION=r,He(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){c[e].placeholder=c}),He(["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__=_e(n,u.__takeCount__):u.__views__.push({size:_e(n,it),type:e+(u.__dir__<0?"Right":"")}),u},V.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),He(["filter","map","takeWhile"],function(e,t){var n=t+1,u=n==Nu||n==ah;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}}),He(["head","last"],function(e,t){var n="take"+(t?"Right":"");V.prototype[e]=function(){return this[n](1).value()[0]}}),He(["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(Ce)},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 Zn(n,e,t)})}),V.prototype.reject=function(e){return this.filter(hi(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(it)},st(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,m=g instanceof V,O=_[0],b=m||G(g),S=function(z){var Y=l.apply(c,It([z],_));return u&&R?Y[0]:Y};b&&n&&typeof O=="function"&&O.length!=1&&(m=b=!1);var R=this.__chain__,P=!!this.__actions__.length,F=h&&!R,B=m&&!P;if(!h&&b){g=B?g:new V(this);var M=e.apply(g,_);return M.__actions__.push({func:ai,args:[S],thisArg:i}),new Ge(M,R)}return F&&B?e.apply(this,_):(M=this.thru(S),F?u?M.value()[0]:M.value():M)})}),He(["pop","push","shift","sort","splice","unshift"],function(e){var t=Pr[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)})}}),st(V.prototype,function(e,t){var n=c[t];if(n){var u=n.name+"";k.call(_n,u)||(_n[u]=[]),_n[u].push({name:t,func:n})}}),_n[ti(i,Wt).name]=[{name:"wrapper",func:i}],V.prototype.clone=cg,V.prototype.reverse=hg,V.prototype.value=pg,c.prototype.at=U_,c.prototype.chain=B_,c.prototype.commit=j_,c.prototype.next=X_,c.prototype.plant=V_,c.prototype.reverse=Y_,c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=K_,c.prototype.first=c.prototype.head,Bn&&(c.prototype[Bn]=z_),c},Lt=jp();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ce._=Lt,define(function(){return Lt})):Ut?((Ut.exports=Lt)._=Lt,es._=Lt):ce._=Lt}).call(Sn)});var Su=L(Le=>{"use strict";var dy=Le&&Le.__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(A){try{p(o.next(A))}catch(I){d(I)}}function y(A){try{p(o.throw(A))}catch(I){d(I)}}function p(A){A.done?a(A.value):f(A.value).then(E,y)}p((o=o.apply(i,r||[])).next())})},_y=Le&&Le.__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(A){return y([p,A])}}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(A){p=[6,A],f=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Sc=Le&&Le.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Le,"__esModule",{value:!0});Le.handlerProfileFile=Le.getConfig=Le.setConfig=void 0;var Rc=Sc(require("path")),bu=Sc(bt()),at=bu.default.fse,Li=bu.default.jsyaml,Ou=bu.default.getRootHome;function vy(i){var r=Cc();at.writeFileSync(r,Li.dump(i))}function Ic(){var i=Cc();if(!at.existsSync(i))return{};try{var r=Li.load(at.readFileSync(i,"utf8"))||{};return r}catch(s){throw s}}function Cc(){var i=Rc.default.join(Ou(),"set-config.yml");return at.existsSync(i)||at.createFileSync(i),i}function my(i,r){var s=Ic();s[i]=r,vy(s)}Le.setConfig=my;function Ey(i,r){var s=Ic();return s[i]||r}Le.getConfig=Ey;function yy(i){return dy(this,void 0,void 0,function(){var r,s,o,f,a,d,E;return _y(this,function(y){switch(y.label){case 0:if(r=i.filePath||"set-config.yml",s=Rc.default.join(Ou(),r),o=at.existsSync(s),f={},o)return[3,5];a=Ou(),y.label=1;case 1:return y.trys.push([1,2,,4]),at.statSync(a),[3,4];case 2:return d=y.sent(),[4,at.mkdirSync(a)];case 3:return y.sent(),[3,4];case 4:return[3,6];case 5:try{f=Li.load(at.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,at.writeFileSync(s,Li.dump(f))]);case 7:return y.sent(),[2,f]}})})}Le.handlerProfileFile=yy});var Lc=L((zx,wy)=>{wy.exports={name:"@serverless-devs/s",version:"2.0.100-beta.7",description:"Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",homepage:"https://www.serverless-devs.com",keywords:["serverless","alibaba","tencent","azure","baidu","huawei","google","function","faas","serverless-devs"],publishConfig:{access:"public",registry:"https://registry.npmjs.org"},license:"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 $i=L(H=>{"use strict";var xy=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]}),Ay=H&&H.__setModuleDefault||(Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r}),Oy=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)&&xy(r,i,s);return Ay(r,i),r},yr=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(A){try{p(o.next(A))}catch(I){d(I)}}function y(A){try{p(o.throw(A))}catch(I){d(I)}}function p(A){A.done?a(A.value):f(A.value).then(E,y)}p((o=o.apply(i,r||[])).next())})},wr=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(A){return y([p,A])}}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(A){p=[6,A],f=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Ru=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 by=Ru(require("path")),Er=Ru(require("fs")),Mt=bc(),Sy=Ru(require("os")),lt=Oy(bt()),Ry=Su(),Tc=Lc(),Ti=lt.default.colors,Iy=lt.default.got,Cy=lt.default.getMAC,Ly=lt.default.isDocker,Ty=lt.default.isCiCdEnv,$y=lt.default.getGlobalArgs,$c=lt.default.getCredential,Dc=lt.default.getCredentialAliasList;H.red=Ti.hex("#fd5750");H.yellow=Ti.hex("#F3F99D");H.bgRed=Ti.hex("#000").bgHex("#fd5750");var Dy=function(){var i=process.env.serverless_devs_temp_argv;try{var r=JSON.parse(i),s=$y(r);return process.argv=process.argv.slice(0,2).concat(s._argsObj),(0,Mt.assign)({},s,{noHelpArgv:process.argv.slice(0,2).concat((0,Mt.filter)(s._argsObj,function(o){return!(0,Mt.includes)(["-h","--help"],o)}))})}catch{return{}}};H.getProcessArgv=Dy;var Py=function(i){return yr(void 0,void 0,void 0,function(){var r,s;return wr(this,function(o){switch(o.label){case 0:return[4,Dc()];case 1:return r=o.sent(),(0,Mt.includes)(r,i)?[4,$c(i)]:[3,3];case 2:return s=o.sent(),[2,(0,Mt.omit)(s,"Alias")];case 3:return[2]}})})};H.getCredentialWithExisted=Py;var Ny=function(){return yr(void 0,void 0,void 0,function(){var i,r,s,o,f,a;return wr(this,function(d){switch(d.label){case 0:return[4,Dc()];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,$c(f)]):[3,5];case 3:a=d.sent(),r[a.Alias]=(0,Mt.omit)(a,"Alias"),d.label=4;case 4:return s++,[3,2];case 5:return[2,r];case 6:return[2]}})})};H.getCredentialWithAll=Ny;var qy=function(i,r){return r===void 0&&(r="unknow"),yr(void 0,void 0,void 0,function(){var s,o,f,a;return wr(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),s=(0,Ry.getConfig)("analysis"),s!=="enable"?[2]:Ly()||Ty()?[2]:[4,Iy("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,Mt.get)(o.body,"shorturl"),f&&console.log(`AI Tips:
|
|
34
|
+
}`;var B=cl(function(){return Z(h,P+"return "+S).apply(i,g)});if(B.source=S,Ys(B))throw B;return B}function sm(e){return J(e).toLowerCase()}function um(e){return J(e).toUpperCase()}function om(e,t,n){if(e=J(e),e&&(n||t===i))return yo(e);if(!e||!(t=De(t)))return e;var u=Je(e),l=Je(t),h=wo(u,l),g=xo(u,l)+1;return Nt(u,h,g).join("")}function am(e,t,n){if(e=J(e),e&&(n||t===i))return e.slice(0,Oo(e)+1);if(!e||!(t=De(t)))return e;var u=Je(e),l=xo(u,Je(t))+1;return Nt(u,0,l).join("")}function lm(e,t,n){if(e=J(e),e&&(n||t===i))return e.replace(Yi,"");if(!e||!(t=De(t)))return e;var u=Je(e),l=wo(u,Je(t));return Nt(u,l).join("")}function fm(e,t){var n=rh,u=ih;if(ie(t)){var l="separator"in t?t.separator:l;n="length"in t?U(t.length):n,u="omission"in t?De(t.omission):u}e=J(e);var h=e.length;if(hn(e)){var g=Je(e);h=g.length}if(n>=h)return e;var _=n-pn(u);if(_<1)return u;var m=g?Nt(g,0,_).join(""):e.slice(0,_);if(l===i)return m+u;if(g&&(_+=m.length-_),Ks(l)){if(e.slice(_).search(l)){var O,b=m;for(l.global||(l=cs(l.source,J(Gu.exec(l))+"g")),l.lastIndex=0;O=l.exec(b);)var S=O.index;m=m.slice(0,S===i?_:S)}}else if(e.indexOf(De(l),_)!=_){var R=m.lastIndexOf(l);R>-1&&(m=m.slice(0,R))}return m+u}function cm(e){return e=J(e),e&&xh.test(e)?e.replace(Mu,Wp):e}var hm=En(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),ks=ha("toUpperCase");function fl(e,t,n){return e=J(e),t=n?i:t,t===i?Np(e)?Bp(e):Sp(e):e.match(t)||[]}var cl=X(function(e,t){try{return Te(e,i,t)}catch(n){return Ys(n)?n:new W(n)}}),pm=mt(function(e,t){return He(t,function(n){n=ot(n),_t(e,n,zs(e[n],e))}),e});function gm(e){var t=e==null?0:e.length,n=q();return e=t?re(e,function(u){if(typeof u[1]!="function")throw new We(f);return[n(u[0]),u[1]]}):[],X(function(u){for(var l=-1;++l<t;){var h=e[l];if(Te(h[0],this,u))return Te(h[1],this,u)}})}function dm(e){return Wg(Ue(e,p))}function Qs(e){return function(){return e}}function _m(e,t){return e==null||e!==e?t:e}var vm=ga(),mm=ga(!0);function Ce(e){return e}function eu(e){return jo(typeof e=="function"?e:Ue(e,p))}function Em(e){return zo(Ue(e,p))}function ym(e,t){return Vo(e,Ue(t,p))}var wm=X(function(e,t){return function(n){return Zn(n,e,t)}}),xm=X(function(e,t){return function(n){return Zn(e,n,t)}});function tu(e,t,n){var u=he(t),l=Zr(t,u);n==null&&!(ie(t)&&(l.length||!u.length))&&(n=t,t=e,e=this,l=Zr(t,he(t)));var h=!(ie(n)&&"chain"in n)||!!n.chain,g=yt(e);return He(l,function(_){var m=t[_];e[_]=m,g&&(e.prototype[_]=function(){var O=this.__chain__;if(h||O){var b=e(this.__wrapped__),S=b.__actions__=Se(this.__actions__);return S.push({func:m,args:arguments,thisArg:e}),b.__chain__=O,b}return m.apply(e,It([this.value()],arguments))})}),e}function Am(){return ce._===this&&(ce._=Kp),this}function nu(){}function Om(e){return e=U(e),X(function(t){return Yo(t,e)})}var bm=Ds(re),Sm=Ds(go),Rm=Ds(is);function hl(e){return Ws(e)?ss(ot(e)):rd(e)}function Im(e){return function(t){return e==null?i:Vt(e,t)}}var Cm=_a(),Lm=_a(!0);function ru(){return[]}function iu(){return!1}function Tm(){return{}}function $m(){return""}function Dm(){return!0}function Pm(e,t){if(e=U(e),e<1||e>St)return[];var n=it,u=_e(e,it);t=q(t),e-=it;for(var l=as(u,t);++n<e;)t(n);return l}function Nm(e){return G(e)?re(e,ot):Pe(e)?[e]:Se($a(J(e)))}function qm(e){var t=++Vp;return J(e)+t}var Fm=ni(function(e,t){return e+t},0),Mm=Ps("ceil"),Hm=ni(function(e,t){return e/t},1),Wm=Ps("floor");function Gm(e){return e&&e.length?Kr(e,Ce,Es):i}function Um(e,t){return e&&e.length?Kr(e,q(t,2),Es):i}function Bm(e){return mo(e,Ce)}function jm(e,t){return mo(e,q(t,2))}function Xm(e){return e&&e.length?Kr(e,Ce,As):i}function zm(e,t){return e&&e.length?Kr(e,q(t,2),As):i}var Vm=ni(function(e,t){return e*t},1),Ym=Ps("round"),Km=ni(function(e,t){return e-t},0);function Zm(e){return e&&e.length?os(e,Ce):0}function Jm(e,t){return e&&e.length?os(e,q(t,2)):0}return c.after=E0,c.ary=Ba,c.assign=uv,c.assignIn=rl,c.assignInWith=di,c.assignWith=ov,c.at=av,c.before=ja,c.bind=zs,c.bindAll=pm,c.bindKey=Xa,c.castArray=T0,c.chain=Wa,c.chunk=Wd,c.compact=Gd,c.concat=Ud,c.cond=gm,c.conforms=dm,c.constant=Qs,c.countBy=Z_,c.create=lv,c.curry=za,c.curryRight=Va,c.debounce=Ya,c.defaults=fv,c.defaultsDeep=cv,c.defer=y0,c.delay=w0,c.difference=Bd,c.differenceBy=jd,c.differenceWith=Xd,c.drop=zd,c.dropRight=Vd,c.dropRightWhile=Yd,c.dropWhile=Kd,c.fill=Zd,c.filter=k_,c.flatMap=t0,c.flatMapDeep=n0,c.flatMapDepth=r0,c.flatten=qa,c.flattenDeep=Jd,c.flattenDepth=kd,c.flip=x0,c.flow=vm,c.flowRight=mm,c.fromPairs=Qd,c.functions=mv,c.functionsIn=Ev,c.groupBy=i0,c.initial=t_,c.intersection=n_,c.intersectionBy=r_,c.intersectionWith=i_,c.invert=wv,c.invertBy=xv,c.invokeMap=u0,c.iteratee=eu,c.keyBy=o0,c.keys=he,c.keysIn=Ie,c.map=li,c.mapKeys=Ov,c.mapValues=bv,c.matches=Em,c.matchesProperty=ym,c.memoize=ci,c.merge=Sv,c.mergeWith=il,c.method=wm,c.methodOf=xm,c.mixin=tu,c.negate=hi,c.nthArg=Om,c.omit=Rv,c.omitBy=Iv,c.once=A0,c.orderBy=a0,c.over=bm,c.overArgs=O0,c.overEvery=Sm,c.overSome=Rm,c.partial=Vs,c.partialRight=Ka,c.partition=l0,c.pick=Cv,c.pickBy=sl,c.property=hl,c.propertyOf=Im,c.pull=a_,c.pullAll=Ma,c.pullAllBy=l_,c.pullAllWith=f_,c.pullAt=c_,c.range=Cm,c.rangeRight=Lm,c.rearg=b0,c.reject=h0,c.remove=h_,c.rest=S0,c.reverse=js,c.sampleSize=g0,c.set=Tv,c.setWith=$v,c.shuffle=d0,c.slice=p_,c.sortBy=m0,c.sortedUniq=y_,c.sortedUniqBy=w_,c.split=tm,c.spread=R0,c.tail=x_,c.take=A_,c.takeRight=O_,c.takeRightWhile=b_,c.takeWhile=S_,c.tap=G_,c.throttle=I0,c.thru=ai,c.toArray=el,c.toPairs=ul,c.toPairsIn=ol,c.toPath=Nm,c.toPlainObject=nl,c.transform=Dv,c.unary=C0,c.union=R_,c.unionBy=I_,c.unionWith=C_,c.uniq=L_,c.uniqBy=T_,c.uniqWith=$_,c.unset=Pv,c.unzip=Xs,c.unzipWith=Ha,c.update=Nv,c.updateWith=qv,c.values=xn,c.valuesIn=Fv,c.without=D_,c.words=fl,c.wrap=L0,c.xor=P_,c.xorBy=N_,c.xorWith=q_,c.zip=F_,c.zipObject=M_,c.zipObjectDeep=H_,c.zipWith=W_,c.entries=ul,c.entriesIn=ol,c.extend=rl,c.extendWith=di,tu(c,c),c.add=Fm,c.attempt=cl,c.camelCase=Gv,c.capitalize=al,c.ceil=Mm,c.clamp=Mv,c.clone=$0,c.cloneDeep=P0,c.cloneDeepWith=N0,c.cloneWith=D0,c.conformsTo=q0,c.deburr=ll,c.defaultTo=_m,c.divide=Hm,c.endsWith=Uv,c.eq=Qe,c.escape=Bv,c.escapeRegExp=jv,c.every=J_,c.find=Q_,c.findIndex=Pa,c.findKey=hv,c.findLast=e0,c.findLastIndex=Na,c.findLastKey=pv,c.floor=Wm,c.forEach=Ga,c.forEachRight=Ua,c.forIn=gv,c.forInRight=dv,c.forOwn=_v,c.forOwnRight=vv,c.get=Zs,c.gt=F0,c.gte=M0,c.has=yv,c.hasIn=Js,c.head=Fa,c.identity=Ce,c.includes=s0,c.indexOf=e_,c.inRange=Hv,c.invoke=Av,c.isArguments=Zt,c.isArray=G,c.isArrayBuffer=H0,c.isArrayLike=Re,c.isArrayLikeObject=ue,c.isBoolean=W0,c.isBuffer=qt,c.isDate=G0,c.isElement=U0,c.isEmpty=B0,c.isEqual=j0,c.isEqualWith=X0,c.isError=Ys,c.isFinite=z0,c.isFunction=yt,c.isInteger=Za,c.isLength=pi,c.isMap=Ja,c.isMatch=V0,c.isMatchWith=Y0,c.isNaN=K0,c.isNative=Z0,c.isNil=k0,c.isNull=J0,c.isNumber=ka,c.isObject=ie,c.isObjectLike=se,c.isPlainObject=nr,c.isRegExp=Ks,c.isSafeInteger=Q0,c.isSet=Qa,c.isString=gi,c.isSymbol=Pe,c.isTypedArray=wn,c.isUndefined=ev,c.isWeakMap=tv,c.isWeakSet=nv,c.join=s_,c.kebabCase=Xv,c.last=je,c.lastIndexOf=u_,c.lowerCase=zv,c.lowerFirst=Vv,c.lt=rv,c.lte=iv,c.max=Gm,c.maxBy=Um,c.mean=Bm,c.meanBy=jm,c.min=Xm,c.minBy=zm,c.stubArray=ru,c.stubFalse=iu,c.stubObject=Tm,c.stubString=$m,c.stubTrue=Dm,c.multiply=Vm,c.nth=o_,c.noConflict=Am,c.noop=nu,c.now=fi,c.pad=Yv,c.padEnd=Kv,c.padStart=Zv,c.parseInt=Jv,c.random=Wv,c.reduce=f0,c.reduceRight=c0,c.repeat=kv,c.replace=Qv,c.result=Lv,c.round=Ym,c.runInContext=v,c.sample=p0,c.size=_0,c.snakeCase=em,c.some=v0,c.sortedIndex=g_,c.sortedIndexBy=d_,c.sortedIndexOf=__,c.sortedLastIndex=v_,c.sortedLastIndexBy=m_,c.sortedLastIndexOf=E_,c.startCase=nm,c.startsWith=rm,c.subtract=Km,c.sum=Zm,c.sumBy=Jm,c.template=im,c.times=Pm,c.toFinite=wt,c.toInteger=U,c.toLength=tl,c.toLower=sm,c.toNumber=Xe,c.toSafeInteger=sv,c.toString=J,c.toUpper=um,c.trim=om,c.trimEnd=am,c.trimStart=lm,c.truncate=fm,c.unescape=cm,c.uniqueId=qm,c.upperCase=hm,c.upperFirst=ks,c.each=Ga,c.eachRight=Ua,c.first=Fa,tu(c,function(){var e={};return st(c,function(t,n){k.call(c.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),c.VERSION=r,He(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){c[e].placeholder=c}),He(["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__=_e(n,u.__takeCount__):u.__views__.push({size:_e(n,it),type:e+(u.__dir__<0?"Right":"")}),u},V.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),He(["filter","map","takeWhile"],function(e,t){var n=t+1,u=n==Nu||n==ah;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}}),He(["head","last"],function(e,t){var n="take"+(t?"Right":"");V.prototype[e]=function(){return this[n](1).value()[0]}}),He(["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(Ce)},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 Zn(n,e,t)})}),V.prototype.reject=function(e){return this.filter(hi(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(it)},st(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,m=g instanceof V,O=_[0],b=m||G(g),S=function(z){var Y=l.apply(c,It([z],_));return u&&R?Y[0]:Y};b&&n&&typeof O=="function"&&O.length!=1&&(m=b=!1);var R=this.__chain__,P=!!this.__actions__.length,F=h&&!R,B=m&&!P;if(!h&&b){g=B?g:new V(this);var M=e.apply(g,_);return M.__actions__.push({func:ai,args:[S],thisArg:i}),new Ge(M,R)}return F&&B?e.apply(this,_):(M=this.thru(S),F?u?M.value()[0]:M.value():M)})}),He(["pop","push","shift","sort","splice","unshift"],function(e){var t=Pr[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)})}}),st(V.prototype,function(e,t){var n=c[t];if(n){var u=n.name+"";k.call(_n,u)||(_n[u]=[]),_n[u].push({name:t,func:n})}}),_n[ti(i,Wt).name]=[{name:"wrapper",func:i}],V.prototype.clone=cg,V.prototype.reverse=hg,V.prototype.value=pg,c.prototype.at=U_,c.prototype.chain=B_,c.prototype.commit=j_,c.prototype.next=X_,c.prototype.plant=V_,c.prototype.reverse=Y_,c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=K_,c.prototype.first=c.prototype.head,Bn&&(c.prototype[Bn]=z_),c},Lt=jp();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ce._=Lt,define(function(){return Lt})):Ut?((Ut.exports=Lt)._=Lt,es._=Lt):ce._=Lt}).call(Sn)});var Su=L(Le=>{"use strict";var dy=Le&&Le.__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(A){try{p(o.next(A))}catch(I){d(I)}}function y(A){try{p(o.throw(A))}catch(I){d(I)}}function p(A){A.done?a(A.value):f(A.value).then(E,y)}p((o=o.apply(i,r||[])).next())})},_y=Le&&Le.__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(A){return y([p,A])}}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(A){p=[6,A],f=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Sc=Le&&Le.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Le,"__esModule",{value:!0});Le.handlerProfileFile=Le.getConfig=Le.setConfig=void 0;var Rc=Sc(require("path")),bu=Sc(bt()),at=bu.default.fse,Li=bu.default.jsyaml,Ou=bu.default.getRootHome;function vy(i){var r=Cc();at.writeFileSync(r,Li.dump(i))}function Ic(){var i=Cc();if(!at.existsSync(i))return{};try{var r=Li.load(at.readFileSync(i,"utf8"))||{};return r}catch(s){throw s}}function Cc(){var i=Rc.default.join(Ou(),"set-config.yml");return at.existsSync(i)||at.createFileSync(i),i}function my(i,r){var s=Ic();s[i]=r,vy(s)}Le.setConfig=my;function Ey(i,r){var s=Ic();return s[i]||r}Le.getConfig=Ey;function yy(i){return dy(this,void 0,void 0,function(){var r,s,o,f,a,d,E;return _y(this,function(y){switch(y.label){case 0:if(r=i.filePath||"set-config.yml",s=Rc.default.join(Ou(),r),o=at.existsSync(s),f={},o)return[3,5];a=Ou(),y.label=1;case 1:return y.trys.push([1,2,,4]),at.statSync(a),[3,4];case 2:return d=y.sent(),[4,at.mkdirSync(a)];case 3:return y.sent(),[3,4];case 4:return[3,6];case 5:try{f=Li.load(at.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,at.writeFileSync(s,Li.dump(f))]);case 7:return y.sent(),[2,f]}})})}Le.handlerProfileFile=yy});var Lc=L((zx,wy)=>{wy.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 $i=L(H=>{"use strict";var xy=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]}),Ay=H&&H.__setModuleDefault||(Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r}),Oy=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)&&xy(r,i,s);return Ay(r,i),r},yr=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(A){try{p(o.next(A))}catch(I){d(I)}}function y(A){try{p(o.throw(A))}catch(I){d(I)}}function p(A){A.done?a(A.value):f(A.value).then(E,y)}p((o=o.apply(i,r||[])).next())})},wr=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(A){return y([p,A])}}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(A){p=[6,A],f=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Ru=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 by=Ru(require("path")),Er=Ru(require("fs")),Mt=bc(),Sy=Ru(require("os")),lt=Oy(bt()),Ry=Su(),Tc=Lc(),Ti=lt.default.colors,Iy=lt.default.got,Cy=lt.default.getMAC,Ly=lt.default.isDocker,Ty=lt.default.isCiCdEnv,$y=lt.default.getGlobalArgs,$c=lt.default.getCredential,Dc=lt.default.getCredentialAliasList;H.red=Ti.hex("#fd5750");H.yellow=Ti.hex("#F3F99D");H.bgRed=Ti.hex("#000").bgHex("#fd5750");var Dy=function(){var i=process.env.serverless_devs_temp_argv;try{var r=JSON.parse(i),s=$y(r);return process.argv=process.argv.slice(0,2).concat(s._argsObj),(0,Mt.assign)({},s,{noHelpArgv:process.argv.slice(0,2).concat((0,Mt.filter)(s._argsObj,function(o){return!(0,Mt.includes)(["-h","--help"],o)}))})}catch{return{}}};H.getProcessArgv=Dy;var Py=function(i){return yr(void 0,void 0,void 0,function(){var r,s;return wr(this,function(o){switch(o.label){case 0:return[4,Dc()];case 1:return r=o.sent(),(0,Mt.includes)(r,i)?[4,$c(i)]:[3,3];case 2:return s=o.sent(),[2,(0,Mt.omit)(s,"Alias")];case 3:return[2]}})})};H.getCredentialWithExisted=Py;var Ny=function(){return yr(void 0,void 0,void 0,function(){var i,r,s,o,f,a;return wr(this,function(d){switch(d.label){case 0:return[4,Dc()];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,$c(f)]):[3,5];case 3:a=d.sent(),r[a.Alias]=(0,Mt.omit)(a,"Alias"),d.label=4;case 4:return s++,[3,2];case 5:return[2,r];case 6:return[2]}})})};H.getCredentialWithAll=Ny;var qy=function(i,r){return r===void 0&&(r="unknow"),yr(void 0,void 0,void 0,function(){var s,o,f,a;return wr(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),s=(0,Ry.getConfig)("analysis"),s!=="enable"?[2]:Ly()||Ty()?[2]:[4,Iy("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,Mt.get)(o.body,"shorturl"),f&&console.log(`AI Tips:
|
|
35
35
|
You can try to solve the problem through: `.concat(Ti.underline(f),`
|
|
36
36
|
`)),[3,3];case 2:return a=d.sent(),[3,3];case 3:return[2]}})})};H.aiRequest=qy;var Fy=function(){try{return Cy().replace(/:/g,"")}catch{return"unknown"}};H.getPid=Fy;function My(){var i=(0,lt.getCoreVersion)(),r="".concat(process.platform,"-").concat(process.arch),s="node-".concat(process.version),o="core: ".concat(i),f="s-home: ".concat(lt.default.getRootHome()),a="".concat(Tc.name,": ").concat(Tc.version);return i?"".concat(a,", ").concat(o,", ").concat(f,", ").concat(r,", ").concat(s):"".concat(a,", ").concat(f,", ").concat(r,", ").concat(s)}H.getVersion=My;function Hy(i){return yr(this,void 0,void 0,function(){function r(f){return yr(this,void 0,void 0,function(){var a,d;return wr(this,function(E){switch(E.label){case 0:return a=Er.default.lstatSync(f),typeof a!="object"?[2]:(s.set(a.ino,a.size),a.isDirectory()?(d=Er.default.readdirSync(f),typeof d!="object"?[2]:[4,Promise.all(d.map(function(y){return r(by.default.join(f,y))}))]):[3,2]);case 1:E.sent(),E.label=2;case 2:return[2]}})})}var s,o;return wr(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=Hy;function Wy(i,r){r===void 0&&(r=" ");for(var s="",o=0;o<i;o++)s=s+r;return s}H.printn=Wy;function Gy(){return"en"}H.getLang=Gy;function Pc(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,Mt.trim)(a.split("|")[0]);r[d]&&(i=i.replace(o[f],r[d]))}return i}H.replaceFun=Pc;function Uy(i,r){i.forEach(function(s){if(Er.default.existsSync(s)){var o=Er.default.readFileSync(s,"utf-8"),f=Pc(o,r);Er.default.writeFileSync(s,f,"utf-8")}})}H.replaceTemplate=Uy;function By(i){if(!i)return i;var r=i.slice(-4);return"***********".concat(r)}H.mark=By;function jy(i,r){return Sy.default.platform()==="win32"?r||"\u25C6":"".concat(i," ")}H.emoji=jy});var Nc=L(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.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 qc=L(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.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 Mc=L(xr=>{"use strict";var Fc=xr&&xr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(xr,"__esModule",{value:!0});var Xy=$i(),zy=Fc(Nc()),Vy=Fc(qc()),Lu={en:Vy.default,zh:zy.default},Yy=function(i){var r=(0,Xy.getLang)(),s=Lu[r]?Lu[r][i]:Lu.en[i];return s||i};xr.default=Yy});var Di=L(ye=>{"use strict";var Ky=ye&&ye.__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]}),Hc=ye&&ye.__exportStar||function(i,r){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(r,s)&&Ky(r,i,s)},Tu=ye&&ye.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ye,"__esModule",{value:!0});ye.registerCommandChecker=ye.i18n=ye.logger=void 0;var Zy=Tu(Au());Hc($i(),ye);Hc(Su(),ye);var Jy=Au();Object.defineProperty(ye,"logger",{enumerable:!0,get:function(){return Tu(Jy).default}});var ky=Mc();Object.defineProperty(ye,"i18n",{enumerable:!0,get:function(){return Tu(ky).default}});function Qy(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())})}ye.registerCommandChecker=Qy});var sn=L(Rn=>{"use strict";var ew=Rn&&Rn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Rn,"__esModule",{value:!0});Rn.ServerlessError=void 0;var tw=ew(bt()),nw=tw.default.Logger,rw=new nw("S-CLI-ERROR"),iw=function(){function i(r,s,o){rw.error(r+": "+s,o),process.exit(1)}return i}();Rn.ServerlessError=iw});var Wc=L(In=>{"use strict";var sw=In&&In.__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(In,"__esModule",{value:!0});In.CommandError=void 0;var uw=sn(),ow=function(i){sw(r,i);function r(s,o){return i.call(this,"Error",s,o)||this}return r}(uw.ServerlessError);In.CommandError=ow});var Gc=L(Cn=>{"use strict";var aw=Cn&&Cn.__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(Cn,"__esModule",{value:!0});Cn.ConfigDeleteError=void 0;var lw=sn(),fw=function(i){aw(r,i);function r(s,o){return i.call(this,"Deletion failed",s,o)||this}return r}(lw.ServerlessError);Cn.ConfigDeleteError=fw});var Uc=L(Ln=>{"use strict";var cw=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.ConfigError=void 0;var hw=sn(),pw=function(i){cw(r,i);function r(s,o){return i.call(this,"Config failed",s,o)||this}return r}(hw.ServerlessError);Ln.ConfigError=pw});var Bc=L(Tn=>{"use strict";var gw=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.ConfigGetError=void 0;var dw=sn(),_w=function(i){gw(r,i);function r(s,o){return i.call(this,"Get failed",s,o)||this}return r}(dw.ServerlessError);Tn.ConfigGetError=_w});var jc=L($n=>{"use strict";var vw=$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.InitError=void 0;var mw=sn(),Ew=function(i){vw(r,i);function r(s,o){return i.call(this,"Initialization failed",s,o)||this}return r}(mw.ServerlessError);$n.InitError=Ew});var zc=L(ft=>{"use strict";var yw=ft&&ft.__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(A){try{p(o.next(A))}catch(I){d(I)}}function y(A){try{p(o.throw(A))}catch(I){d(I)}}function p(A){A.done?a(A.value):f(A.value).then(E,y)}p((o=o.apply(i,r||[])).next())})},ww=ft&&ft.__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(A){return y([p,A])}}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(A){p=[6,A],f=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},xw=ft&&ft.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ft,"__esModule",{value:!0});ft.HumanError=void 0;var Xc=xw(bt()),Aw=$i(),Ow=Xc.default.colors,bw=function(){function i(r){var s=r.errorMessage,o=r.tips;this.errorMessage=s,console.log(`
|
|
37
37
|
`.concat((0,Aw.bgRed)("ERROR:"))),console.log("TypeError: ".concat(s,`
|
package/lib/config/get/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,P+"return "+S).apply(i,g)});if(B.source=S,zs(B))throw B;return B}function rm(e){return J(e).toLowerCase()}function im(e){return J(e).toUpperCase()}function sm(e,t,n){if(e=J(e),e&&(n||t===i))return xo(e);if(!e||!(t=Pe(t)))return e;var u=ke(e),l=ke(t),h=Ao(u,l),g=Oo(u,l)+1;return qt(u,h,g).join("")}function um(e,t,n){if(e=J(e),e&&(n||t===i))return e.slice(0,So(e)+1);if(!e||!(t=Pe(t)))return e;var u=ke(e),l=Oo(u,ke(t))+1;return qt(u,0,l).join("")}function om(e,t,n){if(e=J(e),e&&(n||t===i))return e.replace(zi,"");if(!e||!(t=Pe(t)))return e;var u=ke(e),l=Ao(u,ke(t));return qt(u,l).join("")}function am(e,t){var n=th,u=nh;if(ie(t)){var l="separator"in t?t.separator:l;n="length"in t?U(t.length):n,u="omission"in t?Pe(t.omission):u}e=J(e);var h=e.length;if(pn(e)){var g=ke(e);h=g.length}if(n>=h)return e;var _=n-gn(u);if(_<1)return u;var m=g?qt(g,0,_).join(""):e.slice(0,_);if(l===i)return m+u;if(g&&(_+=m.length-_),Vs(l)){if(e.slice(_).search(l)){var O,b=m;for(l.global||(l=ls(l.source,J(Bu.exec(l))+"g")),l.lastIndex=0;O=l.exec(b);)var S=O.index;m=m.slice(0,S===i?_:S)}}else if(e.indexOf(Pe(l),_)!=_){var R=m.lastIndexOf(l);R>-1&&(m=m.slice(0,R))}return m+u}function lm(e){return e=J(e),e&&yh.test(e)?e.replace(Wu,Mp):e}var fm=yn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Zs=ga("toUpperCase");function hl(e,t,n){return e=J(e),t=n?i:t,t===i?Dp(e)?Gp(e):Op(e):e.match(t)||[]}var pl=X(function(e,t){try{return $e(e,i,t)}catch(n){return zs(n)?n:new W(n)}}),cm=Et(function(e,t){return We(t,function(n){n=at(n),vt(e,n,js(e[n],e))}),e});function hm(e){var t=e==null?0:e.length,n=q();return e=t?re(e,function(u){if(typeof u[1]!="function")throw new Ge(f);return[n(u[0]),u[1]]}):[],X(function(u){for(var l=-1;++l<t;){var h=e[l];if($e(h[0],this,u))return $e(h[1],this,u)}})}function pm(e){return Mg(Be(e,p))}function Js(e){return function(){return e}}function gm(e,t){return e==null||e!==e?t:e}var dm=_a(),_m=_a(!0);function Ce(e){return e}function ks(e){return zo(typeof e=="function"?e:Be(e,p))}function vm(e){return Yo(Be(e,p))}function mm(e,t){return Ko(e,Be(t,p))}var Em=X(function(e,t){return function(n){return Jn(n,e,t)}}),ym=X(function(e,t){return function(n){return Jn(e,n,t)}});function Qs(e,t,n){var u=he(t),l=Jr(t,u);n==null&&!(ie(t)&&(l.length||!u.length))&&(n=t,t=e,e=this,l=Jr(t,he(t)));var h=!(ie(n)&&"chain"in n)||!!n.chain,g=wt(e);return We(l,function(_){var m=t[_];e[_]=m,g&&(e.prototype[_]=function(){var O=this.__chain__;if(h||O){var b=e(this.__wrapped__),S=b.__actions__=Se(this.__actions__);return S.push({func:m,args:arguments,thisArg:e}),b.__chain__=O,b}return m.apply(e,Ct([this.value()],arguments))})}),e}function wm(){return ce._===this&&(ce._=Vp),this}function eu(){}function xm(e){return e=U(e),X(function(t){return Zo(t,e)})}var Am=Ts(re),Om=Ts(vo),bm=Ts(ns);function gl(e){return Ms(e)?rs(at(e)):td(e)}function Sm(e){return function(t){return e==null?i:Yt(e,t)}}var Rm=ma(),Im=ma(!0);function tu(){return[]}function nu(){return!1}function Cm(){return{}}function Lm(){return""}function Tm(){return!0}function $m(e,t){if(e=U(e),e<1||e>Rt)return[];var n=st,u=_e(e,st);t=q(t),e-=st;for(var l=us(u,t);++n<e;)t(n);return l}function Dm(e){return G(e)?re(e,at):Ne(e)?[e]:Se(Pa(J(e)))}function Pm(e){var t=++Xp;return J(e)+t}var Nm=ri(function(e,t){return e+t},0),qm=$s("ceil"),Fm=ri(function(e,t){return e/t},1),Mm=$s("floor");function Hm(e){return e&&e.length?Zr(e,Ce,vs):i}function Wm(e,t){return e&&e.length?Zr(e,q(t,2),vs):i}function Gm(e){return yo(e,Ce)}function Um(e,t){return yo(e,q(t,2))}function Bm(e){return e&&e.length?Zr(e,Ce,ws):i}function jm(e,t){return e&&e.length?Zr(e,q(t,2),ws):i}var Xm=ri(function(e,t){return e*t},1),zm=$s("round"),Vm=ri(function(e,t){return e-t},0);function Ym(e){return e&&e.length?ss(e,Ce):0}function Km(e,t){return e&&e.length?ss(e,q(t,2)):0}return c.after=v0,c.ary=Xa,c.assign=iv,c.assignIn=sl,c.assignInWith=_i,c.assignWith=sv,c.at=uv,c.before=za,c.bind=js,c.bindAll=cm,c.bindKey=Va,c.castArray=C0,c.chain=Ua,c.chunk=Md,c.compact=Hd,c.concat=Wd,c.cond=hm,c.conforms=pm,c.constant=Js,c.countBy=Y_,c.create=ov,c.curry=Ya,c.curryRight=Ka,c.debounce=Za,c.defaults=av,c.defaultsDeep=lv,c.defer=m0,c.delay=E0,c.difference=Gd,c.differenceBy=Ud,c.differenceWith=Bd,c.drop=jd,c.dropRight=Xd,c.dropRightWhile=zd,c.dropWhile=Vd,c.fill=Yd,c.filter=Z_,c.flatMap=Q_,c.flatMapDeep=e0,c.flatMapDepth=t0,c.flatten=Ma,c.flattenDeep=Kd,c.flattenDepth=Zd,c.flip=y0,c.flow=dm,c.flowRight=_m,c.fromPairs=Jd,c.functions=_v,c.functionsIn=vv,c.groupBy=n0,c.initial=Qd,c.intersection=e_,c.intersectionBy=t_,c.intersectionWith=n_,c.invert=Ev,c.invertBy=yv,c.invokeMap=i0,c.iteratee=ks,c.keyBy=s0,c.keys=he,c.keysIn=Ie,c.map=fi,c.mapKeys=xv,c.mapValues=Av,c.matches=vm,c.matchesProperty=mm,c.memoize=hi,c.merge=Ov,c.mergeWith=ul,c.method=Em,c.methodOf=ym,c.mixin=Qs,c.negate=pi,c.nthArg=xm,c.omit=bv,c.omitBy=Sv,c.once=w0,c.orderBy=u0,c.over=Am,c.overArgs=x0,c.overEvery=Om,c.overSome=bm,c.partial=Xs,c.partialRight=Ja,c.partition=o0,c.pick=Rv,c.pickBy=ol,c.property=gl,c.propertyOf=Sm,c.pull=u_,c.pullAll=Wa,c.pullAllBy=o_,c.pullAllWith=a_,c.pullAt=l_,c.range=Rm,c.rangeRight=Im,c.rearg=A0,c.reject=f0,c.remove=f_,c.rest=O0,c.reverse=Us,c.sampleSize=h0,c.set=Cv,c.setWith=Lv,c.shuffle=p0,c.slice=c_,c.sortBy=_0,c.sortedUniq=m_,c.sortedUniqBy=E_,c.split=Qv,c.spread=b0,c.tail=y_,c.take=w_,c.takeRight=x_,c.takeRightWhile=A_,c.takeWhile=O_,c.tap=H_,c.throttle=S0,c.thru=li,c.toArray=nl,c.toPairs=al,c.toPairsIn=ll,c.toPath=Dm,c.toPlainObject=il,c.transform=Tv,c.unary=R0,c.union=b_,c.unionBy=S_,c.unionWith=R_,c.uniq=I_,c.uniqBy=C_,c.uniqWith=L_,c.unset=$v,c.unzip=Bs,c.unzipWith=Ga,c.update=Dv,c.updateWith=Pv,c.values=An,c.valuesIn=Nv,c.without=T_,c.words=hl,c.wrap=I0,c.xor=$_,c.xorBy=D_,c.xorWith=P_,c.zip=N_,c.zipObject=q_,c.zipObjectDeep=F_,c.zipWith=M_,c.entries=al,c.entriesIn=ll,c.extend=sl,c.extendWith=_i,Qs(c,c),c.add=Nm,c.attempt=pl,c.camelCase=Hv,c.capitalize=fl,c.ceil=qm,c.clamp=qv,c.clone=L0,c.cloneDeep=$0,c.cloneDeepWith=D0,c.cloneWith=T0,c.conformsTo=P0,c.deburr=cl,c.defaultTo=gm,c.divide=Fm,c.endsWith=Wv,c.eq=et,c.escape=Gv,c.escapeRegExp=Uv,c.every=K_,c.find=J_,c.findIndex=qa,c.findKey=fv,c.findLast=k_,c.findLastIndex=Fa,c.findLastKey=cv,c.floor=Mm,c.forEach=Ba,c.forEachRight=ja,c.forIn=hv,c.forInRight=pv,c.forOwn=gv,c.forOwnRight=dv,c.get=Ys,c.gt=N0,c.gte=q0,c.has=mv,c.hasIn=Ks,c.head=Ha,c.identity=Ce,c.includes=r0,c.indexOf=kd,c.inRange=Fv,c.invoke=wv,c.isArguments=Jt,c.isArray=G,c.isArrayBuffer=F0,c.isArrayLike=Re,c.isArrayLikeObject=ue,c.isBoolean=M0,c.isBuffer=Ft,c.isDate=H0,c.isElement=W0,c.isEmpty=G0,c.isEqual=U0,c.isEqualWith=B0,c.isError=zs,c.isFinite=j0,c.isFunction=wt,c.isInteger=ka,c.isLength=gi,c.isMap=Qa,c.isMatch=X0,c.isMatchWith=z0,c.isNaN=V0,c.isNative=Y0,c.isNil=Z0,c.isNull=K0,c.isNumber=el,c.isObject=ie,c.isObjectLike=se,c.isPlainObject=rr,c.isRegExp=Vs,c.isSafeInteger=J0,c.isSet=tl,c.isString=di,c.isSymbol=Ne,c.isTypedArray=xn,c.isUndefined=k0,c.isWeakMap=Q0,c.isWeakSet=ev,c.join=r_,c.kebabCase=Bv,c.last=Xe,c.lastIndexOf=i_,c.lowerCase=jv,c.lowerFirst=Xv,c.lt=tv,c.lte=nv,c.max=Hm,c.maxBy=Wm,c.mean=Gm,c.meanBy=Um,c.min=Bm,c.minBy=jm,c.stubArray=tu,c.stubFalse=nu,c.stubObject=Cm,c.stubString=Lm,c.stubTrue=Tm,c.multiply=Xm,c.nth=s_,c.noConflict=wm,c.noop=eu,c.now=ci,c.pad=zv,c.padEnd=Vv,c.padStart=Yv,c.parseInt=Kv,c.random=Mv,c.reduce=a0,c.reduceRight=l0,c.repeat=Zv,c.replace=Jv,c.result=Iv,c.round=zm,c.runInContext=v,c.sample=c0,c.size=g0,c.snakeCase=kv,c.some=d0,c.sortedIndex=h_,c.sortedIndexBy=p_,c.sortedIndexOf=g_,c.sortedLastIndex=d_,c.sortedLastIndexBy=__,c.sortedLastIndexOf=v_,c.startCase=em,c.startsWith=tm,c.subtract=Vm,c.sum=Ym,c.sumBy=Km,c.template=nm,c.times=$m,c.toFinite=xt,c.toInteger=U,c.toLength=rl,c.toLower=rm,c.toNumber=ze,c.toSafeInteger=rv,c.toString=J,c.toUpper=im,c.trim=sm,c.trimEnd=um,c.trimStart=om,c.truncate=am,c.unescape=lm,c.uniqueId=Pm,c.upperCase=fm,c.upperFirst=Zs,c.each=Ba,c.eachRight=ja,c.first=Ha,Qs(c,function(){var e={};return ut(c,function(t,n){k.call(c.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),c.VERSION=r,We(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){c[e].placeholder=c}),We(["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__=_e(n,u.__takeCount__):u.__views__.push({size:_e(n,st),type:e+(u.__dir__<0?"Right":"")}),u},V.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),We(["filter","map","takeWhile"],function(e,t){var n=t+1,u=n==Fu||n==uh;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}}),We(["head","last"],function(e,t){var n="take"+(t?"Right":"");V.prototype[e]=function(){return this[n](1).value()[0]}}),We(["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(Ce)},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 Jn(n,e,t)})}),V.prototype.reject=function(e){return this.filter(pi(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(st)},ut(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,m=g instanceof V,O=_[0],b=m||G(g),S=function(z){var Y=l.apply(c,Ct([z],_));return u&&R?Y[0]:Y};b&&n&&typeof O=="function"&&O.length!=1&&(m=b=!1);var R=this.__chain__,P=!!this.__actions__.length,F=h&&!R,B=m&&!P;if(!h&&b){g=B?g:new V(this);var M=e.apply(g,_);return M.__actions__.push({func:li,args:[S],thisArg:i}),new Ue(M,R)}return F&&B?e.apply(this,_):(M=this.thru(S),F?u?M.value()[0]:M.value():M)})}),We(["pop","push","shift","sort","splice","unshift"],function(e){var t=Nr[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)})}}),ut(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[ni(i,Gt).name]=[{name:"wrapper",func:i}],V.prototype.clone=lg,V.prototype.reverse=fg,V.prototype.value=cg,c.prototype.at=W_,c.prototype.chain=G_,c.prototype.commit=U_,c.prototype.next=B_,c.prototype.plant=X_,c.prototype.reverse=z_,c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=V_,c.prototype.first=c.prototype.head,jn&&(c.prototype[jn]=j_),c},Tt=Up();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ce._=Tt,define(function(){return Tt})):Bt?((Bt.exports=Tt)._=Tt,ki._=Tt):ce._=Tt}).call(Rn)});var bu=L(Le=>{"use strict";var py=Le&&Le.__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(A){try{p(o.next(A))}catch(I){d(I)}}function y(A){try{p(o.throw(A))}catch(I){d(I)}}function p(A){A.done?a(A.value):f(A.value).then(E,y)}p((o=o.apply(i,r||[])).next())})},gy=Le&&Le.__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(A){return y([p,A])}}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(A){p=[6,A],f=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Rc=Le&&Le.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Le,"__esModule",{value:!0});Le.handlerProfileFile=Le.getConfig=Le.setConfig=void 0;var Ic=Rc(require("path")),Ou=Rc(St()),lt=Ou.default.fse,Ti=Ou.default.jsyaml,Au=Ou.default.getRootHome;function dy(i){var r=Lc();lt.writeFileSync(r,Ti.dump(i))}function Cc(){var i=Lc();if(!lt.existsSync(i))return{};try{var r=Ti.load(lt.readFileSync(i,"utf8"))||{};return r}catch(s){throw s}}function Lc(){var i=Ic.default.join(Au(),"set-config.yml");return lt.existsSync(i)||lt.createFileSync(i),i}function _y(i,r){var s=Cc();s[i]=r,dy(s)}Le.setConfig=_y;function vy(i,r){var s=Cc();return s[i]||r}Le.getConfig=vy;function my(i){return py(this,void 0,void 0,function(){var r,s,o,f,a,d,E;return gy(this,function(y){switch(y.label){case 0:if(r=i.filePath||"set-config.yml",s=Ic.default.join(Au(),r),o=lt.existsSync(s),f={},o)return[3,5];a=Au(),y.label=1;case 1:return y.trys.push([1,2,,4]),lt.statSync(a),[3,4];case 2:return d=y.sent(),[4,lt.mkdirSync(a)];case 3:return y.sent(),[3,4];case 4:return[3,6];case 5:try{f=Ti.load(lt.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,lt.writeFileSync(s,Ti.dump(f))]);case 7:return y.sent(),[2,f]}})})}Le.handlerProfileFile=my});var Tc=L((Ux,Ey)=>{Ey.exports={name:"@serverless-devs/s",version:"2.0.100-beta.7",description:"Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",homepage:"https://www.serverless-devs.com",keywords:["serverless","alibaba","tencent","azure","baidu","huawei","google","function","faas","serverless-devs"],publishConfig:{access:"public",registry:"https://registry.npmjs.org"},license:"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 Di=L(H=>{"use strict";var yy=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]}),wy=H&&H.__setModuleDefault||(Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r}),xy=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)&&yy(r,i,s);return wy(r,i),r},wr=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(A){try{p(o.next(A))}catch(I){d(I)}}function y(A){try{p(o.throw(A))}catch(I){d(I)}}function p(A){A.done?a(A.value):f(A.value).then(E,y)}p((o=o.apply(i,r||[])).next())})},xr=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(A){return y([p,A])}}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(A){p=[6,A],f=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Su=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 Ay=Su(require("path")),yr=Su(require("fs")),Ht=xu(),Oy=Su(require("os")),ft=xy(St()),by=bu(),$c=Tc(),$i=ft.default.colors,Sy=ft.default.got,Ry=ft.default.getMAC,Iy=ft.default.isDocker,Cy=ft.default.isCiCdEnv,Ly=ft.default.getGlobalArgs,Dc=ft.default.getCredential,Pc=ft.default.getCredentialAliasList;H.red=$i.hex("#fd5750");H.yellow=$i.hex("#F3F99D");H.bgRed=$i.hex("#000").bgHex("#fd5750");var Ty=function(){var i=process.env.serverless_devs_temp_argv;try{var r=JSON.parse(i),s=Ly(r);return process.argv=process.argv.slice(0,2).concat(s._argsObj),(0,Ht.assign)({},s,{noHelpArgv:process.argv.slice(0,2).concat((0,Ht.filter)(s._argsObj,function(o){return!(0,Ht.includes)(["-h","--help"],o)}))})}catch{return{}}};H.getProcessArgv=Ty;var $y=function(i){return wr(void 0,void 0,void 0,function(){var r,s;return xr(this,function(o){switch(o.label){case 0:return[4,Pc()];case 1:return r=o.sent(),(0,Ht.includes)(r,i)?[4,Dc(i)]:[3,3];case 2:return s=o.sent(),[2,(0,Ht.omit)(s,"Alias")];case 3:return[2]}})})};H.getCredentialWithExisted=$y;var Dy=function(){return wr(void 0,void 0,void 0,function(){var i,r,s,o,f,a;return xr(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,Ht.omit)(a,"Alias"),d.label=4;case 4:return s++,[3,2];case 5:return[2,r];case 6:return[2]}})})};H.getCredentialWithAll=Dy;var Py=function(i,r){return r===void 0&&(r="unknow"),wr(void 0,void 0,void 0,function(){var s,o,f,a;return xr(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),s=(0,by.getConfig)("analysis"),s!=="enable"?[2]:Iy()||Cy()?[2]:[4,Sy("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,Ht.get)(o.body,"shorturl"),f&&console.log(`AI Tips:
|
|
34
|
+
}`;var B=pl(function(){return Z(h,P+"return "+S).apply(i,g)});if(B.source=S,zs(B))throw B;return B}function rm(e){return J(e).toLowerCase()}function im(e){return J(e).toUpperCase()}function sm(e,t,n){if(e=J(e),e&&(n||t===i))return xo(e);if(!e||!(t=Pe(t)))return e;var u=ke(e),l=ke(t),h=Ao(u,l),g=Oo(u,l)+1;return qt(u,h,g).join("")}function um(e,t,n){if(e=J(e),e&&(n||t===i))return e.slice(0,So(e)+1);if(!e||!(t=Pe(t)))return e;var u=ke(e),l=Oo(u,ke(t))+1;return qt(u,0,l).join("")}function om(e,t,n){if(e=J(e),e&&(n||t===i))return e.replace(zi,"");if(!e||!(t=Pe(t)))return e;var u=ke(e),l=Ao(u,ke(t));return qt(u,l).join("")}function am(e,t){var n=th,u=nh;if(ie(t)){var l="separator"in t?t.separator:l;n="length"in t?U(t.length):n,u="omission"in t?Pe(t.omission):u}e=J(e);var h=e.length;if(pn(e)){var g=ke(e);h=g.length}if(n>=h)return e;var _=n-gn(u);if(_<1)return u;var m=g?qt(g,0,_).join(""):e.slice(0,_);if(l===i)return m+u;if(g&&(_+=m.length-_),Vs(l)){if(e.slice(_).search(l)){var O,b=m;for(l.global||(l=ls(l.source,J(Bu.exec(l))+"g")),l.lastIndex=0;O=l.exec(b);)var S=O.index;m=m.slice(0,S===i?_:S)}}else if(e.indexOf(Pe(l),_)!=_){var R=m.lastIndexOf(l);R>-1&&(m=m.slice(0,R))}return m+u}function lm(e){return e=J(e),e&&yh.test(e)?e.replace(Wu,Mp):e}var fm=yn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Zs=ga("toUpperCase");function hl(e,t,n){return e=J(e),t=n?i:t,t===i?Dp(e)?Gp(e):Op(e):e.match(t)||[]}var pl=X(function(e,t){try{return $e(e,i,t)}catch(n){return zs(n)?n:new W(n)}}),cm=Et(function(e,t){return We(t,function(n){n=at(n),vt(e,n,js(e[n],e))}),e});function hm(e){var t=e==null?0:e.length,n=q();return e=t?re(e,function(u){if(typeof u[1]!="function")throw new Ge(f);return[n(u[0]),u[1]]}):[],X(function(u){for(var l=-1;++l<t;){var h=e[l];if($e(h[0],this,u))return $e(h[1],this,u)}})}function pm(e){return Mg(Be(e,p))}function Js(e){return function(){return e}}function gm(e,t){return e==null||e!==e?t:e}var dm=_a(),_m=_a(!0);function Ce(e){return e}function ks(e){return zo(typeof e=="function"?e:Be(e,p))}function vm(e){return Yo(Be(e,p))}function mm(e,t){return Ko(e,Be(t,p))}var Em=X(function(e,t){return function(n){return Jn(n,e,t)}}),ym=X(function(e,t){return function(n){return Jn(e,n,t)}});function Qs(e,t,n){var u=he(t),l=Jr(t,u);n==null&&!(ie(t)&&(l.length||!u.length))&&(n=t,t=e,e=this,l=Jr(t,he(t)));var h=!(ie(n)&&"chain"in n)||!!n.chain,g=wt(e);return We(l,function(_){var m=t[_];e[_]=m,g&&(e.prototype[_]=function(){var O=this.__chain__;if(h||O){var b=e(this.__wrapped__),S=b.__actions__=Se(this.__actions__);return S.push({func:m,args:arguments,thisArg:e}),b.__chain__=O,b}return m.apply(e,Ct([this.value()],arguments))})}),e}function wm(){return ce._===this&&(ce._=Vp),this}function eu(){}function xm(e){return e=U(e),X(function(t){return Zo(t,e)})}var Am=Ts(re),Om=Ts(vo),bm=Ts(ns);function gl(e){return Ms(e)?rs(at(e)):td(e)}function Sm(e){return function(t){return e==null?i:Yt(e,t)}}var Rm=ma(),Im=ma(!0);function tu(){return[]}function nu(){return!1}function Cm(){return{}}function Lm(){return""}function Tm(){return!0}function $m(e,t){if(e=U(e),e<1||e>Rt)return[];var n=st,u=_e(e,st);t=q(t),e-=st;for(var l=us(u,t);++n<e;)t(n);return l}function Dm(e){return G(e)?re(e,at):Ne(e)?[e]:Se(Pa(J(e)))}function Pm(e){var t=++Xp;return J(e)+t}var Nm=ri(function(e,t){return e+t},0),qm=$s("ceil"),Fm=ri(function(e,t){return e/t},1),Mm=$s("floor");function Hm(e){return e&&e.length?Zr(e,Ce,vs):i}function Wm(e,t){return e&&e.length?Zr(e,q(t,2),vs):i}function Gm(e){return yo(e,Ce)}function Um(e,t){return yo(e,q(t,2))}function Bm(e){return e&&e.length?Zr(e,Ce,ws):i}function jm(e,t){return e&&e.length?Zr(e,q(t,2),ws):i}var Xm=ri(function(e,t){return e*t},1),zm=$s("round"),Vm=ri(function(e,t){return e-t},0);function Ym(e){return e&&e.length?ss(e,Ce):0}function Km(e,t){return e&&e.length?ss(e,q(t,2)):0}return c.after=v0,c.ary=Xa,c.assign=iv,c.assignIn=sl,c.assignInWith=_i,c.assignWith=sv,c.at=uv,c.before=za,c.bind=js,c.bindAll=cm,c.bindKey=Va,c.castArray=C0,c.chain=Ua,c.chunk=Md,c.compact=Hd,c.concat=Wd,c.cond=hm,c.conforms=pm,c.constant=Js,c.countBy=Y_,c.create=ov,c.curry=Ya,c.curryRight=Ka,c.debounce=Za,c.defaults=av,c.defaultsDeep=lv,c.defer=m0,c.delay=E0,c.difference=Gd,c.differenceBy=Ud,c.differenceWith=Bd,c.drop=jd,c.dropRight=Xd,c.dropRightWhile=zd,c.dropWhile=Vd,c.fill=Yd,c.filter=Z_,c.flatMap=Q_,c.flatMapDeep=e0,c.flatMapDepth=t0,c.flatten=Ma,c.flattenDeep=Kd,c.flattenDepth=Zd,c.flip=y0,c.flow=dm,c.flowRight=_m,c.fromPairs=Jd,c.functions=_v,c.functionsIn=vv,c.groupBy=n0,c.initial=Qd,c.intersection=e_,c.intersectionBy=t_,c.intersectionWith=n_,c.invert=Ev,c.invertBy=yv,c.invokeMap=i0,c.iteratee=ks,c.keyBy=s0,c.keys=he,c.keysIn=Ie,c.map=fi,c.mapKeys=xv,c.mapValues=Av,c.matches=vm,c.matchesProperty=mm,c.memoize=hi,c.merge=Ov,c.mergeWith=ul,c.method=Em,c.methodOf=ym,c.mixin=Qs,c.negate=pi,c.nthArg=xm,c.omit=bv,c.omitBy=Sv,c.once=w0,c.orderBy=u0,c.over=Am,c.overArgs=x0,c.overEvery=Om,c.overSome=bm,c.partial=Xs,c.partialRight=Ja,c.partition=o0,c.pick=Rv,c.pickBy=ol,c.property=gl,c.propertyOf=Sm,c.pull=u_,c.pullAll=Wa,c.pullAllBy=o_,c.pullAllWith=a_,c.pullAt=l_,c.range=Rm,c.rangeRight=Im,c.rearg=A0,c.reject=f0,c.remove=f_,c.rest=O0,c.reverse=Us,c.sampleSize=h0,c.set=Cv,c.setWith=Lv,c.shuffle=p0,c.slice=c_,c.sortBy=_0,c.sortedUniq=m_,c.sortedUniqBy=E_,c.split=Qv,c.spread=b0,c.tail=y_,c.take=w_,c.takeRight=x_,c.takeRightWhile=A_,c.takeWhile=O_,c.tap=H_,c.throttle=S0,c.thru=li,c.toArray=nl,c.toPairs=al,c.toPairsIn=ll,c.toPath=Dm,c.toPlainObject=il,c.transform=Tv,c.unary=R0,c.union=b_,c.unionBy=S_,c.unionWith=R_,c.uniq=I_,c.uniqBy=C_,c.uniqWith=L_,c.unset=$v,c.unzip=Bs,c.unzipWith=Ga,c.update=Dv,c.updateWith=Pv,c.values=An,c.valuesIn=Nv,c.without=T_,c.words=hl,c.wrap=I0,c.xor=$_,c.xorBy=D_,c.xorWith=P_,c.zip=N_,c.zipObject=q_,c.zipObjectDeep=F_,c.zipWith=M_,c.entries=al,c.entriesIn=ll,c.extend=sl,c.extendWith=_i,Qs(c,c),c.add=Nm,c.attempt=pl,c.camelCase=Hv,c.capitalize=fl,c.ceil=qm,c.clamp=qv,c.clone=L0,c.cloneDeep=$0,c.cloneDeepWith=D0,c.cloneWith=T0,c.conformsTo=P0,c.deburr=cl,c.defaultTo=gm,c.divide=Fm,c.endsWith=Wv,c.eq=et,c.escape=Gv,c.escapeRegExp=Uv,c.every=K_,c.find=J_,c.findIndex=qa,c.findKey=fv,c.findLast=k_,c.findLastIndex=Fa,c.findLastKey=cv,c.floor=Mm,c.forEach=Ba,c.forEachRight=ja,c.forIn=hv,c.forInRight=pv,c.forOwn=gv,c.forOwnRight=dv,c.get=Ys,c.gt=N0,c.gte=q0,c.has=mv,c.hasIn=Ks,c.head=Ha,c.identity=Ce,c.includes=r0,c.indexOf=kd,c.inRange=Fv,c.invoke=wv,c.isArguments=Jt,c.isArray=G,c.isArrayBuffer=F0,c.isArrayLike=Re,c.isArrayLikeObject=ue,c.isBoolean=M0,c.isBuffer=Ft,c.isDate=H0,c.isElement=W0,c.isEmpty=G0,c.isEqual=U0,c.isEqualWith=B0,c.isError=zs,c.isFinite=j0,c.isFunction=wt,c.isInteger=ka,c.isLength=gi,c.isMap=Qa,c.isMatch=X0,c.isMatchWith=z0,c.isNaN=V0,c.isNative=Y0,c.isNil=Z0,c.isNull=K0,c.isNumber=el,c.isObject=ie,c.isObjectLike=se,c.isPlainObject=rr,c.isRegExp=Vs,c.isSafeInteger=J0,c.isSet=tl,c.isString=di,c.isSymbol=Ne,c.isTypedArray=xn,c.isUndefined=k0,c.isWeakMap=Q0,c.isWeakSet=ev,c.join=r_,c.kebabCase=Bv,c.last=Xe,c.lastIndexOf=i_,c.lowerCase=jv,c.lowerFirst=Xv,c.lt=tv,c.lte=nv,c.max=Hm,c.maxBy=Wm,c.mean=Gm,c.meanBy=Um,c.min=Bm,c.minBy=jm,c.stubArray=tu,c.stubFalse=nu,c.stubObject=Cm,c.stubString=Lm,c.stubTrue=Tm,c.multiply=Xm,c.nth=s_,c.noConflict=wm,c.noop=eu,c.now=ci,c.pad=zv,c.padEnd=Vv,c.padStart=Yv,c.parseInt=Kv,c.random=Mv,c.reduce=a0,c.reduceRight=l0,c.repeat=Zv,c.replace=Jv,c.result=Iv,c.round=zm,c.runInContext=v,c.sample=c0,c.size=g0,c.snakeCase=kv,c.some=d0,c.sortedIndex=h_,c.sortedIndexBy=p_,c.sortedIndexOf=g_,c.sortedLastIndex=d_,c.sortedLastIndexBy=__,c.sortedLastIndexOf=v_,c.startCase=em,c.startsWith=tm,c.subtract=Vm,c.sum=Ym,c.sumBy=Km,c.template=nm,c.times=$m,c.toFinite=xt,c.toInteger=U,c.toLength=rl,c.toLower=rm,c.toNumber=ze,c.toSafeInteger=rv,c.toString=J,c.toUpper=im,c.trim=sm,c.trimEnd=um,c.trimStart=om,c.truncate=am,c.unescape=lm,c.uniqueId=Pm,c.upperCase=fm,c.upperFirst=Zs,c.each=Ba,c.eachRight=ja,c.first=Ha,Qs(c,function(){var e={};return ut(c,function(t,n){k.call(c.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),c.VERSION=r,We(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){c[e].placeholder=c}),We(["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__=_e(n,u.__takeCount__):u.__views__.push({size:_e(n,st),type:e+(u.__dir__<0?"Right":"")}),u},V.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),We(["filter","map","takeWhile"],function(e,t){var n=t+1,u=n==Fu||n==uh;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}}),We(["head","last"],function(e,t){var n="take"+(t?"Right":"");V.prototype[e]=function(){return this[n](1).value()[0]}}),We(["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(Ce)},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 Jn(n,e,t)})}),V.prototype.reject=function(e){return this.filter(pi(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(st)},ut(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,m=g instanceof V,O=_[0],b=m||G(g),S=function(z){var Y=l.apply(c,Ct([z],_));return u&&R?Y[0]:Y};b&&n&&typeof O=="function"&&O.length!=1&&(m=b=!1);var R=this.__chain__,P=!!this.__actions__.length,F=h&&!R,B=m&&!P;if(!h&&b){g=B?g:new V(this);var M=e.apply(g,_);return M.__actions__.push({func:li,args:[S],thisArg:i}),new Ue(M,R)}return F&&B?e.apply(this,_):(M=this.thru(S),F?u?M.value()[0]:M.value():M)})}),We(["pop","push","shift","sort","splice","unshift"],function(e){var t=Nr[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)})}}),ut(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[ni(i,Gt).name]=[{name:"wrapper",func:i}],V.prototype.clone=lg,V.prototype.reverse=fg,V.prototype.value=cg,c.prototype.at=W_,c.prototype.chain=G_,c.prototype.commit=U_,c.prototype.next=B_,c.prototype.plant=X_,c.prototype.reverse=z_,c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=V_,c.prototype.first=c.prototype.head,jn&&(c.prototype[jn]=j_),c},Tt=Up();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ce._=Tt,define(function(){return Tt})):Bt?((Bt.exports=Tt)._=Tt,ki._=Tt):ce._=Tt}).call(Rn)});var bu=L(Le=>{"use strict";var py=Le&&Le.__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(A){try{p(o.next(A))}catch(I){d(I)}}function y(A){try{p(o.throw(A))}catch(I){d(I)}}function p(A){A.done?a(A.value):f(A.value).then(E,y)}p((o=o.apply(i,r||[])).next())})},gy=Le&&Le.__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(A){return y([p,A])}}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(A){p=[6,A],f=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Rc=Le&&Le.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Le,"__esModule",{value:!0});Le.handlerProfileFile=Le.getConfig=Le.setConfig=void 0;var Ic=Rc(require("path")),Ou=Rc(St()),lt=Ou.default.fse,Ti=Ou.default.jsyaml,Au=Ou.default.getRootHome;function dy(i){var r=Lc();lt.writeFileSync(r,Ti.dump(i))}function Cc(){var i=Lc();if(!lt.existsSync(i))return{};try{var r=Ti.load(lt.readFileSync(i,"utf8"))||{};return r}catch(s){throw s}}function Lc(){var i=Ic.default.join(Au(),"set-config.yml");return lt.existsSync(i)||lt.createFileSync(i),i}function _y(i,r){var s=Cc();s[i]=r,dy(s)}Le.setConfig=_y;function vy(i,r){var s=Cc();return s[i]||r}Le.getConfig=vy;function my(i){return py(this,void 0,void 0,function(){var r,s,o,f,a,d,E;return gy(this,function(y){switch(y.label){case 0:if(r=i.filePath||"set-config.yml",s=Ic.default.join(Au(),r),o=lt.existsSync(s),f={},o)return[3,5];a=Au(),y.label=1;case 1:return y.trys.push([1,2,,4]),lt.statSync(a),[3,4];case 2:return d=y.sent(),[4,lt.mkdirSync(a)];case 3:return y.sent(),[3,4];case 4:return[3,6];case 5:try{f=Ti.load(lt.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,lt.writeFileSync(s,Ti.dump(f))]);case 7:return y.sent(),[2,f]}})})}Le.handlerProfileFile=my});var Tc=L((Ux,Ey)=>{Ey.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 Di=L(H=>{"use strict";var yy=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]}),wy=H&&H.__setModuleDefault||(Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r}),xy=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)&&yy(r,i,s);return wy(r,i),r},wr=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(A){try{p(o.next(A))}catch(I){d(I)}}function y(A){try{p(o.throw(A))}catch(I){d(I)}}function p(A){A.done?a(A.value):f(A.value).then(E,y)}p((o=o.apply(i,r||[])).next())})},xr=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(A){return y([p,A])}}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(A){p=[6,A],f=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Su=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 Ay=Su(require("path")),yr=Su(require("fs")),Ht=xu(),Oy=Su(require("os")),ft=xy(St()),by=bu(),$c=Tc(),$i=ft.default.colors,Sy=ft.default.got,Ry=ft.default.getMAC,Iy=ft.default.isDocker,Cy=ft.default.isCiCdEnv,Ly=ft.default.getGlobalArgs,Dc=ft.default.getCredential,Pc=ft.default.getCredentialAliasList;H.red=$i.hex("#fd5750");H.yellow=$i.hex("#F3F99D");H.bgRed=$i.hex("#000").bgHex("#fd5750");var Ty=function(){var i=process.env.serverless_devs_temp_argv;try{var r=JSON.parse(i),s=Ly(r);return process.argv=process.argv.slice(0,2).concat(s._argsObj),(0,Ht.assign)({},s,{noHelpArgv:process.argv.slice(0,2).concat((0,Ht.filter)(s._argsObj,function(o){return!(0,Ht.includes)(["-h","--help"],o)}))})}catch{return{}}};H.getProcessArgv=Ty;var $y=function(i){return wr(void 0,void 0,void 0,function(){var r,s;return xr(this,function(o){switch(o.label){case 0:return[4,Pc()];case 1:return r=o.sent(),(0,Ht.includes)(r,i)?[4,Dc(i)]:[3,3];case 2:return s=o.sent(),[2,(0,Ht.omit)(s,"Alias")];case 3:return[2]}})})};H.getCredentialWithExisted=$y;var Dy=function(){return wr(void 0,void 0,void 0,function(){var i,r,s,o,f,a;return xr(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,Ht.omit)(a,"Alias"),d.label=4;case 4:return s++,[3,2];case 5:return[2,r];case 6:return[2]}})})};H.getCredentialWithAll=Dy;var Py=function(i,r){return r===void 0&&(r="unknow"),wr(void 0,void 0,void 0,function(){var s,o,f,a;return xr(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),s=(0,by.getConfig)("analysis"),s!=="enable"?[2]:Iy()||Cy()?[2]:[4,Sy("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,Ht.get)(o.body,"shorturl"),f&&console.log(`AI Tips:
|
|
35
35
|
You can try to solve the problem through: `.concat($i.underline(f),`
|
|
36
36
|
`)),[3,3];case 2:return a=d.sent(),[3,3];case 3:return[2]}})})};H.aiRequest=Py;var Ny=function(){try{return Ry().replace(/:/g,"")}catch{return"unknown"}};H.getPid=Ny;function qy(){var i=(0,ft.getCoreVersion)(),r="".concat(process.platform,"-").concat(process.arch),s="node-".concat(process.version),o="core: ".concat(i),f="s-home: ".concat(ft.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=qy;function Fy(i){return wr(this,void 0,void 0,function(){function r(f){return wr(this,void 0,void 0,function(){var a,d;return xr(this,function(E){switch(E.label){case 0:return a=yr.default.lstatSync(f),typeof a!="object"?[2]:(s.set(a.ino,a.size),a.isDirectory()?(d=yr.default.readdirSync(f),typeof d!="object"?[2]:[4,Promise.all(d.map(function(y){return r(Ay.default.join(f,y))}))]):[3,2]);case 1:E.sent(),E.label=2;case 2:return[2]}})})}var s,o;return xr(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=Fy;function My(i,r){r===void 0&&(r=" ");for(var s="",o=0;o<i;o++)s=s+r;return s}H.printn=My;function Hy(){return"en"}H.getLang=Hy;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,Ht.trim)(a.split("|")[0]);r[d]&&(i=i.replace(o[f],r[d]))}return i}H.replaceFun=Nc;function Wy(i,r){i.forEach(function(s){if(yr.default.existsSync(s)){var o=yr.default.readFileSync(s,"utf-8"),f=Nc(o,r);yr.default.writeFileSync(s,f,"utf-8")}})}H.replaceTemplate=Wy;function Gy(i){if(!i)return i;var r=i.slice(-4);return"***********".concat(r)}H.mark=Gy;function Uy(i,r){return Oy.default.platform()==="win32"?r||"\u25C6":"".concat(i," ")}H.emoji=Uy});var qc=L(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.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(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.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(Ar=>{"use strict";var Mc=Ar&&Ar.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ar,"__esModule",{value:!0});var By=Di(),jy=Mc(qc()),Xy=Mc(Fc()),Cu={en:Xy.default,zh:jy.default},zy=function(i){var r=(0,By.getLang)(),s=Cu[r]?Cu[r][i]:Cu.en[i];return s||i};Ar.default=zy});var Tu=L(ye=>{"use strict";var Vy=ye&&ye.__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=ye&&ye.__exportStar||function(i,r){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(r,s)&&Vy(r,i,s)},Lu=ye&&ye.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ye,"__esModule",{value:!0});ye.registerCommandChecker=ye.i18n=ye.logger=void 0;var Yy=Lu(wu());Wc(Di(),ye);Wc(bu(),ye);var Ky=wu();Object.defineProperty(ye,"logger",{enumerable:!0,get:function(){return Lu(Ky).default}});var Zy=Hc();Object.defineProperty(ye,"i18n",{enumerable:!0,get:function(){return Lu(Zy).default}});function Jy(i){i.on("command:*",function(r){var s=i.commands.map(function(o){return o.name()});s.includes(r[0])||(Yy.default.error(" error: unknown command ".concat(r[0])),i.help())})}ye.registerCommandChecker=Jy});var un=L(In=>{"use strict";var ky=In&&In.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(In,"__esModule",{value:!0});In.ServerlessError=void 0;var Qy=ky(St()),ew=Qy.default.Logger,tw=new ew("S-CLI-ERROR"),nw=function(){function i(r,s,o){tw.error(r+": "+s,o),process.exit(1)}return i}();In.ServerlessError=nw});var Gc=L(Cn=>{"use strict";var rw=Cn&&Cn.__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(Cn,"__esModule",{value:!0});Cn.CommandError=void 0;var iw=un(),sw=function(i){rw(r,i);function r(s,o){return i.call(this,"Error",s,o)||this}return r}(iw.ServerlessError);Cn.CommandError=sw});var Uc=L(Ln=>{"use strict";var uw=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.ConfigDeleteError=void 0;var ow=un(),aw=function(i){uw(r,i);function r(s,o){return i.call(this,"Deletion failed",s,o)||this}return r}(ow.ServerlessError);Ln.ConfigDeleteError=aw});var Bc=L(Tn=>{"use strict";var lw=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.ConfigError=void 0;var fw=un(),cw=function(i){lw(r,i);function r(s,o){return i.call(this,"Config failed",s,o)||this}return r}(fw.ServerlessError);Tn.ConfigError=cw});var jc=L($n=>{"use strict";var hw=$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.ConfigGetError=void 0;var pw=un(),gw=function(i){hw(r,i);function r(s,o){return i.call(this,"Get failed",s,o)||this}return r}(pw.ServerlessError);$n.ConfigGetError=gw});var Xc=L(Dn=>{"use strict";var dw=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.InitError=void 0;var _w=un(),vw=function(i){dw(r,i);function r(s,o){return i.call(this,"Initialization failed",s,o)||this}return r}(_w.ServerlessError);Dn.InitError=vw});var Vc=L(ct=>{"use strict";var mw=ct&&ct.__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(A){try{p(o.next(A))}catch(I){d(I)}}function y(A){try{p(o.throw(A))}catch(I){d(I)}}function p(A){A.done?a(A.value):f(A.value).then(E,y)}p((o=o.apply(i,r||[])).next())})},Ew=ct&&ct.__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(A){return y([p,A])}}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(A){p=[6,A],f=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},yw=ct&&ct.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ct,"__esModule",{value:!0});ct.HumanError=void 0;var zc=yw(St()),ww=Di(),xw=zc.default.colors,Aw=function(){function i(r){var s=r.errorMessage,o=r.tips;this.errorMessage=s,console.log(`
|
|
37
37
|
`.concat((0,ww.bgRed)("ERROR:"))),console.log("TypeError: ".concat(s,`
|