@serverless-devs/s 2.0.100-beta.10 → 2.0.100-beta.11

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.
@@ -31,7 +31,7 @@ __p += '`),ve&&(M+=`' +
31
31
  function print() { __p += __j.call(arguments, '') }
32
32
  `:`;
33
33
  `)+M+`return __p
34
- }`;var ae=dp(function(){return Re(m,W+"return "+M).apply(r,y)});if(ae.source=M,Hc(ae))throw ae;return ae}function Cb(t){return Pe(t).toLowerCase()}function Ib(t){return Pe(t).toUpperCase()}function Tb(t,i,o){if(t=Pe(t),t&&(o||i===r))return wh(t);if(!t||!(i=zt(i)))return t;var c=br(t),h=br(i),m=bh(c,h),y=Sh(c,h)+1;return Fn(c,m,y).join("")}function Nb(t,i,o){if(t=Pe(t),t&&(o||i===r))return t.slice(0,Rh(t)+1);if(!t||!(i=zt(i)))return t;var c=br(t),h=Sh(c,br(i))+1;return Fn(c,0,h).join("")}function xb(t,i,o){if(t=Pe(t),t&&(o||i===r))return t.replace(Ts,"");if(!t||!(i=zt(i)))return t;var c=br(t),h=bh(c,br(i));return Fn(c,h).join("")}function Db(t,i){var o=Qn,c=Kr;if(He(i)){var h="separator"in i?i.separator:h;o="length"in i?se(i.length):o,c="omission"in i?zt(i.omission):c}t=Pe(t);var m=t.length;if(Vi(t)){var y=br(t);m=y.length}if(o>=m)return t;var $=o-Gi(c);if($<1)return c;var O=y?Fn(y,0,$).join(""):t.slice(0,$);if(h===r)return O+c;if(y&&($+=O.length-$),Vc(h)){if(t.slice($).search(h)){var D,q=O;for(h.global||(h=sc(h.source,Pe(me.exec(h))+"g")),h.lastIndex=0;D=h.exec(q);)var M=D.index;O=O.slice(0,M===r?$:M)}}else if(t.indexOf(zt(h),$)!=$){var k=O.lastIndexOf(h);k>-1&&(O=O.slice(0,k))}return O+c}function qb(t){return t=Pe(t),t&&ku.test(t)?t.replace(Wo,ly):t}var Lb=Yi(function(t,i,o){return t+(o?" ":"")+i.toUpperCase()}),zc=pd("toUpperCase");function hp(t,i,o){return t=Pe(t),i=o?r:i,i===r?sy(t)?dy(t):Y0(t):t.match(i)||[]}var dp=ce(function(t,i){try{return Gt(t,r,i)}catch(o){return Hc(o)?o:new te(o)}}),Mb=fn(function(t,i){return ir(i,function(o){o=jr(o),cn(t,o,kc(t[o],t))}),t});function Fb(t){var i=t==null?0:t.length,o=X();return t=i?Ue(t,function(c){if(typeof c[1]!="function")throw new sr(a);return[o(c[0]),c[1]]}):[],ce(function(c){for(var h=-1;++h<i;){var m=t[h];if(Gt(m[0],this,c))return Gt(m[1],this,c)}})}function jb(t){return lE(ar(t,f))}function Bc(t){return function(){return t}}function kb(t,i){return t==null||t!==t?i:t}var Ub=gd(),Hb=gd(!0);function xt(t){return t}function Kc(t){return zh(typeof t=="function"?t:ar(t,f))}function Vb(t){return Kh(ar(t,f))}function Gb(t,i){return Xh(t,ar(i,f))}var Wb=ce(function(t,i){return function(o){return Vs(o,t,i)}}),zb=ce(function(t,i){return function(o){return Vs(t,o,i)}});function Xc(t,i,o){var c=rt(i),h=Ea(i,c);o==null&&!(He(i)&&(h.length||!c.length))&&(o=i,i=t,t=this,h=Ea(i,rt(i)));var m=!(He(o)&&"chain"in o)||!!o.chain,y=dn(t);return ir(h,function($){var O=i[$];t[$]=O,y&&(t.prototype[$]=function(){var D=this.__chain__;if(m||D){var q=t(this.__wrapped__),M=q.__actions__=It(this.__actions__);return M.push({func:O,args:arguments,thisArg:t}),q.__chain__=D,q}return O.apply(t,Tn([this.value()],arguments))})}),t}function Bb(){return tt._===this&&(tt._=yy),this}function Yc(){}function Kb(t){return t=se(t),ce(function(i){return Yh(i,t)})}var Xb=Ac(Ue),Yb=Ac(_h),Jb=Ac(Zu);function pp(t){return Dc(t)?Qu(jr(t)):AE(t)}function Zb(t){return function(i){return t==null?r:mi(t,i)}}var Qb=vd(),eS=vd(!0);function Jc(){return[]}function Zc(){return!1}function tS(){return{}}function rS(){return""}function nS(){return!0}function iS(t,i){if(t=se(t),t<1||t>Dr)return[];var o=kt,c=ft(t,kt);i=X(i),t-=kt;for(var h=rc(c,i);++o<t;)i(o);return h}function sS(t){return ne(t)?Ue(t,jr):Bt(t)?[t]:It(Dd(Pe(t)))}function oS(t){var i=++_y;return Pe(t)+i}var aS=Ra(function(t,i){return t+i},0),uS=Pc("ceil"),cS=Ra(function(t,i){return t/i},1),lS=Pc("floor");function fS(t){return t&&t.length?ya(t,xt,dc):r}function hS(t,i){return t&&t.length?ya(t,X(i,2),dc):r}function dS(t){return Eh(t,xt)}function pS(t,i){return Eh(t,X(i,2))}function mS(t){return t&&t.length?ya(t,xt,_c):r}function gS(t,i){return t&&t.length?ya(t,X(i,2),_c):r}var _S=Ra(function(t,i){return t*i},1),vS=Pc("round"),yS=Ra(function(t,i){return t-i},0);function ES(t){return t&&t.length?tc(t,xt):0}function $S(t,i){return t&&t.length?tc(t,X(i,2)):0}return p.after=Vw,p.ary=Wd,p.assign=I1,p.assignIn=sp,p.assignInWith=ja,p.assignWith=T1,p.at=N1,p.before=zd,p.bind=kc,p.bindAll=Mb,p.bindKey=Bd,p.castArray=t1,p.chain=Hd,p.chunk=l$,p.compact=f$,p.concat=h$,p.cond=Fb,p.conforms=jb,p.constant=Bc,p.countBy=Ew,p.create=x1,p.curry=Kd,p.curryRight=Xd,p.debounce=Yd,p.defaults=D1,p.defaultsDeep=q1,p.defer=Gw,p.delay=Ww,p.difference=d$,p.differenceBy=p$,p.differenceWith=m$,p.drop=g$,p.dropRight=_$,p.dropRightWhile=v$,p.dropWhile=y$,p.fill=E$,p.filter=ww,p.flatMap=Ow,p.flatMapDeep=Rw,p.flatMapDepth=Aw,p.flatten=Fd,p.flattenDeep=$$,p.flattenDepth=w$,p.flip=zw,p.flow=Ub,p.flowRight=Hb,p.fromPairs=b$,p.functions=H1,p.functionsIn=V1,p.groupBy=Pw,p.initial=O$,p.intersection=R$,p.intersectionBy=A$,p.intersectionWith=P$,p.invert=W1,p.invertBy=z1,p.invokeMap=Iw,p.iteratee=Kc,p.keyBy=Tw,p.keys=rt,p.keysIn=Nt,p.map=xa,p.mapKeys=K1,p.mapValues=X1,p.matches=Vb,p.matchesProperty=Gb,p.memoize=qa,p.merge=Y1,p.mergeWith=op,p.method=Wb,p.methodOf=zb,p.mixin=Xc,p.negate=La,p.nthArg=Kb,p.omit=J1,p.omitBy=Z1,p.once=Bw,p.orderBy=Nw,p.over=Xb,p.overArgs=Kw,p.overEvery=Yb,p.overSome=Jb,p.partial=Uc,p.partialRight=Jd,p.partition=xw,p.pick=Q1,p.pickBy=ap,p.property=pp,p.propertyOf=Zb,p.pull=N$,p.pullAll=kd,p.pullAllBy=x$,p.pullAllWith=D$,p.pullAt=q$,p.range=Qb,p.rangeRight=eS,p.rearg=Xw,p.reject=Lw,p.remove=L$,p.rest=Yw,p.reverse=Fc,p.sampleSize=Fw,p.set=tb,p.setWith=rb,p.shuffle=jw,p.slice=M$,p.sortBy=Hw,p.sortedUniq=G$,p.sortedUniqBy=W$,p.split=Ob,p.spread=Jw,p.tail=z$,p.take=B$,p.takeRight=K$,p.takeRightWhile=X$,p.takeWhile=Y$,p.tap=fw,p.throttle=Zw,p.thru=Na,p.toArray=rp,p.toPairs=up,p.toPairsIn=cp,p.toPath=sS,p.toPlainObject=ip,p.transform=nb,p.unary=Qw,p.union=J$,p.unionBy=Z$,p.unionWith=Q$,p.uniq=ew,p.uniqBy=tw,p.uniqWith=rw,p.unset=ib,p.unzip=jc,p.unzipWith=Ud,p.update=sb,p.updateWith=ob,p.values=Qi,p.valuesIn=ab,p.without=nw,p.words=hp,p.wrap=e1,p.xor=iw,p.xorBy=sw,p.xorWith=ow,p.zip=aw,p.zipObject=uw,p.zipObjectDeep=cw,p.zipWith=lw,p.entries=up,p.entriesIn=cp,p.extend=sp,p.extendWith=ja,Xc(p,p),p.add=aS,p.attempt=dp,p.camelCase=fb,p.capitalize=lp,p.ceil=uS,p.clamp=ub,p.clone=r1,p.cloneDeep=i1,p.cloneDeepWith=s1,p.cloneWith=n1,p.conformsTo=o1,p.deburr=fp,p.defaultTo=kb,p.divide=cS,p.endsWith=hb,p.eq=Or,p.escape=db,p.escapeRegExp=pb,p.every=$w,p.find=bw,p.findIndex=Ld,p.findKey=L1,p.findLast=Sw,p.findLastIndex=Md,p.findLastKey=M1,p.floor=lS,p.forEach=Vd,p.forEachRight=Gd,p.forIn=F1,p.forInRight=j1,p.forOwn=k1,p.forOwnRight=U1,p.get=Gc,p.gt=a1,p.gte=u1,p.has=G1,p.hasIn=Wc,p.head=jd,p.identity=xt,p.includes=Cw,p.indexOf=S$,p.inRange=cb,p.invoke=B1,p.isArguments=vi,p.isArray=ne,p.isArrayBuffer=c1,p.isArrayLike=Tt,p.isArrayLikeObject=ze,p.isBoolean=l1,p.isBuffer=jn,p.isDate=f1,p.isElement=h1,p.isEmpty=d1,p.isEqual=p1,p.isEqualWith=m1,p.isError=Hc,p.isFinite=g1,p.isFunction=dn,p.isInteger=Zd,p.isLength=Ma,p.isMap=Qd,p.isMatch=_1,p.isMatchWith=v1,p.isNaN=y1,p.isNative=E1,p.isNil=w1,p.isNull=$1,p.isNumber=ep,p.isObject=He,p.isObjectLike=We,p.isPlainObject=Xs,p.isRegExp=Vc,p.isSafeInteger=b1,p.isSet=tp,p.isString=Fa,p.isSymbol=Bt,p.isTypedArray=Zi,p.isUndefined=S1,p.isWeakMap=O1,p.isWeakSet=R1,p.join=C$,p.kebabCase=mb,p.last=cr,p.lastIndexOf=I$,p.lowerCase=gb,p.lowerFirst=_b,p.lt=A1,p.lte=P1,p.max=fS,p.maxBy=hS,p.mean=dS,p.meanBy=pS,p.min=mS,p.minBy=gS,p.stubArray=Jc,p.stubFalse=Zc,p.stubObject=tS,p.stubString=rS,p.stubTrue=nS,p.multiply=_S,p.nth=T$,p.noConflict=Bb,p.noop=Yc,p.now=Da,p.pad=vb,p.padEnd=yb,p.padStart=Eb,p.parseInt=$b,p.random=lb,p.reduce=Dw,p.reduceRight=qw,p.repeat=wb,p.replace=bb,p.result=eb,p.round=vS,p.runInContext=S,p.sample=Mw,p.size=kw,p.snakeCase=Sb,p.some=Uw,p.sortedIndex=F$,p.sortedIndexBy=j$,p.sortedIndexOf=k$,p.sortedLastIndex=U$,p.sortedLastIndexBy=H$,p.sortedLastIndexOf=V$,p.startCase=Rb,p.startsWith=Ab,p.subtract=yS,p.sum=ES,p.sumBy=$S,p.template=Pb,p.times=iS,p.toFinite=pn,p.toInteger=se,p.toLength=np,p.toLower=Cb,p.toNumber=lr,p.toSafeInteger=C1,p.toString=Pe,p.toUpper=Ib,p.trim=Tb,p.trimEnd=Nb,p.trimStart=xb,p.truncate=Db,p.unescape=qb,p.uniqueId=oS,p.upperCase=Lb,p.upperFirst=zc,p.each=Vd,p.eachRight=Gd,p.first=jd,Xc(p,function(){var t={};return Mr(p,function(i,o){Ce.call(p.prototype,o)||(t[o]=i)}),t}(),{chain:!1}),p.VERSION=e,ir(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){p[t].placeholder=p}),ir(["drop","take"],function(t,i){_e.prototype[t]=function(o){o=o===r?1:Ze(se(o),0);var c=this.__filtered__&&!i?new _e(this):this.clone();return c.__filtered__?c.__takeCount__=ft(o,c.__takeCount__):c.__views__.push({size:ft(o,kt),type:t+(c.__dir__<0?"Right":"")}),c},_e.prototype[t+"Right"]=function(o){return this.reverse()[t](o).reverse()}}),ir(["filter","map","takeWhile"],function(t,i){var o=i+1,c=o==jt||o==Li;_e.prototype[t]=function(h){var m=this.clone();return m.__iteratees__.push({iteratee:X(h,3),type:o}),m.__filtered__=m.__filtered__||c,m}}),ir(["head","last"],function(t,i){var o="take"+(i?"Right":"");_e.prototype[t]=function(){return this[o](1).value()[0]}}),ir(["initial","tail"],function(t,i){var o="drop"+(i?"":"Right");_e.prototype[t]=function(){return this.__filtered__?new _e(this):this[o](1)}}),_e.prototype.compact=function(){return this.filter(xt)},_e.prototype.find=function(t){return this.filter(t).head()},_e.prototype.findLast=function(t){return this.reverse().find(t)},_e.prototype.invokeMap=ce(function(t,i){return typeof t=="function"?new _e(this):this.map(function(o){return Vs(o,t,i)})}),_e.prototype.reject=function(t){return this.filter(La(X(t)))},_e.prototype.slice=function(t,i){t=se(t);var o=this;return o.__filtered__&&(t>0||i<0)?new _e(o):(t<0?o=o.takeRight(-t):t&&(o=o.drop(t)),i!==r&&(i=se(i),o=i<0?o.dropRight(-i):o.take(i-t)),o)},_e.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},_e.prototype.toArray=function(){return this.take(kt)},Mr(_e.prototype,function(t,i){var o=/^(?:filter|find|map|reject)|While$/.test(i),c=/^(?:head|last)$/.test(i),h=p[c?"take"+(i=="last"?"Right":""):i],m=c||/^find/.test(i);!h||(p.prototype[i]=function(){var y=this.__wrapped__,$=c?[1]:arguments,O=y instanceof _e,D=$[0],q=O||ne(y),M=function(pe){var ve=h.apply(p,Tn([pe],$));return c&&k?ve[0]:ve};q&&o&&typeof D=="function"&&D.length!=1&&(O=q=!1);var k=this.__chain__,W=!!this.__actions__.length,Y=m&&!k,ae=O&&!W;if(!m&&q){y=ae?y:new _e(this);var J=t.apply(y,$);return J.__actions__.push({func:Na,args:[M],thisArg:r}),new or(J,k)}return Y&&ae?t.apply(this,$):(J=this.thru(M),Y?c?J.value()[0]:J.value():J)})}),ir(["pop","push","shift","sort","splice","unshift"],function(t){var i=ia[t],o=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",c=/^(?:pop|shift)$/.test(t);p.prototype[t]=function(){var h=arguments;if(c&&!this.__chain__){var m=this.value();return i.apply(ne(m)?m:[],h)}return this[o](function(y){return i.apply(ne(y)?y:[],h)})}}),Mr(_e.prototype,function(t,i){var o=p[i];if(o){var c=o.name+"";Ce.call(Bi,c)||(Bi[c]=[]),Bi[c].push({name:i,func:o})}}),Bi[Oa(r,L).name]=[{name:"wrapper",func:r}],_e.prototype.clone=qy,_e.prototype.reverse=Ly,_e.prototype.value=My,p.prototype.at=hw,p.prototype.chain=dw,p.prototype.commit=pw,p.prototype.next=mw,p.prototype.plant=_w,p.prototype.reverse=vw,p.prototype.toJSON=p.prototype.valueOf=p.prototype.value=yw,p.prototype.first=p.prototype.head,Ls&&(p.prototype[Ls]=gw),p},xn=py();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(tt._=xn,define(function(){return xn})):li?((li.exports=xn)._=xn,Ku._=xn):tt._=xn}).call(ns)});var vl=T(Dt=>{"use strict";var UR=Dt&&Dt.__awaiter||function(r,e,n,s){function a(u){return u instanceof n?u:new n(function(l){l(u)})}return new(n||(n=Promise))(function(u,l){function d(_){try{f(s.next(_))}catch(w){l(w)}}function g(_){try{f(s.throw(_))}catch(w){l(w)}}function f(_){_.done?u(_.value):a(_.value).then(d,g)}f((s=s.apply(r,e||[])).next())})},HR=Dt&&Dt.__generator||function(r,e){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},s,a,u,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(f){return function(_){return g([f,_])}}function g(f){if(s)throw new TypeError("Generator is already executing.");for(;n;)try{if(s=1,a&&(u=f[0]&2?a.return:f[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,f[1])).done)return u;switch(a=0,u&&(f=[f[0]&2,u.value]),f[0]){case 0:case 1:u=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,a=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!u||f[1]>u[0]&&f[1]<u[3])){n.label=f[1];break}if(f[0]===6&&n.label<u[1]){n.label=u[1],u=f;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(f);break}u[2]&&n.ops.pop(),n.trys.pop();continue}f=e.call(r,n)}catch(_){f=[6,_],a=0}finally{s=u=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},Cg=Dt&&Dt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.handlerProfileFile=Dt.getConfig=Dt.setConfig=void 0;var Ig=Cg(require("path")),_l=Cg(vn()),kr=_l.default.fse,eu=_l.default.jsyaml,gl=_l.default.getRootHome;function VR(r){var e=Ng();kr.writeFileSync(e,eu.dump(r))}function Tg(){var r=Ng();if(!kr.existsSync(r))return{};try{var e=eu.load(kr.readFileSync(r,"utf8"))||{};return e}catch(n){throw n}}function Ng(){var r=Ig.default.join(gl(),"set-config.yml");return kr.existsSync(r)||kr.createFileSync(r),r}function GR(r,e){var n=Tg();n[r]=e,VR(n)}Dt.setConfig=GR;function WR(r,e){var n=Tg();return n[r]||e}Dt.getConfig=WR;function zR(r){return UR(this,void 0,void 0,function(){var e,n,s,a,u,l,d;return HR(this,function(g){switch(g.label){case 0:if(e=r.filePath||"set-config.yml",n=Ig.default.join(gl(),e),s=kr.existsSync(n),a={},s)return[3,5];u=gl(),g.label=1;case 1:return g.trys.push([1,2,,4]),kr.statSync(u),[3,4];case 2:return l=g.sent(),[4,kr.mkdirSync(u)];case 3:return g.sent(),[3,4];case 4:return[3,6];case 5:try{a=eu.load(kr.readFileSync(n,"utf8"))||{}}catch(f){throw f}g.label=6;case 6:return r.read?[2,a]:(d=r.configKey||"",a[d]=r.data,[4,kr.writeFileSync(n,eu.dump(a))]);case 7:return g.sent(),[2,a]}})})}Dt.handlerProfileFile=zR});var xg=T((CD,BR)=>{BR.exports={name:"@serverless-devs/s",version:"2.0.100-beta.10",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 ru=T(Q=>{"use strict";var KR=Q&&Q.__createBinding||(Object.create?function(r,e,n,s){s===void 0&&(s=n),Object.defineProperty(r,s,{enumerable:!0,get:function(){return e[n]}})}:function(r,e,n,s){s===void 0&&(s=n),r[s]=e[n]}),XR=Q&&Q.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),YR=Q&&Q.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var n in r)n!=="default"&&Object.prototype.hasOwnProperty.call(r,n)&&KR(e,r,n);return XR(e,r),e},ho=Q&&Q.__awaiter||function(r,e,n,s){function a(u){return u instanceof n?u:new n(function(l){l(u)})}return new(n||(n=Promise))(function(u,l){function d(_){try{f(s.next(_))}catch(w){l(w)}}function g(_){try{f(s.throw(_))}catch(w){l(w)}}function f(_){_.done?u(_.value):a(_.value).then(d,g)}f((s=s.apply(r,e||[])).next())})},po=Q&&Q.__generator||function(r,e){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},s,a,u,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(f){return function(_){return g([f,_])}}function g(f){if(s)throw new TypeError("Generator is already executing.");for(;n;)try{if(s=1,a&&(u=f[0]&2?a.return:f[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,f[1])).done)return u;switch(a=0,u&&(f=[f[0]&2,u.value]),f[0]){case 0:case 1:u=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,a=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!u||f[1]>u[0]&&f[1]<u[3])){n.label=f[1];break}if(f[0]===6&&n.label<u[1]){n.label=u[1],u=f;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(f);break}u[2]&&n.ops.pop(),n.trys.pop();continue}f=e.call(r,n)}catch(_){f=[6,_],a=0}finally{s=u=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},yl=Q&&Q.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Q,"__esModule",{value:!0});Q.emoji=Q.mark=Q.replaceTemplate=Q.replaceFun=Q.getLang=Q.printn=Q.getFolderSize=Q.getVersion=Q.getPid=Q.aiRequest=Q.getCredentialWithAll=Q.getCredentialWithExisted=Q.getProcessArgv=Q.bgRed=Q.yellow=Q.red=void 0;var JR=yl(require("path")),fo=yl(require("fs")),Un=Pg(),ZR=yl(require("os")),Ur=YR(vn()),QR=vl(),Dg=xg(),tu=Ur.default.colors,eA=Ur.default.got,tA=Ur.default.getMAC,rA=Ur.default.isDocker,nA=Ur.default.isCiCdEnv,iA=Ur.default.getGlobalArgs,qg=Ur.default.getCredential,Lg=Ur.default.getCredentialAliasList;Q.red=tu.hex("#fd5750");Q.yellow=tu.hex("#F3F99D");Q.bgRed=tu.hex("#000").bgHex("#fd5750");var sA=function(){var r=process.env.serverless_devs_temp_argv;try{var e=JSON.parse(r),n=iA(e);return process.argv=process.argv.slice(0,2).concat(n._argsObj),(0,Un.assign)({},n,{noHelpArgv:process.argv.slice(0,2).concat((0,Un.filter)(n._argsObj,function(s){return!(0,Un.includes)(["-h","--help"],s)}))})}catch{return{}}};Q.getProcessArgv=sA;var oA=function(r){return ho(void 0,void 0,void 0,function(){var e,n;return po(this,function(s){switch(s.label){case 0:return[4,Lg()];case 1:return e=s.sent(),(0,Un.includes)(e,r)?[4,qg(r)]:[3,3];case 2:return n=s.sent(),[2,(0,Un.omit)(n,"Alias")];case 3:return[2]}})})};Q.getCredentialWithExisted=oA;var aA=function(){return ho(void 0,void 0,void 0,function(){var r,e,n,s,a,u;return po(this,function(l){switch(l.label){case 0:return[4,Lg()];case 1:if(r=l.sent(),!(r.length>0))return[3,6];e={},n=0,s=r,l.label=2;case 2:return n<s.length?(a=s[n],[4,qg(a)]):[3,5];case 3:u=l.sent(),e[u.Alias]=(0,Un.omit)(u,"Alias"),l.label=4;case 4:return n++,[3,2];case 5:return[2,e];case 6:return[2]}})})};Q.getCredentialWithAll=aA;var uA=function(r,e){return e===void 0&&(e="unknow"),ho(void 0,void 0,void 0,function(){var n,s,a,u;return po(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),n=(0,QR.getConfig)("analysis"),n!=="enable"?[2]:rA()||nA()?[2]:[4,eA("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(e,"&code=TypeError&s=").concat(r),{timeout:2e3,json:!0})];case 1:return s=l.sent(),a=(0,Un.get)(s.body,"shorturl"),a&&console.log(`AI Tips:
34
+ }`;var ae=dp(function(){return Re(m,W+"return "+M).apply(r,y)});if(ae.source=M,Hc(ae))throw ae;return ae}function Cb(t){return Pe(t).toLowerCase()}function Ib(t){return Pe(t).toUpperCase()}function Tb(t,i,o){if(t=Pe(t),t&&(o||i===r))return wh(t);if(!t||!(i=zt(i)))return t;var c=br(t),h=br(i),m=bh(c,h),y=Sh(c,h)+1;return Fn(c,m,y).join("")}function Nb(t,i,o){if(t=Pe(t),t&&(o||i===r))return t.slice(0,Rh(t)+1);if(!t||!(i=zt(i)))return t;var c=br(t),h=Sh(c,br(i))+1;return Fn(c,0,h).join("")}function xb(t,i,o){if(t=Pe(t),t&&(o||i===r))return t.replace(Ts,"");if(!t||!(i=zt(i)))return t;var c=br(t),h=bh(c,br(i));return Fn(c,h).join("")}function Db(t,i){var o=Qn,c=Kr;if(He(i)){var h="separator"in i?i.separator:h;o="length"in i?se(i.length):o,c="omission"in i?zt(i.omission):c}t=Pe(t);var m=t.length;if(Vi(t)){var y=br(t);m=y.length}if(o>=m)return t;var $=o-Gi(c);if($<1)return c;var O=y?Fn(y,0,$).join(""):t.slice(0,$);if(h===r)return O+c;if(y&&($+=O.length-$),Vc(h)){if(t.slice($).search(h)){var D,q=O;for(h.global||(h=sc(h.source,Pe(me.exec(h))+"g")),h.lastIndex=0;D=h.exec(q);)var M=D.index;O=O.slice(0,M===r?$:M)}}else if(t.indexOf(zt(h),$)!=$){var k=O.lastIndexOf(h);k>-1&&(O=O.slice(0,k))}return O+c}function qb(t){return t=Pe(t),t&&ku.test(t)?t.replace(Wo,ly):t}var Lb=Yi(function(t,i,o){return t+(o?" ":"")+i.toUpperCase()}),zc=pd("toUpperCase");function hp(t,i,o){return t=Pe(t),i=o?r:i,i===r?sy(t)?dy(t):Y0(t):t.match(i)||[]}var dp=ce(function(t,i){try{return Gt(t,r,i)}catch(o){return Hc(o)?o:new te(o)}}),Mb=fn(function(t,i){return ir(i,function(o){o=jr(o),cn(t,o,kc(t[o],t))}),t});function Fb(t){var i=t==null?0:t.length,o=X();return t=i?Ue(t,function(c){if(typeof c[1]!="function")throw new sr(a);return[o(c[0]),c[1]]}):[],ce(function(c){for(var h=-1;++h<i;){var m=t[h];if(Gt(m[0],this,c))return Gt(m[1],this,c)}})}function jb(t){return lE(ar(t,f))}function Bc(t){return function(){return t}}function kb(t,i){return t==null||t!==t?i:t}var Ub=gd(),Hb=gd(!0);function xt(t){return t}function Kc(t){return zh(typeof t=="function"?t:ar(t,f))}function Vb(t){return Kh(ar(t,f))}function Gb(t,i){return Xh(t,ar(i,f))}var Wb=ce(function(t,i){return function(o){return Vs(o,t,i)}}),zb=ce(function(t,i){return function(o){return Vs(t,o,i)}});function Xc(t,i,o){var c=rt(i),h=Ea(i,c);o==null&&!(He(i)&&(h.length||!c.length))&&(o=i,i=t,t=this,h=Ea(i,rt(i)));var m=!(He(o)&&"chain"in o)||!!o.chain,y=dn(t);return ir(h,function($){var O=i[$];t[$]=O,y&&(t.prototype[$]=function(){var D=this.__chain__;if(m||D){var q=t(this.__wrapped__),M=q.__actions__=It(this.__actions__);return M.push({func:O,args:arguments,thisArg:t}),q.__chain__=D,q}return O.apply(t,Tn([this.value()],arguments))})}),t}function Bb(){return tt._===this&&(tt._=yy),this}function Yc(){}function Kb(t){return t=se(t),ce(function(i){return Yh(i,t)})}var Xb=Ac(Ue),Yb=Ac(_h),Jb=Ac(Zu);function pp(t){return Dc(t)?Qu(jr(t)):AE(t)}function Zb(t){return function(i){return t==null?r:mi(t,i)}}var Qb=vd(),eS=vd(!0);function Jc(){return[]}function Zc(){return!1}function tS(){return{}}function rS(){return""}function nS(){return!0}function iS(t,i){if(t=se(t),t<1||t>Dr)return[];var o=kt,c=ft(t,kt);i=X(i),t-=kt;for(var h=rc(c,i);++o<t;)i(o);return h}function sS(t){return ne(t)?Ue(t,jr):Bt(t)?[t]:It(Dd(Pe(t)))}function oS(t){var i=++_y;return Pe(t)+i}var aS=Ra(function(t,i){return t+i},0),uS=Pc("ceil"),cS=Ra(function(t,i){return t/i},1),lS=Pc("floor");function fS(t){return t&&t.length?ya(t,xt,dc):r}function hS(t,i){return t&&t.length?ya(t,X(i,2),dc):r}function dS(t){return Eh(t,xt)}function pS(t,i){return Eh(t,X(i,2))}function mS(t){return t&&t.length?ya(t,xt,_c):r}function gS(t,i){return t&&t.length?ya(t,X(i,2),_c):r}var _S=Ra(function(t,i){return t*i},1),vS=Pc("round"),yS=Ra(function(t,i){return t-i},0);function ES(t){return t&&t.length?tc(t,xt):0}function $S(t,i){return t&&t.length?tc(t,X(i,2)):0}return p.after=Vw,p.ary=Wd,p.assign=I1,p.assignIn=sp,p.assignInWith=ja,p.assignWith=T1,p.at=N1,p.before=zd,p.bind=kc,p.bindAll=Mb,p.bindKey=Bd,p.castArray=t1,p.chain=Hd,p.chunk=l$,p.compact=f$,p.concat=h$,p.cond=Fb,p.conforms=jb,p.constant=Bc,p.countBy=Ew,p.create=x1,p.curry=Kd,p.curryRight=Xd,p.debounce=Yd,p.defaults=D1,p.defaultsDeep=q1,p.defer=Gw,p.delay=Ww,p.difference=d$,p.differenceBy=p$,p.differenceWith=m$,p.drop=g$,p.dropRight=_$,p.dropRightWhile=v$,p.dropWhile=y$,p.fill=E$,p.filter=ww,p.flatMap=Ow,p.flatMapDeep=Rw,p.flatMapDepth=Aw,p.flatten=Fd,p.flattenDeep=$$,p.flattenDepth=w$,p.flip=zw,p.flow=Ub,p.flowRight=Hb,p.fromPairs=b$,p.functions=H1,p.functionsIn=V1,p.groupBy=Pw,p.initial=O$,p.intersection=R$,p.intersectionBy=A$,p.intersectionWith=P$,p.invert=W1,p.invertBy=z1,p.invokeMap=Iw,p.iteratee=Kc,p.keyBy=Tw,p.keys=rt,p.keysIn=Nt,p.map=xa,p.mapKeys=K1,p.mapValues=X1,p.matches=Vb,p.matchesProperty=Gb,p.memoize=qa,p.merge=Y1,p.mergeWith=op,p.method=Wb,p.methodOf=zb,p.mixin=Xc,p.negate=La,p.nthArg=Kb,p.omit=J1,p.omitBy=Z1,p.once=Bw,p.orderBy=Nw,p.over=Xb,p.overArgs=Kw,p.overEvery=Yb,p.overSome=Jb,p.partial=Uc,p.partialRight=Jd,p.partition=xw,p.pick=Q1,p.pickBy=ap,p.property=pp,p.propertyOf=Zb,p.pull=N$,p.pullAll=kd,p.pullAllBy=x$,p.pullAllWith=D$,p.pullAt=q$,p.range=Qb,p.rangeRight=eS,p.rearg=Xw,p.reject=Lw,p.remove=L$,p.rest=Yw,p.reverse=Fc,p.sampleSize=Fw,p.set=tb,p.setWith=rb,p.shuffle=jw,p.slice=M$,p.sortBy=Hw,p.sortedUniq=G$,p.sortedUniqBy=W$,p.split=Ob,p.spread=Jw,p.tail=z$,p.take=B$,p.takeRight=K$,p.takeRightWhile=X$,p.takeWhile=Y$,p.tap=fw,p.throttle=Zw,p.thru=Na,p.toArray=rp,p.toPairs=up,p.toPairsIn=cp,p.toPath=sS,p.toPlainObject=ip,p.transform=nb,p.unary=Qw,p.union=J$,p.unionBy=Z$,p.unionWith=Q$,p.uniq=ew,p.uniqBy=tw,p.uniqWith=rw,p.unset=ib,p.unzip=jc,p.unzipWith=Ud,p.update=sb,p.updateWith=ob,p.values=Qi,p.valuesIn=ab,p.without=nw,p.words=hp,p.wrap=e1,p.xor=iw,p.xorBy=sw,p.xorWith=ow,p.zip=aw,p.zipObject=uw,p.zipObjectDeep=cw,p.zipWith=lw,p.entries=up,p.entriesIn=cp,p.extend=sp,p.extendWith=ja,Xc(p,p),p.add=aS,p.attempt=dp,p.camelCase=fb,p.capitalize=lp,p.ceil=uS,p.clamp=ub,p.clone=r1,p.cloneDeep=i1,p.cloneDeepWith=s1,p.cloneWith=n1,p.conformsTo=o1,p.deburr=fp,p.defaultTo=kb,p.divide=cS,p.endsWith=hb,p.eq=Or,p.escape=db,p.escapeRegExp=pb,p.every=$w,p.find=bw,p.findIndex=Ld,p.findKey=L1,p.findLast=Sw,p.findLastIndex=Md,p.findLastKey=M1,p.floor=lS,p.forEach=Vd,p.forEachRight=Gd,p.forIn=F1,p.forInRight=j1,p.forOwn=k1,p.forOwnRight=U1,p.get=Gc,p.gt=a1,p.gte=u1,p.has=G1,p.hasIn=Wc,p.head=jd,p.identity=xt,p.includes=Cw,p.indexOf=S$,p.inRange=cb,p.invoke=B1,p.isArguments=vi,p.isArray=ne,p.isArrayBuffer=c1,p.isArrayLike=Tt,p.isArrayLikeObject=ze,p.isBoolean=l1,p.isBuffer=jn,p.isDate=f1,p.isElement=h1,p.isEmpty=d1,p.isEqual=p1,p.isEqualWith=m1,p.isError=Hc,p.isFinite=g1,p.isFunction=dn,p.isInteger=Zd,p.isLength=Ma,p.isMap=Qd,p.isMatch=_1,p.isMatchWith=v1,p.isNaN=y1,p.isNative=E1,p.isNil=w1,p.isNull=$1,p.isNumber=ep,p.isObject=He,p.isObjectLike=We,p.isPlainObject=Xs,p.isRegExp=Vc,p.isSafeInteger=b1,p.isSet=tp,p.isString=Fa,p.isSymbol=Bt,p.isTypedArray=Zi,p.isUndefined=S1,p.isWeakMap=O1,p.isWeakSet=R1,p.join=C$,p.kebabCase=mb,p.last=cr,p.lastIndexOf=I$,p.lowerCase=gb,p.lowerFirst=_b,p.lt=A1,p.lte=P1,p.max=fS,p.maxBy=hS,p.mean=dS,p.meanBy=pS,p.min=mS,p.minBy=gS,p.stubArray=Jc,p.stubFalse=Zc,p.stubObject=tS,p.stubString=rS,p.stubTrue=nS,p.multiply=_S,p.nth=T$,p.noConflict=Bb,p.noop=Yc,p.now=Da,p.pad=vb,p.padEnd=yb,p.padStart=Eb,p.parseInt=$b,p.random=lb,p.reduce=Dw,p.reduceRight=qw,p.repeat=wb,p.replace=bb,p.result=eb,p.round=vS,p.runInContext=S,p.sample=Mw,p.size=kw,p.snakeCase=Sb,p.some=Uw,p.sortedIndex=F$,p.sortedIndexBy=j$,p.sortedIndexOf=k$,p.sortedLastIndex=U$,p.sortedLastIndexBy=H$,p.sortedLastIndexOf=V$,p.startCase=Rb,p.startsWith=Ab,p.subtract=yS,p.sum=ES,p.sumBy=$S,p.template=Pb,p.times=iS,p.toFinite=pn,p.toInteger=se,p.toLength=np,p.toLower=Cb,p.toNumber=lr,p.toSafeInteger=C1,p.toString=Pe,p.toUpper=Ib,p.trim=Tb,p.trimEnd=Nb,p.trimStart=xb,p.truncate=Db,p.unescape=qb,p.uniqueId=oS,p.upperCase=Lb,p.upperFirst=zc,p.each=Vd,p.eachRight=Gd,p.first=jd,Xc(p,function(){var t={};return Mr(p,function(i,o){Ce.call(p.prototype,o)||(t[o]=i)}),t}(),{chain:!1}),p.VERSION=e,ir(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){p[t].placeholder=p}),ir(["drop","take"],function(t,i){_e.prototype[t]=function(o){o=o===r?1:Ze(se(o),0);var c=this.__filtered__&&!i?new _e(this):this.clone();return c.__filtered__?c.__takeCount__=ft(o,c.__takeCount__):c.__views__.push({size:ft(o,kt),type:t+(c.__dir__<0?"Right":"")}),c},_e.prototype[t+"Right"]=function(o){return this.reverse()[t](o).reverse()}}),ir(["filter","map","takeWhile"],function(t,i){var o=i+1,c=o==jt||o==Li;_e.prototype[t]=function(h){var m=this.clone();return m.__iteratees__.push({iteratee:X(h,3),type:o}),m.__filtered__=m.__filtered__||c,m}}),ir(["head","last"],function(t,i){var o="take"+(i?"Right":"");_e.prototype[t]=function(){return this[o](1).value()[0]}}),ir(["initial","tail"],function(t,i){var o="drop"+(i?"":"Right");_e.prototype[t]=function(){return this.__filtered__?new _e(this):this[o](1)}}),_e.prototype.compact=function(){return this.filter(xt)},_e.prototype.find=function(t){return this.filter(t).head()},_e.prototype.findLast=function(t){return this.reverse().find(t)},_e.prototype.invokeMap=ce(function(t,i){return typeof t=="function"?new _e(this):this.map(function(o){return Vs(o,t,i)})}),_e.prototype.reject=function(t){return this.filter(La(X(t)))},_e.prototype.slice=function(t,i){t=se(t);var o=this;return o.__filtered__&&(t>0||i<0)?new _e(o):(t<0?o=o.takeRight(-t):t&&(o=o.drop(t)),i!==r&&(i=se(i),o=i<0?o.dropRight(-i):o.take(i-t)),o)},_e.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},_e.prototype.toArray=function(){return this.take(kt)},Mr(_e.prototype,function(t,i){var o=/^(?:filter|find|map|reject)|While$/.test(i),c=/^(?:head|last)$/.test(i),h=p[c?"take"+(i=="last"?"Right":""):i],m=c||/^find/.test(i);!h||(p.prototype[i]=function(){var y=this.__wrapped__,$=c?[1]:arguments,O=y instanceof _e,D=$[0],q=O||ne(y),M=function(pe){var ve=h.apply(p,Tn([pe],$));return c&&k?ve[0]:ve};q&&o&&typeof D=="function"&&D.length!=1&&(O=q=!1);var k=this.__chain__,W=!!this.__actions__.length,Y=m&&!k,ae=O&&!W;if(!m&&q){y=ae?y:new _e(this);var J=t.apply(y,$);return J.__actions__.push({func:Na,args:[M],thisArg:r}),new or(J,k)}return Y&&ae?t.apply(this,$):(J=this.thru(M),Y?c?J.value()[0]:J.value():J)})}),ir(["pop","push","shift","sort","splice","unshift"],function(t){var i=ia[t],o=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",c=/^(?:pop|shift)$/.test(t);p.prototype[t]=function(){var h=arguments;if(c&&!this.__chain__){var m=this.value();return i.apply(ne(m)?m:[],h)}return this[o](function(y){return i.apply(ne(y)?y:[],h)})}}),Mr(_e.prototype,function(t,i){var o=p[i];if(o){var c=o.name+"";Ce.call(Bi,c)||(Bi[c]=[]),Bi[c].push({name:i,func:o})}}),Bi[Oa(r,L).name]=[{name:"wrapper",func:r}],_e.prototype.clone=qy,_e.prototype.reverse=Ly,_e.prototype.value=My,p.prototype.at=hw,p.prototype.chain=dw,p.prototype.commit=pw,p.prototype.next=mw,p.prototype.plant=_w,p.prototype.reverse=vw,p.prototype.toJSON=p.prototype.valueOf=p.prototype.value=yw,p.prototype.first=p.prototype.head,Ls&&(p.prototype[Ls]=gw),p},xn=py();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(tt._=xn,define(function(){return xn})):li?((li.exports=xn)._=xn,Ku._=xn):tt._=xn}).call(ns)});var vl=T(Dt=>{"use strict";var UR=Dt&&Dt.__awaiter||function(r,e,n,s){function a(u){return u instanceof n?u:new n(function(l){l(u)})}return new(n||(n=Promise))(function(u,l){function d(_){try{f(s.next(_))}catch(w){l(w)}}function g(_){try{f(s.throw(_))}catch(w){l(w)}}function f(_){_.done?u(_.value):a(_.value).then(d,g)}f((s=s.apply(r,e||[])).next())})},HR=Dt&&Dt.__generator||function(r,e){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},s,a,u,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(f){return function(_){return g([f,_])}}function g(f){if(s)throw new TypeError("Generator is already executing.");for(;n;)try{if(s=1,a&&(u=f[0]&2?a.return:f[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,f[1])).done)return u;switch(a=0,u&&(f=[f[0]&2,u.value]),f[0]){case 0:case 1:u=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,a=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!u||f[1]>u[0]&&f[1]<u[3])){n.label=f[1];break}if(f[0]===6&&n.label<u[1]){n.label=u[1],u=f;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(f);break}u[2]&&n.ops.pop(),n.trys.pop();continue}f=e.call(r,n)}catch(_){f=[6,_],a=0}finally{s=u=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},Cg=Dt&&Dt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.handlerProfileFile=Dt.getConfig=Dt.setConfig=void 0;var Ig=Cg(require("path")),_l=Cg(vn()),kr=_l.default.fse,eu=_l.default.jsyaml,gl=_l.default.getRootHome;function VR(r){var e=Ng();kr.writeFileSync(e,eu.dump(r))}function Tg(){var r=Ng();if(!kr.existsSync(r))return{};try{var e=eu.load(kr.readFileSync(r,"utf8"))||{};return e}catch(n){throw n}}function Ng(){var r=Ig.default.join(gl(),"set-config.yml");return kr.existsSync(r)||kr.createFileSync(r),r}function GR(r,e){var n=Tg();n[r]=e,VR(n)}Dt.setConfig=GR;function WR(r,e){var n=Tg();return n[r]||e}Dt.getConfig=WR;function zR(r){return UR(this,void 0,void 0,function(){var e,n,s,a,u,l,d;return HR(this,function(g){switch(g.label){case 0:if(e=r.filePath||"set-config.yml",n=Ig.default.join(gl(),e),s=kr.existsSync(n),a={},s)return[3,5];u=gl(),g.label=1;case 1:return g.trys.push([1,2,,4]),kr.statSync(u),[3,4];case 2:return l=g.sent(),[4,kr.mkdirSync(u)];case 3:return g.sent(),[3,4];case 4:return[3,6];case 5:try{a=eu.load(kr.readFileSync(n,"utf8"))||{}}catch(f){throw f}g.label=6;case 6:return r.read?[2,a]:(d=r.configKey||"",a[d]=r.data,[4,kr.writeFileSync(n,eu.dump(a))]);case 7:return g.sent(),[2,a]}})})}Dt.handlerProfileFile=zR});var xg=T((CD,BR)=>{BR.exports={name:"@serverless-devs/s",version:"2.0.100-beta.11",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 ru=T(Q=>{"use strict";var KR=Q&&Q.__createBinding||(Object.create?function(r,e,n,s){s===void 0&&(s=n),Object.defineProperty(r,s,{enumerable:!0,get:function(){return e[n]}})}:function(r,e,n,s){s===void 0&&(s=n),r[s]=e[n]}),XR=Q&&Q.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),YR=Q&&Q.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var n in r)n!=="default"&&Object.prototype.hasOwnProperty.call(r,n)&&KR(e,r,n);return XR(e,r),e},ho=Q&&Q.__awaiter||function(r,e,n,s){function a(u){return u instanceof n?u:new n(function(l){l(u)})}return new(n||(n=Promise))(function(u,l){function d(_){try{f(s.next(_))}catch(w){l(w)}}function g(_){try{f(s.throw(_))}catch(w){l(w)}}function f(_){_.done?u(_.value):a(_.value).then(d,g)}f((s=s.apply(r,e||[])).next())})},po=Q&&Q.__generator||function(r,e){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},s,a,u,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(f){return function(_){return g([f,_])}}function g(f){if(s)throw new TypeError("Generator is already executing.");for(;n;)try{if(s=1,a&&(u=f[0]&2?a.return:f[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,f[1])).done)return u;switch(a=0,u&&(f=[f[0]&2,u.value]),f[0]){case 0:case 1:u=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,a=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!u||f[1]>u[0]&&f[1]<u[3])){n.label=f[1];break}if(f[0]===6&&n.label<u[1]){n.label=u[1],u=f;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(f);break}u[2]&&n.ops.pop(),n.trys.pop();continue}f=e.call(r,n)}catch(_){f=[6,_],a=0}finally{s=u=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},yl=Q&&Q.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Q,"__esModule",{value:!0});Q.emoji=Q.mark=Q.replaceTemplate=Q.replaceFun=Q.getLang=Q.printn=Q.getFolderSize=Q.getVersion=Q.getPid=Q.aiRequest=Q.getCredentialWithAll=Q.getCredentialWithExisted=Q.getProcessArgv=Q.bgRed=Q.yellow=Q.red=void 0;var JR=yl(require("path")),fo=yl(require("fs")),Un=Pg(),ZR=yl(require("os")),Ur=YR(vn()),QR=vl(),Dg=xg(),tu=Ur.default.colors,eA=Ur.default.got,tA=Ur.default.getMAC,rA=Ur.default.isDocker,nA=Ur.default.isCiCdEnv,iA=Ur.default.getGlobalArgs,qg=Ur.default.getCredential,Lg=Ur.default.getCredentialAliasList;Q.red=tu.hex("#fd5750");Q.yellow=tu.hex("#F3F99D");Q.bgRed=tu.hex("#000").bgHex("#fd5750");var sA=function(){var r=process.env.serverless_devs_temp_argv;try{var e=JSON.parse(r),n=iA(e);return process.argv=process.argv.slice(0,2).concat(n._argsObj),(0,Un.assign)({},n,{noHelpArgv:process.argv.slice(0,2).concat((0,Un.filter)(n._argsObj,function(s){return!(0,Un.includes)(["-h","--help"],s)}))})}catch{return{}}};Q.getProcessArgv=sA;var oA=function(r){return ho(void 0,void 0,void 0,function(){var e,n;return po(this,function(s){switch(s.label){case 0:return[4,Lg()];case 1:return e=s.sent(),(0,Un.includes)(e,r)?[4,qg(r)]:[3,3];case 2:return n=s.sent(),[2,(0,Un.omit)(n,"Alias")];case 3:return[2]}})})};Q.getCredentialWithExisted=oA;var aA=function(){return ho(void 0,void 0,void 0,function(){var r,e,n,s,a,u;return po(this,function(l){switch(l.label){case 0:return[4,Lg()];case 1:if(r=l.sent(),!(r.length>0))return[3,6];e={},n=0,s=r,l.label=2;case 2:return n<s.length?(a=s[n],[4,qg(a)]):[3,5];case 3:u=l.sent(),e[u.Alias]=(0,Un.omit)(u,"Alias"),l.label=4;case 4:return n++,[3,2];case 5:return[2,e];case 6:return[2]}})})};Q.getCredentialWithAll=aA;var uA=function(r,e){return e===void 0&&(e="unknow"),ho(void 0,void 0,void 0,function(){var n,s,a,u;return po(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),n=(0,QR.getConfig)("analysis"),n!=="enable"?[2]:rA()||nA()?[2]:[4,eA("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(e,"&code=TypeError&s=").concat(r),{timeout:2e3,json:!0})];case 1:return s=l.sent(),a=(0,Un.get)(s.body,"shorturl"),a&&console.log(`AI Tips:
35
35
  You can try to solve the problem through: `.concat(tu.underline(a),`
36
36
  `)),[3,3];case 2:return u=l.sent(),[3,3];case 3:return[2]}})})};Q.aiRequest=uA;var cA=function(){try{return tA().replace(/:/g,"")}catch{return"unknown"}};Q.getPid=cA;function lA(){var r=(0,Ur.getCoreVersion)(),e="".concat(process.platform,"-").concat(process.arch),n="node-".concat(process.version),s="core: ".concat(r),a="s-home: ".concat(Ur.default.getRootHome()),u="".concat(Dg.name,": ").concat(Dg.version);return r?"".concat(u,", ").concat(s,", ").concat(a,", ").concat(e,", ").concat(n):"".concat(u,", ").concat(a,", ").concat(e,", ").concat(n)}Q.getVersion=lA;function fA(r){return ho(this,void 0,void 0,function(){function e(a){return ho(this,void 0,void 0,function(){var u,l;return po(this,function(d){switch(d.label){case 0:return u=fo.default.lstatSync(a),typeof u!="object"?[2]:(n.set(u.ino,u.size),u.isDirectory()?(l=fo.default.readdirSync(a),typeof l!="object"?[2]:[4,Promise.all(l.map(function(g){return e(JR.default.join(a,g))}))]):[3,2]);case 1:d.sent(),d.label=2;case 2:return[2]}})})}var n,s;return po(this,function(a){switch(a.label){case 0:return n=new Map,[4,e(r)];case 1:return a.sent(),s=Array.from(n.values()).reduce(function(u,l){return u+l},0),[2,s]}})})}Q.getFolderSize=fA;function hA(r,e){e===void 0&&(e=" ");for(var n="",s=0;s<r;s++)n=n+e;return n}Q.printn=hA;function dA(){return"en"}Q.getLang=dA;function Mg(r,e){var n=/\{\{(.*?)\}\}/g,s=r.match(n);if(s)for(var a=0;a<s.length;a++){var u=s[a].replace(/{{|}}/g,""),l=(0,Un.trim)(u.split("|")[0]);e[l]&&(r=r.replace(s[a],e[l]))}return r}Q.replaceFun=Mg;function pA(r,e){r.forEach(function(n){if(fo.default.existsSync(n)){var s=fo.default.readFileSync(n,"utf-8"),a=Mg(s,e);fo.default.writeFileSync(n,a,"utf-8")}})}Q.replaceTemplate=pA;function mA(r){if(!r)return r;var e=r.slice(-4);return"***********".concat(e)}Q.mark=mA;function gA(r,e){return ZR.default.platform()==="win32"?e||"\u25C6":"".concat(r," ")}Q.emoji=gA});var Fg=T(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.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 jg=T($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});$l.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 bl=T(mo=>{"use strict";var kg=mo&&mo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mo,"__esModule",{value:!0});var _A=ru(),vA=kg(Fg()),yA=kg(jg()),wl={en:yA.default,zh:vA.default},EA=function(r){var e=(0,_A.getLang)(),n=wl[e]?wl[e][r]:wl.en[r];return n||r};mo.default=EA});var Ol=T(go=>{"use strict";var $A=go&&go.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(go,"__esModule",{value:!0});var wA=$A(vn()),bA=wA.default.Logger,Sl=new bA("S-CLI");Sl.success=function(r){return Sl.log(r,"green")};go.default=Sl});var Al=T(mt=>{"use strict";var SA=mt&&mt.__createBinding||(Object.create?function(r,e,n,s){s===void 0&&(s=n),Object.defineProperty(r,s,{enumerable:!0,get:function(){return e[n]}})}:function(r,e,n,s){s===void 0&&(s=n),r[s]=e[n]}),Ug=mt&&mt.__exportStar||function(r,e){for(var n in r)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&SA(e,r,n)},Rl=mt&&mt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mt,"__esModule",{value:!0});mt.registerCommandChecker=mt.i18n=mt.logger=void 0;var OA=Rl(Ol());Ug(ru(),mt);Ug(vl(),mt);var RA=Ol();Object.defineProperty(mt,"logger",{enumerable:!0,get:function(){return Rl(RA).default}});var AA=bl();Object.defineProperty(mt,"i18n",{enumerable:!0,get:function(){return Rl(AA).default}});function PA(r){r.on("command:*",function(e){var n=r.commands.map(function(s){return s.name()});n.includes(e[0])||(OA.default.error(" error: unknown command ".concat(e[0])),r.help())})}mt.registerCommandChecker=PA});var vo=T(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.regexpCode=we.getEsmExportName=we.getProperty=we.safeStringify=we.stringify=we.strConcat=we.addCodeArg=we.str=we._=we.nil=we._Code=we.Name=we.IDENTIFIER=we._CodeOrName=void 0;var nu=class{};we._CodeOrName=nu;we.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var is=class extends nu{constructor(e){super();if(!we.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};we.Name=is;var Pr=class extends nu{constructor(e){super();this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((n,s)=>`${n}${s}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((n,s)=>(s instanceof is&&(n[s.str]=(n[s.str]||0)+1),n),{})}};we._Code=Pr;we.nil=new Pr("");function Hg(r,...e){let n=[r[0]],s=0;for(;s<e.length;)Cl(n,e[s]),n.push(r[++s]);return new Pr(n)}we._=Hg;var Pl=new Pr("+");function Vg(r,...e){let n=[_o(r[0])],s=0;for(;s<e.length;)n.push(Pl),Cl(n,e[s]),n.push(Pl,_o(r[++s]));return CA(n),new Pr(n)}we.str=Vg;function Cl(r,e){e instanceof Pr?r.push(...e._items):e instanceof is?r.push(e):r.push(NA(e))}we.addCodeArg=Cl;function CA(r){let e=1;for(;e<r.length-1;){if(r[e]===Pl){let n=IA(r[e-1],r[e+1]);if(n!==void 0){r.splice(e-1,3,n);continue}r[e++]="+"}e++}}function IA(r,e){if(e==='""')return r;if(r==='""')return e;if(typeof r=="string")return e instanceof is||r[r.length-1]!=='"'?void 0:typeof e!="string"?`${r.slice(0,-1)}${e}"`:e[0]==='"'?r.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(r instanceof is))return`"${r}${e.slice(1)}`}function TA(r,e){return e.emptyStr()?r:r.emptyStr()?e:Vg`${r}${e}`}we.strConcat=TA;function NA(r){return typeof r=="number"||typeof r=="boolean"||r===null?r:_o(Array.isArray(r)?r.join(","):r)}function xA(r){return new Pr(_o(r))}we.stringify=xA;function _o(r){return JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}we.safeStringify=_o;function DA(r){return typeof r=="string"&&we.IDENTIFIER.test(r)?new Pr(`.${r}`):Hg`[${r}]`}we.getProperty=DA;function qA(r){if(typeof r=="string"&&we.IDENTIFIER.test(r))return new Pr(`${r}`);throw new Error(`CodeGen: invalid export name: ${r}, use explicit $id name mapping`)}we.getEsmExportName=qA;function LA(r){return new Pr(r.toString())}we.regexpCode=LA});var xl=T(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.ValueScope=Ot.ValueScopeName=Ot.Scope=Ot.varKinds=Ot.UsedValueState=void 0;var qt=vo(),Gg=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}},Il;(function(r){r[r.Started=0]="Started",r[r.Completed=1]="Completed"})(Il=Ot.UsedValueState||(Ot.UsedValueState={}));Ot.varKinds={const:new qt.Name("const"),let:new qt.Name("let"),var:new qt.Name("var")};var Tl=class{constructor({prefixes:e,parent:n}={}){this._names={},this._prefixes=e,this._parent=n}toName(e){return e instanceof qt.Name?e:this.name(e)}name(e){return new qt.Name(this._newName(e))}_newName(e){let n=this._names[e]||this._nameGroup(e);return`${e}${n.index++}`}_nameGroup(e){var n,s;if(((s=(n=this._parent)===null||n===void 0?void 0:n._prefixes)===null||s===void 0?void 0:s.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Ot.Scope=Tl;var Nl=class extends qt.Name{constructor(e,n){super(n);this.prefix=e}setValue(e,{property:n,itemIndex:s}){this.value=e,this.scopePath=(0,qt._)`.${new qt.Name(n)}[${s}]`}};Ot.ValueScopeName=Nl;var MA=(0,qt._)`\n`,Wg=class extends Tl{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts=fr(Ke({},e),{_n:e.lines?MA:qt.nil})}get(){return this._scope}name(e){return new Nl(e,this._newName(e))}value(e,n){var s;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let a=this.toName(e),{prefix:u}=a,l=(s=n.key)!==null&&s!==void 0?s:n.ref,d=this._values[u];if(d){let _=d.get(l);if(_)return _}else d=this._values[u]=new Map;d.set(l,a);let g=this._scope[u]||(this._scope[u]=[]),f=g.length;return g[f]=n.ref,a.setValue(n,{property:u,itemIndex:f}),a}getValue(e,n){let s=this._values[e];if(!!s)return s.get(n)}scopeRefs(e,n=this._values){return this._reduceValues(n,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,qt._)`${e}${s.scopePath}`})}scopeCode(e=this._values,n,s){return this._reduceValues(e,a=>{if(a.value===void 0)throw new Error(`CodeGen: name "${a}" has no value`);return a.value.code},n,s)}_reduceValues(e,n,s={},a){let u=qt.nil;for(let l in e){let d=e[l];if(!d)continue;let g=s[l]=s[l]||new Map;d.forEach(f=>{if(g.has(f))return;g.set(f,Il.Started);let _=n(f);if(_){let w=this.opts.es5?Ot.varKinds.var:Ot.varKinds.const;u=(0,qt._)`${u}${w} ${f} = ${_};${this.opts._n}`}else if(_=a==null?void 0:a(f))u=(0,qt._)`${u}${_}${this.opts._n}`;else throw new Gg(f);g.set(f,Il.Completed)})}return u}};Ot.ValueScope=Wg});var he=T(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.or=le.and=le.not=le.CodeGen=le.operators=le.varKinds=le.ValueScopeName=le.ValueScope=le.Scope=le.Name=le.regexpCode=le.stringify=le.getProperty=le.nil=le.strConcat=le.str=le._=void 0;var ye=vo(),Cr=xl(),Hn=vo();Object.defineProperty(le,"_",{enumerable:!0,get:function(){return Hn._}});Object.defineProperty(le,"str",{enumerable:!0,get:function(){return Hn.str}});Object.defineProperty(le,"strConcat",{enumerable:!0,get:function(){return Hn.strConcat}});Object.defineProperty(le,"nil",{enumerable:!0,get:function(){return Hn.nil}});Object.defineProperty(le,"getProperty",{enumerable:!0,get:function(){return Hn.getProperty}});Object.defineProperty(le,"stringify",{enumerable:!0,get:function(){return Hn.stringify}});Object.defineProperty(le,"regexpCode",{enumerable:!0,get:function(){return Hn.regexpCode}});Object.defineProperty(le,"Name",{enumerable:!0,get:function(){return Hn.Name}});var cu=xl();Object.defineProperty(le,"Scope",{enumerable:!0,get:function(){return cu.Scope}});Object.defineProperty(le,"ValueScope",{enumerable:!0,get:function(){return cu.ValueScope}});Object.defineProperty(le,"ValueScopeName",{enumerable:!0,get:function(){return cu.ValueScopeName}});Object.defineProperty(le,"varKinds",{enumerable:!0,get:function(){return cu.varKinds}});le.operators={GT:new ye._Code(">"),GTE:new ye._Code(">="),LT:new ye._Code("<"),LTE:new ye._Code("<="),EQ:new ye._Code("==="),NEQ:new ye._Code("!=="),NOT:new ye._Code("!"),OR:new ye._Code("||"),AND:new ye._Code("&&"),ADD:new ye._Code("+")};var Vn=class{optimizeNodes(){return this}optimizeNames(e,n){return this}},zg=class extends Vn{constructor(e,n,s){super();this.varKind=e,this.name=n,this.rhs=s}render({es5:e,_n:n}){let s=e?Cr.varKinds.var:this.varKind,a=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${a};`+n}optimizeNames(e,n){if(!!e[this.name.str])return this.rhs&&(this.rhs=os(this.rhs,e,n)),this}get names(){return this.rhs instanceof ye._CodeOrName?this.rhs.names:{}}},Ll=class extends Vn{constructor(e,n,s){super();this.lhs=e,this.rhs=n,this.sideEffects=s}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof ye.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=os(this.rhs,e,n),this}get names(){let e=this.lhs instanceof ye.Name?{}:Ke({},this.lhs.names);return uu(e,this.rhs)}},Bg=class extends Ll{constructor(e,n,s,a){super(e,s,a);this.op=n}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Kg=class extends Vn{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Xg=class extends Vn{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Yg=class extends Vn{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Jg=class extends Vn{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,n){return this.code=os(this.code,e,n),this}get names(){return this.code instanceof ye._CodeOrName?this.code.names:{}}},lu=class extends Vn{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((n,s)=>n+s.render(e),"")}optimizeNodes(){let{nodes:e}=this,n=e.length;for(;n--;){let s=e[n].optimizeNodes();Array.isArray(s)?e.splice(n,1,...s):s?e[n]=s:e.splice(n,1)}return e.length>0?this:void 0}optimizeNames(e,n){let{nodes:s}=this,a=s.length;for(;a--;){let u=s[a];u.optimizeNames(e,n)||(FA(e,u.names),s.splice(a,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((e,n)=>Ri(e,n.names),{})}},Gn=class extends lu{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Zg=class extends lu{},yo=class extends Gn{};yo.kind="else";var Hr=class extends Gn{constructor(e,n){super(n);this.condition=e}render(e){let n=`if(${this.condition})`+super.render(e);return this.else&&(n+="else "+this.else.render(e)),n}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let n=this.else;if(n){let s=n.optimizeNodes();n=this.else=Array.isArray(s)?new yo(s):s}if(n)return e===!1?n instanceof Hr?n:n.nodes:this.nodes.length?this:new Hr(n_(e),n instanceof Hr?[n]:n.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,n){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(e,n),!!(super.optimizeNames(e,n)||this.else))return this.condition=os(this.condition,e,n),this}get names(){let e=super.names;return uu(e,this.condition),this.else&&Ri(e,this.else.names),e}};Hr.kind="if";var ss=class extends Gn{};ss.kind="for";var Qg=class extends ss{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,n){if(!!super.optimizeNames(e,n))return this.iteration=os(this.iteration,e,n),this}get names(){return Ri(super.names,this.iteration.names)}},e_=class extends ss{constructor(e,n,s,a){super();this.varKind=e,this.name=n,this.from=s,this.to=a}render(e){let n=e.es5?Cr.varKinds.var:this.varKind,{name:s,from:a,to:u}=this;return`for(${n} ${s}=${a}; ${s}<${u}; ${s}++)`+super.render(e)}get names(){let e=uu(super.names,this.from);return uu(e,this.to)}},Dl=class extends ss{constructor(e,n,s,a){super();this.loop=e,this.varKind=n,this.name=s,this.iterable=a}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,n){if(!!super.optimizeNames(e,n))return this.iterable=os(this.iterable,e,n),this}get names(){return Ri(super.names,this.iterable.names)}},iu=class extends Gn{constructor(e,n,s){super();this.name=e,this.args=n,this.async=s}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};iu.kind="func";var su=class extends lu{render(e){return"return "+super.render(e)}};su.kind="return";var t_=class extends Gn{render(e){let n="try"+super.render(e);return this.catch&&(n+=this.catch.render(e)),this.finally&&(n+=this.finally.render(e)),n}optimizeNodes(){var e,n;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(e,n){var s,a;return super.optimizeNames(e,n),(s=this.catch)===null||s===void 0||s.optimizeNames(e,n),(a=this.finally)===null||a===void 0||a.optimizeNames(e,n),this}get names(){let e=super.names;return this.catch&&Ri(e,this.catch.names),this.finally&&Ri(e,this.finally.names),e}},ou=class extends Gn{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};ou.kind="catch";var au=class extends Gn{render(e){return"finally"+super.render(e)}};au.kind="finally";var r_=class{constructor(e,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts=fr(Ke({},n),{_n:n.lines?`
37
37
  `:""}),this._extScope=e,this._scope=new Cr.Scope({parent:e}),this._nodes=[new Zg]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let s=this._extScope.value(e,n);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,s,a){let u=this._scope.toName(n);return s!==void 0&&a&&(this._constants[u.str]=s),this._leafNode(new zg(e,u,s)),u}const(e,n,s){return this._def(Cr.varKinds.const,e,n,s)}let(e,n,s){return this._def(Cr.varKinds.let,e,n,s)}var(e,n,s){return this._def(Cr.varKinds.var,e,n,s)}assign(e,n,s){return this._leafNode(new Ll(e,n,s))}add(e,n){return this._leafNode(new Bg(e,le.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==ye.nil&&this._leafNode(new Jg(e)),this}object(...e){let n=["{"];for(let[s,a]of e)n.length>1&&n.push(","),n.push(s),(s!==a||this.opts.es5)&&(n.push(":"),(0,ye.addCodeArg)(n,a));return n.push("}"),new ye._Code(n)}if(e,n,s){if(this._blockNode(new Hr(e)),n&&s)this.code(n).else().code(s).endIf();else if(n)this.code(n).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Hr(e))}else(){return this._elseNode(new yo)}endIf(){return this._endBlockNode(Hr,yo)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new Qg(e),n)}forRange(e,n,s,a,u=this.opts.es5?Cr.varKinds.var:Cr.varKinds.let){let l=this._scope.toName(e);return this._for(new e_(u,l,n,s),()=>a(l))}forOf(e,n,s,a=Cr.varKinds.const){let u=this._scope.toName(e);if(this.opts.es5){let l=n instanceof ye.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,ye._)`${l}.length`,d=>{this.var(u,(0,ye._)`${l}[${d}]`),s(u)})}return this._for(new Dl("of",a,u,n),()=>s(u))}forIn(e,n,s,a=this.opts.es5?Cr.varKinds.var:Cr.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,ye._)`Object.keys(${n})`,s);let u=this._scope.toName(e);return this._for(new Dl("in",a,u,n),()=>s(u))}endFor(){return this._endBlockNode(ss)}label(e){return this._leafNode(new Kg(e))}break(e){return this._leafNode(new Xg(e))}return(e){let n=new su;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(su)}try(e,n,s){if(!n&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let a=new t_;if(this._blockNode(a),this.code(e),n){let u=this.name("e");this._currNode=a.catch=new ou(u),n(u)}return s&&(this._currNode=a.finally=new au,this.code(s)),this._endBlockNode(ou,au)}throw(e){return this._leafNode(new Yg(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-n;if(s<0||e!==void 0&&s!==e)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=ye.nil,s,a){return this._blockNode(new iu(e,n,s)),a&&this.code(a).endFunc(),this}endFunc(){return this._endBlockNode(iu)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,n){let s=this._currNode;if(s instanceof e||n&&s instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof Hr))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};le.CodeGen=r_;function Ri(r,e){for(let n in e)r[n]=(r[n]||0)+(e[n]||0);return r}function uu(r,e){return e instanceof ye._CodeOrName?Ri(r,e.names):r}function os(r,e,n){if(r instanceof ye.Name)return s(r);if(!a(r))return r;return new ye._Code(r._items.reduce((u,l)=>(l instanceof ye.Name&&(l=s(l)),l instanceof ye._Code?u.push(...l._items):u.push(l),u),[]));function s(u){let l=n[u.str];return l===void 0||e[u.str]!==1?u:(delete e[u.str],l)}function a(u){return u instanceof ye._Code&&u._items.some(l=>l instanceof ye.Name&&e[l.str]===1&&n[l.str]!==void 0)}}function FA(r,e){for(let n in e)r[n]=(r[n]||0)-(e[n]||0)}function n_(r){return typeof r=="boolean"||typeof r=="number"||r===null?!r:(0,ye._)`!${ql(r)}`}le.not=n_;var jA=i_(le.operators.AND);function kA(...r){return r.reduce(jA)}le.and=kA;var UA=i_(le.operators.OR);function HA(...r){return r.reduce(UA)}le.or=HA;function i_(r){return(e,n)=>e===ye.nil?n:n===ye.nil?e:(0,ye._)`${ql(e)} ${r} ${ql(n)}`}function ql(r){return r instanceof ye.Name?r:(0,ye._)`(${r})`}});var be=T(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.checkStrictMode=fe.getErrorPath=fe.Type=fe.useFunc=fe.setEvaluated=fe.evaluatedPropsToName=fe.mergeEvaluated=fe.eachItem=fe.unescapeJsonPointer=fe.escapeJsonPointer=fe.escapeFragment=fe.unescapeFragment=fe.schemaRefOrVal=fe.schemaHasRulesButRef=fe.schemaHasRules=fe.checkUnknownRules=fe.alwaysValidSchema=fe.toHash=void 0;var Ne=he(),VA=vo();function GA(r){let e={};for(let n of r)e[n]=!0;return e}fe.toHash=GA;function WA(r,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(a_(r,e),!u_(e,r.self.RULES.all))}fe.alwaysValidSchema=WA;function a_(r,e=r.schema){let{opts:n,self:s}=r;if(!n.strictSchema||typeof e=="boolean")return;let a=s.RULES.keywords;for(let u in e)a[u]||h_(r,`unknown keyword: "${u}"`)}fe.checkUnknownRules=a_;function u_(r,e){if(typeof r=="boolean")return!r;for(let n in r)if(e[n])return!0;return!1}fe.schemaHasRules=u_;function zA(r,e){if(typeof r=="boolean")return!r;for(let n in r)if(n!=="$ref"&&e.all[n])return!0;return!1}fe.schemaHasRulesButRef=zA;function BA({topSchemaRef:r,schemaPath:e},n,s,a){if(!a){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,Ne._)`${n}`}return(0,Ne._)`${r}${e}${(0,Ne.getProperty)(s)}`}fe.schemaRefOrVal=BA;function KA(r){return c_(decodeURIComponent(r))}fe.unescapeFragment=KA;function XA(r){return encodeURIComponent(Ml(r))}fe.escapeFragment=XA;function Ml(r){return typeof r=="number"?`${r}`:r.replace(/~/g,"~0").replace(/\//g,"~1")}fe.escapeJsonPointer=Ml;function c_(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}fe.unescapeJsonPointer=c_;function YA(r,e){if(Array.isArray(r))for(let n of r)e(n);else e(r)}fe.eachItem=YA;function s_({mergeNames:r,mergeToName:e,mergeValues:n,resultToName:s}){return(a,u,l,d)=>{let g=l===void 0?u:l instanceof Ne.Name?(u instanceof Ne.Name?r(a,u,l):e(a,u,l),l):u instanceof Ne.Name?(e(a,l,u),u):n(u,l);return d===Ne.Name&&!(g instanceof Ne.Name)?s(a,g):g}}fe.mergeEvaluated={props:s_({mergeNames:(r,e,n)=>r.if((0,Ne._)`${n} !== true && ${e} !== undefined`,()=>{r.if((0,Ne._)`${e} === true`,()=>r.assign(n,!0),()=>r.assign(n,(0,Ne._)`${n} || {}`).code((0,Ne._)`Object.assign(${n}, ${e})`))}),mergeToName:(r,e,n)=>r.if((0,Ne._)`${n} !== true`,()=>{e===!0?r.assign(n,!0):(r.assign(n,(0,Ne._)`${n} || {}`),Fl(r,n,e))}),mergeValues:(r,e)=>r===!0?!0:Ke(Ke({},r),e),resultToName:l_}),items:s_({mergeNames:(r,e,n)=>r.if((0,Ne._)`${n} !== true && ${e} !== undefined`,()=>r.assign(n,(0,Ne._)`${e} === true ? true : ${n} > ${e} ? ${n} : ${e}`)),mergeToName:(r,e,n)=>r.if((0,Ne._)`${n} !== true`,()=>r.assign(n,e===!0?!0:(0,Ne._)`${n} > ${e} ? ${n} : ${e}`)),mergeValues:(r,e)=>r===!0?!0:Math.max(r,e),resultToName:(r,e)=>r.var("items",e)})};function l_(r,e){if(e===!0)return r.var("props",!0);let n=r.var("props",(0,Ne._)`{}`);return e!==void 0&&Fl(r,n,e),n}fe.evaluatedPropsToName=l_;function Fl(r,e,n){Object.keys(n).forEach(s=>r.assign((0,Ne._)`${e}${(0,Ne.getProperty)(s)}`,!0))}fe.setEvaluated=Fl;var o_={};function JA(r,e){return r.scopeValue("func",{ref:e,code:o_[e.code]||(o_[e.code]=new VA._Code(e.code))})}fe.useFunc=JA;var f_;(function(r){r[r.Num=0]="Num",r[r.Str=1]="Str"})(f_=fe.Type||(fe.Type={}));function ZA(r,e,n){if(r instanceof Ne.Name){let s=e===f_.Num;return n?s?(0,Ne._)`"[" + ${r} + "]"`:(0,Ne._)`"['" + ${r} + "']"`:s?(0,Ne._)`"/" + ${r}`:(0,Ne._)`"/" + ${r}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,Ne.getProperty)(r).toString():"/"+Ml(r)}fe.getErrorPath=ZA;function h_(r,e,n=r.opts.strictSchema){if(!!n){if(e=`strict mode: ${e}`,n===!0)throw new Error(e);r.self.logger.warn(e)}}fe.checkStrictMode=h_});var yn=T(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});var gt=he(),QA={data:new gt.Name("data"),valCxt:new gt.Name("valCxt"),instancePath:new gt.Name("instancePath"),parentData:new gt.Name("parentData"),parentDataProperty:new gt.Name("parentDataProperty"),rootData:new gt.Name("rootData"),dynamicAnchors:new gt.Name("dynamicAnchors"),vErrors:new gt.Name("vErrors"),errors:new gt.Name("errors"),this:new gt.Name("this"),self:new gt.Name("self"),scope:new gt.Name("scope"),json:new gt.Name("json"),jsonPos:new gt.Name("jsonPos"),jsonLen:new gt.Name("jsonLen"),jsonPart:new gt.Name("jsonPart")};jl.default=QA});var Eo=T(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.extendErrors=_t.resetErrorsCount=_t.reportExtraError=_t.reportError=_t.keyword$DataError=_t.keywordError=void 0;var Ee=he(),fu=be(),Rt=yn();_t.keywordError={message:({keyword:r})=>(0,Ee.str)`must pass "${r}" keyword validation`};_t.keyword$DataError={message:({keyword:r,schemaType:e})=>e?(0,Ee.str)`"${r}" keyword must be ${e} ($data)`:(0,Ee.str)`"${r}" keyword is invalid ($data)`};function eP(r,e=_t.keywordError,n,s){let{it:a}=r,{gen:u,compositeRule:l,allErrors:d}=a,g=m_(r,e,n);(s!=null?s:l||d)?d_(u,g):p_(a,(0,Ee._)`[${g}]`)}_t.reportError=eP;function tP(r,e=_t.keywordError,n){let{it:s}=r,{gen:a,compositeRule:u,allErrors:l}=s,d=m_(r,e,n);d_(a,d),u||l||p_(s,Rt.default.vErrors)}_t.reportExtraError=tP;function rP(r,e){r.assign(Rt.default.errors,e),r.if((0,Ee._)`${Rt.default.vErrors} !== null`,()=>r.if(e,()=>r.assign((0,Ee._)`${Rt.default.vErrors}.length`,e),()=>r.assign(Rt.default.vErrors,null)))}_t.resetErrorsCount=rP;function nP({gen:r,keyword:e,schemaValue:n,data:s,errsCount:a,it:u}){if(a===void 0)throw new Error("ajv implementation error");let l=r.name("err");r.forRange("i",a,Rt.default.errors,d=>{r.const(l,(0,Ee._)`${Rt.default.vErrors}[${d}]`),r.if((0,Ee._)`${l}.instancePath === undefined`,()=>r.assign((0,Ee._)`${l}.instancePath`,(0,Ee.strConcat)(Rt.default.instancePath,u.errorPath))),r.assign((0,Ee._)`${l}.schemaPath`,(0,Ee.str)`${u.errSchemaPath}/${e}`),u.opts.verbose&&(r.assign((0,Ee._)`${l}.schema`,n),r.assign((0,Ee._)`${l}.data`,s))})}_t.extendErrors=nP;function d_(r,e){let n=r.const("err",e);r.if((0,Ee._)`${Rt.default.vErrors} === null`,()=>r.assign(Rt.default.vErrors,(0,Ee._)`[${n}]`),(0,Ee._)`${Rt.default.vErrors}.push(${n})`),r.code((0,Ee._)`${Rt.default.errors}++`)}function p_(r,e){let{gen:n,validateName:s,schemaEnv:a}=r;a.$async?n.throw((0,Ee._)`new ${r.ValidationError}(${e})`):(n.assign((0,Ee._)`${s}.errors`,e),n.return(!1))}var Ai={keyword:new Ee.Name("keyword"),schemaPath:new Ee.Name("schemaPath"),params:new Ee.Name("params"),propertyName:new Ee.Name("propertyName"),message:new Ee.Name("message"),schema:new Ee.Name("schema"),parentSchema:new Ee.Name("parentSchema")};function m_(r,e,n){let{createErrors:s}=r.it;return s===!1?(0,Ee._)`{}`:iP(r,e,n)}function iP(r,e,n={}){let{gen:s,it:a}=r,u=[sP(a,n),oP(r,n)];return aP(r,e,u),s.object(...u)}function sP({errorPath:r},{instancePath:e}){let n=e?(0,Ee.str)`${r}${(0,fu.getErrorPath)(e,fu.Type.Str)}`:r;return[Rt.default.instancePath,(0,Ee.strConcat)(Rt.default.instancePath,n)]}function oP({keyword:r,it:{errSchemaPath:e}},{schemaPath:n,parentSchema:s}){let a=s?e:(0,Ee.str)`${e}/${r}`;return n&&(a=(0,Ee.str)`${a}${(0,fu.getErrorPath)(n,fu.Type.Str)}`),[Ai.schemaPath,a]}function aP(r,{params:e,message:n},s){let{keyword:a,data:u,schemaValue:l,it:d}=r,{opts:g,propertyName:f,topSchemaRef:_,schemaPath:w}=d;s.push([Ai.keyword,a],[Ai.params,typeof e=="function"?e(r):e||(0,Ee._)`{}`]),g.messages&&s.push([Ai.message,typeof n=="function"?n(r):n]),g.verbose&&s.push([Ai.schema,l],[Ai.parentSchema,(0,Ee._)`${_}${w}`],[Rt.default.data,u]),f&&s.push([Ai.propertyName,f])}});var __=T(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});as.boolOrEmptySchema=as.topBoolOrEmptySchema=void 0;var uP=Eo(),cP=he(),lP=yn(),fP={message:"boolean schema is false"};function hP(r){let{gen:e,schema:n,validateName:s}=r;n===!1?g_(r,!1):typeof n=="object"&&n.$async===!0?e.return(lP.default.data):(e.assign((0,cP._)`${s}.errors`,null),e.return(!0))}as.topBoolOrEmptySchema=hP;function dP(r,e){let{gen:n,schema:s}=r;s===!1?(n.var(e,!1),g_(r)):n.var(e,!0)}as.boolOrEmptySchema=dP;function g_(r,e){let{gen:n,data:s}=r,a={gen:n,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:r};(0,uP.reportError)(a,fP,void 0,e)}});var kl=T(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});us.getRules=us.isJSONType=void 0;var pP=["string","number","integer","boolean","null","object","array"],mP=new Set(pP);function gP(r){return typeof r=="string"&&mP.has(r)}us.isJSONType=gP;function _P(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:fr(Ke({},r),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}us.getRules=_P});var Ul=T(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.shouldUseRule=Wn.shouldUseGroup=Wn.schemaHasRulesForType=void 0;function vP({schema:r,self:e},n){let s=e.RULES.types[n];return s&&s!==!0&&v_(r,s)}Wn.schemaHasRulesForType=vP;function v_(r,e){return e.rules.some(n=>y_(r,n))}Wn.shouldUseGroup=v_;function y_(r,e){var n;return r[e.keyword]!==void 0||((n=e.definition.implements)===null||n===void 0?void 0:n.some(s=>r[s]!==void 0))}Wn.shouldUseRule=y_});var wo=T(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.reportTypeError=ot.checkDataTypes=ot.checkDataType=ot.coerceAndCheckDataType=ot.getJSONTypes=ot.getSchemaTypes=ot.DataType=void 0;var yP=kl(),EP=Ul(),$P=Eo(),oe=he(),E_=be(),$o;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})($o=ot.DataType||(ot.DataType={}));function wP(r){let e=$_(r.type);if(e.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&e.push("null")}return e}ot.getSchemaTypes=wP;function $_(r){let e=Array.isArray(r)?r:r?[r]:[];if(e.every(yP.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}ot.getJSONTypes=$_;function bP(r,e){let{gen:n,data:s,opts:a}=r,u=SP(e,a.coerceTypes),l=e.length>0&&!(u.length===0&&e.length===1&&(0,EP.schemaHasRulesForType)(r,e[0]));if(l){let d=Vl(e,s,a.strictNumbers,$o.Wrong);n.if(d,()=>{u.length?OP(r,e,u):Gl(r)})}return l}ot.coerceAndCheckDataType=bP;var w_=new Set(["string","number","integer","boolean","null"]);function SP(r,e){return e?r.filter(n=>w_.has(n)||e==="array"&&n==="array"):[]}function OP(r,e,n){let{gen:s,data:a,opts:u}=r,l=s.let("dataType",(0,oe._)`typeof ${a}`),d=s.let("coerced",(0,oe._)`undefined`);u.coerceTypes==="array"&&s.if((0,oe._)`${l} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>s.assign(a,(0,oe._)`${a}[0]`).assign(l,(0,oe._)`typeof ${a}`).if(Vl(e,a,u.strictNumbers),()=>s.assign(d,a))),s.if((0,oe._)`${d} !== undefined`);for(let f of n)(w_.has(f)||f==="array"&&u.coerceTypes==="array")&&g(f);s.else(),Gl(r),s.endIf(),s.if((0,oe._)`${d} !== undefined`,()=>{s.assign(a,d),RP(r,d)});function g(f){switch(f){case"string":s.elseIf((0,oe._)`${l} == "number" || ${l} == "boolean"`).assign(d,(0,oe._)`"" + ${a}`).elseIf((0,oe._)`${a} === null`).assign(d,(0,oe._)`""`);return;case"number":s.elseIf((0,oe._)`${l} == "boolean" || ${a} === null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serverless-devs/s",
3
- "version": "2.0.100-beta.10",
3
+ "version": "2.0.100-beta.11",
4
4
  "description": "Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",
5
5
  "homepage": "https://www.serverless-devs.com",
6
6
  "keywords": [